You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bh...@apache.org on 2014/03/27 16:08:15 UTC
[01/51] [partial] CB-6346 - Add node_modules to source control
Repository: cordova-blackberry
Updated Branches:
refs/heads/master 7b563950c -> 1139813cd
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/tests/iTunes-BIG.xml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/tests/iTunes-BIG.xml b/blackberry10/node_modules/plugman/node_modules/plist/tests/iTunes-BIG.xml
new file mode 100644
index 0000000..cb3e049
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/tests/iTunes-BIG.xml
@@ -0,0 +1,299484 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Major Version</key><integer>1</integer>
+ <key>Minor Version</key><integer>1</integer>
+ <key>Application Version</key><string>9.2.1</string>
+ <key>Features</key><integer>5</integer>
+ <key>Show Content Ratings</key><true/>
+ <key>Music Folder</key><string>file://localhost/Volumes/tb2/iTunes%20Media/</string>
+ <key>Library Persistent ID</key><string>31F50A32280EF3CC</string>
+ <key>Tracks</key>
+ <dict>
+ <key>1292</key>
+ <dict>
+ <key>Track ID</key><integer>1292</integer>
+ <key>Name</key><string>I Ain't Mad At Cha</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>3004070</integer>
+ <key>Total Time</key><integer>184318</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>13</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:45Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Play Count</key><integer>1</integer>
+ <key>Play Date</key><integer>3356700357</integer>
+ <key>Play Date UTC</key><date>2010-05-14T23:45:57Z</date>
+ <key>Persistent ID</key><string>1A21CBC85428B954</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-13%20I%20Ain't%20Mad%20At%20Cha.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1294</key>
+ <dict>
+ <key>Track ID</key><integer>1294</integer>
+ <key>Name</key><string>Ambitionz Az A Ridah</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4514055</integer>
+ <key>Total Time</key><integer>278452</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>1</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:14Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Play Count</key><integer>1</integer>
+ <key>Play Date</key><integer>3356699157</integer>
+ <key>Play Date UTC</key><date>2010-05-14T23:25:57Z</date>
+ <key>Persistent ID</key><string>3FB36E2B29D77829</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-01%20Ambitionz%20Az%20A%20Ridah.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1296</key>
+ <dict>
+ <key>Track ID</key><integer>1296</integer>
+ <key>Name</key><string>Ambitionz Az A Ridah</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4514055</integer>
+ <key>Total Time</key><integer>278452</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>1</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:14Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>95C08FCAC4A80CF9</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-01%20Ambitionz%20Az%20A%20Ridah%201.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1298</key>
+ <dict>
+ <key>Track ID</key><integer>1298</integer>
+ <key>Name</key><string>All About you</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4471401</integer>
+ <key>Total Time</key><integer>275805</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>2</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:14Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>21CB086ADF63BE8E</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-02%20All%20About%20you.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1300</key>
+ <dict>
+ <key>Track ID</key><integer>1300</integer>
+ <key>Name</key><string>All About you</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4471401</integer>
+ <key>Total Time</key><integer>275805</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>2</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:14Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>570C725BF04268D3</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-02%20All%20About%20you%201.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1302</key>
+ <dict>
+ <key>Track ID</key><integer>1302</integer>
+ <key>Name</key><string>Skandalouz</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4038695</integer>
+ <key>Total Time</key><integer>248939</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>3</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:14Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>C89A02E32570E4D2</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-03%20Skandalouz.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1304</key>
+ <dict>
+ <key>Track ID</key><integer>1304</integer>
+ <key>Name</key><string>Skandalouz</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4038695</integer>
+ <key>Total Time</key><integer>248939</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>3</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:14Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>50BF725A1213132A</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-03%20Skandalouz%201.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1306</key>
+ <dict>
+ <key>Track ID</key><integer>1306</integer>
+ <key>Name</key><string>Got My Mind Made Up</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5071836</integer>
+ <key>Total Time</key><integer>312794</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>4</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:14Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>9B744943CBC2A83C</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-04%20Got%20My%20Mind%20Made%20Up.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1308</key>
+ <dict>
+ <key>Track ID</key><integer>1308</integer>
+ <key>Name</key><string>Got My Mind Made Up</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5071836</integer>
+ <key>Total Time</key><integer>312794</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>4</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:14Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>C6DA786C2A6EBDA2</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-04%20Got%20My%20Mind%20Made%20Up%201.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1310</key>
+ <dict>
+ <key>Track ID</key><integer>1310</integer>
+ <key>Name</key><string>How Do You Want It</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4660210</integer>
+ <key>Total Time</key><integer>287391</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>5</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>8571DA2B0B40D3BB</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-05%20How%20Do%20You%20Want%20It.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1312</key>
+ <dict>
+ <key>Track ID</key><integer>1312</integer>
+ <key>Name</key><string>How Do You Want It</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4660210</integer>
+ <key>Total Time</key><integer>287391</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>5</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>F2C9D86A1B77DBA8</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-05%20How%20Do%20You%20Want%20It%201.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1314</key>
+ <dict>
+ <key>Track ID</key><integer>1314</integer>
+ <key>Name</key><string>2 of Americas Most Wanted</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4024463</integer>
+ <key>Total Time</key><integer>248126</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>6</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>B0F5BA6D3B0E6F1D</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-06%202%20of%20Americas%20Most%20Wanted.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1316</key>
+ <dict>
+ <key>Track ID</key><integer>1316</integer>
+ <key>Name</key><string>2 of Americas Most Wanted</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4024463</integer>
+ <key>Total Time</key><integer>248126</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>6</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>7F654912EEFD17D3</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-06%202%20of%20Americas%20Most%20Wanted%201.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1318</key>
+ <dict>
+ <key>Track ID</key><integer>1318</integer>
+ <key>Name</key><string>No More Pain</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>6071189</integer>
+ <key>Total Time</key><integer>374536</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>7</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>264BE44201DF4E4B</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-07%20No%20More%20Pain.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1320</key>
+ <dict>
+ <key>Track ID</key><integer>1320</integer>
+ <key>Name</key><string>Heartz of Men</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4595876</integer>
+ <key>Total Time</key><integer>283490</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>8</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>2A0E15C7C8743458</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-08%20Heartz%20of%20Men.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1322</key>
+ <dict>
+ <key>Track ID</key><integer>1322</integer>
+ <key>Name</key><string>Life Goes On</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4877423</integer>
+ <key>Total Time</key><integer>302717</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>9</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>65927E557CA8261A</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-09%20Life%20Goes%20On.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1324</key>
+ <dict>
+ <key>Track ID</key><integer>1324</integer>
+ <key>Name</key><string>Only God Can Judge Me</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4810378</integer>
+ <key>Total Time</key><integer>296865</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>10</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Play Count</key><integer>1</integer>
+ <key>Play Date</key><integer>3356700152</integer>
+ <key>Play Date UTC</key><date>2010-05-14T23:42:32Z</date>
+ <key>Persistent ID</key><string>F672788F00FDEC02</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-10%20Only%20God%20Can%20Judge%20Me.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1326</key>
+ <dict>
+ <key>Track ID</key><integer>1326</integer>
+ <key>Name</key><string>Tradin' War Strories</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5347856</integer>
+ <key>Total Time</key><integer>329930</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>11</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>82411CE03AB45778</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-11%20Tradin'%20War%20Strories.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1328</key>
+ <dict>
+ <key>Track ID</key><integer>1328</integer>
+ <key>Name</key><string>California Love (Remix)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5491760</integer>
+ <key>Total Time</key><integer>338870</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>13</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>FA7F3F200DC23D0E</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-13%20California%20Love%20(Remix).m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1330</key>
+ <dict>
+ <key>Track ID</key><integer>1330</integer>
+ <key>Name</key><string>What's Ya Phone #</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5025994</integer>
+ <key>Total Time</key><integer>310077</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>14</integer>
+ <key>Track Count</key><integer>14</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>BC009353C68FC591</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/1-14%20What's%20Ya%20Phone%20%23.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1332</key>
+ <dict>
+ <key>Track ID</key><integer>1332</integer>
+ <key>Name</key><string>Can't C Me</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5364866</integer>
+ <key>Total Time</key><integer>330929</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>1</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:46Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Play Count</key><integer>1</integer>
+ <key>Play Date</key><integer>3356700696</integer>
+ <key>Play Date UTC</key><date>2010-05-14T23:51:36Z</date>
+ <key>Persistent ID</key><string>E8ED02747DE91CD1</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-01%20Can't%20C%20Me.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1334</key>
+ <dict>
+ <key>Track ID</key><integer>1334</integer>
+ <key>Name</key><string>Shorty Wanna Be A Thug</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>3763197</integer>
+ <key>Total Time</key><integer>231710</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>2</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>FC700DC46084AFE0</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-02%20Shorty%20Wanna%20Be%20A%20Thug.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1336</key>
+ <dict>
+ <key>Track ID</key><integer>1336</integer>
+ <key>Name</key><string>Holla at Me</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4791064</integer>
+ <key>Total Time</key><integer>295449</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>3</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>D2B7D0E1411454B2</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-03%20Holla%20at%20Me.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1338</key>
+ <dict>
+ <key>Track ID</key><integer>1338</integer>
+ <key>Name</key><string>Wonda Why They Call U Bitch</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4196531</integer>
+ <key>Total Time</key><integer>258715</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>4</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>F7B31B1D0C3C7568</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-04%20Wonda%20Why%20They%20Call%20U%20Bitch.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1340</key>
+ <dict>
+ <key>Track ID</key><integer>1340</integer>
+ <key>Name</key><string>When We Ride</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5013320</integer>
+ <key>Total Time</key><integer>309404</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>5</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>F2AA7C36C6E8BE12</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-05%20When%20We%20Ride.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1342</key>
+ <dict>
+ <key>Track ID</key><integer>1342</integer>
+ <key>Name</key><string>Thug Passion</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4988764</integer>
+ <key>Total Time</key><integer>307732</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>6</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Play Count</key><integer>2</integer>
+ <key>Play Date</key><integer>3354966558</integer>
+ <key>Play Date UTC</key><date>2010-04-24T22:09:18Z</date>
+ <key>Persistent ID</key><string>8D0A7C7FD27E4571</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-06%20Thug%20Passion.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1344</key>
+ <dict>
+ <key>Track ID</key><integer>1344</integer>
+ <key>Name</key><string>Picture Me Rollin'</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5098919</integer>
+ <key>Total Time</key><integer>315441</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>7</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>5AF62E75F0436506</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Users/nrajlich/Music/iTunes/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-07%20Picture%20Me%20Rollin'.m4a</string>
+ <key>File Folder Count</key><integer>-1</integer>
+ <key>Library Folder Count</key><integer>-1</integer>
+ </dict>
+ <key>1346</key>
+ <dict>
+ <key>Track ID</key><integer>1346</integer>
+ <key>Name</key><string>Check Out Time</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4528371</integer>
+ <key>Total Time</key><integer>279311</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>8</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>059162692BB3CBA1</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-08%20Check%20Out%20Time.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1348</key>
+ <dict>
+ <key>Track ID</key><integer>1348</integer>
+ <key>Name</key><string>Ratha Be Ya Nigga</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4118568</integer>
+ <key>Total Time</key><integer>253862</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>9</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>E3A7320BA603D919</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-09%20Ratha%20Be%20Ya%20Nigga.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1350</key>
+ <dict>
+ <key>Track ID</key><integer>1350</integer>
+ <key>Name</key><string>All Eyez On Me</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4990725</integer>
+ <key>Total Time</key><integer>307779</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>10</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>22F97F20D0146A90</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-10%20All%20Eyez%20On%20Me.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1352</key>
+ <dict>
+ <key>Track ID</key><integer>1352</integer>
+ <key>Name</key><string>Run Tha Streets</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4670234</integer>
+ <key>Total Time</key><integer>288088</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>11</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>A15BE54FC212911F</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-11%20Run%20Tha%20Streets.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1354</key>
+ <dict>
+ <key>Track ID</key><integer>1354</integer>
+ <key>Name</key><string>Ain't Hard 2 Find</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4355086</integer>
+ <key>Total Time</key><integer>268606</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>12</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Play Count</key><integer>1</integer>
+ <key>Play Date</key><integer>3353074286</integer>
+ <key>Play Date UTC</key><date>2010-04-03T00:31:26Z</date>
+ <key>Persistent ID</key><string>806E58852B7EF435</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-12%20Ain't%20Hard%202%20Find.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1356</key>
+ <dict>
+ <key>Track ID</key><integer>1356</integer>
+ <key>Name</key><string>Heaven Ain't Hard 2 Find</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>All Eyez On Me</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>3860346</integer>
+ <key>Total Time</key><integer>238188</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>13</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>1996</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>DEE781B59658524D</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/All%20Eyez%20On%20Me/2-13%20Heaven%20Ain't%20Hard%202%20Find.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1358</key>
+ <dict>
+ <key>Track ID</key><integer>1358</integer>
+ <key>Name</key><string>Thugz Mansion (Acoustic Feat. Nas)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4094033</integer>
+ <key>Total Time</key><integer>252515</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>13</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>70FDDF12055CD4FC</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-13%20Thugz%20Mansion%20(Acoustic%20Feat.%20Nas).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1360</key>
+ <dict>
+ <key>Track ID</key><integer>1360</integer>
+ <key>Name</key><string>Intro</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>946032</integer>
+ <key>Total Time</key><integer>55796</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>1</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>16593D4390A90A0F</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-01%20Intro.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1362</key>
+ <dict>
+ <key>Track ID</key><integer>1362</integer>
+ <key>Name</key><string>Still Ballin (Feat Trick Daddy)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>2767393</integer>
+ <key>Total Time</key><integer>169620</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>2</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>71DEA9E297E32023</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-02%20Still%20Ballin%20(Feat%20Trick%20Daddy).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1364</key>
+ <dict>
+ <key>Track ID</key><integer>1364</integer>
+ <key>Name</key><string>When We Ride On Our Enemies</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>2842680</integer>
+ <key>Total Time</key><integer>174287</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>3</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>6A585B60E1CBB5AA</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-03%20When%20We%20Ride%20On%20Our%20Enemies.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1366</key>
+ <dict>
+ <key>Track ID</key><integer>1366</integer>
+ <key>Name</key><string>Changed Man</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>3768281</integer>
+ <key>Total Time</key><integer>232058</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>4</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>A1C6EE1F0761C00C</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-04%20Changed%20Man.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1368</key>
+ <dict>
+ <key>Track ID</key><integer>1368</integer>
+ <key>Name</key><string>Fuck Em All (Feat the Outlawz)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4309840</integer>
+ <key>Total Time</key><integer>265913</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>5</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>9AEBBE24C3E7A90E</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-05%20Fuck%20Em%20All%20(Feat%20the%20Outlawz).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1370</key>
+ <dict>
+ <key>Track ID</key><integer>1370</integer>
+ <key>Name</key><string>Never Be Peace (Feat Kastro)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4852954</integer>
+ <key>Total Time</key><integer>299373</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>6</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>E2CC848538FA90BE</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-06%20Never%20Be%20Peace%20(Feat%20Kastro).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1372</key>
+ <dict>
+ <key>Track ID</key><integer>1372</integer>
+ <key>Name</key><string>Mama's Just A Little Girl</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4828597</integer>
+ <key>Total Time</key><integer>298026</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>7</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>F1AE57992AA169C5</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-07%20Mama's%20Just%20A%20Little%20Girl.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1374</key>
+ <dict>
+ <key>Track ID</key><integer>1374</integer>
+ <key>Name</key><string>Street Fame</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4367968</integer>
+ <key>Total Time</key><integer>269419</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>8</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>BF55532F735DCF70</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-08%20Street%20Fame.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1376</key>
+ <dict>
+ <key>Track ID</key><integer>1376</integer>
+ <key>Name</key><string>What'cha Gonna Do (Feat Young Noble, Kastro)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>3534951</integer>
+ <key>Total Time</key><integer>218869</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>9</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>5A43A2F4E8223AE8</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-09%20What'cha%20Gonna%20Do%20(Feat%20Young%20Noble,%20Kastro).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1378</key>
+ <dict>
+ <key>Track ID</key><integer>1378</integer>
+ <key>Name</key><string>Fair XChange</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>3769666</integer>
+ <key>Total Time</key><integer>232174</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>10</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>EAEFBEEFDFA23870</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-10%20Fair%20XChange.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1380</key>
+ <dict>
+ <key>Track ID</key><integer>1380</integer>
+ <key>Name</key><string>Late Night (Feat Fatal, Kadafi)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4175065</integer>
+ <key>Total Time</key><integer>257484</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>11</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>C33E0B0455944C75</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-11%20Late%20Night%20(Feat%20Fatal,%20Kadafi).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1382</key>
+ <dict>
+ <key>Track ID</key><integer>1382</integer>
+ <key>Name</key><string>Ghetto Star (Feat Nutt-So)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4121124</integer>
+ <key>Total Time</key><integer>254814</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>12</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>47EB30AEDFC147D6</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/1-12%20Ghetto%20Star%20(Feat%20Nutt-So).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1384</key>
+ <dict>
+ <key>Track ID</key><integer>1384</integer>
+ <key>Name</key><string>My Block (Remix)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5220779</integer>
+ <key>Total Time</key><integer>322500</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>14</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>8933997822DB2358</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-14%20My%20Block%20(Remix).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1386</key>
+ <dict>
+ <key>Track ID</key><integer>1386</integer>
+ <key>Name</key><string>Thugz Mansion (Feat. Anthony Hamilton)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4017564</integer>
+ <key>Total Time</key><integer>247639</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>15</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>3CFCBAECF15CE064</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-15%20Thugz%20Mansion%20(Feat.%20Anthony%20Hamilton).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1388</key>
+ <dict>
+ <key>Track ID</key><integer>1388</integer>
+ <key>Name</key><string>Never Call U Bitch Again (Feat. Tyrese)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4512111</integer>
+ <key>Total Time</key><integer>278359</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>16</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>E08C0DA4B940D826</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-16%20Never%20Call%20U%20Bitch%20Again%20(Feat.%20Tyrese).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1390</key>
+ <dict>
+ <key>Track ID</key><integer>1390</integer>
+ <key>Name</key><string>Better Dayz (Feat. Mr. Biggs)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4172644</integer>
+ <key>Total Time</key><integer>257670</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>17</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>4815B5D73501BD51</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-17%20Better%20Dayz%20(Feat.%20Mr.%20Biggs).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1392</key>
+ <dict>
+ <key>Track ID</key><integer>1392</integer>
+ <key>Name</key><string>U Can Call</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>3733670</integer>
+ <key>Total Time</key><integer>229992</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>18</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>DFD8602E3970A4D4</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-18%20U%20Can%20Call.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1394</key>
+ <dict>
+ <key>Track ID</key><integer>1394</integer>
+ <key>Name</key><string>Military Minds (Feat Bukshot, Cocoa Brovas)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5340891</integer>
+ <key>Total Time</key><integer>329489</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>19</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>21E0E39EAE529BD8</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-19%20Military%20Minds%20(Feat%20Bukshot,%20Cocoa%20Brovas).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1396</key>
+ <dict>
+ <key>Track ID</key><integer>1396</integer>
+ <key>Name</key><string>Fame</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4706810</integer>
+ <key>Total Time</key><integer>290364</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>20</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:16Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>98F4BE4C8B1BEA1D</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-20%20Fame.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1398</key>
+ <dict>
+ <key>Track ID</key><integer>1398</integer>
+ <key>Name</key><string>Fair XChange (Remix)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>3835686</integer>
+ <key>Total Time</key><integer>236284</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>21</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:18Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>A09576FCC5153FE6</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-21%20Fair%20XChange%20(Remix).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1400</key>
+ <dict>
+ <key>Track ID</key><integer>1400</integer>
+ <key>Name</key><string>Catchin Feelins (Feat Napolean)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4766402</integer>
+ <key>Total Time</key><integer>294032</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>22</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:18Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>DFB1975FBA84B24F</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-22%20Catchin%20Feelins%20(Feat%20Napolean).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1402</key>
+ <dict>
+ <key>Track ID</key><integer>1402</integer>
+ <key>Name</key><string>There U Go (Feat Kastro, Kadafi, Young Noble, Big Syke)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5355667</integer>
+ <key>Total Time</key><integer>330395</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>23</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:18Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>0399EC586426A82F</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-23%20There%20U%20Go%20(Feat%20Kastro,%20Kadafi,%20Young%20Noble,%20Big%20Syke).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1404</key>
+ <dict>
+ <key>Track ID</key><integer>1404</integer>
+ <key>Name</key><string>This Life I Lead (Feat Outlawz)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5208797</integer>
+ <key>Total Time</key><integer>321339</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>24</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:18Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:47Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>D717A5C4CE9A3331</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-24%20This%20Life%20I%20Lead%20(Feat%20Outlawz).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1406</key>
+ <dict>
+ <key>Track ID</key><integer>1406</integer>
+ <key>Name</key><string>Who Do U Believe In (Feat Kadafi)</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>5362611</integer>
+ <key>Total Time</key><integer>330952</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>25</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:20Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:48Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>FA4FE5CB9005CE36</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-25%20Who%20Do%20U%20Believe%20In%20(Feat%20Kadafi).m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1408</key>
+ <dict>
+ <key>Track ID</key><integer>1408</integer>
+ <key>Name</key><string>They Don't Give A Fuck About Us</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>4965514</integer>
+ <key>Total Time</key><integer>308057</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>26</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:20Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:48Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>B48B63460226C55F</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-26%20They%20Don't%20Give%20A%20Fuck%20About%20Us.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1410</key>
+ <dict>
+ <key>Track ID</key><integer>1410</integer>
+ <key>Name</key><string>Outro</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Better Dayz</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>269108</integer>
+ <key>Total Time</key><integer>13651</integer>
+ <key>Disc Number</key><integer>2</integer>
+ <key>Disc Count</key><integer>2</integer>
+ <key>Track Number</key><integer>27</integer>
+ <key>Track Count</key><integer>27</integer>
+ <key>Year</key><integer>2002</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:20Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:48Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>RNS Team</string>
+ <key>Persistent ID</key><string>08493D7390E1985D</string>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Better%20Dayz/2-27%20Outro.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1412</key>
+ <dict>
+ <key>Track ID</key><integer>1412</integer>
+ <key>Name</key><string>Live Medley</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Live</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>2987819</integer>
+ <key>Total Time</key><integer>183296</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>1</integer>
+ <key>Track Number</key><integer>1</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>2004</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:28Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:48Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>042D086FDC68AA84</string>
+ <key>Disabled</key><true/>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Live/01%20Live%20Medley.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1414</key>
+ <dict>
+ <key>Track ID</key><integer>1414</integer>
+ <key>Name</key><string>Intro</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Live</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>267068</integer>
+ <key>Total Time</key><integer>13396</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>1</integer>
+ <key>Track Number</key><integer>2</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>2004</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:30Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:48Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>247DBC78EBE2DF15</string>
+ <key>Disabled</key><true/>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Live/02%20Intro.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1416</key>
+ <dict>
+ <key>Track ID</key><integer>1416</integer>
+ <key>Name</key><string>Ambitionz Az A Ridah</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Live</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>2764015</integer>
+ <key>Total Time</key><integer>169364</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>1</integer>
+ <key>Track Number</key><integer>3</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>2004</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:30Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:48Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>CCBB40B480A41F77</string>
+ <key>Disabled</key><true/>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Live/03%20Ambitionz%20Az%20A%20Ridah.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1418</key>
+ <dict>
+ <key>Track ID</key><integer>1418</integer>
+ <key>Name</key><string>So Many Tears</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Live</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>1458543</integer>
+ <key>Total Time</key><integer>87862</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>1</integer>
+ <key>Track Number</key><integer>4</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>2004</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:30Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:48Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>4C2C966D33BA34D9</string>
+ <key>Disabled</key><true/>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Live/04%20So%20Many%20Tears.m4a</string>
+ <key>File Folder Count</key><integer>5</integer>
+ <key>Library Folder Count</key><integer>1</integer>
+ </dict>
+ <key>1420</key>
+ <dict>
+ <key>Track ID</key><integer>1420</integer>
+ <key>Name</key><string>Troublesome</string>
+ <key>Artist</key><string>2Pac</string>
+ <key>Album</key><string>Live</string>
+ <key>Grouping</key><string>Rap</string>
+ <key>Genre</key><string>Hip Hop/Rap</string>
+ <key>Kind</key><string>AAC audio file</string>
+ <key>Size</key><integer>3006696</integer>
+ <key>Total Time</key><integer>184527</integer>
+ <key>Disc Number</key><integer>1</integer>
+ <key>Disc Count</key><integer>1</integer>
+ <key>Track Number</key><integer>5</integer>
+ <key>Track Count</key><integer>13</integer>
+ <key>Year</key><integer>2004</integer>
+ <key>Date Modified</key><date>2006-09-28T00:49:30Z</date>
+ <key>Date Added</key><date>2010-02-25T05:47:48Z</date>
+ <key>Bit Rate</key><integer>128</integer>
+ <key>Sample Rate</key><integer>44100</integer>
+ <key>Comments</key><string>www.bizzydownload.tk</string>
+ <key>Persistent ID</key><string>43056CA18C83AB67</string>
+ <key>Disabled</key><true/>
+ <key>Track Type</key><string>File</string>
+ <key>Location</key><string>file://localhost/Volumes/tb2/iTunes%20Media/Music/2Pac/Live/05%
<TRUNCATED>
[07/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/package.json b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/package.json
new file mode 100644
index 0000000..a347405
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/package.json
@@ -0,0 +1,39 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me"
+ },
+ "name": "minimatch",
+ "description": "a glob matcher in javascript",
+ "version": "0.2.12",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "main": "minimatch.js",
+ "scripts": {
+ "test": "tap test"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "dependencies": {
+ "lru-cache": "2",
+ "sigmund": "~1.0.0"
+ },
+ "devDependencies": {
+ "tap": ""
+ },
+ "license": {
+ "type": "MIT",
+ "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
+ },
+ "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` charac
ter, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\n
then minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The opt
ions supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if
necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minim
atch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not expli
citly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/minimatch/issues"
+ },
+ "_id": "minimatch@0.2.12",
+ "_from": "minimatch@~0.2.11"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/basic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/basic.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/basic.js
new file mode 100644
index 0000000..ae7ac73
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/basic.js
@@ -0,0 +1,399 @@
+// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
+//
+// TODO: Some of these tests do very bad things with backslashes, and will
+// most likely fail badly on windows. They should probably be skipped.
+
+var tap = require("tap")
+ , globalBefore = Object.keys(global)
+ , mm = require("../")
+ , files = [ "a", "b", "c", "d", "abc"
+ , "abd", "abe", "bb", "bcd"
+ , "ca", "cb", "dd", "de"
+ , "bdir/", "bdir/cfile"]
+ , next = files.concat([ "a-b", "aXb"
+ , ".x", ".y" ])
+
+
+var patterns =
+ [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test"
+ , ["a*", ["a", "abc", "abd", "abe"]]
+ , ["X*", ["X*"], {nonull: true}]
+
+ // allow null glob expansion
+ , ["X*", []]
+
+ // isaacs: Slightly different than bash/sh/ksh
+ // \\* is not un-escaped to literal "*" in a failed match,
+ // but it does make it get treated as a literal star
+ , ["\\*", ["\\*"], {nonull: true}]
+ , ["\\**", ["\\**"], {nonull: true}]
+ , ["\\*\\*", ["\\*\\*"], {nonull: true}]
+
+ , ["b*/", ["bdir/"]]
+ , ["c*", ["c", "ca", "cb"]]
+ , ["**", files]
+
+ , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
+ , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
+
+ , "legendary larry crashes bashes"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
+
+ , "character classes"
+ , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
+ , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
+ "bdir/", "ca", "cb", "dd", "de"]]
+ , ["a*[^c]", ["abd", "abe"]]
+ , function () { files.push("a-b", "aXb") }
+ , ["a[X-]b", ["a-b", "aXb"]]
+ , function () { files.push(".x", ".y") }
+ , ["[^a-c]*", ["d", "dd", "de"]]
+ , function () { files.push("a*b/", "a*b/ooo") }
+ , ["a\\*b/*", ["a*b/ooo"]]
+ , ["a\\*?/*", ["a*b/ooo"]]
+ , ["*\\\\!*", [], {null: true}, ["echo !7"]]
+ , ["*\\!*", ["echo !7"], null, ["echo !7"]]
+ , ["*.\\*", ["r.*"], null, ["r.*"]]
+ , ["a[b]c", ["abc"]]
+ , ["a[\\b]c", ["abc"]]
+ , ["a?c", ["abc"]]
+ , ["a\\*c", [], {null: true}, ["abc"]]
+ , ["", [""], { null: true }, [""]]
+
+ , "http://www.opensource.apple.com/source/bash/bash-23/" +
+ "bash/tests/glob-test"
+ , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
+ , ["*/man*/bash.*", ["man/man1/bash.1"]]
+ , ["man/man1/bash.1", ["man/man1/bash.1"]]
+ , ["a***c", ["abc"], null, ["abc"]]
+ , ["a*****?c", ["abc"], null, ["abc"]]
+ , ["?*****??", ["abc"], null, ["abc"]]
+ , ["*****??", ["abc"], null, ["abc"]]
+ , ["?*****?c", ["abc"], null, ["abc"]]
+ , ["?***?****c", ["abc"], null, ["abc"]]
+ , ["?***?****?", ["abc"], null, ["abc"]]
+ , ["?***?****", ["abc"], null, ["abc"]]
+ , ["*******c", ["abc"], null, ["abc"]]
+ , ["*******?", ["abc"], null, ["abc"]]
+ , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["[-abc]", ["-"], null, ["-"]]
+ , ["[abc-]", ["-"], null, ["-"]]
+ , ["\\", ["\\"], null, ["\\"]]
+ , ["[\\\\]", ["\\"], null, ["\\"]]
+ , ["[[]", ["["], null, ["["]]
+ , ["[", ["["], null, ["["]]
+ , ["[*", ["[abc"], null, ["[abc"]]
+ , "a right bracket shall lose its special meaning and\n" +
+ "represent itself in a bracket expression if it occurs\n" +
+ "first in the list. -- POSIX.2 2.8.3.2"
+ , ["[]]", ["]"], null, ["]"]]
+ , ["[]-]", ["]"], null, ["]"]]
+ , ["[a-\z]", ["p"], null, ["p"]]
+ , ["??**********?****?", [], { null: true }, ["abc"]]
+ , ["??**********?****c", [], { null: true }, ["abc"]]
+ , ["?************c****?****", [], { null: true }, ["abc"]]
+ , ["*c*?**", [], { null: true }, ["abc"]]
+ , ["a*****c*?**", [], { null: true }, ["abc"]]
+ , ["a********???*******", [], { null: true }, ["abc"]]
+ , ["[]", [], { null: true }, ["a"]]
+ , ["[abc", [], { null: true }, ["["]]
+
+ , "nocase tests"
+ , ["XYZ", ["xYz"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["ab*", ["ABC"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ , "onestar/twostar"
+ , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
+ , ["{/?,*}", ["/a", "bb"], {null: true}
+ , ["/a", "/b/b", "/a/b/c", "bb"]]
+
+ , "dots should not match unless requested"
+ , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
+
+ // .. and . can only match patterns starting with .,
+ // even when options.dot is set.
+ , function () {
+ files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
+ }
+ , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
+ , ["a/*/b", ["a/c/b"], {dot:false}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
+
+
+ // this also tests that changing the options needs
+ // to change the cache key, even if the pattern is
+ // the same!
+ , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
+ , [ ".a/.d", "a/.d", "a/b"]]
+
+ , "paren sets cannot contain slashes"
+ , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
+
+ // brace sets trump all else.
+ //
+ // invalid glob pattern. fails on bash4 and bsdglob.
+ // however, in this implementation, it's easier just
+ // to do the intuitive thing, and let brace-expansion
+ // actually come before parsing any extglob patterns,
+ // like the documentation seems to say.
+ //
+ // XXX: if anyone complains about this, either fix it
+ // or tell them to grow up and stop complaining.
+ //
+ // bash/bsdglob says this:
+ // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
+ // but we do this instead:
+ , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
+
+ // test partial parsing in the presence of comment/negation chars
+ , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
+ , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
+
+ // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
+ , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
+ , {}
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
+
+
+ // crazy nested {,,} and *(||) tests.
+ , function () {
+ files = [ "a", "b", "c", "d"
+ , "ab", "ac", "ad"
+ , "bc", "cb"
+ , "bc,d", "c,db", "c,d"
+ , "d)", "(b|c", "*(b|c"
+ , "b|c", "b|cc", "cb|c"
+ , "x(a|b|c)", "x(a|c)"
+ , "(a|b|c)", "(a|c)"]
+ }
+ , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
+ , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
+ // a
+ // *(b|c)
+ // *(b|d)
+ , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
+ , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
+
+
+ // test various flag settings.
+ , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
+ , { noext: true } ]
+ , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
+ , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
+ , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
+
+
+ // begin channelling Boole and deMorgan...
+ , "negation tests"
+ , function () {
+ files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
+ }
+
+ // anything that is NOT a* matches.
+ , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
+
+ // anything that IS !a* matches.
+ , ["!a*", ["!ab", "!abc"], {nonegate: true}]
+
+ // anything that IS a* matches
+ , ["!!a*", ["a!b"]]
+
+ // anything that is NOT !a* matches
+ , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
+
+ // negation nestled within a pattern
+ , function () {
+ files = [ "foo.js"
+ , "foo.bar"
+ // can't match this one without negative lookbehind.
+ , "foo.js.js"
+ , "blar.js"
+ , "foo."
+ , "boo.js.boo" ]
+ }
+ , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
+
+ // https://github.com/isaacs/minimatch/issues/5
+ , function () {
+ files = [ 'a/b/.x/c'
+ , 'a/b/.x/c/d'
+ , 'a/b/.x/c/d/e'
+ , 'a/b/.x'
+ , 'a/b/.x/'
+ , 'a/.x/b'
+ , '.x'
+ , '.x/'
+ , '.x/a'
+ , '.x/a/b'
+ , 'a/.x/b/.x/c'
+ , '.x/.x' ]
+ }
+ , ["**/.x/**", [ '.x/'
+ , '.x/a'
+ , '.x/a/b'
+ , 'a/.x/b'
+ , 'a/b/.x/'
+ , 'a/b/.x/c'
+ , 'a/b/.x/c/d'
+ , 'a/b/.x/c/d/e' ] ]
+
+ ]
+
+var regexps =
+ [ '/^(?:(?=.)a[^/]*?)$/',
+ '/^(?:(?=.)X[^/]*?)$/',
+ '/^(?:(?=.)X[^/]*?)$/',
+ '/^(?:\\*)$/',
+ '/^(?:(?=.)\\*[^/]*?)$/',
+ '/^(?:\\*\\*)$/',
+ '/^(?:(?=.)b[^/]*?\\/)$/',
+ '/^(?:(?=.)c[^/]*?)$/',
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/',
+ '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/',
+ '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/',
+ '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/',
+ '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/',
+ '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/',
+ '/^(?:(?=.)a[^/]*?[^c])$/',
+ '/^(?:(?=.)a[X-]b)$/',
+ '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/',
+ '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/',
+ '/^(?:(?=.)a[b]c)$/',
+ '/^(?:(?=.)a[b]c)$/',
+ '/^(?:(?=.)a[^/]c)$/',
+ '/^(?:a\\*c)$/',
+ 'false',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/',
+ '/^(?:man\\/man1\\/bash\\.1)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
+ '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[-abc])$/',
+ '/^(?:(?!\\.)(?=.)[abc-])$/',
+ '/^(?:\\\\)$/',
+ '/^(?:(?!\\.)(?=.)[\\\\])$/',
+ '/^(?:(?!\\.)(?=.)[\\[])$/',
+ '/^(?:\\[)$/',
+ '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[\\]])$/',
+ '/^(?:(?!\\.)(?=.)[\\]-])$/',
+ '/^(?:(?!\\.)(?=.)[a-z])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:\\[\\])$/',
+ '/^(?:\\[abc)$/',
+ '/^(?:(?=.)XYZ)$/i',
+ '/^(?:(?=.)ab[^/]*?)$/i',
+ '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i',
+ '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/',
+ '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/',
+ '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/',
+ '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/',
+ '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/',
+ '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/',
+ '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/',
+ '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/',
+ '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/',
+ '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/',
+ '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/',
+ '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/',
+ '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/',
+ '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/',
+ '/^(?:(?=.)a[^/]b)$/',
+ '/^(?:(?=.)#[^/]*?)$/',
+ '/^(?!^(?:(?=.)a[^/]*?)$).*$/',
+ '/^(?:(?=.)\\!a[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?)$/',
+ '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/',
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ]
+var re = 0;
+
+tap.test("basic tests", function (t) {
+ var start = Date.now()
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ patterns.forEach(function (c) {
+ if (typeof c === "function") return c()
+ if (typeof c === "string") return t.comment(c)
+
+ var pattern = c[0]
+ , expect = c[1].sort(alpha)
+ , options = c[2] || {}
+ , f = c[3] || files
+ , tapOpts = c[4] || {}
+
+ // options.debug = true
+ var m = new mm.Minimatch(pattern, options)
+ var r = m.makeRe()
+ var expectRe = regexps[re++]
+ tapOpts.re = String(r) || JSON.stringify(r)
+ tapOpts.files = JSON.stringify(f)
+ tapOpts.pattern = pattern
+ tapOpts.set = m.set
+ tapOpts.negated = m.negate
+
+ var actual = mm.match(f, pattern, options)
+ actual.sort(alpha)
+
+ t.equivalent( actual, expect
+ , JSON.stringify(pattern) + " " + JSON.stringify(expect)
+ , tapOpts )
+
+ t.equal(tapOpts.re, expectRe, tapOpts)
+ })
+
+ t.comment("time=" + (Date.now() - start) + "ms")
+ t.end()
+})
+
+tap.test("global leak test", function (t) {
+ var globalAfter = Object.keys(global)
+ t.equivalent(globalAfter, globalBefore, "no new globals, please")
+ t.end()
+})
+
+function alpha (a, b) {
+ return a > b ? 1 : -1
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/brace-expand.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/brace-expand.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/brace-expand.js
new file mode 100644
index 0000000..7ee278a
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/brace-expand.js
@@ -0,0 +1,33 @@
+var tap = require("tap")
+ , minimatch = require("../")
+
+tap.test("brace expansion", function (t) {
+ // [ pattern, [expanded] ]
+ ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}"
+ , [ "abxy"
+ , "abxz"
+ , "acdxy"
+ , "acdxz"
+ , "acexy"
+ , "acexz"
+ , "afhxy"
+ , "afhxz"
+ , "aghxy"
+ , "aghxz" ] ]
+ , [ "a{1..5}b"
+ , [ "a1b"
+ , "a2b"
+ , "a3b"
+ , "a4b"
+ , "a5b" ] ]
+ , [ "a{b}c", ["a{b}c"] ]
+ ].forEach(function (tc) {
+ var p = tc[0]
+ , expect = tc[1]
+ t.equivalent(minimatch.braceExpand(p), expect, p)
+ })
+ console.error("ending")
+ t.end()
+})
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/caching.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/caching.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/caching.js
new file mode 100644
index 0000000..0fec4b0
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/caching.js
@@ -0,0 +1,14 @@
+var Minimatch = require("../minimatch.js").Minimatch
+var tap = require("tap")
+tap.test("cache test", function (t) {
+ var mm1 = new Minimatch("a?b")
+ var mm2 = new Minimatch("a?b")
+ t.equal(mm1, mm2, "should get the same object")
+ // the lru should drop it after 100 entries
+ for (var i = 0; i < 100; i ++) {
+ new Minimatch("a"+i)
+ }
+ mm2 = new Minimatch("a?b")
+ t.notEqual(mm1, mm2, "cache should have dropped")
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/defaults.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/defaults.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/defaults.js
new file mode 100644
index 0000000..25f1f60
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/test/defaults.js
@@ -0,0 +1,274 @@
+// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
+//
+// TODO: Some of these tests do very bad things with backslashes, and will
+// most likely fail badly on windows. They should probably be skipped.
+
+var tap = require("tap")
+ , globalBefore = Object.keys(global)
+ , mm = require("../")
+ , files = [ "a", "b", "c", "d", "abc"
+ , "abd", "abe", "bb", "bcd"
+ , "ca", "cb", "dd", "de"
+ , "bdir/", "bdir/cfile"]
+ , next = files.concat([ "a-b", "aXb"
+ , ".x", ".y" ])
+
+tap.test("basic tests", function (t) {
+ var start = Date.now()
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ ; [ "http://www.bashcookbook.com/bashinfo" +
+ "/source/bash-1.14.7/tests/glob-test"
+ , ["a*", ["a", "abc", "abd", "abe"]]
+ , ["X*", ["X*"], {nonull: true}]
+
+ // allow null glob expansion
+ , ["X*", []]
+
+ // isaacs: Slightly different than bash/sh/ksh
+ // \\* is not un-escaped to literal "*" in a failed match,
+ // but it does make it get treated as a literal star
+ , ["\\*", ["\\*"], {nonull: true}]
+ , ["\\**", ["\\**"], {nonull: true}]
+ , ["\\*\\*", ["\\*\\*"], {nonull: true}]
+
+ , ["b*/", ["bdir/"]]
+ , ["c*", ["c", "ca", "cb"]]
+ , ["**", files]
+
+ , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
+ , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
+
+ , "legendary larry crashes bashes"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
+
+ , "character classes"
+ , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
+ , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
+ "bdir/", "ca", "cb", "dd", "de"]]
+ , ["a*[^c]", ["abd", "abe"]]
+ , function () { files.push("a-b", "aXb") }
+ , ["a[X-]b", ["a-b", "aXb"]]
+ , function () { files.push(".x", ".y") }
+ , ["[^a-c]*", ["d", "dd", "de"]]
+ , function () { files.push("a*b/", "a*b/ooo") }
+ , ["a\\*b/*", ["a*b/ooo"]]
+ , ["a\\*?/*", ["a*b/ooo"]]
+ , ["*\\\\!*", [], {null: true}, ["echo !7"]]
+ , ["*\\!*", ["echo !7"], null, ["echo !7"]]
+ , ["*.\\*", ["r.*"], null, ["r.*"]]
+ , ["a[b]c", ["abc"]]
+ , ["a[\\b]c", ["abc"]]
+ , ["a?c", ["abc"]]
+ , ["a\\*c", [], {null: true}, ["abc"]]
+ , ["", [""], { null: true }, [""]]
+
+ , "http://www.opensource.apple.com/source/bash/bash-23/" +
+ "bash/tests/glob-test"
+ , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
+ , ["*/man*/bash.*", ["man/man1/bash.1"]]
+ , ["man/man1/bash.1", ["man/man1/bash.1"]]
+ , ["a***c", ["abc"], null, ["abc"]]
+ , ["a*****?c", ["abc"], null, ["abc"]]
+ , ["?*****??", ["abc"], null, ["abc"]]
+ , ["*****??", ["abc"], null, ["abc"]]
+ , ["?*****?c", ["abc"], null, ["abc"]]
+ , ["?***?****c", ["abc"], null, ["abc"]]
+ , ["?***?****?", ["abc"], null, ["abc"]]
+ , ["?***?****", ["abc"], null, ["abc"]]
+ , ["*******c", ["abc"], null, ["abc"]]
+ , ["*******?", ["abc"], null, ["abc"]]
+ , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["[-abc]", ["-"], null, ["-"]]
+ , ["[abc-]", ["-"], null, ["-"]]
+ , ["\\", ["\\"], null, ["\\"]]
+ , ["[\\\\]", ["\\"], null, ["\\"]]
+ , ["[[]", ["["], null, ["["]]
+ , ["[", ["["], null, ["["]]
+ , ["[*", ["[abc"], null, ["[abc"]]
+ , "a right bracket shall lose its special meaning and\n" +
+ "represent itself in a bracket expression if it occurs\n" +
+ "first in the list. -- POSIX.2 2.8.3.2"
+ , ["[]]", ["]"], null, ["]"]]
+ , ["[]-]", ["]"], null, ["]"]]
+ , ["[a-\z]", ["p"], null, ["p"]]
+ , ["??**********?****?", [], { null: true }, ["abc"]]
+ , ["??**********?****c", [], { null: true }, ["abc"]]
+ , ["?************c****?****", [], { null: true }, ["abc"]]
+ , ["*c*?**", [], { null: true }, ["abc"]]
+ , ["a*****c*?**", [], { null: true }, ["abc"]]
+ , ["a********???*******", [], { null: true }, ["abc"]]
+ , ["[]", [], { null: true }, ["a"]]
+ , ["[abc", [], { null: true }, ["["]]
+
+ , "nocase tests"
+ , ["XYZ", ["xYz"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["ab*", ["ABC"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ , "onestar/twostar"
+ , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
+ , ["{/?,*}", ["/a", "bb"], {null: true}
+ , ["/a", "/b/b", "/a/b/c", "bb"]]
+
+ , "dots should not match unless requested"
+ , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
+
+ // .. and . can only match patterns starting with .,
+ // even when options.dot is set.
+ , function () {
+ files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
+ }
+ , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
+ , ["a/*/b", ["a/c/b"], {dot:false}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
+
+
+ // this also tests that changing the options needs
+ // to change the cache key, even if the pattern is
+ // the same!
+ , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
+ , [ ".a/.d", "a/.d", "a/b"]]
+
+ , "paren sets cannot contain slashes"
+ , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
+
+ // brace sets trump all else.
+ //
+ // invalid glob pattern. fails on bash4 and bsdglob.
+ // however, in this implementation, it's easier just
+ // to do the intuitive thing, and let brace-expansion
+ // actually come before parsing any extglob patterns,
+ // like the documentation seems to say.
+ //
+ // XXX: if anyone complains about this, either fix it
+ // or tell them to grow up and stop complaining.
+ //
+ // bash/bsdglob says this:
+ // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
+ // but we do this instead:
+ , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
+
+ // test partial parsing in the presence of comment/negation chars
+ , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
+ , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
+
+ // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
+ , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
+ , {}
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
+
+
+ // crazy nested {,,} and *(||) tests.
+ , function () {
+ files = [ "a", "b", "c", "d"
+ , "ab", "ac", "ad"
+ , "bc", "cb"
+ , "bc,d", "c,db", "c,d"
+ , "d)", "(b|c", "*(b|c"
+ , "b|c", "b|cc", "cb|c"
+ , "x(a|b|c)", "x(a|c)"
+ , "(a|b|c)", "(a|c)"]
+ }
+ , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
+ , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
+ // a
+ // *(b|c)
+ // *(b|d)
+ , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
+ , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
+
+
+ // test various flag settings.
+ , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
+ , { noext: true } ]
+ , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
+ , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
+ , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
+
+
+ // begin channelling Boole and deMorgan...
+ , "negation tests"
+ , function () {
+ files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
+ }
+
+ // anything that is NOT a* matches.
+ , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
+
+ // anything that IS !a* matches.
+ , ["!a*", ["!ab", "!abc"], {nonegate: true}]
+
+ // anything that IS a* matches
+ , ["!!a*", ["a!b"]]
+
+ // anything that is NOT !a* matches
+ , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
+
+ // negation nestled within a pattern
+ , function () {
+ files = [ "foo.js"
+ , "foo.bar"
+ // can't match this one without negative lookbehind.
+ , "foo.js.js"
+ , "blar.js"
+ , "foo."
+ , "boo.js.boo" ]
+ }
+ , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
+
+ ].forEach(function (c) {
+ if (typeof c === "function") return c()
+ if (typeof c === "string") return t.comment(c)
+
+ var pattern = c[0]
+ , expect = c[1].sort(alpha)
+ , options = c[2] || {}
+ , f = c[3] || files
+ , tapOpts = c[4] || {}
+
+ // options.debug = true
+ var Class = mm.defaults(options).Minimatch
+ var m = new Class(pattern, {})
+ var r = m.makeRe()
+ tapOpts.re = String(r) || JSON.stringify(r)
+ tapOpts.files = JSON.stringify(f)
+ tapOpts.pattern = pattern
+ tapOpts.set = m.set
+ tapOpts.negated = m.negate
+
+ var actual = mm.match(f, pattern, options)
+ actual.sort(alpha)
+
+ t.equivalent( actual, expect
+ , JSON.stringify(pattern) + " " + JSON.stringify(expect)
+ , tapOpts )
+ })
+
+ t.comment("time=" + (Date.now() - start) + "ms")
+ t.end()
+})
+
+tap.test("global leak test", function (t) {
+ var globalAfter = Object.keys(global)
+ t.equivalent(globalAfter, globalBefore, "no new globals, please")
+ t.end()
+})
+
+function alpha (a, b) {
+ return a > b ? 1 : -1
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/package.json b/blackberry10/node_modules/plugman/node_modules/glob/package.json
new file mode 100644
index 0000000..eae8a97
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/package.json
@@ -0,0 +1,38 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "name": "glob",
+ "description": "a little globber",
+ "version": "3.2.6",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-glob.git"
+ },
+ "main": "glob.js",
+ "engines": {
+ "node": "*"
+ },
+ "dependencies": {
+ "minimatch": "~0.2.11",
+ "inherits": "2"
+ },
+ "devDependencies": {
+ "tap": "~0.4.0",
+ "mkdirp": "0",
+ "rimraf": "1"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "license": "BSD",
+ "readme": "# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glo
b features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [op
tions], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n value
s:\n * `false` - Path does not exist\n * `true` - Path exists\n * `1` - Path exists, and is not a directory\n * `2` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have b
een added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This
reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of
another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with th
e existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/
**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expr
essions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast major
ity\nof operations, this is never a problem.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-glob/issues"
+ },
+ "_id": "glob@3.2.6",
+ "_from": "glob@3.2.x"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/00-setup.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/00-setup.js b/blackberry10/node_modules/plugman/node_modules/glob/test/00-setup.js
new file mode 100644
index 0000000..245afaf
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/00-setup.js
@@ -0,0 +1,176 @@
+// just a little pre-run script to set up the fixtures.
+// zz-finish cleans it up
+
+var mkdirp = require("mkdirp")
+var path = require("path")
+var i = 0
+var tap = require("tap")
+var fs = require("fs")
+var rimraf = require("rimraf")
+
+var files =
+[ "a/.abcdef/x/y/z/a"
+, "a/abcdef/g/h"
+, "a/abcfed/g/h"
+, "a/b/c/d"
+, "a/bc/e/f"
+, "a/c/d/c/b"
+, "a/cb/e/f"
+]
+
+var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c")
+var symlinkFrom = "../.."
+
+files = files.map(function (f) {
+ return path.resolve(__dirname, f)
+})
+
+tap.test("remove fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "a"), function (er) {
+ t.ifError(er, "remove fixtures")
+ t.end()
+ })
+})
+
+files.forEach(function (f) {
+ tap.test(f, function (t) {
+ var d = path.dirname(f)
+ mkdirp(d, 0755, function (er) {
+ if (er) {
+ t.fail(er)
+ return t.bailout()
+ }
+ fs.writeFile(f, "i like tests", function (er) {
+ t.ifError(er, "make file")
+ t.end()
+ })
+ })
+ })
+})
+
+if (process.platform !== "win32") {
+ tap.test("symlinky", function (t) {
+ var d = path.dirname(symlinkTo)
+ console.error("mkdirp", d)
+ mkdirp(d, 0755, function (er) {
+ t.ifError(er)
+ fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) {
+ t.ifError(er, "make symlink")
+ t.end()
+ })
+ })
+ })
+}
+
+;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) {
+ w = "/tmp/glob-test/" + w
+ tap.test("create " + w, function (t) {
+ mkdirp(w, function (er) {
+ if (er)
+ throw er
+ t.pass(w)
+ t.end()
+ })
+ })
+})
+
+
+// generate the bash pattern test-fixtures if possible
+if (process.platform === "win32" || !process.env.TEST_REGEN) {
+ console.error("Windows, or TEST_REGEN unset. Using cached fixtures.")
+ return
+}
+
+var spawn = require("child_process").spawn;
+var globs =
+ // put more patterns here.
+ // anything that would be directly in / should be in /tmp/glob-test
+ ["test/a/*/+(c|g)/./d"
+ ,"test/a/**/[cg]/../[cg]"
+ ,"test/a/{b,c,d,e,f}/**/g"
+ ,"test/a/b/**"
+ ,"test/**/g"
+ ,"test/a/abc{fed,def}/g/h"
+ ,"test/a/abc{fed/g,def}/**/"
+ ,"test/a/abc{fed/g,def}/**///**/"
+ ,"test/**/a/**/"
+ ,"test/+(a|b|c)/a{/,bc*}/**"
+ ,"test/*/*/*/f"
+ ,"test/**/f"
+ ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
+ ,"{./*/*,/tmp/glob-test/*}"
+ ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me!
+ ,"test/a/!(symlink)/**"
+ ]
+var bashOutput = {}
+var fs = require("fs")
+
+globs.forEach(function (pattern) {
+ tap.test("generate fixture " + pattern, function (t) {
+ var cmd = "shopt -s globstar && " +
+ "shopt -s extglob && " +
+ "shopt -s nullglob && " +
+ // "shopt >&2; " +
+ "eval \'for i in " + pattern + "; do echo $i; done\'"
+ var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) })
+ var out = []
+ cp.stdout.on("data", function (c) {
+ out.push(c)
+ })
+ cp.stderr.pipe(process.stderr)
+ cp.on("close", function (code) {
+ out = flatten(out)
+ if (!out)
+ out = []
+ else
+ out = cleanResults(out.split(/\r*\n/))
+
+ bashOutput[pattern] = out
+ t.notOk(code, "bash test should finish nicely")
+ t.end()
+ })
+ })
+})
+
+tap.test("save fixtures", function (t) {
+ var fname = path.resolve(__dirname, "bash-results.json")
+ var data = JSON.stringify(bashOutput, null, 2) + "\n"
+ fs.writeFile(fname, data, function (er) {
+ t.ifError(er)
+ t.end()
+ })
+})
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
+ })
+}
+
+function flatten (chunks) {
+ var s = 0
+ chunks.forEach(function (c) { s += c.length })
+ var out = new Buffer(s)
+ s = 0
+ chunks.forEach(function (c) {
+ c.copy(out, s)
+ s += c.length
+ })
+
+ return out.toString().trim()
+}
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/bash-comparison.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/bash-comparison.js b/blackberry10/node_modules/plugman/node_modules/glob/test/bash-comparison.js
new file mode 100644
index 0000000..239ed1a
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/bash-comparison.js
@@ -0,0 +1,63 @@
+// basic test
+// show that it does the same thing by default as the shell.
+var tap = require("tap")
+, child_process = require("child_process")
+, bashResults = require("./bash-results.json")
+, globs = Object.keys(bashResults)
+, glob = require("../")
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+globs.forEach(function (pattern) {
+ var expect = bashResults[pattern]
+ // anything regarding the symlink thing will fail on windows, so just skip it
+ if (process.platform === "win32" &&
+ expect.some(function (m) {
+ return /\/symlink\//.test(m)
+ }))
+ return
+
+ tap.test(pattern, function (t) {
+ glob(pattern, function (er, matches) {
+ if (er)
+ throw er
+
+ // sort and unmark, just to match the shell results
+ matches = cleanResults(matches)
+
+ t.deepEqual(matches, expect, pattern)
+ t.end()
+ })
+ })
+
+ tap.test(pattern + " sync", function (t) {
+ var matches = cleanResults(glob.sync(pattern))
+
+ t.deepEqual(matches, expect, "should match shell")
+ t.end()
+ })
+})
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/')
+ })
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/bash-results.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/bash-results.json b/blackberry10/node_modules/plugman/node_modules/glob/test/bash-results.json
new file mode 100644
index 0000000..3ffadba
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/bash-results.json
@@ -0,0 +1,349 @@
+{
+ "test/a/*/+(c|g)/./d": [
+ "test/a/b/c/./d"
+ ],
+ "test/a/**/[cg]/../[cg]": [
+ "test/a/abcdef/g/../g",
+ "test/a/abcfed/g/../g",
+ "test/a/b/c/../c",
+ "test/a/c/../c",
+ "test/a/c/d/c/../c",
+ "test/a/symlink/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c"
+ ],
+ "test/a/{b,c,d,e,f}/**/g": [],
+ "test/a/b/**": [
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/b/c/d"
+ ],
+ "test/**/g": [
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/a/abc{fed,def}/g/h": [
+ "test/a/abcdef/g/h",
+ "test/a/abcfed/g/h"
+ ],
+ "test/a/abc{fed/g,def}/**/": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/a/abc{fed/g,def}/**///**/": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/**/a/**/": [
+ "test/a",
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/bc",
+ "test/a/bc/e",
+ "test/a/c",
+ "test/a/c/d",
+ "test/a/c/d/c",
+ "test/a/cb",
+ "test/a/cb/e",
+ "test/a/symlink",
+ "test/a/symlink/a",
+ "test/a/symlink/a/b",
+ "test/a/symlink/a/b/c",
+ "test/a/symlink/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b"
+ ],
+ "test/+(a|b|c)/a{/,bc*}/**": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcdef/g/h",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/abcfed/g/h"
+ ],
+ "test/*/*/*/f": [
+ "test/a/bc/e/f",
+ "test/a/cb/e/f"
+ ],
+ "test/**/f": [
+ "test/a/bc/e/f",
+ "test/a/cb/e/f"
+ ],
+ "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c"
+ ],
+ "{./*/*,/tmp/glob-test/*}": [
+ "./examples/g.js",
+ "./examples/usr-local.js",
+ "./node_modules/inherits",
+ "./node_modules/minimatch",
+ "./node_modules/mkdirp",
+ "./node_modules/rimraf",
+ "./node_modules/tap",
+ "./test/00-setup.js",
+ "./test/a",
+ "./test/bash-comparison.js",
+ "./test/bash-results.json",
+ "./test/cwd-test.js",
+ "./test/globstar-match.js",
+ "./test/mark.js",
+ "./test/nocase-nomagic.js",
+ "./test/pause-resume.js",
+ "./test/root-nomount.js",
+ "./test/root.js",
+ "./test/stat.js",
+ "./test/zz-cleanup.js",
+ "/tmp/glob-test/asdf",
+ "/tmp/glob-test/bar",
+ "/tmp/glob-test/baz",
+ "/tmp/glob-test/foo",
+ "/tmp/glob-test/quux",
+ "/tmp/glob-test/qwer",
+ "/tmp/glob-test/rewq"
+ ],
+ "{/tmp/glob-test/*,*}": [
+ "/tmp/glob-test/asdf",
+ "/tmp/glob-test/bar",
+ "/tmp/glob-test/baz",
+ "/tmp/glob-test/foo",
+ "/tmp/glob-test/quux",
+ "/tmp/glob-test/qwer",
+ "/tmp/glob-test/rewq",
+ "examples",
+ "glob.js",
+ "LICENSE",
+ "node_modules",
+ "package.json",
+ "README.md",
+ "test"
+ ],
+ "test/a/!(symlink)/**": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcdef/g/h",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/abcfed/g/h",
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/b/c/d",
+ "test/a/bc",
+ "test/a/bc/e",
+ "test/a/bc/e/f",
+ "test/a/c",
+ "test/a/c/d",
+ "test/a/c/d/c",
+ "test/a/c/d/c/b",
+ "test/a/cb",
+ "test/a/cb/e",
+ "test/a/cb/e/f"
+ ]
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/cwd-test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/cwd-test.js b/blackberry10/node_modules/plugman/node_modules/glob/test/cwd-test.js
new file mode 100644
index 0000000..352c27e
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/cwd-test.js
@@ -0,0 +1,55 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing cwd and searching for **/d", function (t) {
+ var glob = require('../')
+ var path = require('path')
+ t.test('.', function (t) {
+ glob('**/d', function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a', function (t) {
+ glob('**/d', {cwd:path.resolve('a')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'b/c/d', 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a/b', function (t) {
+ glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a/b/', function (t) {
+ glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('.', function (t) {
+ glob('**/d', {cwd: process.cwd()}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+ })
+
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/globstar-match.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/globstar-match.js b/blackberry10/node_modules/plugman/node_modules/glob/test/globstar-match.js
new file mode 100644
index 0000000..9b234fa
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/globstar-match.js
@@ -0,0 +1,19 @@
+var Glob = require("../glob.js").Glob
+var test = require('tap').test
+
+test('globstar should not have dupe matches', function(t) {
+ var pattern = 'a/**/[gh]'
+ var g = new Glob(pattern, { cwd: __dirname })
+ var matches = []
+ g.on('match', function(m) {
+ console.error('match %j', m)
+ matches.push(m)
+ })
+ g.on('end', function(set) {
+ console.error('set', set)
+ matches = matches.sort()
+ set = set.sort()
+ t.same(matches, set, 'should have same set of matches')
+ t.end()
+ })
+})
[49/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/async/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/async/package.json b/blackberry10/node_modules/async/package.json
new file mode 100644
index 0000000..5aa1417
--- /dev/null
+++ b/blackberry10/node_modules/async/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "async",
+ "description": "Higher-order functions and common patterns for asynchronous code",
+ "main": "./lib/async",
+ "author": {
+ "name": "Caolan McMahon"
+ },
+ "version": "0.2.9",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/caolan/async.git"
+ },
+ "bugs": {
+ "url": "https://github.com/caolan/async/issues"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/caolan/async/raw/master/LICENSE"
+ }
+ ],
+ "devDependencies": {
+ "nodeunit": ">0.0.0",
+ "uglify-js": "1.2.x",
+ "nodelint": ">0.0.0"
+ },
+ "jam": {
+ "main": "lib/async.js",
+ "include": [
+ "lib/async.js",
+ "README.md",
+ "LICENSE"
+ ]
+ },
+ "scripts": {
+ "test": "nodeunit test/test-async.js"
+ },
+ "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. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, each…) 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```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nas
ync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\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## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about bind, not about async. If you are wondering how to\nmake async execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1,
2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Bro
wser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n```html\n<script type=\"text/javascript\" src=\"async.js\"></script>\n<script type=\"text/javascript\">\n\n async.map(data, asyncProcess, function(err, results){\n alert(results);\n });\n\n</script>\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\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* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoiz
e)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n<a name=\"forEach\" />\n<a name=\"each\" />\n### each(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 each 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(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callbac
k which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"forEachSeries\" />\n<a name=\"eachSeries\" />\n### eachSeries(arr, iterator, callback)\n\nThe same as each 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<a name=\"forEachLimit\" />\n<a name=\"eachLimit\" />\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time
.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\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```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------
------------------------------\n\n<a name=\"map\" />\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(err, transformed) which must be called once \n it has completed with an error (which c
an 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```js\nasync.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<a name=\"mapSeries\" />\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<a name=\"mapLimit\" />\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not proce
ssed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed 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```js\nasync.map(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"filter\" />\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a n
ew 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 fs.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(truthValue) which must be called with a \n boolean argument 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```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n<a name=\"filterSeries\" />\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<a name=\"reject\" />\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n<a name=\"rejectSeries\" />\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n<a name=\"reduce\" />\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. F
or 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 it's 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(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the 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`
``js\nasync.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<a name=\"reduceRight\" />\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<a name=\"detect\" />\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__Argu
ments__\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(truthValue) which must be called with a \n boolean argument 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```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n<a name=\"detectSeries\" />\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 tr
uth test.\n\n\n---------------------------------------\n\n<a name=\"sortBy\" />\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(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n 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```js\nasync.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 so
rted by\n // modified date\n});\n```\n\n---------------------------------------\n\n<a name=\"some\" />\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 fs.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(truthValue) which must be called with a \n boolean argument 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```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n<a name=\"every\" />\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 fs.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(truthValue) which must be called with a \n boolean argument 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```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n<a name=\"concat\" />\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(err, results) which must be called once it \n has completed 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 f
inished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.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<a name=\"concatSeries\" />\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n<a name=\"series\" />\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 proper
ty 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(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.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\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an ob
ject instead of an array\nasync.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},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\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 mo
re 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 \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.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\nfunction(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\nasync.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},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum num
ber of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n<a name=\"whilst\" />\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(err) which must be called once it has completed with an \n optional error 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```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setT
imeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n<a name=\"doWhilst\" />\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n<a name=\"until\" />\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<a name=\"doUntil\" />\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n<a name=\"forever\" />\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in seri
es, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n<a name=\"waterfall\" />\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 \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\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```js\nasync.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<a name=\"compose\" />\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n
}, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n<a name=\"applyEach\" />\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// p
artial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n<a name=\"applyEachSeries\" />\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n<a name=\"queue\" />\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, which must call its callback(err) argument when finished, with an \n optional error as an argument.\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* unshift(task, [callback]) - add a new task to the front of the queue.\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 ite
m from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n<a name=\"cargo\" />\n### cargo(worker, [payload])\n\nCreates a cargo object with th
e specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo 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* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload 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```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i<tasks.length; i++){\n console.log('hello ' + tasks[i].name);\n }\n callback();\n}, 2);\n\n\n// add some items\n\ncargo.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\ncargo.push({name: 'bar'}, function (err) {\n console.log('finished processing bar')
;\n});\ncargo.push({name: 'baz'}, function (err) {\n console.log('finished processing baz');\n});\n```\n\n---------------------------------------\n\n<a name=\"auto\" />\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\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(
fs.readFile, 'data.txt', 'utf-8');\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\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 function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\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. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.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 // resul
ts.write_file contains the filename returned by write_file.\n }]\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```js\nasync.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],\nfunction(err, 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 function(callback){\n // once the file is written let's email a link to it...\n }\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<a name=\"iter
ator\" />\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. It's 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.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n<a name=\"apply\" />\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combine
d 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```js\n// using apply\n\nasync.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\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n
\n<a name=\"nextTick\" />\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 setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents 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```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n<a name=\"times\" />\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some c
omplicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n<a name=\"timesSeries\" />\n### timesSeries(n, callback)\n\nThe same as times 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## Utils\n\n<a name=\"memoize\" />\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\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\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```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n<a name=\"unmemoize\" />\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<a name=\"log\" />\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```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n<a name=\"dir\" />\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```js
\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n<a name=\"noConflict\" />\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.2.9",
+ "_from": "async@0.2.9"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/commander/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/commander/.npmignore b/blackberry10/node_modules/commander/.npmignore
new file mode 100644
index 0000000..f1250e5
--- /dev/null
+++ b/blackberry10/node_modules/commander/.npmignore
@@ -0,0 +1,4 @@
+support
+test
+examples
+*.sock
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/commander/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/commander/.travis.yml b/blackberry10/node_modules/commander/.travis.yml
new file mode 100644
index 0000000..f1d0f13
--- /dev/null
+++ b/blackberry10/node_modules/commander/.travis.yml
@@ -0,0 +1,4 @@
+language: node_js
+node_js:
+ - 0.4
+ - 0.6
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/commander/History.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/commander/History.md b/blackberry10/node_modules/commander/History.md
new file mode 100644
index 0000000..4961d2e
--- /dev/null
+++ b/blackberry10/node_modules/commander/History.md
@@ -0,0 +1,107 @@
+
+0.6.1 / 2012-06-01
+==================
+
+ * Added: append (yes or no) on confirmation
+ * Added: allow node.js v0.7.x
+
+0.6.0 / 2012-04-10
+==================
+
+ * Added `.prompt(obj, callback)` support. Closes #49
+ * Added default support to .choose(). Closes #41
+ * Fixed the choice example
+
+0.5.1 / 2011-12-20
+==================
+
+ * Fixed `password()` for recent nodes. Closes #36
+
+0.5.0 / 2011-12-04
+==================
+
+ * Added sub-command option support [itay]
+
+0.4.3 / 2011-12-04
+==================
+
+ * Fixed custom help ordering. Closes #32
+
+0.4.2 / 2011-11-24
+==================
+
+ * Added travis support
+ * Fixed: line-buffered input automatically trimmed. Closes #31
+
+0.4.1 / 2011-11-18
+==================
+
+ * Removed listening for "close" on --help
+
+0.4.0 / 2011-11-15
+==================
+
+ * Added support for `--`. Closes #24
+
+0.3.3 / 2011-11-14
+==================
+
+ * Fixed: wait for close event when writing help info [Jerry Hamlet]
+
+0.3.2 / 2011-11-01
+==================
+
+ * Fixed long flag definitions with values [felixge]
+
+0.3.1 / 2011-10-31
+==================
+
+ * Changed `--version` short flag to `-V` from `-v`
+ * Changed `.version()` so it's configurable [felixge]
+
+0.3.0 / 2011-10-31
+==================
+
+ * Added support for long flags only. Closes #18
+
+0.2.1 / 2011-10-24
+==================
+
+ * "node": ">= 0.4.x < 0.7.0". Closes #20
+
+0.2.0 / 2011-09-26
+==================
+
+ * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs]
+
+0.1.0 / 2011-08-24
+==================
+
+ * Added support for custom `--help` output
+
+0.0.5 / 2011-08-18
+==================
+
+ * Changed: when the user enters nothing prompt for password again
+ * Fixed issue with passwords beginning with numbers [NuckChorris]
+
+0.0.4 / 2011-08-15
+==================
+
+ * Fixed `Commander#args`
+
+0.0.3 / 2011-08-15
+==================
+
+ * Added default option value support
+
+0.0.2 / 2011-08-15
+==================
+
+ * Added mask support to `Command#password(str[, mask], fn)`
+ * Added `Command#password(str, fn)`
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/commander/Makefile
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/commander/Makefile b/blackberry10/node_modules/commander/Makefile
new file mode 100644
index 0000000..0074625
--- /dev/null
+++ b/blackberry10/node_modules/commander/Makefile
@@ -0,0 +1,7 @@
+
+TESTS = $(shell find test/test.*.js)
+
+test:
+ @./test/run $(TESTS)
+
+.PHONY: test
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/commander/Readme.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/commander/Readme.md b/blackberry10/node_modules/commander/Readme.md
new file mode 100644
index 0000000..b8328c3
--- /dev/null
+++ b/blackberry10/node_modules/commander/Readme.md
@@ -0,0 +1,262 @@
+# Commander.js
+
+ The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).
+
+ [](http://travis-ci.org/visionmedia/commander.js)
+
+## Installation
+
+ $ npm install commander
+
+## Option parsing
+
+ Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('commander');
+
+program
+ .version('0.0.1')
+ .option('-p, --peppers', 'Add peppers')
+ .option('-P, --pineapple', 'Add pineapple')
+ .option('-b, --bbq', 'Add bbq sauce')
+ .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')
+ .parse(process.argv);
+
+console.log('you ordered a pizza with:');
+if (program.peppers) console.log(' - peppers');
+if (program.pineapple) console.log(' - pineappe');
+if (program.bbq) console.log(' - bbq');
+console.log(' - %s cheese', program.cheese);
+```
+
+ Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc.
+
+## Automated --help
+
+ The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:
+
+```
+ $ ./examples/pizza --help
+
+ Usage: pizza [options]
+
+ Options:
+
+ -V, --version output the version number
+ -p, --peppers Add peppers
+ -P, --pineapple Add pineappe
+ -b, --bbq Add bbq sauce
+ -c, --cheese <type> Add the specified type of cheese [marble]
+ -h, --help output usage information
+
+```
+
+## Coercion
+
+```js
+function range(val) {
+ return val.split('..').map(Number);
+}
+
+function list(val) {
+ return val.split(',');
+}
+
+program
+ .version('0.0.1')
+ .usage('[options] <file ...>')
+ .option('-i, --integer <n>', 'An integer argument', parseInt)
+ .option('-f, --float <n>', 'A float argument', parseFloat)
+ .option('-r, --range <a>..<b>', 'A range', range)
+ .option('-l, --list <items>', 'A list', list)
+ .option('-o, --optional [value]', 'An optional value')
+ .parse(process.argv);
+
+console.log(' int: %j', program.integer);
+console.log(' float: %j', program.float);
+console.log(' optional: %j', program.optional);
+program.range = program.range || [];
+console.log(' range: %j..%j', program.range[0], program.range[1]);
+console.log(' list: %j', program.list);
+console.log(' args: %j', program.args);
+```
+
+## Custom help
+
+ You can display arbitrary `-h, --help` information
+ by listening for "--help". Commander will automatically
+ exit once you are done so that the remainder of your program
+ does not execute causing undesired behaviours, for example
+ in the following executable "stuff" will not output when
+ `--help` is used.
+
+```js
+#!/usr/bin/env node
+
+/**
+ * Module dependencies.
+ */
+
+var program = require('../');
+
+function list(val) {
+ return val.split(',').map(Number);
+}
+
+program
+ .version('0.0.1')
+ .option('-f, --foo', 'enable some foo')
+ .option('-b, --bar', 'enable some bar')
+ .option('-B, --baz', 'enable some baz');
+
+// must be before .parse() since
+// node's emit() is immediate
+
+program.on('--help', function(){
+ console.log(' Examples:');
+ console.log('');
+ console.log(' $ custom-help --help');
+ console.log(' $ custom-help -h');
+ console.log('');
+});
+
+program.parse(process.argv);
+
+console.log('stuff');
+```
+
+yielding the following help output:
+
+```
+
+Usage: custom-help [options]
+
+Options:
+
+ -h, --help output usage information
+ -V, --version output the version number
+ -f, --foo enable some foo
+ -b, --bar enable some bar
+ -B, --baz enable some baz
+
+Examples:
+
+ $ custom-help --help
+ $ custom-help -h
+
+```
+
+## .prompt(msg, fn)
+
+ Single-line prompt:
+
+```js
+program.prompt('name: ', function(name){
+ console.log('hi %s', name);
+});
+```
+
+ Multi-line prompt:
+
+```js
+program.prompt('description:', function(name){
+ console.log('hi %s', name);
+});
+```
+
+ Coercion:
+
+```js
+program.prompt('Age: ', Number, function(age){
+ console.log('age: %j', age);
+});
+```
+
+```js
+program.prompt('Birthdate: ', Date, function(date){
+ console.log('date: %s', date);
+});
+```
+
+## .password(msg[, mask], fn)
+
+Prompt for password without echoing:
+
+```js
+program.password('Password: ', function(pass){
+ console.log('got "%s"', pass);
+ process.stdin.destroy();
+});
+```
+
+Prompt for password with mask char "*":
+
+```js
+program.password('Password: ', '*', function(pass){
+ console.log('got "%s"', pass);
+ process.stdin.destroy();
+});
+```
+
+## .confirm(msg, fn)
+
+ Confirm with the given `msg`:
+
+```js
+program.confirm('continue? ', function(ok){
+ console.log(' got %j', ok);
+});
+```
+
+## .choose(list, fn)
+
+ Let the user choose from a `list`:
+
+```js
+var list = ['tobi', 'loki', 'jane', 'manny', 'luna'];
+
+console.log('Choose the coolest pet:');
+program.choose(list, function(i){
+ console.log('you chose %d "%s"', i, list[i]);
+});
+```
+
+## Links
+
+ - [API documentation](http://visionmedia.github.com/commander.js/)
+ - [ascii tables](https://github.com/LearnBoost/cli-table)
+ - [progress bars](https://github.com/visionmedia/node-progress)
+ - [more progress bars](https://github.com/substack/node-multimeter)
+ - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
+
+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
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/commander/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/commander/index.js b/blackberry10/node_modules/commander/index.js
new file mode 100644
index 0000000..06ec1e4
--- /dev/null
+++ b/blackberry10/node_modules/commander/index.js
@@ -0,0 +1,2 @@
+
+module.exports = require('./lib/commander');
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/commander/lib/commander.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/commander/lib/commander.js b/blackberry10/node_modules/commander/lib/commander.js
new file mode 100644
index 0000000..5ba87eb
--- /dev/null
+++ b/blackberry10/node_modules/commander/lib/commander.js
@@ -0,0 +1,1026 @@
+
+/*!
+ * commander
+ * Copyright(c) 2011 TJ Holowaychuk <tj...@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var EventEmitter = require('events').EventEmitter
+ , path = require('path')
+ , tty = require('tty')
+ , basename = path.basename;
+
+/**
+ * Expose the root command.
+ */
+
+exports = module.exports = new Command;
+
+/**
+ * Expose `Command`.
+ */
+
+exports.Command = Command;
+
+/**
+ * Expose `Option`.
+ */
+
+exports.Option = Option;
+
+/**
+ * Initialize a new `Option` with the given `flags` and `description`.
+ *
+ * @param {String} flags
+ * @param {String} description
+ * @api public
+ */
+
+function Option(flags, description) {
+ this.flags = flags;
+ this.required = ~flags.indexOf('<');
+ this.optional = ~flags.indexOf('[');
+ this.bool = !~flags.indexOf('-no-');
+ flags = flags.split(/[ ,|]+/);
+ if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();
+ this.long = flags.shift();
+ this.description = description;
+}
+
+/**
+ * Return option name.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Option.prototype.name = function(){
+ return this.long
+ .replace('--', '')
+ .replace('no-', '');
+};
+
+/**
+ * Check if `arg` matches the short or long flag.
+ *
+ * @param {String} arg
+ * @return {Boolean}
+ * @api private
+ */
+
+Option.prototype.is = function(arg){
+ return arg == this.short
+ || arg == this.long;
+};
+
+/**
+ * Initialize a new `Command`.
+ *
+ * @param {String} name
+ * @api public
+ */
+
+function Command(name) {
+ this.commands = [];
+ this.options = [];
+ this.args = [];
+ this.name = name;
+}
+
+/**
+ * Inherit from `EventEmitter.prototype`.
+ */
+
+Command.prototype.__proto__ = EventEmitter.prototype;
+
+/**
+ * Add command `name`.
+ *
+ * The `.action()` callback is invoked when the
+ * command `name` is specified via __ARGV__,
+ * and the remaining arguments are applied to the
+ * function for access.
+ *
+ * When the `name` is "*" an un-matched command
+ * will be passed as the first arg, followed by
+ * the rest of __ARGV__ remaining.
+ *
+ * Examples:
+ *
+ * program
+ * .version('0.0.1')
+ * .option('-C, --chdir <path>', 'change the working directory')
+ * .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
+ * .option('-T, --no-tests', 'ignore test hook')
+ *
+ * program
+ * .command('setup')
+ * .description('run remote setup commands')
+ * .action(function(){
+ * console.log('setup');
+ * });
+ *
+ * program
+ * .command('exec <cmd>')
+ * .description('run the given remote command')
+ * .action(function(cmd){
+ * console.log('exec "%s"', cmd);
+ * });
+ *
+ * program
+ * .command('*')
+ * .description('deploy the given env')
+ * .action(function(env){
+ * console.log('deploying "%s"', env);
+ * });
+ *
+ * program.parse(process.argv);
+ *
+ * @param {String} name
+ * @return {Command} the new command
+ * @api public
+ */
+
+Command.prototype.command = function(name){
+ var args = name.split(/ +/);
+ var cmd = new Command(args.shift());
+ this.commands.push(cmd);
+ cmd.parseExpectedArgs(args);
+ cmd.parent = this;
+ return cmd;
+};
+
+/**
+ * Parse expected `args`.
+ *
+ * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.
+ *
+ * @param {Array} args
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.parseExpectedArgs = function(args){
+ if (!args.length) return;
+ var self = this;
+ args.forEach(function(arg){
+ switch (arg[0]) {
+ case '<':
+ self.args.push({ required: true, name: arg.slice(1, -1) });
+ break;
+ case '[':
+ self.args.push({ required: false, name: arg.slice(1, -1) });
+ break;
+ }
+ });
+ return this;
+};
+
+/**
+ * Register callback `fn` for the command.
+ *
+ * Examples:
+ *
+ * program
+ * .command('help')
+ * .description('display verbose help')
+ * .action(function(){
+ * // output help here
+ * });
+ *
+ * @param {Function} fn
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.action = function(fn){
+ var self = this;
+ this.parent.on(this.name, function(args, unknown){
+ // Parse any so-far unknown options
+ unknown = unknown || [];
+ var parsed = self.parseOptions(unknown);
+
+ // Output help if necessary
+ outputHelpIfNecessary(self, parsed.unknown);
+
+ // If there are still any unknown options, then we simply
+ // die, unless someone asked for help, in which case we give it
+ // to them, and then we die.
+ if (parsed.unknown.length > 0) {
+ self.unknownOption(parsed.unknown[0]);
+ }
+
+ self.args.forEach(function(arg, i){
+ if (arg.required && null == args[i]) {
+ self.missingArgument(arg.name);
+ }
+ });
+
+ // Always append ourselves to the end of the arguments,
+ // to make sure we match the number of arguments the user
+ // expects
+ if (self.args.length) {
+ args[self.args.length] = self;
+ } else {
+ args.push(self);
+ }
+
+ fn.apply(this, args);
+ });
+ return this;
+};
+
+/**
+ * Define option with `flags`, `description` and optional
+ * coercion `fn`.
+ *
+ * The `flags` string should contain both the short and long flags,
+ * separated by comma, a pipe or space. The following are all valid
+ * all will output this way when `--help` is used.
+ *
+ * "-p, --pepper"
+ * "-p|--pepper"
+ * "-p --pepper"
+ *
+ * Examples:
+ *
+ * // simple boolean defaulting to false
+ * program.option('-p, --pepper', 'add pepper');
+ *
+ * --pepper
+ * program.pepper
+ * // => Boolean
+ *
+ * // simple boolean defaulting to false
+ * program.option('-C, --no-cheese', 'remove cheese');
+ *
+ * program.cheese
+ * // => true
+ *
+ * --no-cheese
+ * program.cheese
+ * // => true
+ *
+ * // required argument
+ * program.option('-C, --chdir <path>', 'change the working directory');
+ *
+ * --chdir /tmp
+ * program.chdir
+ * // => "/tmp"
+ *
+ * // optional argument
+ * program.option('-c, --cheese [type]', 'add cheese [marble]');
+ *
+ * @param {String} flags
+ * @param {String} description
+ * @param {Function|Mixed} fn or default
+ * @param {Mixed} defaultValue
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.option = function(flags, description, fn, defaultValue){
+ var self = this
+ , option = new Option(flags, description)
+ , oname = option.name()
+ , name = camelcase(oname);
+
+ // default as 3rd arg
+ if ('function' != typeof fn) defaultValue = fn, fn = null;
+
+ // preassign default value only for --no-*, [optional], or <required>
+ if (false == option.bool || option.optional || option.required) {
+ // when --no-* we make sure default is true
+ if (false == option.bool) defaultValue = true;
+ // preassign only if we have a default
+ if (undefined !== defaultValue) self[name] = defaultValue;
+ }
+
+ // register the option
+ this.options.push(option);
+
+ // when it's passed assign the value
+ // and conditionally invoke the callback
+ this.on(oname, function(val){
+ // coercion
+ if (null != val && fn) val = fn(val);
+
+ // unassigned or bool
+ if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) {
+ // if no value, bool true, and we have a default, then use it!
+ if (null == val) {
+ self[name] = option.bool
+ ? defaultValue || true
+ : false;
+ } else {
+ self[name] = val;
+ }
+ } else if (null !== val) {
+ // reassign
+ self[name] = val;
+ }
+ });
+
+ return this;
+};
+
+/**
+ * Parse `argv`, settings options and invoking commands when defined.
+ *
+ * @param {Array} argv
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.parse = function(argv){
+ // store raw args
+ this.rawArgs = argv;
+
+ // guess name
+ if (!this.name) this.name = basename(argv[1]);
+
+ // process argv
+ var parsed = this.parseOptions(this.normalize(argv.slice(2)));
+ this.args = parsed.args;
+ return this.parseArgs(this.args, parsed.unknown);
+};
+
+/**
+ * Normalize `args`, splitting joined short flags. For example
+ * the arg "-abc" is equivalent to "-a -b -c".
+ *
+ * @param {Array} args
+ * @return {Array}
+ * @api private
+ */
+
+Command.prototype.normalize = function(args){
+ var ret = []
+ , arg;
+
+ for (var i = 0, len = args.length; i < len; ++i) {
+ arg = args[i];
+ if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) {
+ arg.slice(1).split('').forEach(function(c){
+ ret.push('-' + c);
+ });
+ } else {
+ ret.push(arg);
+ }
+ }
+
+ return ret;
+};
+
+/**
+ * Parse command `args`.
+ *
+ * When listener(s) are available those
+ * callbacks are invoked, otherwise the "*"
+ * event is emitted and those actions are invoked.
+ *
+ * @param {Array} args
+ * @return {Command} for chaining
+ * @api private
+ */
+
+Command.prototype.parseArgs = function(args, unknown){
+ var cmds = this.commands
+ , len = cmds.length
+ , name;
+
+ if (args.length) {
+ name = args[0];
+ if (this.listeners(name).length) {
+ this.emit(args.shift(), args, unknown);
+ } else {
+ this.emit('*', args);
+ }
+ } else {
+ outputHelpIfNecessary(this, unknown);
+
+ // If there were no args and we have unknown options,
+ // then they are extraneous and we need to error.
+ if (unknown.length > 0) {
+ this.unknownOption(unknown[0]);
+ }
+ }
+
+ return this;
+};
+
+/**
+ * Return an option matching `arg` if any.
+ *
+ * @param {String} arg
+ * @return {Option}
+ * @api private
+ */
+
+Command.prototype.optionFor = function(arg){
+ for (var i = 0, len = this.options.length; i < len; ++i) {
+ if (this.options[i].is(arg)) {
+ return this.options[i];
+ }
+ }
+};
+
+/**
+ * Parse options from `argv` returning `argv`
+ * void of these options.
+ *
+ * @param {Array} argv
+ * @return {Array}
+ * @api public
+ */
+
+Command.prototype.parseOptions = function(argv){
+ var args = []
+ , len = argv.length
+ , literal
+ , option
+ , arg;
+
+ var unknownOptions = [];
+
+ // parse options
+ for (var i = 0; i < len; ++i) {
+ arg = argv[i];
+
+ // literal args after --
+ if ('--' == arg) {
+ literal = true;
+ continue;
+ }
+
+ if (literal) {
+ args.push(arg);
+ continue;
+ }
+
+ // find matching Option
+ option = this.optionFor(arg);
+
+ // option is defined
+ if (option) {
+ // requires arg
+ if (option.required) {
+ arg = argv[++i];
+ if (null == arg) return this.optionMissingArgument(option);
+ if ('-' == arg[0]) return this.optionMissingArgument(option, arg);
+ this.emit(option.name(), arg);
+ // optional arg
+ } else if (option.optional) {
+ arg = argv[i+1];
+ if (null == arg || '-' == arg[0]) {
+ arg = null;
+ } else {
+ ++i;
+ }
+ this.emit(option.name(), arg);
+ // bool
+ } else {
+ this.emit(option.name());
+ }
+ continue;
+ }
+
+ // looks like an option
+ if (arg.length > 1 && '-' == arg[0]) {
+ unknownOptions.push(arg);
+
+ // If the next argument looks like it might be
+ // an argument for this option, we pass it on.
+ // If it isn't, then it'll simply be ignored
+ if (argv[i+1] && '-' != argv[i+1][0]) {
+ unknownOptions.push(argv[++i]);
+ }
+ continue;
+ }
+
+ // arg
+ args.push(arg);
+ }
+
+ return { args: args, unknown: unknownOptions };
+};
+
+/**
+ * Argument `name` is missing.
+ *
+ * @param {String} name
+ * @api private
+ */
+
+Command.prototype.missingArgument = function(name){
+ console.error();
+ console.error(" error: missing required argument `%s'", name);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * `Option` is missing an argument, but received `flag` or nothing.
+ *
+ * @param {String} option
+ * @param {String} flag
+ * @api private
+ */
+
+Command.prototype.optionMissingArgument = function(option, flag){
+ console.error();
+ if (flag) {
+ console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag);
+ } else {
+ console.error(" error: option `%s' argument missing", option.flags);
+ }
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Unknown option `flag`.
+ *
+ * @param {String} flag
+ * @api private
+ */
+
+Command.prototype.unknownOption = function(flag){
+ console.error();
+ console.error(" error: unknown option `%s'", flag);
+ console.error();
+ process.exit(1);
+};
+
+/**
+ * Set the program version to `str`.
+ *
+ * This method auto-registers the "-V, --version" flag
+ * which will print the version number when passed.
+ *
+ * @param {String} str
+ * @param {String} flags
+ * @return {Command} for chaining
+ * @api public
+ */
+
+Command.prototype.version = function(str, flags){
+ if (0 == arguments.length) return this._version;
+ this._version = str;
+ flags = flags || '-V, --version';
+ this.option(flags, 'output the version number');
+ this.on('version', function(){
+ console.log(str);
+ process.exit(0);
+ });
+ return this;
+};
+
+/**
+ * Set the description `str`.
+ *
+ * @param {String} str
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.description = function(str){
+ if (0 == arguments.length) return this._description;
+ this._description = str;
+ return this;
+};
+
+/**
+ * Set / get the command usage `str`.
+ *
+ * @param {String} str
+ * @return {String|Command}
+ * @api public
+ */
+
+Command.prototype.usage = function(str){
+ var args = this.args.map(function(arg){
+ return arg.required
+ ? '<' + arg.name + '>'
+ : '[' + arg.name + ']';
+ });
+
+ var usage = '[options'
+ + (this.commands.length ? '] [command' : '')
+ + ']'
+ + (this.args.length ? ' ' + args : '');
+ if (0 == arguments.length) return this._usage || usage;
+ this._usage = str;
+
+ return this;
+};
+
+/**
+ * Return the largest option length.
+ *
+ * @return {Number}
+ * @api private
+ */
+
+Command.prototype.largestOptionLength = function(){
+ return this.options.reduce(function(max, option){
+ return Math.max(max, option.flags.length);
+ }, 0);
+};
+
+/**
+ * Return help for options.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.optionHelp = function(){
+ var width = this.largestOptionLength();
+
+ // Prepend the help information
+ return [pad('-h, --help', width) + ' ' + 'output usage information']
+ .concat(this.options.map(function(option){
+ return pad(option.flags, width)
+ + ' ' + option.description;
+ }))
+ .join('\n');
+};
+
+/**
+ * Return command help documentation.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.commandHelp = function(){
+ if (!this.commands.length) return '';
+ return [
+ ''
+ , ' Commands:'
+ , ''
+ , this.commands.map(function(cmd){
+ var args = cmd.args.map(function(arg){
+ return arg.required
+ ? '<' + arg.name + '>'
+ : '[' + arg.name + ']';
+ }).join(' ');
+
+ return cmd.name
+ + (cmd.options.length
+ ? ' [options]'
+ : '') + ' ' + args
+ + (cmd.description()
+ ? '\n' + cmd.description()
+ : '');
+ }).join('\n\n').replace(/^/gm, ' ')
+ , ''
+ ].join('\n');
+};
+
+/**
+ * Return program help documentation.
+ *
+ * @return {String}
+ * @api private
+ */
+
+Command.prototype.helpInformation = function(){
+ return [
+ ''
+ , ' Usage: ' + this.name + ' ' + this.usage()
+ , '' + this.commandHelp()
+ , ' Options:'
+ , ''
+ , '' + this.optionHelp().replace(/^/gm, ' ')
+ , ''
+ , ''
+ ].join('\n');
+};
+
+/**
+ * Prompt for a `Number`.
+ *
+ * @param {String} str
+ * @param {Function} fn
+ * @api private
+ */
+
+Command.prototype.promptForNumber = function(str, fn){
+ var self = this;
+ this.promptSingleLine(str, function parseNumber(val){
+ val = Number(val);
+ if (isNaN(val)) return self.promptSingleLine(str + '(must be a number) ', parseNumber);
+ fn(val);
+ });
+};
+
+/**
+ * Prompt for a `Date`.
+ *
+ * @param {String} str
+ * @param {Function} fn
+ * @api private
+ */
+
+Command.prototype.promptForDate = function(str, fn){
+ var self = this;
+ this.promptSingleLine(str, function parseDate(val){
+ val = new Date(val);
+ if (isNaN(val.getTime())) return self.promptSingleLine(str + '(must be a date) ', parseDate);
+ fn(val);
+ });
+};
+
+/**
+ * Single-line prompt.
+ *
+ * @param {String} str
+ * @param {Function} fn
+ * @api private
+ */
+
+Command.prototype.promptSingleLine = function(str, fn){
+ if ('function' == typeof arguments[2]) {
+ return this['promptFor' + (fn.name || fn)](str, arguments[2]);
+ }
+
+ process.stdout.write(str);
+ process.stdin.setEncoding('utf8');
+ process.stdin.once('data', function(val){
+ fn(val.trim());
+ }).resume();
+};
+
+/**
+ * Multi-line prompt.
+ *
+ * @param {String} str
+ * @param {Function} fn
+ * @api private
+ */
+
+Command.prototype.promptMultiLine = function(str, fn){
+ var buf = [];
+ console.log(str);
+ process.stdin.setEncoding('utf8');
+ process.stdin.on('data', function(val){
+ if ('\n' == val || '\r\n' == val) {
+ process.stdin.removeAllListeners('data');
+ fn(buf.join('\n'));
+ } else {
+ buf.push(val.trimRight());
+ }
+ }).resume();
+};
+
+/**
+ * Prompt `str` and callback `fn(val)`
+ *
+ * Commander supports single-line and multi-line prompts.
+ * To issue a single-line prompt simply add white-space
+ * to the end of `str`, something like "name: ", whereas
+ * for a multi-line prompt omit this "description:".
+ *
+ *
+ * Examples:
+ *
+ * program.prompt('Username: ', function(name){
+ * console.log('hi %s', name);
+ * });
+ *
+ * program.prompt('Description:', function(desc){
+ * console.log('description was "%s"', desc.trim());
+ * });
+ *
+ * @param {String|Object} str
+ * @param {Function} fn
+ * @api public
+ */
+
+Command.prototype.prompt = function(str, fn){
+ var self = this;
+
+ if ('string' == typeof str) {
+ if (/ $/.test(str)) return this.promptSingleLine.apply(this, arguments);
+ this.promptMultiLine(str, fn);
+ } else {
+ var keys = Object.keys(str)
+ , obj = {};
+
+ function next() {
+ var key = keys.shift()
+ , label = str[key];
+
+ if (!key) return fn(obj);
+ self.prompt(label, function(val){
+ obj[key] = val;
+ next();
+ });
+ }
+
+ next();
+ }
+};
+
+/**
+ * Prompt for password with `str`, `mask` char and callback `fn(val)`.
+ *
+ * The mask string defaults to '', aka no output is
+ * written while typing, you may want to use "*" etc.
+ *
+ * Examples:
+ *
+ * program.password('Password: ', function(pass){
+ * console.log('got "%s"', pass);
+ * process.stdin.destroy();
+ * });
+ *
+ * program.password('Password: ', '*', function(pass){
+ * console.log('got "%s"', pass);
+ * process.stdin.destroy();
+ * });
+ *
+ * @param {String} str
+ * @param {String} mask
+ * @param {Function} fn
+ * @api public
+ */
+
+Command.prototype.password = function(str, mask, fn){
+ var self = this
+ , buf = '';
+
+ // default mask
+ if ('function' == typeof mask) {
+ fn = mask;
+ mask = '';
+ }
+
+ process.stdin.resume();
+ tty.setRawMode(true);
+ process.stdout.write(str);
+
+ // keypress
+ process.stdin.on('keypress', function(c, key){
+ if (key && 'enter' == key.name) {
+ console.log();
+ process.stdin.removeAllListeners('keypress');
+ tty.setRawMode(false);
+ if (!buf.trim().length) return self.password(str, mask, fn);
+ fn(buf);
+ return;
+ }
+
+ if (key && key.ctrl && 'c' == key.name) {
+ console.log('%s', buf);
+ process.exit();
+ }
+
+ process.stdout.write(mask);
+ buf += c;
+ }).resume();
+};
+
+/**
+ * Confirmation prompt with `str` and callback `fn(bool)`
+ *
+ * Examples:
+ *
+ * program.confirm('continue? ', function(ok){
+ * console.log(' got %j', ok);
+ * process.stdin.destroy();
+ * });
+ *
+ * @param {String} str
+ * @param {Function} fn
+ * @api public
+ */
+
+
+Command.prototype.confirm = function(str, fn, verbose){
+ var self = this;
+ this.prompt(str, function(ok){
+ if (!ok.trim()) {
+ if (!verbose) str += '(yes or no) ';
+ return self.confirm(str, fn, true);
+ }
+ fn(parseBool(ok));
+ });
+};
+
+/**
+ * Choice prompt with `list` of items and callback `fn(index, item)`
+ *
+ * Examples:
+ *
+ * var list = ['tobi', 'loki', 'jane', 'manny', 'luna'];
+ *
+ * console.log('Choose the coolest pet:');
+ * program.choose(list, function(i){
+ * console.log('you chose %d "%s"', i, list[i]);
+ * process.stdin.destroy();
+ * });
+ *
+ * @param {Array} list
+ * @param {Number|Function} index or fn
+ * @param {Function} fn
+ * @api public
+ */
+
+Command.prototype.choose = function(list, index, fn){
+ var self = this
+ , hasDefault = 'number' == typeof index;
+
+ if (!hasDefault) {
+ fn = index;
+ index = null;
+ }
+
+ list.forEach(function(item, i){
+ if (hasDefault && i == index) {
+ console.log('* %d) %s', i + 1, item);
+ } else {
+ console.log(' %d) %s', i + 1, item);
+ }
+ });
+
+ function again() {
+ self.prompt(' : ', function(val){
+ val = parseInt(val, 10) - 1;
+ if (hasDefault && isNaN(val)) val = index;
+
+ if (null == list[val]) {
+ again();
+ } else {
+ fn(val, list[val]);
+ }
+ });
+ }
+
+ again();
+};
+
+/**
+ * Camel-case the given `flag`
+ *
+ * @param {String} flag
+ * @return {String}
+ * @api private
+ */
+
+function camelcase(flag) {
+ return flag.split('-').reduce(function(str, word){
+ return str + word[0].toUpperCase() + word.slice(1);
+ });
+}
+
+/**
+ * Parse a boolean `str`.
+ *
+ * @param {String} str
+ * @return {Boolean}
+ * @api private
+ */
+
+function parseBool(str) {
+ return /^y|yes|ok|true$/i.test(str);
+}
+
+/**
+ * Pad `str` to `width`.
+ *
+ * @param {String} str
+ * @param {Number} width
+ * @return {String}
+ * @api private
+ */
+
+function pad(str, width) {
+ var len = Math.max(0, width - str.length);
+ return str + Array(len + 1).join(' ');
+}
+
+/**
+ * Output help information if necessary
+ *
+ * @param {Command} command to output help for
+ * @param {Array} array of options to search for -h or --help
+ * @api private
+ */
+
+function outputHelpIfNecessary(cmd, options) {
+ options = options || [];
+ for (var i = 0; i < options.length; i++) {
+ if (options[i] == '--help' || options[i] == '-h') {
+ process.stdout.write(cmd.helpInformation());
+ cmd.emit('--help');
+ process.exit(0);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/commander/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/commander/package.json b/blackberry10/node_modules/commander/package.json
new file mode 100644
index 0000000..052b181
--- /dev/null
+++ b/blackberry10/node_modules/commander/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "commander",
+ "version": "0.5.2",
+ "description": "the complete solution for node.js command-line programs",
+ "keywords": [
+ "command",
+ "option",
+ "parser",
+ "prompt",
+ "stdin"
+ ],
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/visionmedia/commander.js.git"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "should": ">= 0.0.1"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "main": "index",
+ "engines": {
+ "node": ">= 0.4.x"
+ },
+ "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]'
, 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineappe');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineappe\n -b, --bbq Add bbq sauce\n -c, --cheese <type> Add the specified type of cheese [marble]\n -h, --he
lp output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] <file ...>')\n .option('-i, --integer <n>', 'An integer argument', parseInt)\n .option('-f, --float <n>', 'A float argument', parseFloat)\n .option('-r, --range <a>..<b>', 'A range', range)\n .option('-l, --list <items>', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\"
. Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help
output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .prompt(msg, fn)\n\n Single-line prompt:\n\n```js\nprogram.prompt('name: ', function(name){\n console.log('hi %s', name);\n});\n```\n\n Multi-line prompt:\n\n```js\nprogram.prompt('description:', function(name){\n console.log('hi %s', name);\n});\n```\n\n Coercion:\n\n```js\nprogram.prompt('Age: ', Number, function(age){\n console.log('age: %j', age);\n});\n```\n\n```js\nprogram.prompt('Birthdate: ', Date, function(date){\n console.log('date: %s', date);\n});\n```\n\n## .password(msg[, mask], fn)\n\nPrompt for password without echoing:\n\n```js\nprogram.password('Password: ', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\nPrompt for password with mask char \"*\":\n\n```js\nprogram.password('Pas
sword: ', '*', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\n## .confirm(msg, fn)\n\n Confirm with the given `msg`:\n\n```js\nprogram.confirm('continue? ', function(ok){\n console.log(' got %j', ok);\n});\n```\n\n## .choose(list, fn)\n\n Let the user choose from a `list`:\n\n```js\nvar list = ['tobi', 'loki', 'jane', 'manny', 'luna'];\n\nconsole.log('Choose the coolest pet:');\nprogram.choose(list, function(i){\n console.log('you chose %d \"%s\"', i, list[i]);\n});\n```\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission
is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.",
+ "readmeFilename": "Readme.md",
+ "bugs": {
+ "url": "https://github.com/visionmedia/commander.js/issues"
+ },
+ "_id": "commander@0.5.2",
+ "_from": "commander@0.5.2"
+}
[33/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/package.json b/blackberry10/node_modules/jake/package.json
new file mode 100644
index 0000000..cc27a71
--- /dev/null
+++ b/blackberry10/node_modules/jake/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "jake",
+ "description": "JavaScript build tool, similar to Make or Rake",
+ "keywords": [
+ "build",
+ "cli",
+ "make",
+ "rake"
+ ],
+ "version": "0.5.16",
+ "author": {
+ "name": "Matthew Eernisse",
+ "email": "mde@fleegix.org",
+ "url": "http://fleegix.org"
+ },
+ "bin": {
+ "jake": "./bin/cli.js"
+ },
+ "main": "./lib/jake.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mde/jake.git"
+ },
+ "preferGlobal": true,
+ "dependencies": {
+ "minimatch": "0.2.x",
+ "utilities": "0.0.x"
+ },
+ "devDependencies": {},
+ "engines": {
+ "node": "*"
+ },
+ "readme": "### Jake -- JavaScript build tool for Node.js\n\n### Installing with [NPM](http://npmjs.org/)\n\nInstall globally with:\n\n npm install -g jake\n\nOr you may also install it as a development dependency in a package.json file:\n\n // package.json\n \"devDependencies\": {\n \"jake\": \"latest\"\n }\n\nThen install it with `npm install`\n\nNote Jake is intended to be mostly a command-line tool, but lately there have been\nchanges to it so it can be either embedded, or run from inside your project.\n\n### Installing from source\n\nPrerequisites: Jake requires [Node.js](<http://nodejs.org/>), and the\n[utilities](https://npmjs.org/package/utilities) and\n[minimatch](https://npmjs.org/package/minimatch) modules.\n\nGet Jake:\n\n git clone git://github.com/mde/jake.git\n\nBuild Jake:\n\n cd jake && make && sudo make install\n\nEven if you're installing Jake from source, you'll still need NPM for installing\nthe few modules Jake depends on. `make install`
will do this automatically for\nyou.\n\nBy default Jake is installed in \"/usr/local.\" To install it into a different\ndirectory (e.g., one that doesn't require super-user privilege), pass the PREFIX\nvariable to the `make install` command. For example, to install it into a\n\"jake\" directory in your home directory, you could use this:\n\n make && make install PREFIX=~/jake\n\nIf do you install Jake somewhere special, you'll need to add the \"bin\" directory\nin the install target to your PATH to get access to the `jake` executable.\n\n### Windows, installing from source\n\nFor Windows users installing from source, there are some additional steps.\n\n*Assumed: current directory is the same directory where node.exe is present.*\n\nGet Jake:\n\n git clone git://github.com/mde/jake.git node_modules/jake\n\nCopy jake.bat and jake to the same directory as node.exe\n\n copy node_modules/jake/jake.bat jake.bat\n copy node_modules/jake/jake jake\n\nAdd the directory of node.
exe to the environment PATH variable.\n\n### Basic usage\n\n jake [options ...] [env variables ...] target\n\n### Description\n\n Jake is a simple JavaScript build program with capabilities similar to the\n regular make or rake command.\n\n Jake has the following features:\n * Jakefiles are in standard JavaScript syntax\n * Tasks with prerequisites\n * Namespaces for tasks\n * Async task execution\n\n### Options\n\n -V/v\n --version Display the Jake version.\n\n -h\n --help Display help message.\n\n -f *FILE*\n --jakefile *FILE* Use FILE as the Jakefile.\n\n -C *DIRECTORY*\n --directory *DIRECTORY* Change to DIRECTORY before running tasks.\n\n -q\n --quiet Do not log messages to standard output.\n\n -J *JAKELIBDIR*\n --jakelibdir *JAKELIBDIR* Auto-import any .jake files in JAKELIBDIR.\n (default is 'jake
lib')\n\n -B\n --always-make Unconditionally make all targets.\n\n -t\n --trace Enable full backtrace.\n\n -T/ls\n --tasks Display the tasks (matching optional PATTERN)\n with descriptions, then exit.\n\n### Jakefile syntax\n\nA Jakefile is just executable JavaScript. You can include whatever JavaScript\nyou want in it.\n\n## API Docs\n\nAPI docs [can be found here](http://mde.github.com/jake/doc/).\n\n## Tasks\n\nUse `task` to define tasks. It has one required argument, the task-name, and\nthree optional arguments:\n\n```javascript\ntask(name, [prerequisites], [action], [opts]);\n```\n\nThe `name` argument is a String with the name of the task, and `prerequisites`\nis an optional Array arg of the list of prerequisite tasks to perform first.\n\nThe `action` is a Function defininng the action to take for the task. (Note that\nObject-literal syntax for name/prerequisites in a single
argument a la Rake is\nalso supported, but JavaScript's lack of support for dynamic keys in Object\nliterals makes it not very useful.) The action is invoked with the Task object\nitself as the execution context (i.e, \"this\" inside the action references the\nTask object).\n\nThe `opts` argument is the normal JavaScript-style 'options' object. When a\ntask's operations are asynchronous, the `async` property should be set to\n`true`, and the task must call `complete()` to signal to Jake that the task is\ndone, and execution can proceed. By default the `async` property is `false`.\n\nTasks created with `task` are always executed when asked for (or are a\nprerequisite). Tasks created with `file` are only executed if no file with the\ngiven name exists or if any of its file-prerequisites are more recent than the\nfile named by the task. Also, if any prerequisite is a regular task, the file\ntask will always be executed.\n\nUse `desc` to add a string description of the task.\n\nHere's a
n example:\n\n```javascript\ndesc('This is the default task.');\ntask('default', function (params) {\n console.log('This is the default task.');\n});\n\ndesc('This task has prerequisites.');\ntask('hasPrereqs', ['foo', 'bar', 'baz'], function (params) {\n console.log('Ran some prereqs first.');\n});\n```\n\nAnd here's an example of an asynchronous task:\n\n```javascript\ndesc('This is an asynchronous task.');\ntask('asyncTask', {async: true}, function () {\n setTimeout(complete, 1000);\n});\n```\n\nA Task is also an EventEmitter which emits the 'complete' event when it is\nfinished. This allows asynchronous tasks to be run from within other asked via\neither `invoke` or `execute`, and ensure they will complete before the rest of\nthe containing task executes. See the section \"Running tasks from within other\ntasks,\" below.\n\n### File-tasks\n\nCreate a file-task by calling `file`.\n\nFile-tasks create a file from one or more other files. With a file-task, Jake\nchecks both that
the file exists, and also that it is not older than the files\nspecified by any prerequisite tasks. File-tasks are particularly useful for\ncompiling something from a tree of source files.\n\n```javascript\ndesc('This builds a minified JS file for production.');\nfile('foo-minified.js', ['bar', 'foo-bar.js', 'foo-baz.js'], function () {\n // Code to concat and minify goes here\n});\n```\n\n### Directory-tasks\n\nCreate a directory-task by calling `directory`.\n\nDirectory-tasks create a directory for use with for file-tasks. Jake checks for\nthe existence of the directory, and only creates it if needed.\n\n```javascript\ndesc('This creates the bar directory for use with the foo-minified.js file-task.');\ndirectory('bar');\n```\n\nThis task will create the directory when used as a prerequisite for a file-task,\nor when run from the command-line.\n\n### Namespaces\n\nUse `namespace` to create a namespace of tasks to perform. Call it with two arguments:\n\n```javascript\nnamespace(na
me, namespaceTasks);\n```\n\nWhere is `name` is the name of the namespace, and `namespaceTasks` is a function\nwith calls inside it to `task` or `desc` definining all the tasks for that\nnamespace.\n\nHere's an example:\n\n```javascript\ndesc('This is the default task.');\ntask('default', function () {\n console.log('This is the default task.');\n});\n\nnamespace('foo', function () {\n desc('This the foo:bar task');\n task('bar', function () {\n console.log('doing foo:bar task');\n });\n\n desc('This the foo:baz task');\n task('baz', ['default', 'foo:bar'], function () {\n console.log('doing foo:baz task');\n });\n\n});\n```\n\nIn this example, the foo:baz task depends on the the default and foo:bar tasks.\n\n### Passing parameters to jake\n\nParameters can be passed to Jake two ways: plain arguments, and environment\nvariables.\n\nTo pass positional arguments to the Jake tasks, enclose them in square braces,\nseparated by commas, after the name of the task on the comma
nd-line. For\nexample, with the following Jakefile:\n\n```javascript\ndesc('This is an awesome task.');\ntask('awesome', function (a, b, c) {\n console.log(a, b, c);\n});\n```\n\nYou could run `jake` like this:\n\n jake awesome[foo,bar,baz]\n\nAnd you'd get the following output:\n\n foo bar baz\n\nNote that you *cannot* uses spaces between the commas separating the parameters.\n\nAny parameters passed after the Jake task that contain an equals sign (=) will\nbe added to process.env.\n\nWith the following Jakefile:\n\n```javascript\ndesc('This is an awesome task.');\ntask('awesome', function (a, b, c) {\n console.log(a, b, c);\n console.log(process.env.qux, process.env.frang);\n});\n```\n\nYou could run `jake` like this:\n\n jake awesome[foo,bar,baz] qux=zoobie frang=asdf\n\nAnd you'd get the following output:\n\n foo bar baz\n zoobie asdf\nRunning `jake` with no arguments runs the default task.\n\n__Note for zsh users__ : you will need to escape the brackets or wra
p in single\nquotes like this to pass parameters :\n\n jake 'awesome[foo,bar,baz]'\n\nAn other solution is to desactivate permannently file-globbing for the `jake`\ncommand. You can do this by adding this line to your `.zshrc` file :\n\n alias jake=\"noglob jake\"\n\n### Cleanup after all tasks run, jake 'complete' event\n\nThe base 'jake' object is an EventEmitter, and fires a 'complete' event after\nrunning all tasks.\n\nThis is sometimes useful when a task starts a process which keeps the Node\nevent-loop running (e.g., a database connection). If you know you want to stop\nthe running Node process after all tasks have finished, you can set a listener\nfor the 'complete' event, like so:\n\n```javascript\njake.addListener('complete', function () {\n process.exit();\n});\n```\n\n### Running tasks from within other tasks\n\nJake supports the ability to run a task from within another task via the\n`invoke` and `execute` methods.\n\nThe `invoke` method will run the desired task,
along with its prerequisites:\n\n```javascript\ndesc('Calls the foo:bar task and its prerequisites.');\ntask('invokeFooBar', function () {\n // Calls foo:bar and its prereqs\n jake.Task['foo:bar'].invoke();\n});\n```\n\nThe `invoke` method will only run the task once, even if you call it repeatedly.\n\n```javascript\ndesc('Calls the foo:bar task and its prerequisites.');\ntask('invokeFooBar', function () {\n // Calls foo:bar and its prereqs\n jake.Task['foo:bar'].invoke();\n // Does nothing\n jake.Task['foo:bar'].invoke();\n});\n```\n\nThe `execute` method will run the desired task without its prerequisites:\n\n```javascript\ndesc('Calls the foo:bar task without its prerequisites.');\ntask('executeFooBar', function () {\n // Calls foo:bar without its prereqs\n jake.Task['foo:baz'].execute();\n});\n```\n\nCalling `execute` repeatedly will run the desired task repeatedly.\n\n```javascript\ndesc('Calls the foo:bar task without its prerequisites.');\ntask('executeFooBar', funct
ion () {\n // Calls foo:bar without its prereqs\n jake.Task['foo:baz'].execute();\n // Can keep running this over and over\n jake.Task['foo:baz'].execute();\n jake.Task['foo:baz'].execute();\n});\n```\n\nIf you want to run the task and its prerequisites more than once, you can use\n`invoke` with the `reenable` method.\n\n```javascript\ndesc('Calls the foo:bar task and its prerequisites.');\ntask('invokeFooBar', function () {\n // Calls foo:bar and its prereqs\n jake.Task['foo:bar'].invoke();\n // Does nothing\n jake.Task['foo:bar'].invoke();\n // Only re-runs foo:bar, but not its prerequisites\n jake.Task['foo:bar'].reenable();\n jake.Task['foo:bar'].invoke();\n});\n```\n\nThe `reenable` method takes a single Boolean arg, a 'deep' flag, which reenables\nthe task's prerequisites if set to true.\n\n```javascript\ndesc('Calls the foo:bar task and its prerequisites.');\ntask('invokeFooBar', function () {\n // Calls foo:bar and its prereqs\n jake.Task['foo:bar'].invoke();\n
// Does nothing\n jake.Task['foo:bar'].invoke();\n // Re-runs foo:bar and all of its prerequisites\n jake.Task['foo:bar'].reenable(true);\n jake.Task['foo:bar'].invoke();\n});\n```\n\nIt's easy to pass params on to a sub-task run via `invoke` or `execute`:\n\n```javascript\ndesc('Passes params on to other tasks.');\ntask('passParams', function () {\n var t = jake.Task['foo:bar'];\n // Calls foo:bar, passing along current args\n t.invoke.apply(t, arguments);\n});\n```\n\n### Managing asynchrony without prereqs (e.g., when using `invoke`)\n\nYou can mix sync and async without problems when using normal prereqs, because\nthe Jake execution loop takes care of the difference for you. But when you call\n`invoke` or `execute`, you have to manage the asynchrony yourself.\n\nHere's a correct working example:\n\n```javascript\ntask('async1', ['async2'], {async: true}, function () {\n console.log('-- async1 start ----------------');\n setTimeout(function () {\n console.lo
g('-- async1 done ----------------');\n complete();\n }, 1000);\n});\n\ntask('async2', {async: true}, function () {\n console.log('-- async2 start ----------------');\n setTimeout(function () {\n console.log('-- async2 done ----------------');\n complete();\n }, 500);\n});\n\ntask('init', ['async1', 'async2'], {async: true}, function () {\n console.log('-- init start ----------------');\n setTimeout(function () {\n console.log('-- init done ----------------');\n complete();\n }, 100);\n});\n\ntask('default', {async: true}, function () {\n console.log('-- default start ----------------');\n var init = jake.Task.init;\n init.addListener('complete', function () {\n console.log('-- default done ----------------');\n complete();\n });\n init.invoke();\n});\n```\n\nYou have to declare the \"default\" task as asynchronous as well, and call\n`complete` on it when \"init\" finishes. Here's the output:\n\n -- default start
----------------\n -- async2 start ----------------\n -- async2 done ----------------\n -- async1 start ----------------\n -- async1 done ----------------\n -- init start ----------------\n -- init done ----------------\n -- default done ----------------\n\nYou get what you expect -- \"default\" starts, the rest runs, and finally\n\"default\" finishes.\n\n### Evented tasks\n\nTasks are EventEmitters. They can fire 'complete' and 'error' events.\n\nIf a task called via `invoke` is asynchronous, you can set a listener on the\n'complete' event to run any code that depends on it.\n\n```javascript\ndesc('Calls the async foo:baz task and its prerequisites.');\ntask('invokeFooBaz', {async: true}, function () {\n var t = jake.Task['foo:baz'];\n t.addListener('complete', function () {\n console.log('Finished executing foo:baz');\n // Maybe run some other code\n // ...\n // Complete the containing task\n complete();\n });\n // Kick off foo:baz\n t.invo
ke();\n});\n```\n\nIf you want to handle the errors in a task in some specific way, you can set a\nlistener for the 'error' event, like so:\n\n```javascript\nnamespace('vronk', function () {\n task('groo', function () {\n var t = jake.Task['vronk:zong'];\n t.addListener('error', function (e) {\n console.log(e.message);\n });\n t.invoke();\n });\n\n task('zong', function () {\n throw new Error('OMFGZONG');\n });\n});\n```\n\nIf no specific listener is set for the \"error\" event, errors are handled by\nJake's generic error-handling.\n\n### Aborting a task\n\nYou can abort a task by calling the `fail` function, and Jake will abort the\ncurrently running task. You can pass a customized error message to `fail`:\n\n```javascript\ndesc('This task fails.');\ntask('failTask', function () {\n fail('Yikes. Something back happened.');\n});\n```\n\nYou can also pass an optional exit status-code to the fail command, like so:\n\n```javascript\ndesc('This task fails with a
n exit-status of 42.');\ntask('failTaskQuestionCustomStatus', function () {\n fail('What is the answer?', 42);\n});\n```\n\nThe process will exit with a status of 42.\n\nUncaught errors will also abort the currently running task.\n\n### Showing the list of tasks\n\nPassing `jake` the -T or --tasks flag will display the full list of tasks\navailable in a Jakefile, along with their descriptions:\n\n $ jake -T\n jake default # This is the default task.\n jake asdf # This is the asdf task.\n jake concat.txt # File task, concating two files together\n jake failure # Failing task.\n jake lookup # Jake task lookup by name.\n jake foo:bar # This the foo:bar task\n jake foo:fonebone # This the foo:fonebone task\n\nSetting a value for -T/--tasks will filter the list by that value:\n\n $ jake -T foo\n jake foo:bar # This the foo:bar task\n jake foo:fonebone # This the foo:fonebone task\n\nThe list displayed will be
all tasks whose namespace/name contain the filter-string.\n\n## Breaking things up into multiple files\n\nJake will automatically look for files with a .jake extension in a 'jakelib'\ndirectory in your project, and load them (via `require`) after loading your\nJakefile. (The directory name can be overridden using the -J/--jakelibdir\ncommand-line option.)\n\nThis allows you to break your tasks up over multiple files -- a good way to do\nit is one namespace per file: e.g., a `zardoz` namespace full of tasks in\n'jakelib/zardox.jake'.\n\nNote that these .jake files each run in their own module-context, so they don't\nhave access to each others' data. However, the Jake API methods, and the\ntask-hierarchy are globally available, so you can use tasks in any file as\nprerequisites for tasks in any other, just as if everything were in a single\nfile.\n\nEnvironment-variables set on the command-line are likewise also naturally\navailable to code in all files via process.env.\n\n## File-uti
ls\n\nSince shelling out in Node is an asynchronous operation, Jake comes with a few\nuseful file-utilities with a synchronous API, that make scripting easier.\n\nThe `jake.mkdirP` utility recursively creates a set of nested directories. It\nwill not throw an error if any of the directories already exists. Here's an example:\n\n```javascript\njake.mkdirP('app/views/layouts');\n```\n\nThe `jake.cpR` utility does a recursive copy of a file or directory. It takes\ntwo arguments, the file/directory to copy, and the destination. Note that this\ncommand can only copy files and directories; it does not perform globbing (so\narguments like '*.txt' are not possible).\n\n```javascript\njake.cpR(path.join(sourceDir, '/templates'), currentDir);\n```\n\nThis would copy 'templates' (and all its contents) into `currentDir`.\n\nThe `jake.readdirR` utility gives you a recursive directory listing, giving you\noutput somewhat similar to the Unix `find` command. It only works with a\ndirectory name, an
d does not perform filtering or globbing.\n\n```javascript\njake.readdirR('pkg');\n```\n\nThis would return an array of filepaths for all files in the 'pkg' directory,\nand all its subdirectories.\n\nThe `jake.rmRf` utility recursively removes a directory and all its contents.\n\n```javascript\njake.rmRf('pkg');\n```\n\nThis would remove the 'pkg' directory, and all its contents.\n\n## Running shell-commands: `jake.exec` and `jake.createExec`\n\nJake also provides a more general utility function for running a sequence of\nshell-commands.\n\n### `jake.exec`\n\nThe `jake.exec` command takes an array of shell-command strings, and an optional\ncallback to run after completing them. Here's an example from Jake's Jakefile,\nthat runs the tests:\n\n```javascript\ndesc('Runs the Jake tests.');\ntask('test', {async: true}, function () {\n var cmds = [\n 'node ./tests/parseargs.js'\n , 'node ./tests/task_base.js'\n , 'node ./tests/file_task.js'\n ];\n jake.exec(cmds, {printStdout: tru
e}, function () {\n console.log('All tests passed.');\n complete();\n });\n\ndesc('Runs some apps in interactive mode.');\ntask('interactiveTask', {async: true}, function () {\n var cmds = [\n 'node' // Node conosle\n , 'vim' // Open Vim\n ];\n jake.exec(cmds, {interactive: true}, function () {\n complete();\n });\n});\n```\n\nIt also takes an optional options-object, with the following options:\n\n * `interactive` (tasks are interactive, trumps printStdout and\n printStderr below, default false)\n\n * `printStdout` (print to stdout, default false)\n\n * `printStderr` (print to stderr, default false)\n\n * `breakOnError` (stop execution on error, default true)\n\nThis command doesn't pipe input between commands -- it's for simple execution.\n\n### `jake.createExec` and the evented Exec object\n\nJake also provides an evented interface for running shell commands. Calling\n`jake.createExec` returns an instance of `jake.Exec`, which is an `EventEmitter`\nthat fires
events as it executes commands.\n\nIt emits the following events:\n\n* 'cmdStart': When a new command begins to run. Passes one arg, the command\nbeing run.\n\n* 'cmdEnd': When a command finishes. Passes one arg, the command\nbeing run.\n\n* 'stdout': When the stdout for the child-process recieves data. This streams\nthe stdout data. Passes one arg, the chunk of data.\n\n* 'stderr': When the stderr for the child-process recieves data. This streams\nthe stderr data. Passes one arg, the chunk of data.\n\n* 'error': When a shell-command exits with a non-zero status-code. Passes two\nargs -- the error message, and the status code. If you do not set an error\nhandler, and a command exits with an error-code, Jake will throw the unhandled\nerror. If `breakOnError` is set to true, the Exec object will emit and 'error'\nevent after the first error, and stop any further execution.\n\nTo begin running the commands, you have to call the `run` method on it. It also\nhas an `append` method for a
dding new commands to the list of commands to run.\n\nHere's an example:\n\n```javascript\nvar ex = jake.createExec(['do_thing.sh'], {printStdout: true});\nex.addListener('error', function (msg, code) {\n if (code == 127) {\n console.log(\"Couldn't find do_thing script, trying do_other_thing\");\n ex.append('do_other_thing.sh');\n }\n else {\n fail('Fatal error: ' + msg, code);\n }\n});\nex.run();\n```\n\nUsing the evented Exec object gives you a lot more flexibility in running shell\ncommmands. But if you need something more sophisticated, Procstreams\n(<https://github.com/polotek/procstreams>) might be a good option.\n\n## Logging and output\n\nUsing the -q/--quiet flag at the command-line will stop Jake from sending its\nnormal output to standard output. Note that this only applies to built-in output\nfrom Jake; anything you output normally from your tasks will still be displayed.\n\nIf you want to take advantage of the -q/--quiet flag in your own programs, you\ncan
use `jake.logger.log` and `jake.logger.error` for displaying output. These\ntwo commands will respect the flag, and suppress output correctly when the\nquiet-flag is on.\n\nYou can check the current value of this flag in your own tasks by using\n`jake.program.opts.quiet`. If you want the output of a `jake.exec` shell-command\nto respect the quiet-flag, set your `printStdout` and `printStderr` options to\nfalse if the quiet-option is on:\n\n```javascript\ntask('echo', {async: true}, function () {\n jake.exec(['echo \"hello\"'], function () {\n jake.logger.log('Done.');\n complete();\n }, {printStdout: !jake.program.opts.quiet});\n});\n```\n\n## PackageTask\n\nInstantiating a PackageTask programmically creates a set of tasks for packaging\nup your project for distribution. Here's an example:\n\n```javascript\nvar t = new jake.PackageTask('fonebone', 'v0.1.2112', function () {\n var fileList = [\n 'Jakefile'\n , 'README.md'\n , 'package.json'\n , 'lib/*'\n , 'bin/*'\n
, 'tests/*'\n ];\n this.packageFiles.include(fileList);\n this.needTarGz = true;\n this.needTarBz2 = true;\n});\n```\n\nThis will automatically create a 'package' task that will assemble the specified\nfiles in 'pkg/fonebone-v0.1.2112,' and compress them according to the specified\noptions. After running `jake package`, you'll have the following in pkg/:\n\n fonebone-v0.1.2112\n fonebone-v0.1.2112.tar.bz2\n fonebone-v0.1.2112.tar.gz\n\nPackageTask also creates a 'clobber' task that removes the pkg/\ndirectory.\n\nThe [PackageTask API\ndocs](http://mde.github.com/jake/doc/symbols/jake.PackageTask.html) include a\nlot more information, including different archiving options.\n\n### FileList\n\nJake's FileList takes a list of glob-patterns and file-names, and lazy-creates a\nlist of files to include. Instead of immediately searching the filesystem to\nfind the files, a FileList holds the pattern until it is actually used.\n\nWhen any of the normal JavaScript Array methods (
or the `toArray` method) are\ncalled on the FileList, the pending patterns are resolved into an actual list of\nfile-names. FileList uses the [minimatch](https://github.com/isaacs/minimatch) module.\n\nTo build the list of files, use FileList's `include` and `exclude` methods:\n\n```javascript\nvar list = new jake.FileList();\nlist.include('foo/*.txt');\nlist.include(['bar/*.txt', 'README.md']);\nlist.include('Makefile', 'package.json');\nlist.exclude('foo/zoobie.txt');\nlist.exclude(/foo\\/src.*.txt/);\nconsole.log(list.toArray());\n```\n\nThe `include` method can be called either with an array of items, or multiple\nsingle parameters. Items can be either glob-patterns, or individual file-names.\n\nThe `exclude` method will prevent files from being included in the list. These\nfiles must resolve to actual files on the filesystem. It can be called either\nwith an array of items, or mutliple single parameters. Items can be\nglob-patterns, individual file-names, string-representations
of\nregular-expressions, or regular-expression literals.\n\n## TestTask\n\nInstantiating a TestTask programmically creates a simple task for running tests\nfor your project. The first argument of the constructor is the project-name\n(used in the description of the task), and the second argument is a function\nthat defines the task. It allows you to specifify what files to run as tests,\nand what to name the task that gets created (defaults to \"test\" if unset).\n\n```javascript\nvar t = new jake.TestTask('fonebone', function () {\n var fileList = [\n 'tests/*'\n , 'lib/adapters/**/test.js'\n ];\n this.testFiles.include(fileList);\n this.testFiles.exclude('tests/helper.js');\n this.testName = 'testMainAndAdapters';\n});\n```\n\nTests in the specified file should be in the very simple format of\ntest-functions hung off the export. These tests are converted into Jake tasks\nwhich Jake then runs normally.\n\nIf a test needs to run asynchronously, simply define the test-functi
on with a\nsingle argument, a callback. Jake will define this as an asynchronous task, and\nwill wait until the callback is called in the test function to run the next test.\n\nHere's an example test-file:\n\n```javascript\nvar assert = require('assert')\n , tests;\n\ntests = {\n 'sync test': function () {\n // Assert something\n assert.ok(true);\n }\n, 'async test': function (next) {\n // Assert something else\n assert.ok(true);\n // Won't go next until this is called\n next();\n }\n, 'another sync test': function () {\n // Assert something else\n assert.ok(true);\n }\n};\n\nmodule.exports = tests;\n```\n\nJake's tests are also a good example of use of a TestTask.\n\n## NpmPublishTask\n\nThe NpmPublishTask builds on top of PackageTask to allow you to do a version\nbump of your project, package it, and publish it to NPM. Define the task with\nyour project's name, and the list of files you want packaged and published to\nNPM.\n\nHere's an example from Jak
e's Jakefile:\n\n```javascript\nvar p = new jake.NpmPublishTask('jake', [\n 'Makefile'\n, 'Jakefile'\n, 'README.md'\n, 'package.json'\n, 'lib/*'\n, 'bin/*'\n, 'tests/*'\n]);\n```\n\nThe NpmPublishTask will automatically create a `publish` task which performs the\nfollowing steps:\n\n1. Bump the version number in your package.json\n2. Commit change in git, push it to GitHub\n3. Create a git tag for the version\n4. Push the tag to GitHub\n5. Package the new version of your project\n6. Publish it to NPM\n7. Clean up the package\n\n## CoffeeScript Jakefiles\n\nJake can also handle Jakefiles in CoffeeScript. Be sure to make it\nJakefile.coffee so Jake knows it's in CoffeeScript.\n\nHere's an example:\n\n```coffeescript\nutil = require('util')\n\ndesc 'This is the default task.'\ntask 'default', (params) ->\n console.log 'Ths is the default task.'\n console.log(util.inspect(arguments))\n jake.Task['new'].invoke []\n\ntask 'new', ->\n console.log 'ello from new'\n jake.Task['foo:next
'].invoke ['param']\n\nnamespace 'foo', ->\n task 'next', (param) ->\n console.log 'ello from next with param: ' + param\n```\n\n## Related projects\n\nJames Coglan's \"Jake\": <http://github.com/jcoglan/jake>\n\nConfusingly, this is a Ruby tool for building JavaScript packages from source code.\n\n280 North's Jake: <http://github.com/280north/jake>\n\nThis is also a JavaScript port of Rake, which runs on the Narwhal platform.\n\n### License\n\nLicensed under the Apache License, Version 2.0\n(<http://www.apache.org/licenses/LICENSE-2.0>)\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/mde/jake/issues"
+ },
+ "_id": "jake@0.5.16",
+ "_from": "jake@*"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/test/Jakefile
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/test/Jakefile b/blackberry10/node_modules/jake/test/Jakefile
new file mode 100644
index 0000000..7e49ab2
--- /dev/null
+++ b/blackberry10/node_modules/jake/test/Jakefile
@@ -0,0 +1,214 @@
+var exec = require('child_process').exec
+ , fs = require('fs');
+
+desc('The default task.');
+task('default', function () {
+ console.log('default task');
+});
+
+desc('No action.');
+task({'noAction': ['default']});
+
+desc('No action, no prereqs.');
+task('noActionNoPrereqs');
+
+desc('Accepts args and env vars.');
+task('argsEnvVars', function () {
+ var res = {
+ args: arguments
+ , env: {
+ foo: process.env.foo
+ , baz: process.env.baz
+ }
+ };
+ console.log(JSON.stringify(res));
+});
+
+namespace('foo', function () {
+ desc('The foo:bar task.');
+ task('bar', function () {
+ if (arguments.length) {
+ console.log('foo:bar[' +
+ Array.prototype.join.call(arguments, ',') +
+ '] task');
+ }
+ else {
+ console.log('foo:bar task');
+ }
+ });
+
+ desc('The foo:baz task, calls foo:bar as a prerequisite.');
+ task('baz', ['foo:bar'], function () {
+ console.log('foo:baz task');
+ });
+
+ desc('The foo:qux task, calls foo:bar with cmdline args as a prerequisite.');
+ task('qux', ['foo:bar[asdf,qwer]'], function () {
+ console.log('foo:qux task');
+ });
+
+ desc('The foo:frang task, calls foo:bar with passed args as a prerequisite.');
+ task('frang', function () {
+ var task = jake.Task['foo:bar'];
+ // Do args pass-through
+ task.invoke.apply(task, arguments);
+ console.log('foo:frang task');
+ });
+
+ desc('The foo:zoobie task, has no prerequisites.');
+ task('zoobie', function () {
+ console.log('foo:zoobie task');
+ });
+
+ desc('The foo:voom task, has no prerequisites.');
+ task('voom', function () {
+ console.log('foo:voom task');
+ });
+
+ desc('The foo:asdf task, has the same prereq twice.');
+ task('asdf', ['foo:bar', 'foo:baz'], function () {
+ console.log('foo:asdf task');
+ });
+
+});
+
+namespace('bar', function () {
+ desc('The bar:foo task, has no prerequisites, is async.');
+ task('foo', function () {
+ console.log('bar:foo task');
+ complete();
+ }, {async: true});
+
+ desc('The bar:bar task, has the async bar:foo task as a prerequisite.');
+ task('bar', ['bar:foo'], function () {
+ console.log('bar:bar task');
+ });
+
+});
+
+namespace('hoge', function () {
+ desc('The hoge:hoge task, has no prerequisites.');
+ task('hoge', function () {
+ console.log('hoge:hoge task');
+ });
+
+ desc('The hoge:piyo task, has no prerequisites.');
+ task('piyo', function () {
+ console.log('hoge:piyo task');
+ });
+
+ desc('The hoge:fuga task, has hoge:hoge and hoge:piyo as prerequisites.');
+ task('fuga', ['hoge:hoge', 'hoge:piyo'], function () {
+ console.log('hoge:fuga task');
+ });
+
+ desc('The hoge:charan task, has hoge:fuga as a prerequisite.');
+ task('charan', ['hoge:fuga'], function () {
+ console.log('hoge:charan task');
+ });
+
+ desc('The hoge:gero task, has hoge:fuga as a prerequisite.');
+ task('gero', ['hoge:fuga'], function () {
+ console.log('hoge:gero task');
+ });
+
+ desc('The hoge:kira task, has hoge:charan and hoge:gero as prerequisites.');
+ task('kira', ['hoge:charan', 'hoge:gero'], function () {
+ console.log('hoge:kira task');
+ });
+
+});
+
+namespace('fileTest', function () {
+ directory('foo');
+
+ desc('File task, concatenating two files together');
+ file({'foo/concat.txt': ['fileTest:foo', 'fileTest:foo/src1.txt', 'fileTest:foo/src2.txt']}, function () {
+ console.log('fileTest:foo/concat.txt task');
+ var data1 = fs.readFileSync('foo/src1.txt');
+ var data2 = fs.readFileSync('foo/src2.txt');
+ fs.writeFileSync('foo/concat.txt', data1 + data2);
+ });
+
+ desc('File task, async creation with child_process.exec');
+ file('foo/src1.txt', function () {
+ fs.writeFile('foo/src1.txt', 'src1', function (err) {
+ if (err) {
+ throw err;
+ }
+ console.log('fileTest:foo/src1.txt task');
+ complete();
+ });
+ }, {async: true});
+
+ desc('File task, sync creation with writeFileSync');
+ file('foo/src2.txt', ['default'], function () {
+ fs.writeFileSync('foo/src2.txt', 'src2');
+ console.log('fileTest:foo/src2.txt task');
+ });
+
+ desc('File task, do not run unless the prereq file changes');
+ file('foo/from-src1.txt', ['fileTest:foo', 'fileTest:foo/src1.txt'], function () {
+ var data = fs.readFileSync('foo/src1.txt');
+ fs.writeFileSync('foo/from-src1.txt', data);
+ console.log('fileTest:foo/from-src1.txt task');
+ }, {async: true});
+
+ desc('File task, run if the prereq file changes');
+ task('touch-prereq', function() {
+ fs.writeFileSync('foo/prereq.txt', 'UPDATED');
+ })
+
+ desc('File task, has a preexisting file (with no associated task) as a prereq');
+ file('foo/from-prereq.txt', ['fileTest:foo', 'foo/prereq.txt'], function () {
+ var data = fs.readFileSync('foo/prereq.txt');
+ fs.writeFileSync('foo/from-prereq.txt', data);
+ console.log('fileTest:foo/from-prereq.txt task');
+ });
+
+ directory('foo/bar/baz');
+
+ desc('Write a file in a nested subdirectory');
+ file('foo/bar/baz/bamf.txt', ['foo/bar/baz'], function () {
+ fs.writeFileSync('foo/bar/baz/bamf.txt', 'w00t');
+ });
+
+});
+
+task('blammo');
+// Define task
+task('voom', ['blammo'], function () {
+ console.log(this.prereqs.length);
+});
+
+// Modify, add a prereq
+task('voom', ['noActionNoPrereqs']);
+
+namespace('vronk', function () {
+ task('groo', function () {
+ var t = jake.Task['vronk:zong'];
+ t.addListener('error', function (e) {
+ console.log(e.message);
+ });
+ t.invoke();
+ });
+ task('zong', function () {
+ throw new Error('OMFGZONG');
+ });
+});
+
+// define namespace
+namespace('one', function() {
+ task('one', function() {
+ console.log('one:one');
+ });
+});
+
+// modify namespace (add task)
+namespace('one', function() {
+ task('two', ['one:one'], function() {
+ console.log('one:two');
+ });
+});
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/test/exec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/test/exec.js b/blackberry10/node_modules/jake/test/exec.js
new file mode 100644
index 0000000..0dec945
--- /dev/null
+++ b/blackberry10/node_modules/jake/test/exec.js
@@ -0,0 +1,113 @@
+var assert = require('assert')
+ , h = require('./helpers')
+ , jake = {}
+ , utils = require('../lib/utils');
+
+utils.mixin(jake, utils);
+
+var tests = {
+ 'before': function () {
+ process.chdir('./test');
+ }
+
+, 'after': function () {
+ process.chdir('../');
+ }
+
+, 'test basic exec': function (next) {
+ var ex = jake.createExec('ls', function () {})
+ , evts = { // Events should fire in this order
+ cmdStart: [0, null]
+ , stdout: [1, null]
+ , cmdEnd: [2, null]
+ , end: [3, null]
+ }
+ , incr = 0; // Increment with each event to check order
+ assert.ok(ex instanceof jake.Exec);
+ // Make sure basic events fire and fire in the right order
+ for (var p in evts) {
+ (function (p) {
+ ex.addListener(p, function () {
+ evts[p][1] = incr;
+ incr++;
+ });
+ })(p);
+ }
+ ex.run();
+ ex.addListener('end', function () {
+ for (var p in evts) {
+ assert.equal(evts[p][0], evts[p][1]);
+ }
+ next();
+ });
+
+ }
+
+, 'test an exec failure': function (next) {
+ var ex = jake.createExec('false', function () {});
+ ex.addListener('error', function (msg, code) {
+ assert.equal(1, code);
+ next();
+ });
+ ex.run();
+ }
+
+, 'test exec stdout events': function (next) {
+ var ex = jake.createExec('echo "foo"', function () {});
+ ex.addListener('stdout', function (data) {
+ assert.equal("foo", h.trim(data.toString()));
+ next();
+ });
+ ex.run();
+ }
+
+, 'test exec stderr events': function (next) {
+ var ex = jake.createExec('echo "foo" 1>&2', function () {});
+ ex.addListener('stderr', function (data) {
+ assert.equal("foo", h.trim(data.toString()));
+ next();
+ });
+ ex.run();
+ }
+
+, 'test piping results into next command': function (next) {
+ var ex = jake.createExec('ls', function () {})
+ , data
+ , appended = false;
+
+ ex.addListener('stdout', function (d) {
+ data += h.trim(d.toString());
+ });
+
+ // After the first command ends, get the accumulated result,
+ // and use it to build a new command to append to the queue.
+ // Grep through the result for files that end in .js
+ ex.addListener('cmdEnd', function () {
+ // Only append after the first cmd, avoid infinite loop
+ if (appended) {
+ return;
+ }
+ appended = true;
+ // Take the original output and build the new command
+ ex.append('echo "' + data + '" | grep "\\.js$"');
+ // Clear out data
+ data = '';
+ });
+
+ // And the end, the stdout data has been cleared once, and the new
+ // data should be the result of the second command
+ ex.addListener('end', function () {
+ // Should be a list of files ending in .js
+ data = data.split('\n');
+ data.forEach(function (d) {
+ assert.ok(/\.js$/.test(d));
+ });
+ next();
+ });
+ ex.run();
+ }
+
+};
+
+module.exports = tests;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/test/file_task.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/test/file_task.js b/blackberry10/node_modules/jake/test/file_task.js
new file mode 100644
index 0000000..f279100
--- /dev/null
+++ b/blackberry10/node_modules/jake/test/file_task.js
@@ -0,0 +1,123 @@
+var assert = require('assert')
+ , fs = require('fs')
+ , path = require('path')
+ , exec = require('child_process').exec
+ , h = require('./helpers');
+
+var cleanUpAndNext = function (callback) {
+ exec('rm -fr ./foo', function (err, stdout, stderr) {
+ if (err) { throw err }
+ if (stderr || stdout) {
+ console.log (stderr || stdout);
+ }
+ callback();
+ });
+};
+
+var tests = {
+
+ 'before': function (next) {
+ process.chdir('./test');
+ cleanUpAndNext(next);
+ }
+
+, 'after': function () {
+ process.chdir('../');
+ }
+
+, 'test concating two files': function (next) {
+ h.exec('../bin/cli.js fileTest:foo/concat.txt', function (out) {
+ var data;
+ assert.equal('fileTest:foo/src1.txt task\ndefault task\nfileTest:foo/src2.txt task\n' +
+ 'fileTest:foo/concat.txt task', out);
+ // Check to see the two files got concat'd
+ data = fs.readFileSync(process.cwd() + '/foo/concat.txt');
+ assert.equal('src1src2', data.toString());
+ cleanUpAndNext(next);
+ });
+ }
+
+, 'test where a file-task prereq does not change': function (next) {
+ h.exec('../bin/cli.js fileTest:foo/from-src1.txt', function (out) {
+ assert.equal('fileTest:foo/src1.txt task\nfileTest:foo/from-src1.txt task', out);
+ h.exec('../bin/cli.js fileTest:foo/from-src1.txt', function (out) {
+ // Second time should be a no-op
+ assert.equal('', out);
+ next(); // Don't clean up
+ });
+ });
+ }
+
+, 'file-task where prereq file is modified': function (next) {
+ setTimeout(function () {
+ exec('touch ./foo/src1.txt', function (err, data) {
+ if (err) {
+ throw err;
+ }
+ h.exec('../bin/cli.js fileTest:foo/from-src1.txt', function (out) {
+ assert.equal('fileTest:foo/from-src1.txt task', out);
+ cleanUpAndNext(next);
+ });
+ });
+ }, 1000); // Wait to do the touch to ensure mod-time is different
+ }
+
+, 'test where a file-task prereq does not change with --always-make': function (next) {
+ h.exec('../bin/cli.js fileTest:foo/from-src1.txt', function (out) {
+ assert.equal('fileTest:foo/src1.txt task\nfileTest:foo/from-src1.txt task',
+ out);
+ h.exec('../bin/cli.js -B fileTest:foo/from-src1.txt', function (out) {
+ assert.equal('fileTest:foo/src1.txt task\nfileTest:foo/from-src1.txt task',
+ out);
+ cleanUpAndNext(next);
+ });
+ });
+ }
+
+, 'test a preexisting file': function (next) {
+ var prereqData = 'howdy';
+ h.exec('mkdir -p foo', function (out) {
+ fs.writeFileSync('foo/prereq.txt', prereqData);
+ h.exec('../bin/cli.js fileTest:foo/from-prereq.txt', function (out) {
+ var data;
+ assert.equal('fileTest:foo/from-prereq.txt task', out);
+ data = fs.readFileSync(process.cwd() + '/foo/from-prereq.txt');
+ assert.equal(prereqData, data.toString());
+ h.exec('../bin/cli.js fileTest:foo/from-prereq.txt', function (out) {
+ // Second time should be a no-op
+ assert.equal('', out);
+ cleanUpAndNext(next);
+ });
+ });
+ });
+ }
+
+, 'test a preexisting file with --always-make flag': function (next) {
+ var prereqData = 'howdy';
+ h.exec('mkdir -p foo', function (out) {
+ fs.writeFileSync('foo/prereq.txt', prereqData);
+ h.exec('../bin/cli.js fileTest:foo/from-prereq.txt', function (out) {
+ var data;
+ assert.equal('fileTest:foo/from-prereq.txt task', out);
+ data = fs.readFileSync(process.cwd() + '/foo/from-prereq.txt');
+ assert.equal(prereqData, data.toString());
+ h.exec('../bin/cli.js -B fileTest:foo/from-prereq.txt', function (out) {
+ assert.equal('fileTest:foo/from-prereq.txt task', out);
+ cleanUpAndNext(next);
+ });
+ });
+ });
+ }
+
+, 'test nested directory-task': function (next) {
+ h.exec('../bin/cli.js fileTest:foo/bar/baz/bamf.txt', function (out) {
+ data = fs.readFileSync(process.cwd() + '/foo/bar/baz/bamf.txt');
+ assert.equal('w00t', data);
+ cleanUpAndNext(next);
+ });
+ }
+
+};
+
+module.exports = tests;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/test/foo.html
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/test/foo.html b/blackberry10/node_modules/jake/test/foo.html
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/test/foo.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/test/foo.txt b/blackberry10/node_modules/jake/test/foo.txt
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/test/helpers.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/test/helpers.js b/blackberry10/node_modules/jake/test/helpers.js
new file mode 100644
index 0000000..34e540e
--- /dev/null
+++ b/blackberry10/node_modules/jake/test/helpers.js
@@ -0,0 +1,59 @@
+var exec = require('child_process').exec;
+
+var helpers = new (function () {
+ var _tests
+ , _names = []
+ , _name
+ , _callback
+ , _runner = function () {
+ if (!!(_name = _names.shift())) {
+ console.log('Running ' + _name);
+ _tests[_name]();
+ }
+ else {
+ _callback();
+ }
+ };
+
+ this.exec = function (cmd, callback) {
+ cmd += ' --trace';
+ exec(cmd, function (err, stdout, stderr) {
+ var out = helpers.trim(stdout);
+ if (err) {
+ throw err;
+ }
+ if (stderr) {
+ callback(stderr);
+ }
+ else {
+ callback(out);
+ }
+ });
+ };
+
+ this.trim = function (s) {
+ var str = s || '';
+ return str.replace(/^\s*|\s*$/g, '');
+ };
+
+ this.parse = function (s) {
+ var str = s || '';
+ str = helpers.trim(str);
+ str = str.replace(/'/g, '"');
+ return JSON.parse(str);
+ };
+
+ this.run = function (tests, callback) {
+ _tests = tests;
+ _names = Object.keys(tests);
+ _callback = callback;
+ _runner();
+ };
+
+ this.next = function () {
+ _runner();
+ };
+
+})();
+
+module.exports = helpers;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/test/namespace.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/test/namespace.js b/blackberry10/node_modules/jake/test/namespace.js
new file mode 100644
index 0000000..d255d4e
--- /dev/null
+++ b/blackberry10/node_modules/jake/test/namespace.js
@@ -0,0 +1,27 @@
+var assert = require('assert')
+ , h = require('./helpers')
+ , jake = {}
+ , utils = require('../lib/utils');
+
+utils.mixin(jake, utils);
+
+var tests = {
+ 'before': function() {
+ process.chdir('./test');
+ }
+
+, 'after': function() {
+ process.chdir('../');
+ }
+
+, 'test modifying a namespace by adding a new task': function(next) {
+ h.exec('../bin/cli.js one:two', function(out) {
+ assert.equal('one:one\none:two', out);
+ next();
+ });
+ }
+
+};
+
+module.exports = tests;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/test/parseargs.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/test/parseargs.js b/blackberry10/node_modules/jake/test/parseargs.js
new file mode 100644
index 0000000..5997d07
--- /dev/null
+++ b/blackberry10/node_modules/jake/test/parseargs.js
@@ -0,0 +1,150 @@
+var parseargs = require('../lib/parseargs')
+ , assert = require('assert')
+ , optsReg = [
+ { full: 'directory'
+ , abbr: 'C'
+ , preempts: false
+ , expectValue: true
+ }
+ , { full: 'jakefile'
+ , abbr: 'f'
+ , preempts: false
+ , expectValue: true
+ }
+ , { full: 'tasks'
+ , abbr: 'T'
+ , preempts: true
+ }
+ , { full: 'tasks'
+ , abbr: 'ls'
+ , preempts: true
+ }
+ , { full: 'trace'
+ , abbr: 't'
+ , preempts: false
+ , expectValue: false
+ }
+ , { full: 'help'
+ , abbr: 'h'
+ , preempts: true
+ }
+ , { full: 'version'
+ , abbr: 'V'
+ , preempts: true
+ }
+ ]
+ , p = new parseargs.Parser(optsReg)
+ , z = function (s) { return s.split(' '); }
+ , res;
+
+var tests = {
+
+ 'test long preemptive opt and val with equal-sign, ignore further opts': function () {
+ res = p.parse(z('--tasks=foo --jakefile=asdf'));
+ assert.equal('foo', res.opts.tasks);
+ assert.equal(undefined, res.opts.jakefile);
+ }
+
+, 'test long preemptive opt and val without equal-sign, ignore further opts': function () {
+ res = p.parse(z('--tasks foo --jakefile=asdf'));
+ assert.equal('foo', res.opts.tasks);
+ assert.equal(undefined, res.opts.jakefile);
+ }
+
+, 'test long preemptive opt and no val, ignore further opts': function () {
+ res = p.parse(z('--tasks --jakefile=asdf'));
+ assert.equal(true, res.opts.tasks);
+ assert.equal(undefined, res.opts.jakefile);
+ }
+
+, 'test preemptive opt with no val, should be true': function () {
+ res = p.parse(z('-T'));
+ assert.equal(true, res.opts.tasks);
+ }
+
+, 'test preemptive opt with no val, should be true and ignore further opts': function () {
+ res = p.parse(z('-T -f'));
+ assert.equal(true, res.opts.tasks);
+ assert.equal(undefined, res.opts.jakefile);
+ }
+
+, 'test preemptive opt with val, should be val': function () {
+ res = p.parse(z('-T zoobie -f foo/bar/baz'));
+ assert.equal('zoobie', res.opts.tasks);
+ assert.equal(undefined, res.opts.jakefile);
+ }
+
+, 'test -f expects a value, -t does not (howdy is task-name)': function () {
+ res = p.parse(z('-f zoobie -t howdy'));
+ assert.equal('zoobie', res.opts.jakefile);
+ assert.equal(true, res.opts.trace);
+ assert.equal('howdy', res.taskNames[0]);
+ }
+
+, 'test different order, -f expects a value, -t does not (howdy is task-name)': function () {
+ res = p.parse(z('-f zoobie howdy -t'));
+ assert.equal('zoobie', res.opts.jakefile);
+ assert.equal(true, res.opts.trace);
+ assert.equal('howdy', res.taskNames[0]);
+ }
+
+, 'test -f expects a value, -t does not (foo=bar is env var)': function () {
+ res = p.parse(z('-f zoobie -t foo=bar'));
+ assert.equal('zoobie', res.opts.jakefile);
+ assert.equal(true, res.opts.trace);
+ assert.equal('bar', res.envVars.foo);
+ assert.equal(undefined, res.taskName);
+ }
+
+, 'test -f expects a value, -t does not (foo=bar is env-var, task-name follows)': function () {
+ res = p.parse(z('-f zoobie -t howdy foo=bar'));
+ assert.equal('zoobie', res.opts.jakefile);
+ assert.equal(true, res.opts.trace);
+ assert.equal('bar', res.envVars.foo);
+ assert.equal('howdy', res.taskNames[0]);
+ }
+
+, 'test -t does not expect a value, -f does (throw howdy away)': function () {
+ res = p.parse(z('-t howdy -f zoobie'));
+ assert.equal(true, res.opts.trace);
+ assert.equal('zoobie', res.opts.jakefile);
+ assert.equal(undefined, res.taskName);
+
+ }
+
+, 'test --trace does not expect a value, -f does (throw howdy away)': function () {
+ res = p.parse(z('--trace howdy --jakefile zoobie'));
+ assert.equal(true, res.opts.trace);
+ assert.equal('zoobie', res.opts.jakefile);
+ assert.equal(undefined, res.taskName);
+ }
+
+, 'test --trace does not expect a value, -f does (throw howdy away)': function () {
+ res = p.parse(z('--trace=howdy --jakefile=zoobie'));
+ assert.equal(true, res.opts.trace);
+ assert.equal('zoobie', res.opts.jakefile);
+ assert.equal(undefined, res.taskName);
+ }
+
+/*
+, 'test task-name with positional args': function () {
+ res = p.parse(z('foo:bar[asdf,qwer]'));
+ assert.equal('asdf', p.taskArgs[0]);
+ assert.equal('qwer', p.taskArgs[1]);
+ }
+
+, 'test opts, env vars, task-name with positional args': function () {
+ res = p.parse(z('-f ./tests/Jakefile -t default[asdf,qwer] foo=bar'));
+ assert.equal('./tests/Jakefile', res.opts.jakefile);
+ assert.equal(true, res.opts.trace);
+ assert.equal('bar', res.envVars.foo);
+ assert.equal('default', res.taskName);
+ assert.equal('asdf', p.taskArgs[0]);
+ assert.equal('qwer', p.taskArgs[1]);
+ }
+*/
+
+};
+
+module.exports = tests;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/test/task_base.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/test/task_base.js b/blackberry10/node_modules/jake/test/task_base.js
new file mode 100644
index 0000000..7d4269e
--- /dev/null
+++ b/blackberry10/node_modules/jake/test/task_base.js
@@ -0,0 +1,137 @@
+var assert = require('assert')
+ , h = require('./helpers');
+
+var tests = {
+
+ 'before': function () {
+ process.chdir('./test');
+ }
+
+, 'after': function () {
+ process.chdir('../');
+ }
+
+, 'test default task': function (next) {
+ h.exec('../bin/cli.js', function (out) {
+ assert.equal('default task', out);
+ h.exec('../bin/cli.js default', function (out) {
+ assert.equal('default task', out);
+ next();
+ });
+ });
+ }
+
+, 'test task with no action': function (next) {
+ h.exec('../bin/cli.js noAction', function (out) {
+ assert.equal('default task', out);
+ next();
+ });
+ }
+
+, 'test a task with no action and no prereqs': function (next) {
+ h.exec('../bin/cli.js noActionNoPrereqs', function () {
+ next();
+ });
+ }
+
+, 'test passing args to a task': function (next) {
+ h.exec('../bin/cli.js argsEnvVars[foo,bar]', function (out) {
+ var parsed = h.parse(out)
+ , args = parsed.args;
+ assert.equal(args[0], 'foo');
+ assert.equal(args[1], 'bar');
+ next();
+ });
+ }
+
+, 'test a task with environment vars': function (next) {
+ h.exec('../bin/cli.js argsEnvVars foo=bar baz=qux', function (out) {
+ var parsed = h.parse(out)
+ , env = parsed.env;
+ assert.equal(env.foo, 'bar');
+ assert.equal(env.baz, 'qux');
+ next();
+ });
+ }
+
+, 'test passing args and using environment vars': function (next) {
+ h.exec('../bin/cli.js argsEnvVars[foo,bar] foo=bar baz=qux', function (out) {
+ var parsed = h.parse(out)
+ , args = parsed.args
+ , env = parsed.env;
+ assert.equal(args[0], 'foo');
+ assert.equal(args[1], 'bar');
+ assert.equal(env.foo, 'bar');
+ assert.equal(env.baz, 'qux');
+ next();
+ });
+ }
+
+, 'test a simple prereq': function (next) {
+ h.exec('../bin/cli.js foo:baz', function (out) {
+ assert.equal('foo:bar task\nfoo:baz task', out);
+ next();
+ });
+ }
+
+, 'test a duplicate prereq only runs once': function (next) {
+ h.exec('../bin/cli.js foo:asdf', function (out) {
+ assert.equal('foo:bar task\nfoo:baz task\nfoo:asdf task', out);
+ next();
+ });
+ }
+
+, 'test a prereq with command-line args': function (next) {
+ h.exec('../bin/cli.js foo:qux', function (out) {
+ assert.equal('foo:bar[asdf,qwer] task\nfoo:qux task', out);
+ next();
+ });
+ }
+
+, 'test a prereq with args via invoke': function (next) {
+ h.exec('../bin/cli.js foo:frang[zxcv,uiop]', function (out) {
+ assert.equal('foo:bar[zxcv,uiop] task\nfoo:frang task', out);
+ next();
+ });
+ }
+
+, 'test prereq execution-order': function (next) {
+ h.exec('../bin/cli.js hoge:fuga', function (out) {
+ assert.equal('hoge:hoge task\nhoge:piyo task\nhoge:fuga task', out);
+ next();
+ });
+ }
+
+, 'test basic async task': function (next) {
+ h.exec('../bin/cli.js bar:bar', function (out) {
+ assert.equal('bar:foo task\nbar:bar task', out);
+ next();
+ });
+ }
+
+, 'test that current-prereq index gets reset': function (next) {
+ h.exec('../bin/cli.js hoge:kira', function (out) {
+ assert.equal('hoge:hoge task\nhoge:piyo task\nhoge:fuga task\n' +
+ 'hoge:charan task\nhoge:gero task\nhoge:kira task', out);
+ next();
+ });
+ }
+
+, 'test modifying a task by adding prereq during execution': function (next) {
+ h.exec('../bin/cli.js voom', function (out) {
+ assert.equal(2, out);
+ next();
+ });
+ }
+
+, 'test listening for task error-event': function (next) {
+ h.exec('../bin/cli.js vronk:groo', function (out) {
+ assert.equal('OMFGZONG', out);
+ next();
+ });
+ }
+
+};
+
+module.exports = tests;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/.npmignore b/blackberry10/node_modules/jasmine-node/.npmignore
new file mode 100755
index 0000000..ec8ac7f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/.npmignore
@@ -0,0 +1,13 @@
+.DS_Store
+.idea
+*.iml
+*.ipr
+*.iws
+*.tmproj
+.project
+.settings
+.externalToolBuilders
+*.swp
+node_modules
+*~
+/.c9revisions/
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/.travis.yml b/blackberry10/node_modules/jasmine-node/.travis.yml
new file mode 100644
index 0000000..c6eab65
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - 0.6
+branches:
+ only:
+ - travis
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/LICENSE b/blackberry10/node_modules/jasmine-node/LICENSE
new file mode 100755
index 0000000..b6ad6d3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/LICENSE
@@ -0,0 +1,22 @@
+The MIT License
+
+Copyright (c) 2010 Adam Abrons and Misko Hevery http://getangular.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.
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/README.md b/blackberry10/node_modules/jasmine-node/README.md
new file mode 100644
index 0000000..a74f92d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/README.md
@@ -0,0 +1,161 @@
+jasmine-node
+======
+
+[](http://travis-ci.org/spaghetticode/jasmine-node)
+
+This node.js module makes the wonderful Pivotal Lab's jasmine
+(http://github.com/pivotal/jasmine) spec framework available in
+node.js.
+
+jasmine
+-------
+
+Version 1.3.1 of Jasmine is currently included with node-jasmine.
+
+what's new
+----------
+* Ability to test specs written in Literate Coffee-Script
+* Teamcity Reporter reinstated.
+* Ability to specify multiple files to test via list in command line
+* Ability to suppress stack trace with <code>--noStack</code>
+* Async tests now run in the expected context instead of the global one
+* --config flag that allows you to assign variables to process.env
+* Terminal Reporters are now available in the Jasmine Object #184
+* Done is now available in all timeout specs #199
+* <code>afterEach</code> is available in requirejs #179
+* Editors that replace instead of changing files should work with autotest #198
+* Jasmine Mock Clock now works!
+* Autotest now works!
+* Using the latest Jasmine!
+* Verbose mode tabs <code>describe</code> blocks much more accurately!
+* --coffee now allows specs written in Literate CoffeeScript (.litcoffee)
+
+install
+------
+
+To install the latest official version, use NPM:
+
+ npm install jasmine-node -g
+
+To install the latest _bleeding edge_ version, clone this repository and check
+out the `beta` branch.
+
+usage
+------
+
+Write the specifications for your code in \*.js and \*.coffee files in the
+spec/ directory (note: your specification files must end with either
+.spec.js, .spec.coffee or .spec.litcoffee; otherwise jasmine-node won't find them!). You can use sub-directories to better organise your specs.
+
+If you have installed the npm package, you can run it with:
+
+ jasmine-node spec/
+
+If you aren't using npm, you should add `pwd`/lib to the $NODE_PATH
+environment variable, then run:
+
+ node lib/jasmine-node/cli.js
+
+
+You can supply the following arguments:
+
+ * <code>--autotest</code>, provides automatic execution of specs after each change
+ * <code>--coffee</code>, allow execution of .coffee and .litcoffee specs
+ * <code>--color</code>, indicates spec output should uses color to
+indicates passing (green) or failing (red) specs
+ * <code>--noColor</code>, do not use color in the output
+ * <code>-m, --match REGEXP</code>, match only specs comtaining "REGEXPspec"
+ * <code>--matchall</code>, relax requirement of "spec" in spec file names
+ * <code>--verbose</code>, verbose output as the specs are run
+ * <code>--junitreport</code>, export tests results as junitreport xml format
+ * <code>--output FOLDER</code>, defines the output folder for junitreport files
+ * <code>--teamcity</code>, converts all console output to teamcity custom test runner commands. (Normally auto detected.)
+ * <code>--runWithRequireJs</code>, loads all specs using requirejs instead of node's native require method
+ * <code>--requireJsSetup</code>, file run before specs to include and configure RequireJS
+ * <code>--test-dir</code>, the absolute root directory path where tests are located
+ * <code>--nohelpers</code>, does not load helpers
+ * <code>--forceexit</code>, force exit once tests complete
+ * <code>--captureExceptions</code>, listen to global exceptions, report them and exit (interferes with Domains in NodeJs, so do not use if using Domains as well
+ * <code>--config NAME VALUE</code>, set a global variable in process.env
+ * <code>--noStack</code>, suppress the stack trace generated from a test failure
+
+Individual files to test can be added as bare arguments to the end of the args.
+
+Example:
+
+`jasmine-node --coffee spec/AsyncSpec.coffee spec/CoffeeSpec.coffee spec/SampleSpecs.js`
+
+async tests
+-----------
+
+jasmine-node includes an alternate syntax for writing asynchronous tests. Accepting
+a done callback in the specification will trigger jasmine-node to run the test
+asynchronously waiting until the done() callback is called.
+
+```javascript
+ it("should respond with hello world", function(done) {
+ request("http://localhost:3000/hello", function(error, response, body){
+ expect(body).toEqual("hello world");
+ done();
+ });
+ });
+```
+
+An asynchronous test will fail after 5000 ms if done() is not called. This timeout
+can be changed by setting jasmine.DEFAULT_TIMEOUT_INTERVAL or by passing a timeout
+interval in the specification.
+
+ it("should respond with hello world", function(done) {
+ request("http://localhost:3000/hello", function(error, response, body){
+ done();
+ }, 250); // timeout after 250 ms
+ });
+
+Checkout spec/SampleSpecs.js to see how to use it.
+
+requirejs
+---------
+
+There is a sample project in `/spec-requirejs`. It is comprised of:
+
+1. `requirejs-setup.js`, this pulls in our wrapper template (next)
+1. `requirejs-wrapper-template`, this builds up requirejs settings
+1. `requirejs.sut.js`, this is a __SU__bject To __T__est, something required by requirejs
+1. `requirejs.spec.js`, the actual jasmine spec for testing
+
+development
+-----------
+
+Install the dependent packages by running:
+
+ npm install
+
+Run the specs before you send your pull request:
+
+ specs.sh
+
+__Note:__ Some tests are designed to fail in the specs.sh. After each of the
+individual runs completes, there is a line that lists what the expected
+Pass/Assert/Fail count should be. If you add/remove/edit tests, please be sure
+to update this with your PR.
+
+
+changelog
+---------
+
+* _1.7.1 - Removed unneeded fs dependency (thanks to
+ [kevinsawicki](https://github.com/kevinsawicki)) Fixed broken fs call in
+ node 0.6 (thanks to [abe33](https://github.com/abe33))_
+* _1.7.0 - Literate Coffee-Script now testable (thanks to [magicmoose](https://github.com/magicmoose))_
+* _1.6.0 - Teamcity Reporter Reinstated (thanks to [bhcleek](https://github.com/bhcleek))_
+* _1.5.1 - Missing files and require exceptions will now report instead of failing silently_
+* _1.5.0 - Now takes multiple files for execution. (thanks to [abe33](https://github.com/abe33))_
+* _1.4.0 - Optional flag to suppress stack trace on test failure (thanks to [Lastalas](https://github.com/Lastalas))_
+* _1.3.1 - Fixed context for async tests (thanks to [omryn](https://github.com/omryn))_
+* _1.3.0 - Added --config flag for changeable testing environments_
+* _1.2.3 - Fixed #179, #184, #198, #199. Fixes autotest, afterEach in requirejs, terminal reporter is in jasmine object, done function missing in async tests_
+* _1.2.2 - Revert Exception Capturing to avoid Breaking Domain Tests_
+* _1.2.1 - Emergency fix for path reference missing_
+* _1.2.0 - Fixed #149, #152, #171, #181, #195. --autotest now works as expected, jasmine clock now responds to the fake ticking as requested, and removed the path.exists warning_
+* _1.1.1 - Fixed #173, #169 (Blocks were not indented in verbose properly, added more documentation to address #180_
+* _1.1.0 - Updated Jasmine to 1.3.1, fixed fs missing, catching uncaught exceptions, other fixes_
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/bin/jasmine-node
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/bin/jasmine-node b/blackberry10/node_modules/jasmine-node/bin/jasmine-node
new file mode 100755
index 0000000..33d4873
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/bin/jasmine-node
@@ -0,0 +1,6 @@
+#!/usr/bin/env node
+
+if( !process.env.NODE_ENV ) process.env.NODE_ENV = 'test';
+
+var path = require('path');
+require(path.join(__dirname,'../lib/jasmine-node/cli.js'));
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/async-callback.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/async-callback.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/async-callback.js
new file mode 100644
index 0000000..85af5b2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/async-callback.js
@@ -0,0 +1,61 @@
+(function() {
+ var withoutAsync = {};
+
+ ["it", "beforeEach", "afterEach"].forEach(function(jasmineFunction) {
+ withoutAsync[jasmineFunction] = jasmine.Env.prototype[jasmineFunction];
+ return jasmine.Env.prototype[jasmineFunction] = function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ var timeout = null;
+ if (isLastArgumentATimeout(args)) {
+ timeout = args.pop();
+ // The changes to the jasmine test runner causes undef to be passed when
+ // calling all it()'s now. If the last argument isn't a timeout and the
+ // last argument IS undefined, let's just pop it off. Since out of bounds
+ // items are undefined anyways, *hopefully* removing an undef item won't
+ // hurt.
+ } else if (args[args.length-1] == undefined) {
+ args.pop();
+ }
+ if (isLastArgumentAnAsyncSpecFunction(args))
+ {
+ var specFunction = args.pop();
+ args.push(function() {
+ return asyncSpec(specFunction, this, timeout);
+ });
+ }
+ return withoutAsync[jasmineFunction].apply(this, args);
+ };
+ });
+
+ function isLastArgumentATimeout(args)
+ {
+ return args.length > 0 && (typeof args[args.length-1]) === "number";
+ }
+
+ function isLastArgumentAnAsyncSpecFunction(args)
+ {
+ return args.length > 0 && (typeof args[args.length-1]) === "function" && args[args.length-1].length > 0;
+ }
+
+ function asyncSpec(specFunction, spec, timeout) {
+ if (timeout == null) timeout = jasmine.DEFAULT_TIMEOUT_INTERVAL || 1000;
+ var done = false;
+ spec.runs(function() {
+ try {
+ return specFunction.call(spec, function(error) {
+ done = true;
+ if (error != null) return spec.fail(error);
+ });
+ } catch (e) {
+ done = true;
+ throw e;
+ }
+ });
+ return spec.waitsFor(function() {
+ if (done === true) {
+ return true;
+ }
+ }, "spec to complete", timeout);
+ };
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/autotest.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/autotest.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/autotest.js
new file mode 100644
index 0000000..f8e2187
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/autotest.js
@@ -0,0 +1,85 @@
+var walkdir = require('walkdir');
+var collection = require('./spec-collection');
+var path = require('path');
+var fs = require('fs');
+var child_process = require('child_process');
+var gaze = require('gaze');
+var _ = require('underscore');
+
+var baseArgv = [];
+
+for(var i = 0; i < process.argv.length; i++) {
+ if(process.argv[i] !== '--autotest') {
+ baseArgv.push(process.argv[i]);
+ }
+}
+
+var run_external = function(command, args, callback) {
+ var child = child_process.spawn(command, args);
+ child.stdout.on('data', function(data) {
+ process.stdout.write(data);
+ });
+ child.stderr.on('data', function(data) {
+ process.stderr.write(data);
+ });
+ if(typeof callback == 'function') {
+ child.on('exit', callback);
+ }
+}
+
+var run_everything = function() {
+ // run the suite when it starts
+ var argv = [].concat(baseArgv);
+ run_external(argv.shift(), argv);
+}
+
+var last_run_succesful = true;
+
+exports.start = function(loadpaths, pattern) {
+
+ loadpaths.forEach(function(loadpath){
+
+ // If loadpath is just a single file, we should just watch that file
+ stats = fs.statSync(loadpath);
+ if (stats.isFile()) {
+ console.log(loadpath);
+ pattern = loadpath;
+ }
+
+ changedFunc = function(event, file) {
+ console.log(file + ' was changed');
+
+ var match = path.basename(file, path.extname(file)) + ".*";
+ match = match.replace(new RegExp("spec", "i"), "");
+
+ var argv = [].concat(baseArgv, ["--match", match]);
+ run_external(argv.shift(), argv, function(code) {
+ // run everything if we fixed some bugs
+ if(code == 0) {
+ if(!last_run_succesful) {
+ run_everything();
+ }
+ last_run_succesful = true;
+ } else {
+ last_run_succesful = false;
+ }
+ });
+ }
+
+ // Vim seems to change a file multiple times, with non-scientific testing
+ // the only time we didn't duplicate the call to onChanged was at 2.5s
+ // Passing true to have onChanged run on the leading edge of the timeout
+ var onChanged = _.debounce(changedFunc, 2500, true);
+
+ gaze(pattern, function(err, watcher) {
+ // Get all watched files
+ console.log("Watching for changes in " + loadpath);
+
+ // On file changed
+ this.on('all', onChanged);
+ });
+
+ })
+
+ run_everything();
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/cli.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/cli.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/cli.js
new file mode 100755
index 0000000..2e4491e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/cli.js
@@ -0,0 +1,250 @@
+var util,
+ Path= require('path'),
+ fs = require('fs');
+
+var jasmine = require('./index');
+
+
+try {
+ util = require('util')
+} catch(e) {
+ util = require('sys')
+}
+
+var helperCollection = require('./spec-collection');
+
+var specFolders = [];
+
+// The following line keeps the jasmine setTimeout in the proper scope
+jasmine.setTimeout = jasmine.getGlobal().setTimeout;
+jasmine.setInterval = jasmine.getGlobal().setInterval;
+for (var key in jasmine)
+ global[key] = jasmine[key];
+
+var isVerbose = false;
+var showColors = true;
+var teamcity = process.env.TEAMCITY_PROJECT_NAME || false;
+var useRequireJs = false;
+var extentions = "js";
+var match = '.';
+var matchall = false;
+var autotest = false;
+var useHelpers = true;
+var forceExit = false;
+var captureExceptions = false;
+var includeStackTrace = true;
+
+var junitreport = {
+ report: false,
+ savePath : "./reports/",
+ useDotNotation: true,
+ consolidate: true
+}
+
+var args = process.argv.slice(2);
+var existsSync = fs.existsSync || Path.existsSync;
+
+while(args.length) {
+ var arg = args.shift();
+
+ switch(arg)
+ {
+ case '--color':
+ showColors = true;
+ break;
+ case '--noColor':
+ case '--nocolor':
+ showColors = false;
+ break;
+ case '--verbose':
+ isVerbose = true;
+ break;
+ case '--coffee':
+ require('coffee-script');
+ extentions = "js|coffee|litcoffee";
+ break;
+ case '-m':
+ case '--match':
+ match = args.shift();
+ break;
+ case '--matchall':
+ matchall = true;
+ break;
+ case '--junitreport':
+ junitreport.report = true;
+ break;
+ case '--output':
+ junitreport.savePath = args.shift();
+ break;
+ case '--teamcity':
+ teamcity = true;
+ break;
+ case '--requireJsSetup':
+ var setup = args.shift();
+
+ if(!existsSync(setup))
+ throw new Error("RequireJS setup '" + setup + "' doesn't exist!");
+
+ useRequireJs = setup;
+ break;
+ case '--runWithRequireJs':
+ useRequireJs = useRequireJs || true;
+ break;
+ case '--nohelpers':
+ useHelpers = false;
+ break;
+ case '--test-dir':
+ var dir = args.shift();
+
+ if(!existsSync(dir))
+ throw new Error("Test root path '" + dir + "' doesn't exist!");
+
+ specFolders.push(dir); // NOTE: Does not look from current working directory.
+ break;
+ case '--autotest':
+ autotest = true;
+ break;
+ case '--forceexit':
+ forceExit = true;
+ break;
+ case '--captureExceptions':
+ captureExceptions = true;
+ break;
+ case '--noStack':
+ includeStackTrace = false;
+ break;
+ case '--config':
+ var configKey = args.shift();
+ var configValue = args.shift();
+ process.env[configKey]=configValue;
+ break;
+ case '-h':
+ help();
+ default:
+ if (arg.match(/^--params=.*/)) {
+ break;
+ }
+ if (arg.match(/^--/)) help();
+ if (arg.match(/^\/.*/)) {
+ specFolders.push(arg);
+ } else {
+ specFolders.push(Path.join(process.cwd(), arg));
+ }
+ break;
+ }
+}
+
+if (specFolders.length === 0) {
+ help();
+} else {
+ // Check to see if all our files exist
+ for (var idx = 0; idx < specFolders.length; idx++) {
+ if (!existsSync(specFolders[idx])) {
+ console.log("File: " + specFolders[idx] + " is missing.");
+ return;
+ }
+ }
+}
+
+if (autotest) {
+ //TODO: this is ugly, maybe refactor?
+
+ var glob = specFolders.map(function(path){
+ return Path.join(path, '**/*.js');
+ });
+
+ if (extentions.indexOf("coffee") !== -1) {
+ glob = glob.concat(specFolders.map(function(path){
+ return Path.join(path, '**/*.coffee')
+ }));
+ }
+
+ require('./autotest').start(specFolders, glob);
+
+ return;
+}
+
+var exitCode = 0;
+
+if (captureExceptions) {
+ process.on('uncaughtException', function(e) {
+ console.error(e.stack || e);
+ exitCode = 1;
+ process.exit(exitCode);
+ });
+}
+
+process.on("exit", onExit);
+
+function onExit() {
+ process.removeListener("exit", onExit);
+ process.exit(exitCode);
+}
+
+var onComplete = function(runner, log) {
+ util.print('\n');
+ if (runner.results().failedCount == 0) {
+ exitCode = 0;
+ } else {
+ exitCode = 1;
+ }
+ if (forceExit) {
+ process.exit(exitCode);
+ }
+};
+
+if(useHelpers){
+ specFolders.forEach(function(path){
+ jasmine.loadHelpersInFolder(path,
+ new RegExp("helpers?\\.(" + extentions + ")$", 'i'));
+
+ })
+}
+
+var regExpSpec = new RegExp(match + (matchall ? "" : "spec\\.") + "(" + extentions + ")$", 'i')
+
+
+var options = {
+ specFolders: specFolders,
+ onComplete: onComplete,
+ isVerbose: isVerbose,
+ showColors: showColors,
+ teamcity: teamcity,
+ useRequireJs: useRequireJs,
+ regExpSpec: regExpSpec,
+ junitreport: junitreport,
+ includeStackTrace: includeStackTrace
+}
+
+jasmine.executeSpecsInFolder(options);
+
+
+function help(){
+ util.print([
+ 'USAGE: jasmine-node [--color|--noColor] [--verbose] [--coffee] directory'
+ , ''
+ , 'Options:'
+ , ' --autotest - rerun automatically the specs when a file changes'
+ , ' --color - use color coding for output'
+ , ' --noColor - do not use color coding for output'
+ , ' -m, --match REGEXP - load only specs containing "REGEXPspec"'
+ , ' --matchall - relax requirement of "spec" in spec file names'
+ , ' --verbose - print extra information per each test run'
+ , ' --coffee - load coffee-script which allows execution .coffee files'
+ , ' --junitreport - export tests results as junitreport xml format'
+ , ' --output - defines the output folder for junitreport files'
+ , ' --teamcity - converts all console output to teamcity custom test runner commands. (Normally auto detected.)'
+ , ' --runWithRequireJs - loads all specs using requirejs instead of node\'s native require method'
+ , ' --requireJsSetup - file run before specs to include and configure RequireJS'
+ , ' --test-dir - the absolute root directory path where tests are located'
+ , ' --nohelpers - does not load helpers.'
+ , ' --forceexit - force exit once tests complete.'
+ , ' --captureExceptions- listen to global exceptions, report them and exit (interferes with Domains)'
+ , ' --config NAME VALUE- set a global variable in process.env'
+ , ' --noStack - suppress the stack trace generated from a test failure'
+ , ' -h, --help - display this help and exit'
+ , ''
+ ].join("\n"));
+
+ process.exit(-1);
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/cs.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/cs.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/cs.js
new file mode 100644
index 0000000..0d7ff76
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/cs.js
@@ -0,0 +1,160 @@
+/**
+ * @license cs 0.4.2 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/jrburke/require-cs for details
+ */
+
+/*jslint */
+/*global define, window, XMLHttpRequest, importScripts, Packages, java,
+ ActiveXObject, process, require */
+
+define(['coffee-script'], function (CoffeeScript) {
+ 'use strict';
+ var fs, getXhr,
+ progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'],
+ fetchText = function () {
+ throw new Error('Environment unsupported.');
+ },
+ buildMap = {};
+
+ if (typeof process !== "undefined" &&
+ process.versions &&
+ !!process.versions.node) {
+ //Using special require.nodeRequire, something added by r.js.
+ fs = require.nodeRequire('fs');
+ fetchText = function (path, callback) {
+ callback(fs.readFileSync(path, 'utf8'));
+ };
+ } else if ((typeof window !== "undefined" && window.navigator && window.document) || typeof importScripts !== "undefined") {
+ // Browser action
+ getXhr = function () {
+ //Would love to dump the ActiveX crap in here. Need IE 6 to die first.
+ var xhr, i, progId;
+ if (typeof XMLHttpRequest !== "undefined") {
+ return new XMLHttpRequest();
+ } else {
+ for (i = 0; i < 3; i++) {
+ progId = progIds[i];
+ try {
+ xhr = new ActiveXObject(progId);
+ } catch (e) {}
+
+ if (xhr) {
+ progIds = [progId]; // so faster next time
+ break;
+ }
+ }
+ }
+
+ if (!xhr) {
+ throw new Error("getXhr(): XMLHttpRequest not available");
+ }
+
+ return xhr;
+ };
+
+ fetchText = function (url, callback) {
+ var xhr = getXhr();
+ xhr.open('GET', url, true);
+ xhr.onreadystatechange = function (evt) {
+ //Do not explicitly handle errors, those should be
+ //visible via console output in the browser.
+ if (xhr.readyState === 4) {
+ callback(xhr.responseText);
+ }
+ };
+ xhr.send(null);
+ };
+ // end browser.js adapters
+ } else if (typeof Packages !== 'undefined') {
+ //Why Java, why is this so awkward?
+ fetchText = function (path, callback) {
+ var encoding = "utf-8",
+ file = new java.io.File(path),
+ lineSeparator = java.lang.System.getProperty("line.separator"),
+ input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(file), encoding)),
+ stringBuffer, line,
+ content = '';
+ try {
+ stringBuffer = new java.lang.StringBuffer();
+ line = input.readLine();
+
+ // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324
+ // http://www.unicode.org/faq/utf_bom.html
+
+ // Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK:
+ // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058
+ if (line && line.length() && line.charAt(0) === 0xfeff) {
+ // Eat the BOM, since we've already found the encoding on this file,
+ // and we plan to concatenating this buffer with others; the BOM should
+ // only appear at the top of a file.
+ line = line.substring(1);
+ }
+
+ stringBuffer.append(line);
+
+ while ((line = input.readLine()) !== null) {
+ stringBuffer.append(lineSeparator);
+ stringBuffer.append(line);
+ }
+ //Make sure we return a JavaScript string and not a Java string.
+ content = String(stringBuffer.toString()); //String
+ } finally {
+ input.close();
+ }
+ callback(content);
+ };
+ }
+
+ return {
+ get: function () {
+ return CoffeeScript;
+ },
+
+ write: function (pluginName, name, write) {
+ if (buildMap.hasOwnProperty(name)) {
+ var text = buildMap[name];
+ write.asModule(pluginName + "!" + name, text);
+ }
+ },
+
+ version: '0.4.2',
+
+ load: function (name, parentRequire, load, config) {
+ var path = parentRequire.toUrl(name + '.coffee');
+ fetchText(path, function (text) {
+
+ //Do CoffeeScript transform.
+ try {
+ text = CoffeeScript.compile(text, config.CoffeeScript);
+ }
+ catch (err) {
+ err.message = "In " + path + ", " + err.message;
+ throw(err);
+ }
+
+ //Hold on to the transformed text if a build.
+ if (config.isBuild) {
+ buildMap[name] = text;
+ }
+
+ //IE with conditional comments on cannot handle the
+ //sourceURL trick, so skip it if enabled.
+ /*@if (@_jscript) @else @*/
+ if (!config.isBuild) {
+ text += "\r\n//@ sourceURL=" + path;
+ }
+ /*@end@*/
+
+ load.fromText(name, text);
+
+ //Give result to load. Need to wait until the module
+ //is fully parse, which will happen after this
+ //execution.
+ parentRequire([name], function (value) {
+ load(value);
+ });
+ });
+ }
+ };
+});
[35/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/file.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/file.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/file.js
new file mode 100644
index 0000000..a4bd2e7
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/file.js
@@ -0,0 +1,520 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 fs = require('fs')
+ , path = require('path')
+ , JS_PAT = /\.(js|coffee)$/
+ , logger;
+
+var logger = new (function () {
+ var out;
+ try {
+ out = require('./logger');
+ }
+ catch (e) {
+ out = console;
+ }
+
+ this.log = function (o) {
+ out.log(o);
+ };
+})();
+
+/**
+ @name file
+ @namespace file
+*/
+
+var fileUtils = new (function () {
+ var _copyFile
+ , _copyDir
+ , _readDir
+ , _rmDir
+ , _watch;
+
+
+ // Recursively copy files and directories
+ _copyFile = function (fromPath, toPath, opts) {
+ var from = path.normalize(fromPath)
+ , to = path.normalize(toPath)
+ , options = opts || {}
+ , fromStat
+ , toStat
+ , destExists
+ , destDoesNotExistErr
+ , content
+ , filename
+ , dirContents
+ , targetDir;
+
+ fromStat = fs.statSync(from);
+
+ try {
+ //console.dir(to + ' destExists');
+ toStat = fs.statSync(to);
+ destExists = true;
+ }
+ catch(e) {
+ //console.dir(to + ' does not exist');
+ destDoesNotExistErr = e;
+ destExists = false;
+ }
+ // Destination dir or file exists, copy into (directory)
+ // or overwrite (file)
+ if (destExists) {
+
+ // If there's a rename-via-copy file/dir name passed, use it.
+ // Otherwise use the actual file/dir name
+ filename = options.rename || path.basename(from);
+
+ // Copying a directory
+ if (fromStat.isDirectory()) {
+ dirContents = fs.readdirSync(from);
+ targetDir = path.join(to, filename);
+ // We don't care if the target dir already exists
+ try {
+ fs.mkdirSync(targetDir, options.mode || 0755);
+ }
+ catch(e) {
+ if (e.code != 'EEXIST') {
+ throw e;
+ }
+ }
+ for (var i = 0, ii = dirContents.length; i < ii; i++) {
+ //console.log(dirContents[i]);
+ _copyFile(path.join(from, dirContents[i]), targetDir);
+ }
+ }
+ // Copying a file
+ else {
+ content = fs.readFileSync(from);
+ // Copy into dir
+ if (toStat.isDirectory()) {
+ //console.log('copy into dir ' + to);
+ fs.writeFileSync(path.join(to, filename), content);
+ }
+ // Overwrite file
+ else {
+ //console.log('overwriting ' + to);
+ fs.writeFileSync(to, content);
+ }
+ }
+ }
+ // Dest doesn't exist, can't create it
+ else {
+ throw destDoesNotExistErr;
+ }
+ };
+
+ _copyDir = function (from, to, opts) {
+ var createDir = opts.createDir;
+ };
+
+ // Return the contents of a given directory
+ _readDir = function (dirPath) {
+ var dir = path.normalize(dirPath)
+ , paths = []
+ , ret = [dir]
+ , msg;
+
+ try {
+ paths = fs.readdirSync(dir);
+ }
+ catch (e) {
+ msg = 'Could not read path ' + dir + '\n';
+ if (e.stack) {
+ msg += e.stack;
+ }
+ throw new Error(msg);
+ }
+
+ paths.forEach(function (p) {
+ var curr = path.join(dir, p);
+ var stat = fs.statSync(curr);
+ if (stat.isDirectory()) {
+ ret = ret.concat(_readDir(curr));
+ }
+ else {
+ ret.push(curr);
+ }
+ });
+
+ return ret;
+ };
+
+ // Remove the given directory
+ _rmDir = function (dirPath) {
+ var dir = path.normalize(dirPath)
+ , paths = [];
+ paths = fs.readdirSync(dir);
+ paths.forEach(function (p) {
+ var curr = path.join(dir, p);
+ var stat = fs.statSync(curr);
+ if (stat.isDirectory()) {
+ _rmDir(curr);
+ }
+ else {
+ fs.unlinkSync(curr);
+ }
+ });
+ fs.rmdirSync(dir);
+ };
+
+ // Recursively watch files with a callback
+ _watch = function (path, callback) {
+ fs.stat(path, function (err, stats) {
+ if (err) {
+ return false;
+ }
+ if (stats.isFile() && JS_PAT.test(path)) {
+ fs.watchFile(path, callback);
+ }
+ else if (stats.isDirectory()) {
+ fs.readdir(path, function (err, files) {
+ if (err) {
+ return log.fatal(err);
+ }
+ for (var f in files) {
+ _watch(path + '/' + files[f], callback);
+ }
+ });
+ }
+ });
+ };
+
+ /**
+ @name file#cpR
+ @public
+ @function
+ @description Copies a directory/file to a destination
+ @param {String} fromPath The source path to copy from
+ @param {String} toPath The destination path to copy to
+ @param {Object} opts Options to use
+ @param {Boolean} [opts.silent] If false then will log the command
+ */
+ this.cpR = function (fromPath, toPath, options) {
+ var from = path.normalize(fromPath)
+ , to = path.normalize(toPath)
+ , toStat
+ , doesNotExistErr
+ , paths
+ , filename
+ , opts = options || {};
+
+ if (!opts.silent) {
+ logger.log('cp -r ' + fromPath + ' ' + toPath);
+ }
+
+ opts = {}; // Reset
+
+ if (from == to) {
+ throw new Error('Cannot copy ' + from + ' to itself.');
+ }
+
+ // Handle rename-via-copy
+ try {
+ toStat = fs.statSync(to);
+ }
+ catch(e) {
+ doesNotExistErr = e;
+
+ // Get abs path so it's possible to check parent dir
+ if (!this.isAbsolute(to)) {
+ to = path.join(process.cwd() , to);
+ }
+
+ // Save the file/dir name
+ filename = path.basename(to);
+ // See if a parent dir exists, so there's a place to put the
+ /// renamed file/dir (resets the destination for the copy)
+ to = path.dirname(to);
+ try {
+ toStat = fs.statSync(to);
+ }
+ catch(e) {}
+ if (toStat && toStat.isDirectory()) {
+ // Set the rename opt to pass to the copy func, will be used
+ // as the new file/dir name
+ opts.rename = filename;
+ //console.log('filename ' + filename);
+ }
+ else {
+ throw doesNotExistErr;
+ }
+ }
+
+ _copyFile(from, to, opts);
+ };
+
+ /**
+ @name file#mkdirP
+ @public
+ @function
+ @description Create the given directory(ies) using the given mode permissions
+ @param {String} dir The directory to create
+ @param {Number} mode The mode to give the created directory(ies)(Default: 0755)
+ */
+ this.mkdirP = function (dir, mode) {
+ var dirPath = path.normalize(dir)
+ , paths = dirPath.split(/\/|\\/)
+ , currPath = ''
+ , next;
+
+ if (paths[0] == '' || /^[A-Za-z]+:/.test(paths[0])) {
+ currPath = paths.shift() || '/';
+ currPath = path.join(currPath, paths.shift());
+ //console.log('basedir');
+ }
+ while ((next = paths.shift())) {
+ if (next == '..') {
+ currPath = path.join(currPath, next);
+ continue;
+ }
+ currPath = path.join(currPath, next);
+ try {
+ //console.log('making ' + currPath);
+ fs.mkdirSync(currPath, mode || 0755);
+ }
+ catch(e) {
+ if (e.code != 'EEXIST') {
+ throw e;
+ }
+ }
+ }
+ };
+
+ /**
+ @name file#readdirR
+ @public
+ @function
+ @return {Array} Returns the contents as an Array, can be configured via opts.format
+ @description Reads the given directory returning it's contents
+ @param {String} dir The directory to read
+ @param {Object} opts Options to use
+ @param {String} [opts.format] Set the format to return(Default: Array)
+ */
+ this.readdirR = function (dir, opts) {
+ var options = opts || {}
+ , format = options.format || 'array'
+ , ret;
+ ret = _readDir(dir);
+ return format == 'string' ? ret.join('\n') : ret;
+ };
+
+ /**
+ @name file#rmRf
+ @public
+ @function
+ @description Deletes the given directory/file
+ @param {String} p The path to delete, can be a directory or file
+ @param {Object} opts Options to use
+ @param {String} [opts.silent] If false then logs the command
+ */
+ this.rmRf = function (p, options) {
+ var stat
+ , opts = options || {};
+ if (!opts.silent) {
+ logger.log('rm -rf ' + p);
+ }
+ try {
+ stat = fs.statSync(p);
+ if (stat.isDirectory()) {
+ _rmDir(p);
+ }
+ else {
+ fs.unlinkSync(p);
+ }
+ }
+ catch (e) {}
+ };
+
+ /**
+ @name file#isAbsolute
+ @public
+ @function
+ @return {Boolean/String} If it's absolute the first char is returned otherwise false
+ @description Checks if a given path is absolute or relative
+ @param {String} p Path to check
+ */
+ this.isAbsolute = function (p) {
+ var match = /^[A-Za-z]+:\\|^\//.exec(p);
+ if (match && match.length) {
+ return match[0];
+ }
+ return false;
+ };
+
+ /**
+ @name file#absolutize
+ @public
+ @function
+ @return {String} Returns the absolute path for the given path
+ @description Returns the absolute path for the given path
+ @param {String} p The path to get the absolute path for
+ */
+ this.absolutize = function (p) {
+ if (this.isAbsolute(p)) {
+ return p;
+ }
+ else {
+ return path.join(process.cwd(), p);
+ }
+ };
+
+ /**
+ Given a patern, return the base directory of it (ie. the folder
+ that will contain all the files matching the path).
+ eg. file.basedir('/test/**') => '/test/'
+ Path ending by '/' are considerd as folder while other are considerd
+ as files, eg.:
+ file.basedir('/test/a/') => '/test/a'
+ file.basedir('/test/a') => '/test'
+ The returned path always end with a '/' so we have:
+ file.basedir(file.basedir(x)) == file.basedir(x)
+ */
+ this.basedir = function (pathParam) {
+ var basedir = ''
+ , parts
+ , part
+ , pos = 0
+ , p = pathParam || '';
+
+ // If the path has a leading asterisk, basedir is the current dir
+ if (p.indexOf('*') == 0 || p.indexOf('**') == 0) {
+ return '.';
+ }
+
+ // always consider .. at the end as a folder and not a filename
+ if (/(?:^|\/|\\)\.\.$/.test(p.slice(-3))) {
+ p += '/';
+ }
+
+ parts = p.split(/\\|\//);
+ for (var i = 0, l = parts.length - 1; i < l; i++) {
+ part = parts[i];
+ if (part.indexOf('*') > -1 || part.indexOf('**') > -1) {
+ break;
+ }
+ pos += part.length + 1;
+ basedir += part + p[pos - 1];
+ }
+ if (!basedir) {
+ basedir = '.';
+ }
+ // Strip trailing slashes
+ if (!(basedir == '\\' || basedir == '/')) {
+ basedir = basedir.replace(/\\$|\/$/, '');
+ }
+ return basedir;
+
+ };
+
+ /**
+ @name file#searchParentPath
+ @public
+ @function
+ @description Search for a directory/file in the current directory and parent directories
+ @param {String} p The path to search for
+ @param {Function} callback The function to call once the path is found
+ */
+ this.searchParentPath = function (location, beginPath, callback) {
+ if (typeof beginPath === 'function' && !callback) {
+ callback = beginPath;
+ beginPath = process.cwd();
+ }
+ var cwd = beginPath || process.cwd();
+
+ if (!location) {
+ // Return if no path is given
+ return;
+ }
+ var relPath = ''
+ , i = 5 // Only search up to 5 directories
+ , pathLoc
+ , pathExists;
+
+ while (--i >= 0) {
+ pathLoc = path.join(cwd, relPath, location);
+ pathExists = this.existsSync(pathLoc);
+
+ if (pathExists) {
+ callback && callback(undefined, pathLoc);
+ break;
+ } else {
+ // Dir could not be found
+ if (i === 0) {
+ callback && callback(new Error("Path \"" + pathLoc + "\" not found"), undefined);
+ break;
+ }
+
+ // Add a relative parent directory
+ relPath += '../';
+ // Switch to relative parent directory
+ process.chdir(path.join(cwd, relPath));
+ }
+ }
+ };
+
+ /**
+ @name file#watch
+ @public
+ @function
+ @description Watch a given path then calls the callback once a change occurs
+ @param {String} path The path to watch
+ @param {Function} callback The function to call when a change occurs
+ */
+ this.watch = function () {
+ _watch.apply(this, arguments);
+ };
+
+ // Compatibility for fs.exists(0.8) and path.exists(0.6)
+ this.exists = (typeof fs.exists === 'function') ? fs.exists : path.exists;
+
+ // Compatibility for fs.existsSync(0.8) and path.existsSync(0.6)
+ this.existsSync = (typeof fs.existsSync === 'function') ? fs.existsSync : path.existsSync;
+
+ /**
+ @name file#requireLocal
+ @public
+ @function
+ @return {Object} The given module is returned
+ @description Require a local module from the node_modules in the current directory
+ @param {String} module The module to require
+ @param {String} message An option message to throw if the module doesn't exist
+ */
+ this.requireLocal = function (module, message) {
+ // Try to require in the application directory
+ try {
+ dep = require(path.join(process.cwd(), 'node_modules', module));
+ }
+ catch(err) {
+ if (message) {
+ throw new Error(message);
+ }
+ throw new Error('Module "' + module + '" could not be found as a ' +
+ 'local module.\n Please make sure there is a node_modules directory in the ' +
+ 'current directory,\n and install it by doing "npm install ' +
+ module + '"');
+ }
+ return dep;
+ };
+
+})();
+
+module.exports = fileUtils;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/i18n.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/i18n.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/i18n.js
new file mode 100644
index 0000000..aa00950
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/i18n.js
@@ -0,0 +1,60 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 core = require('./core')
+ , i18n;
+
+i18n = new (function () {
+ var _defaultLocale = 'en-us'
+ , _strings = {};
+
+ this.getText = function (key, opts, locale) {
+ var currentLocale = locale || _defaultLocale
+ , currentLocaleStrings = _strings[currentLocale] || {}
+ , defaultLocaleStrings = _strings[_defaultLocale] || {}
+ , str = currentLocaleStrings[key]
+ || defaultLocaleStrings[key] || "[[" + key + "]]";
+ for (p in opts) {
+ str = str.replace(new RegExp('\\{' + p + '\\}', 'g'), opts[p]);
+ }
+ return str;
+ };
+
+ this.getDefaultLocale = function (locale) {
+ return _defaultLocale;
+ };
+
+ this.setDefaultLocale = function (locale) {
+ _defaultLocale = locale;
+ };
+
+ this.loadLocale = function (locale, strings) {
+ _strings[locale] = _strings[locale] || {};
+ core.mixin(_strings[locale], strings);
+ };
+
+})();
+
+i18n.I18n = function (locale) {
+ this.getText = function (key, opts) {
+ return i18n.getText(key, opts || {}, locale);
+ };
+ this.t = this.getText;
+};
+
+module.exports = i18n;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/index.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/index.js
new file mode 100644
index 0000000..97e1118
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/index.js
@@ -0,0 +1,59 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 utils = {}
+// Core methods
+ , core = require('./core')
+// Namespaces with methods
+ , string = require('./string')
+ , file = require('./file')
+ , async = require('./async')
+ , i18n = require('./i18n')
+ , uri = require('./uri')
+ , array = require('./array')
+ , object = require('./object')
+ , date = require('./date')
+ , request = require('./request')
+ , log = require('./log')
+ , network = require('./network')
+// Third-party -- remove this if possible
+ , inflection = require('./inflection')
+// Constructors
+ , EventBuffer = require('./event_buffer').EventBuffer
+ , XML = require('./xml').XML
+ , SortedCollection = require('./sorted_collection').SortedCollection;
+
+core.mixin(utils, core);
+
+utils.string = string;
+utils.file = file;
+utils.async = async;
+utils.i18n = i18n;
+utils.uri = uri;
+utils.array = array;
+utils.object = object;
+utils.date = date;
+utils.request = request;
+utils.log = log;
+utils.network = network;
+utils.inflection = inflection;
+utils.SortedCollection = SortedCollection;
+utils.EventBuffer = EventBuffer;
+utils.XML = XML;
+
+module.exports = utils;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/inflection.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/inflection.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/inflection.js
new file mode 100644
index 0000000..2d89839
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/inflection.js
@@ -0,0 +1,222 @@
+/*
+ * Copyright (c) 2010 George Moschovitis, http://www.gmosx.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 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.
+ *
+ * A port of the Rails/ActiveSupport Inflector class
+ * http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html
+*/
+
+/**
+ @name inflection
+ @namespace inflection
+*/
+
+var inflection = new (function () {
+
+ /**
+ @name inflection#inflections
+ @public
+ @object
+ @description A list of rules and replacements for different inflection types
+ */
+ this.inflections = {
+ plurals: []
+ , singulars: []
+ , uncountables: []
+ };
+
+ var self = this
+ , setInflection
+ , setPlural
+ , setSingular
+ , setUncountable
+ , setIrregular;
+
+ // Add a new inflection rule/replacement to the beginning of the array for the
+ // inflection type
+ setInflection = function (type, rule, replacement) {
+ self.inflections[type].unshift([rule, replacement]);
+ };
+
+ // Add a new plural inflection rule
+ setPlural = function (rule, replacement) {
+ setInflection('plurals', rule, replacement);
+ };
+
+ // Add a new singular inflection rule
+ setSingular = function (rule, replacement) {
+ setInflection('singulars', rule, replacement);
+ };
+
+ // Add a new irregular word to the inflection list, by a given singular and plural inflection
+ setIrregular = function (singular, plural) {
+ if (singular.substr(0, 1).toUpperCase() == plural.substr(0, 1).toUpperCase()) {
+ setPlural(new RegExp("(" + singular.substr(0, 1) + ")" + singular.substr(1) + "$", "i"),
+ '$1' + plural.substr(1));
+ setPlural(new RegExp("(" + plural.substr(0, 1) + ")" + plural.substr(1) + "$", "i"),
+ '$1' + plural.substr(1));
+ setSingular(new RegExp("(" + plural.substr(0, 1) + ")" + plural.substr(1) + "$", "i"),
+ '$1' + singular.substr(1));
+ } else {
+ setPlural(new RegExp(singular.substr(0, 1).toUpperCase() + singular.substr(1) + "$"),
+ plural.substr(0, 1).toUpperCase() + plural.substr(1));
+ setPlural(new RegExp(singular.substr(0, 1).toLowerCase() + singular.substr(1) + "$"),
+ plural.substr(0, 1).toLowerCase() + plural.substr(1));
+ setPlural(new RegExp(plural.substr(0, 1).toUpperCase() + plural.substr(1) + "$"),
+ plural.substr(0, 1).toUpperCase() + plural.substr(1));
+ setPlural(new RegExp(plural.substr(0, 1).toLowerCase() + plural.substr(1) + "$"),
+ plural.substr(0, 1).toLowerCase() + plural.substr(1));
+ setSingular(new RegExp(plural.substr(0, 1).toUpperCase() + plural.substr(1) + "$"),
+ singular.substr(0, 1).toUpperCase() + singular.substr(1));
+ setSingular(new RegExp(plural.substr(0, 1).toLowerCase() + plural.substr(1) + "$"),
+ singular.substr(0, 1).toLowerCase() + singular.substr(1));
+ }
+ };
+
+ // Add a new word to the uncountable inflection list
+ setUncountable = function (word) {
+ self.inflections.uncountables[word] = true;
+ };
+
+ // Create inflections
+ (function () {
+ setPlural(/$/, "s");
+ setPlural(/s$/i, "s");
+ setPlural(/(ax|test)is$/i, "$1es");
+ setPlural(/(octop|vir)us$/i, "$1i");
+ setPlural(/(alias|status)$/i, "$1es");
+ setPlural(/(bu)s$/i, "$1ses");
+ setPlural(/(buffal|tomat)o$/i, "$1oes");
+ setPlural(/([ti])um$/i, "$1a");
+ setPlural(/sis$/i, "ses");
+ setPlural(/(?:([^f])fe|([lr])f)$/i, "$1$2ves");
+ setPlural(/(hive)$/i, "$1s");
+ setPlural(/([^aeiouy]|qu)y$/i, "$1ies");
+ setPlural(/(x|ch|ss|sh)$/i, "$1es");
+ setPlural(/(matr|vert|ind)(?:ix|ex)$/i, "$1ices");
+ setPlural(/([m|l])ouse$/i, "$1ice");
+ setPlural(/^(ox)$/i, "$1en");
+ setPlural(/(quiz)$/i, "$1zes");
+
+ setSingular(/s$/i, "")
+ setSingular(/ss$/i, "ss")
+ setSingular(/(n)ews$/i, "$1ews")
+ setSingular(/([ti])a$/i, "$1um")
+ setSingular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i, "$1$2sis")
+ setSingular(/(^analy)ses$/i, "$1sis")
+ setSingular(/([^f])ves$/i, "$1fe")
+ setSingular(/(hive)s$/i, "$1")
+ setSingular(/(tive)s$/i, "$1")
+ setSingular(/([lr])ves$/i, "$1f")
+ setSingular(/([^aeiouy]|qu)ies$/i, "$1y")
+ setSingular(/(s)eries$/i, "$1eries")
+ setSingular(/(m)ovies$/i, "$1ovie")
+ setSingular(/(x|ch|ss|sh)es$/i, "$1")
+ setSingular(/([m|l])ice$/i, "$1ouse")
+ setSingular(/(bus)es$/i, "$1")
+ setSingular(/(o)es$/i, "$1")
+ setSingular(/(shoe)s$/i, "$1")
+ setSingular(/(cris|ax|test)es$/i, "$1is")
+ setSingular(/(octop|vir)i$/i, "$1us")
+ setSingular(/(alias|status)es$/i, "$1")
+ setSingular(/^(ox)en/i, "$1")
+ setSingular(/(vert|ind)ices$/i, "$1ex")
+ setSingular(/(matr)ices$/i, "$1ix")
+ setSingular(/(quiz)zes$/i, "$1")
+ setSingular(/(database)s$/i, "$1")
+
+ setIrregular("person", "people");
+ setIrregular("man", "men");
+ setIrregular("child", "children");
+ setIrregular("sex", "sexes");
+ setIrregular("move", "moves");
+ setIrregular("cow", "kine");
+
+ setUncountable("equipment");
+ setUncountable("information");
+ setUncountable("rice");
+ setUncountable("money");
+ setUncountable("species");
+ setUncountable("series");
+ setUncountable("fish");
+ setUncountable("sheep");
+ setUncountable("jeans");
+ })();
+
+ /**
+ @name inflection#parse
+ @public
+ @function
+ @return {String} The inflection of the word from the type given
+ @description Parse a word from the given inflection type
+ @param {String} type A type of the inflection to use
+ @param {String} word the word to parse
+ */
+ this.parse = function (type, word) {
+ var lowWord = word.toLowerCase()
+ , inflections = this.inflections[type];
+
+ if (this.inflections.uncountables[lowWord]) {
+ return word;
+ }
+
+ var i = -1;
+ while (++i < inflections.length) {
+ var rule = inflections[i][0]
+ , replacement = inflections[i][1];
+
+ if (rule.test(word)) {
+ return word.replace(rule, replacement)
+ }
+ }
+
+ return word;
+ };
+
+ /**
+ @name inflection#pluralize
+ @public
+ @function
+ @return {String} The plural inflection for the given word
+ @description Create a plural inflection for a word
+ @param {String} word the word to create a plural version for
+ */
+ this.pluralize = function (word) {
+ return this.parse('plurals', word);
+ };
+
+ /**
+ @name inflection#singularize
+ @public
+ @function
+ @return {String} The singular inflection for the given word
+ @description Create a singular inflection for a word
+ @param {String} word the word to create a singular version for
+ */
+ this.singularize = function (word) {
+ return this.parse('singulars', word);
+ };
+
+})();
+
+module.exports = inflection;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/log.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/log.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/log.js
new file mode 100644
index 0000000..d26557b
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/log.js
@@ -0,0 +1,67 @@
+var util = require('util')
+ , log
+ , _logger
+ , _levels
+ , _serialize
+ , _output;
+
+_levels = {
+ 'debug': 'log'
+, 'info': 'log'
+, 'notice': 'log'
+, 'warning': 'error'
+, 'error': 'error'
+, 'critical': 'error'
+, 'alert': 'error'
+, 'emergency': 'error'
+};
+
+_serialize = function (obj) {
+ var out;
+ if (typeof obj == 'string') {
+ out = obj;
+ }
+ else {
+ out = util.inspect(obj);
+ }
+ return out;
+};
+
+_output = function (obj, level) {
+ var out = _serialize(obj);
+ if (_logger) {
+ _logger[level](out);
+ }
+ else {
+ console[_levels[level]](out);
+ }
+};
+
+
+log = function (obj) {
+ _output(obj, 'info');
+};
+
+log.registerLogger = function (logger) {
+ // Malkovitch, Malkovitch
+ if (logger === log) {
+ return;
+ }
+ _logger = logger;
+};
+
+(function () {
+ var level;
+ for (var p in _levels) {
+ (function (p) {
+ level = _levels[p];
+ log[p] = function (obj) {
+ _output(obj, p);
+ };
+ })(p);
+ }
+ // Also handle 'access', not an actual level
+ log.access = log.info;
+})();
+
+module.exports = log;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/network.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/network.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/network.js
new file mode 100644
index 0000000..c90324d
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/network.js
@@ -0,0 +1,72 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 network
+ , net = require('net');
+
+/**
+ @name network
+ @namespace network
+*/
+
+network = new (function () {
+ /**
+ @name network#isPortOpen
+ @public
+ @function
+ @description Checks if the given port in the given host is open
+ @param {Number} port number
+ @param {String} host
+ @param {Function} callback Callback function -- should be in the format
+ of function(err, result) {}
+ */
+ this.isPortOpen = function (port, host, callback) {
+ if (typeof host === 'function' && !callback) {
+ callback = host;
+ host = 'localhost';
+ }
+
+ var isOpen = false
+ , connection
+ , error;
+
+ connection = net.createConnection(port, host, function () {
+ isOpen = true;
+ connection.end();
+ });
+
+ connection.on('error', function (err) {
+ // We ignore 'ECONNREFUSED' as it simply indicates the port isn't open.
+ // Anything else is reported
+ if(err.code !== 'ECONNREFUSED') {
+ error = err;
+ }
+ });
+
+ connection.setTimeout(400, function () {
+ connection.end();
+ });
+
+ connection.on('close', function () {
+ callback && callback(error, isOpen);
+ });
+ };
+
+})();
+
+module.exports = network;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/object.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/object.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/object.js
new file mode 100644
index 0000000..dd92e7d
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/object.js
@@ -0,0 +1,108 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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.
+ *
+*/
+
+/**
+ @name object
+ @namespace object
+*/
+
+var object = new (function () {
+
+ /**
+ @name object#merge
+ @public
+ @function
+ @return {Object} Returns the merged object
+ @description Merge merges `otherObject` into `object` and takes care of deep
+ merging of objects
+ @param {Object} object Object to merge into
+ @param {Object} otherObject Object to read from
+ */
+ this.merge = function (object, otherObject) {
+ var obj = object || {}
+ , otherObj = otherObject || {}
+ , key, value;
+
+ for (key in otherObj) {
+ value = otherObj[key];
+
+ // Check if a value is an Object, if so recursively add it's key/values
+ if (typeof value === 'object' && !(value instanceof Array)) {
+ // Update value of object to the one from otherObj
+ obj[key] = this.merge(obj[key], value);
+ }
+ // Value is anything other than an Object, so just add it
+ else {
+ obj[key] = value;
+ }
+ }
+
+ return obj;
+ };
+
+ /**
+ @name object#reverseMerge
+ @public
+ @function
+ @return {Object} Returns the merged object
+ @description ReverseMerge merges `object` into `defaultObject`
+ @param {Object} object Object to read from
+ @param {Object} defaultObject Object to merge into
+ */
+ this.reverseMerge = function (object, defaultObject) {
+ // Same as `merge` except `defaultObject` is the object being changed
+ // - this is useful if we want to easily deal with default object values
+ return this.merge(defaultObject, object);
+ };
+
+ /**
+ @name object#isEmpty
+ @public
+ @function
+ @return {Boolean} Returns true if empty false otherwise
+ @description isEmpty checks if an Object is empty
+ @param {Object} object Object to check if empty
+ */
+ this.isEmpty = function (object) {
+ // Returns true if a object is empty false if not
+ for (var i in object) { return false; }
+ return true;
+ };
+
+ /**
+ @name object#toArray
+ @public
+ @function
+ @return {Array} Returns an array of objects each including the original key and value
+ @description Converts an object to an array of objects each including the original key/value
+ @param {Object} object Object to convert
+ */
+ this.toArray = function (object) {
+ // Converts an object into an array of objects with the original key, values
+ array = [];
+
+ for (var i in object) {
+ array.push({ key: i, value: object[i] });
+ }
+
+ return array;
+ };
+
+})();
+
+module.exports = object;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/request.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/request.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/request.js
new file mode 100644
index 0000000..0984db1
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/request.js
@@ -0,0 +1,143 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 = require('https')
+ , url = require('url')
+ , uri = require('./uri')
+ , log = require('./log')
+ , core = require('./core');
+
+var formatters = {
+ xml: function (data) {
+ return data;
+ }
+, html: function (data) {
+ return data;
+ }
+, txt: function (data) {
+ return data;
+ }
+, json: function (data) {
+ return JSON.parse(data);
+ }
+}
+
+/**
+ @name request
+ @namespace request
+ @public
+ @function
+ @description Sends requests to the given url sending any data if the method is POST or PUT
+ @param {Object} opts The options to use for the request
+ @param {String} [opts.url] The URL to send the request to
+ @param {String} [opts.method=GET] The method to use for the request
+ @param {Object} [opts.headers] Headers to send on requests
+ @param {String} [opts.data] Data to send on POST and PUT requests
+ @param {String} [opts.dataType] The type of data to send
+ @param {Function} callback the function to call after, args are `error, data`
+*/
+var request = function (opts, callback) {
+ var client
+ , options = opts || {}
+ , parsed = url.parse(options.url)
+ , path
+ , requester = parsed.protocol == 'http:' ? http : https
+ , method = (options.method && options.method.toUpperCase()) || 'GET'
+ , headers = core.mixin({}, options.headers || {})
+ , contentLength
+ , port
+ , clientOpts;
+
+ if (parsed.port) {
+ port = parsed.port;
+ }
+ else {
+ port = parsed.protocol == 'http:' ? '80' : '443';
+ }
+
+ path = parsed.pathname;
+ if (parsed.search) {
+ path += parsed.search;
+ }
+
+ if (method == 'POST' || method == 'PUT') {
+ if (options.data) {
+ contentLength = options.data.length;
+ }
+ else {
+ contentLength = 0
+ }
+ headers['Content-Length'] = contentLength;
+ }
+
+ clientOpts = {
+ host: parsed.hostname
+ , port: port
+ , method: method
+ , agent: false
+ , path: path
+ , headers: headers
+ };
+ client = requester.request(clientOpts);
+
+ client.addListener('response', function (resp) {
+ var data = ''
+ , dataType;
+ resp.addListener('data', function (chunk) {
+ data += chunk.toString();
+ });
+ resp.addListener('end', function () {
+ var stat = resp.statusCode
+ , err;
+ // Successful response
+ if ((stat > 199 && stat < 300) || stat == 304) {
+ dataType = options.dataType || uri.getFileExtension(parsed.pathname);
+ if (formatters[dataType]) {
+ try {
+ if (data) {
+ data = formatters[dataType](data);
+ }
+ }
+ catch (e) {
+ callback(e, null);
+ }
+ }
+ callback(null, data);
+ }
+ // Something failed
+ else {
+ err = new Error(data);
+ err.statusCode = resp.statusCode;
+ callback(err, null);
+ }
+
+ });
+ });
+
+ client.addListener('error', function (e) {
+ callback(e, null);
+ });
+
+ if ((method == 'POST' || method == 'PUT') && options.data) {
+ client.write(options.data);
+ }
+
+ client.end();
+};
+
+module.exports = request;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/sorted_collection.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/sorted_collection.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/sorted_collection.js
new file mode 100644
index 0000000..bdeca90
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/sorted_collection.js
@@ -0,0 +1,558 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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.
+ *
+*/
+
+/**
+ @name SortedCollection
+ @namespace SortedCollection
+ @constructor
+*/
+
+var SortedCollection = function (d) {
+ this.count = 0;
+ this.items = {}; // Hash keys and their values
+ this.order = []; // Array for sort order
+ if (d) {
+ this.defaultValue = d;
+ };
+};
+
+SortedCollection.prototype = new (function () {
+ /**
+ @name SortedCollection#addItem
+ @public
+ @function
+ @return {Any} The given val is returned
+ @description Adds a new key/value to the collection
+ @param {String} key The key for the collection item
+ @param {Any} val The value for the collection item
+ */
+ this.addItem = function (key, val) {
+ if (typeof key != 'string') {
+ throw('Hash only allows string keys.');
+ }
+ return this.setByKey(key, val);
+ };
+
+ /**
+ @name SortedCollection#getItem
+ @public
+ @function
+ @return {Any} The value for the given identifier is returned
+ @description Retrieves the value for the given identifier that being a key or index
+ @param {String/Number} p The identifier to look in the collection for, being a key or index
+ */
+ this.getItem = function (p) {
+ if (typeof p == 'string') {
+ return this.getByKey(p);
+ }
+ else if (typeof p == 'number') {
+ return this.getByIndex(p);
+ }
+ };
+
+ /**
+ @name SortedCollection#setItem
+ @public
+ @function
+ @return {Any} The given val is returned
+ @description Sets the item in the collection with the given val, overwriting the existsing item
+ if identifier is an index
+ @param {String/Number} p The identifier set in the collection, being either a key or index
+ @param {Any} val The value for the collection item
+ */
+ this.setItem = function (p, val) {
+ if (typeof p == 'string') {
+ return this.setByKey(p, val);
+ }
+ else if (typeof p == 'number') {
+ return this.setByIndex(p, val);
+ }
+ };
+
+ /**
+ @name SortedCollection#removeItem
+ @public
+ @function
+ @return {Boolean} Returns true if the item has been removed, false otherwise
+ @description Removes the item for the given identifier
+ @param {String/Number} p The identifier to delete the item for, being a key or index
+ */
+ this.removeItem = function (p) {
+ if (typeof p == 'string') {
+ return this.removeByKey(p);
+ }
+ else if (typeof p == 'number') {
+ return this.removeByIndex(p);
+ }
+ };
+
+ /**
+ @name SortedCollection#getByKey
+ @public
+ @function
+ @return {Any} The value for the given key item is returned
+ @description Retrieves the value for the given key
+ @param {String} key The key for the item to lookup
+ */
+ this.getByKey = function (key) {
+ return this.items[key];
+ };
+
+ /**
+ @name SortedCollection#setByKey
+ @public
+ @function
+ @return {Any} The given val is returned
+ @description Sets a item by key assigning the given val
+ @param {String} key The key for the item
+ @param {Any} val The value to set for the item
+ */
+ this.setByKey = function (key, val) {
+ var v = null;
+ if (typeof val == 'undefined') {
+ v = this.defaultValue;
+ }
+ else { v = val; }
+ if (typeof this.items[key] == 'undefined') {
+ this.order[this.count] = key;
+ this.count++;
+ }
+ this.items[key] = v;
+ return this.items[key];
+ };
+
+ /**
+ @name SortedCollection#removeByKey
+ @public
+ @function
+ @return {Boolean} If the item was removed true is returned, false otherwise
+ @description Removes a collection item by key
+ @param {String} key The key for the item to remove
+ */
+ this.removeByKey = function (key) {
+ if (typeof this.items[key] != 'undefined') {
+ var pos = null;
+ delete this.items[key]; // Remove the value
+ // Find the key in the order list
+ for (var i = 0; i < this.order.length; i++) {
+ if (this.order[i] == key) {
+ pos = i;
+ }
+ }
+ this.order.splice(pos, 1); // Remove the key
+ this.count--; // Decrement the length
+ return true;
+ }
+ else {
+ return false;
+ }
+ };
+
+ /**
+ @name SortedCollection#getByIndex
+ @public
+ @function
+ @return {Any} The value for the given index item is returned
+ @description Retrieves the value for the given index
+ @param {Number} ind The index to lookup for the item
+ */
+ this.getByIndex = function (ind) {
+ return this.items[this.order[ind]];
+ };
+
+ /**
+ @name SortedCollection#setByIndex
+ @public
+ @function
+ @return {Any} The given val is returned
+ @description Sets a item by index assigning the given val
+ @param {Number} ind The index for the item
+ @param {Any} val The value to set for the item
+ */
+ this.setByIndex = function (ind, val) {
+ if (ind < 0 || ind >= this.count) {
+ throw('Index out of bounds. Hash length is ' + this.count);
+ }
+ this.items[this.order[ind]] = val;
+ return this.items[this.order[ind]];
+ };
+
+ /**
+ @name SortedCollection#removeByIndex
+ @public
+ @function
+ @return {Boolean} If the item was removed true is returned, false otherwise
+ @description Removes a collection item by index
+ @param {Number} ind The index for the item to remove
+ */
+ this.removeByIndex = function (ind) {
+ var ret = this.items[this.order[ind]];
+ if (typeof ret != 'undefined') {
+ delete this.items[this.order[ind]]
+ this.order.splice(ind, 1);
+ this.count--;
+ return true;
+ }
+ else {
+ return false;
+ }
+ };
+
+ /**
+ @name SortedCollection#hasKey
+ @public
+ @function
+ @return {Boolean} Returns true if the item exists, false otherwise
+ @description Checks if a key item exists in the collection
+ @param {String} key The key to look for in the collection
+ */
+ this.hasKey = function (key) {
+ return typeof this.items[key] != 'undefined';
+ };
+
+ /**
+ @name SortedCollection#hasValue
+ @public
+ @function
+ @return {Boolean} Returns true if a key with the given value exists, false otherwise
+ @description Checks if a key item in the collection has a given val
+ @param {Any} val The value to check for in the collection
+ */
+ this.hasValue = function (val) {
+ for (var i = 0; i < this.order.length; i++) {
+ if (this.items[this.order[i]] == val) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ /**
+ @name SortedCollection#allKeys
+ @public
+ @function
+ @return {String} Returns all the keys in a string
+ @description Joins all the keys into a string
+ @param {String} str The string to use between each key
+ */
+ this.allKeys = function (str) {
+ return this.order.join(str);
+ };
+
+ /**
+ @name SortedCollection#replaceKey
+ @public
+ @function
+ @description Joins all the keys into a string
+ @param {String} oldKey The key item to change
+ @param {String} newKey The key item to change the name to
+ */
+ this.replaceKey = function (oldKey, newKey) {
+ // If item for newKey exists, nuke it
+ if (this.hasKey(newKey)) {
+ this.removeItem(newKey);
+ }
+ this.items[newKey] = this.items[oldKey];
+ delete this.items[oldKey];
+ for (var i = 0; i < this.order.length; i++) {
+ if (this.order[i] == oldKey) {
+ this.order[i] = newKey;
+ }
+ }
+ };
+
+ /**
+ @name SortedCollection#insertAtIndex
+ @public
+ @function
+ @return {Boolean} Returns true if the item was set at the given index
+ @description Inserts a key/value at a specific index in the collection
+ @param {Number} ind The index to set the item at
+ @param {String} key The key to use at the item index
+ @param {Any} val The value to set for the item
+ */
+ this.insertAtIndex = function (ind, key, val) {
+ this.order.splice(ind, 0, key);
+ this.items[key] = val;
+ this.count++;
+ return true;
+ };
+
+ /**
+ @name SortedCollection#insertAfterKey
+ @public
+ @function
+ @return {Boolean} Returns true if the item was set for the given key
+ @description Inserts a key/value item after the given reference key in the collection
+ @param {String} refKey The key to insert the new item after
+ @param {String} key The key for the new item
+ @param {Any} val The value to set for the item
+ */
+ this.insertAfterKey = function (refKey, key, val) {
+ var pos = this.getPosition(refKey);
+ return this.insertAtIndex(pos, key, val);
+ };
+
+ /**
+ @name SortedCollection#getPosition
+ @public
+ @function
+ @return {Number} Returns the index for the item of the given key
+ @description Retrieves the index of the key item
+ @param {String} key The key to get the index for
+ */
+ this.getPosition = function (key) {
+ var order = this.order;
+ if (typeof order.indexOf == 'function') {
+ return order.indexOf(key);
+ }
+ else {
+ for (var i = 0; i < order.length; i++) {
+ if (order[i] == key) { return i;}
+ }
+ }
+ };
+
+ /**
+ @name SortedCollection#each
+ @public
+ @function
+ @return {Boolean}
+ @description Loops through the collection and calls the given function
+ @param {Function} func The function to call for each collection item, the arguments
+ are the key and value for the current item
+ @param {Object} opts The options to use
+ @param {Boolean} [opts.keyOnly] Only give the function the key
+ @param {Boolean} [opts.valueOnly] Only give the function the value
+ */
+ this.each = function (func, opts) {
+ var options = opts || {}
+ , order = this.order;
+ for (var i = 0, ii = order.length; i < ii; i++) {
+ var key = order[i];
+ var val = this.items[key];
+ if (options.keyOnly) {
+ func(key);
+ }
+ else if (options.valueOnly) {
+ func(val);
+ }
+ else {
+ func(val, key);
+ }
+ }
+ return true;
+ };
+
+ /**
+ @name SortedCollection#eachKey
+ @public
+ @function
+ @return {Boolean}
+ @description Loops through the collection and calls the given function
+ @param {Function} func The function to call for each collection item, only giving the
+ key to the function
+ */
+ this.eachKey = function (func) {
+ return this.each(func, { keyOnly: true });
+ };
+
+ /**
+ @name SortedCollection#eachValue
+ @public
+ @function
+ @return {Boolean}
+ @description Loops through the collection and calls the given function
+ @param {Function} func The function to call for each collection item, only giving the
+ value to the function
+ */
+ this.eachValue = function (func) {
+ return this.each(func, { valueOnly: true });
+ };
+
+ /**
+ @name SortedCollection#clone
+ @public
+ @function
+ @return {Object} Returns a new SortedCollection with the data of the current one
+ @description Creates a cloned version of the current collection and returns it
+ */
+ this.clone = function () {
+ var coll = new SortedCollection()
+ , key
+ , val;
+ for (var i = 0; i < this.order.length; i++) {
+ key = this.order[i];
+ val = this.items[key];
+ coll.setItem(key, val);
+ }
+ return coll;
+ };
+
+ /**
+ @name SortedCollection#concat
+ @public
+ @function
+ @description Join a given collection with the current one
+ @param {Object} hNew A SortedCollection to join from
+ */
+ this.concat = function (hNew) {
+ for (var i = 0; i < hNew.order.length; i++) {
+ var key = hNew.order[i];
+ var val = hNew.items[key];
+ this.setItem(key, val);
+ }
+ };
+
+ /**
+ @name SortedCollection#push
+ @public
+ @function
+ @return {Number} Returns the count of items
+ @description Appends a new item to the collection
+ @param {String} key The key to use for the item
+ @param {Any} val The value to use for the item
+ */
+ this.push = function (key, val) {
+ this.insertAtIndex(this.count, key, val);
+ return this.count;
+ };
+
+ /**
+ @name SortedCollection#pop
+ @public
+ @function
+ @return {Any} Returns the value for the last item in the collection
+ @description Pops off the last item in the collection and returns it's value
+ */
+ this.pop = function () {
+ var pos = this.count-1;
+ var ret = this.items[this.order[pos]];
+ if (typeof ret != 'undefined') {
+ this.removeByIndex(pos);
+ return ret;
+ }
+ else {
+ return;
+ }
+ };
+
+ /**
+ @name SortedCollection#unshift
+ @public
+ @function
+ @return {Number} Returns the count of items
+ @description Prepends a new item to the beginning of the collection
+ @param {String} key The key to use for the item
+ @param {Any} val The value to use for the item
+ */
+ this.unshift = function (key, val) {
+ this.insertAtIndex(0, key, val);
+ return this.count;
+ };
+
+ /**
+ @name SortedCollection#shift
+ @public
+ @function
+ @return {Number} Returns the removed items value
+ @description Removes the first item in the list and returns it's value
+ */
+ this.shift = function () {
+ var pos = 0;
+ var ret = this.items[this.order[pos]];
+ if (typeof ret != 'undefined') {
+ this.removeByIndex(pos);
+ return ret;
+ }
+ else {
+ return;
+ }
+ };
+
+ /**
+ @name SortedCollection#splice
+ @public
+ @function
+ @description Removes items from index to the given max and then adds the given
+ collections items
+ @param {Number} index The index to start at when removing items
+ @param {Number} numToRemove The number of items to remove before adding the new items
+ @param {Object} hash the collection of items to add
+ */
+ this.splice = function (index, numToRemove, hash) {
+ var _this = this;
+ // Removal
+ if (numToRemove > 0) {
+ // Items
+ var limit = index + numToRemove;
+ for (var i = index; i < limit; i++) {
+ delete this.items[this.order[i]];
+ }
+ // Order
+ this.order.splice(index, numToRemove);
+ }
+ // Adding
+ if (hash) {
+ // Items
+ for (var i in hash.items) {
+ this.items[i] = hash.items[i];
+ }
+ // Order
+ var args = hash.order;
+ args.unshift(0);
+ args.unshift(index);
+ this.order.splice.apply(this.order, args);
+ }
+ this.count = this.order.length;
+ };
+
+ this.sort = function (c) {
+ var arr = [];
+ // Assumes vals are comparable scalars
+ var comp = function (a, b) {
+ return c(a.val, b.val);
+ }
+ for (var i = 0; i < this.order.length; i++) {
+ var key = this.order[i];
+ arr[i] = { key: key, val: this.items[key] };
+ }
+ arr.sort(comp);
+ this.order = [];
+ for (var i = 0; i < arr.length; i++) {
+ this.order.push(arr[i].key);
+ }
+ };
+
+ this.sortByKey = function (comp) {
+ this.order.sort(comp);
+ };
+
+ /**
+ @name SortedCollection#reverse
+ @public
+ @function
+ @description Reverse the collection item list
+ */
+ this.reverse = function () {
+ this.order.reverse();
+ };
+
+})();
+
+module.exports.SortedCollection = SortedCollection;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/string.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/string.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/string.js
new file mode 100644
index 0000000..9c35a08
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/string.js
@@ -0,0 +1,791 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 core = require('./core')
+ , inflection = require('./inflection')
+ , string;
+
+
+/**
+ @name string
+ @namespace string
+*/
+
+string = new (function () {
+
+ // Regexes for trimming, and character maps for escaping
+ var _LTR = /^\s+/
+ , _RTR = /\s+$/
+ , _TR = /^\s+|\s+$/g
+ , _NL = /\n|\r|\r\n/g
+ , _CHARS = {
+ '&': '&'
+ , '<': '<'
+ , '>': '>'
+ , '"': '"'
+ , '\'': '''
+ }
+ , _UUID_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')
+ , _buildEscape
+ , _buildEscapeTest;
+
+ // Builds the escape/unescape methods using a
+ // map of characters
+ _buildEscape = function (direction) {
+ return function (str) {
+ var string = str;
+
+ // If string is NaN, null or undefined then provide an empty default
+ if((typeof string === 'undefined') ||
+ string === null ||
+ (!string && isNaN(string))) {
+ string = '';
+ }
+ string = string.toString();
+
+ var from, to, p;
+ for (p in _CHARS) {
+ from = direction == 'to' ? p : _CHARS[p];
+ to = direction == 'to' ? _CHARS[p] : p;
+
+ string = string.replace(new RegExp(from, 'gm'), to);
+ }
+
+ return string;
+ }
+ };
+
+ // Builds a method that tests for any escapable
+ // characters, useful for avoiding double-scaping if
+ // you're not sure if a string has already been escaped
+ _buildEscapeTest = function (direction) {
+ return function (string) {
+ var pat = ''
+ , p;
+
+ for (p in _CHARS) {
+ pat += direction == 'to' ? p : _CHARS[p];
+ pat += '|';
+ }
+
+ pat = pat.substr(0, pat.length - 1);
+ pat = new RegExp(pat, "gm");
+ return pat.test(string)
+ }
+ };
+
+ // Escape special XMl chars
+ this.escapeXML = _buildEscape('to');
+
+ // Unescape XML chars to literal representation
+ this.unescapeXML = _buildEscape('from');
+
+ // Test if a string includes special chars
+ // that need escaping
+ this.needsEscape = _buildEscapeTest('to');
+
+ // Test if a string includes escaped chars
+ // that need unescaping
+ this.needsUnescape = _buildEscapeTest('from');
+
+ /**
+ @name string#escapeRegExpChars
+ @public
+ @function
+ @return {String} A string of escaped characters
+ @description Escapes regex control-characters in strings
+ used to build regexes dynamically
+ @param {String} string The string of chars to escape
+ */
+ this.escapeRegExpChars = (function () {
+ var specials = [ '^', '$', '/', '.', '*', '+', '?', '|', '(', ')',
+ '[', ']', '{', '}', '\\' ];
+ sRE = new RegExp('(\\' + specials.join('|\\') + ')', 'g');
+ return function (string) {
+ var str = string || '';
+ str = String(str);
+ return str.replace(sRE, '\\$1');
+ };
+ }).call(this);
+
+ /**
+ @name string#toArray
+ @public
+ @function
+ @return {Array} Returns an array of characters
+ @description Converts a string to an array
+ @param {String} string The string to convert
+ */
+ this.toArray = function (string) {
+ var str = string || ''
+ , arr = []
+ , i = -1;
+ str = String(str);
+
+ while (++i < str.length) {
+ arr.push(str.substr(i, 1));
+ }
+
+ return arr;
+ };
+
+ /**
+ @name string#reverse
+ @public
+ @function
+ @return {String} Returns the `string` reversed
+ @description Reverses a string
+ @param {String} string The string to reverse
+ */
+ this.reverse = function (string) {
+ var str = string || '';
+ str = String(str);
+ return this.toArray(str).reverse().join('');
+ };
+
+ /**
+ @name string#ltrim
+ @public
+ @function
+ @return {String} Returns the trimmed string
+ @description Ltrim trims `char` from the left of a `string` and returns it
+ if no `char` is given it will trim spaces
+ @param {String} string The string to trim
+ @param {String} char The character to trim
+ */
+ this.ltrim = function (string, char) {
+ var str = string || ''
+ , pat = char ? new RegExp('^' + char + '+') : _LTR;
+ str = String(str);
+
+ return str.replace(pat, '');
+ };
+
+ /**
+ @name string#rtrim
+ @public
+ @function
+ @return {String} Returns the trimmed string
+ @description Rtrim trims `char` from the right of a `string` and returns it
+ if no `char` is given it will trim spaces
+ @param {String} string The string to trim
+ @param {String} char The character to trim
+ */
+ this.rtrim = function (string, char) {
+ var str = string || ''
+ , pat = char ? new RegExp(char + '+$') : _RTR;
+ str = String(str);
+
+ return str.replace(pat, '');
+ };
+
+ // Alias
+ this.chomp = this.rtrim;
+
+ /**
+ @name string#trim
+ @public
+ @function
+ @return {String} Returns the trimmed string
+ @description Trim trims `char` from the left and right of a `string` and returns it
+ if no `char` is given it will trim spaces
+ @param {String} string The string to trim
+ @param {String} char The character to trim
+ */
+ this.trim = function (string, char) {
+ var str = string || ''
+ , pat = char ? new RegExp('^' + char + '+|' + char + '+$', 'g') : _TR;
+ str = String(str);
+
+ return str.replace(pat, '');
+ };
+
+ /**
+ @name string#chop
+ @public
+ @function
+ @description Returns a new String with the last character removed. If the
+ string ends with \r\n, both characters are removed. Applying chop to an
+ empty string returns an empty string.
+ @param {String} string to return with the last character removed.
+ */
+ this.chop = function (string) {
+ var index
+ , str = string || '';
+ str = String(str);
+
+ if (str.length) {
+ // Special-case for \r\n
+ index = str.indexOf('\r\n');
+ if (index == str.length - 2) {
+ return str.substring(0, index);
+ }
+ return str.substring(0, str.length - 1);
+ }
+ else {
+ return '';
+ }
+ };
+
+ /**
+ @name string#lpad
+ @public
+ @function
+ @return {String} Returns the padded string
+ @description Lpad adds `char` to the left of `string` until the length
+ of `string` is more than `width`
+ @param {String} string The string to pad
+ @param {String} char The character to pad with
+ @param {Number} width the width to pad to
+ */
+ this.lpad = function (string, char, width) {
+ var str = string || ''
+ , width;
+ str = String(str);
+
+ // Should width be string.length + 1? or the same to be safe
+ width = parseInt(width, 10) || str.length;
+ char = char || ' ';
+
+ while (str.length < width) {
+ str = char + str;
+ }
+ return str;
+ };
+
+ /**
+ @name string#rpad
+ @public
+ @function
+ @return {String} Returns the padded string
+ @description Rpad adds `char` to the right of `string` until the length
+ of `string` is more than `width`
+ @param {String} string The string to pad
+ @param {String} char The character to pad with
+ @param {Number} width the width to pad to
+ */
+ this.rpad = function (string, char, width) {
+ var str = string || ''
+ , width;
+ str = String(str);
+
+ // Should width be string.length + 1? or the same to be safe
+ width = parseInt(width, 10) || str.length;
+ char = char || ' ';
+
+ while (str.length < width) {
+ str += char;
+ }
+ return str;
+ };
+
+ /**
+ @name string#pad
+ @public
+ @function
+ @return {String} Returns the padded string
+ @description Pad adds `char` to the left and right of `string` until the length
+ of `string` is more than `width`
+ @param {String} string The string to pad
+ @param {String} char The character to pad with
+ @param {Number} width the width to pad to
+ */
+ this.pad = function (string, char, width) {
+ var str = string || ''
+ , width;
+ str = String(str);
+
+ // Should width be string.length + 1? or the same to be safe
+ width = parseInt(width, 10) || str.length;
+ char = char || ' ';
+
+ while (str.length < width) {
+ str = char + str + char;
+ }
+ return str;
+ };
+
+ /**
+ @name string#truncate
+ @public
+ @function
+ @return {String} Returns the truncated string
+ @description Truncates a given `string` after a specified `length` if `string` is longer than
+ `length`. The last characters will be replaced with an `omission` for a total length
+ not exceeding `length`. If `callback` is given it will fire if `string` is truncated.
+ @param {String} string The string to truncate
+ @param {Integer/Object} options Options for truncation, If options is an Integer it will be length
+ @param {Integer} [options.length=string.length] Length the output string will be
+ @param {Integer} [options.len] Alias for `length`
+ @param {String} [options.omission='...'] Replace last characters with an omission
+ @param {String} [options.ellipsis='...'] Alias for `omission`
+ @param {String/RegExp} [options.seperator] Break the truncated test at the nearest `seperator`
+ @param {Function} callback Callback is called only if a truncation is done
+ */
+ this.truncate = function (string, options, callback) {
+ var str = string || ''
+ , stringLen
+ , opts
+ , stringLenWithOmission
+ , last
+ , ignoreCase
+ , multiLine
+ , stringToWorkWith
+ , lastIndexOf
+ , nextStop
+ , result
+ , returnString;
+
+ str = String(str);
+ stringLen = str.length
+
+ // If `options` is a number, assume it's the length and
+ // create a options object with length
+ if (typeof options === 'number') {
+ opts = {
+ length: options
+ };
+ }
+ else {
+ opts = options || {};
+ }
+
+ // Set `opts` defaults
+ opts.length = opts.length || stringLen;
+ opts.omission = opts.omission || opts.ellipsis || '...';
+
+ stringLenWithOmission = opts.length - opts.omission.length;
+
+ // Set the index to stop at for `string`
+ if (opts.seperator) {
+ if (opts.seperator instanceof RegExp) {
+ // If `seperator` is a regex
+ if (opts.seperator.global) {
+ opts.seperator = opts.seperator;
+ } else {
+ ignoreCase = opts.seperator.ignoreCase ? 'i' : ''
+ multiLine = opts.seperator.multiLine ? 'm' : '';
+ opts.seperator = new RegExp(opts.seperator.source,
+ 'g' + ignoreCase + multiLine);
+ }
+ stringToWorkWith = str.substring(0, stringLenWithOmission + 1)
+ lastIndexOf = -1
+ nextStop = 0
+
+ while ((result = opts.seperator.exec(stringToWorkWith))) {
+ lastIndexOf = result.index;
+ opts.seperator.lastIndex = ++nextStop;
+ }
+ last = lastIndexOf;
+ }
+ else {
+ // Seperator is a String
+ last = str.lastIndexOf(opts.seperator, stringLenWithOmission);
+ }
+
+ // If the above couldn't be found, they'll default to -1 so,
+ // we need to just set it as `stringLenWithOmission`
+ if (last === -1) {
+ last = stringLenWithOmission;
+ }
+ }
+ else {
+ last = stringLenWithOmission;
+ }
+
+ if (stringLen < opts.length) {
+ return str;
+ }
+ else {
+ returnString = str.substring(0, last) + opts.omission;
+ returnString += callback && typeof callback === 'function' ? callback() : '';
+ return returnString;
+ }
+ };
+
+ /**
+ @name string#truncateHTML
+ @public
+ @function
+ @return {String} Returns the HTML safe truncated string
+ @description Truncates a given `string` inside HTML tags after a specified `length` if string`
+ is longer than `length`. The last characters will be replaced with an `omission`
+ for a total length not exceeding `length`. If `callback` is given it will fire if
+ `string` is truncated. If `once` is true only the first string in the first HTML
+ tags will be truncated leaving the others as they were
+ @param {String} string The string to truncate
+ @param {Integer/Object} options Options for truncation, If options is an Integer it will be length
+ all Object options are the same as `truncate`
+ @param {Boolean} [options.once=false] If true, it will only be truncated once, otherwise the
+ truncation will loop through all text inside HTML tags
+ @param {Function} callback Callback is called only if a truncation is done
+ */
+ this.truncateHTML = function (string, options, callback) {
+ var str = string || ''
+ , returnString = ''
+ , opts = options;
+
+ str = String(str);
+
+ // If `options` is a number assume it's the length and create a options object with length
+ if (typeof opts === 'number') {
+ var num = opts;
+
+ opts = {};
+ opts.length = num;
+ } else opts = opts || {};
+
+ // Set `default` options for HTML specifics
+ opts.once = opts.once || false;
+
+ var pat = /(<[^>]*>)/ // Patter for matching HTML tags
+ , arr = [] // Holds the HTML tags and content seperately
+ , truncated = false
+ , result = pat.exec(str)
+ , item
+ , firstPos
+ , lastPos
+ , i;
+
+ // Gather the HTML tags and content into the array
+ while (result) {
+ firstPos = result.index;
+ lastPos = pat.lastIndex;
+
+ if (firstPos !== 0) {
+ // Should be content not HTML tags
+ arr.push(str.substring(0, firstPos));
+ // Slice content from string
+ str = str.slice(firstPos);
+ }
+
+ arr.push(result[0]); // Push HTML tags
+ str = str.slice(result[0].length);
+
+ // Re-run the pattern on the new string
+ result = pat.exec(str);
+ }
+ if (str !== '') {
+ arr.push(str);
+ }
+
+ // Loop through array items appending the tags to the string,
+ // - and truncating the text then appending it to content
+ i = -1;
+ while (++i < arr.length) {
+ item = arr[i];
+ switch (true) {
+ // Closing tag
+ case item.indexOf('</') == 0:
+ returnString += item;
+ openTag = null;
+ break;
+ // Opening tag
+ case item.indexOf('<') == 0:
+ returnString += item;
+ openTag = item;
+ break;
+ // Normal text
+ default:
+ if (opts.once && truncated) {
+ returnString += item;
+ } else {
+ returnString += this.truncate(item, opts, callback);
+ truncated = true;
+ }
+ break;
+ }
+ }
+
+ return returnString;
+ };
+
+ /**
+ @name string#nl2br
+ @public
+ @function
+ @return {String} The string with converted newlines chars to br tags
+ @description Nl2br returns a string where all newline chars are turned
+ into line break HTML tags
+ @param {String} string The string to convert
+ */
+ this.nl2br = function (string) {
+ var str = string || '';
+ str = String(str);
+
+ return str.replace(_NL,'<br />');
+ };
+
+ /**
+ @name string#snakeize
+ @public
+ @function
+ @return {String} The string in a snake_case version
+ @description Snakeize converts camelCase and CamelCase strings to snake_case strings
+ @param {String} string The string to convert to snake_case
+ @param {String} separ='_' The seperator to use
+ */
+ this.snakeize = (function () {
+ // Only create regexes once on initial load
+ var repl = /([A-Z]+)/g
+ , lead = /^_/g;
+ return function (string, separ) {
+ var str = string || ''
+ , sep = separ || '_'
+ , leading = separ ? new RegExp('^' + sep, 'g') : lead;
+ str = String(str);
+ return str.replace(repl, sep + '$1').toLowerCase().
+ replace(leading, '');
+ };
+ }).call(this);
+
+ // Aliases
+ /**
+ @name string#underscorize
+ @public
+ @function
+ @return {String} The string in a underscorized version
+ @description Underscorize returns the given `string` converting camelCase and snakeCase to underscores
+ @param {String} string The string to underscorize
+ */
+ this.underscorize = this.snakeize;
+ this.underscoreize = this.snakeize;
+ this.decamelize = this.snakeize;
+
+ /**
+ @name string#camelize
+ @public
+ @function
+ @return {String} The string in a camelCase version
+ @description Camelize takes a string and optional options and
+ returns a camelCase version of the given `string`
+ @param {String} string The string to convert to camelCase
+ @param {Object} options
+ @param {Boolean} [options.initialCap] If initialCap is true the returned
+ string will have a capitalized first letter
+ @param {Boolean} [options.leadingUnderscore] If leadingUnderscore os true then if
+ an underscore exists at the beggining
+ of the string, it will stay there.
+ Otherwise it'll be removed.
+ */
+ this.camelize = (function () {
+ // Only create regex once on initial load
+ var repl = /[-_](\w)/g;
+ return function (string, options) {
+ var str = string || ''
+ , ret
+ , config = {
+ initialCap: false
+ , leadingUnderscore: false
+ }
+ , opts = options || {};
+
+ str = String(str);
+
+ // Backward-compat
+ if (typeof opts == 'boolean') {
+ config = {
+ initialCap: true
+ };
+ }
+ else {
+ core.mixin(config, opts);
+ }
+
+ ret = str.replace(repl, function (m, m1) {
+ return m1.toUpperCase();
+ });
+
+ if (config.leadingUnderscore & str.indexOf('_') === 0) {
+ ret = '_' + this.decapitalize(ret);
+ }
+ // If initialCap is true capitalize it
+ ret = config.initialCap ? this.capitalize(ret) : this.decapitalize(ret);
+
+ return ret;
+ };
+ }).call(this);
+
+ /**
+ @name string#decapitalize
+ @public
+ @function
+ @return {String} The string with the first letter decapitalized
+ @description Decapitalize returns the given string with the first letter uncapitalized.
+ @param {String} string The string to decapitalize
+ */
+ this.decapitalize = function (string) {
+ var str = string || '';
+ str = String(str);
+
+ return str.substr(0, 1).toLowerCase() + str.substr(1);
+ };
+
+ /**
+ @name string#capitalize
+ @public
+ @function
+ @return {String} The string with the first letter capitalized
+ @description capitalize returns the given string with the first letter capitalized.
+ @param {String} string The string to capitalize
+ */
+ this.capitalize = function (string) {
+ var str = string || '';
+ str = String(str);
+
+ return str.substr(0, 1).toUpperCase() + str.substr(1);
+ };
+
+ /**
+ @name string#dasherize
+ @public
+ @function
+ @return {String} The string in a dashed version
+ @description Dasherize returns the given `string` converting camelCase and snakeCase
+ to dashes or replace them with the `replace` character.
+ @param {String} string The string to dasherize
+ @param {String} replace='-' The character to replace with
+ */
+ this.dasherize = function (string, replace) {
+ var repl = replace || '-'
+ return this.snakeize(string, repl);
+ };
+
+ /**
+ @name string#include
+ @public
+ @function
+ @return {Boolean} Returns true if the string is found in the string to search
+ @description Searches for a particular string in another string
+ @param {String} searchIn The string to search for the other string in
+ @param {String} searchFor The string to search for
+ */
+ this.include = function (searchIn, searchFor) {
+ var str = searchFor;
+ if (!str && typeof string != 'string') {
+ return false;
+ }
+ str = String(str);
+ return (searchIn.indexOf(str) > -1);
+ };
+
+ /*
+ * getInflections(name<String>, initialCap<String>)
+ *
+ * Inflection returns an object that contains different inflections
+ * created from the given `name`
+ */
+
+ /**
+ @name string#getInflections
+ @public
+ @function
+ @return {Object} A Object containing multiple different inflects for the given `name`
+ @description Inflection returns an object that contains different inflections
+ created from the given `name`
+ @param {String} name The string to create inflections from
+ */
+ this.getInflections = function (name) {
+ if (!name) {
+ return;
+ }
+
+ var self = this
+ // Use plural version to fix possible mistakes(e,g,. thingie instead of thingy)
+ , normalizedName = this.snakeize(inflection.pluralize(name))
+ , nameSingular = inflection.singularize(normalizedName)
+ , namePlural = inflection.pluralize(normalizedName);
+
+ return {
+ // For filepaths or URLs
+ filename: {
+ // neil_peart
+ singular: nameSingular
+ // neil_pearts
+ , plural: namePlural
+ }
+ // Constructor names
+ , constructor: {
+ // NeilPeart
+ singular: self.camelize(nameSingular, {initialCap: true})
+ // NeilPearts
+ , plural: self.camelize(namePlural, {initialCap: true})
+ }
+ , property: {
+ // neilPeart
+ singular: self.camelize(nameSingular)
+ // neilPearts
+ , plural: self.camelize(namePlural)
+ }
+ };
+ };
+
+ /**
+ @name string#getInflection
+ @public
+ @function
+ @return {Object} A Object containing multiple different inflects for the given `name`
+ @description Inflection returns an object that contains different inflections
+ created from the given `name`
+ @param {String} name The string to create inflections from
+ */
+ this.getInflection = function (name, key, pluralization) {
+ var infl = this.getInflections(name);
+ return infl[key][pluralization];
+ };
+
+ // From Math.uuid.js, https://github.com/broofa/node-uuid
+ // Robert Kieffer (robert@broofa.com), MIT license
+ this.uuid = function (length, radix) {
+ var chars = _UUID_CHARS
+ , uuid = []
+ , r
+ , i;
+
+ radix = radix || chars.length;
+
+ if (length) {
+ // Compact form
+ i = -1;
+ while (++i < length) {
+ uuid[i] = chars[0 | Math.random()*radix];
+ }
+ } else {
+ // rfc4122, version 4 form
+
+ // rfc4122 requires these characters
+ uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
+ uuid[14] = '4';
+
+ // Fill in random data. At i==19 set the high bits of clock sequence as
+ // per rfc4122, sec. 4.1.5
+ i = -1;
+ while (++i < 36) {
+ if (!uuid[i]) {
+ r = 0 | Math.random()*16;
+ uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
+ }
+ }
+ }
+
+ return uuid.join('');
+ };
+
+})();
+
+module.exports = string;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/uri.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/uri.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/uri.js
new file mode 100644
index 0000000..92f086f
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/uri.js
@@ -0,0 +1,177 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 uri
+ , string = require('./string');
+
+/**
+ @name uri
+ @namespace uri
+*/
+
+uri = new (function () {
+ var _isArray = function (obj) {
+ return obj &&
+ typeof obj === 'object' &&
+ typeof obj.length === 'number' &&
+ typeof obj.splice === 'function' &&
+ !(obj.propertyIsEnumerable('length'));
+ };
+
+ /**
+ @name uri#getFileExtension
+ @public
+ @function
+ @return {String} Returns the file extension for a given path
+ @description Gets the file extension for a path and returns it
+ @param {String} path The path to get the extension for
+ */
+ this.getFileExtension = function (path) {
+ var match;
+ if (path) {
+ match = /.+\.(\w{2,4}$)/.exec(path);
+ }
+ return (match && match[1]) || '';
+ };
+
+ /**
+ @name uri#paramify
+ @public
+ @function
+ @return {String} Returns a querystring contains the given values
+ @description Convert a JS Object to a querystring (key=val&key=val). Values in arrays
+ will be added as multiple parameters
+ @param {Object} obj An Object containing only scalars and arrays
+ @param {Object} o The options to use for formatting
+ @param {Boolean} [o.consolidate=false] take values from elements that can return
+ multiple values (multi-select, checkbox groups) and collapse into a single,
+ comman-delimited value.
+ @param {Boolean} [o.includeEmpty=false] include keys in the string for all elements, even
+ they have no value set (e.g., even if elemB has no value: elemA=foo&elemB=&elemC=bar).
+ Note that some false-y values are always valid even without this option, [0, ''].
+ This option extends coverage to [null, undefined, NaN]
+ @param {Boolean} [o.snakeize=false] change param names from camelCase to snake_case.
+ @param {Boolean} [o.escapeVals=false] escape the values for XML entities.
+ */
+ this.paramify = function (obj, o) {
+ var opts = o || {},
+ str = '',
+ key,
+ val,
+ isValid,
+ itemArray,
+ arr = [],
+ arrVal;
+
+ for (var p in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, p)) {
+ val = obj[p];
+
+ // This keeps valid falsy values like false and 0
+ // It's duplicated in the array block below. Could
+ // put it in a function but don't want the overhead
+ isValid = !( val === null || val === undefined ||
+ (typeof val === 'number' && isNaN(val)) );
+
+ key = opts.snakeize ? string.snakeize(p) : p;
+ if (isValid) {
+ // Multiple vals -- array
+ if (_isArray(val) && val.length) {
+ itemArray = [];
+ for (var i = 0, ii = val.length; i < ii; i++) {
+ arrVal = val[i];
+ // This keeps valid falsy values like false and 0
+ isValid = !( arrVal === null || arrVal === undefined ||
+ (typeof arrVal === 'number' && isNaN(arrVal)) );
+
+ itemArray[i] = isValid ? encodeURIComponent(arrVal) : '';
+ if (opts.escapeVals) {
+ itemArray[i] = string.escapeXML(itemArray[i]);
+ }
+ }
+ // Consolidation mode -- single value joined on comma
+ if (opts.consolidate) {
+ arr.push(key + '=' + itemArray.join(','));
+ }
+ // Normal mode -- multiple, same-named params with each val
+ else {
+ // {foo: [1, 2, 3]} => 'foo=1&foo=2&foo=3'
+ // Add into results array, as this just ends up getting
+ // joined on ampersand at the end anyhow
+ arr.push(key + '=' + itemArray.join('&' + key + '='));
+ }
+ }
+ // Single val -- string
+ else {
+ if (opts.escapeVals) {
+ val = string.escapeXML(val);
+ }
+ arr.push(key + '=' + encodeURIComponent(val));
+ }
+ str += '&';
+ }
+ else {
+ if (opts.includeEmpty) { arr.push(key + '='); }
+ }
+ }
+ }
+ return arr.join('&');
+ };
+
+ /**
+ @name uri#objectify
+ @public
+ @function
+ @return {Object} JavaScript key/val object with the values from the querystring
+ @description Convert the values in a query string (key=val&key=val) to an Object
+ @param {String} str The querystring to convert to an object
+ @param {Object} o The options to use for formatting
+ @param {Boolean} [o.consolidate=true] Convert multiple instances of the same
+ key into an array of values instead of overwriting
+ */
+ this.objectify = function (str, o) {
+ var opts = o || {};
+ var d = {};
+ var consolidate = typeof opts.consolidate == 'undefined' ?
+ true : opts.consolidate;
+ if (str) {
+ var arr = str.split('&');
+ for (var i = 0; i < arr.length; i++) {
+ var pair = arr[i].split('=');
+ var name = pair[0];
+ var val = decodeURIComponent(pair[1] || '');
+ // "We've already got one!" -- arrayize if the flag
+ // is set
+ if (typeof d[name] != 'undefined' && consolidate) {
+ if (typeof d[name] == 'string') {
+ d[name] = [d[name]];
+ }
+ d[name].push(val);
+ }
+ // Otherwise just set the value
+ else {
+ d[name] = val;
+ }
+ }
+ }
+ return d;
+ };
+
+})();
+
+module.exports = uri;
+
[26/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/repl.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/repl.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/repl.js
new file mode 100644
index 0000000..6c79291
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/repl.js
@@ -0,0 +1,159 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var CoffeeScript, addHistory, addMultilineHandler, fs, merge, nodeREPL, path, prettyErrorMessage, replDefaults, vm, _ref;
+
+ fs = require('fs');
+
+ path = require('path');
+
+ vm = require('vm');
+
+ nodeREPL = require('repl');
+
+ CoffeeScript = require('./coffee-script');
+
+ _ref = require('./helpers'), merge = _ref.merge, prettyErrorMessage = _ref.prettyErrorMessage;
+
+ replDefaults = {
+ prompt: 'coffee> ',
+ historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0,
+ historyMaxInputSize: 10240,
+ "eval": function(input, context, filename, cb) {
+ var Assign, Block, Literal, Value, ast, err, js, _ref1;
+ input = input.replace(/\uFF00/g, '\n');
+ input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1');
+ _ref1 = require('./nodes'), Block = _ref1.Block, Assign = _ref1.Assign, Value = _ref1.Value, Literal = _ref1.Literal;
+ try {
+ ast = CoffeeScript.nodes(input);
+ ast = new Block([new Assign(new Value(new Literal('_')), ast, '=')]);
+ js = ast.compile({
+ bare: true,
+ locals: Object.keys(context)
+ });
+ return cb(null, vm.runInContext(js, context, filename));
+ } catch (_error) {
+ err = _error;
+ return cb(prettyErrorMessage(err, filename, input, true));
+ }
+ }
+ };
+
+ addMultilineHandler = function(repl) {
+ var inputStream, multiline, nodeLineListener, outputStream, rli;
+ rli = repl.rli, inputStream = repl.inputStream, outputStream = repl.outputStream;
+ multiline = {
+ enabled: false,
+ initialPrompt: repl.prompt.replace(/^[^> ]*/, function(x) {
+ return x.replace(/./g, '-');
+ }),
+ prompt: repl.prompt.replace(/^[^> ]*>?/, function(x) {
+ return x.replace(/./g, '.');
+ }),
+ buffer: ''
+ };
+ nodeLineListener = rli.listeners('line')[0];
+ rli.removeListener('line', nodeLineListener);
+ rli.on('line', function(cmd) {
+ if (multiline.enabled) {
+ multiline.buffer += "" + cmd + "\n";
+ rli.setPrompt(multiline.prompt);
+ rli.prompt(true);
+ } else {
+ nodeLineListener(cmd);
+ }
+ });
+ return inputStream.on('keypress', function(char, key) {
+ if (!(key && key.ctrl && !key.meta && !key.shift && key.name === 'v')) {
+ return;
+ }
+ if (multiline.enabled) {
+ if (!multiline.buffer.match(/\n/)) {
+ multiline.enabled = !multiline.enabled;
+ rli.setPrompt(repl.prompt);
+ rli.prompt(true);
+ return;
+ }
+ if ((rli.line != null) && !rli.line.match(/^\s*$/)) {
+ return;
+ }
+ multiline.enabled = !multiline.enabled;
+ rli.line = '';
+ rli.cursor = 0;
+ rli.output.cursorTo(0);
+ rli.output.clearLine(1);
+ multiline.buffer = multiline.buffer.replace(/\n/g, '\uFF00');
+ rli.emit('line', multiline.buffer);
+ multiline.buffer = '';
+ } else {
+ multiline.enabled = !multiline.enabled;
+ rli.setPrompt(multiline.initialPrompt);
+ rli.prompt(true);
+ }
+ });
+ };
+
+ addHistory = function(repl, filename, maxSize) {
+ var buffer, fd, lastLine, readFd, size, stat;
+ lastLine = null;
+ try {
+ stat = fs.statSync(filename);
+ size = Math.min(maxSize, stat.size);
+ readFd = fs.openSync(filename, 'r');
+ buffer = new Buffer(size);
+ fs.readSync(readFd, buffer, 0, size, stat.size - size);
+ repl.rli.history = buffer.toString().split('\n').reverse();
+ if (stat.size > maxSize) {
+ repl.rli.history.pop();
+ }
+ if (repl.rli.history[0] === '') {
+ repl.rli.history.shift();
+ }
+ repl.rli.historyIndex = -1;
+ lastLine = repl.rli.history[0];
+ } catch (_error) {}
+ fd = fs.openSync(filename, 'a');
+ repl.rli.addListener('line', function(code) {
+ if (code && code.length && code !== '.history' && lastLine !== code) {
+ fs.write(fd, "" + code + "\n");
+ return lastLine = code;
+ }
+ });
+ repl.rli.on('exit', function() {
+ return fs.close(fd);
+ });
+ return repl.commands['.history'] = {
+ help: 'Show command history',
+ action: function() {
+ repl.outputStream.write("" + (repl.rli.history.slice(0).reverse().join('\n')) + "\n");
+ return repl.displayPrompt();
+ }
+ };
+ };
+
+ module.exports = {
+ start: function(opts) {
+ var build, major, minor, repl, _ref1;
+ if (opts == null) {
+ opts = {};
+ }
+ _ref1 = process.versions.node.split('.').map(function(n) {
+ return parseInt(n);
+ }), major = _ref1[0], minor = _ref1[1], build = _ref1[2];
+ if (major === 0 && minor < 8) {
+ console.warn("Node 0.8.0+ required for CoffeeScript REPL");
+ process.exit(1);
+ }
+ opts = merge(replDefaults, opts);
+ repl = nodeREPL.start(opts);
+ repl.on('exit', function() {
+ return repl.outputStream.write('\n');
+ });
+ addMultilineHandler(repl);
+ if (opts.historyFile) {
+ addHistory(repl, opts.historyFile, opts.historyMaxInputSize);
+ }
+ return repl;
+ }
+ };
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/rewriter.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/rewriter.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/rewriter.js
new file mode 100644
index 0000000..11f36a3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/rewriter.js
@@ -0,0 +1,485 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
+ __slice = [].slice;
+
+ generate = function(tag, value) {
+ var tok;
+ tok = [tag, value];
+ tok.generated = true;
+ return tok;
+ };
+
+ exports.Rewriter = (function() {
+ function Rewriter() {}
+
+ Rewriter.prototype.rewrite = function(tokens) {
+ this.tokens = tokens;
+ this.removeLeadingNewlines();
+ this.removeMidExpressionNewlines();
+ this.closeOpenCalls();
+ this.closeOpenIndexes();
+ this.addImplicitIndentation();
+ this.tagPostfixConditionals();
+ this.addImplicitBracesAndParens();
+ this.addLocationDataToGeneratedTokens();
+ return this.tokens;
+ };
+
+ Rewriter.prototype.scanTokens = function(block) {
+ var i, token, tokens;
+ tokens = this.tokens;
+ i = 0;
+ while (token = tokens[i]) {
+ i += block.call(this, token, i, tokens);
+ }
+ return true;
+ };
+
+ Rewriter.prototype.detectEnd = function(i, condition, action) {
+ var levels, token, tokens, _ref, _ref1;
+ tokens = this.tokens;
+ levels = 0;
+ while (token = tokens[i]) {
+ if (levels === 0 && condition.call(this, token, i)) {
+ return action.call(this, token, i);
+ }
+ if (!token || levels < 0) {
+ return action.call(this, token, i - 1);
+ }
+ if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
+ levels += 1;
+ } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) {
+ levels -= 1;
+ }
+ i += 1;
+ }
+ return i - 1;
+ };
+
+ Rewriter.prototype.removeLeadingNewlines = function() {
+ var i, tag, _i, _len, _ref;
+ _ref = this.tokens;
+ for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
+ tag = _ref[i][0];
+ if (tag !== 'TERMINATOR') {
+ break;
+ }
+ }
+ if (i) {
+ return this.tokens.splice(0, i);
+ }
+ };
+
+ Rewriter.prototype.removeMidExpressionNewlines = function() {
+ return this.scanTokens(function(token, i, tokens) {
+ var _ref;
+ if (!(token[0] === 'TERMINATOR' && (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0))) {
+ return 1;
+ }
+ tokens.splice(i, 1);
+ return 0;
+ });
+ };
+
+ Rewriter.prototype.closeOpenCalls = function() {
+ var action, condition;
+ condition = function(token, i) {
+ var _ref;
+ return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')';
+ };
+ action = function(token, i) {
+ return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END';
+ };
+ return this.scanTokens(function(token, i) {
+ if (token[0] === 'CALL_START') {
+ this.detectEnd(i + 1, condition, action);
+ }
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.closeOpenIndexes = function() {
+ var action, condition;
+ condition = function(token, i) {
+ var _ref;
+ return (_ref = token[0]) === ']' || _ref === 'INDEX_END';
+ };
+ action = function(token, i) {
+ return token[0] = 'INDEX_END';
+ };
+ return this.scanTokens(function(token, i) {
+ if (token[0] === 'INDEX_START') {
+ this.detectEnd(i + 1, condition, action);
+ }
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.matchTags = function() {
+ var fuzz, i, j, pattern, _i, _ref, _ref1;
+ i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ fuzz = 0;
+ for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) {
+ while (this.tag(i + j + fuzz) === 'HERECOMMENT') {
+ fuzz += 2;
+ }
+ if (pattern[j] == null) {
+ continue;
+ }
+ if (typeof pattern[j] === 'string') {
+ pattern[j] = [pattern[j]];
+ }
+ if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ Rewriter.prototype.looksObjectish = function(j) {
+ return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':');
+ };
+
+ Rewriter.prototype.findTagsBackwards = function(i, tags) {
+ var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
+ backStack = [];
+ while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) {
+ if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) {
+ backStack.push(this.tag(i));
+ }
+ if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) {
+ backStack.pop();
+ }
+ i -= 1;
+ }
+ return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0;
+ };
+
+ Rewriter.prototype.addImplicitBracesAndParens = function() {
+ var stack;
+ stack = [];
+ return this.scanTokens(function(token, i, tokens) {
+ var endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
+ tag = token[0];
+ prevTag = (i > 0 ? tokens[i - 1] : [])[0];
+ nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0];
+ stackTop = function() {
+ return stack[stack.length - 1];
+ };
+ startIdx = i;
+ forward = function(n) {
+ return i - startIdx + n;
+ };
+ inImplicit = function() {
+ var _ref, _ref1;
+ return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0;
+ };
+ inImplicitCall = function() {
+ var _ref;
+ return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '(';
+ };
+ inImplicitObject = function() {
+ var _ref;
+ return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{';
+ };
+ inImplicitControl = function() {
+ var _ref;
+ return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL';
+ };
+ startImplicitCall = function(j) {
+ var idx;
+ idx = j != null ? j : i;
+ stack.push([
+ '(', idx, {
+ ours: true
+ }
+ ]);
+ tokens.splice(idx, 0, generate('CALL_START', '('));
+ if (j == null) {
+ return i += 1;
+ }
+ };
+ endImplicitCall = function() {
+ stack.pop();
+ tokens.splice(i, 0, generate('CALL_END', ')'));
+ return i += 1;
+ };
+ startImplicitObject = function(j, startsLine) {
+ var idx;
+ if (startsLine == null) {
+ startsLine = true;
+ }
+ idx = j != null ? j : i;
+ stack.push([
+ '{', idx, {
+ sameLine: true,
+ startsLine: startsLine,
+ ours: true
+ }
+ ]);
+ tokens.splice(idx, 0, generate('{', generate(new String('{'))));
+ if (j == null) {
+ return i += 1;
+ }
+ };
+ endImplicitObject = function(j) {
+ j = j != null ? j : i;
+ stack.pop();
+ tokens.splice(j, 0, generate('}', '}'));
+ return i += 1;
+ };
+ if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) {
+ stack.push([
+ 'CONTROL', i, {
+ ours: true
+ }
+ ]);
+ return forward(1);
+ }
+ if (tag === 'INDENT' && inImplicit()) {
+ if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') {
+ while (inImplicitCall()) {
+ endImplicitCall();
+ }
+ }
+ if (inImplicitControl()) {
+ stack.pop();
+ }
+ stack.push([tag, i]);
+ return forward(1);
+ }
+ if (__indexOf.call(EXPRESSION_START, tag) >= 0) {
+ stack.push([tag, i]);
+ return forward(1);
+ }
+ if (__indexOf.call(EXPRESSION_END, tag) >= 0) {
+ while (inImplicit()) {
+ if (inImplicitCall()) {
+ endImplicitCall();
+ } else if (inImplicitObject()) {
+ endImplicitObject();
+ } else {
+ stack.pop();
+ }
+ }
+ stack.pop();
+ }
+ if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) {
+ if (tag === '?') {
+ tag = token[0] = 'FUNC_EXIST';
+ }
+ startImplicitCall(i + 1);
+ return forward(2);
+ }
+ if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) {
+ startImplicitCall(i + 1);
+ stack.push(['INDENT', i + 2]);
+ return forward(3);
+ }
+ if (tag === ':') {
+ if (this.tag(i - 2) === '@') {
+ s = i - 2;
+ } else {
+ s = i - 1;
+ }
+ while (this.tag(s - 2) === 'HERECOMMENT') {
+ s -= 2;
+ }
+ startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine;
+ if (stackTop()) {
+ _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1];
+ if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) {
+ return forward(1);
+ }
+ }
+ startImplicitObject(s, !!startsLine);
+ return forward(2);
+ }
+ if (prevTag === 'OUTDENT' && inImplicitCall() && (tag === '.' || tag === '?.' || tag === '::' || tag === '?::')) {
+ endImplicitCall();
+ return forward(1);
+ }
+ if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) {
+ stackTop()[2].sameLine = false;
+ }
+ if (__indexOf.call(IMPLICIT_END, tag) >= 0) {
+ while (inImplicit()) {
+ _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine);
+ if (inImplicitCall() && prevTag !== ',') {
+ endImplicitCall();
+ } else if (inImplicitObject() && sameLine && !startsLine) {
+ endImplicitObject();
+ } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) {
+ endImplicitObject();
+ } else {
+ break;
+ }
+ }
+ }
+ if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) {
+ offset = nextTag === 'OUTDENT' ? 1 : 0;
+ while (inImplicitObject()) {
+ endImplicitObject(i + offset);
+ }
+ }
+ return forward(1);
+ });
+ };
+
+ Rewriter.prototype.addLocationDataToGeneratedTokens = function() {
+ return this.scanTokens(function(token, i, tokens) {
+ var column, line, nextLocation, prevLocation, _ref, _ref1;
+ if (token[2]) {
+ return 1;
+ }
+ if (!(token.generated || token.explicit)) {
+ return 1;
+ }
+ if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) {
+ line = nextLocation.first_line, column = nextLocation.first_column;
+ } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) {
+ line = prevLocation.last_line, column = prevLocation.last_column;
+ } else {
+ line = column = 0;
+ }
+ token[2] = {
+ first_line: line,
+ first_column: column,
+ last_line: line,
+ last_column: column
+ };
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.addImplicitIndentation = function() {
+ var action, condition, indent, outdent, starter;
+ starter = indent = outdent = null;
+ condition = function(token, i) {
+ var _ref, _ref1;
+ return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref1 = token[0]) === 'CATCH' || _ref1 === 'FINALLY') && (starter === '->' || starter === '=>'));
+ };
+ action = function(token, i) {
+ return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);
+ };
+ return this.scanTokens(function(token, i, tokens) {
+ var j, tag, _i, _ref, _ref1;
+ tag = token[0];
+ if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') {
+ tokens.splice(i, 1);
+ return 0;
+ }
+ if (tag === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') {
+ tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation())));
+ return 2;
+ }
+ if (tag === 'CATCH') {
+ for (j = _i = 1; _i <= 2; j = ++_i) {
+ if (!((_ref = this.tag(i + j)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) {
+ continue;
+ }
+ tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation())));
+ return 2 + j;
+ }
+ }
+ if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) {
+ starter = tag;
+ _ref1 = this.indentation(true), indent = _ref1[0], outdent = _ref1[1];
+ if (starter === 'THEN') {
+ indent.fromThen = true;
+ }
+ tokens.splice(i + 1, 0, indent);
+ this.detectEnd(i + 2, condition, action);
+ if (tag === 'THEN') {
+ tokens.splice(i, 1);
+ }
+ return 1;
+ }
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.tagPostfixConditionals = function() {
+ var action, condition, original;
+ original = null;
+ condition = function(token, i) {
+ var prevTag, tag;
+ tag = token[0];
+ prevTag = this.tokens[i - 1][0];
+ return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0);
+ };
+ action = function(token, i) {
+ if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) {
+ return original[0] = 'POST_' + original[0];
+ }
+ };
+ return this.scanTokens(function(token, i) {
+ if (token[0] !== 'IF') {
+ return 1;
+ }
+ original = token;
+ this.detectEnd(i + 1, condition, action);
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.indentation = function(implicit) {
+ var indent, outdent;
+ if (implicit == null) {
+ implicit = false;
+ }
+ indent = ['INDENT', 2];
+ outdent = ['OUTDENT', 2];
+ if (implicit) {
+ indent.generated = outdent.generated = true;
+ }
+ if (!implicit) {
+ indent.explicit = outdent.explicit = true;
+ }
+ return [indent, outdent];
+ };
+
+ Rewriter.prototype.generate = generate;
+
+ Rewriter.prototype.tag = function(i) {
+ var _ref;
+ return (_ref = this.tokens[i]) != null ? _ref[0] : void 0;
+ };
+
+ return Rewriter;
+
+ })();
+
+ BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']];
+
+ exports.INVERSES = INVERSES = {};
+
+ EXPRESSION_START = [];
+
+ EXPRESSION_END = [];
+
+ for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) {
+ _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];
+ EXPRESSION_START.push(INVERSES[rite] = left);
+ EXPRESSION_END.push(INVERSES[left] = rite);
+ }
+
+ EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END);
+
+ IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];
+
+ IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++'];
+
+ IMPLICIT_UNSPACED_CALL = ['+', '-'];
+
+ IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR'];
+
+ SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN'];
+
+ SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN'];
+
+ LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/scope.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/scope.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/scope.js
new file mode 100644
index 0000000..a09ba97
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/scope.js
@@ -0,0 +1,146 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var Scope, extend, last, _ref;
+
+ _ref = require('./helpers'), extend = _ref.extend, last = _ref.last;
+
+ exports.Scope = Scope = (function() {
+ Scope.root = null;
+
+ function Scope(parent, expressions, method) {
+ this.parent = parent;
+ this.expressions = expressions;
+ this.method = method;
+ this.variables = [
+ {
+ name: 'arguments',
+ type: 'arguments'
+ }
+ ];
+ this.positions = {};
+ if (!this.parent) {
+ Scope.root = this;
+ }
+ }
+
+ Scope.prototype.add = function(name, type, immediate) {
+ if (this.shared && !immediate) {
+ return this.parent.add(name, type, immediate);
+ }
+ if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
+ return this.variables[this.positions[name]].type = type;
+ } else {
+ return this.positions[name] = this.variables.push({
+ name: name,
+ type: type
+ }) - 1;
+ }
+ };
+
+ Scope.prototype.namedMethod = function() {
+ var _ref1;
+ if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) {
+ return this.method;
+ }
+ return this.parent.namedMethod();
+ };
+
+ Scope.prototype.find = function(name) {
+ if (this.check(name)) {
+ return true;
+ }
+ this.add(name, 'var');
+ return false;
+ };
+
+ Scope.prototype.parameter = function(name) {
+ if (this.shared && this.parent.check(name, true)) {
+ return;
+ }
+ return this.add(name, 'param');
+ };
+
+ Scope.prototype.check = function(name) {
+ var _ref1;
+ return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0));
+ };
+
+ Scope.prototype.temporary = function(name, index) {
+ if (name.length > 1) {
+ return '_' + name + (index > 1 ? index - 1 : '');
+ } else {
+ return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a');
+ }
+ };
+
+ Scope.prototype.type = function(name) {
+ var v, _i, _len, _ref1;
+ _ref1 = this.variables;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
+ if (v.name === name) {
+ return v.type;
+ }
+ }
+ return null;
+ };
+
+ Scope.prototype.freeVariable = function(name, reserve) {
+ var index, temp;
+ if (reserve == null) {
+ reserve = true;
+ }
+ index = 0;
+ while (this.check((temp = this.temporary(name, index)))) {
+ index++;
+ }
+ if (reserve) {
+ this.add(temp, 'var', true);
+ }
+ return temp;
+ };
+
+ Scope.prototype.assign = function(name, value) {
+ this.add(name, {
+ value: value,
+ assigned: true
+ }, true);
+ return this.hasAssignments = true;
+ };
+
+ Scope.prototype.hasDeclarations = function() {
+ return !!this.declaredVariables().length;
+ };
+
+ Scope.prototype.declaredVariables = function() {
+ var realVars, tempVars, v, _i, _len, _ref1;
+ realVars = [];
+ tempVars = [];
+ _ref1 = this.variables;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
+ if (v.type === 'var') {
+ (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name);
+ }
+ }
+ return realVars.sort().concat(tempVars.sort());
+ };
+
+ Scope.prototype.assignedVariables = function() {
+ var v, _i, _len, _ref1, _results;
+ _ref1 = this.variables;
+ _results = [];
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
+ if (v.type.assigned) {
+ _results.push("" + v.name + " = " + v.type.value);
+ }
+ }
+ return _results;
+ };
+
+ return Scope;
+
+ })();
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/sourcemap.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/sourcemap.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/sourcemap.js
new file mode 100644
index 0000000..4bb6f25
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/sourcemap.js
@@ -0,0 +1,161 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var LineMap, SourceMap;
+
+ LineMap = (function() {
+ function LineMap(line) {
+ this.line = line;
+ this.columns = [];
+ }
+
+ LineMap.prototype.add = function(column, _arg, options) {
+ var sourceColumn, sourceLine;
+ sourceLine = _arg[0], sourceColumn = _arg[1];
+ if (options == null) {
+ options = {};
+ }
+ if (this.columns[column] && options.noReplace) {
+ return;
+ }
+ return this.columns[column] = {
+ line: this.line,
+ column: column,
+ sourceLine: sourceLine,
+ sourceColumn: sourceColumn
+ };
+ };
+
+ LineMap.prototype.sourceLocation = function(column) {
+ var mapping;
+ while (!((mapping = this.columns[column]) || (column <= 0))) {
+ column--;
+ }
+ return mapping && [mapping.sourceLine, mapping.sourceColumn];
+ };
+
+ return LineMap;
+
+ })();
+
+ SourceMap = (function() {
+ var BASE64_CHARS, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK;
+
+ function SourceMap() {
+ this.lines = [];
+ }
+
+ SourceMap.prototype.add = function(sourceLocation, generatedLocation, options) {
+ var column, line, lineMap, _base;
+ if (options == null) {
+ options = {};
+ }
+ line = generatedLocation[0], column = generatedLocation[1];
+ lineMap = ((_base = this.lines)[line] || (_base[line] = new LineMap(line)));
+ return lineMap.add(column, sourceLocation, options);
+ };
+
+ SourceMap.prototype.sourceLocation = function(_arg) {
+ var column, line, lineMap;
+ line = _arg[0], column = _arg[1];
+ while (!((lineMap = this.lines[line]) || (line <= 0))) {
+ line--;
+ }
+ return lineMap && lineMap.sourceLocation(column);
+ };
+
+ SourceMap.prototype.generate = function(options, code) {
+ var buffer, lastColumn, lastSourceColumn, lastSourceLine, lineMap, lineNumber, mapping, needComma, v3, writingline, _i, _j, _len, _len1, _ref, _ref1;
+ if (options == null) {
+ options = {};
+ }
+ if (code == null) {
+ code = null;
+ }
+ writingline = 0;
+ lastColumn = 0;
+ lastSourceLine = 0;
+ lastSourceColumn = 0;
+ needComma = false;
+ buffer = "";
+ _ref = this.lines;
+ for (lineNumber = _i = 0, _len = _ref.length; _i < _len; lineNumber = ++_i) {
+ lineMap = _ref[lineNumber];
+ if (lineMap) {
+ _ref1 = lineMap.columns;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ mapping = _ref1[_j];
+ if (!(mapping)) {
+ continue;
+ }
+ while (writingline < mapping.line) {
+ lastColumn = 0;
+ needComma = false;
+ buffer += ";";
+ writingline++;
+ }
+ if (needComma) {
+ buffer += ",";
+ needComma = false;
+ }
+ buffer += this.encodeVlq(mapping.column - lastColumn);
+ lastColumn = mapping.column;
+ buffer += this.encodeVlq(0);
+ buffer += this.encodeVlq(mapping.sourceLine - lastSourceLine);
+ lastSourceLine = mapping.sourceLine;
+ buffer += this.encodeVlq(mapping.sourceColumn - lastSourceColumn);
+ lastSourceColumn = mapping.sourceColumn;
+ needComma = true;
+ }
+ }
+ }
+ v3 = {
+ version: 3,
+ file: options.generatedFile || '',
+ sourceRoot: options.sourceRoot || '',
+ sources: options.sourceFiles || [''],
+ names: [],
+ mappings: buffer
+ };
+ if (options.inline) {
+ v3.sourcesContent = [code];
+ }
+ return JSON.stringify(v3, null, 2);
+ };
+
+ VLQ_SHIFT = 5;
+
+ VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT;
+
+ VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1;
+
+ SourceMap.prototype.encodeVlq = function(value) {
+ var answer, nextChunk, signBit, valueToEncode;
+ answer = '';
+ signBit = value < 0 ? 1 : 0;
+ valueToEncode = (Math.abs(value) << 1) + signBit;
+ while (valueToEncode || !answer) {
+ nextChunk = valueToEncode & VLQ_VALUE_MASK;
+ valueToEncode = valueToEncode >> VLQ_SHIFT;
+ if (valueToEncode) {
+ nextChunk |= VLQ_CONTINUATION_BIT;
+ }
+ answer += this.encodeBase64(nextChunk);
+ }
+ return answer;
+ };
+
+ BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+
+ SourceMap.prototype.encodeBase64 = function(value) {
+ return BASE64_CHARS[value] || (function() {
+ throw new Error("Cannot Base64 encode value: " + value);
+ })();
+ };
+
+ return SourceMap;
+
+ })();
+
+ module.exports = SourceMap;
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/package.json b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/package.json
new file mode 100644
index 0000000..c1fe8d0
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/package.json
@@ -0,0 +1,50 @@
+{
+ "name": "coffee-script",
+ "description": "Unfancy JavaScript",
+ "keywords": [
+ "javascript",
+ "language",
+ "coffeescript",
+ "compiler"
+ ],
+ "author": {
+ "name": "Jeremy Ashkenas"
+ },
+ "version": "1.6.3",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE"
+ }
+ ],
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "directories": {
+ "lib": "./lib/coffee-script"
+ },
+ "main": "./lib/coffee-script/coffee-script",
+ "bin": {
+ "coffee": "./bin/coffee",
+ "cake": "./bin/cake"
+ },
+ "scripts": {
+ "test": "node ./bin/cake test"
+ },
+ "homepage": "http://coffeescript.org",
+ "bugs": {
+ "url": "https://github.com/jashkenas/coffee-script/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jashkenas/coffee-script.git"
+ },
+ "devDependencies": {
+ "uglify-js": "~2.2",
+ "jison": ">=0.2.0"
+ },
+ "readme": "\n {\n } } {\n { { } }\n } }{ {\n { }{ } } _____ __ __\n ( }{ }{ { ) / ____| / _|/ _|\n .- { { } { }} -. | | ___ | |_| |_ ___ ___\n ( ( } { } { } } ) | | / _ \\| _| _/ _ \\/ _ \\\n |`-..________ ..-'| | |___| (_) | | | || __/ __/\n | | \\_____\\___/|_| |_| \\___|\\___|\n | ;--.\n | (__ \\ _____ _ _\n | | ) ) / ____| (_) | |\n | |/ / | (___ ___ _ __ _ _ __ | |_\n | ( / \\___ \\ / __| '__| | '_ \\| __|\n | |/ ____) | (__| | | | |_) | |_\n | | |_____/ \\___|_| |_| .__/ \\__|\n `-.._________..-' | |\n
|_|\n\n\n CoffeeScript is a little language that compiles into JavaScript.\n\n Install Node.js, and then the CoffeeScript compiler:\n sudo bin/cake install\n\n Or, if you have the Node Package Manager installed:\n npm install -g coffee-script\n (Leave off the -g if you don't wish to install globally.)\n\n Execute a script:\n coffee /path/to/script.coffee\n\n Compile a script:\n coffee -c /path/to/script.coffee\n\n For documentation, usage, and examples, see:\n http://coffeescript.org/\n\n To suggest a feature, report a bug, or general discussion:\n http://github.com/jashkenas/coffee-script/issues/\n\n If you'd like to chat, drop by #coffeescript on Freenode IRC,\n or on webchat.freenode.net.\n\n The source repository:\n git://github.com/jashkenas/coffee-script.git\n\n All contributors are listed here:\n http://github.com/jashkenas/coffee-script/contributors\n",
+ "readmeFilename": "README",
+ "_id": "coffee-script@1.6.3",
+ "_from": "coffee-script@>=1.0.1"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/.editorconfig
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/.editorconfig b/blackberry10/node_modules/jasmine-node/node_modules/gaze/.editorconfig
new file mode 100644
index 0000000..0f09989
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/.editorconfig
@@ -0,0 +1,10 @@
+# editorconfig.org
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/.jshintrc
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/.jshintrc b/blackberry10/node_modules/jasmine-node/node_modules/gaze/.jshintrc
new file mode 100644
index 0000000..6b4c1a9
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/.jshintrc
@@ -0,0 +1,14 @@
+{
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "sub": true,
+ "undef": true,
+ "boss": true,
+ "eqnull": true,
+ "node": true,
+ "es5": true
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/.npmignore b/blackberry10/node_modules/jasmine-node/node_modules/gaze/.npmignore
new file mode 100644
index 0000000..2ccbe46
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/.npmignore
@@ -0,0 +1 @@
+/node_modules/
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/.travis.yml b/blackberry10/node_modules/jasmine-node/node_modules/gaze/.travis.yml
new file mode 100644
index 0000000..343380c
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - 0.8
+ - 0.9
+before_script:
+ - npm install -g grunt-cli
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/AUTHORS
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/AUTHORS b/blackberry10/node_modules/jasmine-node/node_modules/gaze/AUTHORS
new file mode 100644
index 0000000..69d9663
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/AUTHORS
@@ -0,0 +1,5 @@
+Kyle Robinson Young (http://dontkry.com)
+Sam Day (http://sam.is-super-awesome.com)
+Roarke Gaskill (http://starkinvestments.com)
+Lance Pollard (http://lancepollard.com/)
+Daniel Fagnan (http://hydrocodedesign.com/)
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/Gruntfile.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/Gruntfile.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/Gruntfile.js
new file mode 100644
index 0000000..0206147
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/Gruntfile.js
@@ -0,0 +1,32 @@
+module.exports = function(grunt) {
+ 'use strict';
+ grunt.initConfig({
+ benchmark: {
+ all: {
+ src: ['benchmarks/*.js'],
+ options: { times: 10 }
+ }
+ },
+ nodeunit: {
+ files: ['test/**/*_test.js'],
+ },
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc'
+ },
+ gruntfile: {
+ src: 'Gruntfile.js'
+ },
+ lib: {
+ src: ['lib/**/*.js']
+ },
+ test: {
+ src: ['test/**/*_test.js']
+ },
+ }
+ });
+ grunt.loadNpmTasks('grunt-benchmark');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-nodeunit');
+ grunt.registerTask('default', ['jshint', 'nodeunit']);
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/LICENSE-MIT
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/LICENSE-MIT b/blackberry10/node_modules/jasmine-node/node_modules/gaze/LICENSE-MIT
new file mode 100644
index 0000000..8c1a833
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2013 Kyle Robinson Young
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/README.md b/blackberry10/node_modules/jasmine-node/node_modules/gaze/README.md
new file mode 100644
index 0000000..ed2acbe
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/README.md
@@ -0,0 +1,172 @@
+# gaze [](http://travis-ci.org/shama/gaze)
+
+A globbing fs.watch wrapper built from the best parts of other fine watch libs.
+
+Compatible with NodeJS v0.8/0.6, Windows, OSX and Linux.
+
+## Usage
+Install the module with: `npm install gaze` or place into your `package.json`
+and run `npm install`.
+
+```javascript
+var gaze = require('gaze');
+
+// Watch all .js files/dirs in process.cwd()
+gaze('**/*.js', function(err, watcher) {
+ // Files have all started watching
+ // watcher === this
+
+ // Get all watched files
+ console.log(this.watched());
+
+ // On file changed
+ this.on('changed', function(filepath) {
+ console.log(filepath + ' was changed');
+ });
+
+ // On file added
+ this.on('added', function(filepath) {
+ console.log(filepath + ' was added');
+ });
+
+ // On file deleted
+ this.on('deleted', function(filepath) {
+ console.log(filepath + ' was deleted');
+ });
+
+ // On changed/added/deleted
+ this.on('all', function(event, filepath) {
+ console.log(filepath + ' was ' + event);
+ });
+
+ // Get watched files with relative paths
+ console.log(this.relative());
+});
+
+// Also accepts an array of patterns
+gaze(['stylesheets/*.css', 'images/**/*.png'], function() {
+ // Add more patterns later to be watched
+ this.add(['js/*.js']);
+});
+```
+
+### Alternate Interface
+
+```javascript
+var Gaze = require('gaze').Gaze;
+
+var gaze = new Gaze('**/*');
+
+// Files have all started watching
+gaze.on('ready', function(watcher) { });
+
+// A file has been added/changed/deleted has occurred
+gaze.on('all', function(event, filepath) { });
+```
+
+### Errors
+
+```javascript
+gaze('**/*', function() {
+ this.on('error', function(err) {
+ // Handle error here
+ });
+});
+```
+
+### Minimatch / Glob
+
+See [isaacs's minimatch](https://github.com/isaacs/minimatch) for more
+information on glob patterns.
+
+## Documentation
+
+### gaze(patterns, [options], callback)
+
+* `patterns` {String|Array} File patterns to be matched
+* `options` {Object}
+* `callback` {Function}
+ * `err` {Error | null}
+ * `watcher` {Object} Instance of the Gaze watcher
+
+### Class: gaze.Gaze
+
+Create a Gaze object by instanting the `gaze.Gaze` class.
+
+```javascript
+var Gaze = require('gaze').Gaze;
+var gaze = new Gaze(pattern, options, callback);
+```
+
+#### Properties
+
+* `options` The options object passed in.
+ * `interval` {integer} Interval to pass to fs.watchFile
+ * `debounceDelay` {integer} Delay for events called in succession for the same
+ file/event
+
+#### Events
+
+* `ready(watcher)` When files have been globbed and watching has begun.
+* `all(event, filepath)` When an `added`, `changed` or `deleted` event occurs.
+* `added(filepath)` When a file has been added to a watch directory.
+* `changed(filepath)` When a file has been changed.
+* `deleted(filepath)` When a file has been deleted.
+* `renamed(newPath, oldPath)` When a file has been renamed.
+* `end()` When the watcher is closed and watches have been removed.
+* `error(err)` When an error occurs.
+
+#### Methods
+
+* `emit(event, [...])` Wrapper for the EventEmitter.emit.
+ `added`|`changed`|`deleted` events will also trigger the `all` event.
+* `close()` Unwatch all files and reset the watch instance.
+* `add(patterns, callback)` Adds file(s) patterns to be watched.
+* `remove(filepath)` removes a file or directory from being watched. Does not
+ recurse directories.
+* `watched()` Returns the currently watched files.
+* `relative([dir, unixify])` Returns the currently watched files with relative paths.
+ * `dir` {string} Only return relative files for this directory.
+ * `unixify` {boolean} Return paths with `/` instead of `\\` if on Windows.
+
+## FAQs
+
+### Why Another `fs.watch` Wrapper?
+I liked parts of other `fs.watch` wrappers but none had all the features I
+needed. This lib combines the features I needed from other fine watch libs:
+Speedy data behavior from
+[paulmillr's chokidar](https://github.com/paulmillr/chokidar), API interface
+from [mikeal's watch](https://github.com/mikeal/watch) and file globbing using
+[isaacs's glob](https://github.com/isaacs/node-glob) which is also used by
+[cowboy's Grunt](https://github.com/gruntjs/grunt).
+
+### How do I fix the error `EMFILE: Too many opened files.`?
+This is because of your system's max opened file limit. For OSX the default is
+very low (256). Increase your limit temporarily with `ulimit -n 10480`, the
+number being the new max limit.
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style.
+Add unit tests for any new or changed functionality. Lint and test your code
+using [grunt](http://gruntjs.com/).
+
+## Release History
+* 0.3.4 - Code clean up. Fix path must be strings errors (@groner). Fix incorrect added events (@groner).
+* 0.3.3 - Fix for multiple patterns with negate.
+* 0.3.2 - Emit `end` before removeAllListeners.
+* 0.3.1 - Fix added events within subfolder patterns.
+* 0.3.0 - Handle safewrite events, `forceWatchMethod` option removed, bug fixes and watch optimizations (@rgaskill).
+* 0.2.2 - Fix issue where subsequent add calls dont get watched (@samcday). removeAllListeners on close.
+* 0.2.1 - Fix issue with invalid `added` events in current working dir.
+* 0.2.0 - Support and mark folders with `path.sep`. Add `forceWatchMethod` option. Support `renamed` events.
+* 0.1.6 - Recognize the `cwd` option properly
+* 0.1.5 - Catch too many open file errors
+* 0.1.4 - Really fix the race condition with 2 watches
+* 0.1.3 - Fix race condition with 2 watches
+* 0.1.2 - Read triggering changed event fix
+* 0.1.1 - Minor fixes
+* 0.1.0 - Initial release
+
+## License
+Copyright (c) 2013 Kyle Robinson Young
+Licensed under the MIT license.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/benchmarks/gaze100s.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/benchmarks/gaze100s.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/benchmarks/gaze100s.js
new file mode 100644
index 0000000..1ada219
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/benchmarks/gaze100s.js
@@ -0,0 +1,46 @@
+'use strict';
+
+var gaze = require('../lib/gaze');
+var grunt = require('grunt');
+var path = require('path');
+
+// Folder to watch
+var watchDir = path.resolve(__dirname, 'watch');
+
+// Helper for creating mock files
+function createFiles(num, dir) {
+ for (var i = 0; i < num; i++) {
+ grunt.file.write(path.join(dir, 'test-' + i + '.js'), 'var test = ' + i + ';');
+ }
+}
+
+module.exports = {
+ 'setUp': function(done) {
+ // ensure that your `ulimit -n` is higher than amount of files
+ if (grunt.file.exists(watchDir)) {
+ grunt.file.delete(watchDir, {force:true});
+ }
+ createFiles(100, path.join(watchDir, 'one'));
+ createFiles(100, path.join(watchDir, 'two'));
+ createFiles(100, path.join(watchDir, 'three'));
+ createFiles(100, path.join(watchDir, 'three', 'four'));
+ createFiles(100, path.join(watchDir, 'three', 'four', 'five', 'six'));
+ process.chdir(watchDir);
+ done();
+ },
+ 'tearDown': function(done) {
+ if (grunt.file.exists(watchDir)) {
+ grunt.file.delete(watchDir, {force:true});
+ }
+ done();
+ },
+ changed: function(done) {
+ gaze('**/*', {maxListeners:0}, function(err, watcher) {
+ this.on('changed', done);
+ setTimeout(function() {
+ var rand = String(new Date().getTime()).replace(/[^\w]+/g, '');
+ grunt.file.write(path.join(watchDir, 'one', 'test-99.js'), 'var test = "' + rand + '"');
+ }, 100);
+ });
+ }
+};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/lib/gaze.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/lib/gaze.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/lib/gaze.js
new file mode 100644
index 0000000..85da897
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/lib/gaze.js
@@ -0,0 +1,466 @@
+/*
+ * gaze
+ * https://github.com/shama/gaze
+ *
+ * Copyright (c) 2013 Kyle Robinson Young
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+// libs
+var util = require('util');
+var EE = require('events').EventEmitter;
+var fs = require('fs');
+var path = require('path');
+var fileset = require('fileset');
+var minimatch = require('minimatch');
+
+// globals
+var delay = 10;
+
+// `Gaze` EventEmitter object to return in the callback
+function Gaze(patterns, opts, done) {
+ var _this = this;
+ EE.call(_this);
+
+ // If second arg is the callback
+ if (typeof opts === 'function') {
+ done = opts;
+ opts = {};
+ }
+
+ // Default options
+ opts = opts || {};
+ opts.mark = true;
+ opts.interval = opts.interval || 100;
+ opts.debounceDelay = opts.debounceDelay || 500;
+ opts.cwd = opts.cwd || process.cwd();
+ this.options = opts;
+
+ // Default done callback
+ done = done || function() {};
+
+ // Remember our watched dir:files
+ this._watched = Object.create(null);
+
+ // Store watchers
+ this._watchers = Object.create(null);
+
+ // Store patterns
+ this._patterns = [];
+
+ // Cached events for debouncing
+ this._cached = Object.create(null);
+
+ // Set maxListeners
+ if (this.options.maxListeners) {
+ this.setMaxListeners(this.options.maxListeners);
+ Gaze.super_.prototype.setMaxListeners(this.options.maxListeners);
+ delete this.options.maxListeners;
+ }
+
+ // Initialize the watch on files
+ if (patterns) {
+ this.add(patterns, done);
+ }
+
+ return this;
+}
+util.inherits(Gaze, EE);
+
+// Main entry point. Start watching and call done when setup
+module.exports = function gaze(patterns, opts, done) {
+ return new Gaze(patterns, opts, done);
+};
+module.exports.Gaze = Gaze;
+
+// Node v0.6 compat
+fs.existsSync = fs.existsSync || path.existsSync;
+path.sep = path.sep || path.normalize('/');
+
+/**
+ * Lo-Dash 1.0.1 <http://lodash.com/>
+ * Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.4.4 <http://underscorejs.org/>
+ * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
+ * Available under MIT license <http://lodash.com/license>
+ */
+function unique() { var array = Array.prototype.concat.apply(Array.prototype, arguments); var result = []; for (var i = 0; i < array.length; i++) { if (result.indexOf(array[i]) === -1) { result.push(array[i]); } } return result; }
+
+/**
+ * Copyright (c) 2010 Caolan McMahon
+ * Available under MIT license <https://raw.github.com/caolan/async/master/LICENSE>
+ */
+function forEachSeries(arr, iterator, callback) {
+ 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();
+}
+
+// other helpers
+
+// Returns boolean whether filepath is dir terminated
+function _isDir(dir) {
+ if (typeof dir !== 'string') { return false; }
+ return (dir.slice(-(path.sep.length)) === path.sep);
+}
+
+// Create a `key:[]` if doesnt exist on `obj` then push or concat the `val`
+function _objectPush(obj, key, val) {
+ if (obj[key] == null) { obj[key] = []; }
+ if (Array.isArray(val)) { obj[key] = obj[key].concat(val); }
+ else if (val) { obj[key].push(val); }
+ return obj[key] = unique(obj[key]);
+}
+
+// Ensures the dir is marked with path.sep
+function _markDir(dir) {
+ if (typeof dir === 'string' &&
+ dir.slice(-(path.sep.length)) !== path.sep &&
+ dir !== '.') {
+ dir += path.sep;
+ }
+ return dir;
+}
+
+// Changes path.sep to unix ones for testing
+function _unixifyPathSep(filepath) {
+ return (process.platform === 'win32') ? String(filepath).replace(/\\/g, '/') : filepath;
+}
+
+// Override the emit function to emit `all` events
+// and debounce on duplicate events per file
+Gaze.prototype.emit = function() {
+ var _this = this;
+ var args = arguments;
+
+ var e = args[0];
+ var filepath = args[1];
+ var timeoutId;
+
+ // If not added/deleted/changed/renamed then just emit the event
+ if (e.slice(-2) !== 'ed') {
+ Gaze.super_.prototype.emit.apply(_this, args);
+ return this;
+ }
+
+ // Detect rename event, if added and previous deleted is in the cache
+ if (e === 'added') {
+ Object.keys(this._cached).forEach(function(oldFile) {
+ if (_this._cached[oldFile].indexOf('deleted') !== -1) {
+ args[0] = e = 'renamed';
+ [].push.call(args, oldFile);
+ delete _this._cached[oldFile];
+ return false;
+ }
+ });
+ }
+
+ // If cached doesnt exist, create a delay before running the next
+ // then emit the event
+ var cache = this._cached[filepath] || [];
+ if (cache.indexOf(e) === -1) {
+ _objectPush(_this._cached, filepath, e);
+ clearTimeout(timeoutId);
+ timeoutId = setTimeout(function() {
+ delete _this._cached[filepath];
+ }, this.options.debounceDelay);
+ // Emit the event and `all` event
+ Gaze.super_.prototype.emit.apply(_this, args);
+ Gaze.super_.prototype.emit.apply(_this, ['all', e].concat([].slice.call(args, 1)));
+ }
+
+ return this;
+};
+
+// Close watchers
+Gaze.prototype.close = function(_reset) {
+ var _this = this;
+ _reset = _reset === false ? false : true;
+ Object.keys(_this._watchers).forEach(function(file) {
+ _this._watchers[file].close();
+ });
+ _this._watchers = Object.create(null);
+ Object.keys(this._watched).forEach(function(dir) {
+ fs.unwatchFile(dir);
+ _this._watched[dir].forEach(function(uFile) {
+ fs.unwatchFile(uFile);
+ });
+ });
+ if (_reset) {
+ _this._watched = Object.create(null);
+ setTimeout(function() {
+ _this.emit('end');
+ _this.removeAllListeners();
+ }, delay + 100);
+ }
+ return _this;
+};
+
+// Add file patterns to be watched
+Gaze.prototype.add = function(files, done) {
+ var _this = this;
+ if (typeof files === 'string') {
+ files = [files];
+ }
+ this._patterns = unique.apply(null, [this._patterns, files]);
+
+ var include = [], exclude = [];
+ this._patterns.forEach(function(p) {
+ if (p.slice(0, 1) === '!') {
+ exclude.push(p.slice(1));
+ } else {
+ include.push(p);
+ }
+ });
+
+ fileset(include, exclude, _this.options, function(err, files) {
+ if (err) {
+ _this.emit('error', err);
+ return done(err);
+ }
+ _this._addToWatched(files);
+ _this.close(false);
+ _this._initWatched(done);
+ });
+};
+
+// Remove file/dir from `watched`
+Gaze.prototype.remove = function(file) {
+ var _this = this;
+ if (this._watched[file]) {
+ // is dir, remove all files
+ fs.unwatchFile(file);
+ this._watched[file].forEach(fs.unwatchFile);
+ delete this._watched[file];
+ } else {
+ // is a file, find and remove
+ Object.keys(this._watched).forEach(function(dir) {
+ var index = _this._watched[dir].indexOf(file);
+ if (index !== -1) {
+ fs.unwatchFile(file);
+ _this._watched[dir].splice(index, 1);
+ return false;
+ }
+ });
+ }
+ if (this._watchers[file]) {
+ this._watchers[file].close();
+ }
+ return this;
+};
+
+// Return watched files
+Gaze.prototype.watched = function() {
+ return this._watched;
+};
+
+// Returns `watched` files with relative paths to process.cwd()
+Gaze.prototype.relative = function(dir, unixify) {
+ var _this = this;
+ var relative = Object.create(null);
+ var relDir, relFile, unixRelDir;
+ var cwd = this.options.cwd || process.cwd();
+ if (dir === '') { dir = '.'; }
+ dir = _markDir(dir);
+ unixify = unixify || false;
+ Object.keys(this._watched).forEach(function(dir) {
+ relDir = path.relative(cwd, dir) + path.sep;
+ if (relDir === path.sep) { relDir = '.'; }
+ unixRelDir = unixify ? _unixifyPathSep(relDir) : relDir;
+ relative[unixRelDir] = _this._watched[dir].map(function(file) {
+ relFile = path.relative(path.join(cwd, relDir), file);
+ if (_isDir(file)) {
+ relFile = _markDir(relFile);
+ }
+ if (unixify) {
+ relFile = _unixifyPathSep(relFile);
+ }
+ return relFile;
+ });
+ });
+ if (dir && unixify) {
+ dir = _unixifyPathSep(dir);
+ }
+ return dir ? relative[dir] || [] : relative;
+};
+
+// Adds files and dirs to watched
+Gaze.prototype._addToWatched = function(files) {
+ var _this = this;
+ files.forEach(function(file) {
+ var filepath = path.resolve(_this.options.cwd, file);
+ if (file.slice(-1) === '/') { filepath += path.sep; }
+ _objectPush(_this._watched, path.dirname(filepath) + path.sep, filepath);
+ });
+ return this;
+};
+
+// Returns true if the file matches this._patterns
+Gaze.prototype._isMatch = function(file) {
+ var include = [], exclude = [];
+ this._patterns.forEach(function(p) {
+ if (p.slice(0, 1) === '!') {
+ exclude.push(p.slice(1));
+ } else {
+ include.push(p);
+ }
+ });
+ var matched = false, i = 0;
+ for (i = 0; i < include.length; i++) {
+ if (minimatch(file, include[i])) {
+ matched = true;
+ break;
+ }
+ }
+ for (i = 0; i < exclude.length; i++) {
+ if (minimatch(file, exclude[i])) {
+ matched = false;
+ break;
+ }
+ }
+ return matched;
+};
+
+Gaze.prototype._watchDir = function(dir, done) {
+ var _this = this;
+ try {
+ _this._watchers[dir] = fs.watch(dir, function(event) {
+ // race condition. Let's give the fs a little time to settle down. so we
+ // don't fire events on non existent files.
+ setTimeout(function() {
+ if (fs.existsSync(dir)) {
+ done(null, dir);
+ }
+ }, delay + 100);
+ });
+ } catch (err) {
+ return this._handleError(err);
+ }
+ return this;
+};
+
+Gaze.prototype._pollFile = function(file, done) {
+ var _this = this;
+ var opts = { persistent: true, interval: _this.options.interval };
+ try {
+ fs.watchFile(file, opts, function(curr, prev) {
+ done(null, file);
+ });
+ } catch (err) {
+ return this._handleError(err);
+ }
+ return this;
+};
+
+// Initialize the actual watch on `watched` files
+Gaze.prototype._initWatched = function(done) {
+ var _this = this;
+ var cwd = this.options.cwd || process.cwd();
+ var curWatched = Object.keys(_this._watched);
+ forEachSeries(curWatched, function(dir, next) {
+ var files = _this._watched[dir];
+ // Triggered when a watched dir has an event
+ _this._watchDir(dir, function(event, dirpath) {
+ var relDir = cwd === dir ? '.' : path.relative(cwd, dir);
+
+ fs.readdir(dirpath, function(err, current) {
+ if (err) { return _this.emit('error', err); }
+ if (!current) { return; }
+
+ try {
+ // append path.sep to directories so they match previous.
+ current = current.map(function(curPath) {
+ if (fs.existsSync(path.join(dir, curPath)) && fs.statSync(path.join(dir, curPath)).isDirectory()) {
+ return curPath + path.sep;
+ } else {
+ return curPath;
+ }
+ });
+ } catch (err) {
+ // race condition-- sometimes the file no longer exists
+ }
+
+ // Get watched files for this dir
+ var previous = _this.relative(relDir);
+
+ // If file was deleted
+ previous.filter(function(file) {
+ return current.indexOf(file) < 0;
+ }).forEach(function(file) {
+ if (!_isDir(file)) {
+ var filepath = path.join(dir, file);
+ _this.remove(filepath);
+ _this.emit('deleted', filepath);
+ }
+ });
+
+ // If file was added
+ current.filter(function(file) {
+ return previous.indexOf(file) < 0;
+ }).forEach(function(file) {
+ // Is it a matching pattern?
+ var relFile = path.join(relDir, file);
+ // TODO: this can be optimized more
+ // we shouldnt need isMatch() and could just use add()
+ if (_this._isMatch(relFile)) {
+ // Add to watch then emit event
+ _this.add(relFile, function() {
+ _this.emit('added', path.join(dir, file));
+ });
+ }
+ });
+
+ });
+ });
+
+ // Watch for change/rename events on files
+ files.forEach(function(file) {
+ if (_isDir(file)) { return; }
+ _this._pollFile(file, function(err, filepath) {
+ // Only emit changed if the file still exists
+ // Prevents changed/deleted duplicate events
+ // TODO: This ignores changed events on folders, maybe support this?
+ // When a file is added, a folder changed event emits first
+ if (fs.existsSync(filepath)) {
+ _this.emit('changed', filepath);
+ }
+ });
+ });
+
+ next();
+ }, function() {
+
+ // Return this instance of Gaze
+ // delay before ready solves a lot of issues
+ setTimeout(function() {
+ _this.emit('ready', _this);
+ done.call(_this, null, _this);
+ }, delay + 100);
+
+ });
+};
+
+// If an error, handle it here
+Gaze.prototype._handleError = function(err) {
+ if (err.code === 'EMFILE') {
+ return this.emit('error', new Error('EMFILE: Too many opened files.'));
+ }
+ return this.emit('error', err);
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/.npmignore b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/.npmignore
@@ -0,0 +1 @@
+node_modules
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/.travis.yml b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/.travis.yml
new file mode 100644
index 0000000..b740293
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+
+node_js:
+ - 0.4
+ - 0.6
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/LICENSE-MIT
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/LICENSE-MIT b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/LICENSE-MIT
new file mode 100644
index 0000000..e6f8599
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2012 Mickael Daniel
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/README.md b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/README.md
new file mode 100644
index 0000000..c6ec211
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/README.md
@@ -0,0 +1,87 @@
+# node-fileset
+
+Exposes a basic wrapper on top of
+[Glob](https://github.com/isaacs/node-glob) /
+[minimatch](https://github.com/isaacs/minimatch) combo both written by
+@isaacs. Glob now uses JavaScript instead of C++ bindings which makes it
+usable in Node.js 0.6.x and Windows platforms.
+
+[](http://travis-ci.org/mklabs/node-fileset)
+
+Adds multiples patterns matching and exlude ability. This is
+basically just a sugar API syntax where you can specify a list of includes
+and optional exclude patterns. It works by setting up the necessary
+miniglob "fileset" and filtering out the results using minimatch.
+
+## Install
+
+ npm install fileset
+
+## Usage
+
+Can be used with callback or emitter style.
+
+* **include**: list of glob patterns `foo/**/*.js *.md src/lib/**/*`
+* **exclude**: *optional* list of glob patterns to filter include
+ results `foo/**/*.js *.md`
+* **callback**: *optional* function that gets called with an error if
+ something wrong happend, otherwise null with an array of results
+
+The callback is optional since the fileset method return an instance of
+EventEmitter which emit different events you might use:
+
+* *match*: Every time a match is found, miniglob emits this event with
+ the pattern.
+* *include*: Emitted each time an include match is found.
+* *exclude*: Emitted each time an exclude match is found and filtered
+ out from the fileset.
+* *end*: Emitted when the matching is finished with all the matches
+ found, optionally filtered by the exclude patterns.
+
+#### Callback
+
+```js
+var fileset = require('fileset');
+
+fileset('**/*.js', '**.min.js', function(err, files) {
+ if (err) return console.error(err);
+
+ console.log('Files: ', files.length);
+ console.log(files);
+});
+```
+
+#### Event emitter
+
+```js
+var fileset = require('fileset');
+
+fileset('**.coffee README.md *.json Cakefile **.js', 'node_modules/**')
+ .on('match', console.log.bind(console, 'error'))
+ .on('include', console.log.bind(console, 'includes'))
+ .on('exclude', console.log.bind(console, 'excludes'))
+ .on('end', console.log.bind(console, 'end'));
+```
+
+`fileset` returns an instance of EventEmitter, with an `includes` property
+which is the array of Fileset objects (inheriting from
+`miniglob.Miniglob`) that were used during the mathing process, should
+you want to use them individually.
+
+Check out the
+[tests](https://github.com/mklabs/node-fileset/tree/master/tests) for
+more examples.
+
+## Tests
+
+Run `npm test`
+
+## Why
+
+Mainly for a build tool with cake files, to provide me an easy way to get
+a list of files by either using glob or path patterns, optionally
+allowing exclude patterns to filter out the results.
+
+All the magic is happening in
+[Glob](https://github.com/isaacs/node-glob) and
+[minimatch](https://github.com/isaacs/minimatch). Check them out!
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/lib/fileset.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/lib/fileset.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/lib/fileset.js
new file mode 100644
index 0000000..a74077c
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/lib/fileset.js
@@ -0,0 +1,64 @@
+var util = require('util'),
+ minimatch = require('minimatch'),
+ Glob = require('glob').Glob,
+ EventEmitter = require('events').EventEmitter;
+
+module.exports = fileset;
+
+function fileset(include, exclude, options, cb) {
+ if (typeof exclude === 'function') cb = exclude, exclude = '';
+ else if (typeof options === 'function') cb = options, options = {};
+
+ var includes = (typeof include === 'string') ? include.split(' ') : include;
+ var excludes = (typeof exclude === 'string') ? exclude.split(' ') : exclude;
+
+ var em = new EventEmitter,
+ remaining = includes.length,
+ results = [];
+
+ if(!includes.length) return cb(new Error('Must provide an include pattern'));
+
+ em.includes = includes.map(function(pattern) {
+ return new fileset.Fileset(pattern, options)
+ .on('error', cb ? cb : em.emit.bind(em, 'error'))
+ .on('match', em.emit.bind(em, 'match'))
+ .on('match', em.emit.bind(em, 'include'))
+ .on('end', next.bind({}, pattern))
+ });
+
+ function next(pattern, matches) {
+ results = results.concat(matches);
+
+ if(!(--remaining)) {
+ results = results.filter(function(file) {
+ return !excludes.filter(function(glob) {
+ var match = minimatch(file, glob, { matchBase: true });
+ if(match) em.emit('exclude', file);
+ return match;
+ }).length;
+ });
+
+ if(cb) cb(null, results);
+ em.emit('end', results);
+ }
+ }
+
+ return em;
+}
+
+fileset.Fileset = function Fileset(pattern, options, cb) {
+
+ if (typeof options === 'function') cb = options, options = {};
+ if (!options) options = {};
+
+ Glob.call(this, pattern, options);
+
+ if(typeof cb === 'function') {
+ this.on('error', cb);
+ this.on('end', function(matches) { cb(null, matches); });
+ }
+};
+
+util.inherits(fileset.Fileset, Glob);
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/.npmignore b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/.npmignore
new file mode 100644
index 0000000..2af4b71
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/.npmignore
@@ -0,0 +1,2 @@
+.*.swp
+test/a/
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/.travis.yml b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/.travis.yml
new file mode 100644
index 0000000..baa0031
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - 0.8
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/LICENSE b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/LICENSE
new file mode 100644
index 0000000..0c44ae7
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. 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.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR CONTRIBUTORS
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/README.md b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/README.md
new file mode 100644
index 0000000..cc69164
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/README.md
@@ -0,0 +1,250 @@
+# Glob
+
+Match files using the patterns the shell uses, like stars and stuff.
+
+This is a glob implementation in JavaScript. It uses the `minimatch`
+library to do its matching.
+
+## Attention: node-glob users!
+
+The API has changed dramatically between 2.x and 3.x. This library is
+now 100% JavaScript, and the integer flags have been replaced with an
+options object.
+
+Also, there's an event emitter class, proper tests, and all the other
+things you've come to expect from node modules.
+
+And best of all, no compilation!
+
+## Usage
+
+```javascript
+var glob = require("glob")
+
+// options is optional
+glob("**/*.js", options, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+})
+```
+
+## Features
+
+Please see the [minimatch
+documentation](https://github.com/isaacs/minimatch) for more details.
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+* [minimatch documentation](https://github.com/isaacs/minimatch)
+
+## glob(pattern, [options], cb)
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* `cb` {Function}
+ * `err` {Error | null}
+ * `matches` {Array<String>} filenames found matching the pattern
+
+Perform an asynchronous glob search.
+
+## glob.sync(pattern, [options])
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* return: {Array<String>} filenames found matching the pattern
+
+Perform a synchronous glob search.
+
+## Class: glob.Glob
+
+Create a Glob object by instanting the `glob.Glob` class.
+
+```javascript
+var Glob = require("glob").Glob
+var mg = new Glob(pattern, options, cb)
+```
+
+It's an EventEmitter, and starts walking the filesystem to find matches
+immediately.
+
+### new glob.Glob(pattern, [options], [cb])
+
+* `pattern` {String} pattern to search for
+* `options` {Object}
+* `cb` {Function} Called when an error occurs, or matches are found
+ * `err` {Error | null}
+ * `matches` {Array<String>} filenames found matching the pattern
+
+Note that if the `sync` flag is set in the options, then matches will
+be immediately available on the `g.found` member.
+
+### Properties
+
+* `minimatch` The minimatch object that the glob uses.
+* `options` The options object passed in.
+* `error` The error encountered. When an error is encountered, the
+ glob object is in an undefined state, and should be discarded.
+* `aborted` Boolean which is set to true when calling `abort()`. There
+ is no way at this time to continue a glob search after aborting, but
+ you can re-use the statCache to avoid having to duplicate syscalls.
+* `statCache` Collection of all the stat results the glob search
+ performed.
+* `cache` Convenience object. Each field has the following possible
+ values:
+ * `false` - Path does not exist
+ * `true` - Path exists
+ * `1` - Path exists, and is not a directory
+ * `2` - Path exists, and is a directory
+ * `[file, entries, ...]` - Path exists, is a directory, and the
+ array value is the results of `fs.readdir`
+
+### Events
+
+* `end` When the matching is finished, this is emitted with all the
+ matches found. If the `nonull` option is set, and no match was found,
+ then the `matches` list contains the original pattern. The matches
+ are sorted, unless the `nosort` flag is set.
+* `match` Every time a match is found, this is emitted with the matched.
+* `error` Emitted when an unexpected error is encountered, or whenever
+ any fs error occurs if `options.strict` is set.
+* `abort` When `abort()` is called, this event is raised.
+
+### Methods
+
+* `abort` Stop the search.
+
+### Options
+
+All the options that can be passed to Minimatch can also be passed to
+Glob to change pattern matching behavior. Also, some have been added,
+or have glob-specific ramifications.
+
+All options are false by default, unless otherwise noted.
+
+All options are added to the glob object, as well.
+
+* `cwd` The current working directory in which to search. Defaults
+ to `process.cwd()`.
+* `root` The place where patterns starting with `/` will be mounted
+ onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
+ systems, and `C:\` or some such on Windows.)
+* `dot` Include `.dot` files in normal matches and `globstar` matches.
+ Note that an explicit dot in a portion of the pattern will always
+ match dot files.
+* `nomount` By default, a pattern starting with a forward-slash will be
+ "mounted" onto the root setting, so that a valid filesystem path is
+ returned. Set this flag to disable that behavior.
+* `mark` Add a `/` character to directory matches. Note that this
+ requires additional stat calls.
+* `nosort` Don't sort the results.
+* `stat` Set to true to stat *all* results. This reduces performance
+ somewhat, and is completely unnecessary, unless `readdir` is presumed
+ to be an untrustworthy indicator of file existence. It will cause
+ ELOOP to be triggered one level sooner in the case of cyclical
+ symbolic links.
+* `silent` When an unusual error is encountered
+ when attempting to read a directory, a warning will be printed to
+ stderr. Set the `silent` option to true to suppress these warnings.
+* `strict` When an unusual error is encountered
+ when attempting to read a directory, the process will just continue on
+ in search of other matches. Set the `strict` option to raise an error
+ in these cases.
+* `cache` See `cache` property above. Pass in a previously generated
+ cache object to save some fs calls.
+* `statCache` A cache of results of filesystem information, to prevent
+ unnecessary stat calls. While it should not normally be necessary to
+ set this, you may pass the statCache from one glob() call to the
+ options object of another, if you know that the filesystem will not
+ change between calls. (See "Race Conditions" below.)
+* `sync` Perform a synchronous glob search.
+* `nounique` In some cases, brace-expanded patterns can result in the
+ same file showing up multiple times in the result set. By default,
+ this implementation prevents duplicates in the result set.
+ Set this flag to disable that behavior.
+* `nonull` Set to never return an empty set, instead returning a set
+ containing the pattern itself. This is the default in glob(3).
+* `nocase` Perform a case-insensitive match. Note that case-insensitive
+ filesystems will sometimes result in glob returning results that are
+ case-insensitively matched anyway, since readdir and stat will not
+ raise an error.
+* `debug` Set to enable debug logging in minimatch and glob.
+* `globDebug` Set to enable debug logging in glob, but not minimatch.
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between node-glob and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then glob returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+## Windows
+
+**Please only use forward-slashes in glob expressions.**
+
+Though windows uses either `/` or `\` as its path separator, only `/`
+characters are used by this glob implementation. You must use
+forward-slashes **only** in glob expressions. Back-slashes will always
+be interpreted as escape characters, not path separators.
+
+Results from absolute patterns such as `/foo/*` are mounted onto the
+root setting using `path.join`. On windows, this will by default result
+in `/foo/*` matching `C:\foo\bar.txt`.
+
+## Race Conditions
+
+Glob searching, by its very nature, is susceptible to race conditions,
+since it relies on directory walking and such.
+
+As a result, it is possible that a file that exists when glob looks for
+it may have been deleted or modified by the time it returns the result.
+
+As part of its internal implementation, this program caches all stat
+and readdir calls that it makes, in order to cut down on system
+overhead. However, this also makes it even more susceptible to races,
+especially if the cache or statCache objects are reused between glob
+calls.
+
+Users are thus advised not to use a glob result as a guarantee of
+filesystem state in the face of rapid changes. For the vast majority
+of operations, this is never a problem.
[19/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.junit_reporter.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.junit_reporter.js b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.junit_reporter.js
new file mode 100644
index 0000000..39d0666
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.junit_reporter.js
@@ -0,0 +1,200 @@
+(function() {
+
+ if (! jasmine) {
+ throw new Exception("jasmine library does not exist in global namespace!");
+ }
+
+ function elapsed(startTime, endTime) {
+ return (endTime - startTime)/1000;
+ }
+
+ function ISODateString(d) {
+ function pad(n) { return n < 10 ? '0'+n : n; }
+
+ return d.getFullYear() + '-' +
+ pad(d.getMonth()+1) + '-' +
+ pad(d.getDate()) + 'T' +
+ pad(d.getHours()) + ':' +
+ pad(d.getMinutes()) + ':' +
+ pad(d.getSeconds());
+ }
+
+ function trim(str) {
+ return str.replace(/^\s+/, "" ).replace(/\s+$/, "" );
+ }
+
+ function escapeInvalidXmlChars(str) {
+ return str.replace(/\&/g, "&")
+ .replace(/</g, "<")
+ .replace(/\>/g, ">")
+ .replace(/\"/g, """)
+ .replace(/\'/g, "'");
+ }
+
+ /**
+ * Generates JUnit XML for the given spec run.
+ * Allows the test results to be used in java based CI
+ * systems like CruiseControl and Hudson.
+ *
+ * @param {string} savePath where to save the files
+ * @param {boolean} consolidate whether to save nested describes within the
+ * same file as their parent; default: true
+ * @param {boolean} useDotNotation whether to separate suite names with
+ * dots rather than spaces (ie "Class.init" not
+ * "Class init"); default: true
+ */
+ var JUnitXmlReporter = function(savePath, consolidate, useDotNotation) {
+ this.savePath = savePath || '';
+ this.consolidate = consolidate === jasmine.undefined ? true : consolidate;
+ this.useDotNotation = useDotNotation === jasmine.undefined ? true : useDotNotation;
+ };
+ JUnitXmlReporter.finished_at = null; // will be updated after all files have been written
+
+ JUnitXmlReporter.prototype = {
+ reportSpecStarting: function(spec) {
+ spec.startTime = new Date();
+
+ if (!spec.suite.startTime) {
+ spec.suite.startTime = spec.startTime;
+ }
+ },
+
+ reportSpecResults: function(spec) {
+ var results = spec.results();
+ spec.didFail = !results.passed();
+ spec.duration = elapsed(spec.startTime, new Date());
+ spec.output = '<testcase classname="' + this.getFullName(spec.suite) +
+ '" name="' + escapeInvalidXmlChars(spec.description) + '" time="' + spec.duration + '">';
+
+ var failure = "";
+ var failures = 0;
+ var resultItems = results.getItems();
+ for (var i = 0; i < resultItems.length; i++) {
+ var result = resultItems[i];
+
+ if (result.type == 'expect' && result.passed && !result.passed()) {
+ failures += 1;
+ failure += (failures + ": " + escapeInvalidXmlChars(result.message) + " ");
+ }
+ }
+ if (failure) {
+ spec.output += "<failure>" + trim(failure) + "</failure>";
+ }
+ spec.output += "</testcase>";
+ },
+
+ reportSuiteResults: function(suite) {
+ var results = suite.results();
+ var specs = suite.specs();
+ var specOutput = "";
+ // for JUnit results, let's only include directly failed tests (not nested suites')
+ var failedCount = 0;
+
+ suite.status = results.passed() ? 'Passed.' : 'Failed.';
+ if (results.totalCount === 0) { // todo: change this to check results.skipped
+ suite.status = 'Skipped.';
+ }
+
+ // if a suite has no (active?) specs, reportSpecStarting is never called
+ // and thus the suite has no startTime -- account for that here
+ suite.startTime = suite.startTime || new Date();
+ suite.duration = elapsed(suite.startTime, new Date());
+
+ for (var i = 0; i < specs.length; i++) {
+ failedCount += specs[i].didFail ? 1 : 0;
+ specOutput += "\n " + specs[i].output;
+ }
+ suite.output = '\n<testsuite name="' + this.getFullName(suite) +
+ '" errors="0" tests="' + specs.length + '" failures="' + failedCount +
+ '" time="' + suite.duration + '" timestamp="' + ISODateString(suite.startTime) + '">';
+ suite.output += specOutput;
+ suite.output += "\n</testsuite>";
+ },
+
+ reportRunnerResults: function(runner) {
+ var suites = runner.suites();
+ for (var i = 0; i < suites.length; i++) {
+ var suite = suites[i];
+ var fileName = 'TEST-' + this.getFullName(suite, true) + '.xml';
+ var output = '<?xml version="1.0" encoding="UTF-8" ?>';
+ // if we are consolidating, only write out top-level suites
+ if (this.consolidate && suite.parentSuite) {
+ continue;
+ }
+ else if (this.consolidate) {
+ output += "\n<testsuites>";
+ output += this.getNestedOutput(suite);
+ output += "\n</testsuites>";
+ this.writeFile(this.savePath + fileName, output);
+ }
+ else {
+ output += suite.output;
+ this.writeFile(this.savePath + fileName, output);
+ }
+ }
+ // When all done, make it known on JUnitXmlReporter
+ JUnitXmlReporter.finished_at = (new Date()).getTime();
+ },
+
+ getNestedOutput: function(suite) {
+ var output = suite.output;
+ for (var i = 0; i < suite.suites().length; i++) {
+ output += this.getNestedOutput(suite.suites()[i]);
+ }
+ return output;
+ },
+
+ writeFile: function(filename, text) {
+ // Rhino
+ try {
+ var out = new java.io.BufferedWriter(new java.io.FileWriter(filename));
+ out.write(text);
+ out.close();
+ return;
+ } catch (e) {}
+ // PhantomJS, via a method injected by phantomjs-testrunner.js
+ try {
+ __phantom_writeFile(filename, text);
+ return;
+ } catch (f) {}
+ // Node.js
+ try {
+ var fs = require("fs");
+ var fd = fs.openSync(filename, "w");
+ fs.writeSync(fd, text, 0);
+ fs.closeSync(fd);
+ return;
+ } catch (g) {}
+ },
+
+ getFullName: function(suite, isFilename) {
+ var fullName;
+ if (this.useDotNotation) {
+ fullName = suite.description;
+ for (var parentSuite = suite.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
+ fullName = parentSuite.description + '.' + fullName;
+ }
+ }
+ else {
+ fullName = suite.getFullName();
+ }
+
+ // Either remove or escape invalid XML characters
+ if (isFilename) {
+ return fullName.replace(/[^\w]/g, "");
+ }
+ return escapeInvalidXmlChars(fullName);
+ },
+
+ log: function(str) {
+ var console = jasmine.getGlobal().console;
+
+ if (console && console.log) {
+ console.log(str);
+ }
+ }
+ };
+
+ // export public
+ jasmine.JUnitXmlReporter = JUnitXmlReporter;
+})();
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.teamcity_reporter.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.teamcity_reporter.js b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.teamcity_reporter.js
new file mode 100644
index 0000000..e96e072
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.teamcity_reporter.js
@@ -0,0 +1,139 @@
+(function() {
+ if (! jasmine) {
+ throw new Exception("jasmine library does not exist in global namespace!");
+ }
+
+ /**
+ * Basic reporter that outputs spec results to for the Teamcity build system
+ *
+ * Usage:
+ *
+ * jasmine.getEnv().addReporter(new jasmine.TeamcityReporter());
+ * jasmine.getEnv().execute();
+ */
+ var TeamcityReporter = function() {
+ this.started = false;
+ this.finished = false;
+ };
+
+ TeamcityReporter.prototype = {
+ reportRunnerResults: function(runner) { },
+
+ reportRunnerStarting: function(runner) { },
+
+ reportSpecResults: function(spec) { },
+
+ reportSpecStarting: function(spec) { },
+
+ reportSuiteResults: function(suite) {
+ var results = suite.results();
+ var path = [];
+ while(suite) {
+ path.unshift(suite.description);
+ suite = suite.parentSuite;
+ }
+ var description = path.join(' ');
+
+ this.log("##teamcity[testSuiteStarted name='" + this.escapeTeamcityString(description) + "']");
+
+ var outerThis = this;
+ var eachSpecFn = function(spec){
+ if (spec.description) {
+ outerThis.log("##teamcity[testStarted name='" + outerThis.escapeTeamcityString(spec.description) + "' captureStandardOutput='true']");
+ var specResultFn = function(result){
+ if (!result.passed_) {
+ outerThis.log("##teamcity[testFailed name='" + outerThis.escapeTeamcityString(spec.description) + "' message='|[FAILED|]' details='" + outerThis.escapeTeamcityString(result.trace.stack) + "']");
+ }
+ };
+
+ for (var j = 0, jlen = spec.items_.length; j < jlen; j++) {
+ specResultFn(spec.items_[j]);
+ }
+ outerThis.log("##teamcity[testFinished name='" + outerThis.escapeTeamcityString(spec.description) + "']");
+ }
+ };
+ for (var i = 0, ilen = results.items_.length; i < ilen; i++) {
+ eachSpecFn(results.items_[i]);
+ }
+
+
+
+ this.log("##teamcity[testSuiteFinished name='" + outerThis.escapeTeamcityString(description) + "']");
+ },
+
+ log: function(str) {
+ var console = jasmine.getGlobal().console;
+ if (console && console.log) {
+ console.log(str);
+ }
+ },
+
+ hasGroupedConsole: function() {
+ var console = jasmine.getGlobal().console;
+ return console && console.info && console.warn && console.group && console.groupEnd && console.groupCollapsed;
+ },
+
+ escapeTeamcityString: function(message) {
+ if(!message) {
+ return "";
+ }
+
+ return message.replace(/\|/g, "||")
+ .replace(/\'/g, "|'")
+ .replace(/\n/g, "|n")
+ .replace(/\r/g, "|r")
+ .replace(/\u0085/g, "|x")
+ .replace(/\u2028/g, "|l")
+ .replace(/\u2029/g, "|p")
+ .replace(/\[/g, "|[")
+ .replace(/]/g, "|]");
+ }
+ };
+
+ function suiteResults(suite) {
+ console.group(suite.description);
+ var specs = suite.specs();
+ for (var i in specs) {
+ if (specs.hasOwnProperty(i)) {
+ specResults(specs[i]);
+ }
+ }
+ var suites = suite.suites();
+ for (var j in suites) {
+ if (suites.hasOwnProperty(j)) {
+ suiteResults(suites[j]);
+ }
+ }
+ console.groupEnd();
+ }
+
+ function specResults(spec) {
+ var results = spec.results();
+ if (results.passed() && console.groupCollapsed) {
+ console.groupCollapsed(spec.description);
+ } else {
+ console.group(spec.description);
+ }
+ var items = results.getItems();
+ for (var k in items) {
+ if (items.hasOwnProperty(k)) {
+ itemResults(items[k]);
+ }
+ }
+ console.groupEnd();
+ }
+
+ function itemResults(item) {
+ if (item.passed && !item.passed()) {
+ console.warn({actual:item.actual,expected: item.expected});
+ item.trace.message = item.matcherName;
+ console.error(item.trace);
+ } else {
+ console.info('Passed');
+ }
+ }
+
+ // export public
+ jasmine.TeamcityReporter = TeamcityReporter;
+})();
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/load_reporters.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/load_reporters.js b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/load_reporters.js
new file mode 100644
index 0000000..3b4a742
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/load_reporters.js
@@ -0,0 +1,3 @@
+require("./jasmine.console_reporter.js")
+require("./jasmine.junit_reporter.js")
+require("./jasmine.teamcity_reporter.js")
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/JUnitXmlReporterSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/JUnitXmlReporterSpec.js b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/JUnitXmlReporterSpec.js
new file mode 100644
index 0000000..e76d7fb
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/JUnitXmlReporterSpec.js
@@ -0,0 +1,214 @@
+(function(){
+ var env, spec, suite, reporter, runner;
+ function fakeSpec(suite, name) {
+ var s = new jasmine.Spec(env, suite, name);
+ suite.add(s);
+ return s;
+ }
+ function fakeSuite(name, parentSuite) {
+ var s = new jasmine.Suite(env, name, null, parentSuite || null);
+ if (parentSuite) {
+ parentSuite.add(s);
+ }
+ runner.add(s);
+ return s;
+ }
+
+ // make sure reporter is set before calling this
+ function triggerSuiteEvents(suites) {
+ for (var i=0; i<suites.length; i++) {
+ var s = suites[i];
+ for (var j=0; j<s.specs().length; j++) {
+ reporter.reportSpecStarting(s.specs()[j]);
+ reporter.reportSpecResults(s.specs()[j]);
+ }
+ reporter.reportSuiteResults(s);
+ }
+ }
+
+ describe("JUnitXmlReporter", function(){
+
+ beforeEach(function(){
+ env = new jasmine.Env();
+ env.updateInterval = 0;
+ runner = new jasmine.Runner(env);
+
+ suite = fakeSuite("ParentSuite");
+ spec = fakeSpec(suite, "should be a dummy with invalid characters: & < > \" '");
+ reporter = new jasmine.JUnitXmlReporter();
+ });
+
+ describe("constructor", function(){
+ it("should default path to an empty string", function(){
+ expect(reporter.savePath).toEqual("");
+ });
+ it("should default consolidate to true", function(){
+ expect(reporter.consolidate).toBe(true);
+ });
+ it("should default useDotNotation to true", function(){
+ expect(reporter.useDotNotation).toBe(true);
+ });
+ });
+
+ describe("reportSpecStarting", function(){
+ it("should add start time", function(){
+ reporter.reportSpecStarting(spec);
+ expect(spec.startTime).not.toBeUndefined();
+ });
+ it("shound add start time to the suite", function(){
+ expect(suite.startTime).toBeUndefined();
+ reporter.reportSpecStarting(spec);
+ expect(suite.startTime).not.toBeUndefined();
+ });
+ it("should not add start time to the suite if it already exists", function(){
+ var a = new Date();
+ suite.startTime = a;
+ reporter.reportSpecStarting(spec);
+ expect(suite.startTime).toBe(a);
+ });
+ });
+
+ describe("reportSpecResults", function(){
+ beforeEach(function(){
+ reporter.reportSpecStarting(spec);
+ //spec.results_ = fakeResults();
+ reporter.reportSpecResults(spec);
+ });
+ it("should compute duration", function(){
+ expect(spec.duration).not.toBeUndefined();
+ });
+ it("should generate <testcase> output", function(){
+ expect(spec.output).not.toBeUndefined();
+ expect(spec.output).toContain("<testcase");
+ });
+ it("should escape bad xml characters in spec description", function() {
+ expect(spec.output).toContain("& < > " '");
+ });
+ it("should generate valid xml <failure> output if test failed", function(){
+ // this one takes a bit of setup to pretend a failure
+ spec = fakeSpec(suite, "should be a dummy");
+ reporter.reportSpecStarting(spec);
+ var expectationResult = new jasmine.ExpectationResult({
+ matcherName: "toEqual", passed: false, message: "Expected 'a' to equal '&'."
+ });
+ var results = {
+ passed: function() { return false; },
+ getItems: function() { return [expectationResult]; }
+ };
+ spyOn(spec, "results").andReturn(results);
+ reporter.reportSpecResults(spec);
+ expect(spec.output).toContain("<failure>");
+ expect(spec.output).toContain("to equal '&");
+ });
+ });
+
+ describe("reportSuiteResults", function(){
+ beforeEach(function(){
+ triggerSuiteEvents([suite]);
+ });
+ it("should compute duration", function(){
+ expect(suite.duration).not.toBeUndefined();
+ });
+ it("should generate startTime if no specs were executed", function(){
+ suite = fakeSuite("just a fake suite");
+ triggerSuiteEvents([suite]);
+ expect(suite.startTime).not.toBeUndefined();
+ });
+ it("should generate <testsuite> output", function(){
+ expect(suite.output).not.toBeUndefined();
+ expect(suite.output).toContain("<testsuite");
+ });
+ it("should contain <testcase> output from specs", function(){
+ expect(suite.output).toContain("<testcase");
+ });
+ });
+
+ describe("reportRunnerResults", function(){
+ var subSuite, subSubSuite, siblingSuite;
+
+ beforeEach(function(){
+ subSuite = fakeSuite("SubSuite", suite);
+ subSubSuite = fakeSuite("SubSubSuite", subSuite);
+ siblingSuite = fakeSuite("SiblingSuite With Invalid Chars & < > \" ' | : \\ /");
+ var subSpec = fakeSpec(subSuite, "should be one level down");
+ var subSubSpec = fakeSpec(subSubSuite, "should be two levels down");
+ var siblingSpec = fakeSpec(siblingSuite, "should be a sibling of Parent");
+
+ spyOn(reporter, "writeFile");
+ spyOn(reporter, "getNestedOutput").andCallThrough();
+ triggerSuiteEvents([suite, subSuite, subSubSuite, siblingSuite]);
+ });
+
+ describe("general functionality", function() {
+ beforeEach(function() {
+ reporter.reportRunnerResults(runner);
+ });
+ it("should remove invalid filename chars from the filename", function() {
+ expect(reporter.writeFile).toHaveBeenCalledWith("TEST-SiblingSuiteWithInvalidChars.xml", jasmine.any(String));
+ });
+ it("should remove invalid xml chars from the classname", function() {
+ expect(siblingSuite.output).toContain("SiblingSuite With Invalid Chars & < > " ' | : \\ /");
+ });
+ });
+
+ describe("consolidated is true", function(){
+ beforeEach(function(){
+ reporter.reportRunnerResults(runner);
+ });
+ it("should write one file per parent suite", function(){
+ expect(reporter.writeFile.callCount).toEqual(2);
+ });
+ it("should consolidate suite output", function(){
+ expect(reporter.getNestedOutput.callCount).toEqual(4);
+ });
+ it("should wrap output in <testsuites>", function(){
+ expect(reporter.writeFile.mostRecentCall.args[1]).toContain("<testsuites>");
+ });
+ it("should include xml header in every file", function(){
+ for (var i = 0; i < reporter.writeFile.callCount; i++) {
+ expect(reporter.writeFile.argsForCall[i][1]).toContain("<?xml");
+ }
+ });
+ });
+
+ describe("consolidated is false", function(){
+ beforeEach(function(){
+ reporter.consolidate = false;
+ reporter.reportRunnerResults(runner);
+ });
+ it("should write one file per suite", function(){
+ expect(reporter.writeFile.callCount).toEqual(4);
+ });
+ it("should not wrap results in <testsuites>", function(){
+ expect(reporter.writeFile.mostRecentCall.args[1]).not.toContain("<testsuites>");
+ });
+ it("should include xml header in every file", function(){
+ for (var i = 0; i < reporter.writeFile.callCount; i++) {
+ expect(reporter.writeFile.argsForCall[i][1]).toContain("<?xml");
+ }
+ });
+ });
+
+ describe("dot notation is true", function(){
+ beforeEach(function(){
+ reporter.reportRunnerResults(runner);
+ });
+ it("should separate descriptions with dot notation", function(){
+ expect(subSubSuite.output).toContain('classname="ParentSuite.SubSuite.SubSubSuite"');
+ });
+ });
+
+ describe("dot notation is false", function(){
+ beforeEach(function(){
+ reporter.useDotNotation = false;
+ triggerSuiteEvents([suite, subSuite, subSubSuite, siblingSuite]);
+ reporter.reportRunnerResults(runner);
+ });
+ it("should separate descriptions with whitespace", function(){
+ expect(subSubSuite.output).toContain('classname="ParentSuite SubSuite SubSubSuite"');
+ });
+ });
+ });
+ });
+})();
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/console_reporter.html
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/console_reporter.html b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/console_reporter.html
new file mode 100644
index 0000000..b0da97f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/console_reporter.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <title>Console Reporter Spec</title>
+
+ <link rel="stylesheet" href="../ext/jasmine.css" type="text/css" />
+
+ <script type="text/javascript" src="../ext/jasmine.js"></script>
+ <script type="text/javascript" src="../ext/jasmine-html.js"></script>
+ <script type="text/javascript" src="../src/jasmine.console_reporter.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+ describe("Basic Suite", function() {
+ it("Should pass a basic truthiness test.", function() {
+ expect(true).toEqual(true);
+ });
+
+ it("Should fail when it hits an inequal statement.", function() {
+ expect(1+1).toEqual(3);
+ });
+ });
+
+ describe("Another Suite", function() {
+ it("Should pass this test as well.", function() {
+ expect(0).toEqual(0);
+ });
+ });
+
+ jasmine.getEnv().addReporter(new jasmine.ConsoleReporter());
+ jasmine.getEnv().addReporter(new jasmine.TrivialReporter());
+ jasmine.getEnv().execute();
+ </script>
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/envjs.bootstrap.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/envjs.bootstrap.js b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/envjs.bootstrap.js
new file mode 100644
index 0000000..4415594
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/envjs.bootstrap.js
@@ -0,0 +1,14 @@
+load('../ext/env.rhino.1.2.js');
+
+Envjs.scriptTypes['text/javascript'] = true;
+
+var specFile;
+
+for (i = 0; i < arguments.length; i++) {
+ specFile = arguments[i];
+
+ console.log("Loading: " + specFile);
+
+ window.location = specFile
+}
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/envjs.runner.sh
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/envjs.runner.sh b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/envjs.runner.sh
new file mode 100755
index 0000000..6bc583b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/envjs.runner.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+# cleanup previous test runs
+rm -f *.xml
+
+# fire up the envjs environment
+java -cp ../ext/js.jar:../ext/jline.jar org.mozilla.javascript.tools.shell.Main -opt -1 envjs.bootstrap.js $@
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/junit_xml_reporter.html
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/junit_xml_reporter.html b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/junit_xml_reporter.html
new file mode 100644
index 0000000..25c1ac2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/junit_xml_reporter.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <title>JUnit XML Reporter Spec</title>
+
+ <link rel="stylesheet" href="../ext/jasmine.css" type="text/css" />
+
+ <script type="text/javascript" src="../ext/jasmine.js"></script>
+ <script type="text/javascript" src="../ext/jasmine-html.js"></script>
+ <script type="text/javascript" src="../src/jasmine.junit_reporter.js"></script>
+
+ <!-- Include spec file -->
+ <script type="text/javascript" src="JUnitXmlReporterSpec.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+ jasmine.getEnv().addReporter(new jasmine.TrivialReporter());
+ jasmine.getEnv().addReporter(new jasmine.JUnitXmlReporter());
+ jasmine.getEnv().execute();
+ </script>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/phantomjs-testrunner.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/phantomjs-testrunner.js b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/phantomjs-testrunner.js
new file mode 100644
index 0000000..edcca35
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/phantomjs-testrunner.js
@@ -0,0 +1,183 @@
+// Verify arguments
+if (phantom.args.length === 0) {
+ console.log("Simple JasmineBDD test runner for phantom.js");
+ console.log("Usage: phantomjs-testrunner.js url_to_runner.html");
+ console.log("Accepts http:// and file:// urls");
+ console.log("");
+ console.log("NOTE: This script depends on jasmine.TrivialReporter being used\non the page, for the DOM elements it creates.\n");
+ phantom.exit(2);
+}
+else {
+ var args = phantom.args;
+ var pages = [], page, address, resultsKey, i, l;
+
+ var setupPageFn = function(p, k) {
+ return function() {
+ overloadPageEvaluate(p);
+ setupWriteFileFunction(p, k);
+ };
+ };
+
+ for (i = 0, l = args.length; i < l; i++) {
+ address = args[i];
+ console.log("Loading " + address);
+
+ // if provided a url without a protocol, try to use file://
+ address = address.indexOf("://") === -1 ? "file://" + address : address;
+
+ // create a WebPage object to work with
+ page = require("webpage").create();
+ page.url = address;
+
+ // When initialized, inject the reporting functions before the page is loaded
+ // (and thus before it will try to utilize the functions)
+ resultsKey = "__jr" + Math.ceil(Math.random() * 1000000);
+ page.onInitialized = setupPageFn(page, resultsKey);
+ page.open(address, processPage(null, page, resultsKey));
+ pages.push(page);
+ }
+
+ // bail when all pages have been processed
+ setInterval(function(){
+ var exit_code = 0;
+ for (i = 0, l = pages.length; i < l; i++) {
+ page = pages[i];
+ if (page.__exit_code === null) {
+ // wait until later
+ return;
+ }
+ exit_code |= page.__exit_code;
+ }
+ phantom.exit(exit_code);
+ }, 100);
+}
+
+// Thanks to hoisting, these helpers are still available when needed above
+/**
+ * Stringifies the function, replacing any %placeholders% with mapped values.
+ *
+ * @param {function} fn The function to replace occurrences within.
+ * @param {object} replacements Key => Value object of string replacements.
+ */
+function replaceFunctionPlaceholders(fn, replacements) {
+ if (replacements && typeof replacements === "object") {
+ fn = fn.toString();
+ for (var p in replacements) {
+ if (replacements.hasOwnProperty(p)) {
+ var match = new RegExp("%" + p + "%", "g");
+ do {
+ fn = fn.replace(match, replacements[p]);
+ } while(fn.indexOf(match) !== -1);
+ }
+ }
+ }
+ return fn;
+}
+
+/**
+ * Replaces the "evaluate" method with one we can easily do substitution with.
+ *
+ * @param {phantomjs.WebPage} page The WebPage object to overload
+ */
+function overloadPageEvaluate(page) {
+ page._evaluate = page.evaluate;
+ page.evaluate = function(fn, replacements) { return page._evaluate(replaceFunctionPlaceholders(fn, replacements)); };
+ return page;
+}
+
+/** Stubs a fake writeFile function into the test runner.
+ *
+ * @param {phantomjs.WebPage} page The WebPage object to inject functions into.
+ * @param {string} key The name of the global object in which file data should
+ * be stored for later retrieval.
+ */
+// TODO: not bothering with error checking for now (closed environment)
+function setupWriteFileFunction(page, key) {
+ page.evaluate(function(){
+ window["%resultsObj%"] = {};
+ window.__phantom_writeFile = function(filename, text) {
+ window["%resultsObj%"][filename] = text;
+ };
+ }, {resultsObj: key});
+}
+
+/**
+ * Returns the loaded page's filename => output object.
+ *
+ * @param {phantomjs.WebPage} page The WebPage object to retrieve data from.
+ * @param {string} key The name of the global object to be returned. Should
+ * be the same key provided to setupWriteFileFunction.
+ */
+function getXmlResults(page, key) {
+ return page.evaluate(function(){
+ return window["%resultsObj%"] || {};
+ }, {resultsObj: key});
+}
+
+/**
+ * Processes a page.
+ *
+ * @param {string} status The status from opening the page via WebPage#open.
+ * @param {phantomjs.WebPage} page The WebPage to be processed.
+ */
+function processPage(status, page, resultsKey) {
+ if (status === null && page) {
+ page.__exit_code = null;
+ return function(stat){
+ processPage(stat, page, resultsKey);
+ };
+ }
+ if (status !== "success") {
+ console.error("Unable to load resource: " + address);
+ page.__exit_code = 2;
+ }
+ else {
+ var isFinished = function() {
+ return page.evaluate(function(){
+ // if there's a JUnitXmlReporter, return a boolean indicating if it is finished
+ if (jasmine.JUnitXmlReporter) {
+ return jasmine.JUnitXmlReporter.finished_at !== null;
+ }
+ // otherwise, see if there is anything in a "finished-at" element
+ return document.getElementsByClassName("finished-at").length &&
+ document.getElementsByClassName("finished-at")[0].innerHTML.length > 0;
+ });
+ };
+ var getResults = function() {
+ return page.evaluate(function(){
+ return document.getElementsByClassName("description").length &&
+ document.getElementsByClassName("description")[0].innerHTML.match(/(\d+) spec.* (\d+) failure.*/) ||
+ ["Unable to determine success or failure."];
+ });
+ };
+ var ival = setInterval(function(){
+ if (isFinished()) {
+ // get the results that need to be written to disk
+ var fs = require("fs"),
+ xml_results = getXmlResults(page, resultsKey),
+ output;
+ for (var filename in xml_results) {
+ if (xml_results.hasOwnProperty(filename) && (output = xml_results[filename]) && typeof(output) === "string") {
+ fs.write(filename, output, "w");
+ }
+ }
+
+ // print out a success / failure message of the results
+ var results = getResults();
+ var specs = Number(results[1]);
+ var failures = Number(results[2]);
+ console.log("Results for url " + page.url + ":");
+ if (failures > 0) {
+ console.error(" FAILURE: " + results[0]);
+ page.__exit_code = 1;
+ clearInterval(ival);
+ }
+ else {
+ console.log(" SUCCESS: " + results[0]);
+ page.__exit_code = 0;
+ clearInterval(ival);
+ }
+ }
+ }, 100);
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/phantomjs.runner.sh
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/phantomjs.runner.sh b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/phantomjs.runner.sh
new file mode 100755
index 0000000..ca5d8fa
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/phantomjs.runner.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# sanity check to make sure phantomjs exists in the PATH
+hash /usr/bin/env phantomjs &> /dev/null
+if [ $? -eq 1 ]; then
+ echo "ERROR: phantomjs is not installed"
+ echo "Please visit http://www.phantomjs.org/"
+ exit 1
+fi
+
+# sanity check number of args
+if [ $# -lt 1 ]
+then
+ echo "Usage: `basename $0` path_to_runner.html"
+ echo
+ exit 1
+fi
+
+SCRIPTDIR=$(dirname `perl -e 'use Cwd "abs_path";print abs_path(shift)' $0`)
+TESTFILE=""
+while (( "$#" )); do
+ TESTFILE="$TESTFILE `perl -e 'use Cwd "abs_path";print abs_path(shift)' $1`"
+ shift
+done
+
+# cleanup previous test runs
+cd $SCRIPTDIR
+rm -f *.xml
+
+# make sure phantomjs submodule is initialized
+cd ..
+git submodule update --init
+
+# fire up the phantomjs environment and run the test
+cd $SCRIPTDIR
+/usr/bin/env phantomjs $SCRIPTDIR/phantomjs-testrunner.js $TESTFILE
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/teamcity_reporter.html
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/teamcity_reporter.html b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/teamcity_reporter.html
new file mode 100644
index 0000000..4803e1e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/test/teamcity_reporter.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8" />
+ <title>Console Reporter Spec</title>
+
+ <link rel="stylesheet" href="../ext/jasmine.css" type="text/css" />
+
+ <script type="text/javascript" src="../ext/jasmine.js"></script>
+ <script type="text/javascript" src="../ext/jasmine-html.js"></script>
+ <script type="text/javascript" src="../src/jasmine.teamcity_reporter.js"></script>
+</head>
+<body>
+ <script type="text/javascript">
+ describe("Basic Suite", function() {
+ it("Should pass a basic truthiness test.", function() {
+ expect(true).toEqual(true);
+ });
+
+ it("Should fail when it hits an inequal statement.", function() {
+ expect(1+1).toEqual(3);
+ });
+ });
+
+ describe("Another Suite", function() {
+ it("Should pass this test as well.", function() {
+ expect(0).toEqual(0);
+ });
+ });
+
+ jasmine.getEnv().addReporter(new jasmine.TeamcityReporter());
+ jasmine.getEnv().addReporter(new jasmine.TrivialReporter());
+ jasmine.getEnv().execute();
+ </script>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/.npmignore b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/.npmignore
new file mode 100644
index 0000000..9303c34
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/.npmignore
@@ -0,0 +1,2 @@
+node_modules/
+npm-debug.log
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/.travis.yml b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/.travis.yml
new file mode 100644
index 0000000..84fd7ca
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - 0.6
+ - 0.8
+ - 0.9
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/LICENSE b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/LICENSE
new file mode 100644
index 0000000..432d1ae
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/LICENSE
@@ -0,0 +1,21 @@
+Copyright 2010 James Halliday (mail@substack.net)
+
+This project is free software released under the MIT/X11 license:
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/examples/pow.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/examples/pow.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/examples/pow.js
new file mode 100644
index 0000000..e692421
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/examples/pow.js
@@ -0,0 +1,6 @@
+var mkdirp = require('mkdirp');
+
+mkdirp('/tmp/foo/bar/baz', function (err) {
+ if (err) console.error(err)
+ else console.log('pow!')
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/index.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/index.js
new file mode 100644
index 0000000..fda6de8
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/index.js
@@ -0,0 +1,82 @@
+var path = require('path');
+var fs = require('fs');
+
+module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
+
+function mkdirP (p, mode, f, made) {
+ if (typeof mode === 'function' || mode === undefined) {
+ f = mode;
+ mode = 0777 & (~process.umask());
+ }
+ if (!made) made = null;
+
+ var cb = f || function () {};
+ if (typeof mode === 'string') mode = parseInt(mode, 8);
+ p = path.resolve(p);
+
+ fs.mkdir(p, mode, function (er) {
+ if (!er) {
+ made = made || p;
+ return cb(null, made);
+ }
+ switch (er.code) {
+ case 'ENOENT':
+ mkdirP(path.dirname(p), mode, function (er, made) {
+ if (er) cb(er, made);
+ else mkdirP(p, mode, cb, made);
+ });
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ fs.stat(p, function (er2, stat) {
+ // if the stat fails, then that's super weird.
+ // let the original error be the failure reason.
+ if (er2 || !stat.isDirectory()) cb(er, made)
+ else cb(null, made);
+ });
+ break;
+ }
+ });
+}
+
+mkdirP.sync = function sync (p, mode, made) {
+ if (mode === undefined) {
+ mode = 0777 & (~process.umask());
+ }
+ if (!made) made = null;
+
+ if (typeof mode === 'string') mode = parseInt(mode, 8);
+ p = path.resolve(p);
+
+ try {
+ fs.mkdirSync(p, mode);
+ made = made || p;
+ }
+ catch (err0) {
+ switch (err0.code) {
+ case 'ENOENT' :
+ made = sync(path.dirname(p), mode, made);
+ sync(p, mode, made);
+ break;
+
+ // In the case of any other error, just see if there's a dir
+ // there already. If so, then hooray! If not, then something
+ // is borked.
+ default:
+ var stat;
+ try {
+ stat = fs.statSync(p);
+ }
+ catch (err1) {
+ throw err0;
+ }
+ if (!stat.isDirectory()) throw err0;
+ break;
+ }
+ }
+
+ return made;
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/package.json b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/package.json
new file mode 100644
index 0000000..169f15a
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "mkdirp",
+ "description": "Recursively mkdir, like `mkdir -p`",
+ "version": "0.3.5",
+ "author": {
+ "name": "James Halliday",
+ "email": "mail@substack.net",
+ "url": "http://substack.net"
+ },
+ "main": "./index",
+ "keywords": [
+ "mkdir",
+ "directory"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/substack/node-mkdirp.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "devDependencies": {
+ "tap": "~0.4.0"
+ },
+ "license": "MIT",
+ "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it def
aults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n",
+ "readmeFilename": "readme.markdown",
+ "bugs": {
+ "url": "https://github.com/substack/node-mkdirp/issues"
+ },
+ "_id": "mkdirp@0.3.5",
+ "_from": "mkdirp@~0.3.5"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/readme.markdown
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/readme.markdown b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/readme.markdown
new file mode 100644
index 0000000..83b0216
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/readme.markdown
@@ -0,0 +1,63 @@
+# mkdirp
+
+Like `mkdir -p`, but in node.js!
+
+[](http://travis-ci.org/substack/node-mkdirp)
+
+# example
+
+## pow.js
+
+```js
+var mkdirp = require('mkdirp');
+
+mkdirp('/tmp/foo/bar/baz', function (err) {
+ if (err) console.error(err)
+ else console.log('pow!')
+});
+```
+
+Output
+
+```
+pow!
+```
+
+And now /tmp/foo/bar/baz exists, huzzah!
+
+# methods
+
+```js
+var mkdirp = require('mkdirp');
+```
+
+## mkdirp(dir, mode, cb)
+
+Create a new directory and any necessary subdirectories at `dir` with octal
+permission string `mode`.
+
+If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+
+`cb(err, made)` fires with the error or the first directory `made`
+that had to be created, if any.
+
+## mkdirp.sync(dir, mode)
+
+Synchronously create a new directory and any necessary subdirectories at `dir`
+with octal permission string `mode`.
+
+If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
+
+Returns the first directory that had to be created, if any.
+
+# install
+
+With [npm](http://npmjs.org) do:
+
+```
+npm install mkdirp
+```
+
+# license
+
+MIT
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/chmod.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/chmod.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/chmod.js
new file mode 100644
index 0000000..520dcb8
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/chmod.js
@@ -0,0 +1,38 @@
+var mkdirp = require('../').mkdirp;
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+var ps = [ '', 'tmp' ];
+
+for (var i = 0; i < 25; i++) {
+ var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ ps.push(dir);
+}
+
+var file = ps.join('/');
+
+test('chmod-pre', function (t) {
+ var mode = 0744
+ mkdirp(file, mode, function (er) {
+ t.ifError(er, 'should not error');
+ fs.stat(file, function (er, stat) {
+ t.ifError(er, 'should exist');
+ t.ok(stat && stat.isDirectory(), 'should be directory');
+ t.equal(stat && stat.mode & 0777, mode, 'should be 0744');
+ t.end();
+ });
+ });
+});
+
+test('chmod', function (t) {
+ var mode = 0755
+ mkdirp(file, mode, function (er) {
+ t.ifError(er, 'should not error');
+ fs.stat(file, function (er, stat) {
+ t.ifError(er, 'should exist');
+ t.ok(stat && stat.isDirectory(), 'should be directory');
+ t.end();
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/clobber.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/clobber.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/clobber.js
new file mode 100644
index 0000000..0eb7099
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/clobber.js
@@ -0,0 +1,37 @@
+var mkdirp = require('../').mkdirp;
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+var ps = [ '', 'tmp' ];
+
+for (var i = 0; i < 25; i++) {
+ var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ ps.push(dir);
+}
+
+var file = ps.join('/');
+
+// a file in the way
+var itw = ps.slice(0, 3).join('/');
+
+
+test('clobber-pre', function (t) {
+ console.error("about to write to "+itw)
+ fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
+
+ fs.stat(itw, function (er, stat) {
+ t.ifError(er)
+ t.ok(stat && stat.isFile(), 'should be file')
+ t.end()
+ })
+})
+
+test('clobber', function (t) {
+ t.plan(2);
+ mkdirp(file, 0755, function (err) {
+ t.ok(err);
+ t.equal(err.code, 'ENOTDIR');
+ t.end();
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/mkdirp.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/mkdirp.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/mkdirp.js
new file mode 100644
index 0000000..b07cd70
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/mkdirp.js
@@ -0,0 +1,28 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('woo', function (t) {
+ t.plan(2);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ mkdirp(file, 0755, function (err) {
+ if (err) t.fail(err);
+ else path.exists(file, function (ex) {
+ if (!ex) t.fail('file not created')
+ else fs.stat(file, function (err, stat) {
+ if (err) t.fail(err)
+ else {
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ t.end();
+ }
+ })
+ })
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/perm.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/perm.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/perm.js
new file mode 100644
index 0000000..23a7abb
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/perm.js
@@ -0,0 +1,32 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('async perm', function (t) {
+ t.plan(2);
+ var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
+
+ mkdirp(file, 0755, function (err) {
+ if (err) t.fail(err);
+ else path.exists(file, function (ex) {
+ if (!ex) t.fail('file not created')
+ else fs.stat(file, function (err, stat) {
+ if (err) t.fail(err)
+ else {
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ t.end();
+ }
+ })
+ })
+ });
+});
+
+test('async root perm', function (t) {
+ mkdirp('/tmp', 0755, function (err) {
+ if (err) t.fail(err);
+ t.end();
+ });
+ t.end();
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/perm_sync.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/perm_sync.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/perm_sync.js
new file mode 100644
index 0000000..f685f60
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/perm_sync.js
@@ -0,0 +1,39 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('sync perm', function (t) {
+ t.plan(2);
+ var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
+
+ mkdirp.sync(file, 0755);
+ path.exists(file, function (ex) {
+ if (!ex) t.fail('file not created')
+ else fs.stat(file, function (err, stat) {
+ if (err) t.fail(err)
+ else {
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ t.end();
+ }
+ })
+ });
+});
+
+test('sync root perm', function (t) {
+ t.plan(1);
+
+ var file = '/tmp';
+ mkdirp.sync(file, 0755);
+ path.exists(file, function (ex) {
+ if (!ex) t.fail('file not created')
+ else fs.stat(file, function (err, stat) {
+ if (err) t.fail(err)
+ else {
+ t.ok(stat.isDirectory(), 'target not a directory');
+ t.end();
+ }
+ })
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/race.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/race.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/race.js
new file mode 100644
index 0000000..96a0447
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/race.js
@@ -0,0 +1,41 @@
+var mkdirp = require('../').mkdirp;
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('race', function (t) {
+ t.plan(4);
+ var ps = [ '', 'tmp' ];
+
+ for (var i = 0; i < 25; i++) {
+ var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ ps.push(dir);
+ }
+ var file = ps.join('/');
+
+ var res = 2;
+ mk(file, function () {
+ if (--res === 0) t.end();
+ });
+
+ mk(file, function () {
+ if (--res === 0) t.end();
+ });
+
+ function mk (file, cb) {
+ mkdirp(file, 0755, function (err) {
+ if (err) t.fail(err);
+ else path.exists(file, function (ex) {
+ if (!ex) t.fail('file not created')
+ else fs.stat(file, function (err, stat) {
+ if (err) t.fail(err)
+ else {
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ if (cb) cb();
+ }
+ })
+ })
+ });
+ }
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/rel.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/rel.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/rel.js
new file mode 100644
index 0000000..7985824
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/rel.js
@@ -0,0 +1,32 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('rel', function (t) {
+ t.plan(2);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var cwd = process.cwd();
+ process.chdir('/tmp');
+
+ var file = [x,y,z].join('/');
+
+ mkdirp(file, 0755, function (err) {
+ if (err) t.fail(err);
+ else path.exists(file, function (ex) {
+ if (!ex) t.fail('file not created')
+ else fs.stat(file, function (err, stat) {
+ if (err) t.fail(err)
+ else {
+ process.chdir(cwd);
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ t.end();
+ }
+ })
+ })
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/return.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/return.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/return.js
new file mode 100644
index 0000000..bce68e5
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/return.js
@@ -0,0 +1,25 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('return value', function (t) {
+ t.plan(4);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ // should return the first dir created.
+ // By this point, it would be profoundly surprising if /tmp didn't
+ // already exist, since every other test makes things in there.
+ mkdirp(file, function (err, made) {
+ t.ifError(err);
+ t.equal(made, '/tmp/' + x);
+ mkdirp(file, function (err, made) {
+ t.ifError(err);
+ t.equal(made, null);
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/return_sync.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/return_sync.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/return_sync.js
new file mode 100644
index 0000000..7c222d3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/return_sync.js
@@ -0,0 +1,24 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('return value', function (t) {
+ t.plan(2);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ // should return the first dir created.
+ // By this point, it would be profoundly surprising if /tmp didn't
+ // already exist, since every other test makes things in there.
+ // Note that this will throw on failure, which will fail the test.
+ var made = mkdirp.sync(file);
+ t.equal(made, '/tmp/' + x);
+
+ // making the same file again should have no effect.
+ made = mkdirp.sync(file);
+ t.equal(made, null);
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/root.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/root.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/root.js
new file mode 100644
index 0000000..97ad7a2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/root.js
@@ -0,0 +1,18 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('root', function (t) {
+ // '/' on unix, 'c:/' on windows.
+ var file = path.resolve('/');
+
+ mkdirp(file, 0755, function (err) {
+ if (err) throw err
+ fs.stat(file, function (er, stat) {
+ if (er) throw er
+ t.ok(stat.isDirectory(), 'target is a directory');
+ t.end();
+ })
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/sync.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/sync.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/sync.js
new file mode 100644
index 0000000..7530cad
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/sync.js
@@ -0,0 +1,32 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('sync', function (t) {
+ t.plan(2);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ try {
+ mkdirp.sync(file, 0755);
+ } catch (err) {
+ t.fail(err);
+ return t.end();
+ }
+
+ path.exists(file, function (ex) {
+ if (!ex) t.fail('file not created')
+ else fs.stat(file, function (err, stat) {
+ if (err) t.fail(err)
+ else {
+ t.equal(stat.mode & 0777, 0755);
+ t.ok(stat.isDirectory(), 'target not a directory');
+ t.end();
+ }
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/umask.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/umask.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/umask.js
new file mode 100644
index 0000000..64ccafe
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/umask.js
@@ -0,0 +1,28 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('implicit mode from umask', function (t) {
+ t.plan(2);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ mkdirp(file, function (err) {
+ if (err) t.fail(err);
+ else path.exists(file, function (ex) {
+ if (!ex) t.fail('file not created')
+ else fs.stat(file, function (err, stat) {
+ if (err) t.fail(err)
+ else {
+ t.equal(stat.mode & 0777, 0777 & (~process.umask()));
+ t.ok(stat.isDirectory(), 'target not a directory');
+ t.end();
+ }
+ })
+ })
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/umask_sync.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/umask_sync.js b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/umask_sync.js
new file mode 100644
index 0000000..35bd5cb
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/mkdirp/test/umask_sync.js
@@ -0,0 +1,32 @@
+var mkdirp = require('../');
+var path = require('path');
+var fs = require('fs');
+var test = require('tap').test;
+
+test('umask sync modes', function (t) {
+ t.plan(2);
+ var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+ var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
+
+ var file = '/tmp/' + [x,y,z].join('/');
+
+ try {
+ mkdirp.sync(file);
+ } catch (err) {
+ t.fail(err);
+ return t.end();
+ }
+
+ path.exists(file, function (ex) {
+ if (!ex) t.fail('file not created')
+ else fs.stat(file, function (err, stat) {
+ if (err) t.fail(err)
+ else {
+ t.equal(stat.mode & 0777, (0777 & (~process.umask())));
+ t.ok(stat.isDirectory(), 'target not a directory');
+ t.end();
+ }
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/requirejs/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/requirejs/README.md b/blackberry10/node_modules/jasmine-node/node_modules/requirejs/README.md
new file mode 100644
index 0000000..545b31d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/requirejs/README.md
@@ -0,0 +1,9 @@
+# requirejs
+
+RequireJS for use in Node. includes:
+
+* r.js: the RequireJS optimizer, and AMD runtime for use in Node.
+* require.js: The browser-based AMD loader.
+
+More information at http://requirejs.org
+
[15/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/async.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/async.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/async.js
new file mode 100644
index 0000000..74c7533
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/async.js
@@ -0,0 +1,62 @@
+var test = require('tap').test,
+walkdir = require('../walkdir.js');
+
+var expectedPaths = {
+'dir/foo/x':'file',
+'dir/foo/a':'dir',
+'dir/foo/a/y':'file',
+'dir/foo/a/b':'dir',
+'dir/foo/a/b/z':'file',
+'dir/foo/a/b/c':'dir',
+'dir/foo/a/b/c/w':'file'
+};
+
+test('async events',function(t){
+ var paths = [],
+ files = [],
+ dirs = [];
+
+
+ var emitter = walkdir(__dirname+'/dir/foo',function(path){
+ //console.log('path: ',path);
+ paths.push(path.replace(__dirname+'/',''));
+ });
+
+ emitter.on('directory',function(path,stat){
+ dirs.push(path.replace(__dirname+'/',''));
+ });
+
+ emitter.on('file',function(path,stat){
+ //console.log('file: ',path);
+ files.push(path.replace(__dirname+'/',''));
+ });
+
+ emitter.on('end',function(){
+
+ files.forEach(function(v,k){
+ t.equals(expectedPaths[v],'file','path from file event should be file');
+ });
+
+ Object.keys(expectedPaths).forEach(function(v,k){
+ if(expectedPaths[v] == 'file') {
+ t.ok(files.indexOf(v) > -1,'should have file in files array');
+ }
+ });
+
+ dirs.forEach(function(v,k){
+ t.equals(expectedPaths[v],'dir','path from dir event should be dir '+v);
+ });
+
+ Object.keys(expectedPaths).forEach(function(v,k){
+ if(expectedPaths[v] == 'dir') {
+ t.ok(dirs.indexOf(v) > -1,'should have dir in dirs array');
+ }
+ });
+
+ Object.keys(expectedPaths).forEach(function(v,k){
+ t.ok(paths.indexOf(v) !== -1,'should have found all expected paths '+v);
+ });
+
+ t.end();
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.js
new file mode 100644
index 0000000..98e852d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.js
@@ -0,0 +1,33 @@
+var spawn = require('child_process').spawn;
+
+var find = spawn('find',[process.argv[2]||'./']);
+
+var fs = require('fs');
+
+var buf = '',count = 0;
+
+handleBuf = function(data){
+
+ buf += data;
+
+ if(buf.length >= 1024) {
+ var lines = buf.split("\n");
+ buf = lines.pop();//last line my not be complete
+ count += lines.length;
+ process.stdout.write(lines.join("\n")+"\n");
+ }
+};
+
+find.stdout.on('data',function(data){
+ //buf += data.toString();
+ handleBuf(data)
+ //process.stdout.write(data.toString());
+});
+
+find.on('end',function(){
+ handleBuf("\n");
+ console.log('found '+count+' files');
+ console.log('ended');
+});
+
+find.stdin.end();
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.py
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.py b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.py
new file mode 100644
index 0000000..526d694
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/find.py
@@ -0,0 +1,26 @@
+import os
+import sys
+
+rootdir = sys.argv[1]
+ino = {}
+buf = []
+for root, subFolders, files in os.walk(rootdir):
+
+ for filename in files:
+ filePath = os.path.join(root, filename)
+ try:
+ stat = os.lstat(filePath)
+ except OSError:
+ pass
+
+ inostr = stat.st_ino
+
+ if inostr not in ino:
+ ino[stat.st_ino] = 1
+ buf.append(filePath);
+ buf.append("\n");
+ if len(buf) >= 1024:
+ sys.stdout.write(''.join(buf))
+ buf = []
+
+sys.stdout.write(''.join(buf));
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/finditsynctest.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/finditsynctest.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/finditsynctest.js
new file mode 100644
index 0000000..b3af43e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/finditsynctest.js
@@ -0,0 +1,15 @@
+var findit = require('findit');
+
+var files = findit.findSync(process.argv[2]||'./');
+
+var count = files.length;
+
+console.log(files);
+
+files = files.join("\n");
+
+process.stdout.write(files+"\n");
+
+console.log('found '+count+' files');
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/findittest.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/findittest.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/findittest.js
new file mode 100644
index 0000000..d018bf2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/findittest.js
@@ -0,0 +1,14 @@
+var findit = require('findit');
+
+var find = findit.find(process.argv[2]||'./');
+
+var count = 0;
+
+find.on('file',function(path,stat){
+ count++;
+ process.stdout.write(path+"\n");
+});
+
+find.on('end',function(){
+ console.log('found '+count+' regular files');
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/fstream.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/fstream.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/fstream.js
new file mode 100644
index 0000000..1451b4c
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/fstream.js
@@ -0,0 +1,24 @@
+var fstream = require('fstream');
+
+var pipe = fstream.Reader(process.argv[2]||"../");
+
+var count = 0,errorHandler;
+
+pipe.on('entry',function fn(entry){
+ if(entry.type == "Directory"){
+ entry.on('entry',fn);
+ } else if(entry.type == "File") {
+ count++;
+ }
+ entry.on('error',errorHandler);
+});
+
+pipe.on('error',(errorHandler = function(error){
+ console.log('error event ',error);
+}));
+
+pipe.on('end',function(){
+ console.log('end! '+count);
+});
+
+//this is pretty slow
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/install_test_deps.sh
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/install_test_deps.sh b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/install_test_deps.sh
new file mode 100755
index 0000000..5fdd18f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/install_test_deps.sh
@@ -0,0 +1 @@
+npm install
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/lsr.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/lsr.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/lsr.js
new file mode 100644
index 0000000..590f9d1
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/lsr.js
@@ -0,0 +1,18 @@
+var lsr = require('ls-r');
+
+lsr(process.argv[2]||'./',{maxDepth:500000,recursive:true},function(err,origPath,args){
+ if(err) {
+ console.log('eww an error! ',err);
+ return;
+ }
+//console.log('hit');
+ var c = 0;
+ args.forEach(function(stat){
+ if(stat.isFile()){
+ console.log(stat.path);
+ c++;
+ }
+ });
+
+ console.log('found '+args.length+" regular files");
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/package.json b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/package.json
new file mode 100644
index 0000000..1faeff3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/comparison/package.json
@@ -0,0 +1,10 @@
+{
+ "name":"recursedir-comparisons",
+ "version": "0.0.0",
+ "author": "Ryan Day <so...@gmail.com>",
+ "devDependencies": {
+ "findit": "*",
+ "ls-r":"*",
+ "fstream":"*"
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/c/w
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/c/w b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/c/w
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/z
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/z b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/b/z
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/y
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/y b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/a/y
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/x
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/x b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/foo/x
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir1/file1
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir1/file1 b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir1/file1
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir2/file2
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir2/file2 b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/dir2/file2
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/file
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/file b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/dir/symlinks/file
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/endearly.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/endearly.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/endearly.js
new file mode 100644
index 0000000..e1346fa
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/endearly.js
@@ -0,0 +1,19 @@
+var test = require('tap').test,
+walk = require('../walkdir.js');
+
+test('should be able to end walk after first path',function(t){
+
+ var paths = [];
+
+ var em = walk('../',function(path){
+ paths.push(path);
+ this.end();
+ });
+
+ em.on('end',function(){
+ t.equals(paths.length,1,'should have only found one path');
+ t.end();
+ });
+
+});
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/max_depth.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/max_depth.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/max_depth.js
new file mode 100644
index 0000000..ecc9a49
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/max_depth.js
@@ -0,0 +1,27 @@
+var test = require('tap').test,
+walkdir = require('../walkdir.js');
+
+var expectedPaths = {
+'dir/foo/x':'file',
+'dir/foo/a':'dir',
+'dir/foo/a/y':'file',
+'dir/foo/a/b':'dir'
+};
+
+test('no_recurse option',function(t){
+ var paths = [];
+
+ var emitter = walkdir(__dirname+'/dir/foo',{max_depth:2},function(path,stat,depth){
+ paths.push(path.replace(__dirname+'/',''));
+ t.ok(depth < 3,' all paths emitted should have a depth less than 3');
+ });
+
+ emitter.on('end',function(){
+ var expected = Object.keys(expectedPaths);
+ paths.forEach(function(v){
+ t.ok(expected.indexOf(v) > -1,'paths should not have any unexpected files');
+ });
+
+ t.end();
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/no_recurse.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/no_recurse.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/no_recurse.js
new file mode 100644
index 0000000..df2e4ed
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/no_recurse.js
@@ -0,0 +1,25 @@
+var test = require('tap').test,
+walkdir = require('../walkdir.js');
+
+var expectedPaths = {
+'dir/foo/x':'file',
+'dir/foo/a':'dir'
+};
+
+test('no_recurse option',function(t){
+ var paths = [];
+
+ var emitter = walkdir(__dirname+'/dir/foo',{no_recurse:true},function(path,stat,depth){
+ paths.push(path.replace(__dirname+'/',''));
+ t.ok(depth === 1,' all paths emitted should have a depth of 1');
+ });
+
+ emitter.on('end',function(){
+ var expected = Object.keys(expectedPaths);
+ paths.forEach(function(v){
+ t.ok(expected.indexOf(v) > -1,'all expected files should be in paths');
+ });
+
+ t.end();
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/nofailemptydir.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/nofailemptydir.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/nofailemptydir.js
new file mode 100644
index 0000000..13ba6e4
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/nofailemptydir.js
@@ -0,0 +1,34 @@
+var test = require('tap').test,
+fs = require('fs'),
+path = require('path'),
+walk = require('../walkdir.js');
+
+test('should not emit fail events for empty dirs',function(t){
+ fs.mkdir('./empty',function(err,data){
+ if(err) {
+ t.equals(err.code,'EEXIST','if error code on mkdir for fixture it should only be because it exists already');
+ }
+
+ var paths = [];
+ var dirs = [];
+ var emptys = [];
+ var fails = [];
+
+ var em = walk('./');
+
+ em.on('fail',function(path,err){
+ fails.push(path);
+ });
+
+ em.on('empty',function(path,err){
+ emptys.push(path);
+ });
+
+ em.on('end',function(){
+ t.equals(fails.length,0,'should not have any fails');
+ t.equals(path.basename(emptys[0]),'empty','should find empty dir');
+ t.end();
+ });
+ });
+});
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/pauseresume.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/pauseresume.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/pauseresume.js
new file mode 100644
index 0000000..e8d5fb1
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/pauseresume.js
@@ -0,0 +1,36 @@
+var test = require('tap').test,
+walk = require('../walkdir.js');
+
+test('should be able to pause walk',function(t){
+
+ var paths = [];
+ var paused = false;
+ var em = walk('./',function(path){
+ if(!paused){
+ em.pause();
+ paused = 1;
+ setTimeout(function(){
+ t.equals(paths.length,1,'while paused should not emit any more paths');
+ em.resume();
+ },300);
+ } else if(paused == 1){
+ em.pause();
+ paused = 2;
+ setTimeout(function(){
+ t.equals(paths.length,2,'while paused should not emit any more paths');
+ em.resume();
+ },300);
+ }
+
+ paths.push(path);
+
+ });
+
+ em.on('end',function(){
+ console.log('end, and i found ',paths.length,'paths');
+ t.ok(paths.length > 1,'should have more paths before end');
+ t.end();
+ });
+
+});
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/symlink.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/symlink.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/symlink.js
new file mode 100644
index 0000000..2ccde9a
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/symlink.js
@@ -0,0 +1,37 @@
+var test = require('tap').test,
+walkdir = require('../walkdir.js');
+
+
+test('follow symlinks',function(t){
+
+ var links = [],paths = [],failures = [],errors = [];
+
+ var emitter = walkdir(__dirname+'/dir/symlinks/dir2',{follow_symlinks:true});
+
+ emitter.on('path',function(path,stat){
+ paths.push(path);
+ });
+
+ emitter.on('link',function(path,stat){
+ links.push(path);
+ });
+
+ emitter.on('error',function(path,err){
+ console.log('error!!', arguments);
+ errors.push(arguments);
+ });
+
+ emitter.on('fail',function(path,err){
+ failures.push(path);
+ });
+
+ emitter.on('end',function(){
+
+ t.equal(errors.length,0,'should have no errors');
+ t.equal(failures.length,1,'should have a failure');
+ t.ok(paths.indexOf(__dirname+'/dir/symlinks/dir1/file1') !== -1,'if follow symlinks works i would have found dir1 file1');
+ t.equal(require('path').basename(failures[0]),'does-not-exist','should have fail resolviong does-not-exist which dangling-symlink points to');
+ t.end();
+
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/sync.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/sync.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/sync.js
new file mode 100644
index 0000000..1243ab5
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test/sync.js
@@ -0,0 +1,50 @@
+var test = require('tap').test,
+walkdir = require('../walkdir.js');
+
+var expectedPaths = {
+'dir/foo/x':'file',
+'dir/foo/a':'dir',
+'dir/foo/a/y':'file',
+'dir/foo/a/b':'dir',
+'dir/foo/a/b/z':'file',
+'dir/foo/a/b/c':'dir',
+'dir/foo/a/b/c/w':'file'
+};
+
+test('sync',function(t){
+ var paths = [],
+ files = [],
+ dirs = [];
+
+ var pathResult = walkdir.sync(__dirname+'/dir/foo',function(path){
+ //console.log('path: ',path);
+ paths.push(path);
+ });
+
+ t.ok(pathResult instanceof Array,'if return object is not specified should be an array');
+
+ t.equals(Object.keys(expectedPaths).length,paths.length,'should have found the same number of paths as expected');
+
+ Object.keys(expectedPaths).forEach(function(v,k){
+ t.ok(paths.indexOf(__dirname+'/'+v) > -1,v+' should be found');
+ });
+
+ t.equivalent(paths,pathResult,'paths should be equal to pathResult');
+
+ t.end();
+});
+
+test('sync return object',function(t){
+
+ var pathResult = walkdir.sync(__dirname+'/dir/foo',{return_object:true});
+
+ t.ok(!(pathResult instanceof Array),'if return object is not specified should be an array');
+
+ t.equals(Object.keys(expectedPaths).length,Object.keys(pathResult).length,'should find the same number of paths as expected');
+
+ Object.keys(expectedPaths).forEach(function(v,k){
+ t.ok(pathResult[__dirname+'/'+v],'should find path in result object');
+ });
+
+ t.end();
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/walkdir.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/walkdir.js b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/walkdir.js
new file mode 100644
index 0000000..4484a22
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/walkdir.js
@@ -0,0 +1,233 @@
+var EventEmitter = require('events').EventEmitter,
+fs = require('fs'),
+_path = require('path'),
+sep = _path.sep||'/';// 0.6.x
+
+
+module.exports = walkdir;
+
+walkdir.find = walkdir.walk = walkdir;
+
+walkdir.sync = function(path,options,cb){
+ if(typeof options == 'function') cb = options;
+ options = options || {};
+ options.sync = true;
+ return walkdir(path,options,cb);
+
+};
+
+function walkdir(path,options,cb){
+
+ if(typeof options == 'function') cb = options;
+
+ options = options || {};
+
+ var emitter = new EventEmitter(),
+ allPaths = (options.return_object?{}:[]),
+ resolved = false,
+ inos = {},
+ stop = 0,
+ pause = null,
+ ended = 0,
+ jobs=0,
+ job = function(value) {
+ jobs += value;
+ if(value < 1 && !tick) {
+ tick = 1;
+ process.nextTick(function(){
+ tick = 0;
+ if(jobs <= 0 && !ended) {
+ ended = 1;
+ emitter.emit('end');
+ }
+ });
+ }
+ }, tick = 0;
+
+ //mapping is stat functions to event names.
+ var statIs = [['isFile','file'],['isDirectory','directory'],['isSymbolicLink','link'],['isSocket','socket'],['isFIFO','fifo'],['isBlockDevice','blockdevice'],['isCharacterDevice','characterdevice']];
+
+ var statter = function (path,first,depth) {
+ job(1);
+ var statAction = function fn(err,stat,data) {
+
+ job(-1);
+ if(stop) return;
+
+ // in sync mode i found that node will sometimes return a null stat and no error =(
+ // this is reproduceable in file descriptors that no longer exist from this process
+ // after a readdir on /proc/3321/task/3321/ for example. Where 3321 is this pid
+ // node @ v0.6.10
+ if(err || !stat) {
+ emitter.emit('fail',path,err);
+ return;
+ }
+
+
+ //if i have evented this inode already dont again.
+ if(inos[stat.dev+'-'+stat.ino] && stat.ino) return;
+ inos[stat.dev+'-'+stat.ino] = 1;
+
+ if (first && stat.isDirectory()) {
+ emitter.emit('targetdirectory',path,stat,depth);
+ return;
+ }
+
+ emitter.emit('path', path, stat,depth);
+
+ var i,name;
+
+ for(var j=0,k=statIs.length;j<k;j++) {
+ if(stat[statIs[j][0]]()) {
+ emitter.emit(statIs[j][1],path,stat,depth);
+ break;
+ }
+ }
+ };
+
+ if(options.sync) {
+ var stat,ex;
+ try{
+ stat = fs.lstatSync(path);
+ } catch (e) {
+ ex = e;
+ }
+
+ statAction(ex,stat);
+ } else {
+ fs.lstat(path,statAction);
+ }
+ },readdir = function(path,stat,depth){
+ if(!resolved) {
+ path = _path.resolve(path);
+ resolved = 1;
+ }
+
+ if(options.max_depth && depth >= options.max_depth){
+ emitter.emit('maxdepth',path,stat,depth);
+ return;
+ }
+
+ job(1);
+ var readdirAction = function(err,files) {
+ job(-1);
+ if (err || !files) {
+ //permissions error or invalid files
+ emitter.emit('fail',path,err);
+ return;
+ }
+
+ if(!files.length) {
+ // empty directory event.
+ emitter.emit('empty',path,stat,depth);
+ return;
+ }
+
+ if(path == sep) path='';
+ for(var i=0,j=files.length;i<j;i++){
+ statter(path+sep+files[i],false,(depth||0)+1);
+ }
+
+ };
+
+ //use same pattern for sync as async api
+ if(options.sync) {
+ var e,files;
+ try {
+ files = fs.readdirSync(path);
+ } catch (e) { }
+
+ readdirAction(e,files);
+ } else {
+ fs.readdir(path,readdirAction);
+ }
+ };
+
+ if (options.follow_symlinks) {
+ var linkAction = function(err,path,depth){
+ job(-1);
+ //TODO should fail event here on error?
+ statter(path,false,depth);
+ };
+
+ emitter.on('link',function(path,stat,depth){
+ job(1);
+ if(options.sync) {
+ var lpath,ex;
+ try {
+ lpath = fs.readlinkSync(path);
+ } catch(e) {
+ ex = e;
+ }
+ linkAction(ex,_path.resolve(_path.dirname(path),lpath),depth);
+
+ } else {
+ fs.readlink(path,function(err,lpath){
+ linkAction(err,_path.resolve(_path.dirname(path),lpath),depth);
+ });
+ }
+ });
+ }
+
+ if (cb) {
+ emitter.on('path',cb);
+ }
+
+ if (options.sync) {
+ if(!options.no_return){
+ emitter.on('path',function(path,stat){
+ if(options.return_object) allPaths[path] = stat;
+ else allPaths.push(path);
+ });
+ }
+ }
+
+ if (!options.no_recurse) {
+ emitter.on('directory',readdir);
+ }
+ //directory that was specified by argument.
+ emitter.once('targetdirectory',readdir);
+ //only a fail on the path specified by argument is fatal
+ emitter.once('fail',function(_path,err){
+ //if the first dir fails its a real error
+ if(path == _path) {
+ emitter.emit('error',path,err);
+ }
+ });
+
+ statter(path,1);
+ if (options.sync) {
+ return allPaths;
+ } else {
+ //support stopping everything.
+ emitter.end = emitter.stop = function(){stop = 1;};
+ //support pausing everything
+ var emitQ = [];
+ emitter.pause = function(){
+ job(1);
+ pause = true;
+ emitter.emit = function(){
+ emitQ.push(arguments);
+ };
+ };
+ // support getting the show going again
+ emitter.resume = function(){
+ if(!pause) return;
+ pause = false;
+ // not pending
+ job(-1);
+ //replace emit
+ emitter.emit = EventEmitter.prototype.emit;
+ // local ref
+ var q = emitQ;
+ // clear ref to prevent infinite loops
+ emitQ = [];
+ while(q.length) {
+ emitter.emit.apply(emitter,q.shift());
+ }
+ };
+
+ return emitter;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/package.json b/blackberry10/node_modules/jasmine-node/package.json
new file mode 100755
index 0000000..4573a53
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "jasmine-node",
+ "version": "1.7.1",
+ "description": "DOM-less simple JavaScript BDD testing framework for Node",
+ "contributors": [
+ {
+ "name": "Chris Moultrie",
+ "email": "chris@moultrie.org"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mhevery/jasmine-node.git"
+ },
+ "keywords": [
+ "testing",
+ "bdd"
+ ],
+ "author": {
+ "name": "Misko Hevery",
+ "email": "misko@hevery.com"
+ },
+ "maintainers": "Martin Häger <ma...@gmail.com>",
+ "licenses": [
+ "MIT"
+ ],
+ "dependencies": {
+ "coffee-script": ">=1.0.1",
+ "jasmine-reporters": ">=0.2.0",
+ "requirejs": ">=0.27.1",
+ "walkdir": ">= 0.0.1",
+ "underscore": ">= 1.3.1",
+ "gaze": "~0.3.2",
+ "mkdirp": "~0.3.5"
+ },
+ "bin": {
+ "jasmine-node": "bin/jasmine-node"
+ },
+ "preferGlobal": true,
+ "main": "lib/jasmine-node",
+ "scripts": {
+ "test": "node lib/jasmine-node/cli.js spec"
+ },
+ "devDependencies": {},
+ "readme": "jasmine-node\n======\n\n[](http://travis-ci.org/spaghetticode/jasmine-node)\n\nThis node.js module makes the wonderful Pivotal Lab's jasmine\n(http://github.com/pivotal/jasmine) spec framework available in\nnode.js.\n\njasmine\n-------\n\nVersion 1.3.1 of Jasmine is currently included with node-jasmine.\n\nwhat's new\n----------\n* Ability to test specs written in Literate Coffee-Script\n* Teamcity Reporter reinstated.\n* Ability to specify multiple files to test via list in command line\n* Ability to suppress stack trace with <code>--noStack</code>\n* Async tests now run in the expected context instead of the global one\n* --config flag that allows you to assign variables to process.env\n* Terminal Reporters are now available in the Jasmine Object #184\n* Done is now available in all timeout specs #199\n* <code>afterEach</code> is available in requirejs #179\n* Editors that replace in
stead of changing files should work with autotest #198\n* Jasmine Mock Clock now works!\n* Autotest now works!\n* Using the latest Jasmine!\n* Verbose mode tabs <code>describe</code> blocks much more accurately!\n* --coffee now allows specs written in Literate CoffeeScript (.litcoffee)\n\ninstall\n------\n\nTo install the latest official version, use NPM:\n\n npm install jasmine-node -g\n\nTo install the latest _bleeding edge_ version, clone this repository and check\nout the `beta` branch.\n\nusage\n------\n\nWrite the specifications for your code in \\*.js and \\*.coffee files in the\nspec/ directory (note: your specification files must end with either\n.spec.js, .spec.coffee or .spec.litcoffee; otherwise jasmine-node won't find them!). You can use sub-directories to better organise your specs.\n\nIf you have installed the npm package, you can run it with:\n\n jasmine-node spec/\n\nIf you aren't using npm, you should add `pwd`/lib to the $NODE_PATH\nenvironment variable
, then run:\n\n node lib/jasmine-node/cli.js\n\n\nYou can supply the following arguments:\n\n * <code>--autotest</code>, provides automatic execution of specs after each change\n * <code>--coffee</code>, allow execution of .coffee and .litcoffee specs\n * <code>--color</code>, indicates spec output should uses color to\nindicates passing (green) or failing (red) specs\n * <code>--noColor</code>, do not use color in the output\n * <code>-m, --match REGEXP</code>, match only specs comtaining \"REGEXPspec\"\n * <code>--matchall</code>, relax requirement of \"spec\" in spec file names\n * <code>--verbose</code>, verbose output as the specs are run\n * <code>--junitreport</code>, export tests results as junitreport xml format\n * <code>--output FOLDER</code>, defines the output folder for junitreport files\n * <code>--teamcity</code>, converts all console output to teamcity custom test runner commands. (Normally auto detected.)\n * <code>--runWithRequireJs</code>, loads all
specs using requirejs instead of node's native require method\n * <code>--requireJsSetup</code>, file run before specs to include and configure RequireJS\n * <code>--test-dir</code>, the absolute root directory path where tests are located\n * <code>--nohelpers</code>, does not load helpers\n * <code>--forceexit</code>, force exit once tests complete\n * <code>--captureExceptions</code>, listen to global exceptions, report them and exit (interferes with Domains in NodeJs, so do not use if using Domains as well\n * <code>--config NAME VALUE</code>, set a global variable in process.env\n * <code>--noStack</code>, suppress the stack trace generated from a test failure\n\nIndividual files to test can be added as bare arguments to the end of the args.\n\nExample:\n\n`jasmine-node --coffee spec/AsyncSpec.coffee spec/CoffeeSpec.coffee spec/SampleSpecs.js`\n\nasync tests\n-----------\n\njasmine-node includes an alternate syntax for writing asynchronous tests. Accepting\na done callb
ack in the specification will trigger jasmine-node to run the test\nasynchronously waiting until the done() callback is called.\n\n```javascript\n it(\"should respond with hello world\", function(done) {\n request(\"http://localhost:3000/hello\", function(error, response, body){\n expect(body).toEqual(\"hello world\");\n done();\n });\n });\n```\n\nAn asynchronous test will fail after 5000 ms if done() is not called. This timeout\ncan be changed by setting jasmine.DEFAULT_TIMEOUT_INTERVAL or by passing a timeout\ninterval in the specification.\n\n it(\"should respond with hello world\", function(done) {\n request(\"http://localhost:3000/hello\", function(error, response, body){\n done();\n }, 250); // timeout after 250 ms\n });\n\nCheckout spec/SampleSpecs.js to see how to use it.\n\nrequirejs\n---------\n\nThere is a sample project in `/spec-requirejs`. It is comprised of:\n\n1. `requirejs-setup.js`, this pulls in our wrapper t
emplate (next)\n1. `requirejs-wrapper-template`, this builds up requirejs settings\n1. `requirejs.sut.js`, this is a __SU__bject To __T__est, something required by requirejs\n1. `requirejs.spec.js`, the actual jasmine spec for testing\n\ndevelopment\n-----------\n\nInstall the dependent packages by running:\n\n npm install\n\nRun the specs before you send your pull request:\n\n specs.sh\n\n__Note:__ Some tests are designed to fail in the specs.sh. After each of the\nindividual runs completes, there is a line that lists what the expected\nPass/Assert/Fail count should be. If you add/remove/edit tests, please be sure\nto update this with your PR.\n\n\nchangelog\n---------\n\n* _1.7.1 - Removed unneeded fs dependency (thanks to\n [kevinsawicki](https://github.com/kevinsawicki)) Fixed broken fs call in\n node 0.6 (thanks to [abe33](https://github.com/abe33))_\n* _1.7.0 - Literate Coffee-Script now testable (thanks to [magicmoose](https://github.com/magicmoose))_\n* _1.6.
0 - Teamcity Reporter Reinstated (thanks to [bhcleek](https://github.com/bhcleek))_\n* _1.5.1 - Missing files and require exceptions will now report instead of failing silently_\n* _1.5.0 - Now takes multiple files for execution. (thanks to [abe33](https://github.com/abe33))_\n* _1.4.0 - Optional flag to suppress stack trace on test failure (thanks to [Lastalas](https://github.com/Lastalas))_\n* _1.3.1 - Fixed context for async tests (thanks to [omryn](https://github.com/omryn))_\n* _1.3.0 - Added --config flag for changeable testing environments_\n* _1.2.3 - Fixed #179, #184, #198, #199. Fixes autotest, afterEach in requirejs, terminal reporter is in jasmine object, done function missing in async tests_\n* _1.2.2 - Revert Exception Capturing to avoid Breaking Domain Tests_\n* _1.2.1 - Emergency fix for path reference missing_\n* _1.2.0 - Fixed #149, #152, #171, #181, #195. --autotest now works as expected, jasmine clock now responds to the fake ticking as requested, and re
moved the path.exists warning_\n* _1.1.1 - Fixed #173, #169 (Blocks were not indented in verbose properly, added more documentation to address #180_\n* _1.1.0 - Updated Jasmine to 1.3.1, fixed fs missing, catching uncaught exceptions, other fixes_\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/mhevery/jasmine-node/issues"
+ },
+ "_id": "jasmine-node@1.7.1",
+ "dist": {
+ "shasum": "5df8182da5f9a4612d07089417248d4bc2a01a92"
+ },
+ "_from": "jasmine-node@1.7.1",
+ "_resolved": "https://registry.npmjs.org/jasmine-node/-/jasmine-node-1.7.1.tgz"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/scripts/specs
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/scripts/specs b/blackberry10/node_modules/jasmine-node/scripts/specs
new file mode 100755
index 0000000..28a45f0
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/scripts/specs
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+entry="node lib/jasmine-node/cli.js "
+
+if [ $# -ne 0 ]; then
+ command=$entry"$1 spec"
+ echo $command
+ $command
+else
+ echo "Running all tests located in the spec directory"
+ command=$entry"spec"
+ echo $command
+ time $command #/nested/uber-nested
+ echo -e "\033[1;35m--- Should have 40 tests and 71 assertions and 1 Failure. ---\033[0m"
+ echo ""
+
+ echo "Running all tests located in the spec directory with coffee option"
+ command=$entry"--coffee spec"
+ echo $command
+ time $command #/nested/uber-nested
+ echo -e "\033[1;35m--- Should have 40 tests and 71 assertions and 1 Failure. ---\033[0m"
+ echo ""
+
+ echo "Running all tests located in the spec directory with requirejs option"
+ #command=$entry"--nohelpers --runWithRequireJs spec-requirejs"
+ command=$entry"--runWithRequireJs spec"
+ echo $command
+ time $command
+ echo -e "\033[1;35m--- Should have 40 tests and 71 assertions and 1 Failure. ---\033[0m"
+
+ echo "Running all tests located in the spec-requirejs directory with requirejs"
+ #command=$entry"--nohelpers --runWithRequireJs spec-requirejs"
+ command=$entry"--runWithRequireJs spec-requirejs"
+ echo $command
+ time $command
+ echo -e "\033[1;35m--- Should have 1 test and 2 assertions and 0 Failures. ---\033[0m"
+fi
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee
new file mode 100644
index 0000000..4a8f754
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireCsSpec.coffee
@@ -0,0 +1,5 @@
+require [ "cs!requirecs.sut" ], (sut) ->
+ describe "RequireJs basic tests with spec and sut in CoffeeScript", ->
+ it "should load coffeescript sut", ->
+ expect(sut.name).toBe "CoffeeScript To Test"
+ expect(sut.method(2)).toBe 4
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee
new file mode 100644
index 0000000..05bad4a
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/RequireJsSpec.coffee
@@ -0,0 +1,5 @@
+require [ "requirecs.sut" ], (sut) ->
+ describe "RequireJs basic tests with spec in CoffeeScript", ->
+ it "should load javascript sut", ->
+ expect(sut.name).toBe "CoffeeScript To Test"
+ expect(sut.method(2)).toBe 4
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee
new file mode 100644
index 0000000..b0a2250
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirecs.sut.coffee
@@ -0,0 +1,3 @@
+define ->
+ name: 'CoffeeScript To Test'
+ method: (input) -> 2 * input
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js
new file mode 100644
index 0000000..0cd82b8
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs-coffee/requirejs-setup.js
@@ -0,0 +1,13 @@
+/** Custom RequireJS setup file to test user-specified setup files */
+
+/* We want to minimize behavior changes between this test setup file and the
+ * default setup file to avoid breaking tests which rely on any (current or
+ * future) default behavior. So we:
+ * - Run the normal setup file
+ * - Avoid introducing additional global variables
+ * - Avoid maintaining two copies of the setup file
+ */
+eval(require('fs').readFileSync(baseUrl + '../lib/jasmine-node/requirejs-wrapper-template.js', 'utf8'));
+
+// This is our indicator that this custom setup script has run
+var setupHasRun = true;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js b/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js
new file mode 100644
index 0000000..5e7bddb
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.spec.js
@@ -0,0 +1,19 @@
+require(['requirejs.sut'], function(sut){
+ describe('RequireJs basic tests', function(){
+ beforeEach(function(){
+ expect(true).toBeTruthy();
+ });
+ afterEach(function(){
+ expect(true).toBeTruthy();
+ });
+
+ it('should load sut', function(){
+ expect(sut.name).toBe('Subject To Test');
+ expect(sut.method(2)).toBe(3);
+ });
+
+ it('should run setup', function(){
+ expect(typeof setupHasRun).toBe('boolean');
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js b/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js
new file mode 100644
index 0000000..1d5095f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec-requirejs/requirejs.sut.js
@@ -0,0 +1,8 @@
+define(function(){
+ return {
+ name: 'Subject To Test',
+ method: function(input){
+ return 1+input;
+ }
+ };
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/AsyncSpec.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/AsyncSpec.coffee b/blackberry10/node_modules/jasmine-node/spec/AsyncSpec.coffee
new file mode 100644
index 0000000..a6e160d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/AsyncSpec.coffee
@@ -0,0 +1,11 @@
+#=============================================================================
+# Async spec, that will be time outed
+#=============================================================================
+describe 'async', ->
+ it 'should be timed out', ->
+ waitsFor (-> false), 'MIRACLE', 500
+
+ doneFunc = (done) ->
+ setTimeout(done, 10000)
+
+ it "should timeout after 100 ms", doneFunc, 100
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/CoffeeSpec.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/CoffeeSpec.coffee b/blackberry10/node_modules/jasmine-node/spec/CoffeeSpec.coffee
new file mode 100755
index 0000000..757da61
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/CoffeeSpec.coffee
@@ -0,0 +1,4 @@
+describe 'jasmine-node', ->
+
+ it 'should pass', ->
+ expect(1+2).toEqual(3)
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/GrammarHelper.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/GrammarHelper.coffee b/blackberry10/node_modules/jasmine-node/spec/GrammarHelper.coffee
new file mode 100644
index 0000000..507fd58
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/GrammarHelper.coffee
@@ -0,0 +1,22 @@
+global.testClass = (description, specDefinitions) ->
+ suite = jasmine.getEnv().describe('Class: ' + description, specDefinitions)
+ suite.tags = ['class']
+ suite.isIntermediate = true;
+ suite
+
+global.feature = (description, specDefinitions) ->
+ suite = jasmine.getEnv().describe('Feature: ' + description, specDefinitions)
+ suite.tags = ['feature']
+ suite.isIntermediate = true;
+ suite
+
+global.scenario = (desc, func) ->
+ suite = jasmine.getEnv().describe('Scenario: ' + desc, func)
+ suite.tags = ['scenario']
+ suite.isIntermediate = true;
+ suite
+
+global.should = (description, specDefinitions) ->
+ suite = jasmine.getEnv().it('It should ' + description, specDefinitions)
+ suite.tags = ['should']
+ suite
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/HelperSpec.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/HelperSpec.coffee b/blackberry10/node_modules/jasmine-node/spec/HelperSpec.coffee
new file mode 100644
index 0000000..16498c0
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/HelperSpec.coffee
@@ -0,0 +1,6 @@
+
+testClass 'HelperLoader', ->
+ feature 'Loading order', ->
+ should 'load the helpers before the specs.', ->
+ expect(true).toBeTruthy()
+ # will fail to parse the spec if the helper was not loaded first
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/SampleSpecs.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/SampleSpecs.js b/blackberry10/node_modules/jasmine-node/spec/SampleSpecs.js
new file mode 100755
index 0000000..f9c001b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/SampleSpecs.js
@@ -0,0 +1,25 @@
+describe('jasmine-node', function(){
+
+ it('should pass', function(){
+ expect(1+2).toEqual(3);
+ });
+
+ it('shows asynchronous test', function(){
+ setTimeout(function(){
+ expect('second').toEqual('second');
+ asyncSpecDone();
+ }, 1);
+ expect('first').toEqual('first');
+ asyncSpecWait();
+ });
+
+ it('shows asynchronous test node-style', function(done){
+ setTimeout(function(){
+ expect('second').toEqual('second');
+ // If you call done() with an argument, it will fail the spec
+ // so you can use it as a handler for many async node calls
+ done();
+ }, 1);
+ expect('first').toEqual('first');
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/TestSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/TestSpec.js b/blackberry10/node_modules/jasmine-node/spec/TestSpec.js
new file mode 100755
index 0000000..89bb204
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/TestSpec.js
@@ -0,0 +1,82 @@
+
+describe('jasmine-node-flat', function(){
+ it('should pass', function(){
+ expect(1+2).toEqual(3);
+ });
+});
+
+describe('Testing some characters', function() {
+ var chars = ['&', '\'', '"', '<', '>'];
+ for(var i = 0; i < chars.length; i+=1) {
+ currentChar = chars[i];
+ it('should reject ' + currentChar, (function(currentChar) {
+ expect(false).toEqual(false);
+ })(currentChar));
+ }
+});
+
+describe('Testing waitsfor functionality', function() {
+ it("Runs and then waitsFor", function() {
+ runs(function() {
+ 1+1;
+ });
+ waitsFor(function() {
+ return true === false;
+ }, "the impossible", 1000);
+ runs(function() {
+ expect(true).toBeTruthy();
+ });
+ });
+});
+
+describe('root', function () {
+
+ describe('nested', function () {
+
+ xit('nested statement', function () {
+ expect(1).toBeTruthy();
+ });
+
+ });
+
+ it('root statement', function () {
+ expect(1).toBeTruthy();
+ });
+
+});
+
+describe("Top level describe block", function() {
+ it("first it block in top level describe", function() {
+ expect(true).toEqual(true);
+ });
+ describe("Second level describe block", function() {
+ it("first it block in second level describe", function() {
+ expect(true).toBe(true);
+ });
+ });
+ it("second it block in top level describe", function() {
+ expect(true).toEqual(true);
+ });
+});
+
+describe('async', function () {
+
+ var request = function (str, func) {
+ func('1', '2', 'hello world');
+ };
+
+ it("should respond with hello world", function(done) {
+ request("http://localhost:3000/hello", function(error, response, body){
+ expect(body).toEqual("hello world");
+ done();
+ });
+ });
+
+ it("should respond with hello world", function(done) {
+ request("http://localhost:3000/hello", function(error, response, body){
+ expect(body).toEqual("hello world");
+ done();
+ });
+ }, 250); // timeout after 250 ms
+
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/TimerSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/TimerSpec.js b/blackberry10/node_modules/jasmine-node/spec/TimerSpec.js
new file mode 100644
index 0000000..00d584c
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/TimerSpec.js
@@ -0,0 +1,34 @@
+describe("Manually ticking the Jasmine Mock Clock", function() {
+ var timerCallback;
+
+ beforeEach(function() {
+ timerCallback = jasmine.createSpy('timerCallback');
+ jasmine.Clock.useMock();
+ });
+
+ it("causes a timeout to be called synchronously", function() {
+ setTimeout(timerCallback, 100);
+
+ expect(timerCallback).not.toHaveBeenCalled();
+
+ jasmine.Clock.tick(101);
+
+ expect(timerCallback).toHaveBeenCalled();
+ });
+
+ it("causes an interval to be called synchronously", function() {
+ setInterval(timerCallback, 100);
+
+ expect(timerCallback).not.toHaveBeenCalled();
+
+ jasmine.Clock.tick(102);
+ expect(timerCallback).toHaveBeenCalled();
+ expect(timerCallback.callCount).toEqual(1);
+
+ jasmine.Clock.tick(50);
+ expect(timerCallback.callCount).toEqual(1);
+
+ jasmine.Clock.tick(50);
+ expect(timerCallback.callCount).toEqual(2);
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/async-callback_spec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/async-callback_spec.js b/blackberry10/node_modules/jasmine-node/spec/async-callback_spec.js
new file mode 100644
index 0000000..79bd754
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/async-callback_spec.js
@@ -0,0 +1,174 @@
+describe('async-callback', function() {
+ var env;
+ beforeEach(function() {
+ env = new jasmine.Env();
+ });
+
+ describe('it', function() {
+
+ it("should time out if callback is not called", function() {
+ env.describe("it", function() {
+ env.it("doesn't wait", function(done) {
+ expect(1+2).toEqual(3);
+ });
+ });
+
+ env.currentRunner().execute();
+
+ waitsFor(function() {
+ return env.currentRunner().results().totalCount > 0;
+ }, 6000);
+
+ runs(function() {
+ expect(env.currentRunner().results().failedCount).toEqual(1);
+ expect(firstResult(env.currentRunner()).message).toMatch(/timeout/);;
+ });
+ });
+
+ it("should accept timeout for individual spec", function() {
+ env.describe("it", function() {
+ env.it("doesn't wait", function(done) {
+ expect(1+2).toEqual(3);
+ }, 250);
+ });
+
+ env.currentRunner().execute();
+
+ waitsFor(function() {
+ return env.currentRunner().results().totalCount > 0;
+ }, 500);
+
+ runs(function() {
+ expect(env.currentRunner().results().failedCount).toEqual(1);
+ expect(firstResult(env.currentRunner()).message).toMatch(/timeout/);;
+ });
+ });
+
+ it("should fail if callback is passed error", function() {
+ env.describe("it", function() {
+ env.it("doesn't wait", function(done) {
+ process.nextTick(function() {
+ done("Failed asynchronously");
+ });
+ });
+ });
+
+ env.currentRunner().execute();
+
+ waitsFor(function() {
+ return env.currentRunner().results().totalCount > 0;
+ });
+
+ runs(function() {
+ expect(env.currentRunner().results().failedCount).toEqual(1);
+ expect(firstResult(env.currentRunner()).message).toEqual("Failed asynchronously");
+ });
+ });
+
+
+ it("should finish after callback is called", function() {
+ env.describe("it", function() {
+ env.it("waits", function(done) {
+ process.nextTick(function() {
+ env.currentSpec.expect(1+2).toEqual(3);
+ done();
+ });
+ });
+ });
+
+ env.currentRunner().execute();
+
+ waitsFor(function() {
+ return env.currentRunner().results().totalCount > 0;
+ }, 2000);
+
+ runs(function() {
+ expect(env.currentRunner().results().passedCount).toEqual(1);
+ });
+ });
+
+ it('should run in the context of the current spec', function(){
+ var actualContext;
+ var jasmineSpecContext;
+ env.describe("it", function() {
+ env.it("register context", function(done) {
+ actualContext = this;
+ jasmineSpecContext = env.currentSpec;
+ env.expect(this).toBe(jasmineSpecContext);
+ done();
+ });
+ });
+
+ env.currentRunner().execute();
+
+ waitsFor(function() {
+ return env.currentRunner().results().totalCount > 0;
+ }, 'tested jasmine env runner to run the test', 100);
+
+ runs(function() {
+ expect(actualContext).not.toBe(global);
+ expect(actualContext).toBe(jasmineSpecContext);
+ });
+ });
+
+ });
+
+ describe("beforeEach", function() {
+ it("should wait for callback", function() {
+ env.describe("beforeEach", function() {
+ var waited = false;
+ env.beforeEach(function(done) {
+ process.nextTick(function() {
+ waited = true;
+ done();
+ });
+ });
+ env.it("waited", function() {
+ env.currentSpec.expect(waited).toBeTruthy();
+ });
+ });
+
+ env.currentRunner().execute();
+
+ waitsFor(function() {
+ return env.currentRunner().results().totalCount > 0;
+ });
+
+ runs(function() {
+ expect(env.currentRunner().results().passedCount).toEqual(1);
+ });
+ });
+ });
+
+ describe("afterEach", function() {
+ it("should be passed async callback", function() {
+ var completed = false;
+ env.describe("afterEach", function() {
+ env.afterEach(function(done) {
+ process.nextTick(function() {
+ done('Failed in afterEach');
+ completed = true;
+ });
+ });
+ env.it("should pass", function() {
+ this.expect(1+2).toEqual(3);
+ });
+ });
+
+ env.currentRunner().execute();
+
+ waitsFor(function() {
+ return completed === true;
+ });
+
+ runs(function() {
+ expect(env.currentRunner().results().passedCount).toEqual(1);
+ expect(env.currentRunner().results().failedCount).toEqual(1);
+ });
+ });
+ });
+});
+
+function firstResult(runner) {
+ return runner.results().getItems()[0].getItems()[0].getItems()[0];
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/helper_spec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/helper_spec.js b/blackberry10/node_modules/jasmine-node/spec/helper_spec.js
new file mode 100644
index 0000000..d157fd2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/helper_spec.js
@@ -0,0 +1,7 @@
+describe("helper", function() {
+ it("should load the helpers", function() {
+ var expectation= expect(true);
+
+ expect(typeof(expectation.toHaveProperty)).toBe('function');
+ });
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee b/blackberry10/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee
new file mode 100644
index 0000000..77eb791
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/litcoffee/Litcoffee.spec.litcoffee
@@ -0,0 +1,9 @@
+Literate CoffeeScript
+====================
+
+This is a spec using written in Literate CoffeeScript
+
+ describe 'Coffee.litcoffee', ->
+
+ it 'should pass', ->
+ expect(1+2).toEqual(3)
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/nested.js/NestedSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/nested.js/NestedSpec.js b/blackberry10/node_modules/jasmine-node/spec/nested.js/NestedSpec.js
new file mode 100644
index 0000000..e63ee64
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/nested.js/NestedSpec.js
@@ -0,0 +1,5 @@
+describe('jasmine-node-nested.js', function(){
+ it('should pass', function(){
+ expect(1+2).toEqual(3);
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/nested/NestedSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/nested/NestedSpec.js b/blackberry10/node_modules/jasmine-node/spec/nested/NestedSpec.js
new file mode 100755
index 0000000..6d27d30
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/nested/NestedSpec.js
@@ -0,0 +1,5 @@
+describe('jasmine-node-nested', function(){
+ it('should pass', function(){
+ expect(1+2).toEqual(3);
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js b/blackberry10/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js
new file mode 100755
index 0000000..146203b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/nested/uber-nested/UberNestedSpec.js
@@ -0,0 +1,11 @@
+describe('jasmine-node-uber-nested', function(){
+ it('should pass', function(){
+ expect(1+2).toEqual(3);
+ });
+
+ describe('failure', function(){
+ it('should report failure (THIS IS EXPECTED)', function(){
+ expect(true).toBeFalsy();
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/reporter_spec.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/reporter_spec.js b/blackberry10/node_modules/jasmine-node/spec/reporter_spec.js
new file mode 100644
index 0000000..b89df45
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/reporter_spec.js
@@ -0,0 +1,476 @@
+var jasmineNode = require(__dirname + "/../lib/jasmine-node/reporter").jasmineNode;
+
+describe('TerminalReporter', function() {
+ beforeEach(function() {
+ var config = {}
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ });
+
+ describe("initialize", function() {
+ it('initializes print_ from config', function() {
+ var config = { print: true };
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ expect(this.reporter.print_).toBeTruthy();
+ });
+
+ it('initializes color_ from config', function() {
+ var config = { color: true }
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ expect(this.reporter.color_).toEqual(jasmineNode.TerminalReporter.prototype.ANSIColors);
+ });
+
+ it('initializes includeStackTrace_ from config', function () {
+ var config = {}
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ expect(this.reporter.includeStackTrace_).toBeTruthy();
+ });
+
+ it('sets the started_ flag to false', function() {
+ var config = {}
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ expect(this.reporter.started_).toBeFalsy();
+ });
+
+ it('sets the finished_ flag to false', function() {
+ var config = {}
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ expect(this.reporter.finished_).toBeFalsy();
+ });
+
+ it('initializes the suites_ array', function() {
+ var config = {}
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ expect(this.reporter.suites_.length).toEqual(0);
+ });
+
+ it('initializes the specResults_ to an Object', function() {
+ var config = {}
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ expect(this.reporter.specResults_).toBeDefined();
+ });
+
+ it('initializes the failures_ array', function() {
+ var config = {}
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ expect(this.reporter.failures_.length).toEqual(0);
+ });
+
+ it('sets the callback_ property to false by default', function() {
+ var config = {}
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ expect(this.reporter.callback_).toEqual(false)
+ });
+
+ it('sets the callback_ property to onComplete if supplied', function() {
+ var foo = function() { }
+ var config = { onComplete: foo }
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ expect(this.reporter.callback_).toBe(foo)
+ });
+ });
+
+ describe('when the report runner starts', function() {
+ beforeEach(function() {
+ this.spy = spyOn(this.reporter, 'printLine_');
+
+ var runner = {
+ topLevelSuites: function() {
+ var suites = [];
+ var suite = { id: 25 };
+ suites.push(suite);
+ return suites;
+ }
+ };
+ this.reporter.reportRunnerStarting(runner);
+ });
+
+ it('sets the started_ field to true', function() {
+ expect(this.reporter.started_).toBeTruthy();
+ });
+
+ it('sets the startedAt field', function() {
+ // instanceof does not work cross-context (such as when run with requirejs)
+ var ts = Object.prototype.toString;
+ expect(ts.call(this.reporter.startedAt)).toBe(ts.call(new Date()));
+ });
+
+ it('buildes the suites_ collection', function() {
+ expect(this.reporter.suites_.length).toEqual(1);
+ expect(this.reporter.suites_[0].id).toEqual(25);
+ });
+ });
+
+ describe('the summarize_ creates suite and spec tree', function() {
+ beforeEach(function() {
+ this.spec = {
+ id: 1,
+ description: 'the spec',
+ isSuite: false
+ }
+ });
+
+ it('creates a summary object from spec', function() {
+ var result = this.reporter.summarize_(this.spec);
+
+ expect(result.id).toEqual(1);
+ expect(result.name).toEqual('the spec');
+ expect(result.type).toEqual('spec');
+ expect(result.children.length).toEqual(0);
+ });
+
+ it('creates a summary object from suite with 1 spec', function() {
+ var env = { nextSuiteId: false }
+ var suite = new jasmine.Suite(env, 'suite name', undefined, undefined);
+ suite.description = 'the suite';
+ suite.parentSuite = null;
+ suite.children_.push(this.spec);
+
+ var result = this.reporter.summarize_(suite);
+ expect(result.name).toEqual('the suite');
+ expect(result.type).toEqual('suite');
+ expect(result.children.length).toEqual(1);
+
+ var suiteChildSpec = result.children[0];
+ expect(suiteChildSpec.id).toEqual(1);
+ });
+ });
+
+ describe('reportRunnerResults', function() {
+ beforeEach(function() {
+ this.printLineSpy = spyOn(this.reporter, 'printLine_');
+ });
+
+ it('generates the report', function() {
+ var failuresSpy = spyOn(this.reporter, 'reportFailures_');
+ var printRunnerResultsSpy = spyOn(this.reporter, 'printRunnerResults_').
+ andReturn('this is the runner result');
+
+ var callbackSpy = spyOn(this.reporter, 'callback_');
+
+ var runner = {
+ results: function() {
+ var result = { failedCount: 0 };
+ return result;
+ },
+ specs: function() { return []; }
+ };
+ this.reporter.startedAt = new Date();
+
+ this.reporter.reportRunnerResults(runner);
+
+ expect(failuresSpy).toHaveBeenCalled();
+ expect(this.printLineSpy).toHaveBeenCalled();
+ expect(callbackSpy).toHaveBeenCalled();
+ });
+ });
+
+ describe('reportSpecResults', function() {
+ beforeEach(function() {
+ this.printSpy = spyOn(this.reporter, 'print_');
+ this.spec = {
+ id: 1,
+ description: 'the spec',
+ isSuite: false,
+ results: function() {
+ var result = {
+ passed: function() { return true; }
+ }
+ return result;
+ }
+ }
+ });
+
+ it('prints a \'.\' for pass', function() {
+ this.reporter.reportSpecResults(this.spec);
+ expect(this.printSpy).toHaveBeenCalledWith('.');
+ });
+
+ it('prints an \'F\' for failure', function() {
+ var addFailureToFailuresSpy = spyOn(this.reporter, 'addFailureToFailures_');
+ var results = function() {
+ var result = {
+ passed: function() { return false; }
+ }
+ return result;
+ }
+ this.spec.results = results;
+
+ this.reporter.reportSpecResults(this.spec);
+
+ expect(this.printSpy).toHaveBeenCalledWith('F');
+ expect(addFailureToFailuresSpy).toHaveBeenCalled();
+ });
+ });
+
+ describe('addFailureToFailures', function() {
+ it('adds message and stackTrace to failures_', function() {
+ var spec = {
+ suite: {
+ getFullName: function() { return 'Suite name' }
+ },
+ description: 'the spec',
+ results: function() {
+ var result = {
+ items_: function() {
+ var theItems = new Array();
+ var item = {
+ passed_: false,
+ message: 'the message',
+ trace: {
+ stack: 'the stack'
+ }
+ }
+ theItems.push(item);
+ return theItems;
+ }.call()
+ };
+ return result;
+ }
+ };
+
+ this.reporter.addFailureToFailures_(spec);
+
+ var failures = this.reporter.failures_;
+ expect(failures.length).toEqual(1);
+ var failure = failures[0];
+ expect(failure.spec).toEqual('Suite name the spec');
+ expect(failure.message).toEqual('the message');
+ expect(failure.stackTrace).toEqual('the stack');
+ });
+ });
+
+ describe('prints the runner results', function() {
+ beforeEach(function() {
+ this.runner = {
+ results: function() {
+ var _results = {
+ totalCount: 23,
+ failedCount: 52
+ };
+ return _results;
+ },
+ specs: function() {
+ var _specs = new Array();
+ _specs.push(1);
+ return _specs;
+ }
+ };
+ });
+
+ it('uses the specs\'s length, totalCount and failedCount', function() {
+ var message = this.reporter.printRunnerResults_(this.runner);
+ expect(message).toEqual('1 test, 23 assertions, 52 failures\n');
+ });
+ });
+
+ describe('reports failures', function() {
+ beforeEach(function() {
+ this.printSpy = spyOn(this.reporter, 'print_');
+ this.printLineSpy = spyOn(this.reporter, 'printLine_');
+ });
+
+ it('does not report anything when there are no failures', function() {
+ this.reporter.failures_ = new Array();
+
+ this.reporter.reportFailures_();
+
+ expect(this.printLineSpy).not.toHaveBeenCalled();
+ });
+
+ it('prints the failures', function() {
+ var failure = {
+ spec: 'the spec',
+ message: 'the message',
+ stackTrace: 'the stackTrace'
+ }
+
+ this.reporter.failures_ = new Array();
+ this.reporter.failures_.push(failure);
+
+ this.reporter.reportFailures_();
+
+ var generatedOutput =
+ [ [ '\n' ],
+ [ '\n' ],
+ [ ' 1) the spec' ],
+ [ ' Message:' ],
+ [ ' the message' ],
+ [ ' Stacktrace:' ] ];
+
+ expect(this.printLineSpy).toHaveBeenCalled();
+ expect(this.printLineSpy.argsForCall).toEqual(generatedOutput);
+
+ expect(this.printSpy).toHaveBeenCalled();
+ expect(this.printSpy.argsForCall[0]).toEqual(['Failures:']);
+ expect(this.printSpy.argsForCall[1]).toEqual([' the stackTrace']);
+ });
+
+ it('prints the failures without a Stacktrace', function () {
+ var config = { includeStackTrace: false };
+ this.reporter = new jasmineNode.TerminalReporter(config);
+ this.printSpy = spyOn(this.reporter, 'print_');
+ this.printLineSpy = spyOn(this.reporter, 'printLine_');
+
+ var failure = {
+ spec: 'the spec',
+ message: 'the message',
+ stackTrace: 'the stackTrace'
+ }
+
+ this.reporter.failures_ = new Array();
+ this.reporter.failures_.push(failure);
+
+ this.reporter.reportFailures_();
+
+ var generatedOutput =
+ [ [ '\n' ],
+ [ '\n' ],
+ [ ' 1) the spec' ],
+ [ ' Message:' ],
+ [ ' the message' ] ];
+
+ expect(this.printLineSpy).toHaveBeenCalled();
+ expect(this.printLineSpy.argsForCall).toEqual(generatedOutput);
+
+ expect(this.printSpy).toHaveBeenCalled();
+ expect(this.printSpy.argsForCall[0]).toEqual(['Failures:']);
+ expect(this.printSpy.argsForCall[1]).toBeUndefined();
+ });
+ });
+});
+
+describe('TerminalVerboseReporter', function() {
+ beforeEach(function() {
+ var config = {}
+ this.verboseReporter = new jasmineNode.TerminalVerboseReporter(config);
+ this.addFailureToFailuresSpy = spyOn(this.verboseReporter, 'addFailureToFailures_');
+ this.spec = {
+ id: 23,
+ results: function() {
+ return {
+ failedCount: 1,
+ getItems: function() {
+ return ["this is the message"];
+ }
+ }
+ }
+ };
+ });
+
+ describe('#reportSpecResults', function() {
+ it('adds the spec to the failures_', function() {
+ this.verboseReporter.reportSpecResults(this.spec);
+
+ expect(this.addFailureToFailuresSpy).toHaveBeenCalledWith(this.spec);
+ });
+
+ it('adds a new object to the specResults_', function() {
+ this.verboseReporter.reportSpecResults(this.spec);
+
+ expect(this.verboseReporter.specResults_[23].messages).toEqual(['this is the message']);
+ expect(this.verboseReporter.specResults_[23].result).toEqual('failed');
+ });
+ });
+
+ describe('#buildMessagesFromResults_', function() {
+ beforeEach(function() {
+ this.suite = {
+ type: 'suite',
+ name: 'a describe block',
+ suiteNestingLevel: 0,
+ children: [],
+ getFullName: function() { return "A spec"; },
+ };
+
+ this.spec = {
+ id: 23,
+ type: 'spec',
+ name: 'a spec block',
+ children: []
+ };
+
+ this.verboseReporter.specResults_['23'] = {
+ result: 'passed'
+ };
+
+ });
+
+ it('does not build anything when the results collection is empty', function() {
+ var results = [],
+ messages = [];
+
+ this.verboseReporter.buildMessagesFromResults_(messages, results);
+
+ expect(messages.length).toEqual(0);
+ });
+
+ it('adds a single suite to the messages', function() {
+ var results = [],
+ messages = [];
+
+ results.push(this.suite);
+
+ this.verboseReporter.buildMessagesFromResults_(messages, results);
+
+ expect(messages.length).toEqual(2);
+ expect(messages[0]).toEqual('');
+ expect(messages[1]).toEqual('a describe block');
+ });
+
+ it('adds a single spec with success to the messages', function() {
+ var results = [],
+ messages = [];
+
+ this.passSpy = spyOn(this.verboseReporter.color_, 'pass');
+
+ results.push(this.spec);
+
+ this.verboseReporter.buildMessagesFromResults_(messages, results);
+
+ expect(this.passSpy).toHaveBeenCalled();
+ expect(messages.length).toEqual(1);
+ expect(messages[0]).toEqual('a spec block');
+ });
+
+ it('adds a single spec with failure to the messages', function() {
+ var results = [],
+ messages = [];
+
+ this.verboseReporter.specResults_['23'].result = 'failed';
+
+ this.passSpy = spyOn(this.verboseReporter.color_, 'pass');
+ this.failSpy = spyOn(this.verboseReporter.color_, 'fail');
+
+ results.push(this.spec);
+
+ this.verboseReporter.buildMessagesFromResults_(messages, results);
+
+ expect(this.failSpy).toHaveBeenCalled();
+ expect(this.passSpy).not.toHaveBeenCalled();
+ });
+
+ it('adds a suite, a suite and a single spec with success to the messages', function() {
+ var results = [],
+ messages = [];
+
+ var subSuite = new Object();
+ subSuite.type = 'suite';
+ subSuite.name = 'a sub describe block';
+ subSuite.suiteNestingLevel = 1;
+ subSuite.children = [];
+ subSuite.children.push(this.spec);
+
+ this.suite.children.push(subSuite);
+ results.push(this.suite);
+
+ this.verboseReporter.buildMessagesFromResults_(messages, results);
+
+ expect(messages.length).toEqual(5);
+ expect(messages[0]).toEqual('');
+ expect(messages[1]).toEqual('a describe block');
+ expect(messages[2]).toEqual('');
+ expect(messages[3]).toEqual(' a sub describe block');
+ expect(messages[4]).toEqual(' a spec block');
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/spec/sample_helper.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/spec/sample_helper.js b/blackberry10/node_modules/jasmine-node/spec/sample_helper.js
new file mode 100644
index 0000000..9f8032f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/spec/sample_helper.js
@@ -0,0 +1,15 @@
+(function(){
+
+ var objectToString = Object.prototype.toString;
+ var PRIMITIVE_TYPES = [String, Number, RegExp, Boolean, Date];
+
+ jasmine.Matchers.prototype.toHaveProperty = function(prop) {
+ try {
+ return prop in this.actual;
+ }
+ catch (e) {
+ return false;
+ }
+ }
+
+})();
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/specs.sh
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/specs.sh b/blackberry10/node_modules/jasmine-node/specs.sh
new file mode 100755
index 0000000..e61c11e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/specs.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+
+entry="node lib/jasmine-node/cli.js "
+
+echo "Running all tests located in the spec directory"
+command=$entry"spec"
+echo $command
+time $command #/nested/uber-nested
+echo -e "\033[1;35m--- Should have 57 tests and 101 assertions and 2 Failure. ---\033[0m"
+echo ""
+
+echo "Running all tests located in the spec directory with coffee option"
+command=$entry"--coffee spec"
+echo $command
+time $command #/nested/uber-nested
+echo -e "\033[1;35m--- Should have 62 tests and 106 assertions and 4 Failures. ---\033[0m"
+echo ""
+
+echo "Running all tests located in the spec directory with requirejs option"
+#command=$entry"--nohelpers --runWithRequireJs spec-requirejs"
+command=$entry"--runWithRequireJs spec"
+echo $command
+time $command
+echo -e "\033[1;35m--- Should have 57 tests and 101 assertions and 2 Failure. ---\033[0m"
+echo ""
+
+echo "Running all tests located in the spec-requirejs directory with requirejs, requirejs setup, and coffee option"
+command=$entry"--runWithRequireJs --requireJsSetup spec-requirejs-coffee/requirejs-setup.js --coffee spec-requirejs-coffee"
+echo $command
+time $command
+echo -e "\033[1;35m--- Should have 2 tests and 4 assertions and 0 Failure. ---\033[0m"
+
+echo "Running three specs file in the spec directory with coffee option"
+command=$entry"--coffee spec/AsyncSpec.coffee spec/CoffeeSpec.coffee spec/SampleSpecs.js"
+echo $command
+time $command
+echo -e "\033[1;35m--- Should have 3 tests and 3 assertions and 2 Failure. ---\033[0m"
[13/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/index.js b/blackberry10/node_modules/net-ping/index.js
new file mode 100644
index 0000000..16d6ebc
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/index.js
@@ -0,0 +1,526 @@
+
+var events = require ("events");
+var net = require ("net");
+var raw = require ("raw-socket");
+var util = require ("util");
+
+function _expandConstantObject (object) {
+ var keys = [];
+ for (key in object)
+ keys.push (key);
+ for (var i = 0; i < keys.length; i++)
+ object[object[keys[i]]] = parseInt (keys[i]);
+}
+
+var NetworkProtocol = {
+ 1: "IPv4",
+ 2: "IPv6"
+};
+
+_expandConstantObject (NetworkProtocol);
+
+function DestinationUnreachableError (source) {
+ this.name = "DestinationUnreachableError";
+ this.message = "Destination unreachable (source=" + source + ")";
+ this.source = source;
+}
+util.inherits (DestinationUnreachableError, Error);
+
+function PacketTooBigError (source) {
+ this.name = "PacketTooBigError";
+ this.message = "Packet too big (source=" + source + ")";
+ this.source = source;
+}
+util.inherits (PacketTooBigError, Error);
+
+function ParameterProblemError (source) {
+ this.name = "ParameterProblemError";
+ this.message = "Parameter problem (source=" + source + ")";
+ this.source = source;
+}
+util.inherits (ParameterProblemError, Error);
+
+function RedirectReceivedError (source) {
+ this.name = "RedirectReceivedError";
+ this.message = "Redireect received (source=" + source + ")";
+ this.source = source;
+}
+util.inherits (RedirectReceivedError, Error);
+
+function RequestTimedOutError () {
+ this.name = "RequestTimedOutError";
+ this.message = "Request timed out";
+}
+util.inherits (RequestTimedOutError, Error);
+
+function SourceQuenchError (source) {
+ this.name = "SourceQuenchError";
+ this.message = "Source quench (source=" + source + ")";
+ this.source = source;
+}
+util.inherits (SourceQuenchError, Error);
+
+function TimeExceededError (source) {
+ this.name = "TimeExceededError";
+ this.message = "Time exceeded (source=" + source + ")";
+ this.source = source;
+}
+util.inherits (TimeExceededError, Error);
+
+function Session (options) {
+ this.retries = (options && options.retries) ? options.retries : 1;
+ this.timeout = (options && options.timeout) ? options.timeout : 2000;
+
+ this.packetSize = (options && options.packetSize) ? options.packetSize : 16;
+
+ if (this.packetSize < 12)
+ this.packetSize = 12;
+
+ this.addressFamily = (options && options.networkProtocol
+ && options.networkProtocol == NetworkProtocol.IPv6)
+ ? raw.AddressFamily.IPv6
+ : raw.AddressFamily.IPv4;
+
+ this._debug = (options && options._debug) ? true : false;
+
+ this.defaultTTL = (options && options.ttl) ? options.ttl : 128;
+
+ this.sessionId = (options && options.sessionId)
+ ? options.sessionId
+ : process.pid;
+
+ this.sessionId = this.sessionId % 65535;
+
+ this.nextId = 1;
+
+ this.socket = null;
+
+ this.reqs = {};
+ this.reqsPending = 0;
+
+ this.getSocket ();
+};
+
+util.inherits (Session, events.EventEmitter);
+
+Session.prototype.close = function () {
+ if (this.socket)
+ this.socket.close ();
+ this.flush (new Error ("Socket forcibly closed"));
+ delete this.socket;
+ return this;
+};
+
+Session.prototype._debugRequest = function (target, req) {
+ console.log ("request: addressFamily=" + this.addressFamily + " target="
+ + req.target + " id=" + req.id + " buffer="
+ + req.buffer.toString ("hex"));
+}
+
+Session.prototype._debugResponse = function (source, buffer) {
+ console.log ("response: addressFamily=" + this.addressFamily + " source="
+ + source + " buffer=" + buffer.toString ("hex"));
+}
+
+Session.prototype.flush = function (error) {
+ for (id in this.reqs) {
+ var req = this.reqRemove (id);
+ var sent = req.sent ? req.sent : new Date ();
+ req.callback (error, req.target, sent, new Date ());
+ }
+};
+
+Session.prototype.getSocket = function () {
+ if (this.socket)
+ return this.socket;
+
+ var protocol = this.addressFamily == raw.AddressFamily.IPv6
+ ? raw.Protocol.ICMPv6
+ : raw.Protocol.ICMP;
+
+ var me = this;
+ var options = {
+ addressFamily: this.addressFamily,
+ protocol: protocol
+ };
+
+ this.socket = raw.createSocket (options);
+ this.socket.on ("error", this.onSocketError.bind (me));
+ this.socket.on ("close", this.onSocketClose.bind (me));
+ this.socket.on ("message", this.onSocketMessage.bind (me));
+
+ this.ttl = null;
+ this.setTTL (this.defaultTTL);
+
+ return this.socket;
+};
+
+Session.prototype.fromBuffer = function (buffer) {
+ var offset, type, code;
+
+ if (this.addressFamily == raw.AddressFamily.IPv6) {
+ // IPv6 raw sockets don't pass the IPv6 header back to us
+ offset = 0;
+
+ if (buffer.length - offset < 8)
+ return;
+
+ // We don't believe any IPv6 options will be passed back to us so we
+ // don't attempt to pass them here.
+
+ type = buffer.readUInt8 (offset);
+ code = buffer.readUInt8 (offset + 1);
+ } else {
+ // Need at least 20 bytes for an IP header, and it should be IPv4
+ if (buffer.length < 20 || (buffer[0] & 0xf0) != 0x40)
+ return;
+
+ // The length of the IPv4 header is in mulitples of double words
+ var ip_length = (buffer[0] & 0x0f) * 4;
+
+ // ICMP header is 8 bytes, we don't care about the data for now
+ if (buffer.length - ip_length < 8)
+ return;
+
+ var ip_icmp_offset = ip_length;
+
+ // ICMP message too short
+ if (buffer.length - ip_icmp_offset < 8)
+ return;
+
+ type = buffer.readUInt8 (ip_icmp_offset);
+ code = buffer.readUInt8 (ip_icmp_offset + 1);
+
+ // For error type responses the sequence and identifier cannot be
+ // extracted in the same way as echo responses, the data part contains
+ // the IP header from our request, followed with at least 8 bytes from
+ // the echo request that generated the error, so we first go to the IP
+ // header, then skip that to get to the ICMP packet which contains the
+ // sequence and identifier.
+ if (type == 3 || type == 4 || type == 5 || type == 11) {
+ var ip_icmp_ip_offset = ip_icmp_offset + 8;
+
+ // Need at least 20 bytes for an IP header, and it should be IPv4
+ if (buffer.length - ip_icmp_ip_offset < 20
+ || (buffer[ip_icmp_ip_offset] & 0xf0) != 0x40)
+ return;
+
+ // The length of the IPv4 header is in mulitples of double words
+ var ip_icmp_ip_length = (buffer[ip_icmp_ip_offset] & 0x0f) * 4;
+
+ // ICMP message too short
+ if (buffer.length - ip_icmp_ip_offset - ip_icmp_ip_length < 8)
+ return;
+
+ offset = ip_icmp_ip_offset + ip_icmp_ip_length;
+ } else {
+ offset = ip_icmp_offset
+ }
+ }
+
+ // Response is not for a request we generated
+ if (buffer.readUInt16BE (offset + 4) != this.sessionId)
+ return;
+
+ buffer[offset + 4] = 0;
+
+ var id = buffer.readUInt16BE (offset + 6);
+ var req = this.reqs[id];
+
+ if (req) {
+ req.type = type;
+ req.code = code;
+ return req;
+ } else {
+ return null;
+ }
+};
+
+Session.prototype.onBeforeSocketSend = function (req) {
+ this.setTTL (req.ttl ? req.ttl : this.defaultTTL);
+}
+
+Session.prototype.onSocketClose = function () {
+ this.emit ("close");
+ this.flush (new Error ("Socket closed"));
+};
+
+Session.prototype.onSocketError = function (error) {
+ this.emit ("error", error);
+};
+
+Session.prototype.onSocketMessage = function (buffer, source) {
+ if (this._debug)
+ this._debugResponse (source, buffer);
+
+ var req = this.fromBuffer (buffer);
+ if (req) {
+ this.reqRemove (req.id);
+
+ if (this.addressFamily == raw.AddressFamily.IPv6) {
+ if (req.type == 1) {
+ req.callback (new DestinationUnreachableError (source), req.target,
+ req.sent, new Date ());
+ } else if (req.type == 2) {
+ req.callback (new PacketTooBigError (source), req.target,
+ req.sent, new Date ());
+ } else if (req.type == 3) {
+ req.callback (new TimeExceededError (source), req.target,
+ req.sent, new Date ());
+ } else if (req.type == 4) {
+ req.callback (new ParameterProblemError (source), req.target,
+ req.sent, new Date ());
+ } else if (req.type == 129) {
+ req.callback (null, req.target,
+ req.sent, new Date ());
+ } else {
+ req.callback (new Error ("Unknown response type '" + req.type
+ + "' (source=" + source + ")"), req.target,
+ req.sent, new Date ());
+ }
+ } else {
+ if (req.type == 0) {
+ req.callback (null, req.target,
+ req.sent, new Date ());
+ } else if (req.type == 3) {
+ req.callback (new DestinationUnreachableError (source), req.target,
+ req.sent, new Date ());
+ } else if (req.type == 4) {
+ req.callback (new SourceQuenchError (source), req.target,
+ req.sent, new Date ());
+ } else if (req.type == 5) {
+ req.callback (new RedirectReceivedError (source), req.target,
+ req.sent, new Date ());
+ } else if (req.type == 11) {
+ req.callback (new TimeExceededError (source), req.target,
+ req.sent, new Date ());
+ } else {
+ req.callback (new Error ("Unknown response type '" + req.type
+ + "' (source=" + source + ")"), req.target,
+ req.sent, new Date ());
+ }
+ }
+ }
+};
+
+Session.prototype.onSocketSend = function (req, error, bytes) {
+ if (! req.sent)
+ req.sent = new Date ();
+ if (error) {
+ this.reqRemove (req.id);
+ req.callback (error, req.target, req.sent, req.sent);
+ } else {
+ var me = this;
+ req.timer = setTimeout (this.onTimeout.bind (me, req), req.timeout);
+ }
+};
+
+Session.prototype.onTimeout = function (req) {
+ if (req.retries > 0) {
+ req.retries--;
+ this.send (req);
+ } else {
+ this.reqRemove (req.id);
+ req.callback (new RequestTimedOutError ("Request timed out"),
+ req.target, req.sent, new Date ());
+ }
+};
+
+// Keep searching for an ID which is not in use
+Session.prototype._generateId = function () {
+ var startId = this.nextId++;
+ while (1) {
+ if (this.nextId > 65535)
+ this.nextId = 1;
+ if (this.reqs[this.nextId]) {
+ this.nextId++;
+ } else {
+ return this.nextId;
+ }
+ // No free request IDs
+ if (this.nextId == startId)
+ return;
+ }
+}
+
+Session.prototype.pingHost = function (target, callback) {
+ var id = this._generateId ();
+ if (! id) {
+ callback (new Error ("Too many requests outstanding"), target);
+ return this;
+ }
+
+ var req = {
+ id: id,
+ retries: this.retries,
+ timeout: this.timeout,
+ callback: callback,
+ target: target
+ };
+
+ this.reqQueue (req);
+
+ return this;
+};
+
+Session.prototype.reqQueue = function (req) {
+ req.buffer = this.toBuffer (req);
+
+ if (this._debug)
+ this._debugRequest (req.target, req);
+
+ this.reqs[req.id] = req;
+ this.reqsPending++;
+ this.send (req);
+
+ return this;
+}
+
+Session.prototype.reqRemove = function (id) {
+ var req = this.reqs[id];
+ if (req) {
+ clearTimeout (req.timer);
+ delete req.timer;
+ delete this.reqs[req.id];
+ this.reqsPending--;
+ }
+ // If we have no more outstanding requests pause readable events
+ if (this.reqsPending <= 0)
+ if (! this.getSocket ().recvPaused)
+ this.getSocket ().pauseRecv ();
+ return req;
+};
+
+Session.prototype.send = function (req) {
+ var buffer = req.buffer;
+ var me = this;
+ // Resume readable events if the raw socket is paused
+ if (this.getSocket ().recvPaused)
+ this.getSocket ().resumeRecv ();
+ this.getSocket ().send (buffer, 0, buffer.length, req.target,
+ this.onBeforeSocketSend.bind (me, req),
+ this.onSocketSend.bind (me, req));
+};
+
+Session.prototype.setTTL = function (ttl) {
+ if (this.ttl && this.ttl == ttl)
+ return;
+
+ var level = this.addressFamily == raw.AddressFamily.IPv6
+ ? raw.SocketLevel.IPPROTO_IPV6
+ : raw.SocketLevel.IPPROTO_IP;
+ this.getSocket ().setOption (level, raw.SocketOption.IP_TTL, ttl);
+ this.ttl = ttl;
+}
+
+Session.prototype.toBuffer = function (req) {
+ var buffer = new Buffer (this.packetSize);
+
+ // Since our buffer represents real memory we should initialise it to
+ // prevent its previous contents from leaking to the network.
+ for (var i = 8; i < this.packetSize; i++)
+ buffer[i] = 0;
+
+ var type = this.addressFamily == raw.AddressFamily.IPv6 ? 128 : 8;
+
+ buffer.writeUInt8 (type, 0);
+ buffer.writeUInt8 (0, 1);
+ buffer.writeUInt16BE (0, 2);
+ buffer.writeUInt16BE (this.sessionId, 4);
+ buffer.writeUInt16BE (req.id, 6);
+
+ raw.writeChecksum (buffer, 2, raw.createChecksum (buffer));
+
+ return buffer;
+};
+
+Session.prototype.traceRouteCallback = function (trace, req, error, target,
+ sent, rcvd) {
+ if (trace.feedCallback (error, target, req.ttl, sent, rcvd)) {
+ trace.doneCallback (new Error ("Trace forcibly stopped"), target);
+ return;
+ }
+
+ if (error) {
+ if (req.ttl >= trace.ttl) {
+ trace.doneCallback (error, target);
+ return;
+ }
+
+ if ((error instanceof RequestTimedOutError) && ++trace.timeouts >= 3) {
+ trace.doneCallback (new Error ("Too many timeouts"), target);
+ return;
+ }
+
+ var id = this._generateId ();
+ if (! id) {
+ trace.doneCallback (new Error ("Too many requests outstanding"),
+ target);
+ return;
+ }
+
+ req.ttl++;
+ req.id = id;
+ var me = this;
+ req.retries = this.retries;
+ req.sent = null;
+ this.reqQueue (req);
+ } else {
+ trace.doneCallback (null, target);
+ }
+}
+
+Session.prototype.traceRoute = function (target, ttl, feedCallback,
+ doneCallback) {
+ if (! doneCallback) {
+ doneCallback = feedCallback;
+ feedCallback = ttl;
+ ttl = this.ttl;
+ }
+
+ var id = this._generateId ();
+ if (! id) {
+ var sent = new Date ();
+ callback (new Error ("Too many requests outstanding"), target,
+ sent, sent);
+ return this;
+ }
+
+ var trace = {
+ feedCallback: feedCallback,
+ doneCallback: doneCallback,
+ ttl: ttl,
+ timeouts: 0
+ };
+
+ var me = this;
+
+ var req = {
+ id: id,
+ retries: this.retries,
+ timeout: this.timeout,
+ ttl: 1,
+ target: target
+ };
+ req.callback = me.traceRouteCallback.bind (me, trace, req);
+
+ this.reqQueue (req);
+
+ return this;
+};
+
+exports.createSession = function (options) {
+ return new Session (options || {});
+};
+
+exports.NetworkProtocol = NetworkProtocol;
+
+exports.Session = Session;
+
+exports.DestinationUnreachableError = DestinationUnreachableError;
+exports.PacketTooBigError = PacketTooBigError;
+exports.ParameterProblemError = ParameterProblemError;
+exports.RedirectReceivedError = RedirectReceivedError;
+exports.RequestTimedOutError = RequestTimedOutError;
+exports.SourceQuenchError = SourceQuenchError;
+exports.TimeExceededError = TimeExceededError;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/.npmignore b/blackberry10/node_modules/net-ping/node_modules/raw-socket/.npmignore
new file mode 100644
index 0000000..4331a44
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/.npmignore
@@ -0,0 +1,5 @@
+TODO
+build
+.hgignore
+.hgtags
+node_modules
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/README.md b/blackberry10/node_modules/net-ping/node_modules/raw-socket/README.md
new file mode 100644
index 0000000..c9ec276
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/README.md
@@ -0,0 +1,651 @@
+
+# raw-socket - [homepage][homepage]
+
+This module implements raw sockets for [Node.js][nodejs].
+
+*This module has been created primarily to facilitate implementation of the
+[net-ping][net-ping] module.*
+
+This module is installed using [node package manager (npm)][npm]:
+
+ # This module contains C++ source code which will be compiled
+ # during installation using node-gyp. A suitable build chain
+ # must be configured before installation.
+
+ npm install raw-socket
+
+It is loaded using the `require()` function:
+
+ var raw = require ("raw-socket");
+
+Raw sockets can then be created, and data sent using [Node.js][nodejs]
+`Buffer` objects:
+
+ var socket = raw.createSocket ({protocol: raw.Protocol.None});
+
+ socket.on ("message", function (buffer, source) {
+ console.log ("received " + buffer.length + " bytes from " + source);
+ });
+
+ socket.send (buffer, 0, buffer.length, "1.1.1.1", function (error, bytes) {
+ if (error)
+ console.log (error.toString ());
+ });
+
+[homepage]: http://re-tool.org "Homepage"
+[nodejs]: http://nodejs.org "Node.js"
+[net-ping]: https://npmjs.org/package/net-ping "net-ping"
+[npm]: https://npmjs.org/ "npm"
+
+# Network Protocol Support
+
+The raw sockets exposed by this module support IPv4 and IPv6.
+
+Raw sockets are created using the operating systems `socket()` function, and
+the socket type `SOCK_RAW` specified.
+
+# Raw Socket Behaviour
+
+Raw sockets behave in different ways depending on operating system and
+version, and may support different socket options.
+
+Some operating system versions may restrict the use of raw sockets to
+privileged users. If this is the case an exception will be thrown on socket
+creation using a message similar to `Operation not permitted` (this message
+is likely to be different depending on operating system version).
+
+The appropriate operating system documentation should be consulted to
+understand how raw sockets will behave before attempting to use this module.
+
+# Keeping The [Node.js][nodejs] Event Loop Alive
+
+This module uses the `libuv` library to integrate into the [Node.js][nodejs]
+event loop - this library is also used by [Node.js][nodejs]. An underlying
+ `libuv` library `poll_handle_t` event watcher is used to monitor the
+underlying operating system raw socket used by a socket object.
+
+All the while a socket object exists, and the sockets `close()` method has not
+been called, the raw socket will keep the [Node.js][nodejs] event loop alive
+which will prevent a program from exiting.
+
+This module exports four methods which a program can use to control this
+behaviour.
+
+The `pauseRecv()` and `pauseSend()` methods stop the underlying `poll_handle_t`
+event watcher used by a socket from monitoring for readable and writeable
+events. While the `resumeRecv()` and `resumeSend()` methods start the
+underlying `poll_handle_t` event watcher used by a socket allowing it to
+monitor for readable and writeable events.
+
+Each socket object also exports the `recvPaused` and `sendPaused` boolean
+attributes to determine the state of the underlying `poll_handle_t` event
+watcher used by a socket.
+
+Socket creation can be expensive on some platforms, and the above methods offer
+an alternative to closing and deleting a socket to prevent it from keeping the
+[Node.js][nodejs] event loop alive.
+
+The [Node.js][nodejs] [net-ping][net-ping] module offers a concrete example
+of using these methods. Since [Node.js][nodejs] offers no raw socket support
+this module is used to implement ICMP echo (ping) support. Once all ping
+requests have been processed by the [net-ping][net-ping] module the
+`pauseRecv()` and `pauseSend()` methods are used to allow a program to exit if
+required.
+
+The following example stops the underlying `poll_handle_t` event watcher used
+by a socket from generating writeable events, however since readable events
+will still be watched for the program will not exit immediately:
+
+ if (! socket.recvPaused)
+ socket.pauseRecv ();
+
+The following can the be used to resume readable events:
+
+ if (socket.recvPaused)
+ socket.resumeRecv ();
+
+The following example stops the underlying `poll_handle_t` event watcher used
+by a socket from generating both readable and writeable events, if no other
+event watchers have been setup (e.g. `setTimeout()`) the program will exit.
+
+ if (! socket.recvPaused)
+ socket.pauseRecv ();
+ if (! socket.sendPaused)
+ socket.pauseSend ();
+
+The following can the be used to resume both readable and writeable events:
+
+ if (socket.recvPaused)
+ socket.resumeRecv ();
+ if (socket.sendPaused)
+ socket.resumeSend ();
+
+When data is sent using a sockets `send()` method the `resumeSend()` method
+will be called if the sockets `sendPaused` attribute is `true`, however the
+`resumeRecv()` method will not be called regardless of whether the sockets
+`recvPaused` attribute is `true` or `false`.
+
+[nodejs]: http://nodejs.org "Node.js"
+[net-ping]: http://npmjs.org/package/net-ping "net-ping"
+
+# Constants
+
+The following sections describe constants exported and used by this module.
+
+## raw.AddressFamily
+
+This object contains constants which can be used for the `addressFamily`
+option to the `createSocket()` function exposed by this module. This option
+specifies the IP protocol version to use when creating the raw socket.
+
+The following constants are defined in this object:
+
+ * `IPv4` - IPv4 protocol
+ * `IPv6` - IPv6 protocol
+
+## raw.Protocol
+
+This object contains constants which can be used for the `protocol` option to
+the `createSocket()` function exposed by this module. This option specifies
+the protocol number to place in the protocol field of IP headers generated by
+the operating system.
+
+The following constants are defined in this object:
+
+ * `None` - protocol number 0
+ * `ICMP` - protocol number 1
+ * `TCP` - protocol number 6
+ * `UDP` - protocol number 17
+ * `ICMPv6` - protocol number 58
+
+## raw.SocketLevel
+
+This object contains constants which can be used for the `level` parameter to
+the `getOption()` and `setOption()` methods exposed by this module.
+
+The following constants are defined in this object:
+
+ * `SOL_SOCKET`
+ * `IPPROTO_IP`
+ * `IPPROTO_IPV6`
+
+## raw.SocketOption
+
+This object contains constants which can be used for the `option` parameter to
+the `getOption()` and `setOption()` methods exposed by this module.
+
+The following constants are defined in this object:
+
+ * `SO_RCVBUF`
+ * `SO_RCVTIMEO`
+ * `SO_SNDBUF`
+ * `SO_SNDTIMEO`
+ * `IP_HDRINCL`
+ * `IP_OPTIONS`
+ * `IP_TOS`
+ * `IP_TTL`
+ * `IPV6_TTL`
+ * `IPV6_UNICAST_HOPS`
+ * `IPV6_V6ONLY`
+
+*The `IPV6_TTL` socket option is not known to be defined by any operating
+system, it is provided in convenience to be synonymous with IPv4*
+
+For Windows platforms the following constant is also defined:
+
+ * `IPV6_HDRINCL`
+
+# Using This Module
+
+Raw sockets are represented by an instance of the `Socket` class. This
+module exports the `createSocket()` function which is used to create
+instances of the `Socket` class.
+
+The module also exports a number of stubs which call through to a number of
+functions provided by the operating system, i.e. `htonl()`.
+
+This module also exports a function to generate protocol checksums.
+
+## raw.createChecksum (bufferOrObject, [bufferOrObject, ...])
+
+The `createChecksum()` function creates and returns a 16 bit one's complement
+of the one's complement sum for all the data specified in one or more
+[Node.js][nodejs] `Buffer` objects. This is useful for creating checksums for
+protocols such as IP, TCP, UDP and ICMP.
+
+The `bufferOrObject` parameter can be one of two types. The first is a
+[Node.js][nodejs] `Buffer` object. In this case a checksum is calculated from
+all the data it contains. The `bufferOrObject` parameter can also be an
+object which must contain the following attributes:
+
+ * `buffer` - A [Node.js][nodejs] `Buffer` object which contains data which
+ to generate a checksum for
+ * `offset` - Skip this number of bytes from the beginning of `buffer`
+ * `length` - Only generate a checksum for this number of bytes in `buffer`
+ from `offset`
+
+The second parameter type provides control over how much of the data in a
+[Node.js][nodejs] `Buffer` object a checksum should be generated for.
+
+When more than one parameter is passed a single checksum is calculated as if
+the data in in all parameters were in a single buffer. This is useful for
+when calulating checksums for TCP and UDP for example - where a psuedo header
+must be created and used for checksum calculation.
+
+In this case two buffers can be passed, the first containing the psuedo header
+and the second containing the real TCP packet, and the offset and length
+parameters used to specify the bounds of the TCP packet payload.
+
+The following example generates a checksum for a TCP packet and its psuedo
+header:
+
+ var sum = raw.createChecksum (pseudo_header, {buffer: tcp_packet,
+ offset: 20, length: tcp_packet.length - 20});
+
+Both buffers will be treated as one, i.e. as if the data at offset `20` in
+`tcp_packet` had followed all data in `pseudo_header` - as if they were one
+buffer.
+
+## raw.writeChecksum (buffer, offset, checksum)
+
+The `writeChecksum()` function writes a checksum created by the
+`raw.createChecksum()` function to the [Node.js][nodejs] `Buffer` object
+`buffer` at offsets `offset` and `offset` + 1.
+
+The following example generates and writes a checksum at offset `2` in a
+[Node.js][nodejs] `Buffer` object:
+
+ raw.writeChecksum (buffer, 2, raw.createChecksum (buffer));
+
+## raw.htonl (uint32)
+
+The `htonl()` function converts a 32 bit unsigned integer from host byte
+order to network byte order and returns the result. This function is simply
+a stub through to the operating systems `htonl()` function.
+
+## raw.htons (uint16)
+
+The `htons()` function converts a 16 bit unsigned integer from host byte
+order to network byte order and returns the result. This function is simply
+a stub through to the operating systems `htons()` function.
+
+## raw.ntohl (uint32)
+
+The `ntohl()` function converts a 32 bit unsigned integer from network byte
+order to host byte order and returns the result. This function is simply
+a stub through to the operating systems `ntohl()` function.
+
+## raw.ntohs (uint16)
+
+The `ntohs()` function converts a 16 bit unsigned integer from network byte
+order to host byte order and returns the result. This function is simply
+a stub through to the operating systems `ntohs()` function.
+
+## raw.createSocket ([options])
+
+The `createSocket()` function instantiates and returns an instance of the
+`Socket` class:
+
+ // Default options
+ var options = {
+ addressFamily: raw.AddressFamily.IPv4,
+ protocol: raw.Protocol.None,
+ bufferSize: 4096,
+ generateChecksums: false,
+ checksumOffset: 0
+ };
+
+ var socket = raw.createSocket (options);
+
+The optional `options` parameter is an object, and can contain the following
+items:
+
+ * `addressFamily` - Either the constant `raw.AddressFamily.IPv4` or the
+ constant `raw.AddressFamily.IPv6`, defaults to the constant
+ `raw.AddressFamily.IPv4`
+ * `protocol` - Either one of the constants defined in the `raw.Protocol`
+ object or the protocol number to use for the socket, defaults to the
+ consant `raw.Protocol.None`
+ * `bufferSize` - Size, in bytes, of the sockets internal receive buffer,
+ defaults to 4096
+ * `generateChecksums` - Either `true` or `false` to enable or disable the
+ automatic checksum generation feature, defaults to `false`
+ * `checksumOffset` - When `generateChecksums` is `true` specifies how many
+ bytes to index into the send buffer to write automatically generated
+ checksums, defaults to `0`
+
+An exception will be thrown if the underlying raw socket could not be created.
+The error will be an instance of the `Error` class.
+
+The `protocol` parameter, or its default value of the constant
+`raw.Protocol.None`, will be specified in the protocol field of each IP
+header.
+
+## socket.on ("close", callback)
+
+The `close` event is emitted by the socket when the underlying raw socket
+is closed.
+
+No arguments are passed to the callback.
+
+The following example prints a message to the console when the socket is
+closed:
+
+ socket.on ("close", function () {
+ console.log ("socket closed");
+ });
+
+## socket.on ("error", callback)
+
+The `error` event is emitted by the socket when an error occurs sending or
+receiving data.
+
+The following arguments will be passed to the `callback` function:
+
+ * `error` - An instance of the `Error` class, the exposed `message` attribute
+ will contain a detailed error message.
+
+The following example prints a message to the console when an error occurs,
+after which the socket is closed:
+
+ socket.on ("error", function (error) {
+ console.log (error.toString ());
+ socket.close ();
+ });
+
+## socket.on ("message", callback)
+
+The `message` event is emitted by the socket when data has been received.
+
+The following arguments will be passed to the `callback` function:
+
+ * `buffer` - A [Node.js][nodejs] `Buffer` object containing the data
+ received, the buffer will be sized to fit the data received, that is the
+ `length` attribute of buffer will specify how many bytes were received
+ * `address` - For IPv4 raw sockets the dotted quad formatted source IP
+ address of the message, e.g `192.168.1.254`, for IPv6 raw sockets the
+ compressed formatted source IP address of the message, e.g.
+ `fe80::a00:27ff:fe2a:3427`
+
+The following example prints received messages in hexadecimal to the console:
+
+ socket.on ("message", function (buffer, address) {
+ console.log ("received " + buffer.length + " bytes from " + address
+ + ": " + buffer.toString ("hex"));
+ });
+
+## socket.generateChecksums (generate, offset)
+
+The `generateChecksums()` method is used to specify whether automatic checksum
+generation should be performed by the socket.
+
+The `generate` parameter is either `true` or `false` to enable or disable the
+feature. The optional `offset` parameter specifies how many bytes to index
+into the send buffer when writing the generated checksum to the send buffer.
+
+The following example enables automatic checksum generation at offset 2
+resulting in checksums being written to byte 3 and 4 of the send buffer
+(offsets start from 0, meaning byte 1):
+
+ socket.generateChecksums (true, 2);
+
+## socket.getOption (level, option, buffer, length)
+
+The `getOption()` method gets a socket option using the operating systems
+`getsockopt()` function.
+
+The `level` parameter is one of the constants defined in the `raw.SocketLevel`
+object. The `option` parameter is one of the constants defined in the
+`raw.SocketOption` object. The `buffer` parameter is a [Node.js][nodejs]
+`Buffer` object where the socket option value will be written. The `length`
+parameter specifies the size of the `buffer` parameter.
+
+If an error occurs an exception will be thrown, the exception will be an
+instance of the `Error` class.
+
+The number of bytes written into the `buffer` parameter is returned, and can
+differ from the amount of space available.
+
+The following example retrieves the current value of `IP_TTL` socket option:
+
+ var level = raw.SocketLevel.IPPROTO_IP;
+ var option = raw.SocketOption.IP_TTL;
+
+ # IP_TTL is a signed integer on some platforms so a 4 byte buffer is used
+ var buffer = new Buffer (4);
+
+ var written = socket.getOption (level, option, buffer, buffer.length);
+
+ console.log (buffer.toString ("hex"), 0, written);
+
+## socket.send (buffer, offset, length, address, beforeCallback, afterCallback)
+
+The `send()` method sends data to a remote host.
+
+The `buffer` parameter is a [Node.js][nodejs] `Buffer` object containing the
+data to be sent. The `length` parameter specifies how many bytes from
+`buffer`, beginning at offset `offset`, to send. For IPv4 raw sockets the
+`address` parameter contains the dotted quad formatted IP address of the
+remote host to send the data to, e.g `192.168.1.254`, for IPv6 raw sockets the
+`address` parameter contains the compressed formatted IP address of the remote
+host to send the data to, e.g. `fe80::a00:27ff:fe2a:3427`. If provided the
+optional `beforeCallback` function is called right before the data is actually
+sent using the underlying raw socket, giving users the opportunity to perform
+pre-send actions such as setting a socket option, e.g. the IP header TTL. No
+arguments are passed to the `beforeCallback` function. The `afterCallback`
+function is called once the data has been sent. The following arguments will
+be passed to the `afterCallback` function:
+
+ * `error` - Instance of the `Error` class, or `null` if no error occurred
+ * `bytes` - Number of bytes sent
+
+The following example sends a ICMP ping message to a remote host, before the
+request is actually sent the IP header TTL is modified, and modified again
+after the data has been sent:
+
+ // ICMP echo (ping) request, checksum should be ok
+ var buffer = new Buffer ([
+ 0x08, 0x00, 0x43, 0x52, 0x00, 0x01, 0x0a, 0x09,
+ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
+ 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
+ 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x61,
+ 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69]);
+
+ var socketLevel = raw.SocketLevel.IPPROTO_IP
+ var socketOption = raw.SocketOption.IP_TTL;
+
+ function beforeSend () {
+ socket.setOption (socketLevel, socketOption, 1);
+ }
+
+ function afterSend (error, bytes) {
+ if (error)
+ console.log (error.toString ());
+ else
+ console.log ("sent " + bytes + " bytes");
+
+ socket.setOption (socketLevel, socketOption, 1);
+ }
+
+ socket.send (buffer, 0, buffer.length, target, beforeSend, afterSend);
+
+## socket.setOption (level, option, buffer, length)
+
+The `setOption()` method sets a socket option using the operating systems
+`setsockopt()` function.
+
+The `level` parameter is one of the constants defined in the `raw.SocketLevel`
+object. The `option` parameter is one of the constants defined in the
+`raw.SocketOption` object. The `buffer` parameter is a [Node.js][nodejs]
+`Buffer` object where the socket option value is specified. The `length`
+parameter specifies how much space the option value occupies in the `buffer`
+parameter.
+
+If an error occurs an exception will be thrown, the exception will be an
+instance of the `Error` class.
+
+The following example sets the value of `IP_TTL` socket option to `1`:
+
+ var level = raw.SocketLevel.IPPROTO_IP;
+ var option = raw.SocketOption.IP_TTL;
+
+ # IP_TTL is a signed integer on some platforms so a 4 byte buffer is used,
+ # x86 computers use little-endian format so specify bytes reverse order
+ var buffer = new Buffer ([0x01, 0x00, 0x00, 0x00]);
+
+ socket.setOption (level, option, buffer, buffer.length);
+
+To avoid dealing with endianess the `setOption()` method supports a three
+argument form which can be used for socket options requiring a 32bit unsigned
+integer value (for example the `IP_TTL` socket option used in the previous
+example). Its signature is as follows:
+
+ socket.setOption (level, option, value)
+
+The previous example can be re-written to use this form:
+
+ var level = raw.SocketLevel.IPPROTO_IP;
+ var option = raw.SocketOption.IP_TTL;
+
+ socket.setOption (level, option, 1);
+
+# Example Programs
+
+Example programs are included under the modules `example` directory.
+
+# Bugs & Known Issues
+
+None, yet!
+
+Bug reports should be sent to <st...@gmail.com>.
+
+# Changes
+
+## Version 1.0.0 - 29/01/2013
+
+ * Initial release
+
+## Version 1.0.1 - 01/02/2013
+
+ * Move `SOCKET_ERRNO` define from `raw.cc` to `raw.h`
+ * Error in exception thrown by `SocketWrap::New` in `raw.cc` stated that two
+ arguments were required, this should be one
+ * Corrections to the README.md
+ * Missing includes causes compilation error on some systems (maybe Node
+ version dependant)
+
+## Version 1.0.2 - 02/02/2013
+
+ * Support automatic checksum generation
+
+## Version 1.1.0 - 13/02/2013
+
+ * The [net-ping][net-ping] module is now implemented so update the note about
+ it in the first section of the README.md
+ * Support IPv6
+ * Support the `IP_HDRINCL` socket option via the `noIpHeader` option to the
+ `createSocket()` function and the `noIpHeader()` method exposed by the
+ `Socket` class
+
+## Version 1.1.1 - 14/02/2013
+
+ * IP addresses not being validated
+
+## Version 1.1.2 - 15/02/2013
+
+ * Default protocol option to `createSession()` was incorrect in the README.md
+ * The `session.on("message")` example used `message` instead of `buffer` in
+ the README.md
+
+## Version 1.1.3 - 04/03/2013
+
+ * `raw.Socket.onSendReady()` emit's an error when `raw.SocketWrap.send()`
+ throws an exception when it should call the `req.callback` callback
+ * Added the `pauseRecv()`, `resumeRecv()`, `pauseSend()` and `resumeSend()`
+ methods
+
+[net-ping]: https://npmjs.org/package/net-ping "net-ping"
+
+## Version 1.1.4 - 05/03/2013
+
+ * Cleanup documentation for the `pauseSend()`, `pauseRecv()`, `resumeSend()`
+ and `resumeRecv()` methods in the README.md
+
+## Version 1.1.5 - 09/05/2013
+
+ * Reformated lines in the README.md file inline with the rest of the file
+ * Removed the `noIpHeader()` method (the `setOption()` method should be
+ used to configure the `IP_HDRINCL` socket option - and possibly
+ `IPV6_HDRINCL` on Windows platforms), and removed the `Automatic IP Header
+ Generation` section from the README.md file
+ * Added the `setOption()` and `getOption()` methods, and added the
+ `SocketLevel` and `SocketOption` constants
+ * Tidied up the example program `ping-no-ip-header.js` (now uses the
+ `setOption()` method to configure the `IP_HDRINCL` socket option)
+ * Tidied up the example program `ping6-no-ip-header.js` (now uses the
+ `setOption()` method to configure the `IPV6_HDRINCL` socket option)
+ * Added the example program `get-option.js`
+ * Added the example program `ping-set-option-ip-ttl.js`
+ * Use MIT license instead of GPL
+
+## Version 1.1.6 - 18/05/2013
+
+ * Added the `beforeCallback` parameter to the `send()` method, and renamed the
+ `callback` parameter to `afterCallback`
+ * Fixed a few typos in the README.md file
+ * Modified the example program `ping-set-option-ip-ttl.js` to use the
+ `beforeCallback` parameter to the `send()` method
+ * The example program `ping6-no-ip-header.js` was not passing the correct
+ arguments to the `setOption()` method
+
+## Version 1.1.7 - 23/06/2013
+
+ * Added the `htonl()`, `htons()`, `ntohl()`, and `ntohs()` functions, and
+ associated example programs
+ * Added the `createChecksum()` function, and associated example program
+
+## Version 1.1.8 - 01/07/2013
+
+ * Added the `writeChecksum()` function
+ * Removed the "Automated Checksum Generation" feature - this has been
+ replaced with the `createChecksum()` and `writeChecksum()` functions
+
+## Version 1.2.0 - 02/07/2013
+
+ * Up version number to 1.2.0 (we should have done this for 1.1.8 because it
+ introduced some API breaking changes)
+
+# Roadmap
+
+In no particular order:
+
+ * Enhance performance by moving the send queue into the C++ raw::SocketWrap
+ class
+
+Suggestions and requirements should be sent to <st...@gmail.com>.
+
+# License
+
+Copyright (c) 2013 Stephen Vickers
+
+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.
+
+# Author
+
+Stephen Vickers <st...@gmail.com>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/binding.gyp
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/binding.gyp b/blackberry10/node_modules/net-ping/node_modules/raw-socket/binding.gyp
new file mode 100644
index 0000000..53b5e06
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/binding.gyp
@@ -0,0 +1,15 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'raw',
+ 'sources': [
+ 'src/raw.cc'
+ ],
+ 'conditions' : [
+ ['OS=="win"', {
+ 'libraries' : ['ws2_32.lib']
+ }]
+ ]
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/index.js b/blackberry10/node_modules/net-ping/node_modules/raw-socket/index.js
new file mode 100644
index 0000000..211523e
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/index.js
@@ -0,0 +1,216 @@
+
+var events = require ("events");
+var net = require ("net");
+var raw = require ("./build/Release/raw");
+var util = require ("util");
+
+function _expandConstantObject (object) {
+ var keys = [];
+ for (key in object)
+ keys.push (key);
+ for (var i = 0; i < keys.length; i++)
+ object[object[keys[i]]] = parseInt (keys[i]);
+}
+
+var AddressFamily = {
+ 1: "IPv4",
+ 2: "IPv6"
+};
+
+_expandConstantObject (AddressFamily);
+
+var Protocol = {
+ 0: "None",
+ 1: "ICMP",
+ 6: "TCP",
+ 17: "UDP",
+ 58: "ICMPv6"
+};
+
+_expandConstantObject (Protocol);
+
+for (var key in events.EventEmitter.prototype) {
+ raw.SocketWrap.prototype[key] = events.EventEmitter.prototype[key];
+}
+
+function Socket (options) {
+ Socket.super_.call (this);
+
+ this.requests = [];
+ this.buffer = new Buffer ((options && options.bufferSize)
+ ? options.bufferSize
+ : 4096);
+
+ this.recvPaused = false;
+ this.sendPaused = true;
+
+ this.wrap = new raw.SocketWrap (
+ ((options && options.protocol)
+ ? options.protocol
+ : 0),
+ ((options && options.addressFamily)
+ ? options.addressFamily
+ : AddressFamily.IPv4)
+ );
+
+ var me = this;
+ this.wrap.on ("sendReady", this.onSendReady.bind (me));
+ this.wrap.on ("recvReady", this.onRecvReady.bind (me));
+ this.wrap.on ("error", this.onError.bind (me));
+ this.wrap.on ("close", this.onClose.bind (me));
+};
+
+util.inherits (Socket, events.EventEmitter);
+
+Socket.prototype.close = function () {
+ this.wrap.close ();
+ return this;
+}
+
+Socket.prototype.getOption = function (level, option, value, length) {
+ return this.wrap.getOption (level, option, value, length);
+}
+
+Socket.prototype.onClose = function () {
+ this.emit ("close");
+}
+
+Socket.prototype.onError = function (error) {
+ this.emit ("error", error);
+ this.close ();
+}
+
+Socket.prototype.onRecvReady = function () {
+ var me = this;
+ try {
+ this.wrap.recv (this.buffer, function (buffer, bytes, source) {
+ var newBuffer = buffer.slice (0, bytes);
+ me.emit ("message", newBuffer, source);
+ });
+ } catch (error) {
+ me.emit ("error", error);
+ }
+}
+
+Socket.prototype.onSendReady = function () {
+ if (this.requests.length > 0) {
+ var me = this;
+ var req = this.requests.shift ();
+ try {
+ if (req.beforeCallback)
+ req.beforeCallback ();
+ this.wrap.send (req.buffer, req.offset, req.length,
+ req.address, function (bytes) {
+ req.afterCallback.call (me, null, bytes);
+ });
+ } catch (error) {
+ req.afterCallback.call (me, error, 0);
+ }
+ } else {
+ if (! this.sendPaused)
+ this.pauseSend ();
+ }
+}
+
+Socket.prototype.pauseRecv = function () {
+ this.recvPaused = true;
+ this.wrap.pause (this.recvPaused, this.sendPaused);
+ return this;
+}
+
+Socket.prototype.pauseSend = function () {
+ this.sendPaused = true;
+ this.wrap.pause (this.recvPaused, this.sendPaused);
+ return this;
+}
+
+Socket.prototype.resumeRecv = function () {
+ this.recvPaused = false;
+ this.wrap.pause (this.recvPaused, this.sendPaused);
+ return this;
+}
+
+Socket.prototype.resumeSend = function () {
+ this.sendPaused = false;
+ this.wrap.pause (this.recvPaused, this.sendPaused);
+ return this;
+}
+
+Socket.prototype.send = function (buffer, offset, length, address,
+ beforeCallback, afterCallback) {
+ if (! afterCallback) {
+ afterCallback = beforeCallback;
+ beforeCallback = null;
+ }
+
+ if (length + offset > buffer.length) {
+ afterCallback.call (this, new Error ("Buffer length '" + buffer.length
+ + "' is not large enough for the specified offset '" + offset
+ + "' plus length '" + length + "'"));
+ return this;
+ }
+
+ if (! net.isIP (address)) {
+ afterCallback.call (this, new Error ("Invalid IP address '" + address + "'"));
+ return this;
+ }
+
+ var req = {
+ buffer: buffer,
+ offset: offset,
+ length: length,
+ address: address,
+ afterCallback: afterCallback,
+ beforeCallback: beforeCallback
+ };
+ this.requests.push (req);
+
+ if (this.sendPaused)
+ this.resumeSend ();
+
+ return this;
+}
+
+Socket.prototype.setOption = function (level, option, value, length) {
+ if (arguments.length > 3)
+ this.wrap.setOption (level, option, value, length);
+ else
+ this.wrap.setOption (level, option, value);
+}
+
+exports.createChecksum = function () {
+ var sum = 0;
+ for (var i = 0; i < arguments.length; i++) {
+ var object = arguments[i];
+ if (object instanceof Buffer) {
+ sum = raw.createChecksum (sum, object, 0, object.length);
+ } else {
+ sum = raw.createChecksum (sum, object.buffer, object.offset,
+ object.length);
+ }
+ }
+ return sum;
+}
+
+exports.writeChecksum = function (buffer, offset, checksum) {
+ buffer.writeUInt8 ((checksum & 0xff00) >> 8, offset);
+ buffer.writeUInt8 (checksum & 0xff, offset + 1);
+ return buffer;
+}
+
+exports.createSocket = function (options) {
+ return new Socket (options || {});
+};
+
+exports.AddressFamily = AddressFamily;
+exports.Protocol = Protocol;
+
+exports.Socket = Socket;
+
+exports.SocketLevel = raw.SocketLevel;
+exports.SocketOption = raw.SocketOption;
+
+exports.htonl = raw.htonl;
+exports.htons = raw.htons;
+exports.ntohl = raw.ntohl;
+exports.ntohs = raw.ntohs;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/package.json b/blackberry10/node_modules/net-ping/node_modules/raw-socket/package.json
new file mode 100644
index 0000000..2e9c16c
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/package.json
@@ -0,0 +1,52 @@
+{
+ "name": "raw-socket",
+ "version": "1.2.0",
+ "description": "Raw sockets for Node.js.",
+ "main": "index.js",
+ "directories": {
+ "example": "example"
+ },
+ "dependencies": {},
+ "contributors": [
+ {
+ "name": "Stephen Vickers",
+ "email": "stephen.vickers.sv@gmail.com"
+ }
+ ],
+ "repository": {
+ "type": "mercurial",
+ "url": "https://bitbucket.org/stephenwvickers/node-raw-socket"
+ },
+ "keywords": [
+ "checksum",
+ "checksums",
+ "htonl",
+ "htons",
+ "net",
+ "network",
+ "ntohl",
+ "ntohs",
+ "raw",
+ "raw-socket",
+ "raw-sockets",
+ "socket",
+ "sockets"
+ ],
+ "author": {
+ "name": "Stephen Vickers",
+ "email": "stephen.vickers.sv@gmail.com"
+ },
+ "license": "MIT",
+ "scripts": {
+ "install": "node-gyp rebuild"
+ },
+ "gypfile": true,
+ "readme": "\n# raw-socket - [homepage][homepage]\n\nThis module implements raw sockets for [Node.js][nodejs].\n\n*This module has been created primarily to facilitate implementation of the\n[net-ping][net-ping] module.*\n\nThis module is installed using [node package manager (npm)][npm]:\n\n # This module contains C++ source code which will be compiled\n # during installation using node-gyp. A suitable build chain\n # must be configured before installation.\n \n npm install raw-socket\n\nIt is loaded using the `require()` function:\n\n var raw = require (\"raw-socket\");\n\nRaw sockets can then be created, and data sent using [Node.js][nodejs]\n`Buffer` objects:\n\n var socket = raw.createSocket ({protocol: raw.Protocol.None});\n\n socket.on (\"message\", function (buffer, source) {\n console.log (\"received \" + buffer.length + \" bytes from \" + source);\n });\n \n socket.send (buffer, 0, buffer.length, \"1.1.1.1\", function (error, bytes
) {\n if (error)\n console.log (error.toString ());\n });\n\n[homepage]: http://re-tool.org \"Homepage\"\n[nodejs]: http://nodejs.org \"Node.js\"\n[net-ping]: https://npmjs.org/package/net-ping \"net-ping\"\n[npm]: https://npmjs.org/ \"npm\"\n\n# Network Protocol Support\n\nThe raw sockets exposed by this module support IPv4 and IPv6.\n\nRaw sockets are created using the operating systems `socket()` function, and\nthe socket type `SOCK_RAW` specified.\n\n# Raw Socket Behaviour\n\nRaw sockets behave in different ways depending on operating system and\nversion, and may support different socket options.\n\nSome operating system versions may restrict the use of raw sockets to\nprivileged users. If this is the case an exception will be thrown on socket\ncreation using a message similar to `Operation not permitted` (this message\nis likely to be different depending on operating system version).\n\nThe appropriate operating system documentation should be consulted to\
nunderstand how raw sockets will behave before attempting to use this module.\n\n# Keeping The [Node.js][nodejs] Event Loop Alive\n\nThis module uses the `libuv` library to integrate into the [Node.js][nodejs]\nevent loop - this library is also used by [Node.js][nodejs]. An underlying\n `libuv` library `poll_handle_t` event watcher is used to monitor the\nunderlying operating system raw socket used by a socket object.\n\nAll the while a socket object exists, and the sockets `close()` method has not\nbeen called, the raw socket will keep the [Node.js][nodejs] event loop alive\nwhich will prevent a program from exiting.\n\nThis module exports four methods which a program can use to control this\nbehaviour.\n\nThe `pauseRecv()` and `pauseSend()` methods stop the underlying `poll_handle_t`\nevent watcher used by a socket from monitoring for readable and writeable\nevents. While the `resumeRecv()` and `resumeSend()` methods start the\nunderlying `poll_handle_t` event watcher used by a
socket allowing it to\nmonitor for readable and writeable events.\n\nEach socket object also exports the `recvPaused` and `sendPaused` boolean\nattributes to determine the state of the underlying `poll_handle_t` event\nwatcher used by a socket.\n\nSocket creation can be expensive on some platforms, and the above methods offer\nan alternative to closing and deleting a socket to prevent it from keeping the\n[Node.js][nodejs] event loop alive.\n\nThe [Node.js][nodejs] [net-ping][net-ping] module offers a concrete example\nof using these methods. Since [Node.js][nodejs] offers no raw socket support\nthis module is used to implement ICMP echo (ping) support. Once all ping\nrequests have been processed by the [net-ping][net-ping] module the\n`pauseRecv()` and `pauseSend()` methods are used to allow a program to exit if\nrequired.\n\nThe following example stops the underlying `poll_handle_t` event watcher used\nby a socket from generating writeable events, however since readable events\n
will still be watched for the program will not exit immediately:\n\n if (! socket.recvPaused)\n socket.pauseRecv ();\n\nThe following can the be used to resume readable events:\n\n if (socket.recvPaused)\n socket.resumeRecv ();\n\nThe following example stops the underlying `poll_handle_t` event watcher used\nby a socket from generating both readable and writeable events, if no other\nevent watchers have been setup (e.g. `setTimeout()`) the program will exit.\n\n if (! socket.recvPaused)\n socket.pauseRecv ();\n if (! socket.sendPaused)\n socket.pauseSend ();\n\nThe following can the be used to resume both readable and writeable events:\n\n if (socket.recvPaused)\n socket.resumeRecv ();\n if (socket.sendPaused)\n socket.resumeSend ();\n\nWhen data is sent using a sockets `send()` method the `resumeSend()` method\nwill be called if the sockets `sendPaused` attribute is `true`, however the\n`resumeRecv()` method will not be ca
lled regardless of whether the sockets\n`recvPaused` attribute is `true` or `false`.\n\n[nodejs]: http://nodejs.org \"Node.js\"\n[net-ping]: http://npmjs.org/package/net-ping \"net-ping\"\n\n# Constants\n\nThe following sections describe constants exported and used by this module.\n\n## raw.AddressFamily\n\nThis object contains constants which can be used for the `addressFamily`\noption to the `createSocket()` function exposed by this module. This option\nspecifies the IP protocol version to use when creating the raw socket.\n\nThe following constants are defined in this object:\n\n * `IPv4` - IPv4 protocol\n * `IPv6` - IPv6 protocol\n\n## raw.Protocol\n\nThis object contains constants which can be used for the `protocol` option to\nthe `createSocket()` function exposed by this module. This option specifies\nthe protocol number to place in the protocol field of IP headers generated by\nthe operating system.\n\nThe following constants are defined in this object:\n\n * `None` - prot
ocol number 0\n * `ICMP` - protocol number 1\n * `TCP` - protocol number 6\n * `UDP` - protocol number 17\n * `ICMPv6` - protocol number 58\n\n## raw.SocketLevel\n\nThis object contains constants which can be used for the `level` parameter to\nthe `getOption()` and `setOption()` methods exposed by this module.\n\nThe following constants are defined in this object:\n\n * `SOL_SOCKET`\n * `IPPROTO_IP`\n * `IPPROTO_IPV6`\n\n## raw.SocketOption\n\nThis object contains constants which can be used for the `option` parameter to\nthe `getOption()` and `setOption()` methods exposed by this module.\n\nThe following constants are defined in this object:\n\n * `SO_RCVBUF`\n * `SO_RCVTIMEO`\n * `SO_SNDBUF`\n * `SO_SNDTIMEO`\n * `IP_HDRINCL`\n * `IP_OPTIONS`\n * `IP_TOS`\n * `IP_TTL`\n * `IPV6_TTL`\n * `IPV6_UNICAST_HOPS`\n * `IPV6_V6ONLY`\n\n*The `IPV6_TTL` socket option is not known to be defined by any operating\nsystem, it is provided in convenience to be synonymous with IPv4*\n\nFor Windows
platforms the following constant is also defined:\n\n * `IPV6_HDRINCL`\n\n# Using This Module\n\nRaw sockets are represented by an instance of the `Socket` class. This\nmodule exports the `createSocket()` function which is used to create\ninstances of the `Socket` class.\n\nThe module also exports a number of stubs which call through to a number of\nfunctions provided by the operating system, i.e. `htonl()`.\n\nThis module also exports a function to generate protocol checksums.\n\n## raw.createChecksum (bufferOrObject, [bufferOrObject, ...])\n\nThe `createChecksum()` function creates and returns a 16 bit one's complement\nof the one's complement sum for all the data specified in one or more\n[Node.js][nodejs] `Buffer` objects. This is useful for creating checksums for\nprotocols such as IP, TCP, UDP and ICMP.\n\nThe `bufferOrObject` parameter can be one of two types. The first is a\n[Node.js][nodejs] `Buffer` object. In this case a checksum is calculated from\nall the data it co
ntains. The `bufferOrObject` parameter can also be an\nobject which must contain the following attributes:\n\n * `buffer` - A [Node.js][nodejs] `Buffer` object which contains data which\n to generate a checksum for\n * `offset` - Skip this number of bytes from the beginning of `buffer`\n * `length` - Only generate a checksum for this number of bytes in `buffer`\n from `offset`\n\nThe second parameter type provides control over how much of the data in a\n[Node.js][nodejs] `Buffer` object a checksum should be generated for.\n\nWhen more than one parameter is passed a single checksum is calculated as if\nthe data in in all parameters were in a single buffer. This is useful for\nwhen calulating checksums for TCP and UDP for example - where a psuedo header\nmust be created and used for checksum calculation.\n\nIn this case two buffers can be passed, the first containing the psuedo header\nand the second containing the real TCP packet, and the offset and length\nparameters used to s
pecify the bounds of the TCP packet payload.\n\nThe following example generates a checksum for a TCP packet and its psuedo\nheader:\n\n var sum = raw.createChecksum (pseudo_header, {buffer: tcp_packet,\n offset: 20, length: tcp_packet.length - 20});\n\nBoth buffers will be treated as one, i.e. as if the data at offset `20` in\n`tcp_packet` had followed all data in `pseudo_header` - as if they were one\nbuffer.\n\n## raw.writeChecksum (buffer, offset, checksum)\n\nThe `writeChecksum()` function writes a checksum created by the\n`raw.createChecksum()` function to the [Node.js][nodejs] `Buffer` object \n`buffer` at offsets `offset` and `offset` + 1.\n\nThe following example generates and writes a checksum at offset `2` in a\n[Node.js][nodejs] `Buffer` object:\n\n raw.writeChecksum (buffer, 2, raw.createChecksum (buffer));\n\n## raw.htonl (uint32)\n\nThe `htonl()` function converts a 32 bit unsigned integer from host byte\norder to network byte order and returns the res
ult. This function is simply\na stub through to the operating systems `htonl()` function.\n\n## raw.htons (uint16)\n\nThe `htons()` function converts a 16 bit unsigned integer from host byte\norder to network byte order and returns the result. This function is simply\na stub through to the operating systems `htons()` function.\n\n## raw.ntohl (uint32)\n\nThe `ntohl()` function converts a 32 bit unsigned integer from network byte\norder to host byte order and returns the result. This function is simply\na stub through to the operating systems `ntohl()` function.\n\n## raw.ntohs (uint16)\n\nThe `ntohs()` function converts a 16 bit unsigned integer from network byte\norder to host byte order and returns the result. This function is simply\na stub through to the operating systems `ntohs()` function.\n\n## raw.createSocket ([options])\n\nThe `createSocket()` function instantiates and returns an instance of the\n`Socket` class:\n\n // Default options\n var options = {\n a
ddressFamily: raw.AddressFamily.IPv4,\n protocol: raw.Protocol.None,\n bufferSize: 4096,\n generateChecksums: false,\n checksumOffset: 0\n };\n \n var socket = raw.createSocket (options);\n\nThe optional `options` parameter is an object, and can contain the following\nitems:\n\n * `addressFamily` - Either the constant `raw.AddressFamily.IPv4` or the\n constant `raw.AddressFamily.IPv6`, defaults to the constant\n `raw.AddressFamily.IPv4`\n * `protocol` - Either one of the constants defined in the `raw.Protocol`\n object or the protocol number to use for the socket, defaults to the\n consant `raw.Protocol.None`\n * `bufferSize` - Size, in bytes, of the sockets internal receive buffer,\n defaults to 4096\n * `generateChecksums` - Either `true` or `false` to enable or disable the\n automatic checksum generation feature, defaults to `false`\n * `checksumOffset` - When `generateChecksums` is `true` specifies how many\n bytes to index into
the send buffer to write automatically generated\n checksums, defaults to `0`\n\nAn exception will be thrown if the underlying raw socket could not be created.\nThe error will be an instance of the `Error` class.\n\nThe `protocol` parameter, or its default value of the constant\n`raw.Protocol.None`, will be specified in the protocol field of each IP\nheader.\n\n## socket.on (\"close\", callback)\n\nThe `close` event is emitted by the socket when the underlying raw socket\nis closed.\n\nNo arguments are passed to the callback.\n\nThe following example prints a message to the console when the socket is\nclosed:\n\n socket.on (\"close\", function () {\n console.log (\"socket closed\");\n });\n\n## socket.on (\"error\", callback)\n\nThe `error` event is emitted by the socket when an error occurs sending or\nreceiving data.\n\nThe following arguments will be passed to the `callback` function:\n\n * `error` - An instance of the `Error` class, the exposed `message` attribut
e\n will contain a detailed error message.\n\nThe following example prints a message to the console when an error occurs,\nafter which the socket is closed:\n\n socket.on (\"error\", function (error) {\n console.log (error.toString ());\n socket.close ();\n });\n\n## socket.on (\"message\", callback)\n\nThe `message` event is emitted by the socket when data has been received.\n\nThe following arguments will be passed to the `callback` function:\n\n * `buffer` - A [Node.js][nodejs] `Buffer` object containing the data\n received, the buffer will be sized to fit the data received, that is the\n `length` attribute of buffer will specify how many bytes were received\n * `address` - For IPv4 raw sockets the dotted quad formatted source IP\n address of the message, e.g `192.168.1.254`, for IPv6 raw sockets the\n compressed formatted source IP address of the message, e.g.\n `fe80::a00:27ff:fe2a:3427`\n\nThe following example prints received messages in hexade
cimal to the console:\n\n socket.on (\"message\", function (buffer, address) {\n console.log (\"received \" + buffer.length + \" bytes from \" + address\n + \": \" + buffer.toString (\"hex\"));\n });\n\n## socket.generateChecksums (generate, offset)\n\nThe `generateChecksums()` method is used to specify whether automatic checksum\ngeneration should be performed by the socket.\n\nThe `generate` parameter is either `true` or `false` to enable or disable the\nfeature. The optional `offset` parameter specifies how many bytes to index\ninto the send buffer when writing the generated checksum to the send buffer.\n\nThe following example enables automatic checksum generation at offset 2\nresulting in checksums being written to byte 3 and 4 of the send buffer\n(offsets start from 0, meaning byte 1):\n\n socket.generateChecksums (true, 2);\n\n## socket.getOption (level, option, buffer, length)\n\nThe `getOption()` method gets a socket option using the operatin
g systems\n`getsockopt()` function.\n\nThe `level` parameter is one of the constants defined in the `raw.SocketLevel`\nobject. The `option` parameter is one of the constants defined in the\n`raw.SocketOption` object. The `buffer` parameter is a [Node.js][nodejs]\n`Buffer` object where the socket option value will be written. The `length`\nparameter specifies the size of the `buffer` parameter.\n\nIf an error occurs an exception will be thrown, the exception will be an\ninstance of the `Error` class.\n\nThe number of bytes written into the `buffer` parameter is returned, and can\ndiffer from the amount of space available.\n\nThe following example retrieves the current value of `IP_TTL` socket option:\n\n var level = raw.SocketLevel.IPPROTO_IP;\n var option = raw.SocketOption.IP_TTL;\n \n # IP_TTL is a signed integer on some platforms so a 4 byte buffer is used\n var buffer = new Buffer (4);\n \n var written = socket.getOption (level, option, buffer, buffer.len
gth);\n \n console.log (buffer.toString (\"hex\"), 0, written);\n\n## socket.send (buffer, offset, length, address, beforeCallback, afterCallback)\n\nThe `send()` method sends data to a remote host.\n\nThe `buffer` parameter is a [Node.js][nodejs] `Buffer` object containing the\ndata to be sent. The `length` parameter specifies how many bytes from\n`buffer`, beginning at offset `offset`, to send. For IPv4 raw sockets the\n`address` parameter contains the dotted quad formatted IP address of the\nremote host to send the data to, e.g `192.168.1.254`, for IPv6 raw sockets the\n`address` parameter contains the compressed formatted IP address of the remote\nhost to send the data to, e.g. `fe80::a00:27ff:fe2a:3427`. If provided the\noptional `beforeCallback` function is called right before the data is actually\nsent using the underlying raw socket, giving users the opportunity to perform\npre-send actions such as setting a socket option, e.g. the IP header TTL. No\narguments are
passed to the `beforeCallback` function. The `afterCallback`\nfunction is called once the data has been sent. The following arguments will\nbe passed to the `afterCallback` function:\n\n * `error` - Instance of the `Error` class, or `null` if no error occurred\n * `bytes` - Number of bytes sent\n\nThe following example sends a ICMP ping message to a remote host, before the\nrequest is actually sent the IP header TTL is modified, and modified again\nafter the data has been sent:\n\n // ICMP echo (ping) request, checksum should be ok\n var buffer = new Buffer ([\n 0x08, 0x00, 0x43, 0x52, 0x00, 0x01, 0x0a, 0x09,\n 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,\n 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,\n 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x61,\n 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69]);\n\n var socketLevel = raw.SocketLevel.IPPROTO_IP\n var socketOption = raw.SocketOption.IP_TTL;\n\n functio
n beforeSend () {\n socket.setOption (socketLevel, socketOption, 1);\n }\n \n function afterSend (error, bytes) {\n if (error)\n console.log (error.toString ());\n else\n console.log (\"sent \" + bytes + \" bytes\");\n \n socket.setOption (socketLevel, socketOption, 1);\n }\n\n socket.send (buffer, 0, buffer.length, target, beforeSend, afterSend);\n\n## socket.setOption (level, option, buffer, length)\n\nThe `setOption()` method sets a socket option using the operating systems\n`setsockopt()` function.\n\nThe `level` parameter is one of the constants defined in the `raw.SocketLevel`\nobject. The `option` parameter is one of the constants defined in the\n`raw.SocketOption` object. The `buffer` parameter is a [Node.js][nodejs]\n`Buffer` object where the socket option value is specified. The `length`\nparameter specifies how much space the option value occupies in the `buffer`\nparameter.\n\nIf an error occurs a
n exception will be thrown, the exception will be an\ninstance of the `Error` class.\n\nThe following example sets the value of `IP_TTL` socket option to `1`:\n\n var level = raw.SocketLevel.IPPROTO_IP;\n var option = raw.SocketOption.IP_TTL;\n \n # IP_TTL is a signed integer on some platforms so a 4 byte buffer is used,\n # x86 computers use little-endian format so specify bytes reverse order\n var buffer = new Buffer ([0x01, 0x00, 0x00, 0x00]);\n \n socket.setOption (level, option, buffer, buffer.length);\n\nTo avoid dealing with endianess the `setOption()` method supports a three\nargument form which can be used for socket options requiring a 32bit unsigned\ninteger value (for example the `IP_TTL` socket option used in the previous\nexample). Its signature is as follows:\n\n socket.setOption (level, option, value)\n\nThe previous example can be re-written to use this form:\n\n var level = raw.SocketLevel.IPPROTO_IP;\n var option = raw.SocketOptio
n.IP_TTL;\n\n socket.setOption (level, option, 1);\n\n# Example Programs\n\nExample programs are included under the modules `example` directory.\n\n# Bugs & Known Issues\n\nNone, yet!\n\nBug reports should be sent to <st...@gmail.com>.\n\n# Changes\n\n## Version 1.0.0 - 29/01/2013\n\n * Initial release\n\n## Version 1.0.1 - 01/02/2013\n\n * Move `SOCKET_ERRNO` define from `raw.cc` to `raw.h`\n * Error in exception thrown by `SocketWrap::New` in `raw.cc` stated that two\n arguments were required, this should be one\n * Corrections to the README.md\n * Missing includes causes compilation error on some systems (maybe Node\n version dependant)\n\n## Version 1.0.2 - 02/02/2013\n\n * Support automatic checksum generation\n\n## Version 1.1.0 - 13/02/2013\n\n * The [net-ping][net-ping] module is now implemented so update the note about\n it in the first section of the README.md\n * Support IPv6\n * Support the `IP_HDRINCL` socket option via the `noIpHeader` option to t
he\n `createSocket()` function and the `noIpHeader()` method exposed by the\n `Socket` class\n\n## Version 1.1.1 - 14/02/2013\n\n * IP addresses not being validated\n\n## Version 1.1.2 - 15/02/2013\n\n * Default protocol option to `createSession()` was incorrect in the README.md\n * The `session.on(\"message\")` example used `message` instead of `buffer` in\n the README.md\n\n## Version 1.1.3 - 04/03/2013\n\n * `raw.Socket.onSendReady()` emit's an error when `raw.SocketWrap.send()`\n throws an exception when it should call the `req.callback` callback\n * Added the `pauseRecv()`, `resumeRecv()`, `pauseSend()` and `resumeSend()`\n methods\n\n[net-ping]: https://npmjs.org/package/net-ping \"net-ping\"\n\n## Version 1.1.4 - 05/03/2013\n\n * Cleanup documentation for the `pauseSend()`, `pauseRecv()`, `resumeSend()`\n and `resumeRecv()` methods in the README.md\n\n## Version 1.1.5 - 09/05/2013\n\n * Reformated lines in the README.md file inline with the rest of the file\n * Re
moved the `noIpHeader()` method (the `setOption()` method should be\n used to configure the `IP_HDRINCL` socket option - and possibly\n `IPV6_HDRINCL` on Windows platforms), and removed the `Automatic IP Header\n Generation` section from the README.md file\n * Added the `setOption()` and `getOption()` methods, and added the\n `SocketLevel` and `SocketOption` constants\n * Tidied up the example program `ping-no-ip-header.js` (now uses the\n `setOption()` method to configure the `IP_HDRINCL` socket option)\n * Tidied up the example program `ping6-no-ip-header.js` (now uses the\n `setOption()` method to configure the `IPV6_HDRINCL` socket option)\n * Added the example program `get-option.js`\n * Added the example program `ping-set-option-ip-ttl.js`\n * Use MIT license instead of GPL\n\n## Version 1.1.6 - 18/05/2013\n\n * Added the `beforeCallback` parameter to the `send()` method, and renamed the\n `callback` parameter to `afterCallback`\n * Fixed a few typos in the READM
E.md file\n * Modified the example program `ping-set-option-ip-ttl.js` to use the\n `beforeCallback` parameter to the `send()` method\n * The example program `ping6-no-ip-header.js` was not passing the correct\n arguments to the `setOption()` method\n\n## Version 1.1.7 - 23/06/2013\n\n * Added the `htonl()`, `htons()`, `ntohl()`, and `ntohs()` functions, and\n associated example programs\n * Added the `createChecksum()` function, and associated example program\n\n## Version 1.1.8 - 01/07/2013\n\n * Added the `writeChecksum()` function\n * Removed the \"Automated Checksum Generation\" feature - this has been\n replaced with the `createChecksum()` and `writeChecksum()` functions\n\n## Version 1.2.0 - 02/07/2013\n\n * Up version number to 1.2.0 (we should have done this for 1.1.8 because it\n introduced some API breaking changes)\n\n# Roadmap\n\nIn no particular order:\n\n * Enhance performance by moving the send queue into the C++ raw::SocketWrap\n class\n\nSuggestions and
requirements should be sent to <st...@gmail.com>.\n\n# License\n\nCopyright (c) 2013 Stephen Vickers\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIAB
ILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n# Author\n\nStephen Vickers <st...@gmail.com>\n",
+ "readmeFilename": "README.md",
+ "_id": "raw-socket@1.2.0",
+ "dist": {
+ "shasum": "11c8512e44e98801bcd918956fc8905b60823c7e"
+ },
+ "_from": "raw-socket@*",
+ "_resolved": "https://registry.npmjs.org/raw-socket/-/raw-socket-1.2.0.tgz"
+}
[29/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/nodes.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/nodes.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/nodes.js
new file mode 100644
index 0000000..0edbcf6
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/nodes.js
@@ -0,0 +1,3048 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, CodeFragment, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, last, locationDataToString, merge, multident, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, _ref2, _ref3,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
+ __slice = [].slice;
+
+ Error.stackTraceLimit = Infinity;
+
+ Scope = require('./scope').Scope;
+
+ _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED;
+
+ _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError;
+
+ exports.extend = extend;
+
+ exports.addLocationDataFn = addLocationDataFn;
+
+ YES = function() {
+ return true;
+ };
+
+ NO = function() {
+ return false;
+ };
+
+ THIS = function() {
+ return this;
+ };
+
+ NEGATE = function() {
+ this.negated = !this.negated;
+ return this;
+ };
+
+ exports.CodeFragment = CodeFragment = (function() {
+ function CodeFragment(parent, code) {
+ var _ref2;
+ this.code = "" + code;
+ this.locationData = parent != null ? parent.locationData : void 0;
+ this.type = (parent != null ? (_ref2 = parent.constructor) != null ? _ref2.name : void 0 : void 0) || 'unknown';
+ }
+
+ CodeFragment.prototype.toString = function() {
+ return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : '');
+ };
+
+ return CodeFragment;
+
+ })();
+
+ fragmentsToText = function(fragments) {
+ var fragment;
+ return ((function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = fragments.length; _i < _len; _i++) {
+ fragment = fragments[_i];
+ _results.push(fragment.code);
+ }
+ return _results;
+ })()).join('');
+ };
+
+ exports.Base = Base = (function() {
+ function Base() {}
+
+ Base.prototype.compile = function(o, lvl) {
+ return fragmentsToText(this.compileToFragments(o, lvl));
+ };
+
+ Base.prototype.compileToFragments = function(o, lvl) {
+ var node;
+ o = extend({}, o);
+ if (lvl) {
+ o.level = lvl;
+ }
+ node = this.unfoldSoak(o) || this;
+ node.tab = o.indent;
+ if (o.level === LEVEL_TOP || !node.isStatement(o)) {
+ return node.compileNode(o);
+ } else {
+ return node.compileClosure(o);
+ }
+ };
+
+ Base.prototype.compileClosure = function(o) {
+ var jumpNode;
+ if (jumpNode = this.jumps()) {
+ jumpNode.error('cannot use a pure statement in an expression');
+ }
+ o.sharedScope = true;
+ return Closure.wrap(this).compileNode(o);
+ };
+
+ Base.prototype.cache = function(o, level, reused) {
+ var ref, sub;
+ if (!this.isComplex()) {
+ ref = level ? this.compileToFragments(o, level) : this;
+ return [ref, ref];
+ } else {
+ ref = new Literal(reused || o.scope.freeVariable('ref'));
+ sub = new Assign(ref, this);
+ if (level) {
+ return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]];
+ } else {
+ return [sub, ref];
+ }
+ }
+ };
+
+ Base.prototype.cacheToCodeFragments = function(cacheValues) {
+ return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])];
+ };
+
+ Base.prototype.makeReturn = function(res) {
+ var me;
+ me = this.unwrapAll();
+ if (res) {
+ return new Call(new Literal("" + res + ".push"), [me]);
+ } else {
+ return new Return(me);
+ }
+ };
+
+ Base.prototype.contains = function(pred) {
+ var node;
+ node = void 0;
+ this.traverseChildren(false, function(n) {
+ if (pred(n)) {
+ node = n;
+ return false;
+ }
+ });
+ return node;
+ };
+
+ Base.prototype.lastNonComment = function(list) {
+ var i;
+ i = list.length;
+ while (i--) {
+ if (!(list[i] instanceof Comment)) {
+ return list[i];
+ }
+ }
+ return null;
+ };
+
+ Base.prototype.toString = function(idt, name) {
+ var tree;
+ if (idt == null) {
+ idt = '';
+ }
+ if (name == null) {
+ name = this.constructor.name;
+ }
+ tree = '\n' + idt + name;
+ if (this.soak) {
+ tree += '?';
+ }
+ this.eachChild(function(node) {
+ return tree += node.toString(idt + TAB);
+ });
+ return tree;
+ };
+
+ Base.prototype.eachChild = function(func) {
+ var attr, child, _i, _j, _len, _len1, _ref2, _ref3;
+ if (!this.children) {
+ return this;
+ }
+ _ref2 = this.children;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ attr = _ref2[_i];
+ if (this[attr]) {
+ _ref3 = flatten([this[attr]]);
+ for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
+ child = _ref3[_j];
+ if (func(child) === false) {
+ return this;
+ }
+ }
+ }
+ }
+ return this;
+ };
+
+ Base.prototype.traverseChildren = function(crossScope, func) {
+ return this.eachChild(function(child) {
+ var recur;
+ recur = func(child);
+ if (recur !== false) {
+ return child.traverseChildren(crossScope, func);
+ }
+ });
+ };
+
+ Base.prototype.invert = function() {
+ return new Op('!', this);
+ };
+
+ Base.prototype.unwrapAll = function() {
+ var node;
+ node = this;
+ while (node !== (node = node.unwrap())) {
+ continue;
+ }
+ return node;
+ };
+
+ Base.prototype.children = [];
+
+ Base.prototype.isStatement = NO;
+
+ Base.prototype.jumps = NO;
+
+ Base.prototype.isComplex = YES;
+
+ Base.prototype.isChainable = NO;
+
+ Base.prototype.isAssignable = NO;
+
+ Base.prototype.unwrap = THIS;
+
+ Base.prototype.unfoldSoak = NO;
+
+ Base.prototype.assigns = NO;
+
+ Base.prototype.updateLocationDataIfMissing = function(locationData) {
+ this.locationData || (this.locationData = locationData);
+ return this.eachChild(function(child) {
+ return child.updateLocationDataIfMissing(locationData);
+ });
+ };
+
+ Base.prototype.error = function(message) {
+ return throwSyntaxError(message, this.locationData);
+ };
+
+ Base.prototype.makeCode = function(code) {
+ return new CodeFragment(this, code);
+ };
+
+ Base.prototype.wrapInBraces = function(fragments) {
+ return [].concat(this.makeCode('('), fragments, this.makeCode(')'));
+ };
+
+ Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) {
+ var answer, fragments, i, _i, _len;
+ answer = [];
+ for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) {
+ fragments = fragmentsList[i];
+ if (i) {
+ answer.push(this.makeCode(joinStr));
+ }
+ answer = answer.concat(fragments);
+ }
+ return answer;
+ };
+
+ return Base;
+
+ })();
+
+ exports.Block = Block = (function(_super) {
+ __extends(Block, _super);
+
+ function Block(nodes) {
+ this.expressions = compact(flatten(nodes || []));
+ }
+
+ Block.prototype.children = ['expressions'];
+
+ Block.prototype.push = function(node) {
+ this.expressions.push(node);
+ return this;
+ };
+
+ Block.prototype.pop = function() {
+ return this.expressions.pop();
+ };
+
+ Block.prototype.unshift = function(node) {
+ this.expressions.unshift(node);
+ return this;
+ };
+
+ Block.prototype.unwrap = function() {
+ if (this.expressions.length === 1) {
+ return this.expressions[0];
+ } else {
+ return this;
+ }
+ };
+
+ Block.prototype.isEmpty = function() {
+ return !this.expressions.length;
+ };
+
+ Block.prototype.isStatement = function(o) {
+ var exp, _i, _len, _ref2;
+ _ref2 = this.expressions;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ exp = _ref2[_i];
+ if (exp.isStatement(o)) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ Block.prototype.jumps = function(o) {
+ var exp, _i, _len, _ref2;
+ _ref2 = this.expressions;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ exp = _ref2[_i];
+ if (exp.jumps(o)) {
+ return exp;
+ }
+ }
+ };
+
+ Block.prototype.makeReturn = function(res) {
+ var expr, len;
+ len = this.expressions.length;
+ while (len--) {
+ expr = this.expressions[len];
+ if (!(expr instanceof Comment)) {
+ this.expressions[len] = expr.makeReturn(res);
+ if (expr instanceof Return && !expr.expression) {
+ this.expressions.splice(len, 1);
+ }
+ break;
+ }
+ }
+ return this;
+ };
+
+ Block.prototype.compileToFragments = function(o, level) {
+ if (o == null) {
+ o = {};
+ }
+ if (o.scope) {
+ return Block.__super__.compileToFragments.call(this, o, level);
+ } else {
+ return this.compileRoot(o);
+ }
+ };
+
+ Block.prototype.compileNode = function(o) {
+ var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2;
+ this.tab = o.indent;
+ top = o.level === LEVEL_TOP;
+ compiledNodes = [];
+ _ref2 = this.expressions;
+ for (index = _i = 0, _len = _ref2.length; _i < _len; index = ++_i) {
+ node = _ref2[index];
+ node = node.unwrapAll();
+ node = node.unfoldSoak(o) || node;
+ if (node instanceof Block) {
+ compiledNodes.push(node.compileNode(o));
+ } else if (top) {
+ node.front = true;
+ fragments = node.compileToFragments(o);
+ if (!node.isStatement(o)) {
+ fragments.unshift(this.makeCode("" + this.tab));
+ fragments.push(this.makeCode(";"));
+ }
+ compiledNodes.push(fragments);
+ } else {
+ compiledNodes.push(node.compileToFragments(o, LEVEL_LIST));
+ }
+ }
+ if (top) {
+ if (this.spaced) {
+ return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n"));
+ } else {
+ return this.joinFragmentArrays(compiledNodes, '\n');
+ }
+ }
+ if (compiledNodes.length) {
+ answer = this.joinFragmentArrays(compiledNodes, ', ');
+ } else {
+ answer = [this.makeCode("void 0")];
+ }
+ if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) {
+ return this.wrapInBraces(answer);
+ } else {
+ return answer;
+ }
+ };
+
+ Block.prototype.compileRoot = function(o) {
+ var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2;
+ o.indent = o.bare ? '' : TAB;
+ o.level = LEVEL_TOP;
+ this.spaced = true;
+ o.scope = new Scope(null, this, null);
+ _ref2 = o.locals || [];
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ name = _ref2[_i];
+ o.scope.parameter(name);
+ }
+ prelude = [];
+ if (!o.bare) {
+ preludeExps = (function() {
+ var _j, _len1, _ref3, _results;
+ _ref3 = this.expressions;
+ _results = [];
+ for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) {
+ exp = _ref3[i];
+ if (!(exp.unwrap() instanceof Comment)) {
+ break;
+ }
+ _results.push(exp);
+ }
+ return _results;
+ }).call(this);
+ rest = this.expressions.slice(preludeExps.length);
+ this.expressions = preludeExps;
+ if (preludeExps.length) {
+ prelude = this.compileNode(merge(o, {
+ indent: ''
+ }));
+ prelude.push(this.makeCode("\n"));
+ }
+ this.expressions = rest;
+ }
+ fragments = this.compileWithDeclarations(o);
+ if (o.bare) {
+ return fragments;
+ }
+ return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n"));
+ };
+
+ Block.prototype.compileWithDeclarations = function(o) {
+ var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4;
+ fragments = [];
+ post = [];
+ _ref2 = this.expressions;
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
+ exp = _ref2[i];
+ exp = exp.unwrap();
+ if (!(exp instanceof Comment || exp instanceof Literal)) {
+ break;
+ }
+ }
+ o = merge(o, {
+ level: LEVEL_TOP
+ });
+ if (i) {
+ rest = this.expressions.splice(i, 9e9);
+ _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1];
+ _ref4 = [this.compileNode(o), spaced], fragments = _ref4[0], this.spaced = _ref4[1];
+ this.expressions = rest;
+ }
+ post = this.compileNode(o);
+ scope = o.scope;
+ if (scope.expressions === this) {
+ declars = o.scope.hasDeclarations();
+ assigns = scope.hasAssignments;
+ if (declars || assigns) {
+ if (i) {
+ fragments.push(this.makeCode('\n'));
+ }
+ fragments.push(this.makeCode("" + this.tab + "var "));
+ if (declars) {
+ fragments.push(this.makeCode(scope.declaredVariables().join(', ')));
+ }
+ if (assigns) {
+ if (declars) {
+ fragments.push(this.makeCode(",\n" + (this.tab + TAB)));
+ }
+ fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB))));
+ }
+ fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : '')));
+ } else if (fragments.length && post.length) {
+ fragments.push(this.makeCode("\n"));
+ }
+ }
+ return fragments.concat(post);
+ };
+
+ Block.wrap = function(nodes) {
+ if (nodes.length === 1 && nodes[0] instanceof Block) {
+ return nodes[0];
+ }
+ return new Block(nodes);
+ };
+
+ return Block;
+
+ })(Base);
+
+ exports.Literal = Literal = (function(_super) {
+ __extends(Literal, _super);
+
+ function Literal(value) {
+ this.value = value;
+ }
+
+ Literal.prototype.makeReturn = function() {
+ if (this.isStatement()) {
+ return this;
+ } else {
+ return Literal.__super__.makeReturn.apply(this, arguments);
+ }
+ };
+
+ Literal.prototype.isAssignable = function() {
+ return IDENTIFIER.test(this.value);
+ };
+
+ Literal.prototype.isStatement = function() {
+ var _ref2;
+ return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger';
+ };
+
+ Literal.prototype.isComplex = NO;
+
+ Literal.prototype.assigns = function(name) {
+ return name === this.value;
+ };
+
+ Literal.prototype.jumps = function(o) {
+ if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) {
+ return this;
+ }
+ if (this.value === 'continue' && !(o != null ? o.loop : void 0)) {
+ return this;
+ }
+ };
+
+ Literal.prototype.compileNode = function(o) {
+ var answer, code, _ref2;
+ code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value;
+ answer = this.isStatement() ? "" + this.tab + code + ";" : code;
+ return [this.makeCode(answer)];
+ };
+
+ Literal.prototype.toString = function() {
+ return ' "' + this.value + '"';
+ };
+
+ return Literal;
+
+ })(Base);
+
+ exports.Undefined = (function(_super) {
+ __extends(Undefined, _super);
+
+ function Undefined() {
+ _ref2 = Undefined.__super__.constructor.apply(this, arguments);
+ return _ref2;
+ }
+
+ Undefined.prototype.isAssignable = NO;
+
+ Undefined.prototype.isComplex = NO;
+
+ Undefined.prototype.compileNode = function(o) {
+ return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')];
+ };
+
+ return Undefined;
+
+ })(Base);
+
+ exports.Null = (function(_super) {
+ __extends(Null, _super);
+
+ function Null() {
+ _ref3 = Null.__super__.constructor.apply(this, arguments);
+ return _ref3;
+ }
+
+ Null.prototype.isAssignable = NO;
+
+ Null.prototype.isComplex = NO;
+
+ Null.prototype.compileNode = function() {
+ return [this.makeCode("null")];
+ };
+
+ return Null;
+
+ })(Base);
+
+ exports.Bool = (function(_super) {
+ __extends(Bool, _super);
+
+ Bool.prototype.isAssignable = NO;
+
+ Bool.prototype.isComplex = NO;
+
+ Bool.prototype.compileNode = function() {
+ return [this.makeCode(this.val)];
+ };
+
+ function Bool(val) {
+ this.val = val;
+ }
+
+ return Bool;
+
+ })(Base);
+
+ exports.Return = Return = (function(_super) {
+ __extends(Return, _super);
+
+ function Return(expr) {
+ if (expr && !expr.unwrap().isUndefined) {
+ this.expression = expr;
+ }
+ }
+
+ Return.prototype.children = ['expression'];
+
+ Return.prototype.isStatement = YES;
+
+ Return.prototype.makeReturn = THIS;
+
+ Return.prototype.jumps = THIS;
+
+ Return.prototype.compileToFragments = function(o, level) {
+ var expr, _ref4;
+ expr = (_ref4 = this.expression) != null ? _ref4.makeReturn() : void 0;
+ if (expr && !(expr instanceof Return)) {
+ return expr.compileToFragments(o, level);
+ } else {
+ return Return.__super__.compileToFragments.call(this, o, level);
+ }
+ };
+
+ Return.prototype.compileNode = function(o) {
+ var answer;
+ answer = [];
+ answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : ""))));
+ if (this.expression) {
+ answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN));
+ }
+ answer.push(this.makeCode(";"));
+ return answer;
+ };
+
+ return Return;
+
+ })(Base);
+
+ exports.Value = Value = (function(_super) {
+ __extends(Value, _super);
+
+ function Value(base, props, tag) {
+ if (!props && base instanceof Value) {
+ return base;
+ }
+ this.base = base;
+ this.properties = props || [];
+ if (tag) {
+ this[tag] = true;
+ }
+ return this;
+ }
+
+ Value.prototype.children = ['base', 'properties'];
+
+ Value.prototype.add = function(props) {
+ this.properties = this.properties.concat(props);
+ return this;
+ };
+
+ Value.prototype.hasProperties = function() {
+ return !!this.properties.length;
+ };
+
+ Value.prototype.isArray = function() {
+ return !this.properties.length && this.base instanceof Arr;
+ };
+
+ Value.prototype.isComplex = function() {
+ return this.hasProperties() || this.base.isComplex();
+ };
+
+ Value.prototype.isAssignable = function() {
+ return this.hasProperties() || this.base.isAssignable();
+ };
+
+ Value.prototype.isSimpleNumber = function() {
+ return this.base instanceof Literal && SIMPLENUM.test(this.base.value);
+ };
+
+ Value.prototype.isString = function() {
+ return this.base instanceof Literal && IS_STRING.test(this.base.value);
+ };
+
+ Value.prototype.isAtomic = function() {
+ var node, _i, _len, _ref4;
+ _ref4 = this.properties.concat(this.base);
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ node = _ref4[_i];
+ if (node.soak || node instanceof Call) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ Value.prototype.isStatement = function(o) {
+ return !this.properties.length && this.base.isStatement(o);
+ };
+
+ Value.prototype.assigns = function(name) {
+ return !this.properties.length && this.base.assigns(name);
+ };
+
+ Value.prototype.jumps = function(o) {
+ return !this.properties.length && this.base.jumps(o);
+ };
+
+ Value.prototype.isObject = function(onlyGenerated) {
+ if (this.properties.length) {
+ return false;
+ }
+ return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated);
+ };
+
+ Value.prototype.isSplice = function() {
+ return last(this.properties) instanceof Slice;
+ };
+
+ Value.prototype.unwrap = function() {
+ if (this.properties.length) {
+ return this;
+ } else {
+ return this.base;
+ }
+ };
+
+ Value.prototype.cacheReference = function(o) {
+ var base, bref, name, nref;
+ name = last(this.properties);
+ if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) {
+ return [this, this];
+ }
+ base = new Value(this.base, this.properties.slice(0, -1));
+ if (base.isComplex()) {
+ bref = new Literal(o.scope.freeVariable('base'));
+ base = new Value(new Parens(new Assign(bref, base)));
+ }
+ if (!name) {
+ return [base, bref];
+ }
+ if (name.isComplex()) {
+ nref = new Literal(o.scope.freeVariable('name'));
+ name = new Index(new Assign(nref, name.index));
+ nref = new Index(nref);
+ }
+ return [base.add(name), new Value(bref || base.base, [nref || name])];
+ };
+
+ Value.prototype.compileNode = function(o) {
+ var fragments, prop, props, _i, _len;
+ this.base.front = this.front;
+ props = this.properties;
+ fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null));
+ if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(fragmentsToText(fragments))) {
+ fragments.push(this.makeCode('.'));
+ }
+ for (_i = 0, _len = props.length; _i < _len; _i++) {
+ prop = props[_i];
+ fragments.push.apply(fragments, prop.compileToFragments(o));
+ }
+ return fragments;
+ };
+
+ Value.prototype.unfoldSoak = function(o) {
+ var _this = this;
+ return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function() {
+ var fst, i, ifn, prop, ref, snd, _i, _len, _ref4, _ref5;
+ if (ifn = _this.base.unfoldSoak(o)) {
+ (_ref4 = ifn.body.properties).push.apply(_ref4, _this.properties);
+ return ifn;
+ }
+ _ref5 = _this.properties;
+ for (i = _i = 0, _len = _ref5.length; _i < _len; i = ++_i) {
+ prop = _ref5[i];
+ if (!prop.soak) {
+ continue;
+ }
+ prop.soak = false;
+ fst = new Value(_this.base, _this.properties.slice(0, i));
+ snd = new Value(_this.base, _this.properties.slice(i));
+ if (fst.isComplex()) {
+ ref = new Literal(o.scope.freeVariable('ref'));
+ fst = new Parens(new Assign(ref, fst));
+ snd.base = ref;
+ }
+ return new If(new Existence(fst), snd, {
+ soak: true
+ });
+ }
+ return false;
+ })();
+ };
+
+ return Value;
+
+ })(Base);
+
+ exports.Comment = Comment = (function(_super) {
+ __extends(Comment, _super);
+
+ function Comment(comment) {
+ this.comment = comment;
+ }
+
+ Comment.prototype.isStatement = YES;
+
+ Comment.prototype.makeReturn = THIS;
+
+ Comment.prototype.compileNode = function(o, level) {
+ var code;
+ code = "/*" + (multident(this.comment, this.tab)) + (__indexOf.call(this.comment, '\n') >= 0 ? "\n" + this.tab : '') + "*/\n";
+ if ((level || o.level) === LEVEL_TOP) {
+ code = o.indent + code;
+ }
+ return [this.makeCode(code)];
+ };
+
+ return Comment;
+
+ })(Base);
+
+ exports.Call = Call = (function(_super) {
+ __extends(Call, _super);
+
+ function Call(variable, args, soak) {
+ this.args = args != null ? args : [];
+ this.soak = soak;
+ this.isNew = false;
+ this.isSuper = variable === 'super';
+ this.variable = this.isSuper ? null : variable;
+ }
+
+ Call.prototype.children = ['variable', 'args'];
+
+ Call.prototype.newInstance = function() {
+ var base, _ref4;
+ base = ((_ref4 = this.variable) != null ? _ref4.base : void 0) || this.variable;
+ if (base instanceof Call && !base.isNew) {
+ base.newInstance();
+ } else {
+ this.isNew = true;
+ }
+ return this;
+ };
+
+ Call.prototype.superReference = function(o) {
+ var accesses, method;
+ method = o.scope.namedMethod();
+ if (method != null ? method.klass : void 0) {
+ accesses = [new Access(new Literal('__super__'))];
+ if (method["static"]) {
+ accesses.push(new Access(new Literal('constructor')));
+ }
+ accesses.push(new Access(new Literal(method.name)));
+ return (new Value(new Literal(method.klass), accesses)).compile(o);
+ } else if (method != null ? method.ctor : void 0) {
+ return "" + method.name + ".__super__.constructor";
+ } else {
+ return this.error('cannot call super outside of an instance method.');
+ }
+ };
+
+ Call.prototype.superThis = function(o) {
+ var method;
+ method = o.scope.method;
+ return (method && !method.klass && method.context) || "this";
+ };
+
+ Call.prototype.unfoldSoak = function(o) {
+ var call, ifn, left, list, rite, _i, _len, _ref4, _ref5;
+ if (this.soak) {
+ if (this.variable) {
+ if (ifn = unfoldSoak(o, this, 'variable')) {
+ return ifn;
+ }
+ _ref4 = new Value(this.variable).cacheReference(o), left = _ref4[0], rite = _ref4[1];
+ } else {
+ left = new Literal(this.superReference(o));
+ rite = new Value(left);
+ }
+ rite = new Call(rite, this.args);
+ rite.isNew = this.isNew;
+ left = new Literal("typeof " + (left.compile(o)) + " === \"function\"");
+ return new If(left, new Value(rite), {
+ soak: true
+ });
+ }
+ call = this;
+ list = [];
+ while (true) {
+ if (call.variable instanceof Call) {
+ list.push(call);
+ call = call.variable;
+ continue;
+ }
+ if (!(call.variable instanceof Value)) {
+ break;
+ }
+ list.push(call);
+ if (!((call = call.variable.base) instanceof Call)) {
+ break;
+ }
+ }
+ _ref5 = list.reverse();
+ for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
+ call = _ref5[_i];
+ if (ifn) {
+ if (call.variable instanceof Call) {
+ call.variable = ifn;
+ } else {
+ call.variable.base = ifn;
+ }
+ }
+ ifn = unfoldSoak(o, call, 'variable');
+ }
+ return ifn;
+ };
+
+ Call.prototype.compileNode = function(o) {
+ var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref4, _ref5;
+ if ((_ref4 = this.variable) != null) {
+ _ref4.front = this.front;
+ }
+ compiledArray = Splat.compileSplattedArray(o, this.args, true);
+ if (compiledArray.length) {
+ return this.compileSplat(o, compiledArray);
+ }
+ compiledArgs = [];
+ _ref5 = this.args;
+ for (argIndex = _i = 0, _len = _ref5.length; _i < _len; argIndex = ++_i) {
+ arg = _ref5[argIndex];
+ if (argIndex) {
+ compiledArgs.push(this.makeCode(", "));
+ }
+ compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST));
+ }
+ fragments = [];
+ if (this.isSuper) {
+ preface = this.superReference(o) + (".call(" + (this.superThis(o)));
+ if (compiledArgs.length) {
+ preface += ", ";
+ }
+ fragments.push(this.makeCode(preface));
+ } else {
+ if (this.isNew) {
+ fragments.push(this.makeCode('new '));
+ }
+ fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS));
+ fragments.push(this.makeCode("("));
+ }
+ fragments.push.apply(fragments, compiledArgs);
+ fragments.push(this.makeCode(")"));
+ return fragments;
+ };
+
+ Call.prototype.compileSplat = function(o, splatArgs) {
+ var answer, base, fun, idt, name, ref;
+ if (this.isSuper) {
+ return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")"));
+ }
+ if (this.isNew) {
+ idt = this.tab + TAB;
+ return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})"));
+ }
+ answer = [];
+ base = new Value(this.variable);
+ if ((name = base.properties.pop()) && base.isComplex()) {
+ ref = o.scope.freeVariable('ref');
+ answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o));
+ } else {
+ fun = base.compileToFragments(o, LEVEL_ACCESS);
+ if (SIMPLENUM.test(fragmentsToText(fun))) {
+ fun = this.wrapInBraces(fun);
+ }
+ if (name) {
+ ref = fragmentsToText(fun);
+ fun.push.apply(fun, name.compileToFragments(o));
+ } else {
+ ref = 'null';
+ }
+ answer = answer.concat(fun);
+ }
+ return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")"));
+ };
+
+ return Call;
+
+ })(Base);
+
+ exports.Extends = Extends = (function(_super) {
+ __extends(Extends, _super);
+
+ function Extends(child, parent) {
+ this.child = child;
+ this.parent = parent;
+ }
+
+ Extends.prototype.children = ['child', 'parent'];
+
+ Extends.prototype.compileToFragments = function(o) {
+ return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compileToFragments(o);
+ };
+
+ return Extends;
+
+ })(Base);
+
+ exports.Access = Access = (function(_super) {
+ __extends(Access, _super);
+
+ function Access(name, tag) {
+ this.name = name;
+ this.name.asKey = true;
+ this.soak = tag === 'soak';
+ }
+
+ Access.prototype.children = ['name'];
+
+ Access.prototype.compileToFragments = function(o) {
+ var name;
+ name = this.name.compileToFragments(o);
+ if (IDENTIFIER.test(fragmentsToText(name))) {
+ name.unshift(this.makeCode("."));
+ } else {
+ name.unshift(this.makeCode("["));
+ name.push(this.makeCode("]"));
+ }
+ return name;
+ };
+
+ Access.prototype.isComplex = NO;
+
+ return Access;
+
+ })(Base);
+
+ exports.Index = Index = (function(_super) {
+ __extends(Index, _super);
+
+ function Index(index) {
+ this.index = index;
+ }
+
+ Index.prototype.children = ['index'];
+
+ Index.prototype.compileToFragments = function(o) {
+ return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]"));
+ };
+
+ Index.prototype.isComplex = function() {
+ return this.index.isComplex();
+ };
+
+ return Index;
+
+ })(Base);
+
+ exports.Range = Range = (function(_super) {
+ __extends(Range, _super);
+
+ Range.prototype.children = ['from', 'to'];
+
+ function Range(from, to, tag) {
+ this.from = from;
+ this.to = to;
+ this.exclusive = tag === 'exclusive';
+ this.equals = this.exclusive ? '' : '=';
+ }
+
+ Range.prototype.compileVariables = function(o) {
+ var step, _ref4, _ref5, _ref6, _ref7;
+ o = merge(o, {
+ top: true
+ });
+ _ref4 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref4[0], this.fromVar = _ref4[1];
+ _ref5 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref5[0], this.toVar = _ref5[1];
+ if (step = del(o, 'step')) {
+ _ref6 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref6[0], this.stepVar = _ref6[1];
+ }
+ _ref7 = [this.fromVar.match(SIMPLENUM), this.toVar.match(SIMPLENUM)], this.fromNum = _ref7[0], this.toNum = _ref7[1];
+ if (this.stepVar) {
+ return this.stepNum = this.stepVar.match(SIMPLENUM);
+ }
+ };
+
+ Range.prototype.compileNode = function(o) {
+ var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref4, _ref5;
+ if (!this.fromVar) {
+ this.compileVariables(o);
+ }
+ if (!o.index) {
+ return this.compileArray(o);
+ }
+ known = this.fromNum && this.toNum;
+ idx = del(o, 'index');
+ idxName = del(o, 'name');
+ namedIndex = idxName && idxName !== idx;
+ varPart = "" + idx + " = " + this.fromC;
+ if (this.toC !== this.toVar) {
+ varPart += ", " + this.toC;
+ }
+ if (this.step !== this.stepVar) {
+ varPart += ", " + this.step;
+ }
+ _ref4 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref4[0], gt = _ref4[1];
+ condPart = this.stepNum ? +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref5 = [+this.fromNum, +this.toNum], from = _ref5[0], to = _ref5[1], _ref5), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar);
+ stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--";
+ if (namedIndex) {
+ varPart = "" + idxName + " = " + varPart;
+ }
+ if (namedIndex) {
+ stepPart = "" + idxName + " = " + stepPart;
+ }
+ return [this.makeCode("" + varPart + "; " + condPart + "; " + stepPart)];
+ };
+
+ Range.prototype.compileArray = function(o) {
+ var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref4, _ref5, _results;
+ if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) {
+ range = (function() {
+ _results = [];
+ for (var _i = _ref4 = +this.fromNum, _ref5 = +this.toNum; _ref4 <= _ref5 ? _i <= _ref5 : _i >= _ref5; _ref4 <= _ref5 ? _i++ : _i--){ _results.push(_i); }
+ return _results;
+ }).apply(this);
+ if (this.exclusive) {
+ range.pop();
+ }
+ return [this.makeCode("[" + (range.join(', ')) + "]")];
+ }
+ idt = this.tab + TAB;
+ i = o.scope.freeVariable('i');
+ result = o.scope.freeVariable('results');
+ pre = "\n" + idt + result + " = [];";
+ if (this.fromNum && this.toNum) {
+ o.index = i;
+ body = fragmentsToText(this.compileNode(o));
+ } else {
+ vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : '');
+ cond = "" + this.fromVar + " <= " + this.toVar;
+ body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--";
+ }
+ post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent;
+ hasArgs = function(node) {
+ return node != null ? node.contains(function(n) {
+ return n instanceof Literal && n.value === 'arguments' && !n.asKey;
+ }) : void 0;
+ };
+ if (hasArgs(this.from) || hasArgs(this.to)) {
+ args = ', arguments';
+ }
+ return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")];
+ };
+
+ return Range;
+
+ })(Base);
+
+ exports.Slice = Slice = (function(_super) {
+ __extends(Slice, _super);
+
+ Slice.prototype.children = ['range'];
+
+ function Slice(range) {
+ this.range = range;
+ Slice.__super__.constructor.call(this);
+ }
+
+ Slice.prototype.compileNode = function(o) {
+ var compiled, compiledText, from, fromCompiled, to, toStr, _ref4;
+ _ref4 = this.range, to = _ref4.to, from = _ref4.from;
+ fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')];
+ if (to) {
+ compiled = to.compileToFragments(o, LEVEL_PAREN);
+ compiledText = fragmentsToText(compiled);
+ if (!(!this.range.exclusive && +compiledText === -1)) {
+ toStr = ', ' + (this.range.exclusive ? compiledText : SIMPLENUM.test(compiledText) ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9"));
+ }
+ }
+ return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")];
+ };
+
+ return Slice;
+
+ })(Base);
+
+ exports.Obj = Obj = (function(_super) {
+ __extends(Obj, _super);
+
+ function Obj(props, generated) {
+ this.generated = generated != null ? generated : false;
+ this.objects = this.properties = props || [];
+ }
+
+ Obj.prototype.children = ['properties'];
+
+ Obj.prototype.compileNode = function(o) {
+ var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1;
+ props = this.properties;
+ if (!props.length) {
+ return [this.makeCode(this.front ? '({})' : '{}')];
+ }
+ if (this.generated) {
+ for (_i = 0, _len = props.length; _i < _len; _i++) {
+ node = props[_i];
+ if (node instanceof Value) {
+ node.error('cannot have an implicit value in an implicit object');
+ }
+ }
+ }
+ idt = o.indent += TAB;
+ lastNoncom = this.lastNonComment(this.properties);
+ answer = [];
+ for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) {
+ prop = props[i];
+ join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n';
+ indent = prop instanceof Comment ? '' : idt;
+ if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) {
+ prop.variable.error('Invalid object key');
+ }
+ if (prop instanceof Value && prop["this"]) {
+ prop = new Assign(prop.properties[0].name, prop, 'object');
+ }
+ if (!(prop instanceof Comment)) {
+ if (!(prop instanceof Assign)) {
+ prop = new Assign(prop, prop, 'object');
+ }
+ (prop.variable.base || prop.variable).asKey = true;
+ }
+ if (indent) {
+ answer.push(this.makeCode(indent));
+ }
+ answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP));
+ if (join) {
+ answer.push(this.makeCode(join));
+ }
+ }
+ answer.unshift(this.makeCode("{" + (props.length && '\n')));
+ answer.push(this.makeCode("" + (props.length && '\n' + this.tab) + "}"));
+ if (this.front) {
+ return this.wrapInBraces(answer);
+ } else {
+ return answer;
+ }
+ };
+
+ Obj.prototype.assigns = function(name) {
+ var prop, _i, _len, _ref4;
+ _ref4 = this.properties;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ prop = _ref4[_i];
+ if (prop.assigns(name)) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ return Obj;
+
+ })(Base);
+
+ exports.Arr = Arr = (function(_super) {
+ __extends(Arr, _super);
+
+ function Arr(objs) {
+ this.objects = objs || [];
+ }
+
+ Arr.prototype.children = ['objects'];
+
+ Arr.prototype.compileNode = function(o) {
+ var answer, compiledObjs, fragments, index, obj, _i, _len;
+ if (!this.objects.length) {
+ return [this.makeCode('[]')];
+ }
+ o.indent += TAB;
+ answer = Splat.compileSplattedArray(o, this.objects);
+ if (answer.length) {
+ return answer;
+ }
+ answer = [];
+ compiledObjs = (function() {
+ var _i, _len, _ref4, _results;
+ _ref4 = this.objects;
+ _results = [];
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ obj = _ref4[_i];
+ _results.push(obj.compileToFragments(o, LEVEL_LIST));
+ }
+ return _results;
+ }).call(this);
+ for (index = _i = 0, _len = compiledObjs.length; _i < _len; index = ++_i) {
+ fragments = compiledObjs[index];
+ if (index) {
+ answer.push(this.makeCode(", "));
+ }
+ answer.push.apply(answer, fragments);
+ }
+ if (fragmentsToText(answer).indexOf('\n') >= 0) {
+ answer.unshift(this.makeCode("[\n" + o.indent));
+ answer.push(this.makeCode("\n" + this.tab + "]"));
+ } else {
+ answer.unshift(this.makeCode("["));
+ answer.push(this.makeCode("]"));
+ }
+ return answer;
+ };
+
+ Arr.prototype.assigns = function(name) {
+ var obj, _i, _len, _ref4;
+ _ref4 = this.objects;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ obj = _ref4[_i];
+ if (obj.assigns(name)) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ return Arr;
+
+ })(Base);
+
+ exports.Class = Class = (function(_super) {
+ __extends(Class, _super);
+
+ function Class(variable, parent, body) {
+ this.variable = variable;
+ this.parent = parent;
+ this.body = body != null ? body : new Block;
+ this.boundFuncs = [];
+ this.body.classBody = true;
+ }
+
+ Class.prototype.children = ['variable', 'parent', 'body'];
+
+ Class.prototype.determineName = function() {
+ var decl, tail;
+ if (!this.variable) {
+ return null;
+ }
+ decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value;
+ if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) {
+ this.variable.error("class variable name may not be " + decl);
+ }
+ return decl && (decl = IDENTIFIER.test(decl) && decl);
+ };
+
+ Class.prototype.setContext = function(name) {
+ return this.body.traverseChildren(false, function(node) {
+ if (node.classBody) {
+ return false;
+ }
+ if (node instanceof Literal && node.value === 'this') {
+ return node.value = name;
+ } else if (node instanceof Code) {
+ node.klass = name;
+ if (node.bound) {
+ return node.context = name;
+ }
+ }
+ });
+ };
+
+ Class.prototype.addBoundFunctions = function(o) {
+ var bvar, lhs, _i, _len, _ref4;
+ _ref4 = this.boundFuncs;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ bvar = _ref4[_i];
+ lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o);
+ this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)"));
+ }
+ };
+
+ Class.prototype.addProperties = function(node, name, o) {
+ var assign, base, exprs, func, props;
+ props = node.base.properties.slice(0);
+ exprs = (function() {
+ var _results;
+ _results = [];
+ while (assign = props.shift()) {
+ if (assign instanceof Assign) {
+ base = assign.variable.base;
+ delete assign.context;
+ func = assign.value;
+ if (base.value === 'constructor') {
+ if (this.ctor) {
+ assign.error('cannot define more than one constructor in a class');
+ }
+ if (func.bound) {
+ assign.error('cannot define a constructor as a bound function');
+ }
+ if (func instanceof Code) {
+ assign = this.ctor = func;
+ } else {
+ this.externalCtor = o.scope.freeVariable('class');
+ assign = new Assign(new Literal(this.externalCtor), func);
+ }
+ } else {
+ if (assign.variable["this"]) {
+ func["static"] = true;
+ if (func.bound) {
+ func.context = name;
+ }
+ } else {
+ assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]);
+ if (func instanceof Code && func.bound) {
+ this.boundFuncs.push(base);
+ func.bound = false;
+ }
+ }
+ }
+ }
+ _results.push(assign);
+ }
+ return _results;
+ }).call(this);
+ return compact(exprs);
+ };
+
+ Class.prototype.walkBody = function(name, o) {
+ var _this = this;
+ return this.traverseChildren(false, function(child) {
+ var cont, exps, i, node, _i, _len, _ref4;
+ cont = true;
+ if (child instanceof Class) {
+ return false;
+ }
+ if (child instanceof Block) {
+ _ref4 = exps = child.expressions;
+ for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) {
+ node = _ref4[i];
+ if (node instanceof Value && node.isObject(true)) {
+ cont = false;
+ exps[i] = _this.addProperties(node, name, o);
+ }
+ }
+ child.expressions = exps = flatten(exps);
+ }
+ return cont && !(child instanceof Class);
+ });
+ };
+
+ Class.prototype.hoistDirectivePrologue = function() {
+ var expressions, index, node;
+ index = 0;
+ expressions = this.body.expressions;
+ while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) {
+ ++index;
+ }
+ return this.directives = expressions.splice(0, index);
+ };
+
+ Class.prototype.ensureConstructor = function(name, o) {
+ var missing, ref, superCall;
+ missing = !this.ctor;
+ this.ctor || (this.ctor = new Code);
+ this.ctor.ctor = this.ctor.name = name;
+ this.ctor.klass = null;
+ this.ctor.noReturn = true;
+ if (missing) {
+ if (this.parent) {
+ superCall = new Literal("" + name + ".__super__.constructor.apply(this, arguments)");
+ }
+ if (this.externalCtor) {
+ superCall = new Literal("" + this.externalCtor + ".apply(this, arguments)");
+ }
+ if (superCall) {
+ ref = new Literal(o.scope.freeVariable('ref'));
+ this.ctor.body.unshift(new Assign(ref, superCall));
+ }
+ this.addBoundFunctions(o);
+ if (superCall) {
+ this.ctor.body.push(ref);
+ this.ctor.body.makeReturn();
+ }
+ return this.body.expressions.unshift(this.ctor);
+ } else {
+ return this.addBoundFunctions(o);
+ }
+ };
+
+ Class.prototype.compileNode = function(o) {
+ var call, decl, klass, lname, name, params, _ref4;
+ decl = this.determineName();
+ name = decl || '_Class';
+ if (name.reserved) {
+ name = "_" + name;
+ }
+ lname = new Literal(name);
+ this.hoistDirectivePrologue();
+ this.setContext(name);
+ this.walkBody(name, o);
+ this.ensureConstructor(name, o);
+ this.body.spaced = true;
+ if (!(this.ctor instanceof Code)) {
+ this.body.expressions.unshift(this.ctor);
+ }
+ this.body.expressions.push(lname);
+ (_ref4 = this.body.expressions).unshift.apply(_ref4, this.directives);
+ call = Closure.wrap(this.body);
+ if (this.parent) {
+ this.superClass = new Literal(o.scope.freeVariable('super', false));
+ this.body.expressions.unshift(new Extends(lname, this.superClass));
+ call.args.push(this.parent);
+ params = call.variable.params || call.variable.base.params;
+ params.push(new Param(this.superClass));
+ }
+ klass = new Parens(call, true);
+ if (this.variable) {
+ klass = new Assign(this.variable, klass);
+ }
+ return klass.compileToFragments(o);
+ };
+
+ return Class;
+
+ })(Base);
+
+ exports.Assign = Assign = (function(_super) {
+ __extends(Assign, _super);
+
+ function Assign(variable, value, context, options) {
+ var forbidden, name, _ref4;
+ this.variable = variable;
+ this.value = value;
+ this.context = context;
+ this.param = options && options.param;
+ this.subpattern = options && options.subpattern;
+ forbidden = (_ref4 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0);
+ if (forbidden && this.context !== 'object') {
+ this.variable.error("variable name may not be \"" + name + "\"");
+ }
+ }
+
+ Assign.prototype.children = ['variable', 'value'];
+
+ Assign.prototype.isStatement = function(o) {
+ return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0;
+ };
+
+ Assign.prototype.assigns = function(name) {
+ return this[this.context === 'object' ? 'value' : 'variable'].assigns(name);
+ };
+
+ Assign.prototype.unfoldSoak = function(o) {
+ return unfoldSoak(o, this, 'variable');
+ };
+
+ Assign.prototype.compileNode = function(o) {
+ var answer, compiledName, isValue, match, name, val, varBase, _ref4, _ref5, _ref6, _ref7;
+ if (isValue = this.variable instanceof Value) {
+ if (this.variable.isArray() || this.variable.isObject()) {
+ return this.compilePatternMatch(o);
+ }
+ if (this.variable.isSplice()) {
+ return this.compileSplice(o);
+ }
+ if ((_ref4 = this.context) === '||=' || _ref4 === '&&=' || _ref4 === '?=') {
+ return this.compileConditional(o);
+ }
+ }
+ compiledName = this.variable.compileToFragments(o, LEVEL_LIST);
+ name = fragmentsToText(compiledName);
+ if (!this.context) {
+ varBase = this.variable.unwrapAll();
+ if (!varBase.isAssignable()) {
+ this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned");
+ }
+ if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) {
+ if (this.param) {
+ o.scope.add(name, 'var');
+ } else {
+ o.scope.find(name);
+ }
+ }
+ }
+ if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) {
+ if (match[1]) {
+ this.value.klass = match[1];
+ }
+ this.value.name = (_ref5 = (_ref6 = (_ref7 = match[2]) != null ? _ref7 : match[3]) != null ? _ref6 : match[4]) != null ? _ref5 : match[5];
+ }
+ val = this.value.compileToFragments(o, LEVEL_LIST);
+ if (this.context === 'object') {
+ return compiledName.concat(this.makeCode(": "), val);
+ }
+ answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val);
+ if (o.level <= LEVEL_LIST) {
+ return answer;
+ } else {
+ return this.wrapInBraces(answer);
+ }
+ };
+
+ Assign.prototype.compilePatternMatch = function(o) {
+ var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
+ top = o.level === LEVEL_TOP;
+ value = this.value;
+ objects = this.variable.base.objects;
+ if (!(olen = objects.length)) {
+ code = value.compileToFragments(o);
+ if (o.level >= LEVEL_OP) {
+ return this.wrapInBraces(code);
+ } else {
+ return code;
+ }
+ }
+ isObject = this.variable.isObject();
+ if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) {
+ if (obj instanceof Assign) {
+ _ref4 = obj, (_ref5 = _ref4.variable, idx = _ref5.base), obj = _ref4.value;
+ } else {
+ idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0);
+ }
+ acc = IDENTIFIER.test(idx.unwrap().value || 0);
+ value = new Value(value);
+ value.properties.push(new (acc ? Access : Index)(idx));
+ if (_ref6 = obj.unwrap().value, __indexOf.call(RESERVED, _ref6) >= 0) {
+ obj.error("assignment to a reserved word: " + (obj.compile(o)));
+ }
+ return new Assign(obj, value, null, {
+ param: this.param
+ }).compileToFragments(o, LEVEL_TOP);
+ }
+ vvar = value.compileToFragments(o, LEVEL_LIST);
+ vvarText = fragmentsToText(vvar);
+ assigns = [];
+ splat = false;
+ if (!IDENTIFIER.test(vvarText) || this.variable.assigns(vvarText)) {
+ assigns.push([this.makeCode("" + (ref = o.scope.freeVariable('ref')) + " = ")].concat(__slice.call(vvar)));
+ vvar = [this.makeCode(ref)];
+ vvarText = ref;
+ }
+ for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) {
+ obj = objects[i];
+ idx = i;
+ if (isObject) {
+ if (obj instanceof Assign) {
+ _ref7 = obj, (_ref8 = _ref7.variable, idx = _ref8.base), obj = _ref7.value;
+ } else {
+ if (obj.base instanceof Parens) {
+ _ref9 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref9[0], idx = _ref9[1];
+ } else {
+ idx = obj["this"] ? obj.properties[0].name : obj;
+ }
+ }
+ }
+ if (!splat && obj instanceof Splat) {
+ name = obj.name.unwrap().value;
+ obj = obj.unwrap();
+ val = "" + olen + " <= " + vvarText + ".length ? " + (utility('slice')) + ".call(" + vvarText + ", " + i;
+ if (rest = olen - i - 1) {
+ ivar = o.scope.freeVariable('i');
+ val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])";
+ } else {
+ val += ") : []";
+ }
+ val = new Literal(val);
+ splat = "" + ivar + "++";
+ } else {
+ name = obj.unwrap().value;
+ if (obj instanceof Splat) {
+ obj.error("multiple splats are disallowed in an assignment");
+ }
+ if (typeof idx === 'number') {
+ idx = new Literal(splat || idx);
+ acc = false;
+ } else {
+ acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0);
+ }
+ val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]);
+ }
+ if ((name != null) && __indexOf.call(RESERVED, name) >= 0) {
+ obj.error("assignment to a reserved word: " + (obj.compile(o)));
+ }
+ assigns.push(new Assign(obj, val, null, {
+ param: this.param,
+ subpattern: true
+ }).compileToFragments(o, LEVEL_LIST));
+ }
+ if (!(top || this.subpattern)) {
+ assigns.push(vvar);
+ }
+ fragments = this.joinFragmentArrays(assigns, ', ');
+ if (o.level < LEVEL_LIST) {
+ return fragments;
+ } else {
+ return this.wrapInBraces(fragments);
+ }
+ };
+
+ Assign.prototype.compileConditional = function(o) {
+ var left, right, _ref4;
+ _ref4 = this.variable.cacheReference(o), left = _ref4[0], right = _ref4[1];
+ if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) {
+ this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before");
+ }
+ if (__indexOf.call(this.context, "?") >= 0) {
+ o.isExistentialEquals = true;
+ }
+ return new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o);
+ };
+
+ Assign.prototype.compileSplice = function(o) {
+ var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref4, _ref5, _ref6;
+ _ref4 = this.variable.properties.pop().range, from = _ref4.from, to = _ref4.to, exclusive = _ref4.exclusive;
+ name = this.variable.compile(o);
+ if (from) {
+ _ref5 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref5[0], fromRef = _ref5[1];
+ } else {
+ fromDecl = fromRef = '0';
+ }
+ if (to) {
+ if ((from != null ? from.isSimpleNumber() : void 0) && to.isSimpleNumber()) {
+ to = +to.compile(o) - +fromRef;
+ if (!exclusive) {
+ to += 1;
+ }
+ } else {
+ to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef;
+ if (!exclusive) {
+ to += ' + 1';
+ }
+ }
+ } else {
+ to = "9e9";
+ }
+ _ref6 = this.value.cache(o, LEVEL_LIST), valDef = _ref6[0], valRef = _ref6[1];
+ answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef);
+ if (o.level > LEVEL_TOP) {
+ return this.wrapInBraces(answer);
+ } else {
+ return answer;
+ }
+ };
+
+ return Assign;
+
+ })(Base);
+
+ exports.Code = Code = (function(_super) {
+ __extends(Code, _super);
+
+ function Code(params, body, tag) {
+ this.params = params || [];
+ this.body = body || new Block;
+ this.bound = tag === 'boundfunc';
+ if (this.bound) {
+ this.context = '_this';
+ }
+ }
+
+ Code.prototype.children = ['params', 'body'];
+
+ Code.prototype.isStatement = function() {
+ return !!this.ctor;
+ };
+
+ Code.prototype.jumps = NO;
+
+ Code.prototype.compileNode = function(o) {
+ var answer, code, exprs, i, idt, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref4, _ref5, _ref6, _ref7, _ref8;
+ o.scope = new Scope(o.scope, this.body, this);
+ o.scope.shared = del(o, 'sharedScope');
+ o.indent += TAB;
+ delete o.bare;
+ delete o.isExistentialEquals;
+ params = [];
+ exprs = [];
+ this.eachParamName(function(name) {
+ if (!o.scope.check(name)) {
+ return o.scope.parameter(name);
+ }
+ });
+ _ref4 = this.params;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ param = _ref4[_i];
+ if (!param.splat) {
+ continue;
+ }
+ _ref5 = this.params;
+ for (_j = 0, _len1 = _ref5.length; _j < _len1; _j++) {
+ p = _ref5[_j].name;
+ if (p["this"]) {
+ p = p.properties[0].name;
+ }
+ if (p.value) {
+ o.scope.add(p.value, 'var', true);
+ }
+ }
+ splats = new Assign(new Value(new Arr((function() {
+ var _k, _len2, _ref6, _results;
+ _ref6 = this.params;
+ _results = [];
+ for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) {
+ p = _ref6[_k];
+ _results.push(p.asReference(o));
+ }
+ return _results;
+ }).call(this))), new Value(new Literal('arguments')));
+ break;
+ }
+ _ref6 = this.params;
+ for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) {
+ param = _ref6[_k];
+ if (param.isComplex()) {
+ val = ref = param.asReference(o);
+ if (param.value) {
+ val = new Op('?', ref, param.value);
+ }
+ exprs.push(new Assign(new Value(param.name), val, '=', {
+ param: true
+ }));
+ } else {
+ ref = param;
+ if (param.value) {
+ lit = new Literal(ref.name.value + ' == null');
+ val = new Assign(new Value(param.name), param.value, '=');
+ exprs.push(new If(lit, val));
+ }
+ }
+ if (!splats) {
+ params.push(ref);
+ }
+ }
+ wasEmpty = this.body.isEmpty();
+ if (splats) {
+ exprs.unshift(splats);
+ }
+ if (exprs.length) {
+ (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs);
+ }
+ for (i = _l = 0, _len3 = params.length; _l < _len3; i = ++_l) {
+ p = params[i];
+ params[i] = p.compileToFragments(o);
+ o.scope.parameter(fragmentsToText(params[i]));
+ }
+ uniqs = [];
+ this.eachParamName(function(name, node) {
+ if (__indexOf.call(uniqs, name) >= 0) {
+ node.error("multiple parameters named '" + name + "'");
+ }
+ return uniqs.push(name);
+ });
+ if (!(wasEmpty || this.noReturn)) {
+ this.body.makeReturn();
+ }
+ if (this.bound) {
+ if ((_ref8 = o.scope.parent.method) != null ? _ref8.bound : void 0) {
+ this.bound = this.context = o.scope.parent.method.context;
+ } else if (!this["static"]) {
+ o.scope.parent.assign('_this', 'this');
+ }
+ }
+ idt = o.indent;
+ code = 'function';
+ if (this.ctor) {
+ code += ' ' + this.name;
+ }
+ code += '(';
+ answer = [this.makeCode(code)];
+ for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) {
+ p = params[i];
+ if (i) {
+ answer.push(this.makeCode(", "));
+ }
+ answer.push.apply(answer, p);
+ }
+ answer.push(this.makeCode(') {'));
+ if (!this.body.isEmpty()) {
+ answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab));
+ }
+ answer.push(this.makeCode('}'));
+ if (this.ctor) {
+ return [this.makeCode(this.tab)].concat(__slice.call(answer));
+ }
+ if (this.front || (o.level >= LEVEL_ACCESS)) {
+ return this.wrapInBraces(answer);
+ } else {
+ return answer;
+ }
+ };
+
+ Code.prototype.eachParamName = function(iterator) {
+ var param, _i, _len, _ref4, _results;
+ _ref4 = this.params;
+ _results = [];
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ param = _ref4[_i];
+ _results.push(param.eachName(iterator));
+ }
+ return _results;
+ };
+
+ Code.prototype.traverseChildren = function(crossScope, func) {
+ if (crossScope) {
+ return Code.__super__.traverseChildren.call(this, crossScope, func);
+ }
+ };
+
+ return Code;
+
+ })(Base);
+
+ exports.Param = Param = (function(_super) {
+ __extends(Param, _super);
+
+ function Param(name, value, splat) {
+ var _ref4;
+ this.name = name;
+ this.value = value;
+ this.splat = splat;
+ if (_ref4 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0) {
+ this.name.error("parameter name \"" + name + "\" is not allowed");
+ }
+ }
+
+ Param.prototype.children = ['name', 'value'];
+
+ Param.prototype.compileToFragments = function(o) {
+ return this.name.compileToFragments(o, LEVEL_LIST);
+ };
+
+ Param.prototype.asReference = function(o) {
+ var node;
+ if (this.reference) {
+ return this.reference;
+ }
+ node = this.name;
+ if (node["this"]) {
+ node = node.properties[0].name;
+ if (node.value.reserved) {
+ node = new Literal(o.scope.freeVariable(node.value));
+ }
+ } else if (node.isComplex()) {
+ node = new Literal(o.scope.freeVariable('arg'));
+ }
+ node = new Value(node);
+ if (this.splat) {
+ node = new Splat(node);
+ }
+ return this.reference = node;
+ };
+
+ Param.prototype.isComplex = function() {
+ return this.name.isComplex();
+ };
+
+ Param.prototype.eachName = function(iterator, name) {
+ var atParam, node, obj, _i, _len, _ref4;
+ if (name == null) {
+ name = this.name;
+ }
+ atParam = function(obj) {
+ var node;
+ node = obj.properties[0].name;
+ if (!node.value.reserved) {
+ return iterator(node.value, node);
+ }
+ };
+ if (name instanceof Literal) {
+ return iterator(name.value, name);
+ }
+ if (name instanceof Value) {
+ return atParam(name);
+ }
+ _ref4 = name.objects;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ obj = _ref4[_i];
+ if (obj instanceof Assign) {
+ this.eachName(iterator, obj.value.unwrap());
+ } else if (obj instanceof Splat) {
+ node = obj.name.unwrap();
+ iterator(node.value, node);
+ } else if (obj instanceof Value) {
+ if (obj.isArray() || obj.isObject()) {
+ this.eachName(iterator, obj.base);
+ } else if (obj["this"]) {
+ atParam(obj);
+ } else {
+ iterator(obj.base.value, obj.base);
+ }
+ } else {
+ obj.error("illegal parameter " + (obj.compile()));
+ }
+ }
+ };
+
+ return Param;
+
+ })(Base);
+
+ exports.Splat = Splat = (function(_super) {
+ __extends(Splat, _super);
+
+ Splat.prototype.children = ['name'];
+
+ Splat.prototype.isAssignable = YES;
+
+ function Splat(name) {
+ this.name = name.compile ? name : new Literal(name);
+ }
+
+ Splat.prototype.assigns = function(name) {
+ return this.name.assigns(name);
+ };
+
+ Splat.prototype.compileToFragments = function(o) {
+ return this.name.compileToFragments(o);
+ };
+
+ Splat.prototype.unwrap = function() {
+ return this.name;
+ };
+
+ Splat.compileSplattedArray = function(o, list, apply) {
+ var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len;
+ index = -1;
+ while ((node = list[++index]) && !(node instanceof Splat)) {
+ continue;
+ }
+ if (index >= list.length) {
+ return [];
+ }
+ if (list.length === 1) {
+ node = list[0];
+ fragments = node.compileToFragments(o, LEVEL_LIST);
+ if (apply) {
+ return fragments;
+ }
+ return [].concat(node.makeCode("" + (utility('slice')) + ".call("), fragments, node.makeCode(")"));
+ }
+ args = list.slice(index);
+ for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) {
+ node = args[i];
+ compiledNode = node.compileToFragments(o, LEVEL_LIST);
+ args[i] = node instanceof Splat ? [].concat(node.makeCode("" + (utility('slice')) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]"));
+ }
+ if (index === 0) {
+ node = list[0];
+ concatPart = node.joinFragmentArrays(args.slice(1), ', ');
+ return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")"));
+ }
+ base = (function() {
+ var _j, _len1, _ref4, _results;
+ _ref4 = list.slice(0, index);
+ _results = [];
+ for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
+ node = _ref4[_j];
+ _results.push(node.compileToFragments(o, LEVEL_LIST));
+ }
+ return _results;
+ })();
+ base = list[0].joinFragmentArrays(base, ', ');
+ concatPart = list[index].joinFragmentArrays(args, ', ');
+ return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last(list)).makeCode(")"));
+ };
+
+ return Splat;
+
+ })(Base);
+
+ exports.While = While = (function(_super) {
+ __extends(While, _super);
+
+ function While(condition, options) {
+ this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition;
+ this.guard = options != null ? options.guard : void 0;
+ }
+
+ While.prototype.children = ['condition', 'guard', 'body'];
+
+ While.prototype.isStatement = YES;
+
+ While.prototype.makeReturn = function(res) {
+ if (res) {
+ return While.__super__.makeReturn.apply(this, arguments);
+ } else {
+ this.returns = !this.jumps({
+ loop: true
+ });
+ return this;
+ }
+ };
+
+ While.prototype.addBody = function(body) {
+ this.body = body;
+ return this;
+ };
+
+ While.prototype.jumps = function() {
+ var expressions, node, _i, _len;
+ expressions = this.body.expressions;
+ if (!expressions.length) {
+ return false;
+ }
+ for (_i = 0, _len = expressions.length; _i < _len; _i++) {
+ node = expressions[_i];
+ if (node.jumps({
+ loop: true
+ })) {
+ return node;
+ }
+ }
+ return false;
+ };
+
+ While.prototype.compileNode = function(o) {
+ var answer, body, rvar, set;
+ o.indent += TAB;
+ set = '';
+ body = this.body;
+ if (body.isEmpty()) {
+ body = this.makeCode('');
+ } else {
+ if (this.returns) {
+ body.makeReturn(rvar = o.scope.freeVariable('results'));
+ set = "" + this.tab + rvar + " = [];\n";
+ }
+ if (this.guard) {
+ if (body.expressions.length > 1) {
+ body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
+ } else {
+ if (this.guard) {
+ body = Block.wrap([new If(this.guard, body)]);
+ }
+ }
+ }
+ body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab));
+ }
+ answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}"));
+ if (this.returns) {
+ answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";"));
+ }
+ return answer;
+ };
+
+ return While;
+
+ })(Base);
+
+ exports.Op = Op = (function(_super) {
+ var CONVERSIONS, INVERSIONS;
+
+ __extends(Op, _super);
+
+ function Op(op, first, second, flip) {
+ if (op === 'in') {
+ return new In(first, second);
+ }
+ if (op === 'do') {
+ return this.generateDo(first);
+ }
+ if (op === 'new') {
+ if (first instanceof Call && !first["do"] && !first.isNew) {
+ return first.newInstance();
+ }
+ if (first instanceof Code && first.bound || first["do"]) {
+ first = new Parens(first);
+ }
+ }
+ this.operator = CONVERSIONS[op] || op;
+ this.first = first;
+ this.second = second;
+ this.flip = !!flip;
+ return this;
+ }
+
+ CONVERSIONS = {
+ '==': '===',
+ '!=': '!==',
+ 'of': 'in'
+ };
+
+ INVERSIONS = {
+ '!==': '===',
+ '===': '!=='
+ };
+
+ Op.prototype.children = ['first', 'second'];
+
+ Op.prototype.isSimpleNumber = NO;
+
+ Op.prototype.isUnary = function() {
+ return !this.second;
+ };
+
+ Op.prototype.isComplex = function() {
+ var _ref4;
+ return !(this.isUnary() && ((_ref4 = this.operator) === '+' || _ref4 === '-')) || this.first.isComplex();
+ };
+
+ Op.prototype.isChainable = function() {
+ var _ref4;
+ return (_ref4 = this.operator) === '<' || _ref4 === '>' || _ref4 === '>=' || _ref4 === '<=' || _ref4 === '===' || _ref4 === '!==';
+ };
+
+ Op.prototype.invert = function() {
+ var allInvertable, curr, fst, op, _ref4;
+ if (this.isChainable() && this.first.isChainable()) {
+ allInvertable = true;
+ curr = this;
+ while (curr && curr.operator) {
+ allInvertable && (allInvertable = curr.operator in INVERSIONS);
+ curr = curr.first;
+ }
+ if (!allInvertable) {
+ return new Parens(this).invert();
+ }
+ curr = this;
+ while (curr && curr.operator) {
+ curr.invert = !curr.invert;
+ curr.operator = INVERSIONS[curr.operator];
+ curr = curr.first;
+ }
+ return this;
+ } else if (op = INVERSIONS[this.operator]) {
+ this.operator = op;
+ if (this.first.unwrap() instanceof Op) {
+ this.first.invert();
+ }
+ return this;
+ } else if (this.second) {
+ return new Parens(this).invert();
+ } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref4 = fst.operator) === '!' || _ref4 === 'in' || _ref4 === 'instanceof')) {
+ return fst;
+ } else {
+ return new Op('!', this);
+ }
+ };
+
+ Op.prototype.unfoldSoak = function(o) {
+ var _ref4;
+ return ((_ref4 = this.operator) === '++' || _ref4 === '--' || _ref4 === 'delete') && unfoldSoak(o, this, 'first');
+ };
+
+ Op.prototype.generateDo = function(exp) {
+ var call, func, param, passedParams, ref, _i, _len, _ref4;
+ passedParams = [];
+ func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp;
+ _ref4 = func.params || [];
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ param = _ref4[_i];
+ if (param.value) {
+ passedParams.push(param.value);
+ delete param.value;
+ } else {
+ passedParams.push(param);
+ }
+ }
+ call = new Call(exp, passedParams);
+ call["do"] = true;
+ return call;
+ };
+
+ Op.prototype.compileNode = function(o) {
+ var answer, isChain, _ref4, _ref5;
+ isChain = this.isChainable() && this.first.isChainable();
+ if (!isChain) {
+ this.first.front = this.front;
+ }
+ if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) {
+ this.error('delete operand may not be argument or var');
+ }
+ if (((_ref4 = this.operator) === '--' || _ref4 === '++') && (_ref5 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref5) >= 0)) {
+ this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\"");
+ }
+ if (this.isUnary()) {
+ return this.compileUnary(o);
+ }
+ if (isChain) {
+ return this.compileChain(o);
+ }
+ if (this.operator === '?') {
+ return this.compileExistence(o);
+ }
+ answer = [].concat(this.first.compileToFragments(o, LEVEL_OP), this.makeCode(' ' + this.operator + ' '), this.second.compileToFragments(o, LEVEL_OP));
+ if (o.level <= LEVEL_OP) {
+ return answer;
+ } else {
+ return this.wrapInBraces(answer);
+ }
+ };
+
+ Op.prototype.compileChain = function(o) {
+ var fragments, fst, shared, _ref4;
+ _ref4 = this.first.second.cache(o), this.first.second = _ref4[0], shared = _ref4[1];
+ fst = this.first.compileToFragments(o, LEVEL_OP);
+ fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP));
+ return this.wrapInBraces(fragments);
+ };
+
+ Op.prototype.compileExistence = function(o) {
+ var fst, ref;
+ if (!o.isExistentialEquals && this.first.isComplex()) {
+ ref = new Literal(o.scope.freeVariable('ref'));
+ fst = new Parens(new Assign(ref, this.first));
+ } else {
+ fst = this.first;
+ ref = fst;
+ }
+ return new If(new Existence(fst), ref, {
+ type: 'if'
+ }).addElse(this.second).compileToFragments(o);
+ };
+
+ Op.prototype.compileUnary = function(o) {
+ var op, parts, plusMinus;
+ parts = [];
+ op = this.operator;
+ parts.push([this.makeCode(op)]);
+ if (op === '!' && this.first instanceof Existence) {
+ this.first.negated = !this.first.negated;
+ return this.first.compileToFragments(o);
+ }
+ if (o.level >= LEVEL_ACCESS) {
+ return (new Parens(this)).compileToFragments(o);
+ }
+ plusMinus = op === '+' || op === '-';
+ if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) {
+ parts.push([this.makeCode(' ')]);
+ }
+ if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) {
+ this.first = new Parens(this.first);
+ }
+ parts.push(this.first.compileToFragments(o, LEVEL_OP));
+ if (this.flip) {
+ parts.reverse();
+ }
+ return this.joinFragmentArrays(parts, '');
+ };
+
+ Op.prototype.toString = function(idt) {
+ return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator);
+ };
+
+ return Op;
+
+ })(Base);
+
+ exports.In = In = (function(_super) {
+ __extends(In, _super);
+
+ function In(object, array) {
+ this.object = object;
+ this.array = array;
+ }
+
+ In.prototype.children = ['object', 'array'];
+
+ In.prototype.invert = NEGATE;
+
+ In.prototype.compileNode = function(o) {
+ var hasSplat, obj, _i, _len, _ref4;
+ if (this.array instanceof Value && this.array.isArray()) {
+ _ref4 = this.array.base.objects;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ obj = _ref4[_i];
+ if (!(obj instanceof Splat)) {
+ continue;
+ }
+ hasSplat = true;
+ break;
+ }
+ if (!hasSplat) {
+ return this.compileOrTest(o);
+ }
+ }
+ return this.compileLoopTest(o);
+ };
+
+ In.prototype.compileOrTest = function(o) {
+ var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref4, _ref5, _ref6;
+ if (this.array.base.objects.length === 0) {
+ return [this.makeCode("" + (!!this.negated))];
+ }
+ _ref4 = this.object.cache(o, LEVEL_OP), sub = _ref4[0], ref = _ref4[1];
+ _ref5 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref5[0], cnj = _ref5[1];
+ tests = [];
+ _ref6 = this.array.base.objects;
+ for (i = _i = 0, _len = _ref6.length; _i < _len; i = ++_i) {
+ item = _ref6[i];
+ if (i) {
+ tests.push(this.makeCode(cnj));
+ }
+ tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS));
+ }
+ if (o.level < LEVEL_OP) {
+ return tests;
+ } else {
+ return this.wrapInBraces(tests);
+ }
+ };
+
+ In.prototype.compileLoopTest = function(o) {
+ var fragments, ref, sub, _ref4;
+ _ref4 = this.object.cache(o, LEVEL_LIST), sub = _ref4[0], ref = _ref4[1];
+ fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0')));
+ if (fragmentsToText(sub) === fragmentsToText(ref)) {
+ return fragments;
+ }
+ fragments = sub.concat(this.makeCode(', '), fragments);
+ if (o.level < LEVEL_LIST) {
+ return fragments;
+ } else {
+ return this.wrapInBraces(fragments);
+ }
+ };
+
+ In.prototype.toString = function(idt) {
+ return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : ''));
+ };
+
+ return In;
+
+ })(Base);
+
+ exports.Try = Try = (function(_super) {
+ __extends(Try, _super);
+
+ function Try(attempt, errorVariable, recovery, ensure) {
+ this.attempt = attempt;
+ this.errorVariable = errorVariable;
+ this.recovery = recovery;
+ this.ensure = ensure;
+ }
+
+ Try.prototype.children = ['attempt', 'recovery', 'ensure'];
+
+ Try.prototype.isStatement = YES;
+
+ Try.prototype.jumps = function(o) {
+ var _ref4;
+ return this.attempt.jumps(o) || ((_ref4 = this.recovery) != null ? _ref4.jumps(o) : void 0);
+ };
+
+ Try.prototype.makeReturn = function(res) {
+ if (this.attempt) {
+ this.attempt = this.attempt.makeReturn(res);
+ }
+ if (this.recovery) {
+ this.recovery = this.recovery.makeReturn(res);
+ }
+ return this;
+ };
+
+ Try.prototype.compileNode = function(o) {
+ var catchPart, ensurePart, placeholder, tryPart;
+ o.indent += TAB;
+ tryPart = this.attempt.compileToFragments(o, LEVEL_TOP);
+ catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : [];
+ ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : [];
+ return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart);
+ };
+
+ return Try;
+
+ })(Base);
+
+ exports.Throw = Throw = (function(_super) {
+ __extends(Throw, _super);
+
+ function Throw(expression) {
+ this.expression = expression;
+ }
+
+ Throw.prototype.children = ['expression'];
+
+ Throw.prototype.isStatement = YES;
+
+ Throw.prototype.jumps = NO;
+
+ Throw.prototype.makeReturn = THIS;
+
+ Throw.prototype.compileNode = function(o) {
+ return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";"));
+ };
+
+ return Throw;
+
+ })(Base);
+
+ exports.Existence = Existence = (function(_super) {
+ __extends(Existence, _super);
+
+ function Existence(expression) {
+ this.expression = expression;
+ }
+
+ Existence.prototype.children = ['expression'];
+
+ Existence.prototype.invert = NEGATE;
+
+ Existence.prototype.compileNode = function(o) {
+ var cmp, cnj, code, _ref4;
+ this.expression.front = this.front;
+ code = this.expression.compile(o, LEVEL_OP);
+ if (IDENTIFIER.test(code) && !o.scope.check(code)) {
+ _ref4 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref4[0], cnj = _ref4[1];
+ code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null";
+ } else {
+ code = "" + code + " " + (this.negated ? '==' : '!=') + " null";
+ }
+ return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")];
+ };
+
+ return Existence;
+
+ })(Base);
+
+ exports.Parens = Parens = (function(_super) {
+ __extends(Parens, _super);
+
+ function Parens(body) {
+ this.body = body;
+ }
+
+ Parens.prototype.children = ['body'];
+
+ Parens.prototype.unwrap = function() {
+ return this.body;
+ };
+
+ Parens.prototype.isComplex = function() {
+ return this.body.isComplex();
+ };
+
+ Parens.prototype.compileNode = function(o) {
+ var bare, expr, fragments;
+ expr = this.body.unwrap();
+ if (expr instanceof Value && expr.isAtomic()) {
+ expr.front = this.front;
+ return expr.compileToFragments(o);
+ }
+ fragments = expr.compileToFragments(o, LEVEL_PAREN);
+ bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns));
+ if (bare) {
+ return fragments;
+ } else {
+ return this.wrapInBraces(fragments);
+ }
+ };
+
+ return Parens;
+
+ })(Base);
+
+ exports.For = For = (function(_super) {
+ __extends(For, _super);
+
+ function For(body, source) {
+ var _ref4;
+ this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index;
+ this.body = Block.wrap([body]);
+ this.own = !!source.own;
+ this.object = !!source.object;
+ if (this.object) {
+ _ref4 = [this.index, this.name], this.name = _ref4[0], this.index = _ref4[1];
+ }
+ if (this.index instanceof Value) {
+ this.index.error('index cannot be a pattern matching expression');
+ }
+ this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length;
+ this.pattern = this.name instanceof Value;
+ if (this.range && this.index) {
+ this.index.error('indexes do not apply to range loops');
+ }
+ if (this.range && this.pattern) {
+ this.name.error('cannot pattern match over range loops');
+ }
+ if (this.own && !this.object) {
+ this.index.error('cannot use own with for-in');
+ }
+ this.returns = false;
+ }
+
+ For.prototype.children = ['body', 'source', 'guard', 'step'];
+
+ For.prototype.compileNode = function(o) {
+ var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref4, _ref5;
+ body = Block.wrap([this.body]);
+ lastJumps = (_ref4 = last(body.expressions)) != null ? _ref4.jumps() : void 0;
+ if (lastJumps && lastJumps instanceof Return) {
+ this.returns = false;
+ }
+ source = this.range ? this.source.base : this.source;
+ scope = o.scope;
+ name = this.name && (this.name.compile(o, LEVEL_LIST));
+ index = this.index && (this.index.compile(o, LEVEL_LIST));
+ if (name && !this.pattern) {
+ scope.find(name);
+ }
+ if (index) {
+ scope.find(index);
+ }
+ if (this.returns) {
+ rvar = scope.freeVariable('results');
+ }
+ ivar = (this.object && index) || scope.freeVariable('i');
+ kvar = (this.range && name) || index || ivar;
+ kvarAssign = kvar !== ivar ? "" + kvar + " = " : "";
+ if (this.step && !this.range) {
+ _ref5 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref5[0], stepVar = _ref5[1];
+ stepNum = stepVar.match(SIMPLENUM);
+ }
+ if (this.pattern) {
+ name = ivar;
+ }
+ varPart = '';
+ guardPart = '';
+ defPart = '';
+ idt1 = this.tab + TAB;
+ if (this.range) {
+ forPartFragments = source.compileToFragments(merge(o, {
+ index: ivar,
+ name: name,
+ step: this.step
+ }));
+ } else {
+ svar = this.source.compile(o, LEVEL_LIST);
+ if ((name || this.own) && !IDENTIFIER.test(svar)) {
+ defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n";
+ svar = ref;
+ }
+ if (name && !this.pattern) {
+ namePart = "" + name + " = " + svar + "[" + kvar + "]";
+ }
+ if (!this.object) {
+ if (step !== stepVar) {
+ defPart += "" + this.tab + step + ";\n";
+ }
+ if (!(this.step && stepNum && (down =
<TRUNCATED>
[18/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/requirejs/bin/r.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/requirejs/bin/r.js b/blackberry10/node_modules/jasmine-node/node_modules/requirejs/bin/r.js
new file mode 100755
index 0000000..c396de4
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/requirejs/bin/r.js
@@ -0,0 +1,25757 @@
+#!/usr/bin/env node
+/**
+ * @license r.js 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/jrburke/requirejs for details
+ */
+
+/*
+ * This is a bootstrap script to allow running RequireJS in the command line
+ * in either a Java/Rhino or Node environment. It is modified by the top-level
+ * dist.js file to inject other files to completely enable this file. It is
+ * the shell of the r.js file.
+ */
+
+/*jslint evil: true, nomen: true, sloppy: true */
+/*global readFile: true, process: false, Packages: false, print: false,
+console: false, java: false, module: false, requirejsVars, navigator,
+document, importScripts, self, location, Components, FileUtils */
+
+var requirejs, require, define, xpcUtil;
+(function (console, args, readFileFunc) {
+ var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
+ nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci,
+ version = '2.1.8',
+ jsSuffixRegExp = /\.js$/,
+ commandOption = '',
+ useLibLoaded = {},
+ //Used by jslib/rhino/args.js
+ rhinoArgs = args,
+ //Used by jslib/xpconnect/args.js
+ xpconnectArgs = args,
+ readFile = typeof readFileFunc !== 'undefined' ? readFileFunc : null;
+
+ function showHelp() {
+ console.log('See https://github.com/jrburke/r.js for usage.');
+ }
+
+ if ((typeof navigator !== 'undefined' && typeof document !== 'undefined') ||
+ (typeof importScripts !== 'undefined' && typeof self !== 'undefined')) {
+ env = 'browser';
+
+ readFile = function (path) {
+ return fs.readFileSync(path, 'utf8');
+ };
+
+ exec = function (string) {
+ return eval(string);
+ };
+
+ exists = function () {
+ console.log('x.js exists not applicable in browser env');
+ return false;
+ };
+
+ } else if (typeof Packages !== 'undefined') {
+ env = 'rhino';
+
+ fileName = args[0];
+
+ if (fileName && fileName.indexOf('-') === 0) {
+ commandOption = fileName.substring(1);
+ fileName = args[1];
+ }
+
+ //Set up execution context.
+ rhinoContext = Packages.org.mozilla.javascript.ContextFactory.getGlobal().enterContext();
+
+ exec = function (string, name) {
+ return rhinoContext.evaluateString(this, string, name, 0, null);
+ };
+
+ exists = function (fileName) {
+ return (new java.io.File(fileName)).exists();
+ };
+
+ //Define a console.log for easier logging. Don't
+ //get fancy though.
+ if (typeof console === 'undefined') {
+ console = {
+ log: function () {
+ print.apply(undefined, arguments);
+ }
+ };
+ }
+ } else if (typeof process !== 'undefined' && process.versions && !!process.versions.node) {
+ env = 'node';
+
+ //Get the fs module via Node's require before it
+ //gets replaced. Used in require/node.js
+ fs = require('fs');
+ vm = require('vm');
+ path = require('path');
+ //In Node 0.7+ existsSync is on fs.
+ existsForNode = fs.existsSync || path.existsSync;
+
+ nodeRequire = require;
+ nodeDefine = define;
+ reqMain = require.main;
+
+ //Temporarily hide require and define to allow require.js to define
+ //them.
+ require = undefined;
+ define = undefined;
+
+ readFile = function (path) {
+ return fs.readFileSync(path, 'utf8');
+ };
+
+ exec = function (string, name) {
+ return vm.runInThisContext(this.requirejsVars.require.makeNodeWrapper(string),
+ name ? fs.realpathSync(name) : '');
+ };
+
+ exists = function (fileName) {
+ return existsForNode(fileName);
+ };
+
+
+ fileName = process.argv[2];
+
+ if (fileName && fileName.indexOf('-') === 0) {
+ commandOption = fileName.substring(1);
+ fileName = process.argv[3];
+ }
+ } else if (typeof Components !== 'undefined' && Components.classes && Components.interfaces) {
+ env = 'xpconnect';
+
+ Components.utils['import']('resource://gre/modules/FileUtils.jsm');
+ Cc = Components.classes;
+ Ci = Components.interfaces;
+
+ fileName = args[0];
+
+ if (fileName && fileName.indexOf('-') === 0) {
+ commandOption = fileName.substring(1);
+ fileName = args[1];
+ }
+
+ xpcUtil = {
+ cwd: function () {
+ return FileUtils.getFile("CurWorkD", []).path;
+ },
+
+ //Remove . and .. from paths, normalize on front slashes
+ normalize: function (path) {
+ //There has to be an easier way to do this.
+ var i, part, ary,
+ firstChar = path.charAt(0);
+
+ if (firstChar !== '/' &&
+ firstChar !== '\\' &&
+ path.indexOf(':') === -1) {
+ //A relative path. Use the current working directory.
+ path = xpcUtil.cwd() + '/' + path;
+ }
+
+ ary = path.replace(/\\/g, '/').split('/');
+
+ for (i = 0; i < ary.length; i += 1) {
+ part = ary[i];
+ if (part === '.') {
+ ary.splice(i, 1);
+ i -= 1;
+ } else if (part === '..') {
+ ary.splice(i - 1, 2);
+ i -= 2;
+ }
+ }
+ return ary.join('/');
+ },
+
+ xpfile: function (path) {
+ try {
+ return new FileUtils.File(xpcUtil.normalize(path));
+ } catch (e) {
+ throw new Error(path + ' failed: ' + e);
+ }
+ },
+
+ readFile: function (/*String*/path, /*String?*/encoding) {
+ //A file read function that can deal with BOMs
+ encoding = encoding || "utf-8";
+
+ var inStream, convertStream,
+ readData = {},
+ fileObj = xpcUtil.xpfile(path);
+
+ //XPCOM, you so crazy
+ try {
+ inStream = Cc['@mozilla.org/network/file-input-stream;1']
+ .createInstance(Ci.nsIFileInputStream);
+ inStream.init(fileObj, 1, 0, false);
+
+ convertStream = Cc['@mozilla.org/intl/converter-input-stream;1']
+ .createInstance(Ci.nsIConverterInputStream);
+ convertStream.init(inStream, encoding, inStream.available(),
+ Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);
+
+ convertStream.readString(inStream.available(), readData);
+ return readData.value;
+ } catch (e) {
+ throw new Error((fileObj && fileObj.path || '') + ': ' + e);
+ } finally {
+ if (convertStream) {
+ convertStream.close();
+ }
+ if (inStream) {
+ inStream.close();
+ }
+ }
+ }
+ };
+
+ readFile = xpcUtil.readFile;
+
+ exec = function (string) {
+ return eval(string);
+ };
+
+ exists = function (fileName) {
+ return xpcUtil.xpfile(fileName).exists();
+ };
+
+ //Define a console.log for easier logging. Don't
+ //get fancy though.
+ if (typeof console === 'undefined') {
+ console = {
+ log: function () {
+ print.apply(undefined, arguments);
+ }
+ };
+ }
+ }
+
+ /** vim: et:ts=4:sw=4:sts=4
+ * @license RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/jrburke/requirejs for details
+ */
+//Not using strict: uneven strict support in browsers, #392, and causes
+//problems with requirejs.exec()/transpiler plugins that may not be strict.
+/*jslint regexp: true, nomen: true, sloppy: true */
+/*global window, navigator, document, importScripts, setTimeout, opera */
+
+
+(function (global) {
+ var req, s, head, baseElement, dataMain, src,
+ interactiveScript, currentlyAddingScript, mainScript, subPath,
+ version = '2.1.8',
+ commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
+ cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
+ jsSuffixRegExp = /\.js$/,
+ currDirRegExp = /^\.\//,
+ op = Object.prototype,
+ ostring = op.toString,
+ hasOwn = op.hasOwnProperty,
+ ap = Array.prototype,
+ apsp = ap.splice,
+ isBrowser = !!(typeof window !== 'undefined' && navigator && window.document),
+ isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
+ //PS3 indicates loaded and complete, but need to wait for complete
+ //specifically. Sequence is 'loading', 'loaded', execution,
+ // then 'complete'. The UA check is unfortunate, but not sure how
+ //to feature test w/o causing perf issues.
+ readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?
+ /^complete$/ : /^(complete|loaded)$/,
+ defContextName = '_',
+ //Oh the tragedy, detecting opera. See the usage of isOpera for reason.
+ isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',
+ contexts = {},
+ cfg = {},
+ globalDefQueue = [],
+ useInteractive = false;
+
+ function isFunction(it) {
+ return ostring.call(it) === '[object Function]';
+ }
+
+ function isArray(it) {
+ return ostring.call(it) === '[object Array]';
+ }
+
+ /**
+ * Helper function for iterating over an array. If the func returns
+ * a true value, it will break out of the loop.
+ */
+ function each(ary, func) {
+ if (ary) {
+ var i;
+ for (i = 0; i < ary.length; i += 1) {
+ if (ary[i] && func(ary[i], i, ary)) {
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Helper function for iterating over an array backwards. If the func
+ * returns a true value, it will break out of the loop.
+ */
+ function eachReverse(ary, func) {
+ if (ary) {
+ var i;
+ for (i = ary.length - 1; i > -1; i -= 1) {
+ if (ary[i] && func(ary[i], i, ary)) {
+ break;
+ }
+ }
+ }
+ }
+
+ function hasProp(obj, prop) {
+ return hasOwn.call(obj, prop);
+ }
+
+ function getOwn(obj, prop) {
+ return hasProp(obj, prop) && obj[prop];
+ }
+
+ /**
+ * Cycles over properties in an object and calls a function for each
+ * property value. If the function returns a truthy value, then the
+ * iteration is stopped.
+ */
+ function eachProp(obj, func) {
+ var prop;
+ for (prop in obj) {
+ if (hasProp(obj, prop)) {
+ if (func(obj[prop], prop)) {
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Simple function to mix in properties from source into target,
+ * but only if target does not already have a property of the same name.
+ */
+ function mixin(target, source, force, deepStringMixin) {
+ if (source) {
+ eachProp(source, function (value, prop) {
+ if (force || !hasProp(target, prop)) {
+ if (deepStringMixin && typeof value !== 'string') {
+ if (!target[prop]) {
+ target[prop] = {};
+ }
+ mixin(target[prop], value, force, deepStringMixin);
+ } else {
+ target[prop] = value;
+ }
+ }
+ });
+ }
+ return target;
+ }
+
+ //Similar to Function.prototype.bind, but the 'this' object is specified
+ //first, since it is easier to read/figure out what 'this' will be.
+ function bind(obj, fn) {
+ return function () {
+ return fn.apply(obj, arguments);
+ };
+ }
+
+ function scripts() {
+ return document.getElementsByTagName('script');
+ }
+
+ function defaultOnError(err) {
+ throw err;
+ }
+
+ //Allow getting a global that expressed in
+ //dot notation, like 'a.b.c'.
+ function getGlobal(value) {
+ if (!value) {
+ return value;
+ }
+ var g = global;
+ each(value.split('.'), function (part) {
+ g = g[part];
+ });
+ return g;
+ }
+
+ /**
+ * Constructs an error with a pointer to an URL with more information.
+ * @param {String} id the error ID that maps to an ID on a web page.
+ * @param {String} message human readable error.
+ * @param {Error} [err] the original error, if there is one.
+ *
+ * @returns {Error}
+ */
+ function makeError(id, msg, err, requireModules) {
+ var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
+ e.requireType = id;
+ e.requireModules = requireModules;
+ if (err) {
+ e.originalError = err;
+ }
+ return e;
+ }
+
+ if (typeof define !== 'undefined') {
+ //If a define is already in play via another AMD loader,
+ //do not overwrite.
+ return;
+ }
+
+ if (typeof requirejs !== 'undefined') {
+ if (isFunction(requirejs)) {
+ //Do not overwrite and existing requirejs instance.
+ return;
+ }
+ cfg = requirejs;
+ requirejs = undefined;
+ }
+
+ //Allow for a require config object
+ if (typeof require !== 'undefined' && !isFunction(require)) {
+ //assume it is a config object.
+ cfg = require;
+ require = undefined;
+ }
+
+ function newContext(contextName) {
+ var inCheckLoaded, Module, context, handlers,
+ checkLoadedTimeoutId,
+ config = {
+ //Defaults. Do not set a default for map
+ //config to speed up normalize(), which
+ //will run faster if there is no default.
+ waitSeconds: 7,
+ baseUrl: './',
+ paths: {},
+ pkgs: {},
+ shim: {},
+ config: {}
+ },
+ registry = {},
+ //registry of just enabled modules, to speed
+ //cycle breaking code when lots of modules
+ //are registered, but not activated.
+ enabledRegistry = {},
+ undefEvents = {},
+ defQueue = [],
+ defined = {},
+ urlFetched = {},
+ requireCounter = 1,
+ unnormalizedCounter = 1;
+
+ /**
+ * Trims the . and .. from an array of path segments.
+ * It will keep a leading path segment if a .. will become
+ * the first path segment, to help with module name lookups,
+ * which act like paths, but can be remapped. But the end result,
+ * all paths that use this function should look normalized.
+ * NOTE: this method MODIFIES the input array.
+ * @param {Array} ary the array of path segments.
+ */
+ function trimDots(ary) {
+ var i, part;
+ for (i = 0; ary[i]; i += 1) {
+ part = ary[i];
+ if (part === '.') {
+ ary.splice(i, 1);
+ i -= 1;
+ } else if (part === '..') {
+ if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
+ //End of the line. Keep at least one non-dot
+ //path segment at the front so it can be mapped
+ //correctly to disk. Otherwise, there is likely
+ //no path mapping for a path starting with '..'.
+ //This can still fail, but catches the most reasonable
+ //uses of ..
+ break;
+ } else if (i > 0) {
+ ary.splice(i - 1, 2);
+ i -= 2;
+ }
+ }
+ }
+ }
+
+ /**
+ * Given a relative module name, like ./something, normalize it to
+ * a real name that can be mapped to a path.
+ * @param {String} name the relative name
+ * @param {String} baseName a real name that the name arg is relative
+ * to.
+ * @param {Boolean} applyMap apply the map config to the value. Should
+ * only be done if this normalization is for a dependency ID.
+ * @returns {String} normalized name
+ */
+ function normalize(name, baseName, applyMap) {
+ var pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment,
+ foundMap, foundI, foundStarMap, starI,
+ baseParts = baseName && baseName.split('/'),
+ normalizedBaseParts = baseParts,
+ map = config.map,
+ starMap = map && map['*'];
+
+ //Adjust any relative paths.
+ if (name && name.charAt(0) === '.') {
+ //If have a base name, try to normalize against it,
+ //otherwise, assume it is a top-level require that will
+ //be relative to baseUrl in the end.
+ if (baseName) {
+ if (getOwn(config.pkgs, baseName)) {
+ //If the baseName is a package name, then just treat it as one
+ //name to concat the name with.
+ normalizedBaseParts = baseParts = [baseName];
+ } else {
+ //Convert baseName to array, and lop off the last part,
+ //so that . matches that 'directory' and not name of the baseName's
+ //module. For instance, baseName of 'one/two/three', maps to
+ //'one/two/three.js', but we want the directory, 'one/two' for
+ //this normalization.
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
+ }
+
+ name = normalizedBaseParts.concat(name.split('/'));
+ trimDots(name);
+
+ //Some use of packages may use a . path to reference the
+ //'main' module name, so normalize for that.
+ pkgConfig = getOwn(config.pkgs, (pkgName = name[0]));
+ name = name.join('/');
+ if (pkgConfig && name === pkgName + '/' + pkgConfig.main) {
+ name = pkgName;
+ }
+ } else if (name.indexOf('./') === 0) {
+ // No baseName, so this is ID is resolved relative
+ // to baseUrl, pull off the leading dot.
+ name = name.substring(2);
+ }
+ }
+
+ //Apply map config if available.
+ if (applyMap && map && (baseParts || starMap)) {
+ nameParts = name.split('/');
+
+ for (i = nameParts.length; i > 0; i -= 1) {
+ nameSegment = nameParts.slice(0, i).join('/');
+
+ if (baseParts) {
+ //Find the longest baseName segment match in the config.
+ //So, do joins on the biggest to smallest lengths of baseParts.
+ for (j = baseParts.length; j > 0; j -= 1) {
+ mapValue = getOwn(map, baseParts.slice(0, j).join('/'));
+
+ //baseName segment has config, find if it has one for
+ //this name.
+ if (mapValue) {
+ mapValue = getOwn(mapValue, nameSegment);
+ if (mapValue) {
+ //Match, update name to the new value.
+ foundMap = mapValue;
+ foundI = i;
+ break;
+ }
+ }
+ }
+ }
+
+ if (foundMap) {
+ break;
+ }
+
+ //Check for a star map match, but just hold on to it,
+ //if there is a shorter segment match later in a matching
+ //config, then favor over this star map.
+ if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {
+ foundStarMap = getOwn(starMap, nameSegment);
+ starI = i;
+ }
+ }
+
+ if (!foundMap && foundStarMap) {
+ foundMap = foundStarMap;
+ foundI = starI;
+ }
+
+ if (foundMap) {
+ nameParts.splice(0, foundI, foundMap);
+ name = nameParts.join('/');
+ }
+ }
+
+ return name;
+ }
+
+ function removeScript(name) {
+ if (isBrowser) {
+ each(scripts(), function (scriptNode) {
+ if (scriptNode.getAttribute('data-requiremodule') === name &&
+ scriptNode.getAttribute('data-requirecontext') === context.contextName) {
+ scriptNode.parentNode.removeChild(scriptNode);
+ return true;
+ }
+ });
+ }
+ }
+
+ function hasPathFallback(id) {
+ var pathConfig = getOwn(config.paths, id);
+ if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
+ removeScript(id);
+ //Pop off the first array value, since it failed, and
+ //retry
+ pathConfig.shift();
+ context.require.undef(id);
+ context.require([id]);
+ return true;
+ }
+ }
+
+ //Turns a plugin!resource to [plugin, resource]
+ //with the plugin being undefined if the name
+ //did not have a plugin prefix.
+ function splitPrefix(name) {
+ var prefix,
+ index = name ? name.indexOf('!') : -1;
+ if (index > -1) {
+ prefix = name.substring(0, index);
+ name = name.substring(index + 1, name.length);
+ }
+ return [prefix, name];
+ }
+
+ /**
+ * Creates a module mapping that includes plugin prefix, module
+ * name, and path. If parentModuleMap is provided it will
+ * also normalize the name via require.normalize()
+ *
+ * @param {String} name the module name
+ * @param {String} [parentModuleMap] parent module map
+ * for the module name, used to resolve relative names.
+ * @param {Boolean} isNormalized: is the ID already normalized.
+ * This is true if this call is done for a define() module ID.
+ * @param {Boolean} applyMap: apply the map config to the ID.
+ * Should only be true if this map is for a dependency.
+ *
+ * @returns {Object}
+ */
+ function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
+ var url, pluginModule, suffix, nameParts,
+ prefix = null,
+ parentName = parentModuleMap ? parentModuleMap.name : null,
+ originalName = name,
+ isDefine = true,
+ normalizedName = '';
+
+ //If no name, then it means it is a require call, generate an
+ //internal name.
+ if (!name) {
+ isDefine = false;
+ name = '_@r' + (requireCounter += 1);
+ }
+
+ nameParts = splitPrefix(name);
+ prefix = nameParts[0];
+ name = nameParts[1];
+
+ if (prefix) {
+ prefix = normalize(prefix, parentName, applyMap);
+ pluginModule = getOwn(defined, prefix);
+ }
+
+ //Account for relative paths if there is a base name.
+ if (name) {
+ if (prefix) {
+ if (pluginModule && pluginModule.normalize) {
+ //Plugin is loaded, use its normalize method.
+ normalizedName = pluginModule.normalize(name, function (name) {
+ return normalize(name, parentName, applyMap);
+ });
+ } else {
+ normalizedName = normalize(name, parentName, applyMap);
+ }
+ } else {
+ //A regular module.
+ normalizedName = normalize(name, parentName, applyMap);
+
+ //Normalized name may be a plugin ID due to map config
+ //application in normalize. The map config values must
+ //already be normalized, so do not need to redo that part.
+ nameParts = splitPrefix(normalizedName);
+ prefix = nameParts[0];
+ normalizedName = nameParts[1];
+ isNormalized = true;
+
+ url = context.nameToUrl(normalizedName);
+ }
+ }
+
+ //If the id is a plugin id that cannot be determined if it needs
+ //normalization, stamp it with a unique ID so two matching relative
+ //ids that may conflict can be separate.
+ suffix = prefix && !pluginModule && !isNormalized ?
+ '_unnormalized' + (unnormalizedCounter += 1) :
+ '';
+
+ return {
+ prefix: prefix,
+ name: normalizedName,
+ parentMap: parentModuleMap,
+ unnormalized: !!suffix,
+ url: url,
+ originalName: originalName,
+ isDefine: isDefine,
+ id: (prefix ?
+ prefix + '!' + normalizedName :
+ normalizedName) + suffix
+ };
+ }
+
+ function getModule(depMap) {
+ var id = depMap.id,
+ mod = getOwn(registry, id);
+
+ if (!mod) {
+ mod = registry[id] = new context.Module(depMap);
+ }
+
+ return mod;
+ }
+
+ function on(depMap, name, fn) {
+ var id = depMap.id,
+ mod = getOwn(registry, id);
+
+ if (hasProp(defined, id) &&
+ (!mod || mod.defineEmitComplete)) {
+ if (name === 'defined') {
+ fn(defined[id]);
+ }
+ } else {
+ mod = getModule(depMap);
+ if (mod.error && name === 'error') {
+ fn(mod.error);
+ } else {
+ mod.on(name, fn);
+ }
+ }
+ }
+
+ function onError(err, errback) {
+ var ids = err.requireModules,
+ notified = false;
+
+ if (errback) {
+ errback(err);
+ } else {
+ each(ids, function (id) {
+ var mod = getOwn(registry, id);
+ if (mod) {
+ //Set error on module, so it skips timeout checks.
+ mod.error = err;
+ if (mod.events.error) {
+ notified = true;
+ mod.emit('error', err);
+ }
+ }
+ });
+
+ if (!notified) {
+ req.onError(err);
+ }
+ }
+ }
+
+ /**
+ * Internal method to transfer globalQueue items to this context's
+ * defQueue.
+ */
+ function takeGlobalQueue() {
+ //Push all the globalDefQueue items into the context's defQueue
+ if (globalDefQueue.length) {
+ //Array splice in the values since the context code has a
+ //local var ref to defQueue, so cannot just reassign the one
+ //on context.
+ apsp.apply(defQueue,
+ [defQueue.length - 1, 0].concat(globalDefQueue));
+ globalDefQueue = [];
+ }
+ }
+
+ handlers = {
+ 'require': function (mod) {
+ if (mod.require) {
+ return mod.require;
+ } else {
+ return (mod.require = context.makeRequire(mod.map));
+ }
+ },
+ 'exports': function (mod) {
+ mod.usingExports = true;
+ if (mod.map.isDefine) {
+ if (mod.exports) {
+ return mod.exports;
+ } else {
+ return (mod.exports = defined[mod.map.id] = {});
+ }
+ }
+ },
+ 'module': function (mod) {
+ if (mod.module) {
+ return mod.module;
+ } else {
+ return (mod.module = {
+ id: mod.map.id,
+ uri: mod.map.url,
+ config: function () {
+ var c,
+ pkg = getOwn(config.pkgs, mod.map.id);
+ // For packages, only support config targeted
+ // at the main module.
+ c = pkg ? getOwn(config.config, mod.map.id + '/' + pkg.main) :
+ getOwn(config.config, mod.map.id);
+ return c || {};
+ },
+ exports: defined[mod.map.id]
+ });
+ }
+ }
+ };
+
+ function cleanRegistry(id) {
+ //Clean up machinery used for waiting modules.
+ delete registry[id];
+ delete enabledRegistry[id];
+ }
+
+ function breakCycle(mod, traced, processed) {
+ var id = mod.map.id;
+
+ if (mod.error) {
+ mod.emit('error', mod.error);
+ } else {
+ traced[id] = true;
+ each(mod.depMaps, function (depMap, i) {
+ var depId = depMap.id,
+ dep = getOwn(registry, depId);
+
+ //Only force things that have not completed
+ //being defined, so still in the registry,
+ //and only if it has not been matched up
+ //in the module already.
+ if (dep && !mod.depMatched[i] && !processed[depId]) {
+ if (getOwn(traced, depId)) {
+ mod.defineDep(i, defined[depId]);
+ mod.check(); //pass false?
+ } else {
+ breakCycle(dep, traced, processed);
+ }
+ }
+ });
+ processed[id] = true;
+ }
+ }
+
+ function checkLoaded() {
+ var map, modId, err, usingPathFallback,
+ waitInterval = config.waitSeconds * 1000,
+ //It is possible to disable the wait interval by using waitSeconds of 0.
+ expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
+ noLoads = [],
+ reqCalls = [],
+ stillLoading = false,
+ needCycleCheck = true;
+
+ //Do not bother if this call was a result of a cycle break.
+ if (inCheckLoaded) {
+ return;
+ }
+
+ inCheckLoaded = true;
+
+ //Figure out the state of all the modules.
+ eachProp(enabledRegistry, function (mod) {
+ map = mod.map;
+ modId = map.id;
+
+ //Skip things that are not enabled or in error state.
+ if (!mod.enabled) {
+ return;
+ }
+
+ if (!map.isDefine) {
+ reqCalls.push(mod);
+ }
+
+ if (!mod.error) {
+ //If the module should be executed, and it has not
+ //been inited and time is up, remember it.
+ if (!mod.inited && expired) {
+ if (hasPathFallback(modId)) {
+ usingPathFallback = true;
+ stillLoading = true;
+ } else {
+ noLoads.push(modId);
+ removeScript(modId);
+ }
+ } else if (!mod.inited && mod.fetched && map.isDefine) {
+ stillLoading = true;
+ if (!map.prefix) {
+ //No reason to keep looking for unfinished
+ //loading. If the only stillLoading is a
+ //plugin resource though, keep going,
+ //because it may be that a plugin resource
+ //is waiting on a non-plugin cycle.
+ return (needCycleCheck = false);
+ }
+ }
+ }
+ });
+
+ if (expired && noLoads.length) {
+ //If wait time expired, throw error of unloaded modules.
+ err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);
+ err.contextName = context.contextName;
+ return onError(err);
+ }
+
+ //Not expired, check for a cycle.
+ if (needCycleCheck) {
+ each(reqCalls, function (mod) {
+ breakCycle(mod, {}, {});
+ });
+ }
+
+ //If still waiting on loads, and the waiting load is something
+ //other than a plugin resource, or there are still outstanding
+ //scripts, then just try back later.
+ if ((!expired || usingPathFallback) && stillLoading) {
+ //Something is still waiting to load. Wait for it, but only
+ //if a timeout is not already in effect.
+ if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
+ checkLoadedTimeoutId = setTimeout(function () {
+ checkLoadedTimeoutId = 0;
+ checkLoaded();
+ }, 50);
+ }
+ }
+
+ inCheckLoaded = false;
+ }
+
+ Module = function (map) {
+ this.events = getOwn(undefEvents, map.id) || {};
+ this.map = map;
+ this.shim = getOwn(config.shim, map.id);
+ this.depExports = [];
+ this.depMaps = [];
+ this.depMatched = [];
+ this.pluginMaps = {};
+ this.depCount = 0;
+
+ /* this.exports this.factory
+ this.depMaps = [],
+ this.enabled, this.fetched
+ */
+ };
+
+ Module.prototype = {
+ init: function (depMaps, factory, errback, options) {
+ options = options || {};
+
+ //Do not do more inits if already done. Can happen if there
+ //are multiple define calls for the same module. That is not
+ //a normal, common case, but it is also not unexpected.
+ if (this.inited) {
+ return;
+ }
+
+ this.factory = factory;
+
+ if (errback) {
+ //Register for errors on this module.
+ this.on('error', errback);
+ } else if (this.events.error) {
+ //If no errback already, but there are error listeners
+ //on this module, set up an errback to pass to the deps.
+ errback = bind(this, function (err) {
+ this.emit('error', err);
+ });
+ }
+
+ //Do a copy of the dependency array, so that
+ //source inputs are not modified. For example
+ //"shim" deps are passed in here directly, and
+ //doing a direct modification of the depMaps array
+ //would affect that config.
+ this.depMaps = depMaps && depMaps.slice(0);
+
+ this.errback = errback;
+
+ //Indicate this module has be initialized
+ this.inited = true;
+
+ this.ignore = options.ignore;
+
+ //Could have option to init this module in enabled mode,
+ //or could have been previously marked as enabled. However,
+ //the dependencies are not known until init is called. So
+ //if enabled previously, now trigger dependencies as enabled.
+ if (options.enabled || this.enabled) {
+ //Enable this module and dependencies.
+ //Will call this.check()
+ this.enable();
+ } else {
+ this.check();
+ }
+ },
+
+ defineDep: function (i, depExports) {
+ //Because of cycles, defined callback for a given
+ //export can be called more than once.
+ if (!this.depMatched[i]) {
+ this.depMatched[i] = true;
+ this.depCount -= 1;
+ this.depExports[i] = depExports;
+ }
+ },
+
+ fetch: function () {
+ if (this.fetched) {
+ return;
+ }
+ this.fetched = true;
+
+ context.startTime = (new Date()).getTime();
+
+ var map = this.map;
+
+ //If the manager is for a plugin managed resource,
+ //ask the plugin to load it now.
+ if (this.shim) {
+ context.makeRequire(this.map, {
+ enableBuildCallback: true
+ })(this.shim.deps || [], bind(this, function () {
+ return map.prefix ? this.callPlugin() : this.load();
+ }));
+ } else {
+ //Regular dependency.
+ return map.prefix ? this.callPlugin() : this.load();
+ }
+ },
+
+ load: function () {
+ var url = this.map.url;
+
+ //Regular dependency.
+ if (!urlFetched[url]) {
+ urlFetched[url] = true;
+ context.load(this.map.id, url);
+ }
+ },
+
+ /**
+ * Checks if the module is ready to define itself, and if so,
+ * define it.
+ */
+ check: function () {
+ if (!this.enabled || this.enabling) {
+ return;
+ }
+
+ var err, cjsModule,
+ id = this.map.id,
+ depExports = this.depExports,
+ exports = this.exports,
+ factory = this.factory;
+
+ if (!this.inited) {
+ this.fetch();
+ } else if (this.error) {
+ this.emit('error', this.error);
+ } else if (!this.defining) {
+ //The factory could trigger another require call
+ //that would result in checking this module to
+ //define itself again. If already in the process
+ //of doing that, skip this work.
+ this.defining = true;
+
+ if (this.depCount < 1 && !this.defined) {
+ if (isFunction(factory)) {
+ //If there is an error listener, favor passing
+ //to that instead of throwing an error. However,
+ //only do it for define()'d modules. require
+ //errbacks should not be called for failures in
+ //their callbacks (#699). However if a global
+ //onError is set, use that.
+ if ((this.events.error && this.map.isDefine) ||
+ req.onError !== defaultOnError) {
+ try {
+ exports = context.execCb(id, factory, depExports, exports);
+ } catch (e) {
+ err = e;
+ }
+ } else {
+ exports = context.execCb(id, factory, depExports, exports);
+ }
+
+ if (this.map.isDefine) {
+ //If setting exports via 'module' is in play,
+ //favor that over return value and exports. After that,
+ //favor a non-undefined return value over exports use.
+ cjsModule = this.module;
+ if (cjsModule &&
+ cjsModule.exports !== undefined &&
+ //Make sure it is not already the exports value
+ cjsModule.exports !== this.exports) {
+ exports = cjsModule.exports;
+ } else if (exports === undefined && this.usingExports) {
+ //exports already set the defined value.
+ exports = this.exports;
+ }
+ }
+
+ if (err) {
+ err.requireMap = this.map;
+ err.requireModules = this.map.isDefine ? [this.map.id] : null;
+ err.requireType = this.map.isDefine ? 'define' : 'require';
+ return onError((this.error = err));
+ }
+
+ } else {
+ //Just a literal value
+ exports = factory;
+ }
+
+ this.exports = exports;
+
+ if (this.map.isDefine && !this.ignore) {
+ defined[id] = exports;
+
+ if (req.onResourceLoad) {
+ req.onResourceLoad(context, this.map, this.depMaps);
+ }
+ }
+
+ //Clean up
+ cleanRegistry(id);
+
+ this.defined = true;
+ }
+
+ //Finished the define stage. Allow calling check again
+ //to allow define notifications below in the case of a
+ //cycle.
+ this.defining = false;
+
+ if (this.defined && !this.defineEmitted) {
+ this.defineEmitted = true;
+ this.emit('defined', this.exports);
+ this.defineEmitComplete = true;
+ }
+
+ }
+ },
+
+ callPlugin: function () {
+ var map = this.map,
+ id = map.id,
+ //Map already normalized the prefix.
+ pluginMap = makeModuleMap(map.prefix);
+
+ //Mark this as a dependency for this plugin, so it
+ //can be traced for cycles.
+ this.depMaps.push(pluginMap);
+
+ on(pluginMap, 'defined', bind(this, function (plugin) {
+ var load, normalizedMap, normalizedMod,
+ name = this.map.name,
+ parentName = this.map.parentMap ? this.map.parentMap.name : null,
+ localRequire = context.makeRequire(map.parentMap, {
+ enableBuildCallback: true
+ });
+
+ //If current map is not normalized, wait for that
+ //normalized name to load instead of continuing.
+ if (this.map.unnormalized) {
+ //Normalize the ID if the plugin allows it.
+ if (plugin.normalize) {
+ name = plugin.normalize(name, function (name) {
+ return normalize(name, parentName, true);
+ }) || '';
+ }
+
+ //prefix and name should already be normalized, no need
+ //for applying map config again either.
+ normalizedMap = makeModuleMap(map.prefix + '!' + name,
+ this.map.parentMap);
+ on(normalizedMap,
+ 'defined', bind(this, function (value) {
+ this.init([], function () { return value; }, null, {
+ enabled: true,
+ ignore: true
+ });
+ }));
+
+ normalizedMod = getOwn(registry, normalizedMap.id);
+ if (normalizedMod) {
+ //Mark this as a dependency for this plugin, so it
+ //can be traced for cycles.
+ this.depMaps.push(normalizedMap);
+
+ if (this.events.error) {
+ normalizedMod.on('error', bind(this, function (err) {
+ this.emit('error', err);
+ }));
+ }
+ normalizedMod.enable();
+ }
+
+ return;
+ }
+
+ load = bind(this, function (value) {
+ this.init([], function () { return value; }, null, {
+ enabled: true
+ });
+ });
+
+ load.error = bind(this, function (err) {
+ this.inited = true;
+ this.error = err;
+ err.requireModules = [id];
+
+ //Remove temp unnormalized modules for this module,
+ //since they will never be resolved otherwise now.
+ eachProp(registry, function (mod) {
+ if (mod.map.id.indexOf(id + '_unnormalized') === 0) {
+ cleanRegistry(mod.map.id);
+ }
+ });
+
+ onError(err);
+ });
+
+ //Allow plugins to load other code without having to know the
+ //context or how to 'complete' the load.
+ load.fromText = bind(this, function (text, textAlt) {
+ /*jslint evil: true */
+ var moduleName = map.name,
+ moduleMap = makeModuleMap(moduleName),
+ hasInteractive = useInteractive;
+
+ //As of 2.1.0, support just passing the text, to reinforce
+ //fromText only being called once per resource. Still
+ //support old style of passing moduleName but discard
+ //that moduleName in favor of the internal ref.
+ if (textAlt) {
+ text = textAlt;
+ }
+
+ //Turn off interactive script matching for IE for any define
+ //calls in the text, then turn it back on at the end.
+ if (hasInteractive) {
+ useInteractive = false;
+ }
+
+ //Prime the system by creating a module instance for
+ //it.
+ getModule(moduleMap);
+
+ //Transfer any config to this other module.
+ if (hasProp(config.config, id)) {
+ config.config[moduleName] = config.config[id];
+ }
+
+ try {
+ req.exec(text);
+ } catch (e) {
+ return onError(makeError('fromtexteval',
+ 'fromText eval for ' + id +
+ ' failed: ' + e,
+ e,
+ [id]));
+ }
+
+ if (hasInteractive) {
+ useInteractive = true;
+ }
+
+ //Mark this as a dependency for the plugin
+ //resource
+ this.depMaps.push(moduleMap);
+
+ //Support anonymous modules.
+ context.completeLoad(moduleName);
+
+ //Bind the value of that module to the value for this
+ //resource ID.
+ localRequire([moduleName], load);
+ });
+
+ //Use parentName here since the plugin's name is not reliable,
+ //could be some weird string with no path that actually wants to
+ //reference the parentName's path.
+ plugin.load(map.name, localRequire, load, config);
+ }));
+
+ context.enable(pluginMap, this);
+ this.pluginMaps[pluginMap.id] = pluginMap;
+ },
+
+ enable: function () {
+ enabledRegistry[this.map.id] = this;
+ this.enabled = true;
+
+ //Set flag mentioning that the module is enabling,
+ //so that immediate calls to the defined callbacks
+ //for dependencies do not trigger inadvertent load
+ //with the depCount still being zero.
+ this.enabling = true;
+
+ //Enable each dependency
+ each(this.depMaps, bind(this, function (depMap, i) {
+ var id, mod, handler;
+
+ if (typeof depMap === 'string') {
+ //Dependency needs to be converted to a depMap
+ //and wired up to this module.
+ depMap = makeModuleMap(depMap,
+ (this.map.isDefine ? this.map : this.map.parentMap),
+ false,
+ !this.skipMap);
+ this.depMaps[i] = depMap;
+
+ handler = getOwn(handlers, depMap.id);
+
+ if (handler) {
+ this.depExports[i] = handler(this);
+ return;
+ }
+
+ this.depCount += 1;
+
+ on(depMap, 'defined', bind(this, function (depExports) {
+ this.defineDep(i, depExports);
+ this.check();
+ }));
+
+ if (this.errback) {
+ on(depMap, 'error', bind(this, this.errback));
+ }
+ }
+
+ id = depMap.id;
+ mod = registry[id];
+
+ //Skip special modules like 'require', 'exports', 'module'
+ //Also, don't call enable if it is already enabled,
+ //important in circular dependency cases.
+ if (!hasProp(handlers, id) && mod && !mod.enabled) {
+ context.enable(depMap, this);
+ }
+ }));
+
+ //Enable each plugin that is used in
+ //a dependency
+ eachProp(this.pluginMaps, bind(this, function (pluginMap) {
+ var mod = getOwn(registry, pluginMap.id);
+ if (mod && !mod.enabled) {
+ context.enable(pluginMap, this);
+ }
+ }));
+
+ this.enabling = false;
+
+ this.check();
+ },
+
+ on: function (name, cb) {
+ var cbs = this.events[name];
+ if (!cbs) {
+ cbs = this.events[name] = [];
+ }
+ cbs.push(cb);
+ },
+
+ emit: function (name, evt) {
+ each(this.events[name], function (cb) {
+ cb(evt);
+ });
+ if (name === 'error') {
+ //Now that the error handler was triggered, remove
+ //the listeners, since this broken Module instance
+ //can stay around for a while in the registry.
+ delete this.events[name];
+ }
+ }
+ };
+
+ function callGetModule(args) {
+ //Skip modules already defined.
+ if (!hasProp(defined, args[0])) {
+ getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
+ }
+ }
+
+ function removeListener(node, func, name, ieName) {
+ //Favor detachEvent because of IE9
+ //issue, see attachEvent/addEventListener comment elsewhere
+ //in this file.
+ if (node.detachEvent && !isOpera) {
+ //Probably IE. If not it will throw an error, which will be
+ //useful to know.
+ if (ieName) {
+ node.detachEvent(ieName, func);
+ }
+ } else {
+ node.removeEventListener(name, func, false);
+ }
+ }
+
+ /**
+ * Given an event from a script node, get the requirejs info from it,
+ * and then removes the event listeners on the node.
+ * @param {Event} evt
+ * @returns {Object}
+ */
+ function getScriptData(evt) {
+ //Using currentTarget instead of target for Firefox 2.0's sake. Not
+ //all old browsers will be supported, but this one was easy enough
+ //to support and still makes sense.
+ var node = evt.currentTarget || evt.srcElement;
+
+ //Remove the listeners once here.
+ removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
+ removeListener(node, context.onScriptError, 'error');
+
+ return {
+ node: node,
+ id: node && node.getAttribute('data-requiremodule')
+ };
+ }
+
+ function intakeDefines() {
+ var args;
+
+ //Any defined modules in the global queue, intake them now.
+ takeGlobalQueue();
+
+ //Make sure any remaining defQueue items get properly processed.
+ while (defQueue.length) {
+ args = defQueue.shift();
+ if (args[0] === null) {
+ return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));
+ } else {
+ //args are id, deps, factory. Should be normalized by the
+ //define() function.
+ callGetModule(args);
+ }
+ }
+ }
+
+ context = {
+ config: config,
+ contextName: contextName,
+ registry: registry,
+ defined: defined,
+ urlFetched: urlFetched,
+ defQueue: defQueue,
+ Module: Module,
+ makeModuleMap: makeModuleMap,
+ nextTick: req.nextTick,
+ onError: onError,
+
+ /**
+ * Set a configuration for the context.
+ * @param {Object} cfg config object to integrate.
+ */
+ configure: function (cfg) {
+ //Make sure the baseUrl ends in a slash.
+ if (cfg.baseUrl) {
+ if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
+ cfg.baseUrl += '/';
+ }
+ }
+
+ //Save off the paths and packages since they require special processing,
+ //they are additive.
+ var pkgs = config.pkgs,
+ shim = config.shim,
+ objs = {
+ paths: true,
+ config: true,
+ map: true
+ };
+
+ eachProp(cfg, function (value, prop) {
+ if (objs[prop]) {
+ if (prop === 'map') {
+ if (!config.map) {
+ config.map = {};
+ }
+ mixin(config[prop], value, true, true);
+ } else {
+ mixin(config[prop], value, true);
+ }
+ } else {
+ config[prop] = value;
+ }
+ });
+
+ //Merge shim
+ if (cfg.shim) {
+ eachProp(cfg.shim, function (value, id) {
+ //Normalize the structure
+ if (isArray(value)) {
+ value = {
+ deps: value
+ };
+ }
+ if ((value.exports || value.init) && !value.exportsFn) {
+ value.exportsFn = context.makeShimExports(value);
+ }
+ shim[id] = value;
+ });
+ config.shim = shim;
+ }
+
+ //Adjust packages if necessary.
+ if (cfg.packages) {
+ each(cfg.packages, function (pkgObj) {
+ var location;
+
+ pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
+ location = pkgObj.location;
+
+ //Create a brand new object on pkgs, since currentPackages can
+ //be passed in again, and config.pkgs is the internal transformed
+ //state for all package configs.
+ pkgs[pkgObj.name] = {
+ name: pkgObj.name,
+ location: location || pkgObj.name,
+ //Remove leading dot in main, so main paths are normalized,
+ //and remove any trailing .js, since different package
+ //envs have different conventions: some use a module name,
+ //some use a file name.
+ main: (pkgObj.main || 'main')
+ .replace(currDirRegExp, '')
+ .replace(jsSuffixRegExp, '')
+ };
+ });
+
+ //Done with modifications, assing packages back to context config
+ config.pkgs = pkgs;
+ }
+
+ //If there are any "waiting to execute" modules in the registry,
+ //update the maps for them, since their info, like URLs to load,
+ //may have changed.
+ eachProp(registry, function (mod, id) {
+ //If module already has init called, since it is too
+ //late to modify them, and ignore unnormalized ones
+ //since they are transient.
+ if (!mod.inited && !mod.map.unnormalized) {
+ mod.map = makeModuleMap(id);
+ }
+ });
+
+ //If a deps array or a config callback is specified, then call
+ //require with those args. This is useful when require is defined as a
+ //config object before require.js is loaded.
+ if (cfg.deps || cfg.callback) {
+ context.require(cfg.deps || [], cfg.callback);
+ }
+ },
+
+ makeShimExports: function (value) {
+ function fn() {
+ var ret;
+ if (value.init) {
+ ret = value.init.apply(global, arguments);
+ }
+ return ret || (value.exports && getGlobal(value.exports));
+ }
+ return fn;
+ },
+
+ makeRequire: function (relMap, options) {
+ options = options || {};
+
+ function localRequire(deps, callback, errback) {
+ var id, map, requireMod;
+
+ if (options.enableBuildCallback && callback && isFunction(callback)) {
+ callback.__requireJsBuild = true;
+ }
+
+ if (typeof deps === 'string') {
+ if (isFunction(callback)) {
+ //Invalid call
+ return onError(makeError('requireargs', 'Invalid require call'), errback);
+ }
+
+ //If require|exports|module are requested, get the
+ //value for them from the special handlers. Caveat:
+ //this only works while module is being defined.
+ if (relMap && hasProp(handlers, deps)) {
+ return handlers[deps](registry[relMap.id]);
+ }
+
+ //Synchronous access to one module. If require.get is
+ //available (as in the Node adapter), prefer that.
+ if (req.get) {
+ return req.get(context, deps, relMap, localRequire);
+ }
+
+ //Normalize module name, if it contains . or ..
+ map = makeModuleMap(deps, relMap, false, true);
+ id = map.id;
+
+ if (!hasProp(defined, id)) {
+ return onError(makeError('notloaded', 'Module name "' +
+ id +
+ '" has not been loaded yet for context: ' +
+ contextName +
+ (relMap ? '' : '. Use require([])')));
+ }
+ return defined[id];
+ }
+
+ //Grab defines waiting in the global queue.
+ intakeDefines();
+
+ //Mark all the dependencies as needing to be loaded.
+ context.nextTick(function () {
+ //Some defines could have been added since the
+ //require call, collect them.
+ intakeDefines();
+
+ requireMod = getModule(makeModuleMap(null, relMap));
+
+ //Store if map config should be applied to this require
+ //call for dependencies.
+ requireMod.skipMap = options.skipMap;
+
+ requireMod.init(deps, callback, errback, {
+ enabled: true
+ });
+
+ checkLoaded();
+ });
+
+ return localRequire;
+ }
+
+ mixin(localRequire, {
+ isBrowser: isBrowser,
+
+ /**
+ * Converts a module name + .extension into an URL path.
+ * *Requires* the use of a module name. It does not support using
+ * plain URLs like nameToUrl.
+ */
+ toUrl: function (moduleNamePlusExt) {
+ var ext,
+ index = moduleNamePlusExt.lastIndexOf('.'),
+ segment = moduleNamePlusExt.split('/')[0],
+ isRelative = segment === '.' || segment === '..';
+
+ //Have a file extension alias, and it is not the
+ //dots from a relative path.
+ if (index !== -1 && (!isRelative || index > 1)) {
+ ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
+ moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
+ }
+
+ return context.nameToUrl(normalize(moduleNamePlusExt,
+ relMap && relMap.id, true), ext, true);
+ },
+
+ defined: function (id) {
+ return hasProp(defined, makeModuleMap(id, relMap, false, true).id);
+ },
+
+ specified: function (id) {
+ id = makeModuleMap(id, relMap, false, true).id;
+ return hasProp(defined, id) || hasProp(registry, id);
+ }
+ });
+
+ //Only allow undef on top level require calls
+ if (!relMap) {
+ localRequire.undef = function (id) {
+ //Bind any waiting define() calls to this context,
+ //fix for #408
+ takeGlobalQueue();
+
+ var map = makeModuleMap(id, relMap, true),
+ mod = getOwn(registry, id);
+
+ delete defined[id];
+ delete urlFetched[map.url];
+ delete undefEvents[id];
+
+ if (mod) {
+ //Hold on to listeners in case the
+ //module will be attempted to be reloaded
+ //using a different config.
+ if (mod.events.defined) {
+ undefEvents[id] = mod.events;
+ }
+
+ cleanRegistry(id);
+ }
+ };
+ }
+
+ return localRequire;
+ },
+
+ /**
+ * Called to enable a module if it is still in the registry
+ * awaiting enablement. A second arg, parent, the parent module,
+ * is passed in for context, when this method is overriden by
+ * the optimizer. Not shown here to keep code compact.
+ */
+ enable: function (depMap) {
+ var mod = getOwn(registry, depMap.id);
+ if (mod) {
+ getModule(depMap).enable();
+ }
+ },
+
+ /**
+ * Internal method used by environment adapters to complete a load event.
+ * A load event could be a script load or just a load pass from a synchronous
+ * load call.
+ * @param {String} moduleName the name of the module to potentially complete.
+ */
+ completeLoad: function (moduleName) {
+ var found, args, mod,
+ shim = getOwn(config.shim, moduleName) || {},
+ shExports = shim.exports;
+
+ takeGlobalQueue();
+
+ while (defQueue.length) {
+ args = defQueue.shift();
+ if (args[0] === null) {
+ args[0] = moduleName;
+ //If already found an anonymous module and bound it
+ //to this name, then this is some other anon module
+ //waiting for its completeLoad to fire.
+ if (found) {
+ break;
+ }
+ found = true;
+ } else if (args[0] === moduleName) {
+ //Found matching define call for this script!
+ found = true;
+ }
+
+ callGetModule(args);
+ }
+
+ //Do this after the cycle of callGetModule in case the result
+ //of those calls/init calls changes the registry.
+ mod = getOwn(registry, moduleName);
+
+ if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {
+ if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
+ if (hasPathFallback(moduleName)) {
+ return;
+ } else {
+ return onError(makeError('nodefine',
+ 'No define call for ' + moduleName,
+ null,
+ [moduleName]));
+ }
+ } else {
+ //A script that does not call define(), so just simulate
+ //the call for it.
+ callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);
+ }
+ }
+
+ checkLoaded();
+ },
+
+ /**
+ * Converts a module name to a file path. Supports cases where
+ * moduleName may actually be just an URL.
+ * Note that it **does not** call normalize on the moduleName,
+ * it is assumed to have already been normalized. This is an
+ * internal API, not a public one. Use toUrl for the public API.
+ */
+ nameToUrl: function (moduleName, ext, skipExt) {
+ var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
+ parentPath;
+
+ //If a colon is in the URL, it indicates a protocol is used and it is just
+ //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
+ //or ends with .js, then assume the user meant to use an url and not a module id.
+ //The slash is important for protocol-less URLs as well as full paths.
+ if (req.jsExtRegExp.test(moduleName)) {
+ //Just a plain path, not module name lookup, so just return it.
+ //Add extension if it is included. This is a bit wonky, only non-.js things pass
+ //an extension, this method probably needs to be reworked.
+ url = moduleName + (ext || '');
+ } else {
+ //A module that needs to be converted to a path.
+ paths = config.paths;
+ pkgs = config.pkgs;
+
+ syms = moduleName.split('/');
+ //For each module name segment, see if there is a path
+ //registered for it. Start with most specific name
+ //and work up from it.
+ for (i = syms.length; i > 0; i -= 1) {
+ parentModule = syms.slice(0, i).join('/');
+ pkg = getOwn(pkgs, parentModule);
+ parentPath = getOwn(paths, parentModule);
+ if (parentPath) {
+ //If an array, it means there are a few choices,
+ //Choose the one that is desired
+ if (isArray(parentPath)) {
+ parentPath = parentPath[0];
+ }
+ syms.splice(0, i, parentPath);
+ break;
+ } else if (pkg) {
+ //If module name is just the package name, then looking
+ //for the main module.
+ if (moduleName === pkg.name) {
+ pkgPath = pkg.location + '/' + pkg.main;
+ } else {
+ pkgPath = pkg.location;
+ }
+ syms.splice(0, i, pkgPath);
+ break;
+ }
+ }
+
+ //Join the path parts together, then figure out if baseUrl is needed.
+ url = syms.join('/');
+ url += (ext || (/\?/.test(url) || skipExt ? '' : '.js'));
+ url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
+ }
+
+ return config.urlArgs ? url +
+ ((url.indexOf('?') === -1 ? '?' : '&') +
+ config.urlArgs) : url;
+ },
+
+ //Delegates to req.load. Broken out as a separate function to
+ //allow overriding in the optimizer.
+ load: function (id, url) {
+ req.load(context, id, url);
+ },
+
+ /**
+ * Executes a module callback function. Broken out as a separate function
+ * solely to allow the build system to sequence the files in the built
+ * layer in the right sequence.
+ *
+ * @private
+ */
+ execCb: function (name, callback, args, exports) {
+ return callback.apply(exports, args);
+ },
+
+ /**
+ * callback for script loads, used to check status of loading.
+ *
+ * @param {Event} evt the event from the browser for the script
+ * that was loaded.
+ */
+ onScriptLoad: function (evt) {
+ //Using currentTarget instead of target for Firefox 2.0's sake. Not
+ //all old browsers will be supported, but this one was easy enough
+ //to support and still makes sense.
+ if (evt.type === 'load' ||
+ (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {
+ //Reset interactive script so a script node is not held onto for
+ //to long.
+ interactiveScript = null;
+
+ //Pull out the name of the module and the context.
+ var data = getScriptData(evt);
+ context.completeLoad(data.id);
+ }
+ },
+
+ /**
+ * Callback for script errors.
+ */
+ onScriptError: function (evt) {
+ var data = getScriptData(evt);
+ if (!hasPathFallback(data.id)) {
+ return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
+ }
+ }
+ };
+
+ context.require = context.makeRequire();
+ return context;
+ }
+
+ /**
+ * Main entry point.
+ *
+ * If the only argument to require is a string, then the module that
+ * is represented by that string is fetched for the appropriate context.
+ *
+ * If the first argument is an array, then it will be treated as an array
+ * of dependency string names to fetch. An optional function callback can
+ * be specified to execute when all of those dependencies are available.
+ *
+ * Make a local req variable to help Caja compliance (it assumes things
+ * on a require that are not standardized), and to give a short
+ * name for minification/local scope use.
+ */
+ req = requirejs = function (deps, callback, errback, optional) {
+
+ //Find the right context, use default
+ var context, config,
+ contextName = defContextName;
+
+ // Determine if have config object in the call.
+ if (!isArray(deps) && typeof deps !== 'string') {
+ // deps is a config object
+ config = deps;
+ if (isArray(callback)) {
+ // Adjust args if there are dependencies
+ deps = callback;
+ callback = errback;
+ errback = optional;
+ } else {
+ deps = [];
+ }
+ }
+
+ if (config && config.context) {
+ contextName = config.context;
+ }
+
+ context = getOwn(contexts, contextName);
+ if (!context) {
+ context = contexts[contextName] = req.s.newContext(contextName);
+ }
+
+ if (config) {
+ context.configure(config);
+ }
+
+ return context.require(deps, callback, errback);
+ };
+
+ /**
+ * Support require.config() to make it easier to cooperate with other
+ * AMD loaders on globally agreed names.
+ */
+ req.config = function (config) {
+ return req(config);
+ };
+
+ /**
+ * Execute something after the current tick
+ * of the event loop. Override for other envs
+ * that have a better solution than setTimeout.
+ * @param {Function} fn function to execute later.
+ */
+ req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {
+ setTimeout(fn, 4);
+ } : function (fn) { fn(); };
+
+ /**
+ * Export require as a global, but only if it does not already exist.
+ */
+ if (!require) {
+ require = req;
+ }
+
+ req.version = version;
+
+ //Used to filter out dependencies that are already paths.
+ req.jsExtRegExp = /^\/|:|\?|\.js$/;
+ req.isBrowser = isBrowser;
+ s = req.s = {
+ contexts: contexts,
+ newContext: newContext
+ };
+
+ //Create default context.
+ req({});
+
+ //Exports some context-sensitive methods on global require.
+ each([
+ 'toUrl',
+ 'undef',
+ 'defined',
+ 'specified'
+ ], function (prop) {
+ //Reference from contexts instead of early binding to default context,
+ //so that during builds, the latest instance of the default context
+ //with its config gets used.
+ req[prop] = function () {
+ var ctx = contexts[defContextName];
+ return ctx.require[prop].apply(ctx, arguments);
+ };
+ });
+
+ if (isBrowser) {
+ head = s.head = document.getElementsByTagName('head')[0];
+ //If BASE tag is in play, using appendChild is a problem for IE6.
+ //When that browser dies, this can be removed. Details in this jQuery bug:
+ //http://dev.jquery.com/ticket/2709
+ baseElement = document.getElementsByTagName('base')[0];
+ if (baseElement) {
+ head = s.head = baseElement.parentNode;
+ }
+ }
+
+ /**
+ * Any errors that require explicitly generates will be passed to this
+ * function. Intercept/override it if you want custom error handling.
+ * @param {Error} err the error object.
+ */
+ req.onError = defaultOnError;
+
+ /**
+ * Creates the node for the load command. Only used in browser envs.
+ */
+ req.createNode = function (config, moduleName, url) {
+ var node = config.xhtml ?
+ document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
+ document.createElement('script');
+ node.type = config.scriptType || 'text/javascript';
+ node.charset = 'utf-8';
+ node.async = true;
+ return node;
+ };
+
+ /**
+ * Does the request to load a module for the browser case.
+ * Make this a separate function to allow other environments
+ * to override it.
+ *
+ * @param {Object} context the require context to find state.
+ * @param {String} moduleName the name of the module.
+ * @param {Object} url the URL to the module.
+ */
+ req.load = function (context, moduleName, url) {
+ var config = (context && context.config) || {},
+ node;
+ if (isBrowser) {
+ //In the browser so use a script tag
+ node = req.createNode(config, moduleName, url);
+
+ node.setAttribute('data-requirecontext', context.contextName);
+ node.setAttribute('data-requiremodule', moduleName);
+
+ //Set up load listener. Test attachEvent first because IE9 has
+ //a subtle issue in its addEventListener and script onload firings
+ //that do not match the behavior of all other browsers with
+ //addEventListener support, which fire the onload event for a
+ //script right after the script execution. See:
+ //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution
+ //UNFORTUNATELY Opera implements attachEvent but does not follow the script
+ //script execution mode.
+ if (node.attachEvent &&
+ //Check if node.attachEvent is artificially added by custom script or
+ //natively supported by browser
+ //read https://github.com/jrburke/requirejs/issues/187
+ //if we can NOT find [native code] then it must NOT natively supported.
+ //in IE8, node.attachEvent does not have toString()
+ //Note the test for "[native code" with no closing brace, see:
+ //https://github.com/jrburke/requirejs/issues/273
+ !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&
+ !isOpera) {
+ //Probably IE. IE (at least 6-8) do not fire
+ //script onload right after executing the script, so
+ //we cannot tie the anonymous define call to a name.
+ //However, IE reports the script as being in 'interactive'
+ //readyState at the time of the define call.
+ useInteractive = true;
+
+ node.attachEvent('onreadystatechange', context.onScriptLoad);
+ //It would be great to add an error handler here to catch
+ //404s in IE9+. However, onreadystatechange will fire before
+ //the error handler, so that does not help. If addEventListener
+ //is used, then IE will fire error before load, but we cannot
+ //use that pathway given the connect.microsoft.com issue
+ //mentioned above about not doing the 'script execute,
+ //then fire the script load event listener before execute
+ //next script' that other browsers do.
+ //Best hope: IE10 fixes the issues,
+ //and then destroys all installs of IE 6-9.
+ //node.attachEvent('onerror', context.onScriptError);
+ } else {
+ node.addEventListener('load', context.onScriptLoad, false);
+ node.addEventListener('error', context.onScriptError, false);
+ }
+ node.src = url;
+
+ //For some cache cases in IE 6-8, the script executes before the end
+ //of the appendChild execution, so to tie an anonymous define
+ //call to the module name (which is stored on the node), hold on
+ //to a reference to this node, but clear after the DOM insertion.
+ currentlyAddingScript = node;
+ if (baseElement) {
+ head.insertBefore(node, baseElement);
+ } else {
+ head.appendChild(node);
+ }
+ currentlyAddingScript = null;
+
+ return node;
+ } else if (isWebWorker) {
+ try {
+ //In a web worker, use importScripts. This is not a very
+ //efficient use of importScripts, importScripts will block until
+ //its script is downloaded and evaluated. However, if web workers
+ //are in play, the expectation that a build has been done so that
+ //only one script needs to be loaded anyway. This may need to be
+ //reevaluated if other use cases become common.
+ importScripts(url);
+
+ //Account for anonymous modules
+ context.completeLoad(moduleName);
+ } catch (e) {
+ context.onError(makeError('importscripts',
+ 'importScripts failed for ' +
+ moduleName + ' at ' + url,
+ e,
+ [moduleName]));
+ }
+ }
+ };
+
+ function getInteractiveScript() {
+ if (interactiveScript && interactiveScript.readyState === 'interactive') {
+ return interactiveScript;
+ }
+
+ eachReverse(scripts(), function (script) {
+ if (script.readyState === 'interactive') {
+ return (interactiveScript = script);
+ }
+ });
+ return interactiveScript;
+ }
+
+ //Look for a data-main script attribute, which could also adjust the baseUrl.
+ if (isBrowser) {
+ //Figure out baseUrl. Get it from the script tag with require.js in it.
+ eachReverse(scripts(), function (script) {
+ //Set the 'head' where we can append children by
+ //using the script's parent.
+ if (!head) {
+ head = script.parentNode;
+ }
+
+ //Look for a data-main attribute to set main script for the page
+ //to load. If it is there, the path to data main becomes the
+ //baseUrl, if it is not already set.
+ dataMain = script.getAttribute('data-main');
+ if (dataMain) {
+ //Preserve dataMain in case it is a path (i.e. contains '?')
+ mainScript = dataMain;
+
+ //Set final baseUrl if there is not already an explicit one.
+ if (!cfg.baseUrl) {
+ //Pull off the directory of data-main for use as the
+ //baseUrl.
+ src = mainScript.split('/');
+ mainScript = src.pop();
+ subPath = src.length ? src.join('/') + '/' : './';
+
+ cfg.baseUrl = subPath;
+ }
+
+ //Strip off any trailing .js since mainScript is now
+ //like a module name.
+ mainScript
<TRUNCATED>
[05/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/lib/plist.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/lib/plist.js b/blackberry10/node_modules/plugman/node_modules/plist/lib/plist.js
new file mode 100644
index 0000000..379c5d1
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/lib/plist.js
@@ -0,0 +1,301 @@
+;(function (exports, DOMParser, xmlbuilder) {
+ // Checks if running in a non-browser environment
+ var inNode = typeof window === 'undefined' ? true : false
+ , utf8_to_b64
+ , b64_to_utf8;
+
+ // this library runs in browsers and nodejs, set up functions accordingly
+ if (inNode) {
+ exports.parseFile = function (filename, callback) {
+ console.warn('parseFile is deprecated. Please use parseFileSync instead.');
+ var fs = require('fs');
+ var inxml = fs.readFileSync(filename, 'utf8');
+ exports.parseString(inxml, callback);
+ }
+
+ exports.parseFileSync = function (filename) {
+ var fs = require('fs');
+ var inxml = fs.readFileSync(filename, 'utf8');
+ return exports.parseStringSync(inxml);
+ }
+
+ // set up base64 encode/decode functions
+ utf8_to_b64= function ( str ) {
+ return new Buffer(str).toString('base64');
+ }
+ b64_to_utf8 = function ( str ) {
+ return new Buffer(str, 'base64').toString('utf8');
+ }
+ } else {
+ // we're in a browser context, find the DOMParser
+ if (typeof window.DOMParser != 'undefined') {
+ DOMParser = function(xmlStr) {
+ return ( new window.DOMParser() ).parseFromString(xmlStr, 'text/xml');
+ };
+ } else if (typeof window.ActiveXObject != 'undefined' &&
+ new window.ActiveXObject('Microsoft.XMLDOM')) {
+ DOMParser = function(xmlStr) {
+ var xmlDoc = new window.ActiveXObject('Microsoft.XMLDOM');
+ xmlDoc.async = 'false';
+ xmlDoc.loadXML(xmlStr);
+ return xmlDoc;
+ };
+ } else {
+ throw new Error('No XML parser found');
+ }
+
+ // set up base64 encode/decode functions
+ if (typeof window.btoa == 'undefined') {
+ throw new Error('No base64 support found');
+ // TODO: shim btoa and atob if not present (ie < 10)
+ //http://stackoverflow.com/questions/246801/how-can-you-encode-to-base64-using-javascript/247261#247261
+ } else {
+ utf8_to_b64= function ( str ) {
+ return window.btoa(unescape(encodeURIComponent( str )));
+ }
+
+ b64_to_utf8 = function ( str ) {
+ return decodeURIComponent(escape(window.atob( str )));
+ }
+ }
+
+ }
+
+ exports.parseString = function (xml, callback) {
+ console.warn('parseString is deprecated. Please use parseStringSync instead.');
+ var doc, error, plist;
+ try {
+ doc = new DOMParser().parseFromString(xml);
+ plist = parsePlistXML(doc.documentElement);
+ } catch(e) {
+ error = e;
+ }
+ callback(error, plist);
+ }
+
+ exports.parseStringSync = function (xml) {
+ var doc = new DOMParser().parseFromString(xml);
+ var plist;
+ if (doc.documentElement.nodeName !== 'plist') {
+ throw new Error('malformed document. First element should be <plist>');
+ }
+ plist = parsePlistXML(doc.documentElement);
+
+ // if the plist is an array with 1 element, pull it out of the array
+ if(isArray(plist) && plist.length == 1) {
+ plist = plist[0];
+ }
+ return plist;
+ }
+
+ /**
+ * convert an XML based plist document into a JSON representation
+ *
+ * @param object xml_node current XML node in the plist
+ * @return built up JSON object
+ */
+ function parsePlistXML(node) {
+ var i, new_obj, key, val, new_arr;
+ if (!node)
+ return null;
+
+ if (node.nodeName === 'plist') {
+ new_arr = [];
+ for (i=0;i < node.childNodes.length;i++) {
+ // ignore comment nodes (text)
+ if (node.childNodes[i].nodeType !== 3) {
+ new_arr.push( parsePlistXML(node.childNodes[i]));
+ }
+ }
+ return new_arr;
+ }
+ else if(node.nodeName === 'dict') {
+ new_obj = {};
+ key = null;
+ for (i=0;i < node.childNodes.length;i++) {
+ // ignore comment nodes (text)
+ if (node.childNodes[i].nodeType !== 3) {
+ if (key === null) {
+ key = parsePlistXML(node.childNodes[i]);
+ } else {
+ new_obj[key] = parsePlistXML(node.childNodes[i]);
+ key = null;
+ }
+ }
+ }
+ return new_obj;
+ }
+ else if(node.nodeName === 'array') {
+ new_arr = [];
+ for (i=0;i < node.childNodes.length;i++) {
+ // ignore comment nodes (text)
+ if (node.childNodes[i].nodeType !== 3) {
+ res = parsePlistXML(node.childNodes[i]);
+ if (res) new_arr.push( res );
+ }
+ }
+ return new_arr;
+ }
+ else if(node.nodeName === '#text') {
+ // TODO: what should we do with text types? (CDATA sections)
+ }
+ else if(node.nodeName === 'key') {
+ return node.childNodes[0].nodeValue;
+ }
+ else if(node.nodeName === 'string') {
+ var res = '';
+ for (var d=0; d < node.childNodes.length; d++)
+ {
+ res += node.childNodes[d].nodeValue;
+ }
+ return res;
+ }
+ else if(node.nodeName === 'integer') {
+ // parse as base 10 integer
+ return parseInt(node.childNodes[0].nodeValue, 10);
+ }
+ else if(node.nodeName === 'real') {
+ var res = '';
+ for (var d=0; d < node.childNodes.length; d++)
+ {
+ if(node.childNodes[d].nodeType === 3) {
+ res += node.childNodes[d].nodeValue;
+ }
+ }
+ return parseFloat(res);
+ }
+ else if(node.nodeName === 'data') {
+ var res = '';
+ for (var d=0; d < node.childNodes.length; d++)
+ {
+ if(node.childNodes[d].nodeType === 3) {
+ res += node.childNodes[d].nodeValue;
+ }
+ }
+
+ // validate that the string is encoded as base64
+ var base64Matcher = new RegExp("^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$");
+ if (!base64Matcher.test(res.replace(/\s/g,'')) ) {
+ throw new Error('malformed document. <data> element is not base64 encoded');
+ }
+
+ // decode base64 data as utf8 string
+ return b64_to_utf8(res);
+ }
+ else if(node.nodeName === 'date') {
+ return new Date(node.childNodes[0].nodeValue);
+ }
+ else if(node.nodeName === 'true') {
+ return true;
+ }
+ else if(node.nodeName === 'false') {
+ return false;
+ }
+ }
+
+
+ function ISODateString(d){
+ function pad(n){return n<10 ? '0'+n : n}
+ return d.getUTCFullYear()+'-'
+ + pad(d.getUTCMonth()+1)+'-'
+ + pad(d.getUTCDate())+'T'
+ + pad(d.getUTCHours())+':'
+ + pad(d.getUTCMinutes())+':'
+ + pad(d.getUTCSeconds())+'Z'
+ }
+
+ // instanceof is horribly unreliable so we use these hackish but safer checks
+ // http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray
+ function isArray(obj) {
+ return Object.prototype.toString.call(obj) === '[object Array]';
+ }
+
+ function isDate(obj) {
+ return Object.prototype.toString.call(obj) === '[object Date]';
+ }
+
+ function isBoolean(obj) {
+ return (obj === true || obj === false || toString.call(obj) == '[object Boolean]');
+ }
+
+ function isNumber(obj) {
+ return Object.prototype.toString.call(obj) === '[object Number]';
+ }
+
+ function isObject(obj) {
+ return Object.prototype.toString.call(obj) === '[object Object]';
+ }
+
+ function isString(obj) {
+ return Object.prototype.toString.call(obj) === '[object String]';
+ }
+
+ /**
+ * generate an XML plist string from the input object
+ *
+ * @param object obj the object to convert
+ * @return string converted plist
+ */
+ exports.build = function(obj) {
+ var XMLHDR = { 'version': '1.0','encoding': 'UTF-8'}
+ , XMLDTD = { 'ext': 'PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"'}
+ , doc = xmlbuilder.create()
+ , child = doc.begin('plist', XMLHDR, XMLDTD).att('version', '1.0');
+
+ walk_obj(obj, child);
+ return child.end({pretty: true });
+ }
+
+ // depth first, recursive traversal of a javascript object. when complete,
+ // next_child contains a reference to the build XML object.
+ function walk_obj(next, next_child) {
+ var tag_type, i, prop;
+
+ if(isArray(next)) {
+ next_child = next_child.ele('array');
+ for(i=0 ;i < next.length;i++) {
+ walk_obj(next[i], next_child);
+ }
+ }
+ else if (isObject(next)) {
+ if (inNode && next instanceof Buffer) {
+ next_child.ele('data').raw(next.toString('base64'));
+ } else {
+ next_child = next_child.ele('dict');
+ for(prop in next) {
+ if(next.hasOwnProperty(prop)) {
+ next_child.ele('key').txt(prop);
+ walk_obj(next[prop], next_child);
+ }
+ }
+ }
+ }
+ else if(isNumber(next)) {
+ // detect if this is an integer or real
+ tag_type =(next % 1 === 0) ? 'integer' : 'real';
+ next_child.ele(tag_type).txt(next.toString());
+ }
+ else if(isDate(next)) {
+ next_child.ele('date').raw(ISODateString(new Date(next)));
+ }
+ else if(isBoolean(next)) {
+ val = next ? 'true' : 'false';
+ next_child.ele(val);
+ }
+ else if(isString(next)) {
+ //if (str!=obj || str.indexOf("\n")>=0) str = "<![CDATA["+str+"]]>";
+ var base64Matcher = new RegExp("^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$");
+ if (!inNode && base64Matcher.test(next.replace(/\s/g,''))) {
+ // data is base 64 encoded so assume it's a <data> node
+ next_child.ele('data').raw(utf8_to_b64(next));
+ } else {
+ // it's not base 64 encoded, assume it's a <string> node
+ next_child.ele('string').raw(next);
+ }
+ }
+ };
+
+})(typeof exports === 'undefined' ? plist = {} : exports, typeof window === 'undefined' ? require('xmldom').DOMParser : null, typeof window === 'undefined' ? require('xmlbuilder') : xmlbuilder)
+// the above line checks for exports (defined in node) and uses it, or creates
+// a global variable and exports to that. also, if in node, require DOMParser
+// node-style, in browser it should already be present
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/.npmignore b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/.npmignore
new file mode 100644
index 0000000..29db527
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/.npmignore
@@ -0,0 +1,8 @@
+.gitignore
+.travis.yml
+Makefile
+.git/
+src/
+test/
+node_modules/
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/README.md b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/README.md
new file mode 100644
index 0000000..4025ea5
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/README.md
@@ -0,0 +1,73 @@
+# xmlbuilder-js
+
+An XMLBuilder for [node.js](http://nodejs.org/) similar to
+[java-xmlbuilder](http://code.google.com/p/java-xmlbuilder/).
+
+[](http://travis-ci.org/oozcitak/xmlbuilder-js)
+
+### Installation:
+
+``` sh
+npm install xmlbuilder
+```
+
+### Important:
+
+I had to break compatibility while adding multiple instances in 0.1.3.
+As a result, version from v0.1.3 are **not** compatible with previous versions.
+
+### Usage:
+
+``` js
+var builder = require('xmlbuilder');
+var xml = builder.create('root')
+ .ele('xmlbuilder', {'for': 'node-js'})
+ .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')
+ .end({ pretty: true});
+
+console.log(xml);
+```
+
+will result in:
+
+``` xml
+<?xml version="1.0"?>
+<root>
+ <xmlbuilder for="node-js">
+ <repo type="git">git://github.com/oozcitak/xmlbuilder-js.git</repo>
+ </xmlbuilder>
+</root>
+```
+
+If you need to do some processing:
+
+``` js
+var root = builder.create('squares');
+root.com('f(x) = x^2');
+for(var i = 1; i <= 5; i++)
+{
+ var item = root.ele('data');
+ item.att('x', i);
+ item.att('y', i * i);
+}
+```
+
+This will result in:
+
+``` xml
+<?xml version="1.0"?>
+<squares>
+ <!-- f(x) = x^2 -->
+ <data x="1" y="1"/>
+ <data x="2" y="4"/>
+ <data x="3" y="9"/>
+ <data x="4" y="16"/>
+ <data x="5" y="25"/>
+</squares>
+```
+
+See the [Usage](https://github.com/oozcitak/xmlbuilder-js/wiki/Usage) page in the wiki for more detailed instructions.
+
+### License:
+
+`xmlbuilder-js` is [MIT Licensed](http://opensource.org/licenses/mit-license.php).
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/XMLBuilder.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/XMLBuilder.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/XMLBuilder.js
new file mode 100644
index 0000000..2850c8a
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/XMLBuilder.js
@@ -0,0 +1,119 @@
+// Generated by CoffeeScript 1.3.3
+(function() {
+ var XMLBuilder, XMLFragment;
+
+ XMLFragment = require('./XMLFragment');
+
+ XMLBuilder = (function() {
+
+ function XMLBuilder(name, xmldec, doctype) {
+ var att, child, _ref;
+ this.children = [];
+ this.rootObject = null;
+ if (this.is(name, 'Object')) {
+ _ref = [name, xmldec], xmldec = _ref[0], doctype = _ref[1];
+ name = null;
+ }
+ if (name != null) {
+ name = '' + name || '';
+ if (xmldec == null) {
+ xmldec = {
+ 'version': '1.0'
+ };
+ }
+ }
+ if ((xmldec != null) && !(xmldec.version != null)) {
+ throw new Error("Version number is required");
+ }
+ if (xmldec != null) {
+ xmldec.version = '' + xmldec.version || '';
+ if (!xmldec.version.match(/1\.[0-9]+/)) {
+ throw new Error("Invalid version number: " + xmldec.version);
+ }
+ att = {
+ version: xmldec.version
+ };
+ if (xmldec.encoding != null) {
+ xmldec.encoding = '' + xmldec.encoding || '';
+ if (!xmldec.encoding.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/)) {
+ throw new Error("Invalid encoding: " + xmldec.encoding);
+ }
+ att.encoding = xmldec.encoding;
+ }
+ if (xmldec.standalone != null) {
+ att.standalone = xmldec.standalone ? "yes" : "no";
+ }
+ child = new XMLFragment(this, '?xml', att);
+ this.children.push(child);
+ }
+ if (doctype != null) {
+ att = {};
+ if (name != null) {
+ att.name = name;
+ }
+ if (doctype.ext != null) {
+ doctype.ext = '' + doctype.ext || '';
+ att.ext = doctype.ext;
+ }
+ child = new XMLFragment(this, '!DOCTYPE', att);
+ this.children.push(child);
+ }
+ if (name != null) {
+ this.begin(name);
+ }
+ }
+
+ XMLBuilder.prototype.begin = function(name, xmldec, doctype) {
+ var doc, root;
+ if (!(name != null)) {
+ throw new Error("Root element needs a name");
+ }
+ if (this.rootObject) {
+ this.children = [];
+ this.rootObject = null;
+ }
+ if (xmldec != null) {
+ doc = new XMLBuilder(name, xmldec, doctype);
+ return doc.root();
+ }
+ name = '' + name || '';
+ root = new XMLFragment(this, name, {});
+ root.isRoot = true;
+ root.documentObject = this;
+ this.children.push(root);
+ this.rootObject = root;
+ return root;
+ };
+
+ XMLBuilder.prototype.root = function() {
+ return this.rootObject;
+ };
+
+ XMLBuilder.prototype.end = function(options) {
+ return toString(options);
+ };
+
+ XMLBuilder.prototype.toString = function(options) {
+ var child, r, _i, _len, _ref;
+ r = '';
+ _ref = this.children;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ child = _ref[_i];
+ r += child.toString(options);
+ }
+ return r;
+ };
+
+ XMLBuilder.prototype.is = function(obj, type) {
+ var clas;
+ clas = Object.prototype.toString.call(obj).slice(8, -1);
+ return (obj != null) && clas === type;
+ };
+
+ return XMLBuilder;
+
+ })();
+
+ module.exports = XMLBuilder;
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/XMLFragment.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/XMLFragment.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/XMLFragment.js
new file mode 100644
index 0000000..7a0fff5
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/XMLFragment.js
@@ -0,0 +1,422 @@
+// Generated by CoffeeScript 1.3.3
+(function() {
+ var XMLFragment,
+ __hasProp = {}.hasOwnProperty;
+
+ XMLFragment = (function() {
+
+ function XMLFragment(parent, name, attributes, text) {
+ this.isRoot = false;
+ this.documentObject = null;
+ this.parent = parent;
+ this.name = name;
+ this.attributes = attributes;
+ this.value = text;
+ this.children = [];
+ }
+
+ XMLFragment.prototype.element = function(name, attributes, text) {
+ var child, key, val, _ref, _ref1;
+ if (!(name != null)) {
+ throw new Error("Missing element name");
+ }
+ name = '' + name || '';
+ this.assertLegalChar(name);
+ if (attributes == null) {
+ attributes = {};
+ }
+ if (this.is(attributes, 'String') && this.is(text, 'Object')) {
+ _ref = [text, attributes], attributes = _ref[0], text = _ref[1];
+ } else if (this.is(attributes, 'String')) {
+ _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1];
+ }
+ for (key in attributes) {
+ if (!__hasProp.call(attributes, key)) continue;
+ val = attributes[key];
+ val = '' + val || '';
+ attributes[key] = this.escape(val);
+ }
+ child = new XMLFragment(this, name, attributes);
+ if (text != null) {
+ text = '' + text || '';
+ text = this.escape(text);
+ this.assertLegalChar(text);
+ child.raw(text);
+ }
+ this.children.push(child);
+ return child;
+ };
+
+ XMLFragment.prototype.insertBefore = function(name, attributes, text) {
+ var child, i, key, val, _ref, _ref1;
+ if (this.isRoot) {
+ throw new Error("Cannot insert elements at root level");
+ }
+ if (!(name != null)) {
+ throw new Error("Missing element name");
+ }
+ name = '' + name || '';
+ this.assertLegalChar(name);
+ if (attributes == null) {
+ attributes = {};
+ }
+ if (this.is(attributes, 'String') && this.is(text, 'Object')) {
+ _ref = [text, attributes], attributes = _ref[0], text = _ref[1];
+ } else if (this.is(attributes, 'String')) {
+ _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1];
+ }
+ for (key in attributes) {
+ if (!__hasProp.call(attributes, key)) continue;
+ val = attributes[key];
+ val = '' + val || '';
+ attributes[key] = this.escape(val);
+ }
+ child = new XMLFragment(this.parent, name, attributes);
+ if (text != null) {
+ text = '' + text || '';
+ text = this.escape(text);
+ this.assertLegalChar(text);
+ child.raw(text);
+ }
+ i = this.parent.children.indexOf(this);
+ this.parent.children.splice(i, 0, child);
+ return child;
+ };
+
+ XMLFragment.prototype.insertAfter = function(name, attributes, text) {
+ var child, i, key, val, _ref, _ref1;
+ if (this.isRoot) {
+ throw new Error("Cannot insert elements at root level");
+ }
+ if (!(name != null)) {
+ throw new Error("Missing element name");
+ }
+ name = '' + name || '';
+ this.assertLegalChar(name);
+ if (attributes == null) {
+ attributes = {};
+ }
+ if (this.is(attributes, 'String') && this.is(text, 'Object')) {
+ _ref = [text, attributes], attributes = _ref[0], text = _ref[1];
+ } else if (this.is(attributes, 'String')) {
+ _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1];
+ }
+ for (key in attributes) {
+ if (!__hasProp.call(attributes, key)) continue;
+ val = attributes[key];
+ val = '' + val || '';
+ attributes[key] = this.escape(val);
+ }
+ child = new XMLFragment(this.parent, name, attributes);
+ if (text != null) {
+ text = '' + text || '';
+ text = this.escape(text);
+ this.assertLegalChar(text);
+ child.raw(text);
+ }
+ i = this.parent.children.indexOf(this);
+ this.parent.children.splice(i + 1, 0, child);
+ return child;
+ };
+
+ XMLFragment.prototype.remove = function() {
+ var i, _ref;
+ if (this.isRoot) {
+ throw new Error("Cannot remove the root element");
+ }
+ i = this.parent.children.indexOf(this);
+ [].splice.apply(this.parent.children, [i, i - i + 1].concat(_ref = [])), _ref;
+ return this.parent;
+ };
+
+ XMLFragment.prototype.text = function(value) {
+ var child;
+ if (!(value != null)) {
+ throw new Error("Missing element text");
+ }
+ value = '' + value || '';
+ value = this.escape(value);
+ this.assertLegalChar(value);
+ child = new XMLFragment(this, '', {}, value);
+ this.children.push(child);
+ return this;
+ };
+
+ XMLFragment.prototype.cdata = function(value) {
+ var child;
+ if (!(value != null)) {
+ throw new Error("Missing CDATA text");
+ }
+ value = '' + value || '';
+ this.assertLegalChar(value);
+ if (value.match(/]]>/)) {
+ throw new Error("Invalid CDATA text: " + value);
+ }
+ child = new XMLFragment(this, '', {}, '<![CDATA[' + value + ']]>');
+ this.children.push(child);
+ return this;
+ };
+
+ XMLFragment.prototype.comment = function(value) {
+ var child;
+ if (!(value != null)) {
+ throw new Error("Missing comment text");
+ }
+ value = '' + value || '';
+ value = this.escape(value);
+ this.assertLegalChar(value);
+ if (value.match(/--/)) {
+ throw new Error("Comment text cannot contain double-hypen: " + value);
+ }
+ child = new XMLFragment(this, '', {}, '<!-- ' + value + ' -->');
+ this.children.push(child);
+ return this;
+ };
+
+ XMLFragment.prototype.raw = function(value) {
+ var child;
+ if (!(value != null)) {
+ throw new Error("Missing raw text");
+ }
+ value = '' + value || '';
+ child = new XMLFragment(this, '', {}, value);
+ this.children.push(child);
+ return this;
+ };
+
+ XMLFragment.prototype.up = function() {
+ if (this.isRoot) {
+ throw new Error("This node has no parent. Use doc() if you need to get the document object.");
+ }
+ return this.parent;
+ };
+
+ XMLFragment.prototype.root = function() {
+ var child;
+ if (this.isRoot) {
+ return this;
+ }
+ child = this.parent;
+ while (!child.isRoot) {
+ child = child.parent;
+ }
+ return child;
+ };
+
+ XMLFragment.prototype.document = function() {
+ return this.root().documentObject;
+ };
+
+ XMLFragment.prototype.end = function(options) {
+ return this.document().toString(options);
+ };
+
+ XMLFragment.prototype.prev = function() {
+ var i;
+ if (this.isRoot) {
+ throw new Error("Root node has no siblings");
+ }
+ i = this.parent.children.indexOf(this);
+ if (i < 1) {
+ throw new Error("Already at the first node");
+ }
+ return this.parent.children[i - 1];
+ };
+
+ XMLFragment.prototype.next = function() {
+ var i;
+ if (this.isRoot) {
+ throw new Error("Root node has no siblings");
+ }
+ i = this.parent.children.indexOf(this);
+ if (i === -1 || i === this.parent.children.length - 1) {
+ throw new Error("Already at the last node");
+ }
+ return this.parent.children[i + 1];
+ };
+
+ XMLFragment.prototype.clone = function(deep) {
+ var clonedSelf;
+ clonedSelf = new XMLFragment(this.parent, this.name, this.attributes, this.value);
+ if (deep) {
+ this.children.forEach(function(child) {
+ var clonedChild;
+ clonedChild = child.clone(deep);
+ clonedChild.parent = clonedSelf;
+ return clonedSelf.children.push(clonedChild);
+ });
+ }
+ return clonedSelf;
+ };
+
+ XMLFragment.prototype.importXMLBuilder = function(xmlbuilder) {
+ var clonedRoot;
+ clonedRoot = xmlbuilder.root().clone(true);
+ clonedRoot.parent = this;
+ this.children.push(clonedRoot);
+ clonedRoot.isRoot = false;
+ return this;
+ };
+
+ XMLFragment.prototype.attribute = function(name, value) {
+ var _ref;
+ if (!(name != null)) {
+ throw new Error("Missing attribute name");
+ }
+ if (!(value != null)) {
+ throw new Error("Missing attribute value");
+ }
+ name = '' + name || '';
+ value = '' + value || '';
+ if ((_ref = this.attributes) == null) {
+ this.attributes = {};
+ }
+ this.attributes[name] = this.escape(value);
+ return this;
+ };
+
+ XMLFragment.prototype.removeAttribute = function(name) {
+ if (!(name != null)) {
+ throw new Error("Missing attribute name");
+ }
+ name = '' + name || '';
+ delete this.attributes[name];
+ return this;
+ };
+
+ XMLFragment.prototype.toString = function(options, level) {
+ var attName, attValue, child, indent, newline, pretty, r, space, _i, _len, _ref, _ref1;
+ pretty = (options != null) && options.pretty || false;
+ indent = (options != null) && options.indent || ' ';
+ newline = (options != null) && options.newline || '\n';
+ level || (level = 0);
+ space = new Array(level + 1).join(indent);
+ r = '';
+ if (pretty) {
+ r += space;
+ }
+ if (!(this.value != null)) {
+ r += '<' + this.name;
+ } else {
+ r += '' + this.value;
+ }
+ _ref = this.attributes;
+ for (attName in _ref) {
+ attValue = _ref[attName];
+ if (this.name === '!DOCTYPE') {
+ r += ' ' + attValue;
+ } else {
+ r += ' ' + attName + '="' + attValue + '"';
+ }
+ }
+ if (this.children.length === 0) {
+ if (!(this.value != null)) {
+ r += this.name === '?xml' ? '?>' : this.name === '!DOCTYPE' ? '>' : '/>';
+ }
+ if (pretty) {
+ r += newline;
+ }
+ } else if (pretty && this.children.length === 1 && this.children[0].value) {
+ r += '>';
+ r += this.children[0].value;
+ r += '</' + this.name + '>';
+ r += newline;
+ } else {
+ r += '>';
+ if (pretty) {
+ r += newline;
+ }
+ _ref1 = this.children;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ child = _ref1[_i];
+ r += child.toString(options, level + 1);
+ }
+ if (pretty) {
+ r += space;
+ }
+ r += '</' + this.name + '>';
+ if (pretty) {
+ r += newline;
+ }
+ }
+ return r;
+ };
+
+ XMLFragment.prototype.escape = function(str) {
+ return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/'/g, ''').replace(/"/g, '"');
+ };
+
+ XMLFragment.prototype.assertLegalChar = function(str) {
+ var chars, chr;
+ chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/;
+ chr = str.match(chars);
+ if (chr) {
+ throw new Error("Invalid character (" + chr + ") in string: " + str);
+ }
+ };
+
+ XMLFragment.prototype.is = function(obj, type) {
+ var clas;
+ clas = Object.prototype.toString.call(obj).slice(8, -1);
+ return (obj != null) && clas === type;
+ };
+
+ XMLFragment.prototype.ele = function(name, attributes, text) {
+ return this.element(name, attributes, text);
+ };
+
+ XMLFragment.prototype.txt = function(value) {
+ return this.text(value);
+ };
+
+ XMLFragment.prototype.dat = function(value) {
+ return this.cdata(value);
+ };
+
+ XMLFragment.prototype.att = function(name, value) {
+ return this.attribute(name, value);
+ };
+
+ XMLFragment.prototype.com = function(value) {
+ return this.comment(value);
+ };
+
+ XMLFragment.prototype.doc = function() {
+ return this.document();
+ };
+
+ XMLFragment.prototype.e = function(name, attributes, text) {
+ return this.element(name, attributes, text);
+ };
+
+ XMLFragment.prototype.t = function(value) {
+ return this.text(value);
+ };
+
+ XMLFragment.prototype.d = function(value) {
+ return this.cdata(value);
+ };
+
+ XMLFragment.prototype.a = function(name, value) {
+ return this.attribute(name, value);
+ };
+
+ XMLFragment.prototype.c = function(value) {
+ return this.comment(value);
+ };
+
+ XMLFragment.prototype.r = function(value) {
+ return this.raw(value);
+ };
+
+ XMLFragment.prototype.u = function() {
+ return this.up();
+ };
+
+ return XMLFragment;
+
+ })();
+
+ module.exports = XMLFragment;
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/index.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/index.js
new file mode 100644
index 0000000..a930f5b
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/lib/index.js
@@ -0,0 +1,15 @@
+// Generated by CoffeeScript 1.3.3
+(function() {
+ var XMLBuilder;
+
+ XMLBuilder = require('./XMLBuilder');
+
+ module.exports.create = function(name, xmldec, doctype) {
+ if (name != null) {
+ return new XMLBuilder(name, xmldec, doctype).root();
+ } else {
+ return new XMLBuilder();
+ }
+ };
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/package.json b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/package.json
new file mode 100644
index 0000000..dcc7fad
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmlbuilder/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "xmlbuilder",
+ "version": "0.4.2",
+ "keywords": [
+ "xml",
+ "xmlbuilder"
+ ],
+ "homepage": "http://github.com/oozcitak/xmlbuilder-js",
+ "description": "An XML builder for node.js",
+ "author": {
+ "name": "Ozgur Ozcitak",
+ "email": "oozcitak@gmail.com"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "http://opensource.org/licenses/mit-license.php"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/oozcitak/xmlbuilder-js.git"
+ },
+ "bugs": {
+ "url": "http://github.com/oozcitak/xmlbuilder-js/issues"
+ },
+ "main": "./lib/index",
+ "engines": {
+ "node": ">=0.2.0"
+ },
+ "devDependencies": {
+ "coffee-script": "1.1.x"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "readme": "# xmlbuilder-js\n\nAn XMLBuilder for [node.js](http://nodejs.org/) similar to \n[java-xmlbuilder](http://code.google.com/p/java-xmlbuilder/).\n\n[](http://travis-ci.org/oozcitak/xmlbuilder-js)\n\n### Installation:\n\n``` sh\nnpm install xmlbuilder\n```\n\n### Important:\n\nI had to break compatibility while adding multiple instances in 0.1.3. \nAs a result, version from v0.1.3 are **not** compatible with previous versions.\n\n### Usage:\n\n``` js\nvar builder = require('xmlbuilder');\nvar xml = builder.create('root')\n .ele('xmlbuilder', {'for': 'node-js'})\n .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')\n .end({ pretty: true});\n \nconsole.log(xml);\n```\n\nwill result in:\n\n``` xml\n<?xml version=\"1.0\"?>\n<root>\n <xmlbuilder for=\"node-js\">\n <repo type=\"git\">git://github.com/oozcitak/xmlbuilder-js.git</repo>\n </xmlbuilder>\n</root>\n```\n\nIf yo
u need to do some processing:\n\n``` js\nvar root = builder.create('squares');\nroot.com('f(x) = x^2');\nfor(var i = 1; i <= 5; i++)\n{\n var item = root.ele('data');\n item.att('x', i);\n item.att('y', i * i);\n}\n```\n\nThis will result in:\n\n``` xml\n<?xml version=\"1.0\"?>\n<squares>\n <!-- f(x) = x^2 -->\n <data x=\"1\" y=\"1\"/>\n <data x=\"2\" y=\"4\"/>\n <data x=\"3\" y=\"9\"/>\n <data x=\"4\" y=\"16\"/>\n <data x=\"5\" y=\"25\"/>\n</squares>\n```\n\nSee the [Usage](https://github.com/oozcitak/xmlbuilder-js/wiki/Usage) page in the wiki for more detailed instructions.\n\n### License:\n\n`xmlbuilder-js` is [MIT Licensed](http://opensource.org/licenses/mit-license.php).\n",
+ "readmeFilename": "README.md",
+ "_id": "xmlbuilder@0.4.2",
+ "_from": "xmlbuilder@0.4.x"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.npmignore b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.npmignore
new file mode 100644
index 0000000..69b007c
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.npmignore
@@ -0,0 +1,2 @@
+/node_modules
+/.proof.out
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.project
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.project b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.project
new file mode 100644
index 0000000..49691ce
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>xmldom</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.travis.yml b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.travis.yml
new file mode 100644
index 0000000..245cc5d
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/.travis.yml
@@ -0,0 +1,18 @@
+language: node_js
+
+node_js:
+ - 0.8
+
+branches:
+ only:
+ - master
+ - proof
+ - travis-ci
+
+# Not using `npm install --dev` because it is recursive. It will pull in the all
+# development dependencies for CoffeeScript. Way too much spew in the Travis CI
+# build output.
+
+before_install:
+ - npm install
+ - npm install istanbul coveralls
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/__package__.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/__package__.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/__package__.js
new file mode 100644
index 0000000..93af349
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/__package__.js
@@ -0,0 +1,4 @@
+this.addScript('dom.js',['DOMImplementation','XMLSerializer']);
+this.addScript('dom-parser.js',['DOMHandler','DOMParser'],
+ ['DOMImplementation','XMLReader']);
+this.addScript('sax.js','XMLReader');
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/changelog
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/changelog b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/changelog
new file mode 100644
index 0000000..ab815bb
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/changelog
@@ -0,0 +1,14 @@
+### Version 0.1.16
+
+Sat May 4 14:58:03 UTC 2013
+
+ * Correctly handle multibyte Unicode greater than two byts. #57. #56.
+ * Initial unit testing and test coverage. #53. #46. #19.
+ * Create Bower `component.json` #52.
+
+### Version 0.1.8
+
+ * Add: some test case from node-o3-xml(excludes xpath support)
+ * Fix: remove existed attribute before setting (bug introduced in v0.1.5)
+ * Fix: index direct access for childNodes and any NodeList collection(not w3c standard)
+ * Fix: remove last child bug
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/component.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/component.json b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/component.json
new file mode 100644
index 0000000..93b4d57
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/component.json
@@ -0,0 +1,10 @@
+{
+ "name": "xmldom",
+ "version": "0.1.15",
+ "main": "dom-parser.js",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "components"
+ ]
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/dom-parser.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/dom-parser.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/dom-parser.js
new file mode 100644
index 0000000..29fa644
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/dom-parser.js
@@ -0,0 +1,253 @@
+function DOMParser(options){
+ this.options =
+ options != true && //To the version (0.1.12) compatible
+ options ||{locator:{}};
+
+}
+DOMParser.prototype.parseFromString = function(source,mimeType){
+ var sax = new XMLReader();
+ var options = this.options;
+ var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler
+ var errorHandler = options.errorHandler;
+ var locator = options.locator;
+ var defaultNSMap = {};
+ var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"}
+ if(locator){
+ domBuilder.setDocumentLocator(locator)
+ }
+
+ sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
+ sax.domBuilder = options.domBuilder || domBuilder;
+ if(/\/x?html?$/.test(mimeType)){
+ entityMap.nbsp = '\xa0';
+ entityMap.copy = '\xa9';
+ defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
+ }
+ sax.parse(source,defaultNSMap,entityMap);
+ return domBuilder.document;
+}
+function buildErrorHandler(errorImpl,domBuilder,locator){
+ if(!errorImpl){
+ if(domBuilder instanceof DOMHandler){
+ return domBuilder;
+ }
+ errorImpl = domBuilder ;
+ }
+ var errorHandler = {}
+ var isCallback = errorImpl instanceof Function;
+ locator = locator||{}
+ function build(key){
+ var fn = errorImpl[key];
+ if(!fn){
+ if(isCallback){
+ fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;
+ }else{
+ var i=arguments.length;
+ while(--i){
+ if(fn = errorImpl[arguments[i]]){
+ break;
+ }
+ }
+ }
+ }
+ errorHandler[key] = fn && function(msg){
+ fn(msg+_locator(locator));
+ }||function(){};
+ }
+ build('warning','warn');
+ build('error','warn','warning');
+ build('fatalError','warn','warning','error');
+ return errorHandler;
+}
+/**
+ * +ContentHandler+ErrorHandler
+ * +LexicalHandler+EntityResolver2
+ * -DeclHandler-DTDHandler
+ *
+ * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler
+ * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html
+ */
+function DOMHandler() {
+ this.cdata = false;
+}
+function position(locator,node){
+ node.lineNumber = locator.lineNumber;
+ node.columnNumber = locator.columnNumber;
+}
+/**
+ * @see org.xml.sax.ContentHandler#startDocument
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html
+ */
+DOMHandler.prototype = {
+ startDocument : function() {
+ this.document = new DOMImplementation().createDocument(null, null, null);
+ if (this.locator) {
+ this.document.documentURI = this.locator.systemId;
+ }
+ },
+ startElement:function(namespaceURI, localName, qName, attrs) {
+ var doc = this.document;
+ var el = doc.createElementNS(namespaceURI, qName||localName);
+ var len = attrs.length;
+ appendElement(this, el);
+ this.currentElement = el;
+
+ this.locator && position(this.locator,el)
+ for (var i = 0 ; i < len; i++) {
+ var namespaceURI = attrs.getURI(i);
+ var value = attrs.getValue(i);
+ var qName = attrs.getQName(i);
+ var attr = doc.createAttributeNS(namespaceURI, qName);
+ if( attr.getOffset){
+ position(attr.getOffset(1),attr)
+ }
+ attr.value = attr.nodeValue = value;
+ el.setAttributeNode(attr)
+ }
+ },
+ endElement:function(namespaceURI, localName, qName) {
+ var current = this.currentElement
+ var tagName = current.tagName;
+ this.currentElement = current.parentNode;
+ },
+ startPrefixMapping:function(prefix, uri) {
+ },
+ endPrefixMapping:function(prefix) {
+ },
+ processingInstruction:function(target, data) {
+ var ins = this.document.createProcessingInstruction(target, data);
+ this.locator && position(this.locator,ins)
+ appendElement(this, ins);
+ },
+ ignorableWhitespace:function(ch, start, length) {
+ },
+ characters:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ //console.log(chars)
+ if(this.currentElement && chars){
+ if (this.cdata) {
+ var charNode = this.document.createCDATASection(chars);
+ this.currentElement.appendChild(charNode);
+ } else {
+ var charNode = this.document.createTextNode(chars);
+ this.currentElement.appendChild(charNode);
+ }
+ this.locator && position(this.locator,charNode)
+ }
+ },
+ skippedEntity:function(name) {
+ },
+ endDocument:function() {
+ this.document.normalize();
+ },
+ setDocumentLocator:function (locator) {
+ if(this.locator = locator){// && !('lineNumber' in locator)){
+ locator.lineNumber = 0;
+ }
+ },
+ //LexicalHandler
+ comment:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ var comm = this.document.createComment(chars);
+ this.locator && position(this.locator,comm)
+ appendElement(this, comm);
+ },
+
+ startCDATA:function() {
+ //used in characters() methods
+ this.cdata = true;
+ },
+ endCDATA:function() {
+ this.cdata = false;
+ },
+
+ startDTD:function(name, publicId, systemId) {
+ var impl = this.document.implementation;
+ if (impl && impl.createDocumentType) {
+ var dt = impl.createDocumentType(name, publicId, systemId);
+ this.locator && position(this.locator,dt)
+ appendElement(this, dt);
+ }
+ },
+ /**
+ * @see org.xml.sax.ErrorHandler
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html
+ */
+ warning:function(error) {
+ console.warn(error,_locator(this.locator));
+ },
+ error:function(error) {
+ console.error(error,_locator(this.locator));
+ },
+ fatalError:function(error) {
+ console.error(error,_locator(this.locator));
+ throw error;
+ }
+}
+function _locator(l){
+ if(l){
+ return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'
+ }
+}
+function _toString(chars,start,length){
+ if(typeof chars == 'string'){
+ return chars.substr(start,length)
+ }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
+ if(chars.length >= start+length || start){
+ return new java.lang.String(chars,start,length)+'';
+ }
+ return chars;
+ }
+}
+
+/*
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html
+ * used method of org.xml.sax.ext.LexicalHandler:
+ * #comment(chars, start, length)
+ * #startCDATA()
+ * #endCDATA()
+ * #startDTD(name, publicId, systemId)
+ *
+ *
+ * IGNORED method of org.xml.sax.ext.LexicalHandler:
+ * #endDTD()
+ * #startEntity(name)
+ * #endEntity(name)
+ *
+ *
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html
+ * IGNORED method of org.xml.sax.ext.DeclHandler
+ * #attributeDecl(eName, aName, type, mode, value)
+ * #elementDecl(name, model)
+ * #externalEntityDecl(name, publicId, systemId)
+ * #internalEntityDecl(name, value)
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html
+ * IGNORED method of org.xml.sax.EntityResolver2
+ * #resolveEntity(String name,String publicId,String baseURI,String systemId)
+ * #resolveEntity(publicId, systemId)
+ * #getExternalSubset(name, baseURI)
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html
+ * IGNORED method of org.xml.sax.DTDHandler
+ * #notationDecl(name, publicId, systemId) {};
+ * #unparsedEntityDecl(name, publicId, systemId, notationName) {};
+ */
+"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){
+ DOMHandler.prototype[key] = function(){return null}
+})
+
+/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */
+function appendElement (hander,node) {
+ if (!hander.currentElement) {
+ hander.document.appendChild(node);
+ } else {
+ hander.currentElement.appendChild(node);
+ }
+}//appendChild and setAttributeNS are preformance key
+
+if(typeof require == 'function'){
+ var XMLReader = require('./sax').XMLReader;
+ var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation;
+ exports.XMLSerializer = require('./dom').XMLSerializer ;
+ exports.DOMParser = DOMParser;
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/dom.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/dom.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/dom.js
new file mode 100644
index 0000000..a8e1d16
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/dom.js
@@ -0,0 +1,1138 @@
+/*
+ * DOM Level 2
+ * Object DOMException
+ * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
+ */
+
+function copy(src,dest){
+ for(var p in src){
+ dest[p] = src[p];
+ }
+}
+/**
+^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));?
+^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));?
+ */
+function _extends(Class,Super){
+ var pt = Class.prototype;
+ if(Object.create){
+ var ppt = Object.create(Super.prototype)
+ pt.__proto__ = ppt;
+ }
+ if(!(pt instanceof Super)){
+ function t(){};
+ t.prototype = Super.prototype;
+ t = new t();
+ copy(pt,t);
+ Class.prototype = pt = t;
+ }
+ if(pt.constructor != Class){
+ if(typeof Class != 'function'){
+ console.error("unknow Class:"+Class)
+ }
+ pt.constructor = Class
+ }
+}
+var htmlns = 'http://www.w3.org/1999/xhtml' ;
+// Node Types
+var NodeType = {}
+var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
+var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
+var TEXT_NODE = NodeType.TEXT_NODE = 3;
+var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
+var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
+var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
+var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
+var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
+var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
+var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
+var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
+var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
+
+// ExceptionCode
+var ExceptionCode = {}
+var ExceptionMessage = {};
+var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1);
+var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
+var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
+var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
+var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
+var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
+var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
+var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
+var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
+var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
+//level2
+var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
+var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
+var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
+var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
+var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);
+
+
+function DOMException(code, message) {
+ if(message instanceof Error){
+ var error = message;
+ }else{
+ error = this;
+ Error.call(this, ExceptionMessage[code]);
+ this.message = ExceptionMessage[code];
+ if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
+ }
+ error.code = code;
+ if(message) this.message = this.message + ": " + message;
+ return error;
+};
+DOMException.prototype = Error.prototype;
+copy(ExceptionCode,DOMException)
+/**
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177
+ * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.
+ * The items in the NodeList are accessible via an integral index, starting from 0.
+ */
+function NodeList() {
+};
+NodeList.prototype = {
+ /**
+ * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.
+ * @standard level1
+ */
+ length:0,
+ /**
+ * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.
+ * @standard level1
+ * @param index unsigned long
+ * Index into the collection.
+ * @return Node
+ * The node at the indexth position in the NodeList, or null if that is not a valid index.
+ */
+ item: function(index) {
+ return this[index] || null;
+ }
+};
+function LiveNodeList(node,refresh){
+ this._node = node;
+ this._refresh = refresh
+ _updateLiveList(this);
+}
+function _updateLiveList(list){
+ var inc = list._node._inc || list._node.ownerDocument._inc;
+ if(list._inc != inc){
+ var ls = list._refresh(list._node);
+ //console.log(ls.length)
+ __set__(list,'length',ls.length);
+ copy(ls,list);
+ list._inc = inc;
+ }
+}
+LiveNodeList.prototype.item = function(i){
+ _updateLiveList(this);
+ return this[i];
+}
+
+_extends(LiveNodeList,NodeList);
+/**
+ *
+ * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.
+ * NamedNodeMap objects in the DOM are live.
+ * used for attributes or DocumentType entities
+ */
+function NamedNodeMap() {
+};
+
+function _findNodeIndex(list,node){
+ var i = list.length;
+ while(i--){
+ if(list[i] === node){return i}
+ }
+}
+
+function _addNamedNode(el,list,newAttr,oldAttr){
+ if(oldAttr){
+ list[_findNodeIndex(list,oldAttr)] = newAttr;
+ }else{
+ list[list.length++] = newAttr;
+ }
+ if(el){
+ newAttr.ownerElement = el;
+ var doc = el.ownerDocument;
+ if(doc){
+ oldAttr && _onRemoveAttribute(doc,el,oldAttr);
+ _onAddAttribute(doc,el,newAttr);
+ }
+ }
+}
+function _removeNamedNode(el,list,attr){
+ var i = _findNodeIndex(list,attr);
+ if(i>=0){
+ var lastIndex = list.length-1
+ while(i<lastIndex){
+ list[i] = list[++i]
+ }
+ list.length = lastIndex;
+ if(el){
+ var doc = el.ownerDocument;
+ if(doc){
+ _onRemoveAttribute(doc,el,attr);
+ attr.ownerElement = null;
+ }
+ }
+ }else{
+ throw DOMException(NOT_FOUND_ERR,new Error())
+ }
+}
+NamedNodeMap.prototype = {
+ length:0,
+ item:NodeList.prototype.item,
+ getNamedItem: function(key) {
+// if(key.indexOf(':')>0 || key == 'xmlns'){
+// return null;
+// }
+ var i = this.length;
+ while(i--){
+ var attr = this[i];
+ if(attr.nodeName == key){
+ return attr;
+ }
+ }
+ },
+ setNamedItem: function(attr) {
+ var el = attr.ownerElement;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ var oldAttr = this.getNamedItem(attr.nodeName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+ /* returns Node */
+ setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR
+ var el = attr.ownerElement, oldAttr;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+
+ /* returns Node */
+ removeNamedItem: function(key) {
+ var attr = this.getNamedItem(key);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+
+
+ },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
+
+ //for level2
+ removeNamedItemNS:function(namespaceURI,localName){
+ var attr = this.getNamedItemNS(namespaceURI,localName);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+ },
+ getNamedItemNS: function(namespaceURI, localName) {
+ var i = this.length;
+ while(i--){
+ var node = this[i];
+ if(node.localName == localName && node.namespaceURI == namespaceURI){
+ return node;
+ }
+ }
+ return null;
+ }
+};
+/**
+ * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490
+ */
+function DOMImplementation(/* Object */ features) {
+ this._features = {};
+ if (features) {
+ for (var feature in features) {
+ this._features = features[feature];
+ }
+ }
+};
+
+DOMImplementation.prototype = {
+ hasFeature: function(/* string */ feature, /* string */ version) {
+ var versions = this._features[feature.toLowerCase()];
+ if (versions && (!version || version in versions)) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ // Introduced in DOM Level 2:
+ createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
+ var doc = new Document();
+ doc.doctype = doctype;
+ if(doctype){
+ doc.appendChild(doctype);
+ }
+ doc.implementation = this;
+ doc.childNodes = new NodeList();
+ if(qualifiedName){
+ var root = doc.createElementNS(namespaceURI,qualifiedName);
+ doc.appendChild(root);
+ }
+ return doc;
+ },
+ // Introduced in DOM Level 2:
+ createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
+ var node = new DocumentType();
+ node.name = qualifiedName;
+ node.nodeName = qualifiedName;
+ node.publicId = publicId;
+ node.systemId = systemId;
+ // Introduced in DOM Level 2:
+ //readonly attribute DOMString internalSubset;
+
+ //TODO:..
+ // readonly attribute NamedNodeMap entities;
+ // readonly attribute NamedNodeMap notations;
+ return node;
+ }
+};
+
+
+/**
+ * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
+ */
+
+function Node() {
+};
+
+Node.prototype = {
+ firstChild : null,
+ lastChild : null,
+ previousSibling : null,
+ nextSibling : null,
+ attributes : null,
+ parentNode : null,
+ childNodes : null,
+ ownerDocument : null,
+ nodeValue : null,
+ namespaceURI : null,
+ prefix : null,
+ localName : null,
+ // Modified in DOM Level 2:
+ insertBefore:function(newChild, refChild){//raises
+ return _insertBefore(this,newChild,refChild);
+ },
+ replaceChild:function(newChild, oldChild){//raises
+ this.insertBefore(newChild,oldChild);
+ if(oldChild){
+ this.removeChild(oldChild);
+ }
+ },
+ removeChild:function(oldChild){
+ return _removeChild(this,oldChild);
+ },
+ appendChild:function(newChild){
+ return this.insertBefore(newChild,null);
+ },
+ hasChildNodes:function(){
+ return this.firstChild != null;
+ },
+ cloneNode:function(deep){
+ return cloneNode(this.ownerDocument||this,this,deep);
+ },
+ // Modified in DOM Level 2:
+ normalize:function(){
+ var child = this.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
+ this.removeChild(next);
+ child.appendData(next.data);
+ }else{
+ child.normalize();
+ child = next;
+ }
+ }
+ },
+ // Introduced in DOM Level 2:
+ isSupported:function(feature, version){
+ return this.ownerDocument.implementation.hasFeature(feature,version);
+ },
+ // Introduced in DOM Level 2:
+ hasAttributes:function(){
+ return this.attributes.length>0;
+ },
+ lookupPrefix:function(namespaceURI){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ //console.dir(map)
+ if(map){
+ for(var n in map){
+ if(map[n] == namespaceURI){
+ return n;
+ }
+ }
+ }
+ el = el.nodeType == 2?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ // Introduced in DOM Level 3:
+ lookupNamespaceURI:function(prefix){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ //console.dir(map)
+ if(map){
+ if(prefix in map){
+ return map[prefix] ;
+ }
+ }
+ el = el.nodeType == 2?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ // Introduced in DOM Level 3:
+ isDefaultNamespace:function(namespaceURI){
+ var prefix = this.lookupPrefix(namespaceURI);
+ return prefix == null;
+ }
+};
+
+
+function _xmlEncoder(c){
+ return c == '<' && '<' ||
+ c == '>' && '>' ||
+ c == '&' && '&' ||
+ c == '"' && '"' ||
+ '&#'+c.charCodeAt()+';'
+}
+
+
+copy(NodeType,Node);
+copy(NodeType,Node.prototype);
+
+/**
+ * @param callback return true for continue,false for break
+ * @return boolean true: break visit;
+ */
+function _visitNode(node,callback){
+ if(callback(node)){
+ return true;
+ }
+ if(node = node.firstChild){
+ do{
+ if(_visitNode(node,callback)){return true}
+ }while(node=node.nextSibling)
+ }
+}
+
+
+
+function Document(){
+}
+function _onAddAttribute(doc,el,newAttr){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ //update namespace
+ el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value
+ }
+}
+function _onRemoveAttribute(doc,el,newAttr,remove){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ //update namespace
+ delete el._nsMap[newAttr.prefix?newAttr.localName:'']
+ }
+}
+function _onUpdateChild(doc,el,newChild){
+ if(doc && doc._inc){
+ doc._inc++;
+ //update childNodes
+ var cs = el.childNodes;
+ if(newChild){
+ cs[cs.length++] = newChild;
+ }else{
+ //console.log(1)
+ var child = el.firstChild;
+ var i = 0;
+ while(child){
+ cs[i++] = child;
+ child =child.nextSibling;
+ }
+ cs.length = i;
+ }
+ }
+}
+
+/**
+ * attributes;
+ * children;
+ *
+ * writeable properties:
+ * nodeValue,Attr:value,CharacterData:data
+ * prefix
+ */
+function _removeChild(parentNode,child){
+ var previous = child.previousSibling;
+ var next = child.nextSibling;
+ if(previous){
+ previous.nextSibling = next;
+ }else{
+ parentNode.firstChild = next
+ }
+ if(next){
+ next.previousSibling = previous;
+ }else{
+ parentNode.lastChild = previous;
+ }
+ _onUpdateChild(parentNode.ownerDocument,parentNode);
+ return child;
+}
+/**
+ * preformance key(refChild == null)
+ */
+function _insertBefore(parentNode,newChild,nextChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ cp.removeChild(newChild);//remove and update
+ }
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ var newFirst = newChild.firstChild;
+ if (newFirst == null) {
+ return newChild;
+ }
+ var newLast = newChild.lastChild;
+ }else{
+ newFirst = newLast = newChild;
+ }
+ var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
+
+ newFirst.previousSibling = pre;
+ newLast.nextSibling = nextChild;
+
+
+ if(pre){
+ pre.nextSibling = newFirst;
+ }else{
+ parentNode.firstChild = newFirst;
+ }
+ if(nextChild == null){
+ parentNode.lastChild = newLast;
+ }else{
+ nextChild.previousSibling = newLast;
+ }
+ do{
+ newFirst.parentNode = parentNode;
+ }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
+ _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);
+ //console.log(parentNode.lastChild.nextSibling == null)
+ if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
+ newChild.firstChild = newChild.lastChild = null;
+ }
+ return newChild;
+}
+function _appendSingleChild(parentNode,newChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ var pre = parentNode.lastChild;
+ cp.removeChild(newChild);//remove and update
+ var pre = parentNode.lastChild;
+ }
+ var pre = parentNode.lastChild;
+ newChild.parentNode = parentNode;
+ newChild.previousSibling = pre;
+ newChild.nextSibling = null;
+ if(pre){
+ pre.nextSibling = newChild;
+ }else{
+ parentNode.firstChild = newChild;
+ }
+ parentNode.lastChild = newChild;
+ _onUpdateChild(parentNode.ownerDocument,parentNode,newChild);
+ return newChild;
+ //console.log("__aa",parentNode.lastChild.nextSibling == null)
+}
+Document.prototype = {
+ //implementation : null,
+ nodeName : '#document',
+ nodeType : DOCUMENT_NODE,
+ doctype : null,
+ documentElement : null,
+ _inc : 1,
+
+ insertBefore : function(newChild, refChild){//raises
+ if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){
+ var child = newChild.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ this.insertBefore(child,refChild);
+ child = next;
+ }
+ return newChild;
+ }
+ if(this.documentElement == null && newChild.nodeType == 1){
+ this.documentElement = newChild;
+ }
+
+ return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;
+ },
+ removeChild : function(oldChild){
+ if(this.documentElement == oldChild){
+ this.documentElement = null;
+ }
+ return _removeChild(this,oldChild);
+ },
+ // Introduced in DOM Level 2:
+ importNode : function(importedNode,deep){
+ return importNode(this,importedNode,deep);
+ },
+ // Introduced in DOM Level 2:
+ getElementById : function(id){
+ var rtv = null;
+ _visitNode(this.documentElement,function(node){
+ if(node.nodeType == 1){
+ if(node.getAttribute('id') == id){
+ rtv = node;
+ return true;
+ }
+ }
+ })
+ return rtv;
+ },
+
+ //document factory method:
+ createElement : function(tagName){
+ var node = new Element();
+ node.ownerDocument = this;
+ node.nodeName = tagName;
+ node.tagName = tagName;
+ node.childNodes = new NodeList();
+ var attrs = node.attributes = new NamedNodeMap();
+ attrs._ownerElement = node;
+ return node;
+ },
+ createDocumentFragment : function(){
+ var node = new DocumentFragment();
+ node.ownerDocument = this;
+ node.childNodes = new NodeList();
+ return node;
+ },
+ createTextNode : function(data){
+ var node = new Text();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createComment : function(data){
+ var node = new Comment();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createCDATASection : function(data){
+ var node = new CDATASection();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createProcessingInstruction : function(target,data){
+ var node = new ProcessingInstruction();
+ node.ownerDocument = this;
+ node.tagName = node.target = target;
+ node.nodeValue= node.data = data;
+ return node;
+ },
+ createAttribute : function(name){
+ var node = new Attr();
+ node.ownerDocument = this;
+ node.name = name;
+ node.nodeName = name;
+ node.localName = name;
+ node.specified = true;
+ return node;
+ },
+ createEntityReference : function(name){
+ var node = new EntityReference();
+ node.ownerDocument = this;
+ node.nodeName = name;
+ return node;
+ },
+ // Introduced in DOM Level 2:
+ createElementNS : function(namespaceURI,qualifiedName){
+ var node = new Element();
+ var pl = qualifiedName.split(':');
+ var attrs = node.attributes = new NamedNodeMap();
+ node.childNodes = new NodeList();
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.tagName = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ //el.prefix = null;
+ node.localName = qualifiedName;
+ }
+ attrs._ownerElement = node;
+ return node;
+ },
+ // Introduced in DOM Level 2:
+ createAttributeNS : function(namespaceURI,qualifiedName){
+ var node = new Attr();
+ var pl = qualifiedName.split(':');
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.name = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ node.specified = true;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ //el.prefix = null;
+ node.localName = qualifiedName;
+ }
+ return node;
+ }
+};
+_extends(Document,Node);
+
+
+function Element() {
+ this._nsMap = {};
+};
+Element.prototype = {
+ nodeType : ELEMENT_NODE,
+ hasAttribute : function(name){
+ return this.getAttributeNode(name)!=null;
+ },
+ getAttribute : function(name){
+ var attr = this.getAttributeNode(name);
+ return attr && attr.value || '';
+ },
+ getAttributeNode : function(name){
+ return this.attributes.getNamedItem(name);
+ },
+ setAttribute : function(name, value){
+ var attr = this.ownerDocument.createAttribute(name);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ removeAttribute : function(name){
+ var attr = this.getAttributeNode(name)
+ attr && this.removeAttributeNode(attr);
+ },
+
+ //four real opeartion method
+ appendChild:function(newChild){
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ return this.insertBefore(newChild,null);
+ }else{
+ return _appendSingleChild(this,newChild);
+ }
+ },
+ setAttributeNode : function(newAttr){
+ return this.attributes.setNamedItem(newAttr);
+ },
+ setAttributeNodeNS : function(newAttr){
+ return this.attributes.setNamedItemNS(newAttr);
+ },
+ removeAttributeNode : function(oldAttr){
+ return this.attributes.removeNamedItem(oldAttr.nodeName);
+ },
+ //get real attribute name,and remove it by removeAttributeNode
+ removeAttributeNS : function(namespaceURI, localName){
+ var old = this.getAttributeNodeNS(namespaceURI, localName);
+ old && this.removeAttributeNode(old);
+ },
+
+ hasAttributeNS : function(namespaceURI, localName){
+ return this.getAttributeNodeNS(namespaceURI, localName)!=null;
+ },
+ getAttributeNS : function(namespaceURI, localName){
+ var attr = this.getAttributeNodeNS(namespaceURI, localName);
+ return attr && attr.value || '';
+ },
+ setAttributeNS : function(namespaceURI, qualifiedName, value){
+ var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
+ attr.value = attr.nodeValue = value;
+ this.setAttributeNode(attr)
+ },
+ getAttributeNodeNS : function(namespaceURI, localName){
+ return this.attributes.getNamedItemNS(namespaceURI, localName);
+ },
+
+ getElementsByTagName : function(tagName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+ });
+ },
+ getElementsByTagNameNS : function(namespaceURI, localName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType === ELEMENT_NODE && node.namespaceURI === namespaceURI && (localName === '*' || node.localName == localName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+ });
+ }
+};
+Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
+Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
+
+
+_extends(Element,Node);
+function Attr() {
+};
+Attr.prototype.nodeType = ATTRIBUTE_NODE;
+_extends(Attr,Node);
+
+
+function CharacterData() {
+};
+CharacterData.prototype = {
+ data : '',
+ substringData : function(offset, count) {
+ return this.data.substring(offset, offset+count);
+ },
+ appendData: function(text) {
+ text = this.data+text;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ },
+ insertData: function(offset,text) {
+ this.replaceData(offset,0,text);
+
+ },
+ appendChild:function(newChild){
+ //if(!(newChild instanceof CharacterData)){
+ throw new Error(ExceptionMessage[3])
+ //}
+ return Node.prototype.appendChild.apply(this,arguments)
+ },
+ deleteData: function(offset, count) {
+ this.replaceData(offset,count,"");
+ },
+ replaceData: function(offset, count, text) {
+ var start = this.data.substring(0,offset);
+ var end = this.data.substring(offset+count);
+ text = start + text + end;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ }
+}
+_extends(CharacterData,Node);
+function Text() {
+};
+Text.prototype = {
+ nodeName : "#text",
+ nodeType : TEXT_NODE,
+ splitText : function(offset) {
+ var text = this.data;
+ var newText = text.substring(offset);
+ text = text.substring(0, offset);
+ this.data = this.nodeValue = text;
+ this.length = text.length;
+ var newNode = this.ownerDocument.createTextNode(newText);
+ if(this.parentNode){
+ this.parentNode.insertBefore(newNode, this.nextSibling);
+ }
+ return newNode;
+ }
+}
+_extends(Text,CharacterData);
+function Comment() {
+};
+Comment.prototype = {
+ nodeName : "#comment",
+ nodeType : COMMENT_NODE
+}
+_extends(Comment,CharacterData);
+
+function CDATASection() {
+};
+CDATASection.prototype = {
+ nodeName : "#cdata-section",
+ nodeType : CDATA_SECTION_NODE
+}
+_extends(CDATASection,CharacterData);
+
+
+function DocumentType() {
+};
+DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
+_extends(DocumentType,Node);
+
+function Notation() {
+};
+Notation.prototype.nodeType = NOTATION_NODE;
+_extends(Notation,Node);
+
+function Entity() {
+};
+Entity.prototype.nodeType = ENTITY_NODE;
+_extends(Entity,Node);
+
+function EntityReference() {
+};
+EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
+_extends(EntityReference,Node);
+
+function DocumentFragment() {
+};
+DocumentFragment.prototype.nodeName = "#document-fragment";
+DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
+_extends(DocumentFragment,Node);
+
+
+function ProcessingInstruction() {
+}
+ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
+_extends(ProcessingInstruction,Node);
+function XMLSerializer(){}
+XMLSerializer.prototype.serializeToString = function(node){
+ var buf = [];
+ serializeToString(node,buf);
+ return buf.join('');
+}
+Node.prototype.toString =function(){
+ return XMLSerializer.prototype.serializeToString(this);
+}
+function serializeToString(node,buf){
+ switch(node.nodeType){
+ case ELEMENT_NODE:
+ var attrs = node.attributes;
+ var len = attrs.length;
+ var child = node.firstChild;
+ var nodeName = node.tagName;
+ var isHTML = htmlns === node.namespaceURI
+ buf.push('<',nodeName);
+ for(var i=0;i<len;i++){
+ serializeToString(attrs.item(i),buf,isHTML);
+ }
+ if(child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)){
+ buf.push('>');
+ //if is cdata child node
+ if(isHTML && /^script$/i.test(nodeName)){
+ if(child){
+ buf.push(child.data);
+ }
+ }else{
+ while(child){
+ serializeToString(child,buf);
+ child = child.nextSibling;
+ }
+ }
+ buf.push('</',nodeName,'>');
+ }else{
+ buf.push('/>');
+ }
+ return;
+ case DOCUMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ var child = node.firstChild;
+ while(child){
+ serializeToString(child,buf);
+ child = child.nextSibling;
+ }
+ return;
+ case ATTRIBUTE_NODE:
+ return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');
+ case TEXT_NODE:
+ return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));
+ case CDATA_SECTION_NODE:
+ return buf.push( '<![CDATA[',node.data,']]>');
+ case COMMENT_NODE:
+ return buf.push( "<!--",node.data,"-->");
+ case DOCUMENT_TYPE_NODE:
+ var pubid = node.publicId;
+ var sysid = node.systemId;
+ buf.push('<!DOCTYPE ',node.name);
+ if(pubid){
+ buf.push(' PUBLIC "',pubid);
+ if (sysid && sysid!='.') {
+ buf.push( '" "',sysid);
+ }
+ buf.push('">');
+ }else if(sysid && sysid!='.'){
+ buf.push(' SYSTEM "',sysid,'">');
+ }else{
+ var sub = node.internalSubset;
+ if(sub){
+ buf.push(" [",sub,"]");
+ }
+ buf.push(">");
+ }
+ return;
+ case PROCESSING_INSTRUCTION_NODE:
+ return buf.push( "<?",node.target," ",node.data,"?>");
+ case ENTITY_REFERENCE_NODE:
+ return buf.push( '&',node.nodeName,';');
+ //case ENTITY_NODE:
+ //case NOTATION_NODE:
+ default:
+ buf.push('??',node.nodeName);
+ }
+}
+function importNode(doc,node,deep){
+ var node2;
+ switch (node.nodeType) {
+ case ELEMENT_NODE:
+ node2 = node.cloneNode(false);
+ node2.ownerDocument = doc;
+ var attrs = node2.attributes;
+ var len = attrs.length;
+ for(var i=0;i<len;i++){
+ node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));
+ }
+ case DOCUMENT_FRAGMENT_NODE:
+ break;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ break;
+ //case ENTITY_REFERENCE_NODE:
+ //case PROCESSING_INSTRUCTION_NODE:
+ ////case TEXT_NODE:
+ //case CDATA_SECTION_NODE:
+ //case COMMENT_NODE:
+ // deep = false;
+ // break;
+ //case DOCUMENT_NODE:
+ //case DOCUMENT_TYPE_NODE:
+ //cannot be imported.
+ //case ENTITY_NODE:
+ //case NOTATION_NODE:
+ //can not hit in level3
+ //default:throw e;
+ }
+ if(!node2){
+ node2 = node.cloneNode(false);//false
+ }
+ node2.ownerDocument = doc;
+ node2.parentNode = null;
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(importNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+//
+//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
+// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
+function cloneNode(doc,node,deep){
+ var node2 = new node.constructor();
+ for(var n in node){
+ var v = node[n];
+ if(typeof v != 'object' ){
+ if(v != node2[n]){
+ node2[n] = v;
+ }
+ }
+ }
+ if(node.childNodes){
+ node2.childNodes = new NodeList();
+ }
+ node2.ownerDocument = doc;
+ switch (node2.nodeType) {
+ case ELEMENT_NODE:
+ var attrs = node.attributes;
+ var attrs2 = node2.attributes = new NamedNodeMap();
+ var len = attrs.length
+ attrs2._ownerElement = node2;
+ for(var i=0;i<len;i++){
+ node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
+ }
+ break;;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ }
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(cloneNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+
+function __set__(object,key,value){
+ object[key] = value
+}
+//do dynamic
+try{
+ if(Object.defineProperty){
+ Object.defineProperty(LiveNodeList.prototype,'length',{
+ get:function(){
+ _updateLiveList(this);
+ return this.$$length;
+ }
+ });
+ Object.defineProperty(Node.prototype,'textContent',{
+ get:function(){
+ return getTextContent(this);
+ },
+ set:function(data){
+ switch(this.nodeType){
+ case 1:
+ case 11:
+ while(this.firstChild){
+ this.removeChild(this.firstChild);
+ }
+ if(data || String(data)){
+ this.appendChild(this.ownerDocument.createTextNode(data));
+ }
+ break;
+ default:
+ //TODO:
+ this.data = data;
+ this.value = value;
+ this.nodeValue = data;
+ }
+ }
+ })
+
+ function getTextContent(node){
+ switch(node.nodeType){
+ case 1:
+ case 11:
+ var buf = [];
+ node = node.firstChild;
+ while(node){
+ if(node.nodeType!==7 && node.nodeType !==8){
+ buf.push(getTextContent(node));
+ }
+ node = node.nextSibling;
+ }
+ return buf.join('');
+ default:
+ return node.nodeValue;
+ }
+ }
+ __set__ = function(object,key,value){
+ //console.log(value)
+ object['$$'+key] = value
+ }
+ }
+}catch(e){//ie8
+}
+
+if(typeof require == 'function'){
+ exports.DOMImplementation = DOMImplementation;
+ exports.XMLSerializer = XMLSerializer;
+}
[27/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/parser.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/parser.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/parser.js
new file mode 100755
index 0000000..9f23cc4
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/parser.js
@@ -0,0 +1,610 @@
+/* parser generated by jison 0.4.2 */
+var parser = (function(){
+var parser = {trace: function trace() { },
+yy: {},
+symbols_: {"error":2,"Root":3,"Body":4,"Block":5,"TERMINATOR":6,"Line":7,"Expression":8,"Statement":9,"Return":10,"Comment":11,"STATEMENT":12,"Value":13,"Invocation":14,"Code":15,"Operation":16,"Assign":17,"If":18,"Try":19,"While":20,"For":21,"Switch":22,"Class":23,"Throw":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist"
:81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1},
+terminals_: {2:"error",6:"TERMINATOR",12:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"},
+productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[97,2],[24,2],[63,3],[63,5],[103,2],[10
3,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]],
+performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
+
+var $0 = $$.length - 1;
+switch (yystate) {
+case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block);
+break;
+case 2:return this.$ = $$[$0];
+break;
+case 3:return this.$ = $$[$0-1];
+break;
+case 4:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]]));
+break;
+case 5:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0]));
+break;
+case 6:this.$ = $$[$0-1];
+break;
+case 7:this.$ = $$[$0];
+break;
+case 8:this.$ = $$[$0];
+break;
+case 9:this.$ = $$[$0];
+break;
+case 10:this.$ = $$[$0];
+break;
+case 11:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 12:this.$ = $$[$0];
+break;
+case 13:this.$ = $$[$0];
+break;
+case 14:this.$ = $$[$0];
+break;
+case 15:this.$ = $$[$0];
+break;
+case 16:this.$ = $$[$0];
+break;
+case 17:this.$ = $$[$0];
+break;
+case 18:this.$ = $$[$0];
+break;
+case 19:this.$ = $$[$0];
+break;
+case 20:this.$ = $$[$0];
+break;
+case 21:this.$ = $$[$0];
+break;
+case 22:this.$ = $$[$0];
+break;
+case 23:this.$ = $$[$0];
+break;
+case 24:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block);
+break;
+case 25:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
+break;
+case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 28:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 29:this.$ = $$[$0];
+break;
+case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined);
+break;
+case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null);
+break;
+case 35:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0]));
+break;
+case 36:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0]));
+break;
+case 37:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0]));
+break;
+case 38:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1]));
+break;
+case 39:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 40:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object'));
+break;
+case 41:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object'));
+break;
+case 42:this.$ = $$[$0];
+break;
+case 43:this.$ = $$[$0];
+break;
+case 44:this.$ = $$[$0];
+break;
+case 45:this.$ = $$[$0];
+break;
+case 46:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0]));
+break;
+case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return);
+break;
+case 48:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0]));
+break;
+case 49:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1]));
+break;
+case 50:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1]));
+break;
+case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func');
+break;
+case 52:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc');
+break;
+case 53:this.$ = $$[$0];
+break;
+case 54:this.$ = $$[$0];
+break;
+case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
+break;
+case 56:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+break;
+case 57:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
+break;
+case 58:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
+break;
+case 59:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
+break;
+case 60:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0]));
+break;
+case 61:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true));
+break;
+case 62:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0]));
+break;
+case 63:this.$ = $$[$0];
+break;
+case 64:this.$ = $$[$0];
+break;
+case 65:this.$ = $$[$0];
+break;
+case 66:this.$ = $$[$0];
+break;
+case 67:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1]));
+break;
+case 68:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0]));
+break;
+case 70:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0])));
+break;
+case 71:this.$ = $$[$0];
+break;
+case 72:this.$ = $$[$0];
+break;
+case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 74:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 75:this.$ = $$[$0];
+break;
+case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 78:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 79:this.$ = $$[$0];
+break;
+case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0]));
+break;
+case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak'));
+break;
+case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
+break;
+case 83:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
+break;
+case 84:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype')));
+break;
+case 85:this.$ = $$[$0];
+break;
+case 86:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
+break;
+case 87:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], {
+ soak: true
+ }));
+break;
+case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0]));
+break;
+case 89:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0]));
+break;
+case 90:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated));
+break;
+case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
+break;
+case 92:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+break;
+case 93:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
+break;
+case 94:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
+break;
+case 95:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
+break;
+case 96:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class);
+break;
+case 97:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0]));
+break;
+case 98:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0]));
+break;
+case 99:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0]));
+break;
+case 100:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0]));
+break;
+case 101:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0]));
+break;
+case 102:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0]));
+break;
+case 103:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0]));
+break;
+case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
+break;
+case 105:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
+break;
+case 106:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))]));
+break;
+case 107:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0]));
+break;
+case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false);
+break;
+case 109:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true);
+break;
+case 110:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]);
+break;
+case 111:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
+break;
+case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
+break;
+case 113:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
+break;
+case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this'));
+break;
+case 115:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([]));
+break;
+case 116:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2]));
+break;
+case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive');
+break;
+case 118:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive');
+break;
+case 119:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2]));
+break;
+case 120:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1]));
+break;
+case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0]));
+break;
+case 122:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1]));
+break;
+case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0]));
+break;
+case 124:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+break;
+case 125:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
+break;
+case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
+break;
+case 127:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
+break;
+case 128:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
+break;
+case 129:this.$ = $$[$0];
+break;
+case 130:this.$ = $$[$0];
+break;
+case 131:this.$ = $$[$0];
+break;
+case 132:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0]));
+break;
+case 133:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0]));
+break;
+case 134:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1]));
+break;
+case 135:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0]));
+break;
+case 136:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]));
+break;
+case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]);
+break;
+case 138:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]);
+break;
+case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]);
+break;
+case 140:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0]));
+break;
+case 141:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1]));
+break;
+case 142:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2]));
+break;
+case 143:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0]));
+break;
+case 144:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
+ guard: $$[$0]
+ }));
+break;
+case 145:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], {
+ invert: true
+ }));
+break;
+case 146:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
+ invert: true,
+ guard: $$[$0]
+ }));
+break;
+case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0]));
+break;
+case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
+break;
+case 149:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
+break;
+case 150:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]);
+break;
+case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0]));
+break;
+case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]]))));
+break;
+case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
+break;
+case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
+break;
+case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1]));
+break;
+case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
+ source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0]))
+ });
+break;
+case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () {
+ $$[$0].own = $$[$0-1].own;
+ $$[$0].name = $$[$0-1][0];
+ $$[$0].index = $$[$0-1][1];
+ return $$[$0];
+ }()));
+break;
+case 158:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]);
+break;
+case 159:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
+ $$[$0].own = true;
+ return $$[$0];
+ }()));
+break;
+case 160:this.$ = $$[$0];
+break;
+case 161:this.$ = $$[$0];
+break;
+case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 164:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+break;
+case 165:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]);
+break;
+case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
+ source: $$[$0]
+ });
+break;
+case 167:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
+ source: $$[$0],
+ object: true
+ });
+break;
+case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
+ source: $$[$0-2],
+ guard: $$[$0]
+ });
+break;
+case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
+ source: $$[$0-2],
+ guard: $$[$0],
+ object: true
+ });
+break;
+case 170:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
+ source: $$[$0-2],
+ step: $$[$0]
+ });
+break;
+case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
+ source: $$[$0-4],
+ guard: $$[$0-2],
+ step: $$[$0]
+ });
+break;
+case 172:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
+ source: $$[$0-4],
+ step: $$[$0-2],
+ guard: $$[$0]
+ });
+break;
+case 173:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1]));
+break;
+case 174:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]));
+break;
+case 175:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1]));
+break;
+case 176:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1]));
+break;
+case 177:this.$ = $$[$0];
+break;
+case 178:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0]));
+break;
+case 179:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]);
+break;
+case 180:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]);
+break;
+case 181:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {
+ type: $$[$0-2]
+ }));
+break;
+case 182:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], {
+ type: $$[$0-2]
+ })));
+break;
+case 183:this.$ = $$[$0];
+break;
+case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0]));
+break;
+case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
+ type: $$[$0-1],
+ statement: true
+ }));
+break;
+case 186:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
+ type: $$[$0-1],
+ statement: true
+ }));
+break;
+case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0]));
+break;
+case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0]));
+break;
+case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0]));
+break;
+case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0]));
+break;
+case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0]));
+break;
+case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true));
+break;
+case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true));
+break;
+case 194:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1]));
+break;
+case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0]));
+break;
+case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0]));
+break;
+case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
+break;
+case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
+break;
+case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
+break;
+case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
+break;
+case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
+ if ($$[$0-1].charAt(0) === '!') {
+ return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert();
+ } else {
+ return new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+ }
+ }()));
+break;
+case 202:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1]));
+break;
+case 203:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]));
+break;
+case 204:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2]));
+break;
+case 205:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0]));
+break;
+}
+},
+table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25
,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13
],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,1
6],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19
],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,
23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2
,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,7
9],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50]
,34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12
:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],
101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],121:[1,130],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],12
6:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28]
,86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34
:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2
,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30]
,136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],
110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,3
0:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1
,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,6
8],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,
60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1
,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[
1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:
[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],10
9:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],104:[2,194],105:[2,194],106:[2,194],110:[2,194],118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[2,194],133:[2,194],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23
,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21
:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:
[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96
:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46]
,47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,
16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106
:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84
],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108
:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],10
0:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,
96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65
:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,188],6:[2,188],25:[2,188],26:
[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],73:[2,189],78:[2,189],86:[2,189],91:[2,189],93:[2,189],102:[2,189],103:87,104:[2,189],105:[2,189],106:[2,189],109:88,110:[2,189],111:69,118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[1,78],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],1
36:[2,190],137:[2,190]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,191],74:[2,72],78:[2,191],84:[2,72],85:[2,72],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:
[2,192],137:[2,192]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20
:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,
147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1
,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],
54:[2,140],57:[2,140],73:[2,140],78:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],103:87,104:[2,140],105:[2,140],106:[2,140],109:88,110:[2,140],111:69,118:[2,140],126:[2,140],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:
[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72
],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,1
14]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],104:[2,151],105:[2,151],106:[2,151]
,110:[2,151],118:[2,151],126:[2,151],128:[2,151],129:[2,151],132:[2,151],133:[2,151],134:[2,151],135:[2,151],136:[2,151],137:[2,151]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],103:87,104:[1,65],105:[2,152],106:[1,66],109:88,110:[1,68],111:69,118:[2,152],126:[2,152],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,164],117:[2,164]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:
[2,162],116:[2,162],117:[2,162]},{54:[2,163],116:[2,163],117:[2,163]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],49:[2,157],54:[2,157],57:[2,157],73:[2,157],78:[2,157],86:[2,157],91:[2,157],93:[2,157],102:[2,157],104:[2,157],105:[2,157],106:[2,157],110:[2,157],118:[2,157],126:[2,157],128:[2,157],129:[2,157],132:[2,157],133:[2,157],134:[2,157],135:[2,157],136:[2,157],137:[2,157]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:1
0,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25
],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[1,81],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],5
4:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[2,197],129:[2,197],132:[1,78],133:[2,197],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,198],135:[2,198],136:[2,198],137:[2,198]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,199],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200]
,57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,200],137:[1,85]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,201],136:[2,201],137:[2,201]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[1,65],105:[2,186],106:[1,66],109:88,110:[1,68],111:69,118:[2,186],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185]
,78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],
134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,
83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67
],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[
2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132
:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],
90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,7
0],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],103:87,104:[2,202],105:[2,202],106:[2,202],109:88,110:[2,202],111:69,118:[2,202],126:[2,202],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253
,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66]
,107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,205],6:[2,205],25:[2,205],26:[2,205],49:[2,205],54:[2,205],57:[2,205],73:[2,205],78:[2,205],86:[2,205],91:[2,205],93:[2,205],102:[2,205],103:87,104:[2,205],105:[2,205],106:[2,205],109:88,110:[2,205],111:69,118:[2,205],126:[2,205],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],104:[2,184],105:[2,184],106:[2,184],110:[2,184],118:[2,184],126:[2,184],128:[2,184],129:[2,184],132:[2,184],133:[2,184],134:[2,184],135:[2,184],136:[2,184],137:[2,184]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,
45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{5:260,25:[1,5],27:258,28:[1,73],59:259,76:[1,70]},{120:261,122:219,123:[1,220]},{26:[1,262],121:[1,263],122:264,123:[1,220]},{26:[2,177],121:[2,177],123:[2,177]},{8:266,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,
50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:265,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:267,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,10
1],135:[2,101],136:[2,101],137:[2,101]},{8:268,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:
[2,141]},{6:[1,74],26:[1,269]},{8:270,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:2
<TRUNCATED>
[48/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/.npmignore b/blackberry10/node_modules/elementtree/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/.npmignore
@@ -0,0 +1 @@
+node_modules
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/.travis.yml b/blackberry10/node_modules/elementtree/.travis.yml
new file mode 100644
index 0000000..6f27c96
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/.travis.yml
@@ -0,0 +1,10 @@
+language: node_js
+
+node_js:
+ - 0.6
+
+script: make test
+
+notifications:
+ email:
+ - tomaz+travisci@tomaz.me
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/CHANGES.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/CHANGES.md b/blackberry10/node_modules/elementtree/CHANGES.md
new file mode 100644
index 0000000..83bd61b
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/CHANGES.md
@@ -0,0 +1,34 @@
+elementtree v0.1.5 (in development)
+
+* Fix a bug in the find() and findtext() method which could manifest itself
+ under some conditions.
+ [metagriffin]
+
+elementtree v0.1.4
+
+* Allow user to use namespaced attributes when using find* functions.
+ [Andrew Lunny]
+
+elementtree v0.1.3
+
+* Improve the output of text content in the tags (strip unnecessary line break
+ characters).
+
+[Darryl Pogue]
+
+elementtree v0.1.2
+
+ * Allow user to pass 'indent' option to ElementTree.write method. If this
+ option is specified (e.g. {'indent': 4}). XML will be pretty printed.
+ [Darryl Pogue, Tomaz Muraus]
+
+ * Bump sax dependency version.
+
+elementtree v0.1.1 - 2011-09-23
+
+ * Improve special character escaping.
+ [Ryan Phillips]
+
+elementtree v0.1.0 - 2011-09-05
+
+ * Initial release.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/LICENSE.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/LICENSE.txt b/blackberry10/node_modules/elementtree/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ 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:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) 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
+
+ (d) 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
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/Makefile
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/Makefile b/blackberry10/node_modules/elementtree/Makefile
new file mode 100755
index 0000000..ab7c4e0
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/Makefile
@@ -0,0 +1,21 @@
+TESTS := \
+ tests/test-simple.js
+
+
+
+PATH := ./node_modules/.bin:$(PATH)
+
+WHISKEY := $(shell bash -c 'PATH=$(PATH) type -p whiskey')
+
+default: test
+
+test:
+ NODE_PATH=`pwd`/lib/ ${WHISKEY} --scope-leaks --sequential --real-time --tests "${TESTS}"
+
+tap:
+ NODE_PATH=`pwd`/lib/ ${WHISKEY} --test-reporter tap --sequential --real-time --tests "${TESTS}"
+
+coverage:
+ NODE_PATH=`pwd`/lib/ ${WHISKEY} --sequential --coverage --coverage-reporter html --coverage-dir coverage_html --tests "${TESTS}"
+
+.PHONY: default test coverage tap scope
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/NOTICE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/NOTICE b/blackberry10/node_modules/elementtree/NOTICE
new file mode 100644
index 0000000..28ad70a
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/NOTICE
@@ -0,0 +1,5 @@
+node-elementtree
+Copyright (c) 2011, Rackspace, Inc.
+
+The ElementTree toolkit is Copyright (c) 1999-2007 by Fredrik Lundh
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/README.md b/blackberry10/node_modules/elementtree/README.md
new file mode 100644
index 0000000..8a7e710
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/README.md
@@ -0,0 +1,27 @@
+node-elementtree
+====================
+
+node-elementtree is a [Node.js](http://nodejs.org) XML parser and serializer based upon the [Python ElementTree v1.3](http://effbot.org/zone/element-index.htm) module.
+
+Installation
+====================
+
+ $ npm install elementtree
+
+Using the library
+====================
+
+For the usage refer to the Python ElementTree library documentation - [http://effbot.org/zone/element-index.htm#usage](http://effbot.org/zone/element-index.htm#usage).
+
+Supported XPath expressions in `find`, `findall` and `findtext` methods are listed on [http://effbot.org/zone/element-xpath.htm](http://effbot.org/zone/element-xpath.htm).
+
+Build status
+====================
+
+[](http://travis-ci.org/racker/node-elementtree)
+
+
+License
+====================
+
+node-elementtree is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html).
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/lib/constants.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/lib/constants.js b/blackberry10/node_modules/elementtree/lib/constants.js
new file mode 100644
index 0000000..b057faf
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/lib/constants.js
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2011 Rackspace
+ *
+ * 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 DEFAULT_PARSER = 'sax';
+
+exports.DEFAULT_PARSER = DEFAULT_PARSER;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/lib/elementpath.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/lib/elementpath.js b/blackberry10/node_modules/elementtree/lib/elementpath.js
new file mode 100644
index 0000000..2e93f47
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/lib/elementpath.js
@@ -0,0 +1,343 @@
+/**
+ * Copyright 2011 Rackspace
+ *
+ * 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 sprintf = require('./sprintf').sprintf;
+
+var utils = require('./utils');
+var SyntaxError = require('./errors').SyntaxError;
+
+var _cache = {};
+
+var RE = new RegExp(
+ "(" +
+ "'[^']*'|\"[^\"]*\"|" +
+ "::|" +
+ "//?|" +
+ "\\.\\.|" +
+ "\\(\\)|" +
+ "[/.*:\\[\\]\\(\\)@=])|" +
+ "((?:\\{[^}]+\\})?[^/\\[\\]\\(\\)@=\\s]+)|" +
+ "\\s+", 'g'
+);
+
+var xpath_tokenizer = utils.findall.bind(null, RE);
+
+function prepare_tag(next, token) {
+ var tag = token[0];
+
+ function select(context, result) {
+ var i, len, elem, rv = [];
+
+ for (i = 0, len = result.length; i < len; i++) {
+ elem = result[i];
+ elem._children.forEach(function(e) {
+ if (e.tag === tag) {
+ rv.push(e);
+ }
+ });
+ }
+
+ return rv;
+ }
+
+ return select;
+}
+
+function prepare_star(next, token) {
+ function select(context, result) {
+ var i, len, elem, rv = [];
+
+ for (i = 0, len = result.length; i < len; i++) {
+ elem = result[i];
+ elem._children.forEach(function(e) {
+ rv.push(e);
+ });
+ }
+
+ return rv;
+ }
+
+ return select;
+}
+
+function prepare_dot(next, token) {
+ function select(context, result) {
+ var i, len, elem, rv = [];
+
+ for (i = 0, len = result.length; i < len; i++) {
+ elem = result[i];
+ rv.push(elem);
+ }
+
+ return rv;
+ }
+
+ return select;
+}
+
+function prepare_iter(next, token) {
+ var tag;
+ token = next();
+
+ if (token[1] === '*') {
+ tag = '*';
+ }
+ else if (!token[1]) {
+ tag = token[0] || '';
+ }
+ else {
+ throw new SyntaxError(token);
+ }
+
+ function select(context, result) {
+ var i, len, elem, rv = [];
+
+ for (i = 0, len = result.length; i < len; i++) {
+ elem = result[i];
+ elem.iter(tag, function(e) {
+ if (e !== elem) {
+ rv.push(e);
+ }
+ });
+ }
+
+ return rv;
+ }
+
+ return select;
+}
+
+function prepare_dot_dot(next, token) {
+ function select(context, result) {
+ var i, len, elem, rv = [], parent_map = context.parent_map;
+
+ if (!parent_map) {
+ context.parent_map = parent_map = {};
+
+ context.root.iter(null, function(p) {
+ p._children.forEach(function(e) {
+ parent_map[e] = p;
+ });
+ });
+ }
+
+ for (i = 0, len = result.length; i < len; i++) {
+ elem = result[i];
+
+ if (parent_map.hasOwnProperty(elem)) {
+ rv.push(parent_map[elem]);
+ }
+ }
+
+ return rv;
+ }
+
+ return select;
+}
+
+
+function prepare_predicate(next, token) {
+ var tag, key, value, select;
+ token = next();
+
+ if (token[1] === '@') {
+ // attribute
+ token = next();
+
+ if (token[1]) {
+ throw new SyntaxError(token, 'Invalid attribute predicate');
+ }
+
+ key = token[0];
+ token = next();
+
+ if (token[1] === ']') {
+ select = function(context, result) {
+ var i, len, elem, rv = [];
+
+ for (i = 0, len = result.length; i < len; i++) {
+ elem = result[i];
+
+ if (elem.get(key)) {
+ rv.push(elem);
+ }
+ }
+
+ return rv;
+ };
+ }
+ else if (token[1] === '=') {
+ value = next()[1];
+
+ if (value[0] === '"' || value[value.length - 1] === '\'') {
+ value = value.slice(1, value.length - 1);
+ }
+ else {
+ throw new SyntaxError(token, 'Ivalid comparison target');
+ }
+
+ token = next();
+ select = function(context, result) {
+ var i, len, elem, rv = [];
+
+ for (i = 0, len = result.length; i < len; i++) {
+ elem = result[i];
+
+ if (elem.get(key) === value) {
+ rv.push(elem);
+ }
+ }
+
+ return rv;
+ };
+ }
+
+ if (token[1] !== ']') {
+ throw new SyntaxError(token, 'Invalid attribute predicate');
+ }
+ }
+ else if (!token[1]) {
+ tag = token[0] || '';
+ token = next();
+
+ if (token[1] !== ']') {
+ throw new SyntaxError(token, 'Invalid node predicate');
+ }
+
+ select = function(context, result) {
+ var i, len, elem, rv = [];
+
+ for (i = 0, len = result.length; i < len; i++) {
+ elem = result[i];
+
+ if (elem.find(tag)) {
+ rv.push(elem);
+ }
+ }
+
+ return rv;
+ };
+ }
+ else {
+ throw new SyntaxError(null, 'Invalid predicate');
+ }
+
+ return select;
+}
+
+
+
+var ops = {
+ "": prepare_tag,
+ "*": prepare_star,
+ ".": prepare_dot,
+ "..": prepare_dot_dot,
+ "//": prepare_iter,
+ "[": prepare_predicate,
+};
+
+function _SelectorContext(root) {
+ this.parent_map = null;
+ this.root = root;
+}
+
+function findall(elem, path) {
+ var selector, result, i, len, token, value, select, context;
+
+ if (_cache.hasOwnProperty(path)) {
+ selector = _cache[path];
+ }
+ else {
+ // TODO: Use smarter cache purging approach
+ if (Object.keys(_cache).length > 100) {
+ _cache = {};
+ }
+
+ if (path.charAt(0) === '/') {
+ throw new SyntaxError(null, 'Cannot use absolute path on element');
+ }
+
+ result = xpath_tokenizer(path);
+ selector = [];
+
+ function getToken() {
+ return result.shift();
+ }
+
+ token = getToken();
+ while (true) {
+ var c = token[1] || '';
+ value = ops[c](getToken, token);
+
+ if (!value) {
+ throw new SyntaxError(null, sprintf('Invalid path: %s', path));
+ }
+
+ selector.push(value);
+ token = getToken();
+
+ if (!token) {
+ break;
+ }
+ else if (token[1] === '/') {
+ token = getToken();
+ }
+
+ if (!token) {
+ break;
+ }
+ }
+
+ _cache[path] = selector;
+ }
+
+ // Execute slector pattern
+ result = [elem];
+ context = new _SelectorContext(elem);
+
+ for (i = 0, len = selector.length; i < len; i++) {
+ select = selector[i];
+ result = select(context, result);
+ }
+
+ return result || [];
+}
+
+function find(element, path) {
+ var resultElements = findall(element, path);
+
+ if (resultElements && resultElements.length > 0) {
+ return resultElements[0];
+ }
+
+ return null;
+}
+
+function findtext(element, path, defvalue) {
+ var resultElements = findall(element, path);
+
+ if (resultElements && resultElements.length > 0) {
+ return resultElements[0].text;
+ }
+
+ return defvalue;
+}
+
+
+exports.find = find;
+exports.findall = findall;
+exports.findtext = findtext;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/lib/elementtree.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/lib/elementtree.js b/blackberry10/node_modules/elementtree/lib/elementtree.js
new file mode 100644
index 0000000..b46268c
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/lib/elementtree.js
@@ -0,0 +1,598 @@
+/**
+ * Copyright 2011 Rackspace
+ *
+ * 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 sprintf = require('./sprintf').sprintf;
+
+var utils = require('./utils');
+var ElementPath = require('./elementpath');
+var TreeBuilder = require('./treebuilder').TreeBuilder;
+var get_parser = require('./parser').get_parser;
+var constants = require('./constants');
+
+var element_ids = 0;
+
+function Element(tag, attrib)
+{
+ this._id = element_ids++;
+ this.tag = tag;
+ this.attrib = {};
+ this.text = null;
+ this.tail = null;
+ this._children = [];
+
+ if (attrib) {
+ this.attrib = utils.merge(this.attrib, attrib);
+ }
+}
+
+Element.prototype.toString = function()
+{
+ return sprintf("<Element %s at %s>", this.tag, this._id);
+};
+
+Element.prototype.makeelement = function(tag, attrib)
+{
+ return new Element(tag, attrib);
+};
+
+Element.prototype.len = function()
+{
+ return this._children.length;
+};
+
+Element.prototype.getItem = function(index)
+{
+ return this._children[index];
+};
+
+Element.prototype.setItem = function(index, element)
+{
+ this._children[index] = element;
+};
+
+Element.prototype.delItem = function(index)
+{
+ this._children.splice(index, 1);
+};
+
+Element.prototype.getSlice = function(start, stop)
+{
+ return this._children.slice(start, stop);
+};
+
+Element.prototype.setSlice = function(start, stop, elements)
+{
+ var i;
+ var k = 0;
+ for (i = start; i < stop; i++, k++) {
+ this._children[i] = elements[k];
+ }
+};
+
+Element.prototype.delSlice = function(start, stop)
+{
+ this._children.splice(start, stop - start);
+};
+
+Element.prototype.append = function(element)
+{
+ this._children.push(element);
+};
+
+Element.prototype.extend = function(elements)
+{
+ this._children.concat(elements);
+};
+
+Element.prototype.insert = function(index, element)
+{
+ this._children[index] = element;
+};
+
+Element.prototype.remove = function(index, element)
+{
+ this._children = this._children.filter(function(e) {
+ /* TODO: is this the right way to do this? */
+ if (e._id === element._id) {
+ return false;
+ }
+ return true;
+ });
+};
+
+Element.prototype.getchildren = function() {
+ return this._children;
+};
+
+Element.prototype.find = function(path)
+{
+ return ElementPath.find(this, path);
+};
+
+Element.prototype.findtext = function(path, defvalue)
+{
+ return ElementPath.findtext(this, path, defvalue);
+};
+
+Element.prototype.findall = function(path, defvalue)
+{
+ return ElementPath.findall(this, path, defvalue);
+};
+
+Element.prototype.clear = function()
+{
+ this.attrib = {};
+ this._children = [];
+ this.text = null;
+ this.tail = null;
+};
+
+Element.prototype.get = function(key, defvalue)
+{
+ if (this.attrib[key] !== undefined) {
+ return this.attrib[key];
+ }
+ else {
+ return defvalue;
+ }
+};
+
+Element.prototype.set = function(key, value)
+{
+ this.attrib[key] = value;
+};
+
+Element.prototype.keys = function()
+{
+ return Object.keys(this.attrib);
+};
+
+Element.prototype.items = function()
+{
+ return utils.items(this.attrib);
+};
+
+/*
+ * In python this uses a generator, but in v8 we don't have em,
+ * so we use a callback instead.
+ **/
+Element.prototype.iter = function(tag, callback)
+{
+ var self = this;
+ var i, child;
+
+ if (tag === "*") {
+ tag = null;
+ }
+
+ if (tag === null || this.tag === tag) {
+ callback(self);
+ }
+
+ for (i = 0; i < this._children.length; i++) {
+ child = this._children[i];
+ child.iter(tag, function(e) {
+ callback(e);
+ });
+ }
+};
+
+Element.prototype.itertext = function(callback)
+{
+ this.iter(null, function(e) {
+ if (e.text) {
+ callback(e.text);
+ }
+
+ if (e.tail) {
+ callback(e.tail);
+ }
+ });
+};
+
+
+function SubElement(parent, tag, attrib) {
+ var element = parent.makeelement(tag, attrib);
+ parent.append(element);
+ return element;
+}
+
+function Comment(text) {
+ var element = new Element(Comment);
+ if (text) {
+ element.text = text;
+ }
+ return element;
+}
+
+function ProcessingInstruction(target, text)
+{
+ var element = new Element(ProcessingInstruction);
+ element.text = target;
+ if (text) {
+ element.text = element.text + " " + text;
+ }
+ return element;
+}
+
+function QName(text_or_uri, tag)
+{
+ if (tag) {
+ text_or_uri = sprintf("{%s}%s", text_or_uri, tag);
+ }
+ this.text = text_or_uri;
+}
+
+QName.prototype.toString = function() {
+ return this.text;
+};
+
+function ElementTree(element)
+{
+ this._root = element;
+}
+
+ElementTree.prototype.getroot = function() {
+ return this._root;
+};
+
+ElementTree.prototype._setroot = function(element) {
+ this._root = element;
+};
+
+ElementTree.prototype.parse = function(source, parser) {
+ if (!parser) {
+ parser = get_parser(constants.DEFAULT_PARSER);
+ parser = new parser.XMLParser(new TreeBuilder());
+ }
+
+ parser.feed(source);
+ this._root = parser.close();
+ return this._root;
+};
+
+ElementTree.prototype.iter = function(tag, callback) {
+ this._root.iter(tag, callback);
+};
+
+ElementTree.prototype.find = function(path) {
+ return this._root.find(path);
+};
+
+ElementTree.prototype.findtext = function(path, defvalue) {
+ return this._root.findtext(path, defvalue);
+};
+
+ElementTree.prototype.findall = function(path) {
+ return this._root.findall(path);
+};
+
+/**
+ * Unlike ElementTree, we don't write to a file, we return you a string.
+ */
+ElementTree.prototype.write = function(options) {
+ var sb = [];
+ options = utils.merge({
+ encoding: 'utf-8',
+ xml_declaration: null,
+ default_namespace: null,
+ method: 'xml'}, options);
+
+ if (options.xml_declaration !== false) {
+ sb.push("<?xml version='1.0' encoding='"+options.encoding +"'?>\n");
+ }
+
+ if (options.method === "text") {
+ _serialize_text(sb, self._root, encoding);
+ }
+ else {
+ var qnames, namespaces, indent, indent_string;
+ var x = _namespaces(this._root, options.encoding, options.default_namespace);
+ qnames = x[0];
+ namespaces = x[1];
+
+ if (options.hasOwnProperty('indent')) {
+ indent = 0;
+ indent_string = new Array(options.indent + 1).join(' ');
+ }
+ else {
+ indent = false;
+ }
+
+ if (options.method === "xml") {
+ _serialize_xml(function(data) {
+ sb.push(data);
+ }, this._root, options.encoding, qnames, namespaces, indent, indent_string);
+ }
+ else {
+ /* TODO: html */
+ throw new Error("unknown serialization method "+ options.method);
+ }
+ }
+
+ return sb.join("");
+};
+
+var _namespace_map = {
+ /* "well-known" namespace prefixes */
+ "http://www.w3.org/XML/1998/namespace": "xml",
+ "http://www.w3.org/1999/xhtml": "html",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf",
+ "http://schemas.xmlsoap.org/wsdl/": "wsdl",
+ /* xml schema */
+ "http://www.w3.org/2001/XMLSchema": "xs",
+ "http://www.w3.org/2001/XMLSchema-instance": "xsi",
+ /* dublic core */
+ "http://purl.org/dc/elements/1.1/": "dc",
+};
+
+function register_namespace(prefix, uri) {
+ if (/ns\d+$/.test(prefix)) {
+ throw new Error('Prefix format reserved for internal use');
+ }
+
+ if (_namespace_map.hasOwnProperty(uri) && _namespace_map[uri] === prefix) {
+ delete _namespace_map[uri];
+ }
+
+ _namespace_map[uri] = prefix;
+}
+
+
+function _escape(text, encoding, isAttribute, isText) {
+ if (text) {
+ text = text.toString();
+ text = text.replace(/&/g, '&');
+ text = text.replace(/</g, '<');
+ text = text.replace(/>/g, '>');
+ if (!isText) {
+ text = text.replace(/\n/g, '
');
+ text = text.replace(/\r/g, '
');
+ }
+ if (isAttribute) {
+ text = text.replace(/"/g, '"');
+ }
+ }
+ return text;
+}
+
+/* TODO: benchmark single regex */
+function _escape_attrib(text, encoding) {
+ return _escape(text, encoding, true);
+}
+
+function _escape_cdata(text, encoding) {
+ return _escape(text, encoding, false);
+}
+
+function _escape_text(text, encoding) {
+ return _escape(text, encoding, false, true);
+}
+
+function _namespaces(elem, encoding, default_namespace) {
+ var qnames = {};
+ var namespaces = {};
+
+ if (default_namespace) {
+ namespaces[default_namespace] = "";
+ }
+
+ function encode(text) {
+ return text;
+ }
+
+ function add_qname(qname) {
+ if (qname[0] === "{") {
+ var tmp = qname.substring(1).split("}", 2);
+ var uri = tmp[0];
+ var tag = tmp[1];
+ var prefix = namespaces[uri];
+
+ if (prefix === undefined) {
+ prefix = _namespace_map[uri];
+ if (prefix === undefined) {
+ prefix = "ns" + Object.keys(namespaces).length;
+ }
+ if (prefix !== "xml") {
+ namespaces[uri] = prefix;
+ }
+ }
+
+ if (prefix) {
+ qnames[qname] = sprintf("%s:%s", prefix, tag);
+ }
+ else {
+ qnames[qname] = tag;
+ }
+ }
+ else {
+ if (default_namespace) {
+ throw new Error('cannot use non-qualified names with default_namespace option');
+ }
+
+ qnames[qname] = qname;
+ }
+ }
+
+
+ elem.iter(null, function(e) {
+ var i;
+ var tag = e.tag;
+ var text = e.text;
+ var items = e.items();
+
+ if (tag instanceof QName && qnames[tag.text] === undefined) {
+ add_qname(tag.text);
+ }
+ else if (typeof(tag) === "string") {
+ add_qname(tag);
+ }
+ else if (tag !== null && tag !== Comment && tag !== ProcessingInstruction) {
+ throw new Error('Invalid tag type for serialization: '+ tag);
+ }
+
+ if (text instanceof QName && qnames[text.text] === undefined) {
+ add_qname(text.text);
+ }
+
+ items.forEach(function(item) {
+ var key = item[0],
+ value = item[1];
+ if (key instanceof QName) {
+ key = key.text;
+ }
+
+ if (qnames[key] === undefined) {
+ add_qname(key);
+ }
+
+ if (value instanceof QName && qnames[value.text] === undefined) {
+ add_qname(value.text);
+ }
+ });
+ });
+ return [qnames, namespaces];
+}
+
+function _serialize_xml(write, elem, encoding, qnames, namespaces, indent, indent_string) {
+ var tag = elem.tag;
+ var text = elem.text;
+ var items;
+ var i;
+
+ var newlines = indent || (indent === 0);
+ write(Array(indent + 1).join(indent_string));
+
+ if (tag === Comment) {
+ write(sprintf("<!--%s-->", _escape_cdata(text, encoding)));
+ }
+ else if (tag === ProcessingInstruction) {
+ write(sprintf("<?%s?>", _escape_cdata(text, encoding)));
+ }
+ else {
+ tag = qnames[tag];
+ if (tag === undefined) {
+ if (text) {
+ write(_escape_text(text, encoding));
+ }
+ elem.iter(function(e) {
+ _serialize_xml(write, e, encoding, qnames, null, newlines ? indent + 1 : false, indent_string);
+ });
+ }
+ else {
+ write("<" + tag);
+ items = elem.items();
+
+ if (items || namespaces) {
+ items.sort(); // lexical order
+
+ items.forEach(function(item) {
+ var k = item[0],
+ v = item[1];
+
+ if (k instanceof QName) {
+ k = k.text;
+ }
+
+ if (v instanceof QName) {
+ v = qnames[v.text];
+ }
+ else {
+ v = _escape_attrib(v, encoding);
+ }
+ write(sprintf(" %s=\"%s\"", qnames[k], v));
+ });
+
+ if (namespaces) {
+ items = utils.items(namespaces);
+ items.sort(function(a, b) { return a[1] < b[1]; });
+
+ items.forEach(function(item) {
+ var k = item[1],
+ v = item[0];
+
+ if (k) {
+ k = ':' + k;
+ }
+
+ write(sprintf(" xmlns%s=\"%s\"", k, _escape_attrib(v, encoding)));
+ });
+ }
+ }
+
+ if (text || elem.len()) {
+ if (text && text.toString().match(/^\s*$/)) {
+ text = null;
+ }
+
+ write(">");
+ if (!text && newlines) {
+ write("\n");
+ }
+
+ if (text) {
+ write(_escape_text(text, encoding));
+ }
+ elem._children.forEach(function(e) {
+ _serialize_xml(write, e, encoding, qnames, null, newlines ? indent + 1 : false, indent_string);
+ });
+
+ if (!text && indent) {
+ write(Array(indent + 1).join(indent_string));
+ }
+ write("</" + tag + ">");
+ }
+ else {
+ write(" />");
+ }
+ }
+ }
+
+ if (newlines) {
+ write("\n");
+ }
+}
+
+function parse(source, parser) {
+ var tree = new ElementTree();
+ tree.parse(source, parser);
+ return tree;
+}
+
+function tostring(element, options) {
+ return new ElementTree(element).write(options);
+}
+
+exports.PI = ProcessingInstruction;
+exports.Comment = Comment;
+exports.ProcessingInstruction = ProcessingInstruction;
+exports.SubElement = SubElement;
+exports.QName = QName;
+exports.ElementTree = ElementTree;
+exports.ElementPath = ElementPath;
+exports.Element = function(tag, attrib) {
+ return new Element(tag, attrib);
+};
+
+exports.XML = function(data) {
+ var et = new ElementTree();
+ return et.parse(data);
+};
+
+exports.parse = parse;
+exports.register_namespace = register_namespace;
+exports.tostring = tostring;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/lib/errors.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/lib/errors.js b/blackberry10/node_modules/elementtree/lib/errors.js
new file mode 100644
index 0000000..e8742be
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/lib/errors.js
@@ -0,0 +1,31 @@
+/**
+ * Copyright 2011 Rackspace
+ *
+ * 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 util = require('util');
+
+var sprintf = require('./sprintf').sprintf;
+
+function SyntaxError(token, msg) {
+ msg = msg || sprintf('Syntax Error at token %s', token.toString());
+ this.token = token;
+ this.message = msg;
+ Error.call(this, msg);
+}
+
+util.inherits(SyntaxError, Error);
+
+exports.SyntaxError = SyntaxError;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/lib/parser.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/lib/parser.js b/blackberry10/node_modules/elementtree/lib/parser.js
new file mode 100644
index 0000000..7307ee4
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/lib/parser.js
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2011 Rackspace
+ *
+ * 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.
+ *
+ */
+
+/* TODO: support node-expat C++ module optionally */
+
+var util = require('util');
+var parsers = require('./parsers/index');
+
+function get_parser(name) {
+ if (name === 'sax') {
+ return parsers.sax;
+ }
+ else {
+ throw new Error('Invalid parser: ' + name);
+ }
+}
+
+
+exports.get_parser = get_parser;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/lib/parsers/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/lib/parsers/index.js b/blackberry10/node_modules/elementtree/lib/parsers/index.js
new file mode 100644
index 0000000..5eac5c8
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/lib/parsers/index.js
@@ -0,0 +1 @@
+exports.sax = require('./sax');
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/lib/parsers/sax.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/lib/parsers/sax.js b/blackberry10/node_modules/elementtree/lib/parsers/sax.js
new file mode 100644
index 0000000..69b0a59
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/lib/parsers/sax.js
@@ -0,0 +1,56 @@
+var util = require('util');
+
+var sax = require('sax');
+
+var TreeBuilder = require('./../treebuilder').TreeBuilder;
+
+function XMLParser(target) {
+ this.parser = sax.parser(true);
+
+ this.target = (target) ? target : new TreeBuilder();
+
+ this.parser.onopentag = this._handleOpenTag.bind(this);
+ this.parser.ontext = this._handleText.bind(this);
+ this.parser.oncdata = this._handleCdata.bind(this);
+ this.parser.ondoctype = this._handleDoctype.bind(this);
+ this.parser.oncomment = this._handleComment.bind(this);
+ this.parser.onclosetag = this._handleCloseTag.bind(this);
+ this.parser.onerror = this._handleError.bind(this);
+}
+
+XMLParser.prototype._handleOpenTag = function(tag) {
+ this.target.start(tag.name, tag.attributes);
+};
+
+XMLParser.prototype._handleText = function(text) {
+ this.target.data(text);
+};
+
+XMLParser.prototype._handleCdata = function(text) {
+ this.target.data(text);
+};
+
+XMLParser.prototype._handleDoctype = function(text) {
+};
+
+XMLParser.prototype._handleComment = function(comment) {
+};
+
+XMLParser.prototype._handleCloseTag = function(tag) {
+ this.target.end(tag);
+};
+
+XMLParser.prototype._handleError = function(err) {
+ throw err;
+};
+
+XMLParser.prototype.feed = function(chunk) {
+ this.parser.write(chunk);
+};
+
+XMLParser.prototype.close = function() {
+ this.parser.close();
+ return this.target.close();
+};
+
+exports.XMLParser = XMLParser;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/lib/sprintf.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/lib/sprintf.js b/blackberry10/node_modules/elementtree/lib/sprintf.js
new file mode 100644
index 0000000..f802c1b
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/lib/sprintf.js
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2011 Rackspace
+ *
+ * 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 cache = {};
+
+
+// Do any others need escaping?
+var TO_ESCAPE = {
+ '\'': '\\\'',
+ '\n': '\\n'
+};
+
+
+function populate(formatter) {
+ var i, type,
+ key = formatter,
+ prev = 0,
+ arg = 1,
+ builder = 'return \'';
+
+ for (i = 0; i < formatter.length; i++) {
+ if (formatter[i] === '%') {
+ type = formatter[i + 1];
+
+ switch (type) {
+ case 's':
+ builder += formatter.slice(prev, i) + '\' + arguments[' + arg + '] + \'';
+ prev = i + 2;
+ arg++;
+ break;
+ case 'j':
+ builder += formatter.slice(prev, i) + '\' + JSON.stringify(arguments[' + arg + ']) + \'';
+ prev = i + 2;
+ arg++;
+ break;
+ case '%':
+ builder += formatter.slice(prev, i + 1);
+ prev = i + 2;
+ i++;
+ break;
+ }
+
+
+ } else if (TO_ESCAPE[formatter[i]]) {
+ builder += formatter.slice(prev, i) + TO_ESCAPE[formatter[i]];
+ prev = i + 1;
+ }
+ }
+
+ builder += formatter.slice(prev) + '\';';
+ cache[key] = new Function(builder);
+}
+
+
+/**
+ * A fast version of sprintf(), which currently only supports the %s and %j.
+ * This caches a formatting function for each format string that is used, so
+ * you should only use this sprintf() will be called many times with a single
+ * format string and a limited number of format strings will ever be used (in
+ * general this means that format strings should be string literals).
+ *
+ * @param {String} formatter A format string.
+ * @param {...String} var_args Values that will be formatted by %s and %j.
+ * @return {String} The formatted output.
+ */
+exports.sprintf = function(formatter, var_args) {
+ if (!cache[formatter]) {
+ populate(formatter);
+ }
+
+ return cache[formatter].apply(null, arguments);
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/lib/treebuilder.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/lib/treebuilder.js b/blackberry10/node_modules/elementtree/lib/treebuilder.js
new file mode 100644
index 0000000..393a98f
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/lib/treebuilder.js
@@ -0,0 +1,60 @@
+function TreeBuilder(element_factory) {
+ this._data = [];
+ this._elem = [];
+ this._last = null;
+ this._tail = null;
+ if (!element_factory) {
+ /* evil circular dep */
+ element_factory = require('./elementtree').Element;
+ }
+ this._factory = element_factory;
+}
+
+TreeBuilder.prototype.close = function() {
+ return this._last;
+};
+
+TreeBuilder.prototype._flush = function() {
+ if (this._data) {
+ if (this._last !== null) {
+ var text = this._data.join("");
+ if (this._tail) {
+ this._last.tail = text;
+ }
+ else {
+ this._last.text = text;
+ }
+ }
+ this._data = [];
+ }
+};
+
+TreeBuilder.prototype.data = function(data) {
+ this._data.push(data);
+};
+
+TreeBuilder.prototype.start = function(tag, attrs) {
+ this._flush();
+ var elem = this._factory(tag, attrs);
+ this._last = elem;
+
+ if (this._elem.length) {
+ this._elem[this._elem.length - 1].append(elem);
+ }
+
+ this._elem.push(elem);
+
+ this._tail = null;
+};
+
+TreeBuilder.prototype.end = function(tag) {
+ this._flush();
+ this._last = this._elem.pop();
+ if (this._last.tag !== tag) {
+ throw new Error("end tag mismatch");
+ }
+ this._tail = 1;
+ return this._last;
+};
+
+exports.TreeBuilder = TreeBuilder;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/lib/utils.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/lib/utils.js b/blackberry10/node_modules/elementtree/lib/utils.js
new file mode 100644
index 0000000..b08a670
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/lib/utils.js
@@ -0,0 +1,72 @@
+/**
+ * Copyright 2011 Rackspace
+ *
+ * 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.
+ *
+ */
+
+/**
+ * @param {Object} hash.
+ * @param {Array} ignored.
+ */
+function items(hash, ignored) {
+ ignored = ignored || null;
+ var k, rv = [];
+
+ function is_ignored(key) {
+ if (!ignored || ignored.length === 0) {
+ return false;
+ }
+
+ return ignored.indexOf(key);
+ }
+
+ for (k in hash) {
+ if (hash.hasOwnProperty(k) && !(is_ignored(ignored))) {
+ rv.push([k, hash[k]]);
+ }
+ }
+
+ return rv;
+}
+
+
+function findall(re, str) {
+ var match, matches = [];
+
+ while ((match = re.exec(str))) {
+ matches.push(match);
+ }
+
+ return matches;
+}
+
+function merge(a, b) {
+ var c = {}, attrname;
+
+ for (attrname in a) {
+ if (a.hasOwnProperty(attrname)) {
+ c[attrname] = a[attrname];
+ }
+ }
+ for (attrname in b) {
+ if (b.hasOwnProperty(attrname)) {
+ c[attrname] = b[attrname];
+ }
+ }
+ return c;
+}
+
+exports.items = items;
+exports.findall = findall;
+exports.merge = merge;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/AUTHORS
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/AUTHORS b/blackberry10/node_modules/elementtree/node_modules/sax/AUTHORS
new file mode 100644
index 0000000..26d8659
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/AUTHORS
@@ -0,0 +1,9 @@
+# contributors sorted by whether or not they're me.
+Isaac Z. Schlueter <i...@izs.me>
+Stein Martin Hustad <st...@hustad.com>
+Mikeal Rogers <mi...@gmail.com>
+Laurie Harper <la...@holoweb.net>
+Jann Horn <ja...@Jann-PC.fritz.box>
+Elijah Insua <tm...@gmail.com>
+Henry Rawas <he...@schakra.com>
+Justin Makeig <jm...@makeig.com>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/LICENSE b/blackberry10/node_modules/elementtree/node_modules/sax/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/README.md b/blackberry10/node_modules/elementtree/node_modules/sax/README.md
new file mode 100644
index 0000000..9c63dc4
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/README.md
@@ -0,0 +1,213 @@
+# sax js
+
+A sax-style parser for XML and HTML.
+
+Designed with [node](http://nodejs.org/) in mind, but should work fine in
+the browser or other CommonJS implementations.
+
+## What This Is
+
+* A very simple tool to parse through an XML string.
+* A stepping stone to a streaming HTML parser.
+* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML
+ docs.
+
+## What This Is (probably) Not
+
+* An HTML Parser - That's a fine goal, but this isn't it. It's just
+ XML.
+* A DOM Builder - You can use it to build an object model out of XML,
+ but it doesn't do that out of the box.
+* XSLT - No DOM = no querying.
+* 100% Compliant with (some other SAX implementation) - Most SAX
+ implementations are in Java and do a lot more than this does.
+* An XML Validator - It does a little validation when in strict mode, but
+ not much.
+* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic
+ masochism.
+* A DTD-aware Thing - Fetching DTDs is a much bigger job.
+
+## Regarding `<!DOCTYPE`s and `<!ENTITY`s
+
+The parser will handle the basic XML entities in text nodes and attribute
+values: `& < > ' "`. It's possible to define additional
+entities in XML by putting them in the DTD. This parser doesn't do anything
+with that. If you want to listen to the `ondoctype` event, and then fetch
+the doctypes, and read the entities and add them to `parser.ENTITIES`, then
+be my guest.
+
+Unknown entities will fail in strict mode, and in loose mode, will pass
+through unmolested.
+
+## Usage
+
+ var sax = require("./lib/sax"),
+ strict = true, // set to false for html-mode
+ parser = sax.parser(strict);
+
+ parser.onerror = function (e) {
+ // an error happened.
+ };
+ parser.ontext = function (t) {
+ // got some text. t is the string of text.
+ };
+ parser.onopentag = function (node) {
+ // opened a tag. node has "name" and "attributes"
+ };
+ parser.onattribute = function (attr) {
+ // an attribute. attr has "name" and "value"
+ };
+ parser.onend = function () {
+ // parser stream is done, and ready to have more stuff written to it.
+ };
+
+ parser.write('<xml>Hello, <who name="world">world</who>!</xml>').close();
+
+ // stream usage
+ // takes the same options as the parser
+ var saxStream = require("sax").createStream(strict, options)
+ saxStream.on("error", function (e) {
+ // unhandled errors will throw, since this is a proper node
+ // event emitter.
+ console.error("error!", e)
+ // clear the error
+ this._parser.error = null
+ this._parser.resume()
+ })
+ saxStream.on("opentag", function (node) {
+ // same object as above
+ })
+ // pipe is supported, and it's readable/writable
+ // same chunks coming in also go out.
+ fs.createReadStream("file.xml")
+ .pipe(saxStream)
+ .pipe(fs.createReadStream("file-copy.xml"))
+
+
+
+## Arguments
+
+Pass the following arguments to the parser function. All are optional.
+
+`strict` - Boolean. Whether or not to be a jerk. Default: `false`.
+
+`opt` - Object bag of settings regarding string formatting. All default to `false`.
+
+Settings supported:
+
+* `trim` - Boolean. Whether or not to trim text and comment nodes.
+* `normalize` - Boolean. If true, then turn any whitespace into a single
+ space.
+* `lowercasetags` - Boolean. If true, then lowercase tags in loose mode,
+ rather than uppercasing them.
+* `xmlns` - Boolean. If true, then namespaces are supported.
+
+## Methods
+
+`write` - Write bytes onto the stream. You don't have to do this all at
+once. You can keep writing as much as you want.
+
+`close` - Close the stream. Once closed, no more data may be written until
+it is done processing the buffer, which is signaled by the `end` event.
+
+`resume` - To gracefully handle errors, assign a listener to the `error`
+event. Then, when the error is taken care of, you can call `resume` to
+continue parsing. Otherwise, the parser will not continue while in an error
+state.
+
+## Members
+
+At all times, the parser object will have the following members:
+
+`line`, `column`, `position` - Indications of the position in the XML
+document where the parser currently is looking.
+
+`startTagPosition` - Indicates the position where the current tag starts.
+
+`closed` - Boolean indicating whether or not the parser can be written to.
+If it's `true`, then wait for the `ready` event to write again.
+
+`strict` - Boolean indicating whether or not the parser is a jerk.
+
+`opt` - Any options passed into the constructor.
+
+`tag` - The current tag being dealt with.
+
+And a bunch of other stuff that you probably shouldn't touch.
+
+## Events
+
+All events emit with a single argument. To listen to an event, assign a
+function to `on<eventname>`. Functions get executed in the this-context of
+the parser object. The list of supported events are also in the exported
+`EVENTS` array.
+
+When using the stream interface, assign handlers using the EventEmitter
+`on` function in the normal fashion.
+
+`error` - Indication that something bad happened. The error will be hanging
+out on `parser.error`, and must be deleted before parsing can continue. By
+listening to this event, you can keep an eye on that kind of stuff. Note:
+this happens *much* more in strict mode. Argument: instance of `Error`.
+
+`text` - Text node. Argument: string of text.
+
+`doctype` - The `<!DOCTYPE` declaration. Argument: doctype string.
+
+`processinginstruction` - Stuff like `<?xml foo="blerg" ?>`. Argument:
+object with `name` and `body` members. Attributes are not parsed, as
+processing instructions have implementation dependent semantics.
+
+`sgmldeclaration` - Random SGML declarations. Stuff like `<!ENTITY p>`
+would trigger this kind of event. This is a weird thing to support, so it
+might go away at some point. SAX isn't intended to be used to parse SGML,
+after all.
+
+`opentag` - An opening tag. Argument: object with `name` and `attributes`.
+In non-strict mode, tag names are uppercased, unless the `lowercasetags`
+option is set. If the `xmlns` option is set, then it will contain
+namespace binding information on the `ns` member, and will have a
+`local`, `prefix`, and `uri` member.
+
+`closetag` - A closing tag. In loose mode, tags are auto-closed if their
+parent closes. In strict mode, well-formedness is enforced. Note that
+self-closing tags will have `closeTag` emitted immediately after `openTag`.
+Argument: tag name.
+
+`attribute` - An attribute node. Argument: object with `name` and `value`,
+and also namespace information if the `xmlns` option flag is set.
+
+`comment` - A comment node. Argument: the string of the comment.
+
+`opencdata` - The opening tag of a `<![CDATA[` block.
+
+`cdata` - The text of a `<![CDATA[` block. Since `<![CDATA[` blocks can get
+quite large, this event may fire multiple times for a single block, if it
+is broken up into multiple `write()`s. Argument: the string of random
+character data.
+
+`closecdata` - The closing tag (`]]>`) of a `<![CDATA[` block.
+
+`opennamespace` - If the `xmlns` option is set, then this event will
+signal the start of a new namespace binding.
+
+`closenamespace` - If the `xmlns` option is set, then this event will
+signal the end of a namespace binding.
+
+`end` - Indication that the closed stream has ended.
+
+`ready` - Indication that the stream has reset, and is ready to be written
+to.
+
+`noscript` - In non-strict mode, `<script>` tags trigger a `"script"`
+event, and their contents are not checked for special xml characters.
+If you pass `noscript: true`, then this behavior is suppressed.
+
+## Reporting Problems
+
+It's best to write a failing test if you find an issue. I will always
+accept pull requests with failing tests if they demonstrate intended
+behavior, but it is very hard to figure out what issue you're describing
+without a test. Writing a test is also the best way for you yourself
+to figure out if you really understand the issue you think you have with
+sax-js.
[31/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-runner.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-runner.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-runner.js
new file mode 100644
index 0000000..bbaa08b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-runner.js
@@ -0,0 +1,87 @@
+exports.executeJsRunner = function(specCollection, done, jasmineEnv, setupFile) {
+ var specs,
+ specLoader = require('./requirejs-spec-loader'),
+ requirejs = require('requirejs'),
+ vm = require('vm'),
+ fs = require('fs'),
+ coffeescript = require('coffee-script'),
+ template = fs.readFileSync(
+ setupFile || (__dirname + '/requirejs-wrapper-template.js'),
+ 'utf8'
+ ),
+ ensureUnixPath = function(path){
+ return path.replace(/^(.):/, '/$1').replace(/\\/g, '/');
+ },
+ buildNewContext = function(spec){
+ var context = {
+ describe: describe,
+ it: it,
+ xdescribe: xdescribe,
+ xit: xit,
+ beforeEach: beforeEach,
+ afterEach: afterEach,
+ spyOn: spyOn,
+ waitsFor: waitsFor,
+ waits: waits,
+ runs: runs,
+ jasmine: jasmine,
+ expect: expect,
+ require: require,
+ console: console,
+ process: process,
+ module: module,
+ specLoader: specLoader,
+ __dirname: spec.directory(),
+ __filename: spec.path(),
+ baseUrl: buildRelativeDirName(spec.directory()),
+ csPath: __dirname + '/cs'
+ };
+
+ context.global = context;
+
+ return context;
+ },
+ buildRelativeDirName = function(dir){
+ var retVal = "",
+ thisDir = ensureUnixPath(process.cwd()),
+ toDir = ensureUnixPath(dir).split('/'),
+ index = 0;
+
+ thisDir = thisDir.split('/');
+
+ for(; index < thisDir.length || index < toDir.length; index++) {
+ if(thisDir[index] != toDir[index]){
+ for(var i = index; i < thisDir.length-1; i++){
+ retVal += '../';
+ }
+
+ for(var i = index; i < toDir.length; i++){
+ retVal += toDir[i] + '/';
+ }
+
+ break;
+ }
+ }
+
+ return retVal.trim('/');
+ };
+
+ specCollection.getSpecs().forEach(function(s){
+ var script = fs.readFileSync(s.path(), 'utf8'),
+ wrappedScript;
+
+ if (s.filename().substr(-6).toLowerCase() == 'coffee') {
+ script = coffeescript.compile(script);
+ }
+
+ wrappedScript = template + script;
+
+ var newContext = buildNewContext(s);
+ newContext.setTimeout = jasmine.getGlobal().setTimeout;
+ newContext.setInterval = jasmine.getGlobal().setInterval;
+
+ vm.runInNewContext(wrappedScript, newContext, s.path());
+ });
+
+ specLoader.executeWhenAllSpecsAreComplete(jasmineEnv);
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-spec-loader.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-spec-loader.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-spec-loader.js
new file mode 100644
index 0000000..284db7d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-spec-loader.js
@@ -0,0 +1,48 @@
+var _ = require('underscore'),
+ registry = {},
+ timeout = 120000,
+ now = function() {
+ return new Date().getTime();
+ },
+ loader = {
+ register: function(name) {
+ registry[name] = false;
+ },
+ completed: function(name){
+ registry[name] = true;
+ }
+ },
+ specLoader = {
+ defineLoader: function(requirejs) {
+ requirejs.define('jasmine-spec-loader', function() {
+ return loader;
+ });
+ },
+ executeWhenAllSpecsAreComplete: function(jasmineEnv) {
+ var allComplete = false,
+ wait = now(),
+ timeoutCallback = function() {
+ allComplete = _.all(registry, function(value) {
+ return value;
+ });
+
+ if(!allComplete && wait + timeout > now()) {
+ setTimeout(timeoutCallback, 100);
+ } else if (!allComplete) {
+ console.log('Failed to load all specs within timeout window.');
+ process.exit(-1);
+ } else {
+ jasmineEnv.execute();
+ }
+ };
+
+ setTimeout(timeoutCallback, 100);
+ },
+ setTimeoutInterval: function(value) {
+ timeout = value;
+ },
+ };
+
+for(var key in specLoader) {
+ exports[key] = specLoader[key];
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-wrapper-template.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-wrapper-template.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-wrapper-template.js
new file mode 100644
index 0000000..344daeb
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/requirejs-wrapper-template.js
@@ -0,0 +1,78 @@
+/* Setup file run before spec files to setup the context (and RequireJS
+ * specifically) to execute the spec file.
+ *
+ * Defined by caller:
+ * - Jasmine predefines
+ * - require (Node require)
+ * - __dirname, __filename
+ * - baseUrl (Relative path to the directory containing this file)
+ * - csPath (Path to require-cs module)
+ *
+ * See requirejs-runner source for full invocation details.
+ */
+var define,
+ requirejsOrig = require('requirejs'),
+ ostring = Object.prototype.toString,
+ path = require('path'),
+ isArray = function(it){
+ return ostring.call(it) === '[object Array]';
+ },
+ isFunction = function(it){
+ return ostring.call(it) === '[object Function]';
+ },
+ requirejs = function(deps, callback){
+ var retVal;
+
+ if(!isArray(deps) && typeof deps !== 'string'){
+ if(isArray(callback)){
+ retVal = requirejsOrig(deps, callback, arguments[2]);
+ } else {
+ retVal = requirejsOrig(deps, [], callback);
+ }
+ } else {
+ retVal = requirejsOrig(deps, callback);
+ }
+
+ return retVal;
+ };
+
+requirejsOrig.config({
+ baseUrl: baseUrl,
+ nodeRequire: require,
+ paths: {
+ cs: csPath
+ }
+});
+
+for(var key in requirejsOrig) {
+ requirejs[key] = requirejsOrig[key];
+}
+
+requirejs.config = function(config){
+ var alteredConfig = {};
+
+ for(var key in config) {
+ alteredConfig[key] = config[key];
+ }
+
+ if(alteredConfig.baseUrl){
+ var base = baseUrl.replace(/\\/g, '/'),
+ splitUrl = alteredConfig.baseUrl.replace(/\\/g, '/').split('/'),
+ index = 0;
+
+ for(; index < splitUrl.length; index++){
+ if(splitUrl[index] === '..'){
+ base = path.dirname(base);
+ } else {
+ base += '/' + splitUrl[index];
+ }
+ }
+
+ alteredConfig.baseUrl = base;
+ }
+
+ return requirejsOrig.config(alteredConfig);
+};
+
+require = requirejs;
+define = requirejs.define;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/spec-collection.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/spec-collection.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/spec-collection.js
new file mode 100644
index 0000000..4b2de89
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/spec-collection.js
@@ -0,0 +1,44 @@
+var walkdir = require('walkdir');
+var path = require('path');
+var fs = require('fs');
+var specs;
+
+var createSpecObj = function(path, root) {
+ return {
+ path: function() { return path; },
+ relativePath: function() { return path.replace(root, '').replace(/^[\/\\]/, '').replace(/\\/g, '/'); },
+ directory: function() { return path.replace(/[\/\\][\s\w\.-]*$/, "").replace(/\\/g, '/'); },
+ relativeDirectory: function() { return relativePath().replace(/[\/\\][\s\w\.-]*$/, "").replace(/\\/g, '/'); },
+ filename: function() { return path.replace(/^.*[\\\/]/, ''); }
+ };
+};
+
+exports.load = function(loadpaths, matcher) {
+ var wannaBeSpecs = []
+ specs = [];
+ loadpaths.forEach(function(loadpath){
+ wannaBeSpecs = walkdir.sync(loadpath, { follow_symlinks: true });
+ for (var i = 0; i < wannaBeSpecs.length; i++) {
+ var file = wannaBeSpecs[i];
+ try {
+ if (fs.statSync(file).isFile()) {
+ if (!/.*node_modules.*/.test(path.relative(loadpath, file)) &
+ matcher.test(path.basename(file))) {
+ specs.push(createSpecObj(file));
+ }
+ }
+ } catch(e) {
+ // nothing to do here
+ }
+ }
+ });
+};
+
+exports.getSpecs = function() {
+ // Sorts spec paths in ascending alphabetical order to be able to
+ // run tests in a deterministic order.
+ specs.sort(function(a, b) {
+ return a.path().localeCompare(b.path());
+ });
+ return specs;
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/.bin/cake
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/.bin/cake b/blackberry10/node_modules/jasmine-node/node_modules/.bin/cake
new file mode 120000
index 0000000..d95f32a
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/.bin/cake
@@ -0,0 +1 @@
+../coffee-script/bin/cake
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/.bin/coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/.bin/coffee b/blackberry10/node_modules/jasmine-node/node_modules/.bin/coffee
new file mode 120000
index 0000000..b57f275
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/.bin/coffee
@@ -0,0 +1 @@
+../coffee-script/bin/coffee
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/.bin/r.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/.bin/r.js b/blackberry10/node_modules/jasmine-node/node_modules/.bin/r.js
new file mode 120000
index 0000000..2075b60
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/.bin/r.js
@@ -0,0 +1 @@
+../requirejs/bin/r.js
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/.npmignore b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/.npmignore
new file mode 100644
index 0000000..21e430d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/.npmignore
@@ -0,0 +1,11 @@
+*.coffee
+*.html
+.DS_Store
+.git*
+Cakefile
+documentation/
+examples/
+extras/coffee-script.js
+raw/
+src/
+test/
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/CNAME
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/CNAME b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/CNAME
new file mode 100644
index 0000000..faadabe
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/CNAME
@@ -0,0 +1 @@
+coffeescript.org
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/CONTRIBUTING.md b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/CONTRIBUTING.md
new file mode 100644
index 0000000..6390c68
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/CONTRIBUTING.md
@@ -0,0 +1,9 @@
+## How to contribute to CoffeeScript
+
+* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/coffee-script/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one.
+
+* Before sending a pull request for a feature, be sure to have [tests](https://github.com/jashkenas/coffee-script/tree/master/test).
+
+* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffee-script/tree/master/src). If you're just getting started with CoffeeScript, there's a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide).
+
+* In your pull request, do not add documentation to `index.html` or re-build the minified `coffee-script.js` file. We'll do those things before cutting a new release.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/LICENSE b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/LICENSE
new file mode 100644
index 0000000..a396eae
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2009-2013 Jeremy Ashkenas
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/README
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/README b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/README
new file mode 100644
index 0000000..69ee6f4
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/README
@@ -0,0 +1,51 @@
+
+ {
+ } } {
+ { { } }
+ } }{ {
+ { }{ } } _____ __ __
+ ( }{ }{ { ) / ____| / _|/ _|
+ .- { { } { }} -. | | ___ | |_| |_ ___ ___
+ ( ( } { } { } } ) | | / _ \| _| _/ _ \/ _ \
+ |`-..________ ..-'| | |___| (_) | | | || __/ __/
+ | | \_____\___/|_| |_| \___|\___|
+ | ;--.
+ | (__ \ _____ _ _
+ | | ) ) / ____| (_) | |
+ | |/ / | (___ ___ _ __ _ _ __ | |_
+ | ( / \___ \ / __| '__| | '_ \| __|
+ | |/ ____) | (__| | | | |_) | |_
+ | | |_____/ \___|_| |_| .__/ \__|
+ `-.._________..-' | |
+ |_|
+
+
+ CoffeeScript is a little language that compiles into JavaScript.
+
+ Install Node.js, and then the CoffeeScript compiler:
+ sudo bin/cake install
+
+ Or, if you have the Node Package Manager installed:
+ npm install -g coffee-script
+ (Leave off the -g if you don't wish to install globally.)
+
+ Execute a script:
+ coffee /path/to/script.coffee
+
+ Compile a script:
+ coffee -c /path/to/script.coffee
+
+ For documentation, usage, and examples, see:
+ http://coffeescript.org/
+
+ To suggest a feature, report a bug, or general discussion:
+ http://github.com/jashkenas/coffee-script/issues/
+
+ If you'd like to chat, drop by #coffeescript on Freenode IRC,
+ or on webchat.freenode.net.
+
+ The source repository:
+ git://github.com/jashkenas/coffee-script.git
+
+ All contributors are listed here:
+ http://github.com/jashkenas/coffee-script/contributors
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/Rakefile
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/Rakefile b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/Rakefile
new file mode 100644
index 0000000..d90cce3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/Rakefile
@@ -0,0 +1,79 @@
+require 'rubygems'
+require 'erb'
+require 'fileutils'
+require 'rake/testtask'
+require 'json'
+
+desc "Build the documentation page"
+task :doc do
+ source = 'documentation/index.html.erb'
+ child = fork { exec "bin/coffee -bcw -o documentation/js documentation/coffee/*.coffee" }
+ at_exit { Process.kill("INT", child) }
+ Signal.trap("INT") { exit }
+ loop do
+ mtime = File.stat(source).mtime
+ if !@mtime || mtime > @mtime
+ rendered = ERB.new(File.read(source)).result(binding)
+ File.open('index.html', 'w+') {|f| f.write(rendered) }
+ end
+ @mtime = mtime
+ sleep 1
+ end
+end
+
+desc "Build coffee-script-source gem"
+task :gem do
+ require 'rubygems'
+ require 'rubygems/package'
+
+ gemspec = Gem::Specification.new do |s|
+ s.name = 'coffee-script-source'
+ s.version = JSON.parse(File.read('package.json'))["version"]
+ s.date = Time.now.strftime("%Y-%m-%d")
+
+ s.homepage = "http://jashkenas.github.com/coffee-script/"
+ s.summary = "The CoffeeScript Compiler"
+ s.description = <<-EOS
+ CoffeeScript is a little language that compiles into JavaScript.
+ Underneath all of those embarrassing braces and semicolons,
+ JavaScript has always had a gorgeous object model at its heart.
+ CoffeeScript is an attempt to expose the good parts of JavaScript
+ in a simple way.
+ EOS
+
+ s.files = [
+ 'lib/coffee_script/coffee-script.js',
+ 'lib/coffee_script/source.rb'
+ ]
+
+ s.authors = ['Jeremy Ashkenas']
+ s.email = 'jashkenas@gmail.com'
+ s.rubyforge_project = 'coffee-script-source'
+ s.license = "MIT"
+ end
+
+ file = File.open("coffee-script-source.gem", "w")
+ Gem::Package.open(file, 'w') do |pkg|
+ pkg.metadata = gemspec.to_yaml
+
+ path = "lib/coffee_script/source.rb"
+ contents = <<-ERUBY
+module CoffeeScript
+ module Source
+ def self.bundled_path
+ File.expand_path("../coffee-script.js", __FILE__)
+ end
+ end
+end
+ ERUBY
+ pkg.add_file_simple(path, 0644, contents.size) do |tar_io|
+ tar_io.write(contents)
+ end
+
+ contents = File.read("extras/coffee-script.js")
+ path = "lib/coffee_script/coffee-script.js"
+ pkg.add_file_simple(path, 0644, contents.size) do |tar_io|
+ tar_io.write(contents)
+ end
+ end
+end
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/bin/cake
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/bin/cake b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/bin/cake
new file mode 100755
index 0000000..5965f4e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/bin/cake
@@ -0,0 +1,7 @@
+#!/usr/bin/env node
+
+var path = require('path');
+var fs = require('fs');
+var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
+
+require(lib + '/coffee-script/cake').run();
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/bin/coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/bin/coffee b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/bin/coffee
new file mode 100755
index 0000000..3d1d71c
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/bin/coffee
@@ -0,0 +1,7 @@
+#!/usr/bin/env node
+
+var path = require('path');
+var fs = require('fs');
+var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
+
+require(lib + '/coffee-script/command').run();
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/browser.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/browser.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/browser.js
new file mode 100644
index 0000000..e5411d8
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/browser.js
@@ -0,0 +1,118 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var CoffeeScript, compile, runScripts,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+ CoffeeScript = require('./coffee-script');
+
+ CoffeeScript.require = require;
+
+ compile = CoffeeScript.compile;
+
+ CoffeeScript["eval"] = function(code, options) {
+ if (options == null) {
+ options = {};
+ }
+ if (options.bare == null) {
+ options.bare = true;
+ }
+ return eval(compile(code, options));
+ };
+
+ CoffeeScript.run = function(code, options) {
+ if (options == null) {
+ options = {};
+ }
+ options.bare = true;
+ options.shiftLine = true;
+ return Function(compile(code, options))();
+ };
+
+ if (typeof window === "undefined" || window === null) {
+ return;
+ }
+
+ if ((typeof btoa !== "undefined" && btoa !== null) && (typeof JSON !== "undefined" && JSON !== null) && (typeof unescape !== "undefined" && unescape !== null) && (typeof encodeURIComponent !== "undefined" && encodeURIComponent !== null)) {
+ compile = function(code, options) {
+ var js, v3SourceMap, _ref;
+ if (options == null) {
+ options = {};
+ }
+ options.sourceMap = true;
+ options.inline = true;
+ _ref = CoffeeScript.compile(code, options), js = _ref.js, v3SourceMap = _ref.v3SourceMap;
+ return "" + js + "\n//@ sourceMappingURL=data:application/json;base64," + (btoa(unescape(encodeURIComponent(v3SourceMap)))) + "\n//@ sourceURL=coffeescript";
+ };
+ }
+
+ CoffeeScript.load = function(url, callback, options) {
+ var xhr;
+ if (options == null) {
+ options = {};
+ }
+ options.sourceFiles = [url];
+ xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') : new window.XMLHttpRequest();
+ xhr.open('GET', url, true);
+ if ('overrideMimeType' in xhr) {
+ xhr.overrideMimeType('text/plain');
+ }
+ xhr.onreadystatechange = function() {
+ var _ref;
+ if (xhr.readyState === 4) {
+ if ((_ref = xhr.status) === 0 || _ref === 200) {
+ CoffeeScript.run(xhr.responseText, options);
+ } else {
+ throw new Error("Could not load " + url);
+ }
+ if (callback) {
+ return callback();
+ }
+ }
+ };
+ return xhr.send(null);
+ };
+
+ runScripts = function() {
+ var coffees, coffeetypes, execute, index, length, s, scripts;
+ scripts = window.document.getElementsByTagName('script');
+ coffeetypes = ['text/coffeescript', 'text/literate-coffeescript'];
+ coffees = (function() {
+ var _i, _len, _ref, _results;
+ _results = [];
+ for (_i = 0, _len = scripts.length; _i < _len; _i++) {
+ s = scripts[_i];
+ if (_ref = s.type, __indexOf.call(coffeetypes, _ref) >= 0) {
+ _results.push(s);
+ }
+ }
+ return _results;
+ })();
+ index = 0;
+ length = coffees.length;
+ (execute = function() {
+ var mediatype, options, script;
+ script = coffees[index++];
+ mediatype = script != null ? script.type : void 0;
+ if (__indexOf.call(coffeetypes, mediatype) >= 0) {
+ options = {
+ literate: mediatype === 'text/literate-coffeescript'
+ };
+ if (script.src) {
+ return CoffeeScript.load(script.src, execute, options);
+ } else {
+ options.sourceFiles = ['embedded'];
+ CoffeeScript.run(script.innerHTML, options);
+ return execute();
+ }
+ }
+ })();
+ return null;
+ };
+
+ if (window.addEventListener) {
+ window.addEventListener('DOMContentLoaded', runScripts, false);
+ } else {
+ window.attachEvent('onload', runScripts);
+ }
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/cake.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/cake.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/cake.js
new file mode 100644
index 0000000..68bd7c3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/cake.js
@@ -0,0 +1,114 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var CoffeeScript, cakefileDirectory, existsSync, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks;
+
+ fs = require('fs');
+
+ path = require('path');
+
+ helpers = require('./helpers');
+
+ optparse = require('./optparse');
+
+ CoffeeScript = require('./coffee-script');
+
+ existsSync = fs.existsSync || path.existsSync;
+
+ tasks = {};
+
+ options = {};
+
+ switches = [];
+
+ oparse = null;
+
+ helpers.extend(global, {
+ task: function(name, description, action) {
+ var _ref;
+ if (!action) {
+ _ref = [description, action], action = _ref[0], description = _ref[1];
+ }
+ return tasks[name] = {
+ name: name,
+ description: description,
+ action: action
+ };
+ },
+ option: function(letter, flag, description) {
+ return switches.push([letter, flag, description]);
+ },
+ invoke: function(name) {
+ if (!tasks[name]) {
+ missingTask(name);
+ }
+ return tasks[name].action(options);
+ }
+ });
+
+ exports.run = function() {
+ var arg, args, e, _i, _len, _ref, _results;
+ global.__originalDirname = fs.realpathSync('.');
+ process.chdir(cakefileDirectory(__originalDirname));
+ args = process.argv.slice(2);
+ CoffeeScript.run(fs.readFileSync('Cakefile').toString(), {
+ filename: 'Cakefile'
+ });
+ oparse = new optparse.OptionParser(switches);
+ if (!args.length) {
+ return printTasks();
+ }
+ try {
+ options = oparse.parse(args);
+ } catch (_error) {
+ e = _error;
+ return fatalError("" + e);
+ }
+ _ref = options["arguments"];
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ arg = _ref[_i];
+ _results.push(invoke(arg));
+ }
+ return _results;
+ };
+
+ printTasks = function() {
+ var cakefilePath, desc, name, relative, spaces, task;
+ relative = path.relative || path.resolve;
+ cakefilePath = path.join(relative(__originalDirname, process.cwd()), 'Cakefile');
+ console.log("" + cakefilePath + " defines the following tasks:\n");
+ for (name in tasks) {
+ task = tasks[name];
+ spaces = 20 - name.length;
+ spaces = spaces > 0 ? Array(spaces + 1).join(' ') : '';
+ desc = task.description ? "# " + task.description : '';
+ console.log("cake " + name + spaces + " " + desc);
+ }
+ if (switches.length) {
+ return console.log(oparse.help());
+ }
+ };
+
+ fatalError = function(message) {
+ console.error(message + '\n');
+ console.log('To see a list of all tasks/options, run "cake"');
+ return process.exit(1);
+ };
+
+ missingTask = function(task) {
+ return fatalError("No such task: " + task);
+ };
+
+ cakefileDirectory = function(dir) {
+ var parent;
+ if (existsSync(path.join(dir, 'Cakefile'))) {
+ return dir;
+ }
+ parent = path.normalize(path.join(dir, '..'));
+ if (parent !== dir) {
+ return cakefileDirectory(parent);
+ }
+ throw new Error("Cakefile not found in " + (process.cwd()));
+ };
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/coffee-script.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/coffee-script.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/coffee-script.js
new file mode 100644
index 0000000..11ccd81
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/coffee-script.js
@@ -0,0 +1,358 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var Lexer, Module, SourceMap, child_process, compile, ext, findExtension, fork, formatSourcePosition, fs, helpers, lexer, loadFile, parser, patchStackTrace, patched, path, sourceMaps, vm, _i, _len, _ref,
+ __hasProp = {}.hasOwnProperty;
+
+ fs = require('fs');
+
+ vm = require('vm');
+
+ path = require('path');
+
+ child_process = require('child_process');
+
+ Lexer = require('./lexer').Lexer;
+
+ parser = require('./parser').parser;
+
+ helpers = require('./helpers');
+
+ SourceMap = require('./sourcemap');
+
+ exports.VERSION = '1.6.3';
+
+ exports.helpers = helpers;
+
+ exports.compile = compile = function(code, options) {
+ var answer, currentColumn, currentLine, fragment, fragments, header, js, map, merge, newLines, _i, _len;
+ if (options == null) {
+ options = {};
+ }
+ merge = helpers.merge;
+ if (options.sourceMap) {
+ map = new SourceMap;
+ }
+ fragments = parser.parse(lexer.tokenize(code, options)).compileToFragments(options);
+ currentLine = 0;
+ if (options.header) {
+ currentLine += 1;
+ }
+ if (options.shiftLine) {
+ currentLine += 1;
+ }
+ currentColumn = 0;
+ js = "";
+ for (_i = 0, _len = fragments.length; _i < _len; _i++) {
+ fragment = fragments[_i];
+ if (options.sourceMap) {
+ if (fragment.locationData) {
+ map.add([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], {
+ noReplace: true
+ });
+ }
+ newLines = helpers.count(fragment.code, "\n");
+ currentLine += newLines;
+ currentColumn = fragment.code.length - (newLines ? fragment.code.lastIndexOf("\n") : 0);
+ }
+ js += fragment.code;
+ }
+ if (options.header) {
+ header = "Generated by CoffeeScript " + this.VERSION;
+ js = "// " + header + "\n" + js;
+ }
+ if (options.sourceMap) {
+ answer = {
+ js: js
+ };
+ answer.sourceMap = map;
+ answer.v3SourceMap = map.generate(options, code);
+ return answer;
+ } else {
+ return js;
+ }
+ };
+
+ exports.tokens = function(code, options) {
+ return lexer.tokenize(code, options);
+ };
+
+ exports.nodes = function(source, options) {
+ if (typeof source === 'string') {
+ return parser.parse(lexer.tokenize(source, options));
+ } else {
+ return parser.parse(source);
+ }
+ };
+
+ exports.run = function(code, options) {
+ var answer, mainModule;
+ if (options == null) {
+ options = {};
+ }
+ mainModule = require.main;
+ if (options.sourceMap == null) {
+ options.sourceMap = true;
+ }
+ mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : '.';
+ mainModule.moduleCache && (mainModule.moduleCache = {});
+ mainModule.paths = require('module')._nodeModulePaths(path.dirname(fs.realpathSync(options.filename || '.')));
+ if (!helpers.isCoffee(mainModule.filename) || require.extensions) {
+ answer = compile(code, options);
+ patchStackTrace();
+ sourceMaps[mainModule.filename] = answer.sourceMap;
+ return mainModule._compile(answer.js, mainModule.filename);
+ } else {
+ return mainModule._compile(code, mainModule.filename);
+ }
+ };
+
+ exports["eval"] = function(code, options) {
+ var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref, _ref1, _require;
+ if (options == null) {
+ options = {};
+ }
+ if (!(code = code.trim())) {
+ return;
+ }
+ Script = vm.Script;
+ if (Script) {
+ if (options.sandbox != null) {
+ if (options.sandbox instanceof Script.createContext().constructor) {
+ sandbox = options.sandbox;
+ } else {
+ sandbox = Script.createContext();
+ _ref = options.sandbox;
+ for (k in _ref) {
+ if (!__hasProp.call(_ref, k)) continue;
+ v = _ref[k];
+ sandbox[k] = v;
+ }
+ }
+ sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox;
+ } else {
+ sandbox = global;
+ }
+ sandbox.__filename = options.filename || 'eval';
+ sandbox.__dirname = path.dirname(sandbox.__filename);
+ if (!(sandbox !== global || sandbox.module || sandbox.require)) {
+ Module = require('module');
+ sandbox.module = _module = new Module(options.modulename || 'eval');
+ sandbox.require = _require = function(path) {
+ return Module._load(path, _module, true);
+ };
+ _module.filename = sandbox.__filename;
+ _ref1 = Object.getOwnPropertyNames(require);
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ r = _ref1[_i];
+ if (r !== 'paths') {
+ _require[r] = require[r];
+ }
+ }
+ _require.paths = _module.paths = Module._nodeModulePaths(process.cwd());
+ _require.resolve = function(request) {
+ return Module._resolveFilename(request, _module);
+ };
+ }
+ }
+ o = {};
+ for (k in options) {
+ if (!__hasProp.call(options, k)) continue;
+ v = options[k];
+ o[k] = v;
+ }
+ o.bare = true;
+ js = compile(code, o);
+ if (sandbox === global) {
+ return vm.runInThisContext(js);
+ } else {
+ return vm.runInContext(js, sandbox);
+ }
+ };
+
+ loadFile = function(module, filename) {
+ var answer, raw, stripped;
+ raw = fs.readFileSync(filename, 'utf8');
+ stripped = raw.charCodeAt(0) === 0xFEFF ? raw.substring(1) : raw;
+ answer = compile(stripped, {
+ filename: filename,
+ sourceMap: true,
+ literate: helpers.isLiterate(filename)
+ });
+ sourceMaps[filename] = answer.sourceMap;
+ return module._compile(answer.js, filename);
+ };
+
+ if (require.extensions) {
+ _ref = ['.coffee', '.litcoffee', '.coffee.md'];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ ext = _ref[_i];
+ require.extensions[ext] = loadFile;
+ }
+ Module = require('module');
+ findExtension = function(filename) {
+ var curExtension, extensions;
+ extensions = path.basename(filename).split('.');
+ if (extensions[0] === '') {
+ extensions.shift();
+ }
+ while (extensions.shift()) {
+ curExtension = '.' + extensions.join('.');
+ if (Module._extensions[curExtension]) {
+ return curExtension;
+ }
+ }
+ return '.js';
+ };
+ Module.prototype.load = function(filename) {
+ var extension;
+ this.filename = filename;
+ this.paths = Module._nodeModulePaths(path.dirname(filename));
+ extension = findExtension(filename);
+ Module._extensions[extension](this, filename);
+ return this.loaded = true;
+ };
+ }
+
+ if (child_process) {
+ fork = child_process.fork;
+ child_process.fork = function(path, args, options) {
+ var execPath;
+ if (args == null) {
+ args = [];
+ }
+ if (options == null) {
+ options = {};
+ }
+ execPath = helpers.isCoffee(path) ? 'coffee' : null;
+ if (!Array.isArray(args)) {
+ args = [];
+ options = args || {};
+ }
+ options.execPath || (options.execPath = execPath);
+ return fork(path, args, options);
+ };
+ }
+
+ lexer = new Lexer;
+
+ parser.lexer = {
+ lex: function() {
+ var tag, token;
+ token = this.tokens[this.pos++];
+ if (token) {
+ tag = token[0], this.yytext = token[1], this.yylloc = token[2];
+ this.yylineno = this.yylloc.first_line;
+ } else {
+ tag = '';
+ }
+ return tag;
+ },
+ setInput: function(tokens) {
+ this.tokens = tokens;
+ return this.pos = 0;
+ },
+ upcomingInput: function() {
+ return "";
+ }
+ };
+
+ parser.yy = require('./nodes');
+
+ parser.yy.parseError = function(message, _arg) {
+ var token;
+ token = _arg.token;
+ message = "unexpected " + (token === 1 ? 'end of input' : token);
+ return helpers.throwSyntaxError(message, parser.lexer.yylloc);
+ };
+
+ patched = false;
+
+ sourceMaps = {};
+
+ patchStackTrace = function() {
+ var mainModule;
+ if (patched) {
+ return;
+ }
+ patched = true;
+ mainModule = require.main;
+ return Error.prepareStackTrace = function(err, stack) {
+ var frame, frames, getSourceMapping, sourceFiles, _ref1;
+ sourceFiles = {};
+ getSourceMapping = function(filename, line, column) {
+ var answer, sourceMap;
+ sourceMap = sourceMaps[filename];
+ if (sourceMap) {
+ answer = sourceMap.sourceLocation([line - 1, column - 1]);
+ }
+ if (answer) {
+ return [answer[0] + 1, answer[1] + 1];
+ } else {
+ return null;
+ }
+ };
+ frames = (function() {
+ var _j, _len1, _results;
+ _results = [];
+ for (_j = 0, _len1 = stack.length; _j < _len1; _j++) {
+ frame = stack[_j];
+ if (frame.getFunction() === exports.run) {
+ break;
+ }
+ _results.push(" at " + (formatSourcePosition(frame, getSourceMapping)));
+ }
+ return _results;
+ })();
+ return "" + err.name + ": " + ((_ref1 = err.message) != null ? _ref1 : '') + "\n" + (frames.join('\n')) + "\n";
+ };
+ };
+
+ formatSourcePosition = function(frame, getSourceMapping) {
+ var as, column, fileLocation, fileName, functionName, isConstructor, isMethodCall, line, methodName, source, tp, typeName;
+ fileName = void 0;
+ fileLocation = '';
+ if (frame.isNative()) {
+ fileLocation = "native";
+ } else {
+ if (frame.isEval()) {
+ fileName = frame.getScriptNameOrSourceURL();
+ if (!fileName) {
+ fileLocation = "" + (frame.getEvalOrigin()) + ", ";
+ }
+ } else {
+ fileName = frame.getFileName();
+ }
+ fileName || (fileName = "<anonymous>");
+ line = frame.getLineNumber();
+ column = frame.getColumnNumber();
+ source = getSourceMapping(fileName, line, column);
+ fileLocation = source ? "" + fileName + ":" + source[0] + ":" + source[1] + ", <js>:" + line + ":" + column : "" + fileName + ":" + line + ":" + column;
+ }
+ functionName = frame.getFunctionName();
+ isConstructor = frame.isConstructor();
+ isMethodCall = !(frame.isToplevel() || isConstructor);
+ if (isMethodCall) {
+ methodName = frame.getMethodName();
+ typeName = frame.getTypeName();
+ if (functionName) {
+ tp = as = '';
+ if (typeName && functionName.indexOf(typeName)) {
+ tp = "" + typeName + ".";
+ }
+ if (methodName && functionName.indexOf("." + methodName) !== functionName.length - methodName.length - 1) {
+ as = " [as " + methodName + "]";
+ }
+ return "" + tp + functionName + as + " (" + fileLocation + ")";
+ } else {
+ return "" + typeName + "." + (methodName || '<anonymous>') + " (" + fileLocation + ")";
+ }
+ } else if (isConstructor) {
+ return "new " + (functionName || '<anonymous>') + " (" + fileLocation + ")";
+ } else if (functionName) {
+ return "" + functionName + " (" + fileLocation + ")";
+ } else {
+ return fileLocation;
+ }
+ };
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/command.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/command.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/command.js
new file mode 100644
index 0000000..26b2554
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/command.js
@@ -0,0 +1,526 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, exists, forkNode, fs, helpers, hidden, joinTimeout, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, useWinPathSep, version, wait, watch, watchDir, watchers, writeJs, _ref;
+
+ fs = require('fs');
+
+ path = require('path');
+
+ helpers = require('./helpers');
+
+ optparse = require('./optparse');
+
+ CoffeeScript = require('./coffee-script');
+
+ _ref = require('child_process'), spawn = _ref.spawn, exec = _ref.exec;
+
+ EventEmitter = require('events').EventEmitter;
+
+ exists = fs.exists || path.exists;
+
+ useWinPathSep = path.sep === '\\';
+
+ helpers.extend(CoffeeScript, new EventEmitter);
+
+ printLine = function(line) {
+ return process.stdout.write(line + '\n');
+ };
+
+ printWarn = function(line) {
+ return process.stderr.write(line + '\n');
+ };
+
+ hidden = function(file) {
+ return /^\.|~$/.test(file);
+ };
+
+ BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.';
+
+ SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-m', '--map', 'generate source map and save as .map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-l', '--literate', 'treat stdio as literate style coffee-script'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version numb
er'], ['-w', '--watch', 'watch scripts for changes and rerun commands']];
+
+ opts = {};
+
+ sources = [];
+
+ sourceCode = [];
+
+ notSources = {};
+
+ watchers = {};
+
+ optionParser = null;
+
+ exports.run = function() {
+ var literals, source, _i, _len, _results;
+ parseOptions();
+ if (opts.nodejs) {
+ return forkNode();
+ }
+ if (opts.help) {
+ return usage();
+ }
+ if (opts.version) {
+ return version();
+ }
+ if (opts.interactive) {
+ return require('./repl').start();
+ }
+ if (opts.watch && !fs.watch) {
+ return printWarn("The --watch feature depends on Node v0.6.0+. You are running " + process.version + ".");
+ }
+ if (opts.stdio) {
+ return compileStdio();
+ }
+ if (opts["eval"]) {
+ return compileScript(null, sources[0]);
+ }
+ if (!sources.length) {
+ return require('./repl').start();
+ }
+ literals = opts.run ? sources.splice(1) : [];
+ process.argv = process.argv.slice(0, 2).concat(literals);
+ process.argv[0] = 'coffee';
+ _results = [];
+ for (_i = 0, _len = sources.length; _i < _len; _i++) {
+ source = sources[_i];
+ _results.push(compilePath(source, true, path.normalize(source)));
+ }
+ return _results;
+ };
+
+ compilePath = function(source, topLevel, base) {
+ return fs.stat(source, function(err, stats) {
+ if (err && err.code !== 'ENOENT') {
+ throw err;
+ }
+ if ((err != null ? err.code : void 0) === 'ENOENT') {
+ console.error("File not found: " + source);
+ process.exit(1);
+ }
+ if (stats.isDirectory() && path.dirname(source) !== 'node_modules') {
+ if (opts.watch) {
+ watchDir(source, base);
+ }
+ return fs.readdir(source, function(err, files) {
+ var file, index, _ref1, _ref2;
+ if (err && err.code !== 'ENOENT') {
+ throw err;
+ }
+ if ((err != null ? err.code : void 0) === 'ENOENT') {
+ return;
+ }
+ index = sources.indexOf(source);
+ files = files.filter(function(file) {
+ return !hidden(file);
+ });
+ [].splice.apply(sources, [index, index - index + 1].concat(_ref1 = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ _results.push(path.join(source, file));
+ }
+ return _results;
+ })())), _ref1;
+ [].splice.apply(sourceCode, [index, index - index + 1].concat(_ref2 = files.map(function() {
+ return null;
+ }))), _ref2;
+ return files.forEach(function(file) {
+ return compilePath(path.join(source, file), false, base);
+ });
+ });
+ } else if (topLevel || helpers.isCoffee(source)) {
+ if (opts.watch) {
+ watch(source, base);
+ }
+ return fs.readFile(source, function(err, code) {
+ if (err && err.code !== 'ENOENT') {
+ throw err;
+ }
+ if ((err != null ? err.code : void 0) === 'ENOENT') {
+ return;
+ }
+ return compileScript(source, code.toString(), base);
+ });
+ } else {
+ notSources[source] = true;
+ return removeSource(source, base);
+ }
+ });
+ };
+
+ compileScript = function(file, input, base) {
+ var compiled, err, message, o, options, t, task, useColors;
+ if (base == null) {
+ base = null;
+ }
+ o = opts;
+ options = compileOptions(file, base);
+ try {
+ t = task = {
+ file: file,
+ input: input,
+ options: options
+ };
+ CoffeeScript.emit('compile', task);
+ if (o.tokens) {
+ return printTokens(CoffeeScript.tokens(t.input, t.options));
+ } else if (o.nodes) {
+ return printLine(CoffeeScript.nodes(t.input, t.options).toString().trim());
+ } else if (o.run) {
+ return CoffeeScript.run(t.input, t.options);
+ } else if (o.join && t.file !== o.join) {
+ if (helpers.isLiterate(file)) {
+ t.input = helpers.invertLiterate(t.input);
+ }
+ sourceCode[sources.indexOf(t.file)] = t.input;
+ return compileJoin();
+ } else {
+ compiled = CoffeeScript.compile(t.input, t.options);
+ t.output = compiled;
+ if (o.map) {
+ t.output = compiled.js;
+ t.sourceMap = compiled.v3SourceMap;
+ }
+ CoffeeScript.emit('success', task);
+ if (o.print) {
+ return printLine(t.output.trim());
+ } else if (o.compile || o.map) {
+ return writeJs(base, t.file, t.output, options.jsPath, t.sourceMap);
+ }
+ }
+ } catch (_error) {
+ err = _error;
+ CoffeeScript.emit('failure', err, task);
+ if (CoffeeScript.listeners('failure').length) {
+ return;
+ }
+ useColors = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS;
+ message = helpers.prettyErrorMessage(err, file || '[stdin]', input, useColors);
+ if (o.watch) {
+ return printLine(message + '\x07');
+ } else {
+ printWarn(message);
+ return process.exit(1);
+ }
+ }
+ };
+
+ compileStdio = function() {
+ var code, stdin;
+ code = '';
+ stdin = process.openStdin();
+ stdin.on('data', function(buffer) {
+ if (buffer) {
+ return code += buffer.toString();
+ }
+ });
+ return stdin.on('end', function() {
+ return compileScript(null, code);
+ });
+ };
+
+ joinTimeout = null;
+
+ compileJoin = function() {
+ if (!opts.join) {
+ return;
+ }
+ if (!sourceCode.some(function(code) {
+ return code === null;
+ })) {
+ clearTimeout(joinTimeout);
+ return joinTimeout = wait(100, function() {
+ return compileScript(opts.join, sourceCode.join('\n'), opts.join);
+ });
+ }
+ };
+
+ watch = function(source, base) {
+ var compile, compileTimeout, e, prevStats, rewatch, watchErr, watcher;
+ prevStats = null;
+ compileTimeout = null;
+ watchErr = function(e) {
+ if (e.code === 'ENOENT') {
+ if (sources.indexOf(source) === -1) {
+ return;
+ }
+ try {
+ rewatch();
+ return compile();
+ } catch (_error) {
+ e = _error;
+ removeSource(source, base, true);
+ return compileJoin();
+ }
+ } else {
+ throw e;
+ }
+ };
+ compile = function() {
+ clearTimeout(compileTimeout);
+ return compileTimeout = wait(25, function() {
+ return fs.stat(source, function(err, stats) {
+ if (err) {
+ return watchErr(err);
+ }
+ if (prevStats && stats.size === prevStats.size && stats.mtime.getTime() === prevStats.mtime.getTime()) {
+ return rewatch();
+ }
+ prevStats = stats;
+ return fs.readFile(source, function(err, code) {
+ if (err) {
+ return watchErr(err);
+ }
+ compileScript(source, code.toString(), base);
+ return rewatch();
+ });
+ });
+ });
+ };
+ try {
+ watcher = fs.watch(source, compile);
+ } catch (_error) {
+ e = _error;
+ watchErr(e);
+ }
+ return rewatch = function() {
+ if (watcher != null) {
+ watcher.close();
+ }
+ return watcher = fs.watch(source, compile);
+ };
+ };
+
+ watchDir = function(source, base) {
+ var e, readdirTimeout, watcher;
+ readdirTimeout = null;
+ try {
+ return watcher = fs.watch(source, function() {
+ clearTimeout(readdirTimeout);
+ return readdirTimeout = wait(25, function() {
+ return fs.readdir(source, function(err, files) {
+ var file, _i, _len, _results;
+ if (err) {
+ if (err.code !== 'ENOENT') {
+ throw err;
+ }
+ watcher.close();
+ return unwatchDir(source, base);
+ }
+ _results = [];
+ for (_i = 0, _len = files.length; _i < _len; _i++) {
+ file = files[_i];
+ if (!(!hidden(file) && !notSources[file])) {
+ continue;
+ }
+ file = path.join(source, file);
+ if (sources.some(function(s) {
+ return s.indexOf(file) >= 0;
+ })) {
+ continue;
+ }
+ sources.push(file);
+ sourceCode.push(null);
+ _results.push(compilePath(file, false, base));
+ }
+ return _results;
+ });
+ });
+ });
+ } catch (_error) {
+ e = _error;
+ if (e.code !== 'ENOENT') {
+ throw e;
+ }
+ }
+ };
+
+ unwatchDir = function(source, base) {
+ var file, prevSources, toRemove, _i, _len;
+ prevSources = sources.slice(0);
+ toRemove = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = sources.length; _i < _len; _i++) {
+ file = sources[_i];
+ if (file.indexOf(source) >= 0) {
+ _results.push(file);
+ }
+ }
+ return _results;
+ })();
+ for (_i = 0, _len = toRemove.length; _i < _len; _i++) {
+ file = toRemove[_i];
+ removeSource(file, base, true);
+ }
+ if (!sources.some(function(s, i) {
+ return prevSources[i] !== s;
+ })) {
+ return;
+ }
+ return compileJoin();
+ };
+
+ removeSource = function(source, base, removeJs) {
+ var index, jsPath;
+ index = sources.indexOf(source);
+ sources.splice(index, 1);
+ sourceCode.splice(index, 1);
+ if (removeJs && !opts.join) {
+ jsPath = outputPath(source, base);
+ return exists(jsPath, function(itExists) {
+ if (itExists) {
+ return fs.unlink(jsPath, function(err) {
+ if (err && err.code !== 'ENOENT') {
+ throw err;
+ }
+ return timeLog("removed " + source);
+ });
+ }
+ });
+ }
+ };
+
+ outputPath = function(source, base, extension) {
+ var baseDir, basename, dir, srcDir;
+ if (extension == null) {
+ extension = ".js";
+ }
+ basename = helpers.baseFileName(source, true, useWinPathSep);
+ srcDir = path.dirname(source);
+ baseDir = base === '.' ? srcDir : srcDir.substring(base.length);
+ dir = opts.output ? path.join(opts.output, baseDir) : srcDir;
+ return path.join(dir, basename + extension);
+ };
+
+ writeJs = function(base, sourcePath, js, jsPath, generatedSourceMap) {
+ var compile, jsDir, sourceMapPath;
+ if (generatedSourceMap == null) {
+ generatedSourceMap = null;
+ }
+ sourceMapPath = outputPath(sourcePath, base, ".map");
+ jsDir = path.dirname(jsPath);
+ compile = function() {
+ if (opts.compile) {
+ if (js.length <= 0) {
+ js = ' ';
+ }
+ if (generatedSourceMap) {
+ js = "" + js + "\n/*\n//@ sourceMappingURL=" + (helpers.baseFileName(sourceMapPath, false, useWinPathSep)) + "\n*/\n";
+ }
+ fs.writeFile(jsPath, js, function(err) {
+ if (err) {
+ return printLine(err.message);
+ } else if (opts.compile && opts.watch) {
+ return timeLog("compiled " + sourcePath);
+ }
+ });
+ }
+ if (generatedSourceMap) {
+ return fs.writeFile(sourceMapPath, generatedSourceMap, function(err) {
+ if (err) {
+ return printLine("Could not write source map: " + err.message);
+ }
+ });
+ }
+ };
+ return exists(jsDir, function(itExists) {
+ if (itExists) {
+ return compile();
+ } else {
+ return exec("mkdir -p " + jsDir, compile);
+ }
+ });
+ };
+
+ wait = function(milliseconds, func) {
+ return setTimeout(func, milliseconds);
+ };
+
+ timeLog = function(message) {
+ return console.log("" + ((new Date).toLocaleTimeString()) + " - " + message);
+ };
+
+ printTokens = function(tokens) {
+ var strings, tag, token, value;
+ strings = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = tokens.length; _i < _len; _i++) {
+ token = tokens[_i];
+ tag = token[0];
+ value = token[1].toString().replace(/\n/, '\\n');
+ _results.push("[" + tag + " " + value + "]");
+ }
+ return _results;
+ })();
+ return printLine(strings.join(' '));
+ };
+
+ parseOptions = function() {
+ var i, o, source, _i, _len;
+ optionParser = new optparse.OptionParser(SWITCHES, BANNER);
+ o = opts = optionParser.parse(process.argv.slice(2));
+ o.compile || (o.compile = !!o.output);
+ o.run = !(o.compile || o.print || o.map);
+ o.print = !!(o.print || (o["eval"] || o.stdio && o.compile));
+ sources = o["arguments"];
+ for (i = _i = 0, _len = sources.length; _i < _len; i = ++_i) {
+ source = sources[i];
+ sourceCode[i] = null;
+ }
+ };
+
+ compileOptions = function(filename, base) {
+ var answer, cwd, jsDir, jsPath;
+ answer = {
+ filename: filename,
+ literate: opts.literate || helpers.isLiterate(filename),
+ bare: opts.bare,
+ header: opts.compile,
+ sourceMap: opts.map
+ };
+ if (filename) {
+ if (base) {
+ cwd = process.cwd();
+ jsPath = outputPath(filename, base);
+ jsDir = path.dirname(jsPath);
+ answer = helpers.merge(answer, {
+ jsPath: jsPath,
+ sourceRoot: path.relative(jsDir, cwd),
+ sourceFiles: [path.relative(cwd, filename)],
+ generatedFile: helpers.baseFileName(jsPath, false, useWinPathSep)
+ });
+ } else {
+ answer = helpers.merge(answer, {
+ sourceRoot: "",
+ sourceFiles: [helpers.baseFileName(filename, false, useWinPathSep)],
+ generatedFile: helpers.baseFileName(filename, true, useWinPathSep) + ".js"
+ });
+ }
+ }
+ return answer;
+ };
+
+ forkNode = function() {
+ var args, nodeArgs;
+ nodeArgs = opts.nodejs.split(/\s+/);
+ args = process.argv.slice(1);
+ args.splice(args.indexOf('--nodejs'), 2);
+ return spawn(process.execPath, nodeArgs.concat(args), {
+ cwd: process.cwd(),
+ env: process.env,
+ customFds: [0, 1, 2]
+ });
+ };
+
+ usage = function() {
+ return printLine((new optparse.OptionParser(SWITCHES, BANNER)).help());
+ };
+
+ version = function() {
+ return printLine("CoffeeScript version " + CoffeeScript.VERSION);
+ };
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/grammar.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/grammar.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/grammar.js
new file mode 100644
index 0000000..24d5bac
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/grammar.js
@@ -0,0 +1,625 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap;
+
+ Parser = require('jison').Parser;
+
+ unwrap = /^function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/;
+
+ o = function(patternString, action, options) {
+ var addLocationDataFn, match, patternCount;
+ patternString = patternString.replace(/\s{2,}/g, ' ');
+ patternCount = patternString.split(' ').length;
+ if (!action) {
+ return [patternString, '$$ = $1;', options];
+ }
+ action = (match = unwrap.exec(action)) ? match[1] : "(" + action + "())";
+ action = action.replace(/\bnew /g, '$&yy.');
+ action = action.replace(/\b(?:Block\.wrap|extend)\b/g, 'yy.$&');
+ addLocationDataFn = function(first, last) {
+ if (!last) {
+ return "yy.addLocationDataFn(@" + first + ")";
+ } else {
+ return "yy.addLocationDataFn(@" + first + ", @" + last + ")";
+ }
+ };
+ action = action.replace(/LOC\(([0-9]*)\)/g, addLocationDataFn('$1'));
+ action = action.replace(/LOC\(([0-9]*),\s*([0-9]*)\)/g, addLocationDataFn('$1', '$2'));
+ return [patternString, "$$ = " + (addLocationDataFn(1, patternCount)) + "(" + action + ");", options];
+ };
+
+ grammar = {
+ Root: [
+ o('', function() {
+ return new Block;
+ }), o('Body'), o('Block TERMINATOR')
+ ],
+ Body: [
+ o('Line', function() {
+ return Block.wrap([$1]);
+ }), o('Body TERMINATOR Line', function() {
+ return $1.push($3);
+ }), o('Body TERMINATOR')
+ ],
+ Line: [o('Expression'), o('Statement')],
+ Statement: [
+ o('Return'), o('Comment'), o('STATEMENT', function() {
+ return new Literal($1);
+ })
+ ],
+ Expression: [o('Value'), o('Invocation'), o('Code'), o('Operation'), o('Assign'), o('If'), o('Try'), o('While'), o('For'), o('Switch'), o('Class'), o('Throw')],
+ Block: [
+ o('INDENT OUTDENT', function() {
+ return new Block;
+ }), o('INDENT Body OUTDENT', function() {
+ return $2;
+ })
+ ],
+ Identifier: [
+ o('IDENTIFIER', function() {
+ return new Literal($1);
+ })
+ ],
+ AlphaNumeric: [
+ o('NUMBER', function() {
+ return new Literal($1);
+ }), o('STRING', function() {
+ return new Literal($1);
+ })
+ ],
+ Literal: [
+ o('AlphaNumeric'), o('JS', function() {
+ return new Literal($1);
+ }), o('REGEX', function() {
+ return new Literal($1);
+ }), o('DEBUGGER', function() {
+ return new Literal($1);
+ }), o('UNDEFINED', function() {
+ return new Undefined;
+ }), o('NULL', function() {
+ return new Null;
+ }), o('BOOL', function() {
+ return new Bool($1);
+ })
+ ],
+ Assign: [
+ o('Assignable = Expression', function() {
+ return new Assign($1, $3);
+ }), o('Assignable = TERMINATOR Expression', function() {
+ return new Assign($1, $4);
+ }), o('Assignable = INDENT Expression OUTDENT', function() {
+ return new Assign($1, $4);
+ })
+ ],
+ AssignObj: [
+ o('ObjAssignable', function() {
+ return new Value($1);
+ }), o('ObjAssignable : Expression', function() {
+ return new Assign(LOC(1)(new Value($1)), $3, 'object');
+ }), o('ObjAssignable :\
+ INDENT Expression OUTDENT', function() {
+ return new Assign(LOC(1)(new Value($1)), $4, 'object');
+ }), o('Comment')
+ ],
+ ObjAssignable: [o('Identifier'), o('AlphaNumeric'), o('ThisProperty')],
+ Return: [
+ o('RETURN Expression', function() {
+ return new Return($2);
+ }), o('RETURN', function() {
+ return new Return;
+ })
+ ],
+ Comment: [
+ o('HERECOMMENT', function() {
+ return new Comment($1);
+ })
+ ],
+ Code: [
+ o('PARAM_START ParamList PARAM_END FuncGlyph Block', function() {
+ return new Code($2, $5, $4);
+ }), o('FuncGlyph Block', function() {
+ return new Code([], $2, $1);
+ })
+ ],
+ FuncGlyph: [
+ o('->', function() {
+ return 'func';
+ }), o('=>', function() {
+ return 'boundfunc';
+ })
+ ],
+ OptComma: [o(''), o(',')],
+ ParamList: [
+ o('', function() {
+ return [];
+ }), o('Param', function() {
+ return [$1];
+ }), o('ParamList , Param', function() {
+ return $1.concat($3);
+ }), o('ParamList OptComma TERMINATOR Param', function() {
+ return $1.concat($4);
+ }), o('ParamList OptComma INDENT ParamList OptComma OUTDENT', function() {
+ return $1.concat($4);
+ })
+ ],
+ Param: [
+ o('ParamVar', function() {
+ return new Param($1);
+ }), o('ParamVar ...', function() {
+ return new Param($1, null, true);
+ }), o('ParamVar = Expression', function() {
+ return new Param($1, $3);
+ })
+ ],
+ ParamVar: [o('Identifier'), o('ThisProperty'), o('Array'), o('Object')],
+ Splat: [
+ o('Expression ...', function() {
+ return new Splat($1);
+ })
+ ],
+ SimpleAssignable: [
+ o('Identifier', function() {
+ return new Value($1);
+ }), o('Value Accessor', function() {
+ return $1.add($2);
+ }), o('Invocation Accessor', function() {
+ return new Value($1, [].concat($2));
+ }), o('ThisProperty')
+ ],
+ Assignable: [
+ o('SimpleAssignable'), o('Array', function() {
+ return new Value($1);
+ }), o('Object', function() {
+ return new Value($1);
+ })
+ ],
+ Value: [
+ o('Assignable'), o('Literal', function() {
+ return new Value($1);
+ }), o('Parenthetical', function() {
+ return new Value($1);
+ }), o('Range', function() {
+ return new Value($1);
+ }), o('This')
+ ],
+ Accessor: [
+ o('. Identifier', function() {
+ return new Access($2);
+ }), o('?. Identifier', function() {
+ return new Access($2, 'soak');
+ }), o(':: Identifier', function() {
+ return [LOC(1)(new Access(new Literal('prototype'))), LOC(2)(new Access($2))];
+ }), o('?:: Identifier', function() {
+ return [LOC(1)(new Access(new Literal('prototype'), 'soak')), LOC(2)(new Access($2))];
+ }), o('::', function() {
+ return new Access(new Literal('prototype'));
+ }), o('Index')
+ ],
+ Index: [
+ o('INDEX_START IndexValue INDEX_END', function() {
+ return $2;
+ }), o('INDEX_SOAK Index', function() {
+ return extend($2, {
+ soak: true
+ });
+ })
+ ],
+ IndexValue: [
+ o('Expression', function() {
+ return new Index($1);
+ }), o('Slice', function() {
+ return new Slice($1);
+ })
+ ],
+ Object: [
+ o('{ AssignList OptComma }', function() {
+ return new Obj($2, $1.generated);
+ })
+ ],
+ AssignList: [
+ o('', function() {
+ return [];
+ }), o('AssignObj', function() {
+ return [$1];
+ }), o('AssignList , AssignObj', function() {
+ return $1.concat($3);
+ }), o('AssignList OptComma TERMINATOR AssignObj', function() {
+ return $1.concat($4);
+ }), o('AssignList OptComma INDENT AssignList OptComma OUTDENT', function() {
+ return $1.concat($4);
+ })
+ ],
+ Class: [
+ o('CLASS', function() {
+ return new Class;
+ }), o('CLASS Block', function() {
+ return new Class(null, null, $2);
+ }), o('CLASS EXTENDS Expression', function() {
+ return new Class(null, $3);
+ }), o('CLASS EXTENDS Expression Block', function() {
+ return new Class(null, $3, $4);
+ }), o('CLASS SimpleAssignable', function() {
+ return new Class($2);
+ }), o('CLASS SimpleAssignable Block', function() {
+ return new Class($2, null, $3);
+ }), o('CLASS SimpleAssignable EXTENDS Expression', function() {
+ return new Class($2, $4);
+ }), o('CLASS SimpleAssignable EXTENDS Expression Block', function() {
+ return new Class($2, $4, $5);
+ })
+ ],
+ Invocation: [
+ o('Value OptFuncExist Arguments', function() {
+ return new Call($1, $3, $2);
+ }), o('Invocation OptFuncExist Arguments', function() {
+ return new Call($1, $3, $2);
+ }), o('SUPER', function() {
+ return new Call('super', [new Splat(new Literal('arguments'))]);
+ }), o('SUPER Arguments', function() {
+ return new Call('super', $2);
+ })
+ ],
+ OptFuncExist: [
+ o('', function() {
+ return false;
+ }), o('FUNC_EXIST', function() {
+ return true;
+ })
+ ],
+ Arguments: [
+ o('CALL_START CALL_END', function() {
+ return [];
+ }), o('CALL_START ArgList OptComma CALL_END', function() {
+ return $2;
+ })
+ ],
+ This: [
+ o('THIS', function() {
+ return new Value(new Literal('this'));
+ }), o('@', function() {
+ return new Value(new Literal('this'));
+ })
+ ],
+ ThisProperty: [
+ o('@ Identifier', function() {
+ return new Value(LOC(1)(new Literal('this')), [LOC(2)(new Access($2))], 'this');
+ })
+ ],
+ Array: [
+ o('[ ]', function() {
+ return new Arr([]);
+ }), o('[ ArgList OptComma ]', function() {
+ return new Arr($2);
+ })
+ ],
+ RangeDots: [
+ o('..', function() {
+ return 'inclusive';
+ }), o('...', function() {
+ return 'exclusive';
+ })
+ ],
+ Range: [
+ o('[ Expression RangeDots Expression ]', function() {
+ return new Range($2, $4, $3);
+ })
+ ],
+ Slice: [
+ o('Expression RangeDots Expression', function() {
+ return new Range($1, $3, $2);
+ }), o('Expression RangeDots', function() {
+ return new Range($1, null, $2);
+ }), o('RangeDots Expression', function() {
+ return new Range(null, $2, $1);
+ }), o('RangeDots', function() {
+ return new Range(null, null, $1);
+ })
+ ],
+ ArgList: [
+ o('Arg', function() {
+ return [$1];
+ }), o('ArgList , Arg', function() {
+ return $1.concat($3);
+ }), o('ArgList OptComma TERMINATOR Arg', function() {
+ return $1.concat($4);
+ }), o('INDENT ArgList OptComma OUTDENT', function() {
+ return $2;
+ }), o('ArgList OptComma INDENT ArgList OptComma OUTDENT', function() {
+ return $1.concat($4);
+ })
+ ],
+ Arg: [o('Expression'), o('Splat')],
+ SimpleArgs: [
+ o('Expression'), o('SimpleArgs , Expression', function() {
+ return [].concat($1, $3);
+ })
+ ],
+ Try: [
+ o('TRY Block', function() {
+ return new Try($2);
+ }), o('TRY Block Catch', function() {
+ return new Try($2, $3[0], $3[1]);
+ }), o('TRY Block FINALLY Block', function() {
+ return new Try($2, null, null, $4);
+ }), o('TRY Block Catch FINALLY Block', function() {
+ return new Try($2, $3[0], $3[1], $5);
+ })
+ ],
+ Catch: [
+ o('CATCH Identifier Block', function() {
+ return [$2, $3];
+ }), o('CATCH Object Block', function() {
+ return [LOC(2)(new Value($2)), $3];
+ }), o('CATCH Block', function() {
+ return [null, $2];
+ })
+ ],
+ Throw: [
+ o('THROW Expression', function() {
+ return new Throw($2);
+ })
+ ],
+ Parenthetical: [
+ o('( Body )', function() {
+ return new Parens($2);
+ }), o('( INDENT Body OUTDENT )', function() {
+ return new Parens($3);
+ })
+ ],
+ WhileSource: [
+ o('WHILE Expression', function() {
+ return new While($2);
+ }), o('WHILE Expression WHEN Expression', function() {
+ return new While($2, {
+ guard: $4
+ });
+ }), o('UNTIL Expression', function() {
+ return new While($2, {
+ invert: true
+ });
+ }), o('UNTIL Expression WHEN Expression', function() {
+ return new While($2, {
+ invert: true,
+ guard: $4
+ });
+ })
+ ],
+ While: [
+ o('WhileSource Block', function() {
+ return $1.addBody($2);
+ }), o('Statement WhileSource', function() {
+ return $2.addBody(LOC(1)(Block.wrap([$1])));
+ }), o('Expression WhileSource', function() {
+ return $2.addBody(LOC(1)(Block.wrap([$1])));
+ }), o('Loop', function() {
+ return $1;
+ })
+ ],
+ Loop: [
+ o('LOOP Block', function() {
+ return new While(LOC(1)(new Literal('true'))).addBody($2);
+ }), o('LOOP Expression', function() {
+ return new While(LOC(1)(new Literal('true'))).addBody(LOC(2)(Block.wrap([$2])));
+ })
+ ],
+ For: [
+ o('Statement ForBody', function() {
+ return new For($1, $2);
+ }), o('Expression ForBody', function() {
+ return new For($1, $2);
+ }), o('ForBody Block', function() {
+ return new For($2, $1);
+ })
+ ],
+ ForBody: [
+ o('FOR Range', function() {
+ return {
+ source: LOC(2)(new Value($2))
+ };
+ }), o('ForStart ForSource', function() {
+ $2.own = $1.own;
+ $2.name = $1[0];
+ $2.index = $1[1];
+ return $2;
+ })
+ ],
+ ForStart: [
+ o('FOR ForVariables', function() {
+ return $2;
+ }), o('FOR OWN ForVariables', function() {
+ $3.own = true;
+ return $3;
+ })
+ ],
+ ForValue: [
+ o('Identifier'), o('ThisProperty'), o('Array', function() {
+ return new Value($1);
+ }), o('Object', function() {
+ return new Value($1);
+ })
+ ],
+ ForVariables: [
+ o('ForValue', function() {
+ return [$1];
+ }), o('ForValue , ForValue', function() {
+ return [$1, $3];
+ })
+ ],
+ ForSource: [
+ o('FORIN Expression', function() {
+ return {
+ source: $2
+ };
+ }), o('FOROF Expression', function() {
+ return {
+ source: $2,
+ object: true
+ };
+ }), o('FORIN Expression WHEN Expression', function() {
+ return {
+ source: $2,
+ guard: $4
+ };
+ }), o('FOROF Expression WHEN Expression', function() {
+ return {
+ source: $2,
+ guard: $4,
+ object: true
+ };
+ }), o('FORIN Expression BY Expression', function() {
+ return {
+ source: $2,
+ step: $4
+ };
+ }), o('FORIN Expression WHEN Expression BY Expression', function() {
+ return {
+ source: $2,
+ guard: $4,
+ step: $6
+ };
+ }), o('FORIN Expression BY Expression WHEN Expression', function() {
+ return {
+ source: $2,
+ step: $4,
+ guard: $6
+ };
+ })
+ ],
+ Switch: [
+ o('SWITCH Expression INDENT Whens OUTDENT', function() {
+ return new Switch($2, $4);
+ }), o('SWITCH Expression INDENT Whens ELSE Block OUTDENT', function() {
+ return new Switch($2, $4, $6);
+ }), o('SWITCH INDENT Whens OUTDENT', function() {
+ return new Switch(null, $3);
+ }), o('SWITCH INDENT Whens ELSE Block OUTDENT', function() {
+ return new Switch(null, $3, $5);
+ })
+ ],
+ Whens: [
+ o('When'), o('Whens When', function() {
+ return $1.concat($2);
+ })
+ ],
+ When: [
+ o('LEADING_WHEN SimpleArgs Block', function() {
+ return [[$2, $3]];
+ }), o('LEADING_WHEN SimpleArgs Block TERMINATOR', function() {
+ return [[$2, $3]];
+ })
+ ],
+ IfBlock: [
+ o('IF Expression Block', function() {
+ return new If($2, $3, {
+ type: $1
+ });
+ }), o('IfBlock ELSE IF Expression Block', function() {
+ return $1.addElse(new If($4, $5, {
+ type: $3
+ }));
+ })
+ ],
+ If: [
+ o('IfBlock'), o('IfBlock ELSE Block', function() {
+ return $1.addElse($3);
+ }), o('Statement POST_IF Expression', function() {
+ return new If($3, LOC(1)(Block.wrap([$1])), {
+ type: $2,
+ statement: true
+ });
+ }), o('Expression POST_IF Expression', function() {
+ return new If($3, LOC(1)(Block.wrap([$1])), {
+ type: $2,
+ statement: true
+ });
+ })
+ ],
+ Operation: [
+ o('UNARY Expression', function() {
+ return new Op($1, $2);
+ }), o('- Expression', (function() {
+ return new Op('-', $2);
+ }), {
+ prec: 'UNARY'
+ }), o('+ Expression', (function() {
+ return new Op('+', $2);
+ }), {
+ prec: 'UNARY'
+ }), o('-- SimpleAssignable', function() {
+ return new Op('--', $2);
+ }), o('++ SimpleAssignable', function() {
+ return new Op('++', $2);
+ }), o('SimpleAssignable --', function() {
+ return new Op('--', $1, null, true);
+ }), o('SimpleAssignable ++', function() {
+ return new Op('++', $1, null, true);
+ }), o('Expression ?', function() {
+ return new Existence($1);
+ }), o('Expression + Expression', function() {
+ return new Op('+', $1, $3);
+ }), o('Expression - Expression', function() {
+ return new Op('-', $1, $3);
+ }), o('Expression MATH Expression', function() {
+ return new Op($2, $1, $3);
+ }), o('Expression SHIFT Expression', function() {
+ return new Op($2, $1, $3);
+ }), o('Expression COMPARE Expression', function() {
+ return new Op($2, $1, $3);
+ }), o('Expression LOGIC Expression', function() {
+ return new Op($2, $1, $3);
+ }), o('Expression RELATION Expression', function() {
+ if ($2.charAt(0) === '!') {
+ return new Op($2.slice(1), $1, $3).invert();
+ } else {
+ return new Op($2, $1, $3);
+ }
+ }), o('SimpleAssignable COMPOUND_ASSIGN\
+ Expression', function() {
+ return new Assign($1, $3, $2);
+ }), o('SimpleAssignable COMPOUND_ASSIGN\
+ INDENT Expression OUTDENT', function() {
+ return new Assign($1, $4, $2);
+ }), o('SimpleAssignable COMPOUND_ASSIGN TERMINATOR\
+ Expression', function() {
+ return new Assign($1, $4, $2);
+ }), o('SimpleAssignable EXTENDS Expression', function() {
+ return new Extends($1, $3);
+ })
+ ]
+ };
+
+ operators = [['left', '.', '?.', '::', '?::'], ['left', 'CALL_START', 'CALL_END'], ['nonassoc', '++', '--'], ['left', '?'], ['right', 'UNARY'], ['left', 'MATH'], ['left', '+', '-'], ['left', 'SHIFT'], ['left', 'RELATION'], ['left', 'COMPARE'], ['left', 'LOGIC'], ['nonassoc', 'INDENT', 'OUTDENT'], ['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS'], ['right', 'FORIN', 'FOROF', 'BY', 'WHEN'], ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS'], ['right', 'POST_IF']];
+
+ tokens = [];
+
+ for (name in grammar) {
+ alternatives = grammar[name];
+ grammar[name] = (function() {
+ var _i, _j, _len, _len1, _ref, _results;
+ _results = [];
+ for (_i = 0, _len = alternatives.length; _i < _len; _i++) {
+ alt = alternatives[_i];
+ _ref = alt[0].split(' ');
+ for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
+ token = _ref[_j];
+ if (!grammar[token]) {
+ tokens.push(token);
+ }
+ }
+ if (name === 'Root') {
+ alt[1] = "return " + alt[1];
+ }
+ _results.push(alt);
+ }
+ return _results;
+ })();
+ }
+
+ exports.parser = new Parser({
+ tokens: tokens.join(' '),
+ bnf: grammar,
+ operators: operators.reverse(),
+ startSymbol: 'Root'
+ });
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/helpers.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/helpers.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/helpers.js
new file mode 100644
index 0000000..352dc36
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/helpers.js
@@ -0,0 +1,223 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var buildLocationData, extend, flatten, last, repeat, _ref;
+
+ exports.starts = function(string, literal, start) {
+ return literal === string.substr(start, literal.length);
+ };
+
+ exports.ends = function(string, literal, back) {
+ var len;
+ len = literal.length;
+ return literal === string.substr(string.length - len - (back || 0), len);
+ };
+
+ exports.repeat = repeat = function(str, n) {
+ var res;
+ res = '';
+ while (n > 0) {
+ if (n & 1) {
+ res += str;
+ }
+ n >>>= 1;
+ str += str;
+ }
+ return res;
+ };
+
+ exports.compact = function(array) {
+ var item, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = array.length; _i < _len; _i++) {
+ item = array[_i];
+ if (item) {
+ _results.push(item);
+ }
+ }
+ return _results;
+ };
+
+ exports.count = function(string, substr) {
+ var num, pos;
+ num = pos = 0;
+ if (!substr.length) {
+ return 1 / 0;
+ }
+ while (pos = 1 + string.indexOf(substr, pos)) {
+ num++;
+ }
+ return num;
+ };
+
+ exports.merge = function(options, overrides) {
+ return extend(extend({}, options), overrides);
+ };
+
+ extend = exports.extend = function(object, properties) {
+ var key, val;
+ for (key in properties) {
+ val = properties[key];
+ object[key] = val;
+ }
+ return object;
+ };
+
+ exports.flatten = flatten = function(array) {
+ var element, flattened, _i, _len;
+ flattened = [];
+ for (_i = 0, _len = array.length; _i < _len; _i++) {
+ element = array[_i];
+ if (element instanceof Array) {
+ flattened = flattened.concat(flatten(element));
+ } else {
+ flattened.push(element);
+ }
+ }
+ return flattened;
+ };
+
+ exports.del = function(obj, key) {
+ var val;
+ val = obj[key];
+ delete obj[key];
+ return val;
+ };
+
+ exports.last = last = function(array, back) {
+ return array[array.length - (back || 0) - 1];
+ };
+
+ exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) {
+ var e, _i, _len;
+ for (_i = 0, _len = this.length; _i < _len; _i++) {
+ e = this[_i];
+ if (fn(e)) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ exports.invertLiterate = function(code) {
+ var line, lines, maybe_code;
+ maybe_code = true;
+ lines = (function() {
+ var _i, _len, _ref1, _results;
+ _ref1 = code.split('\n');
+ _results = [];
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ line = _ref1[_i];
+ if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) {
+ _results.push(line);
+ } else if (maybe_code = /^\s*$/.test(line)) {
+ _results.push(line);
+ } else {
+ _results.push('# ' + line);
+ }
+ }
+ return _results;
+ })();
+ return lines.join('\n');
+ };
+
+ buildLocationData = function(first, last) {
+ if (!last) {
+ return first;
+ } else {
+ return {
+ first_line: first.first_line,
+ first_column: first.first_column,
+ last_line: last.last_line,
+ last_column: last.last_column
+ };
+ }
+ };
+
+ exports.addLocationDataFn = function(first, last) {
+ return function(obj) {
+ if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) {
+ obj.updateLocationDataIfMissing(buildLocationData(first, last));
+ }
+ return obj;
+ };
+ };
+
+ exports.locationDataToString = function(obj) {
+ var locationData;
+ if (("2" in obj) && ("first_line" in obj[2])) {
+ locationData = obj[2];
+ } else if ("first_line" in obj) {
+ locationData = obj;
+ }
+ if (locationData) {
+ return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1));
+ } else {
+ return "No location data";
+ }
+ };
+
+ exports.baseFileName = function(file, stripExt, useWinPathSep) {
+ var parts, pathSep;
+ if (stripExt == null) {
+ stripExt = false;
+ }
+ if (useWinPathSep == null) {
+ useWinPathSep = false;
+ }
+ pathSep = useWinPathSep ? /\\|\// : /\//;
+ parts = file.split(pathSep);
+ file = parts[parts.length - 1];
+ if (!stripExt) {
+ return file;
+ }
+ parts = file.split('.');
+ parts.pop();
+ if (parts[parts.length - 1] === 'coffee' && parts.length > 1) {
+ parts.pop();
+ }
+ return parts.join('.');
+ };
+
+ exports.isCoffee = function(file) {
+ return /\.((lit)?coffee|coffee\.md)$/.test(file);
+ };
+
+ exports.isLiterate = function(file) {
+ return /\.(litcoffee|coffee\.md)$/.test(file);
+ };
+
+ exports.throwSyntaxError = function(message, location) {
+ var error;
+ if (location.last_line == null) {
+ location.last_line = location.first_line;
+ }
+ if (location.last_column == null) {
+ location.last_column = location.first_column;
+ }
+ error = new SyntaxError(message);
+ error.location = location;
+ throw error;
+ };
+
+ exports.prettyErrorMessage = function(error, fileName, code, useColors) {
+ var codeLine, colorize, end, first_column, first_line, last_column, last_line, marker, message, start, _ref1;
+ if (!error.location) {
+ return error.stack || ("" + error);
+ }
+ _ref1 = error.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column;
+ codeLine = code.split('\n')[first_line];
+ start = first_column;
+ end = first_line === last_line ? last_column + 1 : codeLine.length;
+ marker = repeat(' ', start) + repeat('^', end - start);
+ if (useColors) {
+ colorize = function(str) {
+ return "\x1B[1;31m" + str + "\x1B[0m";
+ };
+ codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end);
+ marker = colorize(marker);
+ }
+ message = "" + fileName + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + error.message + "\n" + codeLine + "\n" + marker;
+ return message;
+ };
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/index.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/index.js
new file mode 100644
index 0000000..68787df
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/index.js
@@ -0,0 +1,11 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var key, val, _ref;
+
+ _ref = require('./coffee-script');
+ for (key in _ref) {
+ val = _ref[key];
+ exports[key] = val;
+ }
+
+}).call(this);
[25/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/examples/g.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/examples/g.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/examples/g.js
new file mode 100644
index 0000000..be122df
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/examples/g.js
@@ -0,0 +1,9 @@
+var Glob = require("../").Glob
+
+var pattern = "test/a/**/[cg]/../[cg]"
+console.log(pattern)
+
+var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) {
+ console.log("matches", matches)
+})
+console.log("after")
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/examples/usr-local.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/examples/usr-local.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/examples/usr-local.js
new file mode 100644
index 0000000..327a425
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/examples/usr-local.js
@@ -0,0 +1,9 @@
+var Glob = require("../").Glob
+
+var pattern = "{./*/*,/*,/usr/local/*}"
+console.log(pattern)
+
+var mg = new Glob(pattern, {mark: true}, function (er, matches) {
+ console.log("matches", matches)
+})
+console.log("after")
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/glob.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/glob.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/glob.js
new file mode 100644
index 0000000..f0118a4
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/glob.js
@@ -0,0 +1,675 @@
+// Approach:
+//
+// 1. Get the minimatch set
+// 2. For each pattern in the set, PROCESS(pattern)
+// 3. Store matches per-set, then uniq them
+//
+// PROCESS(pattern)
+// Get the first [n] items from pattern that are all strings
+// Join these together. This is PREFIX.
+// If there is no more remaining, then stat(PREFIX) and
+// add to matches if it succeeds. END.
+// readdir(PREFIX) as ENTRIES
+// If fails, END
+// If pattern[n] is GLOBSTAR
+// // handle the case where the globstar match is empty
+// // by pruning it out, and testing the resulting pattern
+// PROCESS(pattern[0..n] + pattern[n+1 .. $])
+// // handle other cases.
+// for ENTRY in ENTRIES (not dotfiles)
+// // attach globstar + tail onto the entry
+// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $])
+//
+// else // not globstar
+// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
+// Test ENTRY against pattern[n]
+// If fails, continue
+// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
+//
+// Caveat:
+// Cache all stats and readdirs results to minimize syscall. Since all
+// we ever care about is existence and directory-ness, we can just keep
+// `true` for files, and [children,...] for directories, or `false` for
+// things that don't exist.
+
+
+
+module.exports = glob
+
+var fs = require("graceful-fs")
+, minimatch = require("minimatch")
+, Minimatch = minimatch.Minimatch
+, inherits = require("inherits")
+, EE = require("events").EventEmitter
+, path = require("path")
+, isDir = {}
+, assert = require("assert").ok
+
+function glob (pattern, options, cb) {
+ if (typeof options === "function") cb = options, options = {}
+ if (!options) options = {}
+
+ if (typeof options === "number") {
+ deprecated()
+ return
+ }
+
+ var g = new Glob(pattern, options, cb)
+ return g.sync ? g.found : g
+}
+
+glob.fnmatch = deprecated
+
+function deprecated () {
+ throw new Error("glob's interface has changed. Please see the docs.")
+}
+
+glob.sync = globSync
+function globSync (pattern, options) {
+ if (typeof options === "number") {
+ deprecated()
+ return
+ }
+
+ options = options || {}
+ options.sync = true
+ return glob(pattern, options)
+}
+
+
+glob.Glob = Glob
+inherits(Glob, EE)
+function Glob (pattern, options, cb) {
+ if (!(this instanceof Glob)) {
+ return new Glob(pattern, options, cb)
+ }
+
+ if (typeof cb === "function") {
+ this.on("error", cb)
+ this.on("end", function (matches) {
+ cb(null, matches)
+ })
+ }
+
+ options = options || {}
+
+ this.EOF = {}
+ this._emitQueue = []
+
+ this.maxDepth = options.maxDepth || 1000
+ this.maxLength = options.maxLength || Infinity
+ this.cache = options.cache || {}
+ this.statCache = options.statCache || {}
+
+ this.changedCwd = false
+ var cwd = process.cwd()
+ if (!options.hasOwnProperty("cwd")) this.cwd = cwd
+ else {
+ this.cwd = options.cwd
+ this.changedCwd = path.resolve(options.cwd) !== cwd
+ }
+
+ this.root = options.root || path.resolve(this.cwd, "/")
+ this.root = path.resolve(this.root)
+ if (process.platform === "win32")
+ this.root = this.root.replace(/\\/g, "/")
+
+ this.nomount = !!options.nomount
+
+ if (!pattern) {
+ throw new Error("must provide pattern")
+ }
+
+ // base-matching: just use globstar for that.
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
+ if (options.noglobstar) {
+ throw new Error("base matching requires globstar")
+ }
+ pattern = "**/" + pattern
+ }
+
+ this.strict = options.strict !== false
+ this.dot = !!options.dot
+ this.mark = !!options.mark
+ this.sync = !!options.sync
+ this.nounique = !!options.nounique
+ this.nonull = !!options.nonull
+ this.nosort = !!options.nosort
+ this.nocase = !!options.nocase
+ this.stat = !!options.stat
+
+ this.debug = !!options.debug || !!options.globDebug
+ if (this.debug)
+ this.log = console.error
+
+ this.silent = !!options.silent
+
+ var mm = this.minimatch = new Minimatch(pattern, options)
+ this.options = mm.options
+ pattern = this.pattern = mm.pattern
+
+ this.error = null
+ this.aborted = false
+
+ // list of all the patterns that ** has resolved do, so
+ // we can avoid visiting multiple times.
+ this._globstars = {}
+
+ EE.call(this)
+
+ // process each pattern in the minimatch set
+ var n = this.minimatch.set.length
+
+ // The matches are stored as {<filename>: true,...} so that
+ // duplicates are automagically pruned.
+ // Later, we do an Object.keys() on these.
+ // Keep them as a list so we can fill in when nonull is set.
+ this.matches = new Array(n)
+
+ this.minimatch.set.forEach(iterator.bind(this))
+ function iterator (pattern, i, set) {
+ this._process(pattern, 0, i, function (er) {
+ if (er) this.emit("error", er)
+ if (-- n <= 0) this._finish()
+ })
+ }
+}
+
+Glob.prototype.log = function () {}
+
+Glob.prototype._finish = function () {
+ assert(this instanceof Glob)
+
+ var nou = this.nounique
+ , all = nou ? [] : {}
+
+ for (var i = 0, l = this.matches.length; i < l; i ++) {
+ var matches = this.matches[i]
+ this.log("matches[%d] =", i, matches)
+ // do like the shell, and spit out the literal glob
+ if (!matches) {
+ if (this.nonull) {
+ var literal = this.minimatch.globSet[i]
+ if (nou) all.push(literal)
+ else all[literal] = true
+ }
+ } else {
+ // had matches
+ var m = Object.keys(matches)
+ if (nou) all.push.apply(all, m)
+ else m.forEach(function (m) {
+ all[m] = true
+ })
+ }
+ }
+
+ if (!nou) all = Object.keys(all)
+
+ if (!this.nosort) {
+ all = all.sort(this.nocase ? alphasorti : alphasort)
+ }
+
+ if (this.mark) {
+ // at *some* point we statted all of these
+ all = all.map(function (m) {
+ var sc = this.cache[m]
+ if (!sc)
+ return m
+ var isDir = (Array.isArray(sc) || sc === 2)
+ if (isDir && m.slice(-1) !== "/") {
+ return m + "/"
+ }
+ if (!isDir && m.slice(-1) === "/") {
+ return m.replace(/\/+$/, "")
+ }
+ return m
+ }, this)
+ }
+
+ this.log("emitting end", all)
+
+ this.EOF = this.found = all
+ this.emitMatch(this.EOF)
+}
+
+function alphasorti (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return alphasort(a, b)
+}
+
+function alphasort (a, b) {
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+Glob.prototype.abort = function () {
+ this.aborted = true
+ this.emit("abort")
+}
+
+Glob.prototype.pause = function () {
+ if (this.paused) return
+ if (this.sync)
+ this.emit("error", new Error("Can't pause/resume sync glob"))
+ this.paused = true
+ this.emit("pause")
+}
+
+Glob.prototype.resume = function () {
+ if (!this.paused) return
+ if (this.sync)
+ this.emit("error", new Error("Can't pause/resume sync glob"))
+ this.paused = false
+ this.emit("resume")
+ this._processEmitQueue()
+ //process.nextTick(this.emit.bind(this, "resume"))
+}
+
+Glob.prototype.emitMatch = function (m) {
+ if (!this.stat || this.statCache[m] || m === this.EOF) {
+ this._emitQueue.push(m)
+ this._processEmitQueue()
+ } else {
+ this._stat(m, function(exists, isDir) {
+ if (exists) {
+ this._emitQueue.push(m)
+ this._processEmitQueue()
+ }
+ })
+ }
+}
+
+Glob.prototype._processEmitQueue = function (m) {
+ while (!this._processingEmitQueue &&
+ !this.paused) {
+ this._processingEmitQueue = true
+ var m = this._emitQueue.shift()
+ if (!m) {
+ this._processingEmitQueue = false
+ break
+ }
+
+ this.log('emit!', m === this.EOF ? "end" : "match")
+
+ this.emit(m === this.EOF ? "end" : "match", m)
+ this._processingEmitQueue = false
+ }
+}
+
+Glob.prototype._process = function (pattern, depth, index, cb_) {
+ assert(this instanceof Glob)
+
+ var cb = function cb (er, res) {
+ assert(this instanceof Glob)
+ if (this.paused) {
+ if (!this._processQueue) {
+ this._processQueue = []
+ this.once("resume", function () {
+ var q = this._processQueue
+ this._processQueue = null
+ q.forEach(function (cb) { cb() })
+ })
+ }
+ this._processQueue.push(cb_.bind(this, er, res))
+ } else {
+ cb_.call(this, er, res)
+ }
+ }.bind(this)
+
+ if (this.aborted) return cb()
+
+ if (depth > this.maxDepth) return cb()
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === "string") {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // see if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ prefix = pattern.join("/")
+ this._stat(prefix, function (exists, isDir) {
+ // either it's there, or it isn't.
+ // nothing more to do, either way.
+ if (exists) {
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ if (prefix.charAt(0) === "/") {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ }
+ }
+
+ if (process.platform === "win32")
+ prefix = prefix.replace(/\\/g, "/")
+
+ this.matches[index] = this.matches[index] || {}
+ this.matches[index][prefix] = true
+ this.emitMatch(prefix)
+ }
+ return cb()
+ })
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's "absolute" like /foo/bar,
+ // or "relative" like "../baz"
+ prefix = pattern.slice(0, n)
+ prefix = prefix.join("/")
+ break
+ }
+
+ // get the list of entries.
+ var read
+ if (prefix === null) read = "."
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
+ if (!prefix || !isAbsolute(prefix)) {
+ prefix = path.join("/", prefix)
+ }
+ read = prefix = path.resolve(prefix)
+
+ // if (process.platform === "win32")
+ // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/")
+
+ this.log('absolute: ', prefix, this.root, pattern, read)
+ } else {
+ read = prefix
+ }
+
+ this.log('readdir(%j)', read, this.cwd, this.root)
+
+ return this._readdir(read, function (er, entries) {
+ if (er) {
+ // not a directory!
+ // this means that, whatever else comes after this, it can never match
+ return cb()
+ }
+
+ // globstar is special
+ if (pattern[n] === minimatch.GLOBSTAR) {
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ]
+ entries.forEach(function (e) {
+ if (e.charAt(0) === "." && !this.dot) return
+ // instead of the globstar
+ s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)))
+ // below the globstar
+ s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n)))
+ }, this)
+
+ s = s.filter(function (pattern) {
+ var key = gsKey(pattern)
+ var seen = !this._globstars[key]
+ this._globstars[key] = true
+ return seen
+ }, this)
+
+ if (!s.length)
+ return cb()
+
+ // now asyncForEach over this
+ var l = s.length
+ , errState = null
+ s.forEach(function (gsPattern) {
+ this._process(gsPattern, depth + 1, index, function (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (--l <= 0) return cb()
+ })
+ }, this)
+
+ return
+ }
+
+ // not a globstar
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = pattern[n]
+ var rawGlob = pattern[n]._glob
+ , dotOk = this.dot || rawGlob.charAt(0) === "."
+
+ entries = entries.filter(function (e) {
+ return (e.charAt(0) !== "." || dotOk) &&
+ e.match(pattern[n])
+ })
+
+ // If n === pattern.length - 1, then there's no need for the extra stat
+ // *unless* the user has specified "mark" or "stat" explicitly.
+ // We know that they exist, since the readdir returned them.
+ if (n === pattern.length - 1 &&
+ !this.mark &&
+ !this.stat) {
+ entries.forEach(function (e) {
+ if (prefix) {
+ if (prefix !== "/") e = prefix + "/" + e
+ else e = prefix + e
+ }
+ if (e.charAt(0) === "/" && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+
+ if (process.platform === "win32")
+ e = e.replace(/\\/g, "/")
+
+ this.matches[index] = this.matches[index] || {}
+ this.matches[index][e] = true
+ this.emitMatch(e)
+ }, this)
+ return cb.call(this)
+ }
+
+
+ // now test all the remaining entries as stand-ins for that part
+ // of the pattern.
+ var l = entries.length
+ , errState = null
+ if (l === 0) return cb() // no matches possible
+ entries.forEach(function (e) {
+ var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))
+ this._process(p, depth + 1, index, function (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (--l === 0) return cb.call(this)
+ })
+ }, this)
+ })
+
+}
+
+function gsKey (pattern) {
+ return '**' + pattern.map(function (p) {
+ return (p === minimatch.GLOBSTAR) ? '**' : (''+p)
+ }).join('/')
+}
+
+Glob.prototype._stat = function (f, cb) {
+ assert(this instanceof Glob)
+ var abs = f
+ if (f.charAt(0) === "/") {
+ abs = path.join(this.root, f)
+ } else if (this.changedCwd) {
+ abs = path.resolve(this.cwd, f)
+ }
+
+ if (f.length > this.maxLength) {
+ var er = new Error("Path name too long")
+ er.code = "ENAMETOOLONG"
+ er.path = f
+ return this._afterStat(f, abs, cb, er)
+ }
+
+ this.log('stat', [this.cwd, f, '=', abs])
+
+ if (!this.stat && this.cache.hasOwnProperty(f)) {
+ var exists = this.cache[f]
+ , isDir = exists && (Array.isArray(exists) || exists === 2)
+ if (this.sync) return cb.call(this, !!exists, isDir)
+ return process.nextTick(cb.bind(this, !!exists, isDir))
+ }
+
+ var stat = this.statCache[abs]
+ if (this.sync || stat) {
+ var er
+ try {
+ stat = fs.statSync(abs)
+ } catch (e) {
+ er = e
+ }
+ this._afterStat(f, abs, cb, er, stat)
+ } else {
+ fs.stat(abs, this._afterStat.bind(this, f, abs, cb))
+ }
+}
+
+Glob.prototype._afterStat = function (f, abs, cb, er, stat) {
+ var exists
+ assert(this instanceof Glob)
+
+ if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) {
+ this.log("should be ENOTDIR, fake it")
+
+ er = new Error("ENOTDIR, not a directory '" + abs + "'")
+ er.path = abs
+ er.code = "ENOTDIR"
+ stat = null
+ }
+
+ var emit = !this.statCache[abs]
+ this.statCache[abs] = stat
+
+ if (er || !stat) {
+ exists = false
+ } else {
+ exists = stat.isDirectory() ? 2 : 1
+ if (emit)
+ this.emit('stat', f, stat)
+ }
+ this.cache[f] = this.cache[f] || exists
+ cb.call(this, !!exists, exists === 2)
+}
+
+Glob.prototype._readdir = function (f, cb) {
+ assert(this instanceof Glob)
+ var abs = f
+ if (f.charAt(0) === "/") {
+ abs = path.join(this.root, f)
+ } else if (isAbsolute(f)) {
+ abs = f
+ } else if (this.changedCwd) {
+ abs = path.resolve(this.cwd, f)
+ }
+
+ if (f.length > this.maxLength) {
+ var er = new Error("Path name too long")
+ er.code = "ENAMETOOLONG"
+ er.path = f
+ return this._afterReaddir(f, abs, cb, er)
+ }
+
+ this.log('readdir', [this.cwd, f, abs])
+ if (this.cache.hasOwnProperty(f)) {
+ var c = this.cache[f]
+ if (Array.isArray(c)) {
+ if (this.sync) return cb.call(this, null, c)
+ return process.nextTick(cb.bind(this, null, c))
+ }
+
+ if (!c || c === 1) {
+ // either ENOENT or ENOTDIR
+ var code = c ? "ENOTDIR" : "ENOENT"
+ , er = new Error((c ? "Not a directory" : "Not found") + ": " + f)
+ er.path = f
+ er.code = code
+ this.log(f, er)
+ if (this.sync) return cb.call(this, er)
+ return process.nextTick(cb.bind(this, er))
+ }
+
+ // at this point, c === 2, meaning it's a dir, but we haven't
+ // had to read it yet, or c === true, meaning it's *something*
+ // but we don't have any idea what. Need to read it, either way.
+ }
+
+ if (this.sync) {
+ var er, entries
+ try {
+ entries = fs.readdirSync(abs)
+ } catch (e) {
+ er = e
+ }
+ return this._afterReaddir(f, abs, cb, er, entries)
+ }
+
+ fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb))
+}
+
+Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) {
+ assert(this instanceof Glob)
+ if (entries && !er) {
+ this.cache[f] = entries
+ // if we haven't asked to stat everything for suresies, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time. This also gets us one step
+ // further into ELOOP territory.
+ if (!this.mark && !this.stat) {
+ entries.forEach(function (e) {
+ if (f === "/") e = f + e
+ else e = f + "/" + e
+ this.cache[e] = true
+ }, this)
+ }
+
+ return cb.call(this, er, entries)
+ }
+
+ // now handle errors, and cache the information
+ if (er) switch (er.code) {
+ case "ENOTDIR": // totally normal. means it *does* exist.
+ this.cache[f] = 1
+ return cb.call(this, er)
+ case "ENOENT": // not terribly unusual
+ case "ELOOP":
+ case "ENAMETOOLONG":
+ case "UNKNOWN":
+ this.cache[f] = false
+ return cb.call(this, er)
+ default: // some unusual error. Treat as failure.
+ this.cache[f] = false
+ if (this.strict) this.emit("error", er)
+ if (!this.silent) console.error("glob error", er)
+ return cb.call(this, er)
+ }
+}
+
+var isAbsolute = process.platform === "win32" ? absWin : absUnix
+
+function absWin (p) {
+ if (absUnix(p)) return true
+ // pull off the device/UNC bit from a windows path.
+ // from node's lib/path.js
+ var splitDeviceRe =
+ /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
+ , result = splitDeviceRe.exec(p)
+ , device = result[1] || ''
+ , isUnc = device && device.charAt(1) !== ':'
+ , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
+
+ return isAbsolute
+}
+
+function absUnix (p) {
+ return p.charAt(0) === "/" || p === ""
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/.npmignore b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/.npmignore
new file mode 100644
index 0000000..c2658d7
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/.npmignore
@@ -0,0 +1 @@
+node_modules/
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/LICENSE b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/LICENSE
new file mode 100644
index 0000000..0c44ae7
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. 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.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR CONTRIBUTORS
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/README.md b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/README.md
new file mode 100644
index 0000000..01af3d6
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/README.md
@@ -0,0 +1,33 @@
+# graceful-fs
+
+graceful-fs functions as a drop-in replacement for the fs module,
+making various improvements.
+
+The improvements are meant to normalize behavior across different
+platforms and environments, and to make filesystem access more
+resilient to errors.
+
+## Improvements over fs module
+
+graceful-fs:
+
+* keeps track of how many file descriptors are open, and by default
+ limits this to 1024. Any further requests to open a file are put in a
+ queue until new slots become available. If 1024 turns out to be too
+ much, it decreases the limit further.
+* fixes `lchmod` for Node versions prior to 0.6.2.
+* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
+* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
+ `lchown` if the user isn't root.
+* makes `lchmod` and `lchown` become noops, if not available.
+* retries reading a file if `read` results in EAGAIN error.
+
+On Windows, it retries renaming a file for up to one second if `EACCESS`
+or `EPERM` error occurs, likely because antivirus software has locked
+the directory.
+
+## Configuration
+
+The maximum number of open file descriptors that graceful-fs manages may
+be adjusted by setting `fs.MAX_OPEN` to a different number. The default
+is 1024.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/graceful-fs.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/graceful-fs.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/graceful-fs.js
new file mode 100644
index 0000000..a46b5b2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/graceful-fs.js
@@ -0,0 +1,152 @@
+// Monkey-patching the fs module.
+// It's ugly, but there is simply no other way to do this.
+var fs = module.exports = require('fs')
+
+var assert = require('assert')
+
+// fix up some busted stuff, mostly on windows and old nodes
+require('./polyfills.js')
+
+// The EMFILE enqueuing stuff
+
+var util = require('util')
+
+function noop () {}
+
+var debug = noop
+var util = require('util')
+if (util.debuglog)
+ debug = util.debuglog('gfs')
+else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
+ debug = function() {
+ var m = util.format.apply(util, arguments)
+ m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
+ console.error(m)
+ }
+
+if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
+ process.on('exit', function() {
+ debug('fds', fds)
+ debug(queue)
+ assert.equal(queue.length, 0)
+ })
+}
+
+
+var originalOpen = fs.open
+fs.open = open
+
+function open(path, flags, mode, cb) {
+ if (typeof mode === "function") cb = mode, mode = null
+ if (typeof cb !== "function") cb = noop
+ new OpenReq(path, flags, mode, cb)
+}
+
+function OpenReq(path, flags, mode, cb) {
+ this.path = path
+ this.flags = flags
+ this.mode = mode
+ this.cb = cb
+ Req.call(this)
+}
+
+util.inherits(OpenReq, Req)
+
+OpenReq.prototype.process = function() {
+ originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
+}
+
+var fds = {}
+OpenReq.prototype.done = function(er, fd) {
+ debug('open done', er, fd)
+ if (fd)
+ fds['fd' + fd] = this.path
+ Req.prototype.done.call(this, er, fd)
+}
+
+
+var originalReaddir = fs.readdir
+fs.readdir = readdir
+
+function readdir(path, cb) {
+ if (typeof cb !== "function") cb = noop
+ new ReaddirReq(path, cb)
+}
+
+function ReaddirReq(path, cb) {
+ this.path = path
+ this.cb = cb
+ Req.call(this)
+}
+
+util.inherits(ReaddirReq, Req)
+
+ReaddirReq.prototype.process = function() {
+ originalReaddir.call(fs, this.path, this.done)
+}
+
+ReaddirReq.prototype.done = function(er, files) {
+ Req.prototype.done.call(this, er, files)
+ onclose()
+}
+
+
+var originalClose = fs.close
+fs.close = close
+
+function close (fd, cb) {
+ debug('close', fd)
+ if (typeof cb !== "function") cb = noop
+ delete fds['fd' + fd]
+ originalClose.call(fs, fd, function(er) {
+ onclose()
+ cb(er)
+ })
+}
+
+
+var originalCloseSync = fs.closeSync
+fs.closeSync = closeSync
+
+function closeSync (fd) {
+ try {
+ return originalCloseSync(fd)
+ } finally {
+ onclose()
+ }
+}
+
+
+// Req class
+function Req () {
+ // start processing
+ this.done = this.done.bind(this)
+ this.failures = 0
+ this.process()
+}
+
+Req.prototype.done = function (er, result) {
+ // if an error, and the code is EMFILE, then get in the queue
+ if (er && er.code === "EMFILE") {
+ this.failures ++
+ enqueue(this)
+ } else {
+ var cb = this.cb
+ cb(er, result)
+ }
+}
+
+var queue = []
+
+function enqueue(req) {
+ queue.push(req)
+ debug('enqueue %d %s', queue.length, req.constructor.name, req)
+}
+
+function onclose() {
+ var req = queue.shift()
+ if (req) {
+ debug('process', req.constructor.name, req)
+ req.process()
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/package.json b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/package.json
new file mode 100644
index 0000000..1af3229
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/package.json
@@ -0,0 +1,52 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me"
+ },
+ "name": "graceful-fs",
+ "description": "A drop-in replacement for fs, making various improvements.",
+ "version": "2.0.0",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-graceful-fs.git"
+ },
+ "main": "graceful-fs.js",
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "keywords": [
+ "fs",
+ "module",
+ "reading",
+ "retry",
+ "retries",
+ "queue",
+ "error",
+ "errors",
+ "handling",
+ "EMFILE",
+ "EAGAIN",
+ "EINVAL",
+ "EPERM",
+ "EACCESS"
+ ],
+ "license": "BSD",
+ "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* keeps track of how many file descriptors are open, and by default\n limits this to 1024. Any further requests to open a file are put in a\n queue until new slots become available. If 1024 turns out to be too\n much, it decreases the limit further.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if
`EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n\n## Configuration\n\nThe maximum number of open file descriptors that graceful-fs manages may\nbe adjusted by setting `fs.MAX_OPEN` to a different number. The default\nis 1024.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-graceful-fs/issues"
+ },
+ "_id": "graceful-fs@2.0.0",
+ "dist": {
+ "shasum": "f2f71dd95aed957548d0a70c4d321a165271bb80"
+ },
+ "_from": "graceful-fs@~2.0.0",
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.0.tgz"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/polyfills.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/polyfills.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/polyfills.js
new file mode 100644
index 0000000..afc83b3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/polyfills.js
@@ -0,0 +1,228 @@
+var fs = require('fs')
+var constants = require('constants')
+
+var origCwd = process.cwd
+var cwd = null
+process.cwd = function() {
+ if (!cwd)
+ cwd = origCwd.call(process)
+ return cwd
+}
+var chdir = process.chdir
+process.chdir = function(d) {
+ cwd = null
+ chdir.call(process, d)
+}
+
+// (re-)implement some things that are known busted or missing.
+
+// lchmod, broken prior to 0.6.2
+// back-port the fix here.
+if (constants.hasOwnProperty('O_SYMLINK') &&
+ process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
+ fs.lchmod = function (path, mode, callback) {
+ callback = callback || noop
+ fs.open( path
+ , constants.O_WRONLY | constants.O_SYMLINK
+ , mode
+ , function (err, fd) {
+ if (err) {
+ callback(err)
+ return
+ }
+ // prefer to return the chmod error, if one occurs,
+ // but still try to close, and report closing errors if they occur.
+ fs.fchmod(fd, mode, function (err) {
+ fs.close(fd, function(err2) {
+ callback(err || err2)
+ })
+ })
+ })
+ }
+
+ fs.lchmodSync = function (path, mode) {
+ var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
+
+ // prefer to return the chmod error, if one occurs,
+ // but still try to close, and report closing errors if they occur.
+ var err, err2
+ try {
+ var ret = fs.fchmodSync(fd, mode)
+ } catch (er) {
+ err = er
+ }
+ try {
+ fs.closeSync(fd)
+ } catch (er) {
+ err2 = er
+ }
+ if (err || err2) throw (err || err2)
+ return ret
+ }
+}
+
+
+// lutimes implementation, or no-op
+if (!fs.lutimes) {
+ if (constants.hasOwnProperty("O_SYMLINK")) {
+ fs.lutimes = function (path, at, mt, cb) {
+ fs.open(path, constants.O_SYMLINK, function (er, fd) {
+ cb = cb || noop
+ if (er) return cb(er)
+ fs.futimes(fd, at, mt, function (er) {
+ fs.close(fd, function (er2) {
+ return cb(er || er2)
+ })
+ })
+ })
+ }
+
+ fs.lutimesSync = function (path, at, mt) {
+ var fd = fs.openSync(path, constants.O_SYMLINK)
+ , err
+ , err2
+ , ret
+
+ try {
+ var ret = fs.futimesSync(fd, at, mt)
+ } catch (er) {
+ err = er
+ }
+ try {
+ fs.closeSync(fd)
+ } catch (er) {
+ err2 = er
+ }
+ if (err || err2) throw (err || err2)
+ return ret
+ }
+
+ } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
+ // maybe utimensat will be bound soonish?
+ fs.lutimes = function (path, at, mt, cb) {
+ fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
+ }
+
+ fs.lutimesSync = function (path, at, mt) {
+ return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
+ }
+
+ } else {
+ fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
+ fs.lutimesSync = function () {}
+ }
+}
+
+
+// https://github.com/isaacs/node-graceful-fs/issues/4
+// Chown should not fail on einval or eperm if non-root.
+
+fs.chown = chownFix(fs.chown)
+fs.fchown = chownFix(fs.fchown)
+fs.lchown = chownFix(fs.lchown)
+
+fs.chownSync = chownFixSync(fs.chownSync)
+fs.fchownSync = chownFixSync(fs.fchownSync)
+fs.lchownSync = chownFixSync(fs.lchownSync)
+
+function chownFix (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid, cb) {
+ return orig.call(fs, target, uid, gid, function (er, res) {
+ if (chownErOk(er)) er = null
+ cb(er, res)
+ })
+ }
+}
+
+function chownFixSync (orig) {
+ if (!orig) return orig
+ return function (target, uid, gid) {
+ try {
+ return orig.call(fs, target, uid, gid)
+ } catch (er) {
+ if (!chownErOk(er)) throw er
+ }
+ }
+}
+
+function chownErOk (er) {
+ // if there's no getuid, or if getuid() is something other than 0,
+ // and the error is EINVAL or EPERM, then just ignore it.
+ // This specific case is a silent failure in cp, install, tar,
+ // and most other unix tools that manage permissions.
+ // When running as root, or if other types of errors are encountered,
+ // then it's strict.
+ if (!er || (!process.getuid || process.getuid() !== 0)
+ && (er.code === "EINVAL" || er.code === "EPERM")) return true
+}
+
+
+// if lchmod/lchown do not exist, then make them no-ops
+if (!fs.lchmod) {
+ fs.lchmod = function (path, mode, cb) {
+ process.nextTick(cb)
+ }
+ fs.lchmodSync = function () {}
+}
+if (!fs.lchown) {
+ fs.lchown = function (path, uid, gid, cb) {
+ process.nextTick(cb)
+ }
+ fs.lchownSync = function () {}
+}
+
+
+
+// on Windows, A/V software can lock the directory, causing this
+// to fail with an EACCES or EPERM if the directory contains newly
+// created files. Try again on failure, for up to 1 second.
+if (process.platform === "win32") {
+ var rename_ = fs.rename
+ fs.rename = function rename (from, to, cb) {
+ var start = Date.now()
+ rename_(from, to, function CB (er) {
+ if (er
+ && (er.code === "EACCES" || er.code === "EPERM")
+ && Date.now() - start < 1000) {
+ return rename_(from, to, CB)
+ }
+ cb(er)
+ })
+ }
+}
+
+
+// if read() returns EAGAIN, then just try it again.
+var read = fs.read
+fs.read = function (fd, buffer, offset, length, position, callback_) {
+ var callback
+ if (callback_ && typeof callback_ === 'function') {
+ var eagCounter = 0
+ callback = function (er, _, __) {
+ if (er && er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ return read.call(fs, fd, buffer, offset, length, position, callback)
+ }
+ callback_.apply(this, arguments)
+ }
+ }
+ return read.call(fs, fd, buffer, offset, length, position, callback)
+}
+
+var readSync = fs.readSync
+fs.readSync = function (fd, buffer, offset, length, position) {
+ var eagCounter = 0
+ while (true) {
+ try {
+ return readSync.call(fs, fd, buffer, offset, length, position)
+ } catch (er) {
+ if (er.code === 'EAGAIN' && eagCounter < 10) {
+ eagCounter ++
+ continue
+ }
+ throw er
+ }
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/test/open.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/test/open.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/test/open.js
new file mode 100644
index 0000000..104f36b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/graceful-fs/test/open.js
@@ -0,0 +1,39 @@
+var test = require('tap').test
+var fs = require('../graceful-fs.js')
+
+test('graceful fs is monkeypatched fs', function (t) {
+ t.equal(fs, require('fs'))
+ t.end()
+})
+
+test('open an existing file works', function (t) {
+ var fd = fs.openSync(__filename, 'r')
+ fs.closeSync(fd)
+ fs.open(__filename, 'r', function (er, fd) {
+ if (er) throw er
+ fs.close(fd, function (er) {
+ if (er) throw er
+ t.pass('works')
+ t.end()
+ })
+ })
+})
+
+test('open a non-existing file throws', function (t) {
+ var er
+ try {
+ var fd = fs.openSync('this file does not exist', 'r')
+ } catch (x) {
+ er = x
+ }
+ t.ok(er, 'should throw')
+ t.notOk(fd, 'should not get an fd')
+ t.equal(er.code, 'ENOENT')
+
+ fs.open('neither does this file', 'r', function (er, fd) {
+ t.ok(er, 'should throw')
+ t.notOk(fd, 'should not get an fd')
+ t.equal(er.code, 'ENOENT')
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/LICENSE b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/LICENSE
new file mode 100644
index 0000000..5a8e332
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/LICENSE
@@ -0,0 +1,14 @@
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sa...@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/README.md b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/README.md
new file mode 100644
index 0000000..b1c5665
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/README.md
@@ -0,0 +1,42 @@
+Browser-friendly inheritance fully compatible with standard node.js
+[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
+
+This package exports standard `inherits` from node.js `util` module in
+node environment, but also provides alternative browser-friendly
+implementation through [browser
+field](https://gist.github.com/shtylman/4339901). Alternative
+implementation is a literal copy of standard one located in standalone
+module to avoid requiring of `util`. It also has a shim for old
+browsers with no `Object.create` support.
+
+While keeping you sure you are using standard `inherits`
+implementation in node.js environment, it allows bundlers such as
+[browserify](https://github.com/substack/node-browserify) to not
+include full `util` package to your client code if all you need is
+just `inherits` function. It worth, because browser shim for `util`
+package is large and `inherits` is often the single function you need
+from it.
+
+It's recommended to use this package instead of
+`require('util').inherits` for any code that has chances to be used
+not only in node.js but in browser too.
+
+## usage
+
+```js
+var inherits = require('inherits');
+// then use exactly as the standard one
+```
+
+## note on version ~1.0
+
+Version ~1.0 had completely different motivation and is not compatible
+neither with 2.0 nor with standard node.js `inherits`.
+
+If you are using version ~1.0 and planning to switch to ~2.0, be
+careful:
+
+* new version uses `super_` instead of `super` for referencing
+ superclass
+* new version overwrites current prototype while old one preserves any
+ existing fields on it
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits.js
new file mode 100644
index 0000000..29f5e24
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits.js
@@ -0,0 +1 @@
+module.exports = require('util').inherits
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits_browser.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits_browser.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000..c1e78a7
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,23 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/package.json b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/package.json
new file mode 100644
index 0000000..9768e8d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "inherits",
+ "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
+ "version": "2.0.0",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented",
+ "inherits",
+ "browser",
+ "browserify"
+ ],
+ "main": "./inherits.js",
+ "browser": "./inherits_browser.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/isaacs/inherits"
+ },
+ "license": {
+ "type": "WTFPL2"
+ },
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom
it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "_id": "inherits@2.0.0",
+ "dist": {
+ "shasum": "7f18182d0174b6a689be3aba865992c78eeb2680"
+ },
+ "_from": "inherits@2",
+ "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.0.tgz"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/test.js
new file mode 100644
index 0000000..fc53012
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/node_modules/inherits/test.js
@@ -0,0 +1,25 @@
+var inherits = require('./inherits.js')
+var assert = require('assert')
+
+function test(c) {
+ assert(c.constructor === Child)
+ assert(c.constructor.super_ === Parent)
+ assert(Object.getPrototypeOf(c) === Child.prototype)
+ assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype)
+ assert(c instanceof Child)
+ assert(c instanceof Parent)
+}
+
+function Child() {
+ Parent.call(this)
+ test(this)
+}
+
+function Parent() {}
+
+inherits(Child, Parent)
+
+var c = new Child
+test(c)
+
+console.log('ok')
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/package.json b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/package.json
new file mode 100644
index 0000000..5d6307c
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/package.json
@@ -0,0 +1,43 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "name": "glob",
+ "description": "a little globber",
+ "version": "3.2.3",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-glob.git"
+ },
+ "main": "glob.js",
+ "engines": {
+ "node": "*"
+ },
+ "dependencies": {
+ "minimatch": "~0.2.11",
+ "graceful-fs": "~2.0.0",
+ "inherits": "2"
+ },
+ "devDependencies": {
+ "tap": "~0.4.0",
+ "mkdirp": "0",
+ "rimraf": "1"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "license": "BSD",
+ "readme": "# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glo
b features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [op
tions], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n value
s:\n * `false` - Path does not exist\n * `true` - Path exists\n * `1` - Path exists, and is not a directory\n * `2` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have b
een added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This
reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of
another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with th
e existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/
**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expr
essions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast major
ity\nof operations, this is never a problem.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-glob/issues"
+ },
+ "_id": "glob@3.2.3",
+ "dist": {
+ "shasum": "d8225c774cac17a9d50c83e739b3b9ac0f2216cf"
+ },
+ "_from": "glob@3.x",
+ "_resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/00-setup.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/00-setup.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/00-setup.js
new file mode 100644
index 0000000..245afaf
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/00-setup.js
@@ -0,0 +1,176 @@
+// just a little pre-run script to set up the fixtures.
+// zz-finish cleans it up
+
+var mkdirp = require("mkdirp")
+var path = require("path")
+var i = 0
+var tap = require("tap")
+var fs = require("fs")
+var rimraf = require("rimraf")
+
+var files =
+[ "a/.abcdef/x/y/z/a"
+, "a/abcdef/g/h"
+, "a/abcfed/g/h"
+, "a/b/c/d"
+, "a/bc/e/f"
+, "a/c/d/c/b"
+, "a/cb/e/f"
+]
+
+var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c")
+var symlinkFrom = "../.."
+
+files = files.map(function (f) {
+ return path.resolve(__dirname, f)
+})
+
+tap.test("remove fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "a"), function (er) {
+ t.ifError(er, "remove fixtures")
+ t.end()
+ })
+})
+
+files.forEach(function (f) {
+ tap.test(f, function (t) {
+ var d = path.dirname(f)
+ mkdirp(d, 0755, function (er) {
+ if (er) {
+ t.fail(er)
+ return t.bailout()
+ }
+ fs.writeFile(f, "i like tests", function (er) {
+ t.ifError(er, "make file")
+ t.end()
+ })
+ })
+ })
+})
+
+if (process.platform !== "win32") {
+ tap.test("symlinky", function (t) {
+ var d = path.dirname(symlinkTo)
+ console.error("mkdirp", d)
+ mkdirp(d, 0755, function (er) {
+ t.ifError(er)
+ fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) {
+ t.ifError(er, "make symlink")
+ t.end()
+ })
+ })
+ })
+}
+
+;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) {
+ w = "/tmp/glob-test/" + w
+ tap.test("create " + w, function (t) {
+ mkdirp(w, function (er) {
+ if (er)
+ throw er
+ t.pass(w)
+ t.end()
+ })
+ })
+})
+
+
+// generate the bash pattern test-fixtures if possible
+if (process.platform === "win32" || !process.env.TEST_REGEN) {
+ console.error("Windows, or TEST_REGEN unset. Using cached fixtures.")
+ return
+}
+
+var spawn = require("child_process").spawn;
+var globs =
+ // put more patterns here.
+ // anything that would be directly in / should be in /tmp/glob-test
+ ["test/a/*/+(c|g)/./d"
+ ,"test/a/**/[cg]/../[cg]"
+ ,"test/a/{b,c,d,e,f}/**/g"
+ ,"test/a/b/**"
+ ,"test/**/g"
+ ,"test/a/abc{fed,def}/g/h"
+ ,"test/a/abc{fed/g,def}/**/"
+ ,"test/a/abc{fed/g,def}/**///**/"
+ ,"test/**/a/**/"
+ ,"test/+(a|b|c)/a{/,bc*}/**"
+ ,"test/*/*/*/f"
+ ,"test/**/f"
+ ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**"
+ ,"{./*/*,/tmp/glob-test/*}"
+ ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me!
+ ,"test/a/!(symlink)/**"
+ ]
+var bashOutput = {}
+var fs = require("fs")
+
+globs.forEach(function (pattern) {
+ tap.test("generate fixture " + pattern, function (t) {
+ var cmd = "shopt -s globstar && " +
+ "shopt -s extglob && " +
+ "shopt -s nullglob && " +
+ // "shopt >&2; " +
+ "eval \'for i in " + pattern + "; do echo $i; done\'"
+ var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) })
+ var out = []
+ cp.stdout.on("data", function (c) {
+ out.push(c)
+ })
+ cp.stderr.pipe(process.stderr)
+ cp.on("close", function (code) {
+ out = flatten(out)
+ if (!out)
+ out = []
+ else
+ out = cleanResults(out.split(/\r*\n/))
+
+ bashOutput[pattern] = out
+ t.notOk(code, "bash test should finish nicely")
+ t.end()
+ })
+ })
+})
+
+tap.test("save fixtures", function (t) {
+ var fname = path.resolve(__dirname, "bash-results.json")
+ var data = JSON.stringify(bashOutput, null, 2) + "\n"
+ fs.writeFile(fname, data, function (er) {
+ t.ifError(er)
+ t.end()
+ })
+})
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
+ })
+}
+
+function flatten (chunks) {
+ var s = 0
+ chunks.forEach(function (c) { s += c.length })
+ var out = new Buffer(s)
+ s = 0
+ chunks.forEach(function (c) {
+ c.copy(out, s)
+ s += c.length
+ })
+
+ return out.toString().trim()
+}
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/bash-comparison.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/bash-comparison.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/bash-comparison.js
new file mode 100644
index 0000000..239ed1a
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/bash-comparison.js
@@ -0,0 +1,63 @@
+// basic test
+// show that it does the same thing by default as the shell.
+var tap = require("tap")
+, child_process = require("child_process")
+, bashResults = require("./bash-results.json")
+, globs = Object.keys(bashResults)
+, glob = require("../")
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+globs.forEach(function (pattern) {
+ var expect = bashResults[pattern]
+ // anything regarding the symlink thing will fail on windows, so just skip it
+ if (process.platform === "win32" &&
+ expect.some(function (m) {
+ return /\/symlink\//.test(m)
+ }))
+ return
+
+ tap.test(pattern, function (t) {
+ glob(pattern, function (er, matches) {
+ if (er)
+ throw er
+
+ // sort and unmark, just to match the shell results
+ matches = cleanResults(matches)
+
+ t.deepEqual(matches, expect, pattern)
+ t.end()
+ })
+ })
+
+ tap.test(pattern + " sync", function (t) {
+ var matches = cleanResults(glob.sync(pattern))
+
+ t.deepEqual(matches, expect, "should match shell")
+ t.end()
+ })
+})
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/')
+ })
+}
[03/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/test.xml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/test.xml b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/test.xml
new file mode 100644
index 0000000..bd2c504
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/test.xml
@@ -0,0 +1,19719 @@
+<?xml version="1.0"?>
+<MsInfo xmlns:t="test" t:test="1">
+ <Metadata>
+ <Version>8.0</Version>
+ <CreationUTC>05/21/12 12:18:42</CreationUTC>
+ </Metadata>
+ <Category name="System Summary">
+ <Data>
+ <Item><![CDATA[OS Name]]></Item>
+ <Value><![CDATA[Microsoft Windows 7 Enterprise]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Version]]></Item>
+ <Value><![CDATA[6.1.7600 Build 7600]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Other OS Description ]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[OS Manufacturer]]></Item>
+ <Value><![CDATA[Microsoft Corporation]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[System Name]]></Item>
+ <Value><![CDATA[RTCMW0037M]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[System Manufacturer]]></Item>
+ <Value><![CDATA[Hewlett-Packard]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[System Model]]></Item>
+ <Value><![CDATA[HP EliteBook 8440p]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[System Type]]></Item>
+ <Value><![CDATA[x64-based PC]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Processor]]></Item>
+ <Value><![CDATA[Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz, 2534 Mhz, 2 Core(s), 4 Logical Processor(s)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[BIOS Version/Date]]></Item>
+ <Value><![CDATA[Hewlett-Packard 68CCU Ver. F.0E, 23/08/2010]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[SMBIOS Version]]></Item>
+ <Value><![CDATA[2.6]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Windows Directory]]></Item>
+ <Value><![CDATA[C:\Windows]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[System Directory]]></Item>
+ <Value><![CDATA[C:\Windows\system32]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Boot Device]]></Item>
+ <Value><![CDATA[\Device\HarddiskVolume2]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Locale]]></Item>
+ <Value><![CDATA[United Kingdom]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Hardware Abstraction Layer]]></Item>
+ <Value><![CDATA[Version = "6.1.7600.16416"]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[User Name]]></Item>
+ <Value><![CDATA[RBAMOUSER\benedef1]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Time Zone]]></Item>
+ <Value><![CDATA[Romance Daylight Time]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Installed Physical Memory (RAM)]]></Item>
+ <Value><![CDATA[8.00 GB]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Total Physical Memory]]></Item>
+ <Value><![CDATA[7.79 GB]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Available Physical Memory]]></Item>
+ <Value><![CDATA[1.94 GB]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Total Virtual Memory]]></Item>
+ <Value><![CDATA[15.6 GB]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Available Virtual Memory]]></Item>
+ <Value><![CDATA[8.57 GB]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Page File Space]]></Item>
+ <Value><![CDATA[7.79 GB]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Page File]]></Item>
+ <Value><![CDATA[C:\pagefile.sys]]></Value>
+ </Data>
+ <Category name="Hardware Resources">
+ <Category name="Conflicts/Sharing">
+ <Data>
+ <Resource><![CDATA[I/O Port 0x00000000-0x0000001F]]></Resource>
+ <Device><![CDATA[Direct memory access controller]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[I/O Port 0x00000000-0x0000001F]]></Resource>
+ <Device><![CDATA[PCI bus]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[]]>
+ </Resource>
+ <Device><![CDATA[]]>
+ </Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 20]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family USB Enhanced Host Controller - 3B34]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 20]]></Resource>
+ <Device><![CDATA[Ricoh 1394 OHCI Compliant Host Controller]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[]]>
+ </Resource>
+ <Device><![CDATA[]]>
+ </Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[I/O Port 0x00000070-0x00000077]]></Resource>
+ <Device><![CDATA[System CMOS/real time clock]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[I/O Port 0x00000070-0x00000077]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[]]>
+ </Resource>
+ <Device><![CDATA[]]>
+ </Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[Memory Address 0xD0500000-0xD05FFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family PCI Express Root Port 4 - 3B48]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[Memory Address 0xD0500000-0xD05FFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) Centrino(R) Advanced-N 6200 AGN]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[]]>
+ </Resource>
+ <Device><![CDATA[]]>
+ </Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 22]]></Resource>
+ <Device><![CDATA[Ricoh SD/MMC Host Controller]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 22]]></Resource>
+ <Device><![CDATA[Ricoh R/RL/5C476(II) or Compatible CardBus Controller]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 22]]></Resource>
+ <Device><![CDATA[SDA Standard Compliant SD Host Controller]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 22]]></Resource>
+ <Device><![CDATA[RICOH SmartCard Reader]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[]]>
+ </Resource>
+ <Device><![CDATA[]]>
+ </Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[Memory Address 0xD0400000-0xD04FFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) 82801 PCI Bridge - 2448]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[Memory Address 0xD0400000-0xD04FFFFF]]></Resource>
+ <Device><![CDATA[Ricoh R/RL/5C476(II) or Compatible CardBus Controller]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[]]>
+ </Resource>
+ <Device><![CDATA[]]>
+ </Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 16]]></Resource>
+ <Device><![CDATA[High Definition Audio Controller]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 16]]></Resource>
+ <Device><![CDATA[Intel(R) Management Engine Interface]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 16]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family USB Enhanced Host Controller - 3B3C]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[]]>
+ </Resource>
+ <Device><![CDATA[]]>
+ </Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[Memory Address 0xA0000-0xBFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) HD Graphics]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[Memory Address 0xA0000-0xBFFFF]]></Resource>
+ <Device><![CDATA[PCI bus]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[]]>
+ </Resource>
+ <Device><![CDATA[]]>
+ </Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[Memory Address 0xC0000000-0xCFFFFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) HD Graphics]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[Memory Address 0xC0000000-0xCFFFFFFF]]></Resource>
+ <Device><![CDATA[PCI bus]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[]]>
+ </Resource>
+ <Device><![CDATA[]]>
+ </Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[I/O Port 0x0000FFFF-0x0000FFFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[I/O Port 0x0000FFFF-0x0000FFFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ </Data>
+ <Data>
+ <Resource><![CDATA[]]>
+ </Resource>
+ <Device><![CDATA[]]>
+ </Device>
+ </Data>
+ </Category>
+ <Category name="DMA">
+ <Data>
+ <Resource><![CDATA[Channel 4]]></Resource>
+ <Device><![CDATA[Direct memory access controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ </Category>
+ <Category name="Forced Hardware">
+ <Data>
+ <Device></Device>
+ <PNP_Device_ID></PNP_Device_ID>
+ </Data>
+ </Category>
+ <Category name="I/O">
+ <Data>
+ <Resource><![CDATA[0x000000F0-0x000000F0]]></Resource>
+ <Device><![CDATA[Numeric data processor]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000062-0x00000062]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant Embedded Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000066-0x00000066]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant Embedded Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00003000-0x00004FFF]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family PCI Express Root Port 2 - 3B44]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x0000FE00-0x0000FE0F]]></Resource>
+ <Device><![CDATA[Trusted Platform Module 1.2]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x0000FE80-0x0000FE8F]]></Resource>
+ <Device><![CDATA[Trusted Platform Module 1.2]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00005058-0x0000505F]]></Resource>
+ <Device><![CDATA[Intel(R) HD Graphics]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000003B0-0x000003BB]]></Resource>
+ <Device><![CDATA[Intel(R) HD Graphics]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000003C0-0x000003DF]]></Resource>
+ <Device><![CDATA[Intel(R) HD Graphics]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000020-0x00000021]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000024-0x00000025]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000028-0x00000029]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x0000002C-0x0000002D]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000030-0x00000031]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000034-0x00000035]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000038-0x00000039]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x0000003C-0x0000003D]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000000A0-0x000000A1]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000000A4-0x000000A5]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000000A8-0x000000A9]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000000AC-0x000000AD]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000000B0-0x000000B1]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000000B4-0x000000B5]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000000B8-0x000000B9]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000000BC-0x000000BD]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000004D0-0x000004D1]]></Resource>
+ <Device><![CDATA[Programmable interrupt controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000040-0x00000043]]></Resource>
+ <Device><![CDATA[System timer]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000050-0x00000053]]></Resource>
+ <Device><![CDATA[System timer]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000000-0x0000001F]]></Resource>
+ <Device><![CDATA[Direct memory access controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000000-0x0000001F]]></Resource>
+ <Device><![CDATA[PCI bus]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000081-0x00000091]]></Resource>
+ <Device><![CDATA[Direct memory access controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000093-0x0000009F]]></Resource>
+ <Device><![CDATA[Direct memory access controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000000C0-0x000000DF]]></Resource>
+ <Device><![CDATA[Direct memory access controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00005048-0x0000504F]]></Resource>
+ <Device><![CDATA[Intel(R) PCHM SATA AHCI Controller 6 Port]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00005064-0x00005067]]></Resource>
+ <Device><![CDATA[Intel(R) PCHM SATA AHCI Controller 6 Port]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00005040-0x00005047]]></Resource>
+ <Device><![CDATA[Intel(R) PCHM SATA AHCI Controller 6 Port]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00005060-0x00005063]]></Resource>
+ <Device><![CDATA[Intel(R) PCHM SATA AHCI Controller 6 Port]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00005000-0x0000501F]]></Resource>
+ <Device><![CDATA[Intel(R) PCHM SATA AHCI Controller 6 Port]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00002000-0x00002FFF]]></Resource>
+ <Device><![CDATA[Intel(R) 82801 PCI Bridge - 2448]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000060-0x00000060]]></Resource>
+ <Device><![CDATA[Standard 101/102-Key or Microsoft Natural PS/2 Keyboard with HP QLB]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000064-0x00000064]]></Resource>
+ <Device><![CDATA[Standard 101/102-Key or Microsoft Natural PS/2 Keyboard with HP QLB]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000378-0x0000037F]]></Resource>
+ <Device><![CDATA[ECP Printer Port (LPT1)]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000778-0x0000077A]]></Resource>
+ <Device><![CDATA[ECP Printer Port (LPT1)]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00005050-0x00005057]]></Resource>
+ <Device><![CDATA[Intel(R) Active Management Technology - SOL (COM3)]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00002FFC-0x00002FFF]]></Resource>
+ <Device><![CDATA[Ricoh R/RL/5C476(II) or Compatible CardBus Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000003F8-0x000003FF]]></Resource>
+ <Device><![CDATA[Puerto de comunicaciones (COM1)]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000D00-0x0000FFFF]]></Resource>
+ <Device><![CDATA[PCI bus]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000070-0x00000077]]></Resource>
+ <Device><![CDATA[System CMOS/real time clock]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000070-0x00000077]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x0000FFE0-0x0000FFEF]]></Resource>
+ <Device><![CDATA[RICOH SmartCard Reader]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x0000002E-0x0000002F]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x0000004E-0x0000004F]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000061-0x00000061]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000063-0x00000063]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000065-0x00000065]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000067-0x00000067]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000080-0x00000080]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000092-0x00000092]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x000000B2-0x000000B3]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000200-0x0000027F]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00001000-0x0000100F]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x0000FFFF-0x0000FFFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x0000FFFF-0x0000FFFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000400-0x0000047F]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x00000500-0x0000057F]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0x0000EF80-0x0000EF9F]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ </Category>
+ <Category name="IRQs">
+ <Data>
+ <Resource><![CDATA[IRQ 13]]></Resource>
+ <Device><![CDATA[Numeric data processor]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 4294967294]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family PCI Express Root Port 1 - 3B42]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 22]]></Resource>
+ <Device><![CDATA[Ricoh SD/MMC Host Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 22]]></Resource>
+ <Device><![CDATA[Ricoh R/RL/5C476(II) or Compatible CardBus Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 22]]></Resource>
+ <Device><![CDATA[SDA Standard Compliant SD Host Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 22]]></Resource>
+ <Device><![CDATA[RICOH SmartCard Reader]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 23]]></Resource>
+ <Device><![CDATA[HP Mobile Data Protection Sensor]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 4294967293]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family PCI Express Root Port 2 - 3B44]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 4294967292]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family PCI Express Root Port 4 - 3B48]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 4294967291]]></Resource>
+ <Device><![CDATA[Intel(R) HD Graphics]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 12]]></Resource>
+ <Device><![CDATA[Synaptics PS/2 Port TouchPad]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 16]]></Resource>
+ <Device><![CDATA[High Definition Audio Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 16]]></Resource>
+ <Device><![CDATA[Intel(R) Management Engine Interface]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 16]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family USB Enhanced Host Controller - 3B3C]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 0]]></Resource>
+ <Device><![CDATA[System timer]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 4294967290]]></Resource>
+ <Device><![CDATA[Intel(R) 82577LM Gigabit Network Connection]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 21]]></Resource>
+ <Device><![CDATA[Intel(R) PCHM SATA AHCI Controller 6 Port]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 1]]></Resource>
+ <Device><![CDATA[Standard 101/102-Key or Microsoft Natural PS/2 Keyboard with HP QLB]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 18]]></Resource>
+ <Device><![CDATA[Intel(R) Turbo Boost Technology Driver]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 17]]></Resource>
+ <Device><![CDATA[Intel(R) Active Management Technology - SOL (COM3)]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 4]]></Resource>
+ <Device><![CDATA[Puerto de comunicaciones (COM1)]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 20]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family USB Enhanced Host Controller - 3B34]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 20]]></Resource>
+ <Device><![CDATA[Ricoh 1394 OHCI Compliant Host Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 4294967289]]></Resource>
+ <Device><![CDATA[Intel(R) Centrino(R) Advanced-N 6200 AGN]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 8]]></Resource>
+ <Device><![CDATA[System CMOS/real time clock]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 81]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 82]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 83]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 84]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 85]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 86]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 87]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 88]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 89]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 90]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 91]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 92]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 93]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 94]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 95]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 96]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 97]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 98]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 99]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 100]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 101]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 102]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 103]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 104]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 105]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 106]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 107]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 108]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 109]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 110]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 111]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 112]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 113]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 114]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 115]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 116]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 117]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 118]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 119]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 120]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 121]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 122]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 123]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 124]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 125]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 126]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 127]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 128]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 129]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 130]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 131]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 132]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 133]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 134]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 135]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 136]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 137]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 138]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 139]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 140]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 141]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 142]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 143]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 144]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 145]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 146]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 147]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 148]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 149]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 150]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 151]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 152]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 153]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 154]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 155]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 156]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 157]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 158]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 159]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 160]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 161]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 162]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 163]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 164]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 165]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 166]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 167]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 168]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 169]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 170]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 171]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 172]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 173]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 174]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 175]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 176]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 177]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 178]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 179]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 180]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 181]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 182]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 183]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 184]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 185]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 186]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 187]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 188]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 189]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[IRQ 190]]></Resource>
+ <Device><![CDATA[Microsoft ACPI-Compliant System]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ </Category>
+ <Category name="Memory">
+ <Data>
+ <Resource><![CDATA[0xD4600000-0xD46FFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family PCI Express Root Port 1 - 3B42]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD0402000-0xD04020FF]]></Resource>
+ <Device><![CDATA[Ricoh SD/MMC Host Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD0600000-0xD45FFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family PCI Express Root Port 2 - 3B44]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFED40000-0xFED44FFF]]></Resource>
+ <Device><![CDATA[Trusted Platform Module 1.2]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFF000000-0xFFFFFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) 82802 Firmware Hub Device]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD0500000-0xD05FFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family PCI Express Root Port 4 - 3B48]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD0500000-0xD05FFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) Centrino(R) Advanced-N 6200 AGN]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD0000000-0xD03FFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) HD Graphics]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xC0000000-0xCFFFFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) HD Graphics]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xC0000000-0xCFFFFFFF]]></Resource>
+ <Device><![CDATA[PCI bus]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xA0000-0xBFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) HD Graphics]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xA0000-0xBFFFF]]></Resource>
+ <Device><![CDATA[PCI bus]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD4720000-0xD4723FFF]]></Resource>
+ <Device><![CDATA[High Definition Audio Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD4700000-0xD471FFFF]]></Resource>
+ <Device><![CDATA[Intel(R) 82577LM Gigabit Network Connection]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD472A000-0xD472AFFF]]></Resource>
+ <Device><![CDATA[Intel(R) 82577LM Gigabit Network Connection]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFED00000-0xFED003FF]]></Resource>
+ <Device><![CDATA[High precision event timer]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD4727000-0xD47277FF]]></Resource>
+ <Device><![CDATA[Intel(R) PCHM SATA AHCI Controller 6 Port]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD4724000-0xD472400F]]></Resource>
+ <Device><![CDATA[Intel(R) Management Engine Interface]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD0400000-0xD04FFFFF]]></Resource>
+ <Device><![CDATA[Intel(R) 82801 PCI Bridge - 2448]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD0400000-0xD04FFFFF]]></Resource>
+ <Device><![CDATA[Ricoh R/RL/5C476(II) or Compatible CardBus Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD4726000-0xD4726FFF]]></Resource>
+ <Device><![CDATA[Intel(R) Turbo Boost Technology Driver]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD472B000-0xD472BFFF]]></Resource>
+ <Device><![CDATA[Intel(R) Active Management Technology - SOL (COM3)]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD04FF000-0xD04FFFFF]]></Resource>
+ <Device><![CDATA[Ricoh R/RL/5C476(II) or Compatible CardBus Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD04FE000-0xD04FEFFF]]></Resource>
+ <Device><![CDATA[Ricoh R/RL/5C476(II) or Compatible CardBus Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFEFFF000-0xFEFFFFFF]]></Resource>
+ <Device><![CDATA[Ricoh R/RL/5C476(II) or Compatible CardBus Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD4728000-0xD47283FF]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family USB Enhanced Host Controller - 3B34]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD0403000-0xD04030FF]]></Resource>
+ <Device><![CDATA[SDA Standard Compliant SD Host Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xF0000000-0xFEDFFFFF]]></Resource>
+ <Device><![CDATA[PCI bus]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFEE01000-0xFFFFFFFF]]></Resource>
+ <Device><![CDATA[PCI bus]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD4729000-0xD47293FF]]></Resource>
+ <Device><![CDATA[Intel(R) 5 Series/3400 Series Chipset Family USB Enhanced Host Controller - 3B3C]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFEFFE000-0xFEFFEFFF]]></Resource>
+ <Device><![CDATA[RICOH SmartCard Reader]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD0401000-0xD04017FF]]></Resource>
+ <Device><![CDATA[Ricoh 1394 OHCI Compliant Host Controller]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFED1C000-0xFED1FFFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFED10000-0xFED13FFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFED1B000-0xFED1BFFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFED19000-0xFED19FFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xD4800000-0xD4800FFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xE0000000-0xEFFFFFFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFED20000-0xFED3FFFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFED90000-0xFED93FFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFED45000-0xFED8FFFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ <Data>
+ <Resource><![CDATA[0xFEC00000-0xFEC00FFF]]></Resource>
+ <Device><![CDATA[Motherboard resources]]></Device>
+ <Status><![CDATA[OK]]></Status>
+ </Data>
+ </Category>
+ </Category>
+ <Category name="Components">
+ <Category name="Multimedia">
+ <Category name="Audio Codecs">
+ <Data>
+ <CODEC><![CDATA[c:\windows\system32\imaadp32.acm]]></CODEC>
+ <Manufacturer><![CDATA[Microsoft Corporation]]></Manufacturer>
+ <Description><![CDATA[]]>
+ </Description>
+ <Status><![CDATA[OK]]></Status>
+ <File><![CDATA[C:\Windows\system32\IMAADP32.ACM]]></File>
+ <Version><![CDATA[6.1.7600.16385]]></Version>
+ <Size><![CDATA[21.50 KB (22,016 bytes)]]></Size>
+ <Creation_Date><![CDATA[14/07/2009 02:18]]></Creation_Date>
+ </Data>
+ <Data>
+ <CODEC><![CDATA[c:\windows\system32\msg711.acm]]></CODEC>
+ <Manufacturer><![CDATA[Microsoft Corporation]]></Manufacturer>
+ <Description><![CDATA[]]>
+ </Description>
+ <Status><![CDATA[OK]]></Status>
+ <File><![CDATA[C:\Windows\system32\MSG711.ACM]]></File>
+ <Version><![CDATA[6.1.7600.16385]]></Version>
+ <Size><![CDATA[14.50 KB (14,848 bytes)]]></Size>
+ <Creation_Date><![CDATA[14/07/2009 02:18]]></Creation_Date>
+ </Data>
+ <Data>
+ <CODEC><![CDATA[c:\windows\system32\msgsm32.acm]]></CODEC>
+ <Manufacturer><![CDATA[Microsoft Corporation]]></Manufacturer>
+ <Description><![CDATA[]]>
+ </Description>
+ <Status><![CDATA[OK]]></Status>
+ <File><![CDATA[C:\Windows\system32\MSGSM32.ACM]]></File>
+ <Version><![CDATA[6.1.7600.16385]]></Version>
+ <Size><![CDATA[28.50 KB (29,184 bytes)]]></Size>
+ <Creation_Date><![CDATA[14/07/2009 02:18]]></Creation_Date>
+ </Data>
+ <Data>
+ <CODEC><![CDATA[c:\windows\system32\msadp32.acm]]></CODEC>
+ <Manufacturer><![CDATA[Microsoft Corporation]]></Manufacturer>
+ <Description><![CDATA[]]>
+ </Description>
+ <Status><![CDATA[OK]]></Status>
+ <File><![CDATA[C:\Windows\system32\MSADP32.ACM]]></File>
+ <Version><![CDATA[6.1.7600.16385]]></Version>
+ <Size><![CDATA[23.50 KB (24,064 bytes)]]></Size>
+ <Creation_Date><![CDATA[14/07/2009 02:18]]></Creation_Date>
+ </Data>
+ <Data>
+ <CODEC><![CDATA[c:\windows\system32\l3codeca.acm]]></CODEC>
+ <Manufacturer><![CDATA[Fraunhofer Institut Integrierte Schaltungen IIS]]></Manufacturer>
+ <Description><![CDATA[Fraunhofer IIS MPEG Layer-3 Codec]]></Description>
+ <Status><![CDATA[OK]]></Status>
+ <File><![CDATA[C:\Windows\system32\L3CODECA.ACM]]></File>
+ <Version><![CDATA[1.9.0.401]]></Version>
+ <Size><![CDATA[79.50 KB (81,408 bytes)]]></Size>
+ <Creation_Date><![CDATA[14/07/2009 02:22]]></Creation_Date>
+ </Data>
+ </Category>
+ <Category name="Video Codecs">
+ <Data>
+ <CODEC><![CDATA[c:\windows\system32\msrle32.dll]]></CODEC>
+ <Manufacturer><![CDATA[Microsoft Corporation]]></Manufacturer>
+ <Description><![CDATA[]]>
+ </Description>
+ <Status><![CDATA[OK]]></Status>
+ <File><![CDATA[C:\Windows\system32\MSRLE32.DLL]]></File>
+ <Version><![CDATA[6.1.7600.16490]]></Version>
+ <Size><![CDATA[16.00 KB (16,384 bytes)]]></Size>
+ <Creation_Date><![CDATA[30/01/2012 12:26]]></Creation_Date>
+ </Data>
+ <Data>
+ <CODEC><![CDATA[c:\windows\system32\msvidc32.dll]]></CODEC>
+ <Manufacturer><![CDATA[Microsoft Corporation]]></Manufacturer>
+ <Description><![CDATA[]]>
+ </Description>
+ <Status><![CDATA[OK]]></Status>
+ <File><![CDATA[C:\Windows\system32\MSVIDC32.DLL]]></File>
+ <Version><![CDATA[6.1.7600.16490]]></Version>
+ <Size><![CDATA[38.00 KB (38,912 bytes)]]></Size>
+ <Creation_Date><![CDATA[30/01/2012 12:26]]></Creation_Date>
+ </Data>
+ <Data>
+ <CODEC><![CDATA[c:\windows\system32\msyuv.dll]]></CODEC>
+ <Manufacturer><![CDATA[Microsoft Corporation]]></Manufacturer>
+ <Description><![CDATA[]]>
+ </Description>
+ <Status><![CDATA[OK]]></Status>
+ <File><![CDATA[C:\Windows\system32\MSYUV.DLL]]></File>
+ <Version><![CDATA[6.1.7600.16490]]></Version>
+ <Size><![CDATA[24.50 KB (25,088 bytes)]]></Size>
+ <Creation_Date><![CDATA[30/01/2012 12:26]]></Creation_Date>
+ </Data>
+ <Data>
+ <CODEC><![CDATA[c:\windows\system32\iyuv_32.dll]]></CODEC>
+ <Manufacturer><![CDATA[Microsoft Corporation]]></Manufacturer>
+ <Description><![CDATA[]]>
+ </Description>
+ <Status><![CDATA[OK]]></Status>
+ <File><![CDATA[C:\Windows\system32\IYUV_32.DLL]]></File>
+ <Version><![CDATA[6.1.7600.16490]]></Version>
+ <Size><![CDATA[53.00 KB (54,272 bytes)]]></Size>
+ <Creation_Date><![CDATA[30/01/2012 12:26]]></Creation_Date>
+ </Data>
+ <Data>
+ <CODEC><![CDATA[c:\windows\system32\tsbyuv.dll]]></CODEC>
+ <Manufacturer><![CDATA[Microsoft Corporation]]></Manufacturer>
+ <Description><![CDATA[]]>
+ </Description>
+ <Status><![CDATA[OK]]></Status>
+ <File><![CDATA[C:\Windows\system32\TSBYUV.DLL]]></File>
+ <Version><![CDATA[6.1.7600.16490]]></Version>
+ <Size><![CDATA[14.50 KB (14,848 bytes)]]></Size>
+ <Creation_Date><![CDATA[30/01/2012 12:26]]></Creation_Date>
+ </Data>
+ </Category>
+ </Category>
+ <Category name="CD-ROM">
+ <Data>
+ <Item><![CDATA[Drive]]></Item>
+ <Value><![CDATA[D:]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Description]]></Item>
+ <Value><![CDATA[CD-ROM Drive]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Media Loaded]]></Item>
+ <Value><![CDATA[No]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Media Type]]></Item>
+ <Value><![CDATA[DVD Writer]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[hp DVDRAM GT31L]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Manufacturer]]></Item>
+ <Value><![CDATA[(Standard CD-ROM drives)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Status]]></Item>
+ <Value><![CDATA[OK]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Transfer Rate]]></Item>
+ <Value><![CDATA[-1.00 kbytes/sec]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[SCSI Target ID]]></Item>
+ <Value><![CDATA[1]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[IDE\CDROMHP_DVDRAM_GT31L_________________________MR52____\4&A90EDEC&0&0.1.0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\cdrom.sys (6.1.7600.16385, 144.00 KB (147,456 bytes), 14/07/2009 01:19)]]></Value>
+ </Data>
+ </Category>
+ <Category name="Sound Device">
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[IDT High Definition Audio CODEC]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Manufacturer]]></Item>
+ <Value><![CDATA[IDT]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Status]]></Item>
+ <Value><![CDATA[OK]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[HDAUDIO\FUNC_01&VEN_111D&DEV_7603&SUBSYS_103C172A&REV_1002\4&226A9BEC&0&0001]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\stwrt64.sys (6.10.6257.0, 491.50 KB (503,296 bytes), 30/01/2012 11:19)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[]]>
+ </Item>
+ <Value><![CDATA[]]>
+ </Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[Sonido Intel(R) para pantallas]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Manufacturer]]></Item>
+ <Value><![CDATA[Intel(R) Corporation]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Status]]></Item>
+ <Value><![CDATA[OK]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[HDAUDIO\FUNC_01&VEN_8086&DEV_2804&SUBSYS_80860101&REV_1000\4&226A9BEC&0&0301]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\intcdaud.sys (6.12.0.3065, 280.50 KB (287,232 bytes), 21/06/2010 03:45)]]></Value>
+ </Data>
+ </Category>
+ <Category name="Display">
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[Intel(R) HD Graphics]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[PCI\VEN_8086&DEV_0046&SUBSYS_172A103C&REV_02\3&21436425&0&10]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Adapter Type]]></Item>
+ <Value><![CDATA[Intel(R) HD Graphics (Core i5), Intel Corporation compatible]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Adapter Description]]></Item>
+ <Value><![CDATA[Intel(R) HD Graphics]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Adapter RAM]]></Item>
+ <Value><![CDATA[(345,083,904) bytes]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Installed Drivers]]></Item>
+ <Value><![CDATA[igdumd64.dll,igd10umd64.dll,igdumdx32,igd10umd32]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver Version]]></Item>
+ <Value><![CDATA[8.15.10.2189]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[INF File]]></Item>
+ <Value><![CDATA[oem50.inf (iILKM0 section)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Color Planes]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Color Table Entries]]></Item>
+ <Value><![CDATA[4294967296]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Resolution]]></Item>
+ <Value><![CDATA[1920 x 1080 x 60 hertz]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Bits/Pixel]]></Item>
+ <Value><![CDATA[32]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Memory Address]]></Item>
+ <Value><![CDATA[0xD0000000-0xD03FFFFF]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Memory Address]]></Item>
+ <Value><![CDATA[0xC0000000-0xCFFFFFFF]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[I/O Port]]></Item>
+ <Value><![CDATA[0x00005058-0x0000505F]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[IRQ Channel]]></Item>
+ <Value><![CDATA[IRQ 4294967291]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[I/O Port]]></Item>
+ <Value><![CDATA[0x000003B0-0x000003BB]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[I/O Port]]></Item>
+ <Value><![CDATA[0x000003C0-0x000003DF]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Memory Address]]></Item>
+ <Value><![CDATA[0xA0000-0xBFFFF]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\igdkmd64.sys (8.15.10.2189, 10.12 MB (10,610,400 bytes), 28/07/2010 15:10)]]></Value>
+ </Data>
+ </Category>
+ <Category name="Infrared">
+ <Data>
+ <Item></Item>
+ <Value></Value>
+ </Data>
+ </Category>
+ <Category name="Input">
+ <Category name="Keyboard">
+ <Data>
+ <Item><![CDATA[Description]]></Item>
+ <Value><![CDATA[USB Input Device]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[Enhanced (101- or 102-key)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Layout]]></Item>
+ <Value><![CDATA[0000040A]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[USB\VID_03F0&PID_0024\7&38DDF4CC&0&2]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Number of Function Keys]]></Item>
+ <Value><![CDATA[12]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\hidusb.sys (6.1.7600.16385, 29.50 KB (30,208 bytes), 14/07/2009 02:06)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[]]>
+ </Item>
+ <Value><![CDATA[]]>
+ </Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Description]]></Item>
+ <Value><![CDATA[Standard 101/102-Key or Microsoft Natural PS/2 Keyboard with HP QLB]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[Enhanced (101- or 102-key)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Layout]]></Item>
+ <Value><![CDATA[0000040A]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[ACPI\PNP0303\4&4094DF2&0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Number of Function Keys]]></Item>
+ <Value><![CDATA[12]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[I/O Port]]></Item>
+ <Value><![CDATA[0x00000060-0x00000060]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[I/O Port]]></Item>
+ <Value><![CDATA[0x00000064-0x00000064]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[IRQ Channel]]></Item>
+ <Value><![CDATA[IRQ 1]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\i8042prt.sys (6.1.7600.16385, 103.00 KB (105,472 bytes), 14/07/2009 01:19)]]></Value>
+ </Data>
+ </Category>
+ <Category name="Pointing Device">
+ <Data>
+ <Item><![CDATA[Hardware Type]]></Item>
+ <Value><![CDATA[USB Input Device]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Number of Buttons]]></Item>
+ <Value><![CDATA[0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Status]]></Item>
+ <Value><![CDATA[OK]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[USB\VID_093A&PID_2510\7&38DDF4CC&0&1]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Power Management Supported]]></Item>
+ <Value><![CDATA[No]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Double Click Threshold]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Handedness]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\hidusb.sys (6.1.7600.16385, 29.50 KB (30,208 bytes), 14/07/2009 02:06)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[]]>
+ </Item>
+ <Value><![CDATA[]]>
+ </Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Hardware Type]]></Item>
+ <Value><![CDATA[Synaptics PS/2 Port TouchPad]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Number of Buttons]]></Item>
+ <Value><![CDATA[0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Status]]></Item>
+ <Value><![CDATA[OK]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[ACPI\SYN0165\4&4094DF2&0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Power Management Supported]]></Item>
+ <Value><![CDATA[No]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Double Click Threshold]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Handedness]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[IRQ Channel]]></Item>
+ <Value><![CDATA[IRQ 12]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\i8042prt.sys (6.1.7600.16385, 103.00 KB (105,472 bytes), 14/07/2009 01:19)]]></Value>
+ </Data>
+ </Category>
+ </Category>
+ <Category name="Modem">
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[LSI HDA Modem]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Description]]></Item>
+ <Value><![CDATA[LSI HDA Modem]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Device ID]]></Item>
+ <Value><![CDATA[HDAUDIO\FUNC_02&VEN_11C1&DEV_1040&SUBSYS_103C3066&REV_1002\4&226A9BEC&0&0101]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Device Type]]></Item>
+ <Value><![CDATA[Internal Modem]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Attached To]]></Item>
+ <Value><![CDATA[COM4]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Answer Mode]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[HDAUDIO\FUNC_02&VEN_11C1&DEV_1040&SUBSYS_103C3066&REV_1002\4&226A9BEC&0&0101]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Provider Name]]></Item>
+ <Value><![CDATA[LSI]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Modem INF Path]]></Item>
+ <Value><![CDATA[oem5.inf]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Modem INF Section]]></Item>
+ <Value><![CDATA[LSI_HDA]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Blind Off]]></Item>
+ <Value><![CDATA[X4]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Blind On]]></Item>
+ <Value><![CDATA[X3]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Compression Off]]></Item>
+ <Value><![CDATA[%C0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Compression On]]></Item>
+ <Value><![CDATA[%C1]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Error Control Forced]]></Item>
+ <Value><![CDATA[\N4]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Error Control Off]]></Item>
+ <Value><![CDATA[\N1]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Error Control On]]></Item>
+ <Value><![CDATA[\N3]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Flow Control Hard]]></Item>
+ <Value><![CDATA[&K3]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Flow Control Off]]></Item>
+ <Value><![CDATA[&K0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Flow Control Soft]]></Item>
+ <Value><![CDATA[&K4]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DCB]]></Item>
+ <Value><![CDATA[]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Default]]></Item>
+ <Value><![CDATA[<]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Inactivity Timeout]]></Item>
+ <Value><![CDATA[0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Modulation Bell]]></Item>
+ <Value><![CDATA[B1B16B2]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Modulation CCITT]]></Item>
+ <Value><![CDATA[B0B15B2]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Prefix]]></Item>
+ <Value><![CDATA[AT]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Pulse]]></Item>
+ <Value><![CDATA[P]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Reset]]></Item>
+ <Value><![CDATA[AT&F<cr>]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Responses Key Name]]></Item>
+ <Value><![CDATA[LSI HDA Modem::LSI::LSI]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Mode Dial]]></Item>
+ <Value><![CDATA[M1]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Mode Off]]></Item>
+ <Value><![CDATA[M0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Mode On]]></Item>
+ <Value><![CDATA[M2]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Mode Setup]]></Item>
+ <Value><![CDATA[M3]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Volume High]]></Item>
+ <Value><![CDATA[L3]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Volume Low]]></Item>
+ <Value><![CDATA[L0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Volume Med]]></Item>
+ <Value><![CDATA[L2]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[String Format]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Terminator]]></Item>
+ <Value><![CDATA[<cr>]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Tone]]></Item>
+ <Value><![CDATA[T]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\modem.sys (6.1.7600.16385, 39.50 KB (40,448 bytes), 14/07/2009 02:10)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[]]>
+ </Item>
+ <Value><![CDATA[]]>
+ </Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[HP un2420 Mobile Broadband Module Modem]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Description]]></Item>
+ <Value><![CDATA[HP un2420 Mobile Broadband Module Modem]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Device ID]]></Item>
+ <Value><![CDATA[USB\VID_03F0&PID_251D&MI_02\7&3103D884&0&2_02]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Device Type]]></Item>
+ <Value><![CDATA[External Modem]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Attached To]]></Item>
+ <Value><![CDATA[COM8]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Answer Mode]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[USB\VID_03F0&PID_251D&MI_02\7&3103D884&0&2_02]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Provider Name]]></Item>
+ <Value><![CDATA[Qualcomm Incorporated]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Modem INF Path]]></Item>
+ <Value><![CDATA[oem54.inf]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Modem INF Section]]></Item>
+ <Value><![CDATA[Modem2]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Blind Off]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Blind On]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Compression Off]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Compression On]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Error Control Forced]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Error Control Off]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Error Control On]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Flow Control Hard]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Flow Control Off]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Flow Control Soft]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DCB]]></Item>
+ <Value><![CDATA[]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Default]]></Item>
+ <Value><![CDATA[]]>
+ </Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Inactivity Timeout]]></Item>
+ <Value><![CDATA[0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Modulation Bell]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Modulation CCITT]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Prefix]]></Item>
+ <Value><![CDATA[AT]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Pulse]]></Item>
+ <Value><![CDATA[P]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Reset]]></Item>
+ <Value><![CDATA[AT&F<cr>]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Responses Key Name]]></Item>
+ <Value><![CDATA[HP un2420 Mobile Broadband Module Modem::Qualcomm Incorporated::Qualcomm Incorporated]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Mode Dial]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Mode Off]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Mode On]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Mode Setup]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Volume High]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Volume Low]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Speaker Volume Med]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[String Format]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Terminator]]></Item>
+ <Value><![CDATA[<cr>]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Tone]]></Item>
+ <Value><![CDATA[T]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\modem.sys (6.1.7600.16385, 39.50 KB (40,448 bytes), 14/07/2009 02:10)]]></Value>
+ </Data>
+ </Category>
+ <Category name="Network">
+ <Category name="Adapter">
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[[00000000] WAN Miniport (SSTP)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Adapter Type]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Product Type]]></Item>
+ <Value><![CDATA[WAN Miniport (SSTP)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Installed]]></Item>
+ <Value><![CDATA[Yes]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[ROOT\MS_SSTPMINIPORT\0000]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Last Reset]]></Item>
+ <Value><![CDATA[21/05/2012 08:05]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Index]]></Item>
+ <Value><![CDATA[0]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Service Name]]></Item>
+ <Value><![CDATA[RasSstp]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[IP Address]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[IP Subnet]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Default IP Gateway]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Enabled]]></Item>
+ <Value><![CDATA[No]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Server]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Lease Expires]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Lease Obtained]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[MAC Address]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\rassstp.sys (6.1.7600.16385, 82.00 KB (83,968 bytes), 14/07/2009 02:10)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[]]>
+ </Item>
+ <Value><![CDATA[]]>
+ </Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[[00000001] WAN Miniport (IKEv2)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Adapter Type]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Product Type]]></Item>
+ <Value><![CDATA[WAN Miniport (IKEv2)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Installed]]></Item>
+ <Value><![CDATA[Yes]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[ROOT\MS_AGILEVPNMINIPORT\0000]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Last Reset]]></Item>
+ <Value><![CDATA[21/05/2012 08:05]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Index]]></Item>
+ <Value><![CDATA[1]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Service Name]]></Item>
+ <Value><![CDATA[RasAgileVpn]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[IP Address]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[IP Subnet]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Default IP Gateway]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Enabled]]></Item>
+ <Value><![CDATA[No]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Server]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Lease Expires]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Lease Obtained]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[MAC Address]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\agilevpn.sys (6.1.7600.16385, 59.00 KB (60,416 bytes), 14/07/2009 02:10)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[]]>
+ </Item>
+ <Value><![CDATA[]]>
+ </Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[[00000002] WAN Miniport (L2TP)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Adapter Type]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Product Type]]></Item>
+ <Value><![CDATA[WAN Miniport (L2TP)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Installed]]></Item>
+ <Value><![CDATA[Yes]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[ROOT\MS_L2TPMINIPORT\0000]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Last Reset]]></Item>
+ <Value><![CDATA[21/05/2012 08:05]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Index]]></Item>
+ <Value><![CDATA[2]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Service Name]]></Item>
+ <Value><![CDATA[Rasl2tp]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[IP Address]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[IP Subnet]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Default IP Gateway]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Enabled]]></Item>
+ <Value><![CDATA[No]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Server]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Lease Expires]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[DHCP Lease Obtained]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[MAC Address]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Driver]]></Item>
+ <Value><![CDATA[c:\windows\system32\drivers\rasl2tp.sys (6.1.7600.16385, 127.00 KB (130,048 bytes), 14/07/2009 02:10)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[]]>
+ </Item>
+ <Value><![CDATA[]]>
+ </Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Name]]></Item>
+ <Value><![CDATA[[00000003] WAN Miniport (PPTP)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Adapter Type]]></Item>
+ <Value><![CDATA[Not Available]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Product Type]]></Item>
+ <Value><![CDATA[WAN Miniport (PPTP)]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Installed]]></Item>
+ <Value><![CDATA[Yes]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[PNP Device ID]]></Item>
+ <Value><![CDATA[ROOT\MS_PPTPMINIPORT\0000]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Last Reset]]></Item>
+ <Value><![CDATA[21/05/2012 08:05]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Index]]></Item>
+ <Value><![CDATA[3]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[Service Name]]></Item>
+ <Value><![CDATA[PptpMiniport]]></Value>
+ </Data>
+ <Data>
+ <Item><![CDATA[IP Address]]></Item>
+
<TRUNCATED>
[04/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/package.json b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/package.json
new file mode 100644
index 0000000..d775309
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/package.json
@@ -0,0 +1,73 @@
+{
+ "name": "xmldom",
+ "version": "0.1.16",
+ "description": "A W3C Standard XML DOM(Level2 CORE) implementation and parser(DOMParser/XMLSerializer).",
+ "keywords": [
+ "w3c",
+ "dom",
+ "xml",
+ "parser",
+ "javascript",
+ "DOMParser",
+ "XMLSerializer"
+ ],
+ "author": {
+ "name": "jindw",
+ "email": "jindw@xidea.org",
+ "url": "http://www.xidea.org"
+ },
+ "homepage": "https://github.com/jindw/xmldom",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jindw/xmldom.git"
+ },
+ "main": "./dom-parser.js",
+ "scripts": {
+ "test": "proof platform win32 && proof test */*/*.t.js || t/test"
+ },
+ "engines": {
+ "node": ">=0.1"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "proof": "0.0.28"
+ },
+ "maintainers": [
+ {
+ "name": "jindw",
+ "email": "jindw@xidea.org",
+ "url": "http://www.xidea.org"
+ }
+ ],
+ "contributors": [
+ {
+ "name": "Yaron Naveh",
+ "email": "yaronn01@gmail.com",
+ "url": "http://webservices20.blogspot.com/"
+ },
+ {
+ "name": "Harutyun Amirjanyan",
+ "email": "amirjanyan@gmail.com",
+ "url": "https://github.com/nightwing"
+ },
+ {
+ "name": "Alan Gutierrez",
+ "email": "alan@prettyrobots.com",
+ "url": "http://www.prettyrobots.com/"
+ }
+ ],
+ "bugs": {
+ "url": "http://github.com/jindw/xmldom/issues",
+ "email": "jindw@xidea.org"
+ },
+ "licenses": [
+ {
+ "type": "LGPL",
+ "url": "http://www.gnu.org/licenses/lgpl.html"
+ }
+ ],
+ "readme": "# XMLDOM [](http://travis-ci.org/bigeasy/xmldom) [](https://coveralls.io/r/bigeasy/xmldom) [](http://badge.fury.io/js/xmldom)\n\nA JavaScript implementation of W3C DOM for Node.js, Rhino and the browser. Fully\ncompatible with `W3C DOM level2`; and some compatible with `level3`. Supports\n`DOMParser` and `XMLSerializer` interface such as in browser.\n\nInstall:\n-------\n>npm install xmldom\n\nExample:\n====\n```javascript\nvar DOMParser = require('xmldom').DOMParser;\nvar doc = new DOMParser().parseFromString(\n '<xml xmlns=\"a\" xmlns:c=\"./lite\">\\n'+\n '\\t<child>test</child>\\n'+\n '\\t<child></child>\\n'+\n '\\t<child/>\\n'+\n '</xml>'\n ,'text/xml');\ndoc.documentElement.setAttribute('x','y');\ndoc.documentElement.setAttri
buteNS('./lite','c:x','y2');\nvar nsAttr = doc.documentElement.getAttributeNS('./lite','x')\nconsole.info(nsAttr)\nconsole.info(doc)\n```\nAPI Reference\n=====\n\n * [DOMParser](https://developer.mozilla.org/en/DOMParser):\n\n\t```javascript\n\tparseFromString(xmlsource,mimeType)\n\t```\n\t* **options extension** _by xmldom_(not BOM standard!!)\n\n\t```javascript\n\t//added the options argument\n\tnew DOMParser(options)\n\t\n\t//errorHandler is supported\n\tnew DOMParser({\n\t\t/**\n\t\t * youcan override the errorHandler for xml parser\n\t\t * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html\n\t\t */\n\t\terrorHandler:{warning:callback,error:callback,fatalError:callback}\n\t})\n\t\t\n\t```\n\n * [XMLSerializer](https://developer.mozilla.org/en/XMLSerializer)\n \n\t```javascript\n\tserializeToString(node)\n\t```\nDOM level2 method and attribute:\n------\n\n * [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247)\n\t\n\t\tattribut
e:\n\t\t\tnodeValue|prefix\n\t\treadonly attribute:\n\t\t\tnodeName|nodeType|parentNode|childNodes|firstChild|lastChild|previousSibling|nextSibling|attributes|ownerDocument|namespaceURI|localName\n\t\tmethod:\t\n\t\t\tinsertBefore(newChild, refChild)\n\t\t\treplaceChild(newChild, oldChild)\n\t\t\tremoveChild(oldChild)\n\t\t\tappendChild(newChild)\n\t\t\thasChildNodes()\n\t\t\tcloneNode(deep)\n\t\t\tnormalize()\n\t\t\tisSupported(feature, version)\n\t\t\thasAttributes()\n\n * [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490)\n\t\t\n\t\tmethod:\n\t\t\thasFeature(feature, version)\n\t\t\tcreateDocumentType(qualifiedName, publicId, systemId)\n\t\t\tcreateDocument(namespaceURI, qualifiedName, doctype)\n\n * [Document](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document) : Node\n\t\t\n\t\treadonly attribute:\n\t\t\tdoctype|implementation|documentElement\n\t\tmethod:\n\t\t\tcreateElement(tagName)\n\t\t\tcreateDocume
ntFragment()\n\t\t\tcreateTextNode(data)\n\t\t\tcreateComment(data)\n\t\t\tcreateCDATASection(data)\n\t\t\tcreateProcessingInstruction(target, data)\n\t\t\tcreateAttribute(name)\n\t\t\tcreateEntityReference(name)\n\t\t\tgetElementsByTagName(tagname)\n\t\t\timportNode(importedNode, deep)\n\t\t\tcreateElementNS(namespaceURI, qualifiedName)\n\t\t\tcreateAttributeNS(namespaceURI, qualifiedName)\n\t\t\tgetElementsByTagNameNS(namespaceURI, localName)\n\t\t\tgetElementById(elementId)\n\n * [DocumentFragment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3) : Node\n * [Element](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-745549614) : Node\n\t\t\n\t\treadonly attribute:\n\t\t\ttagName\n\t\tmethod:\n\t\t\tgetAttribute(name)\n\t\t\tsetAttribute(name, value)\n\t\t\tremoveAttribute(name)\n\t\t\tgetAttributeNode(name)\n\t\t\tsetAttributeNode(newAttr)\n\t\t\tremoveAttributeNode(oldAttr)\n\t\t\tgetElementsByTagName(name)\n\t\t\tgetAttributeNS(n
amespaceURI, localName)\n\t\t\tsetAttributeNS(namespaceURI, qualifiedName, value)\n\t\t\tremoveAttributeNS(namespaceURI, localName)\n\t\t\tgetAttributeNodeNS(namespaceURI, localName)\n\t\t\tsetAttributeNodeNS(newAttr)\n\t\t\tgetElementsByTagNameNS(namespaceURI, localName)\n\t\t\thasAttribute(name)\n\t\t\thasAttributeNS(namespaceURI, localName)\n\n * [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node\n\t\n\t\tattribute:\n\t\t\tvalue\n\t\treadonly attribute:\n\t\t\tname|specified|ownerElement\n\n * [NodeList](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177)\n\t\t\n\t\treadonly attribute:\n\t\t\tlength\n\t\tmethod:\n\t\t\titem(index)\n\t\n * [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922)\n\n\t\treadonly attribute:\n\t\t\tlength\n\t\tmethod:\n\t\t\tgetNamedItem(name)\n\t\t\tsetNamedItem(arg)\n\t\t\tremoveNamedItem(name)\n\t\t\titem(index)\n\t\t\tgetNamedItemNS(names
paceURI, localName)\n\t\t\tsetNamedItemNS(arg)\n\t\t\tremoveNamedItemNS(namespaceURI, localName)\n\t\t\n * [CharacterData](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-FF21A306) : Node\n\t\n\t\tmethod:\n\t\t\tsubstringData(offset, count)\n\t\t\tappendData(arg)\n\t\t\tinsertData(offset, arg)\n\t\t\tdeleteData(offset, count)\n\t\t\treplaceData(offset, count, arg)\n\t\t\n * [Text](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1312295772) : CharacterData\n\t\n\t\tmethod:\n\t\t\tsplitText(offset)\n\t\t\t\n * [CDATASection](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-667469212)\n * [Comment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1728279322) : CharacterData\n\t\n * [DocumentType](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927)\n\t\n\t\treadonly attribute:\n\t\t\tname|entities|notations|publicId|systemId|internalSubset\n\t\t\t\n * Notation : Node\n\t\n\t\tre
adonly attribute:\n\t\t\tpublicId|systemId\n\t\t\t\n * Entity : Node\n\t\n\t\treadonly attribute:\n\t\t\tpublicId|systemId|notationName\n\t\t\t\n * EntityReference : Node \n * ProcessingInstruction : Node \n\t\n\t\tattribute:\n\t\t\tdata\n\t\treadonly attribute:\n\t\t\ttarget\n\t\t\nDOM level 3 support:\n-----\n\n * [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent)\n\t\t\n\t\tattribute:\n\t\t\ttextContent\n\t\tmethod:\n\t\t\tisDefaultNamespace(namespaceURI){\n\t\t\tlookupNamespaceURI(prefix)\n\nDOM extension by xmldom\n---\n * [Node] Source position extension; \n\t\t\n\t\tattribute:\n\t\t\t//Numbered starting from '1'\n\t\t\tlineNumber\n\t\t\t//Numbered starting from '1'\n\t\t\tcolumnNumber\n",
+ "readmeFilename": "readme.md",
+ "_id": "xmldom@0.1.16",
+ "_from": "xmldom@0.1.x"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/readme.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/readme.md b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/readme.md
new file mode 100644
index 0000000..5ce0e81
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/readme.md
@@ -0,0 +1,213 @@
+# XMLDOM [](http://travis-ci.org/bigeasy/xmldom) [](https://coveralls.io/r/bigeasy/xmldom) [](http://badge.fury.io/js/xmldom)
+
+A JavaScript implementation of W3C DOM for Node.js, Rhino and the browser. Fully
+compatible with `W3C DOM level2`; and some compatible with `level3`. Supports
+`DOMParser` and `XMLSerializer` interface such as in browser.
+
+Install:
+-------
+>npm install xmldom
+
+Example:
+====
+```javascript
+var DOMParser = require('xmldom').DOMParser;
+var doc = new DOMParser().parseFromString(
+ '<xml xmlns="a" xmlns:c="./lite">\n'+
+ '\t<child>test</child>\n'+
+ '\t<child></child>\n'+
+ '\t<child/>\n'+
+ '</xml>'
+ ,'text/xml');
+doc.documentElement.setAttribute('x','y');
+doc.documentElement.setAttributeNS('./lite','c:x','y2');
+var nsAttr = doc.documentElement.getAttributeNS('./lite','x')
+console.info(nsAttr)
+console.info(doc)
+```
+API Reference
+=====
+
+ * [DOMParser](https://developer.mozilla.org/en/DOMParser):
+
+ ```javascript
+ parseFromString(xmlsource,mimeType)
+ ```
+ * **options extension** _by xmldom_(not BOM standard!!)
+
+ ```javascript
+ //added the options argument
+ new DOMParser(options)
+
+ //errorHandler is supported
+ new DOMParser({
+ /**
+ * youcan override the errorHandler for xml parser
+ * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html
+ */
+ errorHandler:{warning:callback,error:callback,fatalError:callback}
+ })
+
+ ```
+
+ * [XMLSerializer](https://developer.mozilla.org/en/XMLSerializer)
+
+ ```javascript
+ serializeToString(node)
+ ```
+DOM level2 method and attribute:
+------
+
+ * [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247)
+
+ attribute:
+ nodeValue|prefix
+ readonly attribute:
+ nodeName|nodeType|parentNode|childNodes|firstChild|lastChild|previousSibling|nextSibling|attributes|ownerDocument|namespaceURI|localName
+ method:
+ insertBefore(newChild, refChild)
+ replaceChild(newChild, oldChild)
+ removeChild(oldChild)
+ appendChild(newChild)
+ hasChildNodes()
+ cloneNode(deep)
+ normalize()
+ isSupported(feature, version)
+ hasAttributes()
+
+ * [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490)
+
+ method:
+ hasFeature(feature, version)
+ createDocumentType(qualifiedName, publicId, systemId)
+ createDocument(namespaceURI, qualifiedName, doctype)
+
+ * [Document](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document) : Node
+
+ readonly attribute:
+ doctype|implementation|documentElement
+ method:
+ createElement(tagName)
+ createDocumentFragment()
+ createTextNode(data)
+ createComment(data)
+ createCDATASection(data)
+ createProcessingInstruction(target, data)
+ createAttribute(name)
+ createEntityReference(name)
+ getElementsByTagName(tagname)
+ importNode(importedNode, deep)
+ createElementNS(namespaceURI, qualifiedName)
+ createAttributeNS(namespaceURI, qualifiedName)
+ getElementsByTagNameNS(namespaceURI, localName)
+ getElementById(elementId)
+
+ * [DocumentFragment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3) : Node
+ * [Element](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-745549614) : Node
+
+ readonly attribute:
+ tagName
+ method:
+ getAttribute(name)
+ setAttribute(name, value)
+ removeAttribute(name)
+ getAttributeNode(name)
+ setAttributeNode(newAttr)
+ removeAttributeNode(oldAttr)
+ getElementsByTagName(name)
+ getAttributeNS(namespaceURI, localName)
+ setAttributeNS(namespaceURI, qualifiedName, value)
+ removeAttributeNS(namespaceURI, localName)
+ getAttributeNodeNS(namespaceURI, localName)
+ setAttributeNodeNS(newAttr)
+ getElementsByTagNameNS(namespaceURI, localName)
+ hasAttribute(name)
+ hasAttributeNS(namespaceURI, localName)
+
+ * [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node
+
+ attribute:
+ value
+ readonly attribute:
+ name|specified|ownerElement
+
+ * [NodeList](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177)
+
+ readonly attribute:
+ length
+ method:
+ item(index)
+
+ * [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922)
+
+ readonly attribute:
+ length
+ method:
+ getNamedItem(name)
+ setNamedItem(arg)
+ removeNamedItem(name)
+ item(index)
+ getNamedItemNS(namespaceURI, localName)
+ setNamedItemNS(arg)
+ removeNamedItemNS(namespaceURI, localName)
+
+ * [CharacterData](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-FF21A306) : Node
+
+ method:
+ substringData(offset, count)
+ appendData(arg)
+ insertData(offset, arg)
+ deleteData(offset, count)
+ replaceData(offset, count, arg)
+
+ * [Text](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1312295772) : CharacterData
+
+ method:
+ splitText(offset)
+
+ * [CDATASection](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-667469212)
+ * [Comment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1728279322) : CharacterData
+
+ * [DocumentType](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927)
+
+ readonly attribute:
+ name|entities|notations|publicId|systemId|internalSubset
+
+ * Notation : Node
+
+ readonly attribute:
+ publicId|systemId
+
+ * Entity : Node
+
+ readonly attribute:
+ publicId|systemId|notationName
+
+ * EntityReference : Node
+ * ProcessingInstruction : Node
+
+ attribute:
+ data
+ readonly attribute:
+ target
+
+DOM level 3 support:
+-----
+
+ * [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent)
+
+ attribute:
+ textContent
+ method:
+ isDefaultNamespace(namespaceURI){
+ lookupNamespaceURI(prefix)
+
+DOM extension by xmldom
+---
+ * [Node] Source position extension;
+
+ attribute:
+ //Numbered starting from '1'
+ lineNumber
+ //Numbered starting from '1'
+ columnNumber
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/sax.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/sax.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/sax.js
new file mode 100644
index 0000000..be6e34e
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/sax.js
@@ -0,0 +1,564 @@
+//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
+//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
+//[5] Name ::= NameStartChar (NameChar)*
+var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF
+var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\u00B7\u0300-\u036F\\ux203F-\u2040]");
+var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
+//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/
+//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',')
+
+//S_TAG, S_ATTR, S_EQ, S_V
+//S_ATTR_S, S_E, S_S, S_C
+var S_TAG = 0;//tag name offerring
+var S_ATTR = 1;//attr name offerring
+var S_ATTR_S=2;//attr name end and space offer
+var S_EQ = 3;//=space?
+var S_V = 4;//attr value(no quot value only)
+var S_E = 5;//attr value end and no space(quot end)
+var S_S = 6;//(attr value end || tag end ) && (space offer)
+var S_C = 7;//closed el<el />
+
+function XMLReader(){
+}
+
+XMLReader.prototype = {
+ parse:function(source,defaultNSMap,entityMap){
+ var domBuilder = this.domBuilder;
+ domBuilder.startDocument();
+ _copy(defaultNSMap ,defaultNSMap = {})
+ parse(source,defaultNSMap,entityMap,
+ domBuilder,this.errorHandler);
+ domBuilder.endDocument();
+ }
+}
+function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
+ function fixedFromCharCode(code) {
+ // String.prototype.fromCharCode does not supports
+ // > 2 bytes unicode chars directly
+ if (code > 0xffff) {
+ code -= 0x10000;
+ var surrogate1 = 0xd800 + (code >> 10)
+ , surrogate2 = 0xdc00 + (code & 0x3ff);
+
+ return String.fromCharCode(surrogate1, surrogate2);
+ } else {
+ return String.fromCharCode(code);
+ }
+ }
+ function entityReplacer(a){
+ var k = a.slice(1,-1);
+ if(k in entityMap){
+ return entityMap[k];
+ }else if(k.charAt(0) === '#'){
+ return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))
+ }else{
+ errorHandler.error('entity not found:'+a);
+ return a;
+ }
+ }
+ function appendText(end){//has some bugs
+ var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);
+ locator&&position(start);
+ domBuilder.characters(xt,0,end-start);
+ start = end
+ }
+ function position(start,m){
+ while(start>=endPos && (m = linePattern.exec(source))){
+ startPos = m.index;
+ endPos = startPos + m[0].length;
+ locator.lineNumber++;
+ //console.log('line++:',locator,startPos,endPos)
+ }
+ locator.columnNumber = start-startPos+1;
+ }
+ var startPos = 0;
+ var endPos = 0;
+ var linePattern = /.+(?:\r\n?|\n)|.*$/g
+ var locator = domBuilder.locator;
+
+ var parseStack = [{currentNSMap:defaultNSMapCopy}]
+ var closeMap = {};
+ var start = 0;
+ while(true){
+ var i = source.indexOf('<',start);
+ if(i>start){
+ appendText(i);
+ }
+ switch(source.charAt(i+1)){
+ case '/':
+ var end = source.indexOf('>',i+3);
+ var tagName = source.substring(i+2,end);
+ var config = parseStack.pop();
+ var localNSMap = config.localNSMap;
+
+ if(config.tagName != tagName){
+ errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName );
+ }
+ domBuilder.endElement(config.uri,config.localName,tagName);
+ if(localNSMap){
+ for(var prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix) ;
+ }
+ }
+ end++;
+ break;
+ // end elment
+ case '?':// <?...?>
+ locator&&position(i);
+ end = parseInstruction(source,i,domBuilder);
+ break;
+ case '!':// <!doctype,<![CDATA,<!--
+ locator&&position(i);
+ end = parseDCC(source,i,domBuilder);
+ break;
+ default:
+ if(i<0){
+ if(!source.substr(start).match(/^\s*$/)){
+ errorHandler.error('source code out of document root');
+ }
+ return;
+ }else{
+ try{
+ locator&&position(i);
+ var el = new ElementAttributes();
+ //elStartEnd
+ var end = parseElementStartPart(source,i,el,entityReplacer,errorHandler);
+ var len = el.length;
+ //position fixed
+ if(len && locator){
+ var backup = copyLocator(locator,{});
+ for(var i = 0;i<len;i++){
+ var a = el[i];
+ position(a.offset);
+ a.offset = copyLocator(locator,{});
+ }
+ copyLocator(backup,locator);
+ }
+ el.closed = el.closed||fixSelfClosed(source,end,el.tagName,closeMap);
+ appendElement(el,domBuilder,parseStack);
+
+
+ if(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){
+ end = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)
+ }else{
+ end++;
+ }
+ }catch(e){
+ errorHandler.error('element parse error: '+e);
+ end = -1;
+ }
+ }
+
+ }
+ if(end<0){
+ //TODO: 这里有可能sax回退,有位置错误风险
+ appendText(i+1);
+ }else{
+ start = end;
+ }
+ }
+}
+function copyLocator(f,t){
+ t.lineNumber = f.lineNumber;
+ t.columnNumber = f.columnNumber;
+ return t;
+
+}
+
+/**
+ * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);
+ * @return end of the elementStartPart(end of elementEndPart for selfClosed el)
+ */
+function parseElementStartPart(source,start,el,entityReplacer,errorHandler){
+ var attrName;
+ var value;
+ var p = ++start;
+ var s = S_TAG;//status
+ while(true){
+ var c = source.charAt(p);
+ switch(c){
+ case '=':
+ if(s === S_ATTR){//attrName
+ attrName = source.slice(start,p);
+ s = S_EQ;
+ }else if(s === S_ATTR_S){
+ s = S_EQ;
+ }else{
+ //fatalError: equal must after attrName or space after attrName
+ throw new Error('attribute equal must after attrName');
+ }
+ break;
+ case '\'':
+ case '"':
+ if(s === S_EQ){//equal
+ start = p+1;
+ p = source.indexOf(c,start)
+ if(p>0){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ el.add(attrName,value,start-1);
+ s = S_E;
+ }else{
+ //fatalError: no end quot match
+ throw new Error('attribute value no end \''+c+'\' match');
+ }
+ }else if(s == S_V){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ //console.log(attrName,value,start,p)
+ el.add(attrName,value,start);
+ //console.dir(el)
+ errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!');
+ start = p+1;
+ s = S_E
+ }else{
+ //fatalError: no equal before
+ throw new Error('attribute value must after "="');
+ }
+ break;
+ case '/':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_E:
+ case S_S:
+ case S_C:
+ s = S_C;
+ el.closed = true;
+ case S_V:
+ case S_ATTR:
+ case S_ATTR_S:
+ break;
+ //case S_EQ:
+ default:
+ throw new Error("attribute invalid close char('/')")
+ }
+ break;
+ case '>':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_E:
+ case S_S:
+ case S_C:
+ break;//normal
+ case S_V://Compatible state
+ case S_ATTR:
+ value = source.slice(start,p);
+ if(value.slice(-1) === '/'){
+ el.closed = true;
+ value = value.slice(0,-1)
+ }
+ case S_ATTR_S:
+ if(s === S_ATTR_S){
+ value = attrName;
+ }
+ if(s == S_V){
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
+ el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start)
+ }else{
+ errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')
+ el.add(value,value,start)
+ }
+ break;
+ case S_EQ:
+ throw new Error('attribute value missed!!');
+ }
+// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName))
+ return p;
+ /*xml space '\x20' | #x9 | #xD | #xA; */
+ case '\u0080':
+ c = ' ';
+ default:
+ if(c<= ' '){//space
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));//tagName
+ s = S_S;
+ break;
+ case S_ATTR:
+ attrName = source.slice(start,p)
+ s = S_ATTR_S;
+ break;
+ case S_V:
+ var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
+ el.add(attrName,value,start)
+ case S_E:
+ s = S_S;
+ break;
+ //case S_S:
+ //case S_EQ:
+ //case S_ATTR_S:
+ // void();break;
+ //case S_C:
+ //ignore warning
+ }
+ }else{//not space
+//S_TAG, S_ATTR, S_EQ, S_V
+//S_ATTR_S, S_E, S_S, S_C
+ switch(s){
+ //case S_TAG:void();break;
+ //case S_ATTR:void();break;
+ //case S_V:void();break;
+ case S_ATTR_S:
+ errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!')
+ el.add(attrName,attrName,start);
+ start = p;
+ s = S_ATTR;
+ break;
+ case S_E:
+ errorHandler.warning('attribute space is required"'+attrName+'"!!')
+ case S_S:
+ s = S_ATTR;
+ start = p;
+ break;
+ case S_EQ:
+ s = S_V;
+ start = p;
+ break;
+ case S_C:
+ throw new Error("elements closed character '/' and '>' must be connected to");
+ }
+ }
+ }
+ p++;
+ }
+}
+/**
+ * @return end of the elementStartPart(end of elementEndPart for selfClosed el)
+ */
+function appendElement(el,domBuilder,parseStack){
+ var tagName = el.tagName;
+ var localNSMap = null;
+ var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
+ var i = el.length;
+ while(i--){
+ var a = el[i];
+ var qName = a.qName;
+ var value = a.value;
+ var nsp = qName.indexOf(':');
+ if(nsp>0){
+ var prefix = a.prefix = qName.slice(0,nsp);
+ var localName = qName.slice(nsp+1);
+ var nsPrefix = prefix === 'xmlns' && localName
+ }else{
+ localName = qName;
+ prefix = null
+ nsPrefix = qName === 'xmlns' && ''
+ }
+ //can not set prefix,because prefix !== ''
+ a.localName = localName ;
+ //prefix == null for no ns prefix attribute
+ if(nsPrefix !== false){//hack!!
+ if(localNSMap == null){
+ localNSMap = {}
+ _copy(currentNSMap,currentNSMap={})
+ }
+ currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
+ a.uri = 'http://www.w3.org/2000/xmlns/'
+ domBuilder.startPrefixMapping(nsPrefix, value)
+ }
+ }
+ var i = el.length;
+ while(i--){
+ a = el[i];
+ var prefix = a.prefix;
+ if(prefix){//no prefix attribute has no namespace
+ if(prefix === 'xml'){
+ a.uri = 'http://www.w3.org/XML/1998/namespace';
+ }if(prefix !== 'xmlns'){
+ a.uri = currentNSMap[prefix]
+ }
+ }
+ }
+ var nsp = tagName.indexOf(':');
+ if(nsp>0){
+ prefix = el.prefix = tagName.slice(0,nsp);
+ localName = el.localName = tagName.slice(nsp+1);
+ }else{
+ prefix = null;//important!!
+ localName = el.localName = tagName;
+ }
+ //no prefix element has default namespace
+ var ns = el.uri = currentNSMap[prefix || ''];
+ domBuilder.startElement(ns,localName,tagName,el);
+ //endPrefixMapping and startPrefixMapping have not any help for dom builder
+ //localNSMap = null
+ if(el.closed){
+ domBuilder.endElement(ns,localName,tagName);
+ if(localNSMap){
+ for(prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix)
+ }
+ }
+ }else{
+ el.currentNSMap = currentNSMap;
+ el.localNSMap = localNSMap;
+ parseStack.push(el);
+ }
+}
+function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){
+ if(/^(?:script|textarea)$/i.test(tagName)){
+ var elEndStart = source.indexOf('</'+tagName+'>',elStartEnd);
+ var text = source.substring(elStartEnd+1,elEndStart);
+ if(/[&<]/.test(text)){
+ if(/^script$/i.test(tagName)){
+ //if(!/\]\]>/.test(text)){
+ //lexHandler.startCDATA();
+ domBuilder.characters(text,0,text.length);
+ //lexHandler.endCDATA();
+ return elEndStart;
+ //}
+ }//}else{//text area
+ text = text.replace(/&#?\w+;/g,entityReplacer);
+ domBuilder.characters(text,0,text.length);
+ return elEndStart;
+ //}
+
+ }
+ }
+ return elStartEnd+1;
+}
+function fixSelfClosed(source,elStartEnd,tagName,closeMap){
+ //if(tagName in closeMap){
+ var pos = closeMap[tagName];
+ if(pos == null){
+ //console.log(tagName)
+ pos = closeMap[tagName] = source.lastIndexOf('</'+tagName+'>')
+ }
+ return pos<elStartEnd;
+ //}
+}
+function _copy(source,target){
+ for(var n in source){target[n] = source[n]}
+}
+function parseDCC(source,start,domBuilder){//sure start with '<!'
+ var next= source.charAt(start+2)
+ switch(next){
+ case '-':
+ if(source.charAt(start + 3) === '-'){
+ var end = source.indexOf('-->',start+4);
+ //append comment source.substring(4,end)//<!--
+ domBuilder.comment(source,start+4,end-start-4);
+ return end+3;
+ }else{
+ //error
+ return -1;
+ }
+ default:
+ if(source.substr(start+3,6) == 'CDATA['){
+ var end = source.indexOf(']]>',start+9);
+ domBuilder.startCDATA();
+ domBuilder.characters(source,start+9,end-start-9);
+ domBuilder.endCDATA()
+ return end+3;
+ }
+ //<!DOCTYPE
+ //startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
+ var matchs = split(source,start);
+ var len = matchs.length;
+ if(len>1 && /!doctype/i.test(matchs[0][0])){
+ var name = matchs[1][0];
+ var pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]
+ var sysid = len>4 && matchs[4][0];
+ var lastMatch = matchs[len-1]
+ domBuilder.startDTD(name,pubid,sysid);
+ domBuilder.endDTD();
+
+ return lastMatch.index+lastMatch[0].length
+ }
+ }
+ return -1;
+}
+
+
+
+function parseInstruction(source,start,domBuilder){
+ var end = source.indexOf('?>',start);
+ if(end){
+ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
+ if(match){
+ var len = match[0].length;
+ domBuilder.processingInstruction(match[1], match[2]) ;
+ return end+2;
+ }else{//error
+ return -1;
+ }
+ }
+ return -1;
+}
+
+/**
+ * @param source
+ */
+function ElementAttributes(source){
+
+}
+ElementAttributes.prototype = {
+ setTagName:function(tagName){
+ if(!tagNamePattern.test(tagName)){
+ throw new Error('invalid tagName:'+tagName)
+ }
+ this.tagName = tagName
+ },
+ add:function(qName,value,offset){
+ if(!tagNamePattern.test(qName)){
+ throw new Error('invalid attribute:'+qName)
+ }
+ this[this.length++] = {qName:qName,value:value,offset:offset}
+ },
+ length:0,
+ getLocalName:function(i){return this[i].localName},
+ getOffset:function(i){return this[i].offset},
+ getQName:function(i){return this[i].qName},
+ getURI:function(i){return this[i].uri},
+ getValue:function(i){return this[i].value}
+// ,getIndex:function(uri, localName)){
+// if(localName){
+//
+// }else{
+// var qName = uri
+// }
+// },
+// getValue:function(){return this.getValue(this.getIndex.apply(this,arguments))},
+// getType:function(uri,localName){}
+// getType:function(i){},
+}
+
+
+
+
+function _set_proto_(thiz,parent){
+ thiz.__proto__ = parent;
+ return thiz;
+}
+if(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){
+ _set_proto_ = function(thiz,parent){
+ function p(){};
+ p.prototype = parent;
+ p = new p();
+ for(parent in thiz){
+ p[parent] = thiz[parent];
+ }
+ return p;
+ }
+}
+
+function split(source,start){
+ var match;
+ var buf = [];
+ var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
+ reg.lastIndex = start;
+ reg.exec(source);//skip <
+ while(match = reg.exec(source)){
+ buf.push(match);
+ if(match[1])return buf;
+ }
+}
+
+if(typeof require == 'function'){
+ exports.XMLReader = XMLReader;
+}
+
+if(typeof require == 'function'){
+exports.XMLReader=XMLReader;
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/cover
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/cover b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/cover
new file mode 100755
index 0000000..5b146e4
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/cover
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+rm -rf coverage
+
+count=1;
+for file in $(find t -name \*.t.js); do
+ node_modules/.bin/istanbul cover -x 't/**' $file > /dev/null 2>&1
+ mv coverage/coverage.json coverage/coverage$count.json
+ count=$(expr $count + 1)
+done
+
+node_modules/.bin/istanbul report --root coverage --dir coverage > /dev/null
+
+sed -i -e s,'^SF:'`pwd`/,SF:, coverage/lcov.info
+
+exit 0
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/dom/require.t.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/dom/require.t.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/dom/require.t.js
new file mode 100755
index 0000000..2464e93
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/dom/require.t.js
@@ -0,0 +1,5 @@
+#!/usr/bin/env node
+
+require('proof')(1, function (ok) {
+ ok(require('../..'), 'require');
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/test
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/test b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/test
new file mode 100755
index 0000000..460073e
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/t/test
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+echo ""
+
+(proof run t/*/*.t.js | tee .proof.out | proof progress) || (proof errors < .proof.out) || exit 1
+
+if [ "$TRAVIS" = "true" ]; then
+ echo "running with coverage"
+ t/cover
+
+ echo "submitting to coveralls.io"
+ (cat coverage/lcov.info | node_modules/.bin/coveralls) > /dev/null 2>&1
+fi
+
+echo ""
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/index.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/index.js
new file mode 100644
index 0000000..1998125
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/index.js
@@ -0,0 +1 @@
+require('./o3xml')
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/mock.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/mock.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/mock.js
new file mode 100644
index 0000000..42013e7
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/mock.js
@@ -0,0 +1 @@
+exports.test = 1;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/o3xml.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/o3xml.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/o3xml.js
new file mode 100644
index 0000000..26a86b2
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/3rd-cases/o3xml.js
@@ -0,0 +1,21 @@
+var DOMParser = require('xmldom').DOMParser;
+require('./mock')
+//Compatibility
+{
+ var doc = new DOMParser().parseFromString("<xml/>",'text/xml');
+ var np = doc.__proto__.__proto__.__proto__;
+ for(var n in np){
+ if(/_NODE$/.test(n)){
+// console.log(n.replace(/_NODE$/,''),np[n])
+ np[n.replace(/_NODE$/,'')] = np[n];
+ }
+ }
+
+}
+
+require.cache[require.resolve('node-o3-xml')]
+ = require.cache[require.resolve('./mock')];
+require('node-o3-xml').parseFromString = function(xml){
+ return new DOMParser().parseFromString(xml,'text/xml');
+}
+require('node-o3-xml/test/test')
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/big-file-performance.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/big-file-performance.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/big-file-performance.js
new file mode 100644
index 0000000..a8007f9
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/big-file-performance.js
@@ -0,0 +1,152 @@
+var wows = require('vows');
+var assert = require('assert');
+var XMLSerializer = require('xmldom').XMLSerializer;
+var DOMParser = require('xmldom').DOMParser;
+var DomJS = require("dom-js").DomJS;
+try{
+ var Libxml = require('libxmljs');
+}catch(e){
+}
+
+function xmldom(data){
+ console.time('xmldom');
+ var doc = new DOMParser({locator:null,checkLater:true}).parseFromString(data);
+ console.timeEnd('xmldom');
+ doc.toString = function(){
+ return new XMLSerializer().serializeToString(doc);
+ }
+ return doc;
+}
+function libxml(data){
+ if(Libxml){
+ console.time('libxml');
+ var doc = Libxml.parseXmlString(data);
+ console.timeEnd('libxml');
+ var ToString=doc.toString ;
+ doc.toString = function(){
+ return ToString.apply(this,arguments).replace(/^\s+|\s+$/g,'');
+ }
+ return doc;
+ }else{
+ console.warn('libxml is not installed')
+ }
+}
+
+function domjs(data){
+ console.time('dom-js');
+ var doc;
+ new DomJS().parse(data, function(err, dom) {
+ doc = dom;
+ });
+ console.timeEnd('dom-js');
+
+ doc.toString = function(){
+ return doc.toXml();
+ }
+ return doc
+}
+var maxRandomAttr =parseInt(Math.random()*60);
+console.log('maxRandomAttr',maxRandomAttr)
+function addAttributes(el){
+ var c =parseInt(Math.random()*maxRandomAttr);
+ while(c--){
+ el.setAttribute('dynamic-attr'+c,c+new Array(c).join('.'));
+ }
+ var child = el.firstChild;
+ while(child){
+ if(child.nodeType == 1){
+ addAttributes(child)
+ }else if(child.nodeType == 4){//cdata
+ el.insertBefore(el.ownerDocument.createTextNode(child.data),child);
+ el.removeChild(child);
+ }
+ child = child.nextSibling;
+ }
+}
+// Create a Test Suite
+wows.describe('XML Node Parse').addBatch({
+ "big file parse":function(){
+ var fs = require('fs');
+ var path = require('path')
+ var data = fs.readFileSync(path.resolve(__dirname,'./test.xml'), 'ascii');
+ //data = "<?xml version=\"1.0\"?><xml><child> ![CDATA[v]] d &</child>\n</xml>"
+ console.log('test simple xml')
+ var t1 = new Date();
+ var doc1 = xmldom(data);
+ var t2 = new Date();
+ var doc2 = domjs(data);
+ var t3 = new Date();
+ var doc3 = libxml(data);
+ var t4 = new Date();
+ var xmldomTime = t2-t1;
+ var domjsTime = t3-t2;
+ console.assert(domjsTime>xmldomTime,'xmldom performance must more height!!')
+
+
+ doc1 = doc1.cloneNode(true);
+ addAttributes(doc1.documentElement);
+
+ data = doc1.toString();
+ console.log('test more attribute xml')
+ var t1 = new Date();
+ var doc1 = xmldom(data);
+ var t2 = new Date();
+ var doc2 = domjs(data);
+ var t3 = new Date();
+ var doc3 = libxml(data);
+ var t4 = new Date();
+ var xmldomTime = t2-t1;
+ var domjsTime = t3-t2;
+ console.assert(domjsTime>xmldomTime,'xmldom performance must more height!!')
+ function xmlReplace(a,v){
+ switch(v){
+ case '&':
+ return '&'
+ case '<':
+ return '<'
+ default:
+ if(v.length>1){
+ return v.replace(/([&<])/g,xmlReplace)
+ }
+ }
+ }
+ xmldomresult = (domjs(doc1+'')+'').replace(/^<\?.*?\?>\s*|<!\[CDATA\[([\s\S]*?)\]\]>/g,xmlReplace)
+ domjsresult = (doc2+'').replace(/^<\?.*?\?>\s*|<!\[CDATA\[([\s\S]*?)\]\]>/g,xmlReplace)
+ data = xmldomresult;
+ //console.log(data.substring(100,200))
+
+ console.log('test more attribute xml without cdata')
+ var t1 = new Date();
+ var doc1 = xmldom(data);
+ var t2 = new Date();
+ var doc2 = domjs(data);
+ var t3 = new Date();
+ var doc3 = libxml(data);
+ var t4 = new Date();
+ var xmldomTime = t2-t1;
+ var domjsTime = t3-t2;
+ console.assert(domjsTime>xmldomTime,'xmldom performance must more height!!')
+
+ //console.log(xmldomresult,domjsresult)
+
+ //assert.equal(xmldomresult,domjsresult);
+ //,xmldomresult,domjsresult)
+ if(xmldomresult !== domjsresult){
+ for(var i=0;i<xmldomresult.length;i++){
+ if(xmldomresult.charAt(i)!=domjsresult.charAt(i)){
+ console.log(xmldomresult.charAt(i))
+ var begin = i-50;
+ var len = 100;
+ xmldomresult = xmldomresult.substr(begin,len)
+ domjsresult = domjsresult.substr(begin,len)
+ //console.log(xmldomresult.length,domjsresult.length)
+ console.log('pos'+i,'\n',xmldomresult,'\n\n\n\n',domjsresult)
+ console.assert(xmldomresult == domjsresult)
+ break;
+ }
+ }
+
+ }
+ //console.assert(xmldomresult == domjsresult,xmldomresult.length,i)
+ }
+}).run(); // Run it
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/attr.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/attr.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/attr.js
new file mode 100644
index 0000000..b48cbde
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/attr.js
@@ -0,0 +1,64 @@
+var wows = require('vows');
+var DOMParser = require('xmldom').DOMParser;
+
+// Create a Test Suite
+wows.describe('XML attrs').addBatch({
+ "set attribute":function(){
+ var root = new DOMParser().parseFromString("<xml/>",'text/xml').documentElement;
+ root.setAttribute('a','1');
+ console.assert(root.attributes[0].localName == 'a');
+ root.setAttribute('b',2);
+ root.setAttribute('a',1);
+ root.setAttribute('a',1);
+ root.setAttribute('a',1);
+ console.assert(root.attributes.length == 2);
+ try {
+ var c = root.ownerDocument.createElement('c');
+ c.setAttributeNode(root.attributes.item(0));
+ } catch (e) {
+ console.assert(e.code == 10);
+ return;
+ }
+ console.assert(false);
+ },
+ "set ns attribute":function(){
+ var root = new DOMParser().parseFromString("<xml xmlns:a='a' xmlns:b='b' xmlns='e'><child/></xml>",'text/xml').documentElement;
+ var child = root.firstChild
+ child.setAttributeNS('a','a:a','1');
+ child.setAttributeNS('b','b:b','2');
+ child.setAttributeNS('b','b:a','1');
+ console.assert(child.attributes.length == 3,child.attributes.length,child+'');
+ child.setAttribute('a',1);
+ child.setAttributeNS('b','b:b','2');
+ console.assert(child.attributes.length == 4,child.attributes.length);
+ try {
+ var c = root.ownerDocument.createElement('c');
+ c.setAttributeNodeNS(root.attributes.item(0));
+ } catch (e) {
+ console.assert(e.code == 10);
+ return;
+ }
+ console.assert(false);
+ },
+ "override attribute":function(){
+ var root = new DOMParser().parseFromString("<xml xmlns:a='a' xmlns:b='b' xmlns='e'><child/></xml>",'text/xml').documentElement;
+ root.setAttributeNS('a','a:a','1');
+ console.assert(root.attributes.length == 4,root.attributes.length);
+//not standart
+// root.firstChild.setAttributeNode(root.attributes[0]);
+// console.assert(root.attributes.length == 0);
+ },
+ "attribute namespace":function(){
+ var root = new DOMParser().parseFromString("<xml xmlns:a='a' xmlns:b='b' a:b='e'></xml>",'text/xml').documentElement;
+ console.assert(root.getAttributeNS("a", "b"), "e");
+ },
+ "override ns attribute":function(){
+
+ },
+ "set existed attribute":function(){
+
+ },
+ "set document existed attribute":function(){
+
+ }
+}).run(); // Run it
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/clone.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/clone.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/clone.js
new file mode 100644
index 0000000..d8dff68
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/clone.js
@@ -0,0 +1,22 @@
+var wows = require('vows');
+var XMLSerializer = require('xmldom').XMLSerializer;
+var DOMParser = require('xmldom').DOMParser;
+
+// Create a Test Suite
+wows.describe('XML Namespace Parse').addBatch({
+ 'clone': function () {
+ var doc1 = new DOMParser().parseFromString("<doc1 attr1='1' attr2='a2'>text1<child>text2</child></doc1>",'text/xml')
+ var n =doc1.cloneNode(true)
+ console.assert(n == new XMLSerializer().serializeToString(doc1))
+ },
+ 'import': function () {
+ var doc1 = new DOMParser().parseFromString("<doc2 attr='2'/>")
+ var doc2 = new DOMParser().parseFromString("<doc1 attr1='1' attr2='a2'>text1<child>text2</child></doc1>",'text/xml')
+
+ var doc3 = new DOMParser().parseFromString("<doc2 attr='2'><doc1 attr1='1' attr2='a2'>text1<child>text2</child></doc1></doc2>")
+ var n =doc1.importNode(doc2.documentElement, true)
+ doc1.documentElement.appendChild(n)
+ console.assert(doc1 == doc3+'')
+ console.assert(doc2 != doc3+'')
+ }
+}).run(); // Run it
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/element.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/element.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/element.js
new file mode 100644
index 0000000..72a4efe
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/element.js
@@ -0,0 +1,139 @@
+var wows = require('vows');
+var DOMParser = require('xmldom').DOMParser;
+var XMLSerializer = require('xmldom').XMLSerializer;
+// Create a Test Suite
+wows.describe('XML Namespace Parse').addBatch({
+ // See: http://jsfiddle.net/bigeasy/ShcXP/1/
+ "Document_getElementsByTagName":function () {
+ var doc = new DOMParser().parseFromString('<a><b/></a>');
+ console.assert(doc.getElementsByTagName('*').length == 2);
+ console.assert(doc.documentElement.getElementsByTagName('*').length == 1);
+ },
+ 'getElementsByTagName': function () {
+
+
+ var doc = new DOMParser().parseFromString('<xml xmlns="http://test.com" xmlns:t="http://test.com" xmlns:t2="http://test2.com">' +
+ '<t:test/><test/><t2:test/>'+
+ '<child attr="1"><test><child attr="2"/></test></child>' +
+ '<child attr="3"/></xml>','text/xml');
+ var childs = doc.documentElement.getElementsByTagName('child');
+ console.assert(childs.item(0).getAttribute('attr')=="1",childs.item(0)+'');
+ console.assert(childs.item(1).getAttribute('attr')=="2",childs.item(1)+'');
+ console.assert(childs.item(2).getAttribute('attr')=="3",childs.item(2)+'');
+ console.assert(childs.length==3,3,childs.length);
+
+ var childs = doc.getElementsByTagName('child');
+ console.assert(childs.item(0).getAttribute('attr')=="1",childs.item(0)+'');
+ console.assert(childs.item(1).getAttribute('attr')=="2",childs.item(1)+'');
+ console.assert(childs.item(2).getAttribute('attr')=="3",childs.item(2)+'');
+ console.assert(childs.length==3,3,childs.length);
+
+
+
+
+
+ var childs = doc.documentElement.getElementsByTagName('*');
+ for(var i=0,buf = [];i<childs.length;i++){
+ buf.push(childs[i].tagName)
+ }
+ console.assert(childs.length==7,childs.length,buf);
+
+
+
+
+ var feed = new DOMParser().parseFromString('<feed><entry>foo</entry></feed>');
+ var entries = feed.documentElement.getElementsByTagName('entry');
+ console.log(entries[0].nodeName);
+ console.log(feed.documentElement.childNodes.item(0).nodeName);
+ },
+ 'getElementsByTagNameNS': function () {
+ var doc = new DOMParser().parseFromString('<xml xmlns="http://test.com" xmlns:t="http://test.com" xmlns:t2="http://test2.com">' +
+ '<t:test/><test/><t2:test/>'+
+ '<child attr="1"><test><child attr="2"/></test></child>' +
+ '<child attr="3"/></xml>','text/xml');
+
+ var childs = doc.documentElement.getElementsByTagNameNS("http://test.com",'*');
+ console.assert(childs.length==6,childs.length);
+
+ var childs = doc.getElementsByTagNameNS("http://test.com",'*');
+ console.assert(childs.length==7,childs.length);
+
+
+ var childs = doc.documentElement.getElementsByTagNameNS("http://test.com",'test');
+ console.assert(childs.length==3,childs.length);
+
+ var childs = doc.getElementsByTagNameNS("http://test.com",'test');
+ console.assert(childs.length==3,childs.length);
+
+
+
+ },
+ 'getElementById': function () {
+ var doc = new DOMParser().parseFromString('<xml xmlns="http://test.com" id="root">' +
+ '<child id="a1" title="1"><child id="a2" title="2"/></child>' +
+ '<child id="a1" title="3"/></xml>','text/xml');
+ console.assert(doc.getElementById('root'))
+ console.assert(doc.getElementById('a1').getAttribute('title')=="1",doc.getElementById('a1'));
+ console.assert(doc.getElementById('a2').getAttribute('title')=="2",doc.getElementById('a2'));
+ console.assert(doc.getElementById('a2').getAttribute('title2')=="",doc.getElementById('a2'));
+ },
+ "append exist child":function(){
+ var doc = new DOMParser().parseFromString('<xml xmlns="http://test.com" id="root">' +
+ '<child1 id="a1" title="1"><child11 id="a2" title="2"/></child1>' +
+ '<child2 id="a1" title="3"/><child3 id="a1" title="3"/></xml>','text/xml');
+
+ var doc1 = doc;
+ var str1=new XMLSerializer().serializeToString(doc);
+ var doc2 = doc1.cloneNode(true);
+ var doc3 = doc1.cloneNode(true);
+ var doc4 = doc1.cloneNode(true);
+
+ doc3.documentElement.appendChild(doc3.documentElement.lastChild);
+ doc4.documentElement.appendChild(doc4.documentElement.firstChild);
+
+ var str2=new XMLSerializer().serializeToString(doc2);
+ var str3=new XMLSerializer().serializeToString(doc3);
+ var str4=new XMLSerializer().serializeToString(doc4);
+ console.assert(str1 == str2 && str2 == str3,str3,str1);
+ console.assert(str3 != str4 && str3.length == str4.length,str3);
+
+ },
+ "append exist other child":function(){
+ var doc = new DOMParser().parseFromString('<xml xmlns="http://test.com" id="root">' +
+ '<child1 id="a1" title="1"><child11 id="a2" title="2"><child/></child11></child1>' +
+ '<child2 id="a1" title="3"/><child3 id="a1" title="3"/></xml>','text/xml');
+
+ var doc1 = doc;
+ var str1=new XMLSerializer().serializeToString(doc);
+ var doc2 = doc1.cloneNode(true);
+
+ console.assert(doc2.documentElement.lastChild.childNodes.length == 0);
+ doc2.documentElement.appendChild(doc2.documentElement.firstChild.firstChild);
+
+ var str2=new XMLSerializer().serializeToString(doc2);
+
+ console.assert(doc2.documentElement.lastChild.childNodes.length == 1);
+ console.assert(str1 != str2 && str1.length != str2.length,str3);
+ var doc3 = new DOMParser().parseFromString(str2,'text/xml');
+ doc3.documentElement.firstChild.appendChild(doc3.documentElement.lastChild);
+ var str3 = new XMLSerializer().serializeToString(doc3);
+ console.assert(str1 == str3);
+ },
+ "set textContent":function() {
+ var doc = new DOMParser().parseFromString('<test><a/><b><c/></b></test>');
+ var a = doc.documentElement.firstChild;
+ var b = a.nextSibling;
+ a.textContent = 'hello';
+ console.assert(doc.documentElement.toString() == '<test><a>hello</a><b><c/></b></test>');
+ b.textContent = 'there';
+ console.assert(doc.documentElement.toString() == '<test><a>hello</a><b>there</b></test>');
+ b.textContent = '';
+ console.assert(doc.documentElement.toString() == '<test><a>hello</a><b/></test>');
+ doc.documentElement.textContent = 'bye';
+ console.assert(doc.documentElement.toString() == '<test>bye</test>');
+ },
+ "nested append failed":function(){
+ },
+ "self append failed":function(){
+ }
+}).run(); // Run it
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/fragment.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/fragment.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/fragment.js
new file mode 100644
index 0000000..3f72824
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/fragment.js
@@ -0,0 +1,15 @@
+var wows = require('vows');
+var DOMParser = require('xmldom').DOMParser;
+var XMLSerializer = require('xmldom').XMLSerializer;
+
+wows.describe('DOM DocumentFragment').addBatch({
+ // see: http://jsfiddle.net/9Wmh2/1/
+ "append empty fragment":function(){
+ var document = new DOMParser().parseFromString('<p id="p"/>');
+ var fragment = document.createDocumentFragment();
+ document.getElementById("p").insertBefore(fragment, null);
+ fragment.appendChild(document.createTextNode("a"));
+ document.getElementById("p").insertBefore(fragment, null);
+ console.assert(document.toString() == '<p id="p">a</p>', document.toString());
+ },
+}).run();
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/index.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/index.js
new file mode 100644
index 0000000..201a0b0
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/index.js
@@ -0,0 +1,5 @@
+require('./element');
+require('./level3');
+require('./clone');
+require('./attr');
+require('./serializer');
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/level3.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/level3.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/level3.js
new file mode 100644
index 0000000..b3810e2
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/level3.js
@@ -0,0 +1,8 @@
+var wows = require('vows');
+var DOMParser = require('xmldom').DOMParser;
+
+// Create a Test Suite
+wows.describe('XML Namespace Parse').addBatch({
+ "test":function(){}
+ //see namespace.js
+}).run(); // Run it
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/serializer.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/serializer.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/serializer.js
new file mode 100644
index 0000000..73d86ad
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/dom/serializer.js
@@ -0,0 +1,14 @@
+var wows = require('vows');
+var DOMParser = require('xmldom').DOMParser;
+
+wows.describe('XML Serializer').addBatch({
+ 'text node containing "]]>"': function() {
+ var doc = new DOMParser().parseFromString('<test/>', 'text/xml');
+ doc.documentElement.appendChild(doc.createTextNode('hello ]]> there'));
+ console.assert(doc.documentElement.firstChild.toString() == 'hello ]]> there',doc.documentElement.firstChild.toString());
+ },
+ '<script> element with no children': function() {
+ var doc = new DOMParser().parseFromString('<html><script></script></html>', 'text/html');
+ console.assert(doc.documentElement.firstChild.toString() == '<script></script>');
+ },
+}).run();
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/error.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/error.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/error.js
new file mode 100644
index 0000000..ec15a45
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/error.js
@@ -0,0 +1,71 @@
+var wows = require('vows');
+var DOMParser = require('xmldom').DOMParser;
+
+
+wows.describe('errorHandle').addBatch({
+ 'only function two args': function() {
+ var error = {}
+ var parser = new DOMParser({
+ errorHandler:function(key,msg){error[key] = msg}
+ });
+ try{
+ var doc = parser.parseFromString('<html disabled><1 1="2"/></body></html>', 'text/xml');
+ console.assert(error.warning!=null ,'error.error:'+error.warning);
+ console.assert(error.error!=null ,'error.error:'+error.error);
+ console.assert(error.fatalError!=null ,'error.error:'+error.fatalError);
+ //console.log(doc+'')
+ }catch(e){
+ }
+ },
+ 'only function': function() {
+ var error = []
+ var parser = new DOMParser({
+ errorHandler:function(msg){error.push(msg)}
+ });
+ try{
+ var doc = parser.parseFromString('<html disabled><1 1="2"/></body></html>', 'text/xml');
+ error.map(function(e){error[e.replace(/\:[\s\S]*/,'')]=e})
+ console.assert(error.warning!=null ,'error.error:'+error.warning);
+ console.assert(error.error!=null ,'error.error:'+error.error);
+ console.assert(error.fatalError!=null ,'error.error:'+error.fatalError);
+ //console.log(doc+'')
+ }catch(e){
+ }
+ },
+ 'only function': function() {
+ var error = []
+ var errorMap = []
+ new DOMParser({
+ errorHandler:function(msg){error.push(msg)}
+ }).parseFromString('<html><body title="1<2">test</body></html>', 'text/xml');
+ 'warn,warning,error,fatalError'.replace(/\w+/g,function(k){
+ var errorHandler = {};
+ errorMap[k] = [];
+ errorHandler[k] = function(msg){errorMap[k] .push(msg)}
+ new DOMParser({errorHandler:errorHandler}).parseFromString('<html><body title="1<2">test</body></html>', 'text/xml');
+ });
+ for(var n in errorMap){
+ console.assert(error.length == errorMap[n].length)
+ }
+ },
+ 'error function': function() {
+ var error = []
+ var parser = new DOMParser({
+ locator:{},
+ errorHandler:{
+ error:function(msg){
+ error.push(msg);
+ throw new Error(msg)
+ }
+ }
+ });
+ try{
+ var doc = parser.parseFromString('<html><body title="1<2"><table><;test</body></body></html>', 'text/html');
+ }catch(e){
+ console.log(e);
+ console.assert(/\n@#\[line\:\d+,col\:\d+\]/.test(error.join(' ')),'line,col must record:'+error)
+ return;
+ }
+ console.assert(false,doc+' should be null');
+ }
+}).run();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/html/normalize.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/html/normalize.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/html/normalize.js
new file mode 100644
index 0000000..b855bad
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/html/normalize.js
@@ -0,0 +1,89 @@
+var wows = require('vows');
+var assert = require('assert');
+var DOMParser = require('xmldom').DOMParser;
+var XMLSerializer = require('xmldom').XMLSerializer;
+var parser = new DOMParser();
+// Create a Test Suite
+wows.describe('html normalizer').addBatch({
+ 'text & <': function () {
+ var dom = new DOMParser().parseFromString('<div>&<123&456<789;&&</div>','text/html');
+ console.assert(dom == '<div>&<123&456<789;&&</div>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<div><123e>&<a<br/></div>','text/html');
+ console.assert(dom == '<div><123e>&<a<br/></div>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<div> © ©</div>','text/html');
+ console.assert(dom == '<div>\u00a0\u00a9&nbsp&copy</div>',dom+'')
+
+
+ var dom = new DOMParser().parseFromString('<html xmlns:x="1"><body/></html>','text/html');
+ console.assert(dom == '<html xmlns:x="1"><body></body></html>',dom+'')
+ },
+ 'attr': function () {
+ var dom = new DOMParser().parseFromString('<html test="a<b && a>b && \'&&&\'"/>','text/html');
+ console.assert(dom == '<html test="a<b && a>b && \'&&&\'"></html>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<div test="alert(\'<br/>\')"/>','text/html');
+ console.assert(dom == '<div test="alert(\'<br/>\')"></div>',dom+'')
+ var dom = new DOMParser().parseFromString('<div test="a<b&&a< c && a>d"></div>','text/html');
+ console.assert(dom == '<div test="a<b&&a< c && a>d"></div>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<div a=& bb c d=123&&456/>','text/html');
+ console.assert(dom == '<div a="&" bb="bb" c="c" d="123&&456"></div>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<div a=& a="&\'\'" b/>','text/html');
+ console.assert(dom == '<div a="&\'\'" b="b"></div>',dom+'')
+ },
+ 'attrQute': function () {
+ var dom = new DOMParser().parseFromString('<html test="123"/>','text/html');
+ console.assert(dom == '<html test="123"></html>',dom+'')
+
+// var dom = new DOMParser().parseFromString('<r><Label onClick="doClick..>Hello, World</Label></r>','text/html');
+// console.assert(dom == '<r><Label onClick="doClick..">Hello, World</Label></r>',dom+'!!')
+//
+ var dom = new DOMParser().parseFromString('<Label onClick=doClick..">Hello, World</Label>','text/html');
+ console.assert(dom == '<Label onClick="doClick..">Hello, World</Label>',dom+'')
+ },
+ "unclosed":function(){
+ var dom = new DOMParser().parseFromString('<html><meta><link><img><br><hr><input></html>','text/html');
+ console.assert(dom == '<html><meta/><link/><img/><br/><hr/><input/></html>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<html title =1/2></html>','text/html');
+ console.assert(dom == '<html title="1/2"></html>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<html title= 1/>','text/html');
+ console.assert(dom == '<html title="1"></html>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<html title = 1/>','text/html');
+ console.assert(dom == '<html title="1"></html>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<html title/>','text/html');
+ console.assert(dom == '<html title="title"></html>',dom+'')
+
+
+
+ var dom = new DOMParser().parseFromString('<html><meta><link><img><br><hr><input></html>','text/html');
+ console.assert(dom == '<html><meta/><link/><img/><br/><hr/><input/></html>',dom+'')
+
+
+ },
+ 'script': function () {
+ var dom = new DOMParser().parseFromString('<script>alert(a<b&&c?"<br>":">>");</script>','text/html');
+ console.assert(dom == '<script>alert(a<b&&c?"<br>":">>");</script>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<script>alert(a<b&&c?"<br>":">>");</script>','text/xml');
+ console.assert(dom == '<script>alert(a<b&&c?"<br/>":">>");</script>',dom+'')
+
+ var dom = new DOMParser().parseFromString('<script>alert(a<b&&c?"<br/>":">>");</script>','text/html');
+ console.assert(dom == '<script>alert(a<b&&c?"<br/>":">>");</script>',dom+'')
+
+ },
+ 'textarea': function () {
+ var dom = new DOMParser().parseFromString('<textarea>alert(a<b&&c?"<br>":">>");</textarea>','text/html');
+ console.assert(dom == '<textarea>alert(a<b&&c?"<br>":">>");</textarea>',dom+'')
+
+
+ var dom = new DOMParser().parseFromString('<textarea>alert(a<b&&c?"<br>":">>");</textarea>','text/xml');
+ console.assert(dom == '<textarea>alert(a<b&&c?"<br/>":">>");</textarea>',dom+'')
+ }
+}).run();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/index.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/index.js
new file mode 100644
index 0000000..4b7703f
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/index.js
@@ -0,0 +1,63 @@
+var XMLSerializer = require('xmldom').XMLSerializer;
+var DOMParser = require('xmldom').DOMParser;
+try{
+ var libxml = require('libxmljs');
+}catch(e){
+ var DomJS = require("dom-js");
+}
+
+var assert = require('assert');
+var oldParser = DOMParser.prototype.parseFromString ;
+function format(s){
+ if(libxml){
+ var result = libxml.parseXmlString(s).toString().replace(/^\s+|\s+$/g,'');
+ //console.log(result.charCodeAt().toString(16),result)
+ }else{
+ var domjs = new DomJS.DomJS();
+ domjs.parse(s, function(err, dom) {
+ result = dom.toXml();
+ });
+ }
+ return result;
+}
+function check(data,doc){
+ var domjsresult = format(data);
+ var xmldomresult = new XMLSerializer().serializeToString(doc);
+ var xmldomresult2 = new XMLSerializer().serializeToString(doc.cloneNode(true));
+ assert.equal(xmldomresult,xmldomresult2);
+ xmldomresult = xmldomresult.replace(/^<\?.*?\?>\s*|<!\[CDATA\[\]\]>/g,'')
+ domjsresult = domjsresult.replace(/^<\?.*?\?>\s*|<!\[CDATA\[\]\]>/g,'')
+ //console.log('['+xmldomresult+'],['+domjsresult+']')
+ if(xmldomresult!=domjsresult){
+ assert.equal(format(xmldomresult),domjsresult);
+ }
+
+}
+DOMParser.prototype.parseFromString = function(data,mimeType){
+ var doc = oldParser.apply(this,arguments);
+ function ck(){
+ if(!/\/x?html?\b/.test(mimeType)){
+ try{
+ check(data,doc);
+ }catch(e){console.dir(e)}
+ }
+ }
+ if(this.options.checkLater){
+ setTimeout(ck,1);
+ }else{ck()}
+ return doc;
+}
+function include(){
+ for(var i=0;i<arguments.length;i++){
+ var file = arguments[i]
+ console.log('test ',file);
+ require(file);
+ }
+}
+include('./dom','./parse-element','./node','./namespace','./html/normalize'
+ ,'./error','./locator'
+ ,'./big-file-performance'
+ )
+
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/locator.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/locator.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/locator.js
new file mode 100644
index 0000000..912520a
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/locator.js
@@ -0,0 +1,50 @@
+var wows = require('vows');
+var DOMParser = require('xmldom').DOMParser;
+
+function assertPosition(n, line, col) {
+ console.assert(n.lineNumber == line,'lineNumber:'+n.lineNumber+'/'+line);
+ console.assert(n.columnNumber == col,'columnNumber:'+n.columnNumber+'/'+col);
+}
+
+wows.describe('DOMLocator').addBatch({
+ 'node positions': function() {
+ var parser = new DOMParser({locator:{}});
+ var doc = parser.parseFromString('<?xml version="1.0"?><!-- aaa -->\n<test>\n <a attr="value"><![CDATA[1]]>something\n</a>x</test>', 'text/xml');
+ var test = doc.documentElement;
+ var a = test.firstChild.nextSibling;
+ assertPosition(doc.firstChild, 1, 1);
+ assertPosition(doc.firstChild.nextSibling, 1, 1+'<?xml version="1.0"?>'.length);
+ assertPosition(test, 2, 1);
+ //assertPosition(test.firstChild, 1, 7);
+ assertPosition(a, 3, 3);
+ assertPosition(a.firstChild, 3, 19);
+ assertPosition(a.firstChild.nextSibling, 3, 19+'<![CDATA[1]]>'.length);
+ assertPosition(test.lastChild, 4, 5);
+ },
+ 'error positions':function(){
+ var error = []
+ var parser = new DOMParser({
+ locator:{systemId:'c:/test/1.xml'},
+ errorHandler:function(msg){
+ error.push(msg);
+ }
+ });
+ var doc = parser.parseFromString('<html><body title="1<2"><table><;test</body></body></html>', 'text/html');
+ console.assert(/\n@c\:\/test\/1\.xml#\[line\:\d+,col\:\d+\]/.test(error.join(' ')),'line,col must record:'+error)
+ },
+ 'error positions p':function(){
+ var error = []
+ var parser = new DOMParser({
+ locator:{},
+ errorHandler:function(msg){
+ error.push(msg);
+ }
+ });
+ var doc = parser.parseFromString('<root>\n\t<err</root>', 'text/html');
+ var root = doc.documentElement;
+ var textNode = root.firstChild;
+ console.log(root+'/'+textNode)
+ console.assert(/\n@#\[line\:2,col\:2\]/.test(error.join(' ')),'line,col must record:'+error);
+ console.log(textNode.lineNumber+'/'+textNode.columnNumber)
+ }
+}).run();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/namespace.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/namespace.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/namespace.js
new file mode 100644
index 0000000..a06248c
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/namespace.js
@@ -0,0 +1,32 @@
+var wows = require('vows');
+var DOMParser = require('xmldom').DOMParser;
+
+// Create a Test Suite
+wows.describe('XML Namespace Parse').addBatch({
+ 'default namespace': function () {
+ var dom = new DOMParser().parseFromString('<xml xmlns="http://test.com"><child attr="1"/></xml>','text/xml');
+ var root = dom.documentElement;
+ console.assert(root.namespaceURI=='http://test.com')
+ console.assert(root.lookupNamespaceURI('') == 'http://test.com')
+ console.assert(root.firstChild.namespaceURI=='http://test.com')
+ console.assert(root.firstChild.lookupNamespaceURI('') == 'http://test.com')
+ console.assert(root.firstChild.getAttributeNode('attr').namespaceURI==null)
+ },
+ 'prefix namespace': function () {
+ var dom = new DOMParser().parseFromString('<xml xmlns:p1="http://p1.com" xmlns:p2="http://p2.com"><p1:child a="1" p1:attr="1" b="2"/><p2:child/></xml>','text/xml');
+ var root = dom.documentElement;
+ console.assert(root.firstChild.namespaceURI == 'http://p1.com')
+ console.assert(root.lookupNamespaceURI('p1') == 'http://p1.com')
+ console.assert(root.firstChild.getAttributeNode('attr') == null)
+ console.assert(root.firstChild.getAttributeNode('p1:attr').namespaceURI == 'http://p1.com')
+ console.assert(root.firstChild.nextSibling.namespaceURI == 'http://p2.com')
+ console.assert(root.firstChild.nextSibling.lookupNamespaceURI('p2') == 'http://p2.com')
+ },
+ 'after prefix namespace': function () {
+ var dom = new DOMParser().parseFromString('<xml xmlns:p="http://test.com"><p:child xmlns:p="http://p.com"/><p:child/></xml>','text/xml');
+ var root = dom.documentElement;
+ console.assert(root.firstChild.namespaceURI=='http://p.com')
+ console.assert(root.lastChild.namespaceURI=='http://test.com')
+ console.assert(root.firstChild.nextSibling.lookupNamespaceURI('p') == 'http://test.com')
+ }
+}).run(); // Run it
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/node.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/node.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/node.js
new file mode 100644
index 0000000..6527eee
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/node.js
@@ -0,0 +1,102 @@
+var wows = require('vows');
+var assert = require('assert');
+var DOMParser = require('xmldom').DOMParser;
+var XMLSerializer = require('xmldom').XMLSerializer;
+var parser = new DOMParser();
+// Create a Test Suite
+wows.describe('XML Node Parse').addBatch({
+ 'element': function () {
+ var dom = new DOMParser().parseFromString('<xml><child/></xml>');
+ console.assert (dom.childNodes.length== 1,dom.childNodes.length, 1);
+ console.assert (dom.documentElement.childNodes.length== 1);
+ console.assert (dom.documentElement.tagName== 'xml');
+ console.assert (dom.documentElement.firstChild.tagName== 'child');
+ },
+ 'text':function(){
+ var dom = new DOMParser().parseFromString('<xml>start center end</xml>');
+ var root = dom.documentElement;
+ console.assert( root.firstChild.data =='start center end');
+ console.assert( root.firstChild.nextSibling ==null);
+ },
+ 'cdata': function () {
+ var dom = new DOMParser().parseFromString('<xml>start <![CDATA[<encoded>]]> end<![CDATA[[[[[[[[[]]]]]]]]]]></xml>');
+ var root = dom.documentElement;
+ console.assert ( root.firstChild.data =='start ');
+ console.assert ( root.firstChild.nextSibling.data =='<encoded>');
+ console.assert ( root.firstChild.nextSibling.nextSibling.nextSibling.data =='[[[[[[[[]]]]]]]]');
+ },
+ 'cdata empty': function () {
+ var dom = new DOMParser().parseFromString('<xml><![CDATA[]]>start <![CDATA[]]> end</xml>');
+ var root = dom.documentElement;
+ console.assert ( root.textContent =='start end');
+ },
+ 'comment': function(){
+ var dom = new DOMParser().parseFromString('<xml><!-- comment&>< --></xml>');
+ var root = dom.documentElement;
+ console.assert ( root.firstChild.nodeValue ==' comment&>< ');
+ },
+ 'cdata comment': function(){
+ var dom = new DOMParser().parseFromString('<xml>start <![CDATA[<encoded>]]> <!-- comment -->end</xml>');
+ var root = dom.documentElement;
+ console.assert ( root.firstChild.nodeValue =='start ');
+ console.assert ( root.firstChild.nextSibling.nodeValue =='<encoded>');
+ console.assert ( root.firstChild.nextSibling.nextSibling.nextSibling.nodeValue ==' comment ');
+ console.assert ( root.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nodeValue =='end');
+ },
+ 'append node': function () {
+ var dom = new DOMParser().parseFromString('<xml/>');
+ var child = dom.createElement("child");
+ console.assert ( child == dom.documentElement.appendChild(child));
+ console.assert ( child == dom.documentElement.firstChild);
+ var fragment = new dom.createDocumentFragment();
+ console.assert ( child == fragment.appendChild(child));
+ },
+ 'insert node': function () {
+ var dom = new DOMParser().parseFromString('<xml><child/></xml>');
+ var node = dom.createElement("sibling");
+ var child = dom.documentElement.firstChild;
+ child.parentNode.insertBefore(node, child);
+ console.assert ( node == child.previousSibling);
+ console.assert ( node.nextSibling == child);
+ console.assert ( node.parentNode == child.parentNode);
+ },
+ 'insert fragment': function () {
+ var dom = new DOMParser().parseFromString('<xml><child/></xml>');
+ var fragment = dom.createDocumentFragment();
+ assert(fragment.nodeType === 11);
+ var first = fragment.appendChild(dom.createElement("first"));
+ var last = fragment.appendChild(dom.createElement("last"));
+ console.assert ( fragment.firstChild == first);
+ console.assert ( fragment.lastChild == last);
+ console.assert ( last.previousSibling == first);
+ console.assert ( first.nextSibling == last);
+ var child = dom.documentElement.firstChild;
+ child.parentNode.insertBefore(fragment, child);
+ console.assert ( last.previousSibling == first);
+ console.assert ( first.nextSibling == last);
+ console.assert ( child.parentNode.firstChild == first);
+ console.assert ( last == child.previousSibling);
+ console.assert ( last.nextSibling == child);
+ console.assert ( first.parentNode == child.parentNode);
+ console.assert ( last.parentNode == child.parentNode);
+ }
+}).addBatch({
+ "instruction":function(){
+ var source = '<?xml version="1.0"?><root><child>&<!-- & --></child></root>';
+ var doc = new DOMParser().parseFromString(source,"text/xml");
+ var source2 = new XMLSerializer().serializeToString(doc);
+ console.assert(source == source2,source2);
+ }
+}).run(); // Run it
+//var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
+//var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
+//var TEXT_NODE = NodeType.TEXT_NODE = 3;
+//var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
+//var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
+//var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
+//var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
+//var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
+//var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
+//var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
+//var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
+//var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/parse-element.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/parse-element.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/parse-element.js
new file mode 100644
index 0000000..53b8395
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/parse-element.js
@@ -0,0 +1,31 @@
+var wows = require('vows');
+var assert = require('assert');
+var DOMParser = require('xmldom').DOMParser;
+var XMLSerializer = require('xmldom').XMLSerializer;
+var parser = new DOMParser();
+// Create a Test Suite
+wows.describe('XML Node Parse').addBatch({
+ 'noAttribute': function () {
+ var dom = new DOMParser().parseFromString('<xml ></xml>','text/xml');
+ var dom = new DOMParser().parseFromString('<xml></xml>','text/xml');
+ var dom = new DOMParser().parseFromString('<xml />','text/xml');
+ var dom = new DOMParser().parseFromString('<xml/>','text/xml');
+ var dom = new DOMParser().parseFromString('<xml/>','text/xml');
+ },
+ 'simpleAttribute': function () {
+ var dom = new DOMParser().parseFromString('<xml a="1" b="2"></xml>','text/xml');
+ var dom = new DOMParser().parseFromString('<xml a="1" b="2" ></xml>','text/xml');
+ var dom = new DOMParser().parseFromString('<xml a="1" b=\'\'></xml>','text/xml');
+ var dom = new DOMParser().parseFromString('<xml a="1" b=\'\' ></xml>','text/xml');
+ var dom = new DOMParser().parseFromString('<xml a="1" b="2/">','text/xml');
+ var dom = new DOMParser().parseFromString('<xml a="1" b="2" />','text/xml');
+ var dom = new DOMParser().parseFromString('<xml a="1" b=\'\'/>','text/xml');
+ var dom = new DOMParser().parseFromString('<xml a="1" b=\'\' />','text/xml');
+ },
+ 'nsAttribute': function () {
+ var dom = new DOMParser().parseFromString('<xml xmlns="1" xmlns:a="2" a:test="3"></xml>','text/xml');
+ var dom = new DOMParser().parseFromString('<xml xmlns="1" xmlns:a="2" a:test="3" ></xml>','text/xml');
+ var dom = new DOMParser().parseFromString('<xml xmlns="1" xmlns:a="2" a:test="3/">','text/xml');
+ var dom = new DOMParser().parseFromString('<xml xmlns="1" xmlns:a="2" a:test="3" />','text/xml');
+ }
+}).run();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/simple.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/simple.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/simple.js
new file mode 100644
index 0000000..4a398be
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/simple.js
@@ -0,0 +1,11 @@
+var wows = require('vows');
+var DOMParser = require('xmldom').DOMParser;
+
+
+wows.describe('errorHandle').addBatch({
+ 'simple': function() {
+ var parser = new DOMParser();
+ var doc = parser.parseFromString('<html><body title="1<2"></body></html>', 'text/html');
+ console.log(doc+'');
+ }
+}).run();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/test.js b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/test.js
new file mode 100644
index 0000000..a8aa97f
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/node_modules/xmldom/test/test.js
@@ -0,0 +1,24 @@
+var wows = require('vows');
+var assert = require('assert');
+var DOMParser = require('xmldom').DOMParser;
+var XMLSerializer = require('xmldom').XMLSerializer;
+
+
+var doc = new DOMParser().parseFromString('<xml xmlns="http://test.com" id="root">' +
+ '<child1 id="a1" title="1"><child11 id="a2" title="2"/></child1>' +
+ '<child2 id="a1" title="3"/><child3 id="a1" title="3"/></xml>','text/xml');
+
+var doc1 = doc;
+var str1=new XMLSerializer().serializeToString(doc);
+var doc2 = doc1.cloneNode(true);
+var doc3 = doc1.cloneNode(true);
+var doc4 = doc1.cloneNode(true);
+
+doc3.documentElement.appendChild(doc3.documentElement.lastChild);
+//doc4.documentElement.appendChild(doc4.documentElement.firstChild);
+
+var str2=new XMLSerializer().serializeToString(doc2);
+var str3=new XMLSerializer().serializeToString(doc3);
+var str4=new XMLSerializer().serializeToString(doc4);
+console.assert(str1 == str3,str3,str1);
+//console.assert(str3 != str4 && str3.length == str4.length,str3);
[21/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/env.rhino.1.2.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/env.rhino.1.2.js b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/env.rhino.1.2.js
new file mode 100644
index 0000000..8da1c07
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/env.rhino.1.2.js
@@ -0,0 +1,13989 @@
+/*
+ * Envjs core-env.1.2.13
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+var Envjs = function(){
+ var i,
+ name,
+ override = function(){
+ for(i=0;i<arguments.length;i++){
+ for ( name in arguments[i] ) {
+ var g = arguments[i].__lookupGetter__(name),
+ s = arguments[i].__lookupSetter__(name);
+ if ( g || s ) {
+ if ( g ) { Envjs.__defineGetter__(name, g); }
+ if ( s ) { Envjs.__defineSetter__(name, s); }
+ } else {
+ Envjs[name] = arguments[i][name];
+ }
+ }
+ }
+ };
+ if(arguments.length === 1 && typeof(arguments[0]) == 'string'){
+ window.location = arguments[0];
+ }else if (arguments.length === 1 && typeof(arguments[0]) == "object"){
+ override(arguments[0]);
+ }else if(arguments.length === 2 && typeof(arguments[0]) == 'string'){
+ override(arguments[1]);
+ window.location = arguments[0];
+ }
+ return;
+},
+__this__ = this;
+
+//eg "Mozilla"
+Envjs.appCodeName = "Envjs";
+
+//eg "Gecko/20070309 Firefox/2.0.0.3"
+Envjs.appName = "Resig/20070309 PilotFish/1.2.13";
+
+Envjs.version = "1.6";//?
+Envjs.revision = '';
+/*
+ * Envjs core-env.1.2.13
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+ for ( var i in b ) {
+ var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+ if ( g || s ) {
+ if ( g ) { a.__defineGetter__(i, g); }
+ if ( s ) { a.__defineSetter__(i, s); }
+ } else {
+ a[i] = b[i];
+ }
+ } return a;
+}
+
+/**
+ * Writes message to system out
+ * @param {String} message
+ */
+Envjs.log = function(message){};
+
+/**
+ * Constants providing enumerated levels for logging in modules
+ */
+Envjs.DEBUG = 1;
+Envjs.INFO = 2;
+Envjs.WARN = 3;
+Envjs.ERROR = 3;
+Envjs.NONE = 3;
+
+/**
+ * Writes error info out to console
+ * @param {Error} e
+ */
+Envjs.lineSource = function(e){};
+
+
+/**
+ * TODO: used in ./event/eventtarget.js
+ * @param {Object} event
+ */
+Envjs.defaultEventBehaviors = {};
+
+
+/**
+ * describes which script src values will trigger Envjs to load
+ * the script like a browser would
+ */
+Envjs.scriptTypes = {
+ "text/javascript" :false,
+ "text/envjs" :true
+};
+
+/**
+ * will be called when loading a script throws an error
+ * @param {Object} script
+ * @param {Object} e
+ */
+Envjs.onScriptLoadError = function(script, e){
+ console.log('error loading script %s %s', script, e);
+};
+
+
+/**
+ * load and execute script tag text content
+ * @param {Object} script
+ */
+Envjs.loadInlineScript = function(script){
+ var tmpFile;
+ tmpFile = Envjs.writeToTempFile(script.text, 'js') ;
+ load(tmpFile);
+};
+
+/**
+ * Should evaluate script in some context
+ * @param {Object} context
+ * @param {Object} source
+ * @param {Object} name
+ */
+Envjs.eval = function(context, source, name){};
+
+
+/**
+ * Executes a script tag
+ * @param {Object} script
+ * @param {Object} parser
+ */
+Envjs.loadLocalScript = function(script){
+ //console.log("loading script %s", script);
+ var types,
+ src,
+ i,
+ base,
+ filename,
+ xhr;
+
+ if(script.type){
+ types = script.type.split(";");
+ for(i=0;i<types.length;i++){
+ if(Envjs.scriptTypes[types[i]]){
+ //ok this script type is allowed
+ break;
+ }
+ if(i+1 == types.length){
+ //console.log('wont load script type %s', script.type);
+ return false;
+ }
+ }
+ }
+
+ try{
+ //console.log('handling inline scripts');
+ if(!script.src.length){
+ Envjs.loadInlineScript(script);
+ return true;
+ }
+ }catch(e){
+ //Envjs.error("Error loading script.", e);
+ Envjs.onScriptLoadError(script, e);
+ return false;
+ }
+
+
+ //console.log("loading allowed external script %s", script.src);
+
+ //lets you register a function to execute
+ //before the script is loaded
+ if(Envjs.beforeScriptLoad){
+ for(src in Envjs.beforeScriptLoad){
+ if(script.src.match(src)){
+ Envjs.beforeScriptLoad[src](script);
+ }
+ }
+ }
+ base = "" + script.ownerDocument.location;
+ //filename = Envjs.uri(script.src.match(/([^\?#]*)/)[1], base );
+ //console.log('loading script from base %s', base);
+ filename = Envjs.uri(script.src, base);
+ try {
+ xhr = new XMLHttpRequest();
+ xhr.open("GET", filename, false/*syncronous*/);
+ //console.log("loading external script %s", filename);
+ xhr.onreadystatechange = function(){
+ //console.log("readyState %s", xhr.readyState);
+ if(xhr.readyState === 4){
+ Envjs.eval(
+ script.ownerDocument.ownerWindow,
+ xhr.responseText,
+ filename
+ );
+ }
+ };
+ xhr.send(null, false);
+ } catch(e) {
+ console.log("could not load script %s \n %s", filename, e );
+ Envjs.onScriptLoadError(script, e);
+ return false;
+ }
+ //lets you register a function to execute
+ //after the script is loaded
+ if(Envjs.afterScriptLoad){
+ for(src in Envjs.afterScriptLoad){
+ if(script.src.match(src)){
+ Envjs.afterScriptLoad[src](script);
+ }
+ }
+ }
+ return true;
+};
+
+
+/**
+ * An 'image' was requested by the document.
+ *
+ * - During inital parse of a <link>
+ * - Via an innerHTML parse of a <link>
+ * - A modificiation of the 'src' attribute of an Image/HTMLImageElement
+ *
+ * NOTE: this is optional API. If this doesn't exist then the default
+ * 'loaded' event occurs.
+ *
+ * @param node {Object} the <img> node
+ * @param node the src value
+ * @return 'true' to indicate the 'load' succeed, false otherwise
+ */
+Envjs.loadImage = function(node, src) {
+ return true;
+};
+
+
+/**
+ * A 'link' was requested by the document. Typically this occurs when:
+ * - During inital parse of a <link>
+ * - Via an innerHTML parse of a <link>
+ * - A modificiation of the 'href' attribute on a <link> node in the tree
+ *
+ * @param node {Object} is the link node in question
+ * @param href {String} is the href.
+ *
+ * Return 'true' to indicate that the 'load' was successful, or false
+ * otherwise. The appropriate event is then triggered.
+ *
+ * NOTE: this is optional API. If this doesn't exist then the default
+ * 'loaded' event occurs
+ */
+Envjs.loadLink = function(node, href) {
+ return true;
+};
+
+(function(){
+
+
+/*
+ * cookie handling
+ * Private internal helper class used to save/retreive cookies
+ */
+
+/**
+ * Specifies the location of the cookie file
+ */
+Envjs.cookieFile = function(){
+ return 'file://'+Envjs.homedir+'/.cookies';
+};
+
+/**
+ * saves cookies to a local file
+ * @param {Object} htmldoc
+ */
+Envjs.saveCookies = function(){
+ var cookiejson = JSON.stringify(Envjs.cookies.peristent,null,'\t');
+ //console.log('persisting cookies %s', cookiejson);
+ Envjs.writeToFile(cookiejson, Envjs.cookieFile());
+};
+
+/**
+ * loads cookies from a local file
+ * @param {Object} htmldoc
+ */
+Envjs.loadCookies = function(){
+ var cookiejson,
+ js;
+ try{
+ cookiejson = Envjs.readFromFile(Envjs.cookieFile())
+ js = JSON.parse(cookiejson, null, '\t');
+ }catch(e){
+ //console.log('failed to load cookies %s', e);
+ js = {};
+ }
+ return js;
+};
+
+Envjs.cookies = {
+ persistent:{
+ //domain - key on domain name {
+ //path - key on path {
+ //name - key on name {
+ //value : cookie value
+ //other cookie properties
+ //}
+ //}
+ //}
+ //expire - provides a timestamp for expiring the cookie
+ //cookie - the cookie!
+ },
+ temporary:{//transient is a reserved word :(
+ //like above
+ }
+};
+
+var __cookies__;
+
+//HTMLDocument cookie
+Envjs.setCookie = function(url, cookie){
+ var i,
+ index,
+ name,
+ value,
+ properties = {},
+ attr,
+ attrs;
+ url = Envjs.urlsplit(url);
+ if(cookie)
+ attrs = cookie.split(";");
+ else
+ return;
+
+ //for now the strategy is to simply create a json object
+ //and post it to a file in the .cookies.js file. I hate parsing
+ //dates so I decided not to implement support for 'expires'
+ //(which is deprecated) and instead focus on the easier 'max-age'
+ //(which succeeds 'expires')
+ cookie = {};//keyword properties of the cookie
+ cookie['domain'] = url.hostname;
+ cookie['path'] = url.path||'/';
+ for(i=0;i<attrs.length;i++){
+ index = attrs[i].indexOf("=");
+ if(index > -1){
+ name = __trim__(attrs[i].slice(0,index));
+ value = __trim__(attrs[i].slice(index+1));
+ if(name=='max-age'){
+ //we'll have to when to check these
+ //and garbage collect expired cookies
+ cookie[name] = parseInt(value, 10);
+ } else if( name == 'domain' ){
+ if(__domainValid__(url, value)){
+ cookie['domain'] = value;
+ }
+ } else if( name == 'path' ){
+ //not sure of any special logic for path
+ cookie['path'] = value;
+ } else {
+ //its not a cookie keyword so store it in our array of properties
+ //and we'll serialize individually in a moment
+ properties[name] = value;
+ }
+ }else{
+ if( attrs[i] == 'secure' ){
+ cookie[attrs[i]] = true;
+ }
+ }
+ }
+ if(!('max-age' in cookie)){
+ //it's a transient cookie so it only lasts as long as
+ //the window.location remains the same (ie in-memory cookie)
+ __mergeCookie__(Envjs.cookies.temporary, cookie, properties);
+ }else{
+ //the cookie is persistent
+ __mergeCookie__(Envjs.cookies.persistent, cookie, properties);
+ Envjs.saveCookies();
+ }
+};
+
+function __domainValid__(url, value){
+ var i,
+ domainParts = url.hostname.split('.').reverse(),
+ newDomainParts = value.split('.').reverse();
+ if(newDomainParts.length > 1){
+ for(i=0;i<newDomainParts.length;i++){
+ if(!(newDomainParts[i] == domainParts[i])){
+ return false;
+ }
+ }
+ return true;
+ }
+ return false;
+};
+
+Envjs.getCookies = function(url){
+ //The cookies that are returned must belong to the same domain
+ //and be at or below the current window.location.path. Also
+ //we must check to see if the cookie was set to 'secure' in which
+ //case we must check our current location.protocol to make sure it's
+ //https:
+ var persisted;
+ url = Envjs.urlsplit(url);
+ if(!__cookies__){
+ try{
+ __cookies__ = true;
+ try{
+ persisted = Envjs.loadCookies();
+ }catch(e){
+ //fail gracefully
+ //console.log('%s', e);
+ }
+ if(persisted){
+ __extend__(Envjs.cookies.persistent, persisted);
+ }
+ //console.log('set cookies for doc %s', doc.baseURI);
+ }catch(e){
+ console.log('cookies not loaded %s', e)
+ };
+ }
+ var temporary = __cookieString__(Envjs.cookies.temporary, url),
+ persistent = __cookieString__(Envjs.cookies.persistent, url);
+ //console.log('temporary cookies: %s', temporary);
+ //console.log('persistent cookies: %s', persistent);
+ return temporary + persistent;
+};
+
+function __cookieString__(cookies, url) {
+ var cookieString = "",
+ domain,
+ path,
+ name,
+ i=0;
+ for (domain in cookies) {
+ // check if the cookie is in the current domain (if domain is set)
+ // console.log('cookie domain %s', domain);
+ if (domain == "" || domain == url.hostname) {
+ for (path in cookies[domain]) {
+ // console.log('cookie domain path %s', path);
+ // make sure path is at or below the window location path
+ if (path == "/" || url.path.indexOf(path) > -1) {
+ for (name in cookies[domain][path]) {
+ // console.log('cookie domain path name %s', name);
+ cookieString +=
+ ((i++ > 0)?'; ':'') +
+ name + "=" +
+ cookies[domain][path][name].value;
+ }
+ }
+ }
+ }
+ }
+ return cookieString;
+};
+
+function __mergeCookie__(target, cookie, properties){
+ var name, now;
+ if(!target[cookie.domain]){
+ target[cookie.domain] = {};
+ }
+ if(!target[cookie.domain][cookie.path]){
+ target[cookie.domain][cookie.path] = {};
+ }
+ for(name in properties){
+ now = new Date().getTime();
+ target[cookie.domain][cookie.path][name] = {
+ "value":properties[name],
+ "secure":cookie.secure,
+ "max-age":cookie['max-age'],
+ "date-created":now,
+ "expiration":(cookie['max-age']===0) ?
+ 0 :
+ now + cookie['max-age']
+ };
+ //console.log('cookie is %o',target[cookie.domain][cookie.path][name]);
+ }
+};
+
+})();//end cookies
+/*
+ http://www.JSON.org/json2.js
+ 2008-07-15
+
+ Public Domain.
+
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+ See http://www.JSON.org/js.html
+
+
+ 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.
+*/
+try{ JSON; }catch(e){
+JSON = function () {
+
+ function f(n) {
+ // Format integers to have at least two digits.
+ return n < 10 ? '0' + n : n;
+ }
+
+ Date.prototype.toJSON = function (key) {
+
+ return this.getUTCFullYear() + '-' +
+ f(this.getUTCMonth() + 1) + '-' +
+ f(this.getUTCDate()) + 'T' +
+ f(this.getUTCHours()) + ':' +
+ f(this.getUTCMinutes()) + ':' +
+ f(this.getUTCSeconds()) + 'Z';
+ };
+
+ String.prototype.toJSON = function (key) {
+ return String(this);
+ };
+ Number.prototype.toJSON =
+ Boolean.prototype.toJSON = function (key) {
+ return this.valueOf();
+ };
+
+ var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ escapeable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ gap,
+ indent,
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ },
+ rep;
+
+
+ function quote(string) {
+
+ escapeable.lastIndex = 0;
+ return escapeable.test(string) ?
+ '"' + string.replace(escapeable, function (a) {
+ var c = meta[a];
+ if (typeof c === 'string') {
+ return c;
+ }
+ return '\\u' + ('0000' +
+ (+(a.charCodeAt(0))).toString(16)).slice(-4);
+ }) + '"' :
+ '"' + string + '"';
+ }
+
+
+ function str(key, holder) {
+
+ var i, // The loop counter.
+ k, // The member key.
+ v, // The member value.
+ length,
+ mind = gap,
+ partial,
+ value = holder[key];
+
+ if (value && typeof value === 'object' &&
+ typeof value.toJSON === 'function') {
+ value = value.toJSON(key);
+ }
+ if (typeof rep === 'function') {
+ value = rep.call(holder, key, value);
+ }
+
+ switch (typeof value) {
+ case 'string':
+ return quote(value);
+
+ case 'number':
+ return isFinite(value) ? String(value) : 'null';
+
+ case 'boolean':
+ case 'null':
+
+ return String(value);
+
+ case 'object':
+
+ if (!value) {
+ return 'null';
+ }
+ gap += indent;
+ partial = [];
+
+ if (typeof value.length === 'number' &&
+ !(value.propertyIsEnumerable('length'))) {
+
+ length = value.length;
+ for (i = 0; i < length; i += 1) {
+ partial[i] = str(i, value) || 'null';
+ }
+
+ v = partial.length === 0 ? '[]' :
+ gap ? '[\n' + gap +
+ partial.join(',\n' + gap) + '\n' +
+ mind + ']' :
+ '[' + partial.join(',') + ']';
+ gap = mind;
+ return v;
+ }
+
+ if (rep && typeof rep === 'object') {
+ length = rep.length;
+ for (i = 0; i < length; i += 1) {
+ k = rep[i];
+ if (typeof k === 'string') {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ } else {
+
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = str(k, value);
+ if (v) {
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
+ }
+ }
+ }
+ }
+
+ v = partial.length === 0 ? '{}' :
+ gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
+ mind + '}' : '{' + partial.join(',') + '}';
+ gap = mind;
+ return v;
+ }
+ }
+
+ return {
+ stringify: function (value, replacer, space) {
+
+ var i;
+ gap = '';
+ indent = '';
+
+ if (typeof space === 'number') {
+ for (i = 0; i < space; i += 1) {
+ indent += ' ';
+ }
+
+ } else if (typeof space === 'string') {
+ indent = space;
+ }
+
+ rep = replacer;
+ if (replacer && typeof replacer !== 'function' &&
+ (typeof replacer !== 'object' ||
+ typeof replacer.length !== 'number')) {
+ throw new Error('JSON.stringify');
+ }
+
+ return str('', {'': value});
+ },
+
+
+ parse: function (text, reviver) {
+ var j;
+ function walk(holder, key) {
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }
+
+ cx.lastIndex = 0;
+ if (cx.test(text)) {
+ text = text.replace(cx, function (a) {
+ return '\\u' + ('0000' +
+ (+(a.charCodeAt(0))).toString(16)).slice(-4);
+ });
+ }
+
+
+ if (/^[\],:{}\s]*$/.
+test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
+replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
+replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+ j = eval('(' + text + ')');
+
+ return typeof reviver === 'function' ?
+ walk({'': j}, '') : j;
+ }
+
+ throw new SyntaxError('JSON.parse');
+ }
+ };
+}();
+
+}
+
+/**
+ * synchronizes thread modifications
+ * @param {Function} fn
+ */
+Envjs.sync = function(fn){};
+
+/**
+ * sleep thread for specified duration
+ * @param {Object} millseconds
+ */
+Envjs.sleep = function(millseconds){};
+
+/**
+ * Interval to wait on event loop when nothing is happening
+ */
+Envjs.WAIT_INTERVAL = 20;//milliseconds
+
+/*
+ * Copyright (c) 2010 Nick Galbreath
+ * http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript
+ *
+ * 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.
+ */
+
+/*
+ * url processing in the spirit of python's urlparse module
+ * see `pydoc urlparse` or
+ * http://docs.python.org/library/urlparse.html
+ *
+ * urlsplit: break apart a URL into components
+ * urlunsplit: reconsistute a URL from componets
+ * urljoin: join an absolute and another URL
+ * urldefrag: remove the fragment from a URL
+ *
+ * Take a look at the tests in urlparse-test.html
+ *
+ * On URL Normalization:
+ *
+ * urlsplit only does minor normalization the components Only scheme
+ * and hostname are lowercased urljoin does a bit more, normalizing
+ * paths with "." and "..".
+
+ * urlnormalize adds additional normalization
+ *
+ * * removes default port numbers
+ * http://abc.com:80/ -> http://abc.com/, etc
+ * * normalizes path
+ * http://abc.com -> http://abc.com/
+ * and other "." and ".." cleanups
+ * * if file, remove query and fragment
+ *
+ * It does not do:
+ * * normalizes escaped hex values
+ * http://abc.com/%7efoo -> http://abc.com/%7Efoo
+ * * normalize '+' <--> '%20'
+ *
+ * Differences with Python
+ *
+ * The javascript urlsplit returns a normal object with the following
+ * properties: scheme, netloc, hostname, port, path, query, fragment.
+ * All properties are read-write.
+ *
+ * In python, the resulting object is not a dict, but a specialized,
+ * read-only, and has alternative tuple interface (e.g. obj[0] ==
+ * obj.scheme). It's not clear why such a simple function requires
+ * a unique datastructure.
+ *
+ * urlunsplit in javascript takes an duck-typed object,
+ * { scheme: 'http', netloc: 'abc.com', ...}
+ * while in * python it takes a list-like object.
+ * ['http', 'abc.com'... ]
+ *
+ * For all functions, the javascript version use
+ * hostname+port if netloc is missing. In python
+ * hostname+port were always ignored.
+ *
+ * Similar functionality in different languages:
+ *
+ * http://php.net/manual/en/function.parse-url.php
+ * returns assocative array but cannot handle relative URL
+ *
+ * TODO: test allowfragments more
+ * TODO: test netloc missing, but hostname present
+ */
+
+var urlparse = {};
+
+// Unlike to be useful standalone
+//
+// NORMALIZE PATH with "../" and "./"
+// http://en.wikipedia.org/wiki/URL_normalization
+// http://tools.ietf.org/html/rfc3986#section-5.2.3
+//
+urlparse.normalizepath = function(path)
+{
+ if (!path || path === '/') {
+ return '/';
+ }
+
+ var parts = path.split('/');
+
+ var newparts = [];
+ // make sure path always starts with '/'
+ if (parts[0]) {
+ newparts.push('');
+ }
+
+ for (var i = 0; i < parts.length; ++i) {
+ if (parts[i] === '..') {
+ if (newparts.length > 1) {
+ newparts.pop();
+ } else {
+ newparts.push(parts[i]);
+ }
+ } else if (parts[i] != '.') {
+ newparts.push(parts[i]);
+ }
+ }
+
+ path = newparts.join('/');
+ if (!path) {
+ path = '/';
+ }
+ return path;
+};
+
+//
+// Does many of the normalizations that the stock
+// python urlsplit/urlunsplit/urljoin neglects
+//
+// Doesn't do hex-escape normalization on path or query
+// %7e -> %7E
+// Nor, '+' <--> %20 translation
+//
+urlparse.urlnormalize = function(url)
+{
+ var parts = urlparse.urlsplit(url);
+ switch (parts.scheme) {
+ case 'file':
+ // files can't have query strings
+ // and we don't bother with fragments
+ parts.query = '';
+ parts.fragment = '';
+ break;
+ case 'http':
+ case 'https':
+ // remove default port
+ if ((parts.scheme === 'http' && parts.port == 80) ||
+ (parts.scheme === 'https' && parts.port == 443)) {
+ parts.port = null;
+ // hostname is already lower case
+ parts.netloc = parts.hostname;
+ }
+ break;
+ default:
+ // if we don't have specific normalizations for this
+ // scheme, return the original url unmolested
+ return url;
+ }
+
+ // for [file|http|https]. Not sure about other schemes
+ parts.path = urlparse.normalizepath(parts.path);
+
+ return urlparse.urlunsplit(parts);
+};
+
+urlparse.urldefrag = function(url)
+{
+ var idx = url.indexOf('#');
+ if (idx == -1) {
+ return [ url, '' ];
+ } else {
+ return [ url.substr(0,idx), url.substr(idx+1) ];
+ }
+};
+
+urlparse.urlsplit = function(url, default_scheme, allow_fragments)
+{
+ var leftover;
+
+ if (typeof allow_fragments === 'undefined') {
+ allow_fragments = true;
+ }
+
+ // scheme (optional), host, port
+ var fullurl = /^([A-Za-z]+)?(:?\/\/)([0-9.\-A-Za-z]*)(?::(\d+))?(.*)$/;
+ // path, query, fragment
+ var parse_leftovers = /([^?#]*)?(?:\?([^#]*))?(?:#(.*))?$/;
+
+ var o = {};
+
+ var parts = url.match(fullurl);
+ if (parts) {
+ o.scheme = parts[1] || default_scheme || '';
+ o.hostname = parts[3].toLowerCase() || '';
+ o.port = parseInt(parts[4],10) || '';
+ // Probably should grab the netloc from regexp
+ // and then parse again for hostname/port
+
+ o.netloc = parts[3];
+ if (parts[4]) {
+ o.netloc += ':' + parts[4];
+ }
+
+ leftover = parts[5];
+ } else {
+ o.scheme = default_scheme || '';
+ o.netloc = '';
+ o.hostname = '';
+ leftover = url;
+ }
+ o.scheme = o.scheme.toLowerCase();
+
+ parts = leftover.match(parse_leftovers);
+
+ o.path = parts[1] || '';
+ o.query = parts[2] || '';
+
+ if (allow_fragments) {
+ o.fragment = parts[3] || '';
+ } else {
+ o.fragment = '';
+ }
+
+ return o;
+};
+
+urlparse.urlunsplit = function(o) {
+ var s = '';
+ if (o.scheme) {
+ s += o.scheme + '://';
+ }
+
+ if (o.netloc) {
+ if (s == '') {
+ s += '//';
+ }
+ s += o.netloc;
+ } else if (o.hostname) {
+ // extension. Python only uses netloc
+ if (s == '') {
+ s += '//';
+ }
+ s += o.hostname;
+ if (o.port) {
+ s += ':' + o.port;
+ }
+ }
+
+ if (o.path) {
+ s += o.path;
+ }
+
+ if (o.query) {
+ s += '?' + o.query;
+ }
+ if (o.fragment) {
+ s += '#' + o.fragment;
+ }
+ return s;
+};
+
+urlparse.urljoin = function(base, url, allow_fragments)
+{
+ if (typeof allow_fragments === 'undefined') {
+ allow_fragments = true;
+ }
+
+ var url_parts = urlparse.urlsplit(url);
+
+ // if url parts has a scheme (i.e. absolute)
+ // then nothing to do
+ if (url_parts.scheme) {
+ if (! allow_fragments) {
+ return url;
+ } else {
+ return urlparse.urldefrag(url)[0];
+ }
+ }
+ var base_parts = urlparse.urlsplit(base);
+
+ // copy base, only if not present
+ if (!base_parts.scheme) {
+ base_parts.scheme = url_parts.scheme;
+ }
+
+ // copy netloc, only if not present
+ if (!base_parts.netloc || !base_parts.hostname) {
+ base_parts.netloc = url_parts.netloc;
+ base_parts.hostname = url_parts.hostname;
+ base_parts.port = url_parts.port;
+ }
+
+ // paths
+ if (url_parts.path.length > 0) {
+ if (url_parts.path.charAt(0) == '/') {
+ base_parts.path = url_parts.path;
+ } else {
+ // relative path.. get rid of "current filename" and
+ // replace. Same as var parts =
+ // base_parts.path.split('/'); parts[parts.length-1] =
+ // url_parts.path; base_parts.path = parts.join('/');
+ var idx = base_parts.path.lastIndexOf('/');
+ if (idx == -1) {
+ base_parts.path = url_parts.path;
+ } else {
+ base_parts.path = base_parts.path.substr(0,idx) + '/' +
+ url_parts.path;
+ }
+ }
+ }
+
+ // clean up path
+ base_parts.path = urlparse.normalizepath(base_parts.path);
+
+ // copy query string
+ base_parts.query = url_parts.query;
+
+ // copy fragments
+ if (allow_fragments) {
+ base_parts.fragment = url_parts.fragment;
+ } else {
+ base_parts.fragment = '';
+ }
+
+ return urlparse.urlunsplit(base_parts);
+};
+
+/**
+ * getcwd - named after posix call of same name (see 'man 2 getcwd')
+ *
+ */
+Envjs.getcwd = function() {
+ return '.';
+};
+
+/**
+ * resolves location relative to doc location
+ *
+ * @param {Object} path Relative or absolute URL
+ * @param {Object} base (semi-optional) The base url used in resolving "path" above
+ */
+Envjs.uri = function(path, base) {
+ //console.log('constructing uri from path %s and base %s', path, base);
+
+ // Semi-common trick is to make an iframe with src='javascript:false'
+ // (or some equivalent). By returning '', the load is skipped
+ if (path.indexOf('javascript') === 0) {
+ return '';
+ }
+
+ // if path is absolute, then just normalize and return
+ if (path.match('^[a-zA-Z]+://')) {
+ return urlparse.urlnormalize(path);
+ }
+
+ // interesting special case, a few very large websites use
+ // '//foo/bar/' to mean 'http://foo/bar'
+ if (path.match('^//')) {
+ path = 'http:' + path;
+ }
+
+ // if base not passed in, try to get it from document
+ // Ideally I would like the caller to pass in document.baseURI to
+ // make this more self-sufficient and testable
+ if (!base && document) {
+ base = document.baseURI;
+ }
+
+ // about:blank doesn't count
+ if (base === 'about:blank'){
+ base = '';
+ }
+
+ // if base is still empty, then we are in QA mode loading local
+ // files. Get current working directory
+ if (!base) {
+ base = 'file://' + Envjs.getcwd() + '/';
+ }
+ // handles all cases if path is abosulte or relative to base
+ // 3rd arg is "false" --> remove fragments
+ var newurl = urlparse.urlnormalize(urlparse.urljoin(base, path, false));
+
+ return newurl;
+};
+
+
+
+/**
+ * Used in the XMLHttpRquest implementation to run a
+ * request in a seperate thread
+ * @param {Object} fn
+ */
+Envjs.runAsync = function(fn){};
+
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} url
+ */
+Envjs.writeToFile = function(text, url){};
+
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} suffix
+ */
+Envjs.writeToTempFile = function(text, suffix){};
+
+/**
+ * Used to read the contents of a local file
+ * @param {Object} url
+ */
+Envjs.readFromFile = function(url){};
+
+/**
+ * Used to delete a local file
+ * @param {Object} url
+ */
+Envjs.deleteFile = function(url){};
+
+/**
+ * establishes connection and calls responsehandler
+ * @param {Object} xhr
+ * @param {Object} responseHandler
+ * @param {Object} data
+ */
+Envjs.connection = function(xhr, responseHandler, data){};
+
+
+__extend__(Envjs, urlparse);
+
+/**
+ * Makes an object window-like by proxying object accessors
+ * @param {Object} scope
+ * @param {Object} parent
+ */
+Envjs.proxy = function(scope, parent, aliasList){};
+
+Envjs.javaEnabled = false;
+
+Envjs.homedir = '';
+Envjs.tmpdir = '';
+Envjs.os_name = '';
+Envjs.os_arch = '';
+Envjs.os_version = '';
+Envjs.lang = '';
+Envjs.platform = '';
+
+/**
+ *
+ * @param {Object} frameElement
+ * @param {Object} url
+ */
+Envjs.loadFrame = function(frame, url){
+ try {
+ if(frame.contentWindow){
+ //mark for garbage collection
+ frame.contentWindow = null;
+ }
+
+ //create a new scope for the window proxy
+ //platforms will need to override this function
+ //to make sure the scope is global-like
+ frame.contentWindow = (function(){return this;})();
+ new Window(frame.contentWindow, window);
+
+ //I dont think frames load asynchronously in firefox
+ //and I think the tests have verified this but for
+ //some reason I'm less than confident... Are there cases?
+ frame.contentDocument = frame.contentWindow.document;
+ frame.contentDocument.async = false;
+ if(url){
+ //console.log('envjs.loadFrame async %s', frame.contentDocument.async);
+ frame.contentWindow.location = url;
+ }
+ } catch(e) {
+ console.log("failed to load frame content: from %s %s", url, e);
+ }
+};
+
+
+// The following are in rhino/window.js
+// TODO: Envjs.unloadFrame
+// TODO: Envjs.proxy
+
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
+/*
+ * Envjs rhino-env.1.2.13
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+var __context__ = Packages.org.mozilla.javascript.Context.getCurrentContext();
+
+Envjs.platform = "Rhino";
+Envjs.revision = "1.7.0.rc2";
+
+/*
+ * Envjs rhino-env.1.2.13
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+ for ( var i in b ) {
+ var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+ if ( g || s ) {
+ if ( g ) { a.__defineGetter__(i, g); }
+ if ( s ) { a.__defineSetter__(i, s); }
+ } else {
+ a[i] = b[i];
+ }
+ } return a;
+}
+
+/**
+ * Writes message to system out.
+ *
+ * Some sites redefine 'print' as in 'window.print', so instead of
+ * printing to stdout, you are popping open a new window, which might
+ * call print, etc, etc,etc This can cause infinite loops and can
+ * exhausing all memory.
+ *
+ * By defining this upfront now, Envjs.log will always call the native 'print'
+ * function
+ *
+ * @param {Object} message
+ */
+Envjs.log = print;
+
+Envjs.lineSource = function(e){
+ return e&&e.rhinoException?e.rhinoException.lineSource():"(line ?)";
+};
+/**
+ * load and execute script tag text content
+ * @param {Object} script
+ */
+Envjs.loadInlineScript = function(script){
+ if(script.ownerDocument.ownerWindow){
+ Envjs.eval(
+ script.ownerDocument.ownerWindow,
+ script.text,
+ 'eval('+script.text.substring(0,16)+'...):'+new Date().getTime()
+ );
+ }else{
+ Envjs.eval(
+ __this__,
+ script.text,
+ 'eval('+script.text.substring(0,16)+'...):'+new Date().getTime()
+ );
+ }
+ //console.log('evaluated at scope %s \n%s',
+ // script.ownerDocument.ownerWindow.guid, script.text);
+};
+
+
+Envjs.eval = function(context, source, name){
+ __context__.evaluateString(
+ context,
+ source,
+ name,
+ 0,
+ null
+ );
+};
+
+//Temporary patch for parser module
+Packages.org.mozilla.javascript.Context.
+ getCurrentContext().setOptimizationLevel(-1);
+
+/**
+ * Rhino provides a very succinct 'sync'
+ * @param {Function} fn
+ */
+try{
+ Envjs.sync = sync;
+ Envjs.spawn = spawn;
+} catch(e){
+ //sync unavailable on AppEngine
+ Envjs.sync = function(fn){
+ //console.log('Threadless platform, sync is safe');
+ return fn;
+ };
+
+ Envjs.spawn = function(fn){
+ //console.log('Threadless platform, spawn shares main thread.');
+ return fn();
+ };
+}
+
+/**
+ * sleep thread for specified duration
+ * @param {Object} millseconds
+ */
+Envjs.sleep = function(millseconds){
+ try{
+ java.lang.Thread.currentThread().sleep(millseconds);
+ }catch(e){
+ console.log('Threadless platform, cannot sleep.');
+ }
+};
+
+/**
+ * provides callback hook for when the system exits
+ */
+Envjs.onExit = function(callback){
+ var rhino = Packages.org.mozilla.javascript,
+ contextFactory = __context__.getFactory(),
+ listener = new rhino.ContextFactory.Listener({
+ contextReleased: function(context){
+ if(context === __context__)
+ console.log('context released', context);
+ contextFactory.removeListener(this);
+ if(callback)
+ callback();
+ }
+ });
+ contextFactory.addListener(listener);
+};
+
+/**
+ * Get 'Current Working Directory'
+ */
+Envjs.getcwd = function() {
+ return java.lang.System.getProperty('user.dir');
+}
+
+/**
+ *
+ * @param {Object} fn
+ * @param {Object} onInterupt
+ */
+Envjs.runAsync = function(fn, onInterupt){
+ ////Envjs.debug("running async");
+ var running = true,
+ run;
+
+ try{
+ run = Envjs.sync(function(){
+ fn();
+ Envjs.wait();
+ });
+ Envjs.spawn(run);
+ }catch(e){
+ console.log("error while running async operation", e);
+ try{if(onInterrupt)onInterrupt(e)}catch(ee){};
+ }
+};
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} url
+ */
+Envjs.writeToFile = function(text, url){
+ //Envjs.debug("writing text to url : " + url);
+ var out = new java.io.FileWriter(
+ new java.io.File(
+ new java.net.URI(url.toString())));
+ out.write( text, 0, text.length );
+ out.flush();
+ out.close();
+};
+
+/**
+ * Used to write to a local file
+ * @param {Object} text
+ * @param {Object} suffix
+ */
+Envjs.writeToTempFile = function(text, suffix){
+ //Envjs.debug("writing text to temp url : " + suffix);
+ // Create temp file.
+ var temp = java.io.File.createTempFile("envjs-tmp", suffix);
+
+ // Delete temp file when program exits.
+ temp.deleteOnExit();
+
+ // Write to temp file
+ var out = new java.io.FileWriter(temp);
+ out.write(text, 0, text.length);
+ out.close();
+ return temp.getAbsolutePath().toString()+'';
+};
+
+
+/**
+ * Used to read the contents of a local file
+ * @param {Object} url
+ */
+Envjs.readFromFile = function( url ){
+ var fileReader = new java.io.FileReader(
+ new java.io.File(
+ new java.net.URI( url )));
+
+ var stringwriter = new java.io.StringWriter(),
+ buffer = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 1024),
+ length;
+
+ while ((length = fileReader.read(buffer, 0, 1024)) != -1) {
+ stringwriter.write(buffer, 0, length);
+ }
+
+ stringwriter.close();
+ return stringwriter.toString()+"";
+};
+
+
+/**
+ * Used to delete a local file
+ * @param {Object} url
+ */
+Envjs.deleteFile = function(url){
+ var file = new java.io.File( new java.net.URI( url ) );
+ file["delete"]();
+};
+
+/**
+ * establishes connection and calls responsehandler
+ * @param {Object} xhr
+ * @param {Object} responseHandler
+ * @param {Object} data
+ */
+Envjs.connection = function(xhr, responseHandler, data){
+ var url = java.net.URL(xhr.url),
+ connection,
+ header,
+ outstream,
+ buffer,
+ length,
+ binary = false,
+ name, value,
+ contentEncoding,
+ instream,
+ responseXML,
+ i;
+ if ( /^file\:/.test(url) ) {
+ try{
+ if ( "PUT" == xhr.method || "POST" == xhr.method ) {
+ data = data || "" ;
+ Envjs.writeToFile(data, url);
+ xhr.readyState = 4;
+ //could be improved, I just cant recall the correct http codes
+ xhr.status = 200;
+ xhr.statusText = "";
+ } else if ( xhr.method == "DELETE" ) {
+ Envjs.deleteFile(url);
+ xhr.readyState = 4;
+ //could be improved, I just cant recall the correct http codes
+ xhr.status = 200;
+ xhr.statusText = "";
+ } else {
+ connection = url.openConnection();
+ connection.connect();
+ //try to add some canned headers that make sense
+
+ try{
+ if(xhr.url.match(/html$/)){
+ xhr.responseHeaders["Content-Type"] = 'text/html';
+ }else if(xhr.url.match(/.xml$/)){
+ xhr.responseHeaders["Content-Type"] = 'text/xml';
+ }else if(xhr.url.match(/.js$/)){
+ xhr.responseHeaders["Content-Type"] = 'text/javascript';
+ }else if(xhr.url.match(/.json$/)){
+ xhr.responseHeaders["Content-Type"] = 'application/json';
+ }else{
+ xhr.responseHeaders["Content-Type"] = 'text/plain';
+ }
+ //xhr.responseHeaders['Last-Modified'] = connection.getLastModified();
+ //xhr.responseHeaders['Content-Length'] = headerValue+'';
+ //xhr.responseHeaders['Date'] = new Date()+'';*/
+ }catch(e){
+ console.log('failed to load response headers',e);
+ }
+ }
+ }catch(e){
+ console.log('failed to open file %s %s', url, e);
+ connection = null;
+ xhr.readyState = 4;
+ xhr.statusText = "Local File Protocol Error";
+ xhr.responseText = "<html><head/><body><p>"+ e+ "</p></body></html>";
+ }
+ } else {
+ connection = url.openConnection();
+ connection.setRequestMethod( xhr.method );
+
+ // Add headers to Java connection
+ for (header in xhr.headers){
+ connection.addRequestProperty(header+'', xhr.headers[header]+'');
+ }
+
+ //write data to output stream if required
+ if(data){
+ if(data instanceof Document){
+ if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+ connection.setDoOutput(true);
+ outstream = connection.getOutputStream(),
+ xml = (new XMLSerializer()).serializeToString(data);
+ buffer = new java.lang.String(xml).getBytes('UTF-8');
+ outstream.write(buffer, 0, buffer.length);
+ outstream.close();
+ }
+ }else if(data.length&&data.length>0){
+ if ( xhr.method == "PUT" || xhr.method == "POST" ) {
+ connection.setDoOutput(true);
+ outstream = connection.getOutputStream();
+ buffer = new java.lang.String(data).getBytes('UTF-8');
+ outstream.write(buffer, 0, buffer.length);
+ outstream.close();
+ }
+ }
+ connection.connect();
+ }else{
+ connection.connect();
+ }
+ }
+
+ if(connection){
+ try{
+ length = connection.getHeaderFields().size();
+ // Stick the response headers into responseHeaders
+ for (i = 0; i < length; i++) {
+ name = connection.getHeaderFieldKey(i);
+ value = connection.getHeaderField(i);
+ if (name)
+ xhr.responseHeaders[name+''] = value+'';
+ }
+ }catch(e){
+ console.log('failed to load response headers \n%s',e);
+ }
+
+ xhr.readyState = 4;
+ xhr.status = parseInt(connection.responseCode,10) || undefined;
+ xhr.statusText = connection.responseMessage || "";
+
+ contentEncoding = connection.getContentEncoding() || "utf-8";
+ instream = null;
+ responseXML = null;
+
+ try{
+ //console.log('contentEncoding %s', contentEncoding);
+ if( contentEncoding.equalsIgnoreCase("gzip") ||
+ contentEncoding.equalsIgnoreCase("decompress")){
+ //zipped content
+ binary = true;
+ outstream = new java.io.ByteArrayOutputStream();
+ buffer = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
+ instream = new java.util.zip.GZIPInputStream(connection.getInputStream())
+ }else{
+ //this is a text file
+ outstream = new java.io.StringWriter();
+ buffer = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 1024);
+ instream = new java.io.InputStreamReader(connection.getInputStream());
+ }
+ }catch(e){
+ if (connection.getResponseCode() == 404){
+ console.log('failed to open connection stream \n %s %s',
+ e.toString(), e);
+ }else{
+ console.log('failed to open connection stream \n %s %s',
+ e.toString(), e);
+ }
+ instream = connection.getErrorStream();
+ }
+
+ while ((length = instream.read(buffer, 0, 1024)) != -1) {
+ outstream.write(buffer, 0, length);
+ }
+
+ outstream.close();
+ instream.close();
+
+ if(binary){
+ xhr.responseText = new String(outstream.toByteArray(), 'UTF-8') + '';
+ }else{
+ xhr.responseText = outstream.toString() + '';
+ }
+
+ }
+ if(responseHandler){
+ //Envjs.debug('calling ajax response handler');
+ responseHandler();
+ }
+};
+
+//Since we're running in rhino I guess we can safely assume
+//java is 'enabled'. I'm sure this requires more thought
+//than I've given it here
+Envjs.javaEnabled = true;
+
+Envjs.homedir = java.lang.System.getProperty("user.home");
+Envjs.tmpdir = java.lang.System.getProperty("java.io.tmpdir");
+Envjs.os_name = java.lang.System.getProperty("os.name");
+Envjs.os_arch = java.lang.System.getProperty("os.arch");
+Envjs.os_version = java.lang.System.getProperty("os.version");
+Envjs.lang = java.lang.System.getProperty("user.lang");
+
+
+/**
+ *
+ * @param {Object} frameElement
+ * @param {Object} url
+ */
+Envjs.loadFrame = function(frame, url){
+ try {
+ if(frame.contentWindow){
+ //mark for garbage collection
+ frame.contentWindow = null;
+ }
+
+ //create a new scope for the window proxy
+ frame.contentWindow = Envjs.proxy();
+ new Window(frame.contentWindow, window);
+
+ //I dont think frames load asynchronously in firefox
+ //and I think the tests have verified this but for
+ //some reason I'm less than confident... Are there cases?
+ frame.contentDocument = frame.contentWindow.document;
+ frame.contentDocument.async = false;
+ if(url){
+ //console.log('envjs.loadFrame async %s', frame.contentDocument.async);
+ frame.contentWindow.location = url;
+ }
+ } catch(e) {
+ console.log("failed to load frame content: from %s %s", url, e);
+ }
+};
+
+/**
+ * unloadFrame
+ * @param {Object} frame
+ */
+Envjs.unloadFrame = function(frame){
+ var all, length, i;
+ try{
+ //TODO: probably self-referencing structures within a document tree
+ //preventing it from being entirely garbage collected once orphaned.
+ //Should have code to walk tree and break all links between contained
+ //objects.
+ frame.contentDocument = null;
+ if(frame.contentWindow){
+ frame.contentWindow.close();
+ }
+ gc();
+ }catch(e){
+ console.log(e);
+ }
+};
+
+/**
+ * Makes an object window-like by proxying object accessors
+ * @param {Object} scope
+ * @param {Object} parent
+ */
+Envjs.proxy = function(scope, parent) {
+ try{
+ if(scope+'' == '[object global]'){
+ return scope
+ }else{
+ return __context__.initStandardObjects();
+ }
+ }catch(e){
+ console.log('failed to init standard objects %s %s \n%s', scope, parent, e);
+ }
+
+};
+
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
+
+/**
+ * @author envjs team
+ */
+var Console,
+ console;
+
+/*
+ * Envjs console.1.2.13
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author envjs team
+ * borrowed 99%-ish with love from firebug-lite
+ *
+ * http://wiki.commonjs.org/wiki/Console
+ */
+Console = function(module){
+ var $level,
+ $logger,
+ $null = function(){};
+
+
+ if(Envjs[module] && Envjs[module].loglevel){
+ $level = Envjs.module.loglevel;
+ $logger = {
+ log: function(level){
+ logFormatted(arguments, (module)+" ");
+ },
+ debug: $level>1 ? $null: function() {
+ logFormatted(arguments, (module)+" debug");
+ },
+ info: $level>2 ? $null:function(){
+ logFormatted(arguments, (module)+" info");
+ },
+ warn: $level>3 ? $null:function(){
+ logFormatted(arguments, (module)+" warning");
+ },
+ error: $level>4 ? $null:function(){
+ logFormatted(arguments, (module)+" error");
+ }
+ };
+ } else {
+ $logger = {
+ log: function(level){
+ logFormatted(arguments, "");
+ },
+ debug: $null,
+ info: $null,
+ warn: $null,
+ error: $null
+ };
+ }
+
+ return $logger;
+};
+
+console = new Console("console",1);
+
+function logFormatted(objects, className)
+{
+ var html = [];
+
+ var format = objects[0];
+ var objIndex = 0;
+
+ if (typeof(format) != "string")
+ {
+ format = "";
+ objIndex = -1;
+ }
+
+ var parts = parseFormat(format);
+ for (var i = 0; i < parts.length; ++i)
+ {
+ var part = parts[i];
+ if (part && typeof(part) == "object")
+ {
+ var object = objects[++objIndex];
+ part.appender(object, html);
+ }
+ else {
+ appendText(part, html);
+ }
+ }
+
+ for (var i = objIndex+1; i < objects.length; ++i)
+ {
+ appendText(" ", html);
+
+ var object = objects[i];
+ if (typeof(object) == "string") {
+ appendText(object, html);
+ } else {
+ appendObject(object, html);
+ }
+ }
+
+ Envjs.log(html.join(' '));
+}
+
+function parseFormat(format)
+{
+ var parts = [];
+
+ var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;
+ var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat};
+
+ for (var m = reg.exec(format); m; m = reg.exec(format))
+ {
+ var type = m[8] ? m[8] : m[5];
+ var appender = type in appenderMap ? appenderMap[type] : appendObject;
+ var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0);
+
+ parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
+ parts.push({appender: appender, precision: precision});
+
+ format = format.substr(m.index+m[0].length);
+ }
+
+ parts.push(format);
+
+ return parts;
+}
+
+function escapeHTML(value)
+{
+ return value;
+}
+
+function objectToString(object)
+{
+ try
+ {
+ return object+"";
+ }
+ catch (exc)
+ {
+ return null;
+ }
+}
+
+// ********************************************************************************************
+
+function appendText(object, html)
+{
+ html.push(escapeHTML(objectToString(object)));
+}
+
+function appendNull(object, html)
+{
+ html.push(escapeHTML(objectToString(object)));
+}
+
+function appendString(object, html)
+{
+ html.push(escapeHTML(objectToString(object)));
+}
+
+function appendInteger(object, html)
+{
+ html.push(escapeHTML(objectToString(object)));
+}
+
+function appendFloat(object, html)
+{
+ html.push(escapeHTML(objectToString(object)));
+}
+
+function appendFunction(object, html)
+{
+ var reName = /function ?(.*?)\(/;
+ var m = reName.exec(objectToString(object));
+ var name = m ? m[1] : "function";
+ html.push(escapeHTML(name));
+}
+
+function appendObject(object, html)
+{
+ try
+ {
+ if (object == undefined) {
+ appendNull("undefined", html);
+ } else if (object == null) {
+ appendNull("null", html);
+ } else if (typeof object == "string") {
+ appendString(object, html);
+ } else if (typeof object == "number") {
+ appendInteger(object, html);
+ } else if (typeof object == "function") {
+ appendFunction(object, html);
+ } else if (object.nodeType == 1) {
+ appendSelector(object, html);
+ } else if (typeof object == "object") {
+ appendObjectFormatted(object, html);
+ } else {
+ appendText(object, html);
+ }
+ }
+ catch (exc)
+ {
+ }
+}
+
+function appendObjectFormatted(object, html)
+{
+ var text = objectToString(object);
+ var reObject = /\[object (.*?)\]/;
+
+ var m = reObject.exec(text);
+ html.push( m ? m[1] : text);
+}
+
+function appendSelector(object, html)
+{
+
+ html.push(escapeHTML(object.nodeName.toLowerCase()));
+ if (object.id) {
+ html.push(escapeHTML(object.id));
+ }
+ if (object.className) {
+ html.push(escapeHTML(object.className));
+ }
+}
+
+function appendNode(node, html)
+{
+ if (node.nodeType == 1)
+ {
+ html.push( node.nodeName.toLowerCase());
+
+ for (var i = 0; i < node.attributes.length; ++i)
+ {
+ var attr = node.attributes[i];
+ if (!attr.specified) {
+ continue;
+ }
+
+ html.push( attr.nodeName.toLowerCase(),escapeHTML(attr.nodeValue));
+ }
+
+ if (node.firstChild)
+ {
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ appendNode(child, html);
+ }
+
+ html.push( node.nodeName.toLowerCase());
+ }
+ }
+ else if (node.nodeType === 3)
+ {
+ html.push(escapeHTML(node.nodeValue));
+ }
+};
+
+/**
+ * @author john resig & the envjs team
+ * @uri http://www.envjs.com/
+ * @copyright 2008-2010
+ * @license MIT
+ */
+//CLOSURE_END
+}());
+/*
+ * Envjs dom.1.2.13
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ *
+ * Parts of the implementation were originally written by:\
+ * and Jon van Noort (jon@webarcana.com.au) \
+ * and David Joham (djoham@yahoo.com)",\
+ * and Scott Severtson
+ *
+ * This file simply provides the global definitions we need to \
+ * be able to correctly implement to core browser DOM interfaces."
+ */
+
+var Attr,
+ CDATASection,
+ CharacterData,
+ Comment,
+ Document,
+ DocumentFragment,
+ DocumentType,
+ DOMException,
+ DOMImplementation,
+ Element,
+ Entity,
+ EntityReference,
+ NamedNodeMap,
+ Namespace,
+ Node,
+ NodeList,
+ Notation,
+ ProcessingInstruction,
+ Text,
+ Range,
+ XMLSerializer,
+ DOMParser;
+
+
+
+/*
+ * Envjs dom.1.2.13
+ * Pure JavaScript Browser Environment
+ * By John Resig <http://ejohn.org/> and the Envjs Team
+ * Copyright 2008-2010 John Resig, under the MIT License
+ */
+
+//CLOSURE_START
+(function(){
+
+
+
+
+
+/**
+ * @author john resig
+ */
+// Helper method for extending one object with another.
+function __extend__(a,b) {
+ for ( var i in b ) {
+ var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
+ if ( g || s ) {
+ if ( g ) { a.__defineGetter__(i, g); }
+ if ( s ) { a.__defineSetter__(i, s); }
+ } else {
+ a[i] = b[i];
+ }
+ } return a;
+}
+
+/**
+ * @author john resig
+ */
+//from jQuery
+function __setArray__( target, array ) {
+ // Resetting the length to 0, then using the native Array push
+ // is a super-fast way to populate an object with array-like properties
+ target.length = 0;
+ Array.prototype.push.apply( target, array );
+}
+
+/**
+ * @class NodeList -
+ * provides the abstraction of an ordered collection of nodes
+ *
+ * @param ownerDocument : Document - the ownerDocument
+ * @param parentNode : Node - the node that the NodeList is attached to (or null)
+ */
+NodeList = function(ownerDocument, parentNode) {
+ this.length = 0;
+ this.parentNode = parentNode;
+ this.ownerDocument = ownerDocument;
+ this._readonly = false;
+ __setArray__(this, []);
+};
+
+__extend__(NodeList.prototype, {
+ item : function(index) {
+ var ret = null;
+ if ((index >= 0) && (index < this.length)) {
+ // bounds check
+ ret = this[index];
+ }
+ // if the index is out of bounds, default value null is returned
+ return ret;
+ },
+ get xml() {
+ var ret = "",
+ i;
+
+ // create string containing the concatenation of the string values of each child
+ for (i=0; i < this.length; i++) {
+ if(this[i]){
+ if(this[i].nodeType == Node.TEXT_NODE && i>0 &&
+ this[i-1].nodeType == Node.TEXT_NODE){
+ //add a single space between adjacent text nodes
+ ret += " "+this[i].xml;
+ }else{
+ ret += this[i].xml;
+ }
+ }
+ }
+ return ret;
+ },
+ toArray: function () {
+ var children = [],
+ i;
+ for ( i=0; i < this.length; i++) {
+ children.push (this[i]);
+ }
+ return children;
+ },
+ toString: function(){
+ return "[object NodeList]";
+ }
+});
+
+
+/**
+ * @method __findItemIndex__
+ * find the item index of the node
+ * @author Jon van Noort (jon@webarcana.com.au)
+ * @param node : Node
+ * @return : int
+ */
+var __findItemIndex__ = function (nodelist, node) {
+ var ret = -1, i;
+ for (i=0; i<nodelist.length; i++) {
+ // compare id to each node's _id
+ if (nodelist[i] === node) {
+ // found it!
+ ret = i;
+ break;
+ }
+ }
+ // if node is not found, default value -1 is returned
+ return ret;
+};
+
+/**
+ * @method __insertBefore__
+ * insert the specified Node into the NodeList before the specified index
+ * Used by Node.insertBefore(). Note: Node.insertBefore() is responsible
+ * for Node Pointer surgery __insertBefore__ simply modifies the internal
+ * data structure (Array).
+ * @param newChild : Node - the Node to be inserted
+ * @param refChildIndex : int - the array index to insert the Node before
+ */
+var __insertBefore__ = function(nodelist, newChild, refChildIndex) {
+ if ((refChildIndex >= 0) && (refChildIndex <= nodelist.length)) {
+ // bounds check
+ if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+ // node is a DocumentFragment
+ // append the children of DocumentFragment
+ Array.prototype.splice.apply(nodelist,
+ [refChildIndex, 0].concat(newChild.childNodes.toArray()));
+ }
+ else {
+ // append the newChild
+ Array.prototype.splice.apply(nodelist,[refChildIndex, 0, newChild]);
+ }
+ }
+};
+
+/**
+ * @method __replaceChild__
+ * replace the specified Node in the NodeList at the specified index
+ * Used by Node.replaceChild(). Note: Node.replaceChild() is responsible
+ * for Node Pointer surgery __replaceChild__ simply modifies the internal
+ * data structure (Array).
+ *
+ * @param newChild : Node - the Node to be inserted
+ * @param refChildIndex : int - the array index to hold the Node
+ */
+var __replaceChild__ = function(nodelist, newChild, refChildIndex) {
+ var ret = null;
+
+ // bounds check
+ if ((refChildIndex >= 0) && (refChildIndex < nodelist.length)) {
+ // preserve old child for return
+ ret = nodelist[refChildIndex];
+
+ if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+ // node is a DocumentFragment
+ // get array containing children prior to refChild
+ Array.prototype.splice.apply(nodelist,
+ [refChildIndex, 1].concat(newChild.childNodes.toArray()));
+ }
+ else {
+ // simply replace node in array (links between Nodes are
+ // made at higher level)
+ nodelist[refChildIndex] = newChild;
+ }
+ }
+ // return replaced node
+ return ret;
+};
+
+/**
+ * @method __removeChild__
+ * remove the specified Node in the NodeList at the specified index
+ * Used by Node.removeChild(). Note: Node.removeChild() is responsible
+ * for Node Pointer surgery __removeChild__ simply modifies the internal
+ * data structure (Array).
+ * @param refChildIndex : int - the array index holding the Node to be removed
+ */
+var __removeChild__ = function(nodelist, refChildIndex) {
+ var ret = null;
+
+ if (refChildIndex > -1) {
+ // found it!
+ // return removed node
+ ret = nodelist[refChildIndex];
+
+ // rebuild array without removed child
+ Array.prototype.splice.apply(nodelist,[refChildIndex, 1]);
+ }
+ // return removed node
+ return ret;
+};
+
+/**
+ * @method __appendChild__
+ * append the specified Node to the NodeList. Used by Node.appendChild().
+ * Note: Node.appendChild() is responsible for Node Pointer surgery
+ * __appendChild__ simply modifies the internal data structure (Array).
+ * @param newChild : Node - the Node to be inserted
+ */
+var __appendChild__ = function(nodelist, newChild) {
+ if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+ // node is a DocumentFragment
+ // append the children of DocumentFragment
+ Array.prototype.push.apply(nodelist, newChild.childNodes.toArray() );
+ } else {
+ // simply add node to array (links between Nodes are made at higher level)
+ Array.prototype.push.apply(nodelist, [newChild]);
+ }
+
+};
+
+/**
+ * @method __cloneNodes__ -
+ * Returns a NodeList containing clones of the Nodes in this NodeList
+ * @param deep : boolean -
+ * If true, recursively clone the subtree under each of the nodes;
+ * if false, clone only the nodes themselves (and their attributes,
+ * if it is an Element).
+ * @param parentNode : Node - the new parent of the cloned NodeList
+ * @return : NodeList - NodeList containing clones of the Nodes in this NodeList
+ */
+var __cloneNodes__ = function(nodelist, deep, parentNode) {
+ var cloneNodeList = new NodeList(nodelist.ownerDocument, parentNode);
+
+ // create list containing clones of each child
+ for (var i=0; i < nodelist.length; i++) {
+ __appendChild__(cloneNodeList, nodelist[i].cloneNode(deep));
+ }
+
+ return cloneNodeList;
+};
+
+
+var __ownerDocument__ = function(node){
+ return (node.nodeType == Node.DOCUMENT_NODE)?node:node.ownerDocument;
+};
+
+/**
+ * @class Node -
+ * The Node interface is the primary datatype for the entire
+ * Document Object Model. It represents a single node in the
+ * document tree.
+ * @param ownerDocument : Document - The Document object associated with this node.
+ */
+
+Node = function(ownerDocument) {
+ this.baseURI = 'about:blank';
+ this.namespaceURI = null;
+ this.nodeName = "";
+ this.nodeValue = null;
+
+ // A NodeList that contains all children of this node. If there are no
+ // children, this is a NodeList containing no nodes. The content of the
+ // returned NodeList is "live" in the sense that, for instance, changes to
+ // the children of the node object that it was created from are immediately
+ // reflected in the nodes returned by the NodeList accessors; it is not a
+ // static snapshot of the content of the node. This is true for every
+ // NodeList, including the ones returned by the getElementsByTagName method.
+ this.childNodes = new NodeList(ownerDocument, this);
+
+ // The first child of this node. If there is no such node, this is null
+ this.firstChild = null;
+ // The last child of this node. If there is no such node, this is null.
+ this.lastChild = null;
+ // The node immediately preceding this node. If there is no such node,
+ // this is null.
+ this.previousSibling = null;
+ // The node immediately following this node. If there is no such node,
+ // this is null.
+ this.nextSibling = null;
+
+ this.attributes = null;
+ // The namespaces in scope for this node
+ this._namespaces = new NamespaceNodeMap(ownerDocument, this);
+ this._readonly = false;
+
+ //IMPORTANT: These must come last so rhino will not iterate parent
+ // properties before child properties. (qunit.equiv issue)
+
+ // The parent of this node. All nodes, except Document, DocumentFragment,
+ // and Attr may have a parent. However, if a node has just been created
+ // and not yet added to the tree, or if it has been removed from the tree,
+ // this is null
+ this.parentNode = null;
+ // The Document object associated with this node
+ this.ownerDocument = ownerDocument;
+
+};
+
+// nodeType constants
+Node.ELEMENT_NODE = 1;
+Node.ATTRIBUTE_NODE = 2;
+Node.TEXT_NODE = 3;
+Node.CDATA_SECTION_NODE = 4;
+Node.ENTITY_REFERENCE_NODE = 5;
+Node.ENTITY_NODE = 6;
+Node.PROCESSING_INSTRUCTION_NODE = 7;
+Node.COMMENT_NODE = 8;
+Node.DOCUMENT_NODE = 9;
+Node.DOCUMENT_TYPE_NODE = 10;
+Node.DOCUMENT_FRAGMENT_NODE = 11;
+Node.NOTATION_NODE = 12;
+Node.NAMESPACE_NODE = 13;
+
+Node.DOCUMENT_POSITION_EQUAL = 0x00;
+Node.DOCUMENT_POSITION_DISCONNECTED = 0x01;
+Node.DOCUMENT_POSITION_PRECEDING = 0x02;
+Node.DOCUMENT_POSITION_FOLLOWING = 0x04;
+Node.DOCUMENT_POSITION_CONTAINS = 0x08;
+Node.DOCUMENT_POSITION_CONTAINED_BY = 0x10;
+Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
+
+
+__extend__(Node.prototype, {
+ get localName(){
+ return this.prefix?
+ this.nodeName.substring(this.prefix.length+1, this.nodeName.length):
+ this.nodeName;
+ },
+ get prefix(){
+ return this.nodeName.split(':').length>1?
+ this.nodeName.split(':')[0]:
+ null;
+ },
+ set prefix(value){
+ if(value === null){
+ this.nodeName = this.localName;
+ }else{
+ this.nodeName = value+':'+this.localName;
+ }
+ },
+ hasAttributes : function() {
+ if (this.attributes.length == 0) {
+ return false;
+ }else{
+ return true;
+ }
+ },
+ get textContent(){
+ return __recursivelyGatherText__(this);
+ },
+ set textContent(newText){
+ while(this.firstChild != null){
+ this.removeChild( this.firstChild );
+ }
+ var text = this.ownerDocument.createTextNode(newText);
+ this.appendChild(text);
+ },
+ insertBefore : function(newChild, refChild) {
+ var prevNode;
+
+ if(newChild==null){
+ return newChild;
+ }
+ if(refChild==null){
+ this.appendChild(newChild);
+ return this.newChild;
+ }
+
+ // test for exceptions
+ if (__ownerDocument__(this).implementation.errorChecking) {
+ // throw Exception if Node is readonly
+ if (this._readonly) {
+ throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+ }
+
+ // throw Exception if newChild was not created by this Document
+ if (__ownerDocument__(this) != __ownerDocument__(newChild)) {
+ throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+ }
+
+ // throw Exception if the node is an ancestor
+ if (__isAncestor__(this, newChild)) {
+ throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
+ }
+ }
+
+ // if refChild is specified, insert before it
+ if (refChild) {
+ // find index of refChild
+ var itemIndex = __findItemIndex__(this.childNodes, refChild);
+ // throw Exception if there is no child node with this id
+ if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
+ throw(new DOMException(DOMException.NOT_FOUND_ERR));
+ }
+
+ // if the newChild is already in the tree,
+ var newChildParent = newChild.parentNode;
+ if (newChildParent) {
+ // remove it
+ newChildParent.removeChild(newChild);
+ }
+
+ // insert newChild into childNodes
+ __insertBefore__(this.childNodes, newChild, itemIndex);
+
+ // do node pointer surgery
+ prevNode = refChild.previousSibling;
+
+ // handle DocumentFragment
+ if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+ if (newChild.childNodes.length > 0) {
+ // set the parentNode of DocumentFragment's children
+ for (var ind = 0; ind < newChild.childNodes.length; ind++) {
+ newChild.childNodes[ind].parentNode = this;
+ }
+
+ // link refChild to last child of DocumentFragment
+ refChild.previousSibling = newChild.childNodes[newChild.childNodes.length-1];
+ }
+ }else {
+ // set the parentNode of the newChild
+ newChild.parentNode = this;
+ // link refChild to newChild
+ refChild.previousSibling = newChild;
+ }
+
+ }else {
+ // otherwise, append to end
+ prevNode = this.lastChild;
+ this.appendChild(newChild);
+ }
+
+ if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+ // do node pointer surgery for DocumentFragment
+ if (newChild.childNodes.length > 0) {
+ if (prevNode) {
+ prevNode.nextSibling = newChild.childNodes[0];
+ }else {
+ // this is the first child in the list
+ this.firstChild = newChild.childNodes[0];
+ }
+ newChild.childNodes[0].previousSibling = prevNode;
+ newChild.childNodes[newChild.childNodes.length-1].nextSibling = refChild;
+ }
+ }else {
+ // do node pointer surgery for newChild
+ if (prevNode) {
+ prevNode.nextSibling = newChild;
+ }else {
+ // this is the first child in the list
+ this.firstChild = newChild;
+ }
+ newChild.previousSibling = prevNode;
+ newChild.nextSibling = refChild;
+ }
+
+ return newChild;
+ },
+ replaceChild : function(newChild, oldChild) {
+ var ret = null;
+
+ if(newChild==null || oldChild==null){
+ return oldChild;
+ }
+
+ // test for exceptions
+ if (__ownerDocument__(this).implementation.errorChecking) {
+ // throw Exception if Node is readonly
+ if (this._readonly) {
+ throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+ }
+
+ // throw Exception if newChild was not created by this Document
+ if (__ownerDocument__(this) != __ownerDocument__(newChild)) {
+ throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+ }
+
+ // throw Exception if the node is an ancestor
+ if (__isAncestor__(this, newChild)) {
+ throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
+ }
+ }
+
+ // get index of oldChild
+ var index = __findItemIndex__(this.childNodes, oldChild);
+
+ // throw Exception if there is no child node with this id
+ if (__ownerDocument__(this).implementation.errorChecking && (index < 0)) {
+ throw(new DOMException(DOMException.NOT_FOUND_ERR));
+ }
+
+ // if the newChild is already in the tree,
+ var newChildParent = newChild.parentNode;
+ if (newChildParent) {
+ // remove it
+ newChildParent.removeChild(newChild);
+ }
+
+ // add newChild to childNodes
+ ret = __replaceChild__(this.childNodes,newChild, index);
+
+
+ if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+ // do node pointer surgery for Document Fragment
+ if (newChild.childNodes.length > 0) {
+ for (var ind = 0; ind < newChild.childNodes.length; ind++) {
+ newChild.childNodes[ind].parentNode = this;
+ }
+
+ if (oldChild.previousSibling) {
+ oldChild.previousSibling.nextSibling = newChild.childNodes[0];
+ } else {
+ this.firstChild = newChild.childNodes[0];
+ }
+
+ if (oldChild.nextSibling) {
+ oldChild.nextSibling.previousSibling = newChild;
+ } else {
+ this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
+ }
+
+ newChild.childNodes[0].previousSibling = oldChild.previousSibling;
+ newChild.childNodes[newChild.childNodes.length-1].nextSibling = oldChild.nextSibling;
+ }
+ } else {
+ // do node pointer surgery for newChild
+ newChild.parentNode = this;
+
+ if (oldChild.previousSibling) {
+ oldChild.previousSibling.nextSibling = newChild;
+ }else{
+ this.firstChild = newChild;
+ }
+ if (oldChild.nextSibling) {
+ oldChild.nextSibling.previousSibling = newChild;
+ }else{
+ this.lastChild = newChild;
+ }
+ newChild.previousSibling = oldChild.previousSibling;
+ newChild.nextSibling = oldChild.nextSibling;
+ }
+
+ return ret;
+ },
+ removeChild : function(oldChild) {
+ if(!oldChild){
+ return null;
+ }
+ // throw Exception if NamedNodeMap is readonly
+ if (__ownerDocument__(this).implementation.errorChecking &&
+ (this._readonly || oldChild._readonly)) {
+ throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+ }
+
+ // get index of oldChild
+ var itemIndex = __findItemIndex__(this.childNodes, oldChild);
+
+ // throw Exception if there is no child node with this id
+ if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
+ throw(new DOMException(DOMException.NOT_FOUND_ERR));
+ }
+
+ // remove oldChild from childNodes
+ __removeChild__(this.childNodes, itemIndex);
+
+ // do node pointer surgery
+ oldChild.parentNode = null;
+
+ if (oldChild.previousSibling) {
+ oldChild.previousSibling.nextSibling = oldChild.nextSibling;
+ }else {
+ this.firstChild = oldChild.nextSibling;
+ }
+ if (oldChild.nextSibling) {
+ oldChild.nextSibling.previousSibling = oldChild.previousSibling;
+ }else {
+ this.lastChild = oldChild.previousSibling;
+ }
+
+ oldChild.previousSibling = null;
+ oldChild.nextSibling = null;
+
+ return oldChild;
+ },
+ appendChild : function(newChild) {
+ if(!newChild){
+ return null;
+ }
+ // test for exceptions
+ if (__ownerDocument__(this).implementation.errorChecking) {
+ // throw Exception if Node is readonly
+ if (this._readonly) {
+ throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
+ }
+
+ // throw Exception if arg was not created by this Document
+ if (__ownerDocument__(this) != __ownerDocument__(this)) {
+ throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+ }
+
+ // throw Exception if the node is an ancestor
+ if (__isAncestor__(this, newChild)) {
+ throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
+ }
+ }
+
+ // if the newChild is already in the tree,
+ var newChildParent = newChild.parentNode;
+ if (newChildParent) {
+ // remove it
+ //console.debug('removing node %s', newChild);
+ newChildParent.removeChild(newChild);
+ }
+
+ // add newChild to childNodes
+ __appendChild__(this.childNodes, newChild);
+
+ if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+ // do node pointer surgery for DocumentFragment
+ if (newChild.childNodes.length > 0) {
+ for (var ind = 0; ind < newChild.childNodes.length; ind++) {
+ newChild.childNodes[ind].parentNode = this;
+ }
+
+ if (this.lastChild) {
+ this.lastChild.nextSibling = newChild.childNodes[0];
+ newChild.childNodes[0].previousSibling = this.lastChild;
+ this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
+ } else {
+ this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
+ this.firstChild = newChild.childNodes[0];
+ }
+ }
+ } else {
+ // do node pointer surgery for newChild
+ newChild.parentNode = this;
+ if (this.lastChild) {
+ this.lastChild.nextSibling = newChild;
+ newChild.previousSibling = this.lastChild;
+ this.lastChild = newChild;
+ } else {
+ this.lastChild = newChild;
+ this.firstChild = newChild;
+ }
+ }
+ return newChild;
+ },
+ hasChildNodes : function() {
+ return (this.childNodes.length > 0);
+ },
+ cloneNode: function(deep) {
+ // use importNode to clone this Node
+ //do not throw any exceptions
+ try {
+ return __ownerDocument__(this).importNode(this, deep);
+ } catch (e) {
+ //there shouldn't be any exceptions, but if there are, return null
+ // may want to warn: $debug("could not clone node: "+e.code);
+ return null;
+ }
+ },
+ normalize : function() {
+ var i;
+ var inode;
+ var nodesToRemove = new NodeList();
+
+ if (this.nodeType == Node.ELEMENT_NODE || this.nodeType == Node.DOCUMENT_NODE) {
+ var adjacentTextNode = null;
+
+ // loop through all childNodes
+ for(i = 0; i < this.childNodes.length; i++) {
+ inode = this.childNodes.item(i);
+
+ if (inode.nodeType == Node.TEXT_NODE) {
+ // this node is a text node
+ if (inode.length < 1) {
+ // this text node is empty
+ // add this node to the list of nodes to be remove
+ __appendChild__(nodesToRemove, inode);
+ }else {
+ if (adjacentTextNode) {
+ // previous node was also text
+ adjacentTextNode.appendData(inode.data);
+ // merge the data in adjacent text nodes
+ // add this node to the list of nodes to be removed
+ __appendChild__(nodesToRemove, inode);
+ } else {
+ // remember this node for next cycle
+ adjacentTextNode = inode;
+ }
+ }
+ } else {
+ // (soon to be) previous node is not a text node
+ adjacentTextNode = null;
+ // normalize non Text childNodes
+ inode.normalize();
+ }
+ }
+
+ // remove redundant Text Nodes
+ for(i = 0; i < nodesToRemove.length; i++) {
+ inode = nodesToRemove.item(i);
+ inode.parentNode.removeChild(inode);
+ }
+ }
+ },
+ isSupported : function(feature, version) {
+ // use Implementation.hasFeature to determine if this feature is supported
+ return __ownerDocument__(this).implementation.hasFeature(feature, version);
+ },
+ getElementsByTagName : function(tagname) {
+ // delegate to _getElementsByTagNameRecursive
+ // recurse childNodes
+ var nodelist = new NodeList(__ownerDocument__(this));
+ for (var i = 0; i < this.childNodes.length; i++) {
+ __getElementsByTagNameRecursive__(this.childNodes.item(i),
+ tagname,
+ nodelist);
+ }
+ return nodelist;
+ },
+ getElementsByTagNameNS : function(namespaceURI, localName) {
+ // delegate to _getElementsByTagNameNSRecursive
+ return __getElementsByTagNameNSRecursive__(this, namespaceURI, localName,
+ new NodeList(__ownerDocument__(this)));
+ },
+ importNode : function(importedNode, deep) {
+ var i;
+ var importNode;
+
+ //there is no need to perform namespace checks since everything has already gone through them
+ //in order to have gotten into the DOM in the first place. The following line
+ //turns namespace checking off in ._isValidNamespace
+ __ownerDocument__(this).importing = true;
+
+ if (importedNode.nodeType == Node.ELEMENT_NODE) {
+ if (!__ownerDocument__(this).implementation.namespaceAware) {
+ // create a local Element (with the name of the importedNode)
+ importNode = __ownerDocument__(this).createElement(importedNode.tagName);
+
+ // create attributes matching those of the importedNode
+ for(i = 0; i < importedNode.attributes.length; i++) {
+ importNode.setAttribute(importedNode.attributes.item(i).name, importedNode.attributes.item(i).value);
+ }
+ } else {
+ // create a local Element (with the name & namespaceURI of the importedNode)
+ importNode = __ownerDocument__(this).createElementNS(importedNode.namespaceURI, importedNode.nodeName);
+
+ // create attributes matching those of the importedNode
+ for(i = 0; i < importedNode.attributes.length; i++) {
+ importNode.setAttributeNS(importedNode.attributes.item(i).namespaceURI,
+ importedNode.attributes.item(i).name, importedNode.attributes.item(i).value);
+ }
+
+ // create namespace definitions matching those of the importedNode
+ for(i = 0; i < importedNode._namespaces.length; i++) {
+ importNode._namespaces[i] = __ownerDocument__(this).createNamespace(importedNode._namespaces.item(i).localName);
+ importNode._namespaces[i].value = importedNode._namespaces.item(i).value;
+ }
+ }
+ } else if (importedNode.nodeType == Node.ATTRIBUTE_NODE) {
+ if (!__ownerDocument__(this).implementation.namespaceAware) {
+ // create a local Attribute (with the name of the importedAttribute)
+ importNode = __ownerDocument__(this).createAttribute(importedNode.name);
+ } else {
+ // create a local Attribute (with the name & namespaceURI of the importedAttribute)
+ importNode = __ownerDocument__(this).createAttributeNS(importedNode.namespaceURI, importedNode.nodeName);
+
+ // create namespace definitions matching those of the importedAttribute
+ for(i = 0; i < importedNode._namespaces.length; i++) {
+ importNode._namespaces[i] = __ownerDocument__(this).createNamespace(importedNode._namespaces.item(i).localName);
+ importNode._namespaces[i].value = importedNode._namespaces.item(i).value;
+ }
+ }
+
+ // set the value of the local Attribute to match that of the importedAttribute
+ importNode.value = importedNode.value;
+
+ } else if (importedNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
+ // create a local DocumentFragment
+ importNode = __ownerDocument__(this).createDocumentFragment();
+ } else if (importedNode.nodeType == Node.NAMESPACE_NODE) {
+ // create a local NamespaceNode (with the same name & value as the importedNode)
+ importNode = __ownerDocument__(this).createNamespace(importedNode.nodeName);
+ importNode.value = importedNode.value;
+ } else if (importedNode.nodeType == Node.TEXT_NODE) {
+ // create a local TextNode (with the
<TRUNCATED>
[39/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/test/vendor/qunit.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/test/vendor/qunit.js b/blackberry10/node_modules/jWorkflow/test/vendor/qunit.js
new file mode 100644
index 0000000..385f1e6
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/test/vendor/qunit.js
@@ -0,0 +1,997 @@
+/*
+ * QUnit - A JavaScript Unit Testing Framework
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright (c) 2009 John Resig, Jörn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ */
+
+(function(window) {
+
+var QUnit = {
+
+ // Initialize the configuration options
+ init: function init() {
+ config = {
+ stats: { all: 0, bad: 0 },
+ moduleStats: { all: 0, bad: 0 },
+ started: +new Date,
+ blocking: false,
+ autorun: false,
+ assertions: [],
+ filters: [],
+ queue: []
+ };
+
+ var tests = id("qunit-tests"),
+ banner = id("qunit-banner"),
+ result = id("qunit-testresult");
+
+ if ( tests ) {
+ tests.innerHTML = "";
+ }
+
+ if ( banner ) {
+ banner.className = "";
+ }
+
+ if ( result ) {
+ result.parentNode.removeChild( result );
+ }
+ },
+
+ // call on start of module test to prepend name to all tests
+ module: function module(name, testEnvironment) {
+
+ synchronize(function() {
+ if ( config.currentModule ) {
+ QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
+ }
+
+ config.currentModule = name;
+ config.moduleTestEnvironment = testEnvironment;
+ config.moduleStats = { all: 0, bad: 0 };
+
+ QUnit.moduleStart( name, testEnvironment );
+ });
+ },
+
+ asyncTest: function asyncTest(testName, expected, callback) {
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = 0;
+ }
+
+ QUnit.test(testName, expected, callback, true);
+ },
+
+ test: function test(testName, expected, callback, async) {
+ var name = testName, testEnvironment = {};
+
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+
+ if ( config.currentModule ) {
+ name = config.currentModule + " module: " + name;
+ }
+
+ if ( !validTest(name) ) {
+ return;
+ }
+
+ synchronize(function() {
+ QUnit.testStart( testName );
+
+ testEnvironment = extend({
+ setup: function() {},
+ teardown: function() {}
+ }, config.moduleTestEnvironment);
+
+ config.assertions = [];
+ config.expected = null;
+
+ if ( arguments.length >= 3 ) {
+ config.expected = callback;
+ callback = arguments[2];
+ }
+
+ try {
+ if ( !config.pollution ) {
+ saveGlobal();
+ }
+
+ testEnvironment.setup.call(testEnvironment);
+ } catch(e) {
+ QUnit.ok( false, "Setup failed on " + name + ": " + e.message );
+ }
+
+ if ( async ) {
+ QUnit.stop();
+ }
+
+ try {
+ callback.call(testEnvironment);
+ } catch(e) {
+ fail("Test " + name + " died, exception and test follows", e, callback);
+ QUnit.ok( false, "Died on test #" + (config.assertions.length + 1) + ": " + e.message );
+ // else next test will carry the responsibility
+ saveGlobal();
+
+ // Restart the tests if they're blocking
+ if ( config.blocking ) {
+ start();
+ }
+ }
+ });
+
+ synchronize(function() {
+ try {
+ checkPollution();
+ testEnvironment.teardown.call(testEnvironment);
+ } catch(e) {
+ QUnit.ok( false, "Teardown failed on " + name + ": " + e.message );
+ }
+
+ try {
+ QUnit.reset();
+ } catch(e) {
+ fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, reset);
+ }
+
+ if ( config.expected && config.expected != config.assertions.length ) {
+ QUnit.ok( false, "Expected " + config.expected + " assertions, but " + config.assertions.length + " were run" );
+ }
+
+ var good = 0, bad = 0,
+ tests = id("qunit-tests");
+
+ config.stats.all += config.assertions.length;
+ config.moduleStats.all += config.assertions.length;
+
+ if ( tests ) {
+ var ol = document.createElement("ol");
+ ol.style.display = "none";
+
+ for ( var i = 0; i < config.assertions.length; i++ ) {
+ var assertion = config.assertions[i];
+
+ var li = document.createElement("li");
+ li.className = assertion.result ? "pass" : "fail";
+ li.innerHTML = assertion.message || "(no message)";
+ ol.appendChild( li );
+
+ if ( assertion.result ) {
+ good++;
+ } else {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+
+ var b = document.createElement("strong");
+ b.innerHTML = name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + config.assertions.length + ")</b>";
+
+ addEvent(b, "click", function() {
+ var next = b.nextSibling, display = next.style.display;
+ next.style.display = display === "none" ? "block" : "none";
+ });
+
+ addEvent(b, "dblclick", function(e) {
+ var target = (e || window.event).target;
+ if ( target.nodeName.toLowerCase() === "strong" ) {
+ var text = "", node = target.firstChild;
+
+ while ( node.nodeType === 3 ) {
+ text += node.nodeValue;
+ node = node.nextSibling;
+ }
+
+ text = text.replace(/(^\s*|\s*$)/g, "");
+
+ if ( window.location ) {
+ window.location.href = window.location.href.match(/^(.+?)(\?.*)?$/)[1] + "?" + encodeURIComponent(text);
+ }
+ }
+ });
+
+ var li = document.createElement("li");
+ li.className = bad ? "fail" : "pass";
+ li.appendChild( b );
+ li.appendChild( ol );
+ tests.appendChild( li );
+
+ if ( bad ) {
+ var toolbar = id("qunit-testrunner-toolbar");
+ if ( toolbar ) {
+ toolbar.style.display = "block";
+ id("qunit-filter-pass").disabled = null;
+ id("qunit-filter-missing").disabled = null;
+ }
+ }
+
+ } else {
+ for ( var i = 0; i < config.assertions.length; i++ ) {
+ if ( !config.assertions[i].result ) {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+ }
+
+ QUnit.testDone( testName, bad, config.assertions.length );
+
+ if ( !window.setTimeout && !config.queue.length ) {
+ done();
+ }
+ });
+
+ if ( window.setTimeout && !config.doneTimer ) {
+ config.doneTimer = window.setTimeout(function(){
+ if ( !config.queue.length ) {
+ done();
+ } else {
+ synchronize( done );
+ }
+ }, 13);
+ }
+ },
+
+ /**
+ * Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
+ */
+ expect: function expect(asserts) {
+ config.expected = asserts;
+ },
+
+ /**
+ * Asserts true.
+ * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
+ */
+ ok: function ok(a, msg) {
+ QUnit.log(a, msg);
+
+ config.assertions.push({
+ result: !!a,
+ message: msg
+ });
+ },
+
+ /**
+ * Checks that the first two arguments are equal, with an optional message.
+ * Prints out both actual and expected values.
+ *
+ * Prefered to ok( actual == expected, message )
+ *
+ * @example equals( format("Received {0} bytes.", 2), "Received 2 bytes." );
+ *
+ * @param Object actual
+ * @param Object expected
+ * @param String message (optional)
+ */
+ equals: function equals(actual, expected, message) {
+ push(expected == actual, actual, expected, message);
+ },
+
+ same: function(a, b, message) {
+ push(QUnit.equiv(a, b), a, b, message);
+ },
+
+ start: function start() {
+ // A slight delay, to avoid any current callbacks
+ if ( window.setTimeout ) {
+ window.setTimeout(function() {
+ if ( config.timeout ) {
+ clearTimeout(config.timeout);
+ }
+
+ config.blocking = false;
+ process();
+ }, 13);
+ } else {
+ config.blocking = false;
+ process();
+ }
+ },
+
+ stop: function stop(timeout) {
+ config.blocking = true;
+
+ if ( timeout && window.setTimeout ) {
+ config.timeout = window.setTimeout(function() {
+ QUnit.ok( false, "Test timed out" );
+ QUnit.start();
+ }, timeout);
+ }
+ },
+
+ /**
+ * Resets the test setup. Useful for tests that modify the DOM.
+ */
+ reset: function reset() {
+ if ( window.jQuery ) {
+ jQuery("#main").html( config.fixture );
+ jQuery.event.global = {};
+ jQuery.ajaxSettings = extend({}, config.ajaxSettings);
+ }
+ },
+
+ /**
+ * Trigger an event on an element.
+ *
+ * @example triggerEvent( document.body, "click" );
+ *
+ * @param DOMElement elem
+ * @param String type
+ */
+ triggerEvent: function triggerEvent( elem, type, event ) {
+ if ( document.createEvent ) {
+ event = document.createEvent("MouseEvents");
+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+ elem.dispatchEvent( event );
+
+ } else if ( elem.fireEvent ) {
+ elem.fireEvent("on"+type);
+ }
+ },
+
+ // Logging callbacks
+ done: function done(failures, total) {},
+ log: function log(result, message) {},
+ testStart: function testStart(name) {},
+ testDone: function testDone(name, failures, total) {},
+ moduleStart: function moduleStart(name, testEnvironment) {},
+ moduleDone: function moduleDone(name, failures, total) {}
+};
+
+// Maintain internal state
+var config = {
+ // The queue of tests to run
+ queue: [],
+
+ // block until document ready
+ blocking: true
+};
+
+// Load paramaters
+(function() {
+ var location = window.location || { search: "", protocol: "file:" },
+ GETParams = location.search.slice(1).split('&');
+
+ for ( var i = 0; i < GETParams.length; i++ ) {
+ GETParams[i] = decodeURIComponent( GETParams[i] );
+ if ( GETParams[i] === "noglobals" ) {
+ GETParams.splice( i, 1 );
+ i--;
+ config.noglobals = true;
+ }
+ }
+
+ // restrict modules/tests by get parameters
+ config.filters = GETParams;
+
+ // Figure out if we're running the tests from a server or not
+ QUnit.isLocal = !!(location.protocol === 'file:');
+})();
+
+// Expose the API as global variables, unless an 'exports'
+// object exists, in that case we assume we're in CommonJS
+if ( typeof exports === "undefined" || typeof require === "undefined" ) {
+ extend(window, QUnit);
+ window.QUnit = QUnit;
+} else {
+ extend(exports, QUnit);
+ exports.QUnit = QUnit;
+}
+
+if ( typeof document === "undefined" || document.readyState === "complete" ) {
+ config.autorun = true;
+}
+
+addEvent(window, "load", function() {
+ // Initialize the config, saving the execution queue
+ var oldconfig = extend({}, config);
+ QUnit.init();
+ extend(config, oldconfig);
+
+ config.blocking = false;
+
+ var userAgent = id("qunit-userAgent");
+ if ( userAgent ) {
+ userAgent.innerHTML = navigator.userAgent;
+ }
+
+ var toolbar = id("qunit-testrunner-toolbar");
+ if ( toolbar ) {
+ toolbar.style.display = "none";
+
+ var filter = document.createElement("input");
+ filter.type = "checkbox";
+ filter.id = "qunit-filter-pass";
+ filter.disabled = true;
+ addEvent( filter, "click", function() {
+ var li = document.getElementsByTagName("li");
+ for ( var i = 0; i < li.length; i++ ) {
+ if ( li[i].className.indexOf("pass") > -1 ) {
+ li[i].style.display = filter.checked ? "none" : "block";
+ }
+ }
+ });
+ toolbar.appendChild( filter );
+
+ var label = document.createElement("label");
+ label.setAttribute("for", "filter-pass");
+ label.innerHTML = "Hide passed tests";
+ toolbar.appendChild( label );
+
+ var missing = document.createElement("input");
+ missing.type = "checkbox";
+ missing.id = "qunit-filter-missing";
+ missing.disabled = true;
+ addEvent( missing, "click", function() {
+ var li = document.getElementsByTagName("li");
+ for ( var i = 0; i < li.length; i++ ) {
+ if ( li[i].className.indexOf("fail") > -1 && li[i].innerHTML.indexOf('missing test - untested code is broken code') > - 1 ) {
+ li[i].parentNode.parentNode.style.display = missing.checked ? "none" : "block";
+ }
+ }
+ });
+ toolbar.appendChild( missing );
+
+ label = document.createElement("label");
+ label.setAttribute("for", "filter-missing");
+ label.innerHTML = "Hide missing tests (untested code is broken code)";
+ toolbar.appendChild( label );
+ }
+
+ var main = id('main');
+ if ( main ) {
+ config.fixture = main.innerHTML;
+ }
+
+ if ( window.jQuery ) {
+ config.ajaxSettings = window.jQuery.ajaxSettings;
+ }
+
+ QUnit.start();
+});
+
+function done() {
+ if ( config.doneTimer && window.clearTimeout ) {
+ window.clearTimeout( config.doneTimer );
+ config.doneTimer = null;
+ }
+
+ if ( config.queue.length ) {
+ config.doneTimer = window.setTimeout(function(){
+ if ( !config.queue.length ) {
+ done();
+ } else {
+ synchronize( done );
+ }
+ }, 13);
+
+ return;
+ }
+
+ config.autorun = true;
+
+ // Log the last module results
+ if ( config.currentModule ) {
+ QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
+ }
+
+ var banner = id("qunit-banner"),
+ tests = id("qunit-tests"),
+ html = ['Tests completed in ',
+ +new Date - config.started, ' milliseconds.<br/>',
+ '<span class="bad">', config.stats.all - config.stats.bad, '</span> tests of <span class="all">', config.stats.all, '</span> passed, ', config.stats.bad,' failed.'].join('');
+
+ if ( banner ) {
+ banner.className += " " + (config.stats.bad ? "fail" : "pass");
+ }
+
+ if ( tests ) {
+ var result = id("qunit-testresult");
+
+ if ( !result ) {
+ result = document.createElement("p");
+ result.id = "qunit-testresult";
+ result.className = "result";
+ tests.parentNode.insertBefore( result, tests.nextSibling );
+ }
+
+ result.innerHTML = html;
+ }
+
+ QUnit.done( config.stats.bad, config.stats.all );
+}
+
+function validTest( name ) {
+ var i = config.filters.length,
+ run = false;
+
+ if ( !i ) {
+ return true;
+ }
+
+ while ( i-- ) {
+ var filter = config.filters[i],
+ not = filter.charAt(0) == '!';
+
+ if ( not ) {
+ filter = filter.slice(1);
+ }
+
+ if ( name.indexOf(filter) !== -1 ) {
+ return !not;
+ }
+
+ if ( not ) {
+ run = true;
+ }
+ }
+
+ return run;
+}
+
+function push(result, actual, expected, message) {
+ message = message || (result ? "okay" : "failed");
+ QUnit.ok( result, result ? message + ": " + expected : message + ", expected: " + QUnit.jsDump.parse(expected) + " result: " + QUnit.jsDump.parse(actual) );
+}
+
+function synchronize( callback ) {
+ config.queue.push( callback );
+
+ if ( config.autorun && !config.blocking ) {
+ process();
+ }
+}
+
+function process() {
+ while ( config.queue.length && !config.blocking ) {
+ config.queue.shift()();
+ }
+}
+
+function saveGlobal() {
+ config.pollution = [];
+
+ if ( config.noglobals ) {
+ for ( var key in window ) {
+ config.pollution.push( key );
+ }
+ }
+}
+
+function checkPollution( name ) {
+ var old = config.pollution;
+ saveGlobal();
+
+ var newGlobals = diff( old, config.pollution );
+ if ( newGlobals.length > 0 ) {
+ ok( false, "Introduced global variable(s): " + newGlobals.join(", ") );
+ config.expected++;
+ }
+
+ var deletedGlobals = diff( config.pollution, old );
+ if ( deletedGlobals.length > 0 ) {
+ ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") );
+ config.expected++;
+ }
+}
+
+// returns a new Array with the elements that are in a but not in b
+function diff( a, b ) {
+ var result = a.slice();
+ for ( var i = 0; i < result.length; i++ ) {
+ for ( var j = 0; j < b.length; j++ ) {
+ if ( result[i] === b[j] ) {
+ result.splice(i, 1);
+ i--;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+function fail(message, exception, callback) {
+ if ( typeof console !== "undefined" && console.error && console.warn ) {
+ console.error(message);
+ console.error(exception);
+ console.warn(callback.toString());
+
+ } else if ( window.opera && opera.postError ) {
+ opera.postError(message, exception, callback.toString);
+ }
+}
+
+function extend(a, b) {
+ for ( var prop in b ) {
+ a[prop] = b[prop];
+ }
+
+ return a;
+}
+
+function addEvent(elem, type, fn) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, fn, false );
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, fn );
+ } else {
+ fn();
+ }
+}
+
+function id(name) {
+ return !!(typeof document !== "undefined" && document && document.getElementById) &&
+ document.getElementById( name );
+}
+
+// Test for equality any JavaScript type.
+// Discussions and reference: http://philrathe.com/articles/equiv
+// Test suites: http://philrathe.com/tests/equiv
+// Author: Philippe Rathé <pr...@gmail.com>
+QUnit.equiv = function () {
+
+ var innerEquiv; // the real equiv function
+ var callers = []; // stack to decide between skip/abort functions
+
+
+ // Determine what is o.
+ function hoozit(o) {
+ if (o.constructor === String) {
+ return "string";
+
+ } else if (o.constructor === Boolean) {
+ return "boolean";
+
+ } else if (o.constructor === Number) {
+
+ if (isNaN(o)) {
+ return "nan";
+ } else {
+ return "number";
+ }
+
+ } else if (typeof o === "undefined") {
+ return "undefined";
+
+ // consider: typeof null === object
+ } else if (o === null) {
+ return "null";
+
+ // consider: typeof [] === object
+ } else if (o instanceof Array) {
+ return "array";
+
+ // consider: typeof new Date() === object
+ } else if (o instanceof Date) {
+ return "date";
+
+ // consider: /./ instanceof Object;
+ // /./ instanceof RegExp;
+ // typeof /./ === "function"; // => false in IE and Opera,
+ // true in FF and Safari
+ } else if (o instanceof RegExp) {
+ return "regexp";
+
+ } else if (typeof o === "object") {
+ return "object";
+
+ } else if (o instanceof Function) {
+ return "function";
+ } else {
+ return undefined;
+ }
+ }
+
+ // Call the o related callback with the given arguments.
+ function bindCallbacks(o, callbacks, args) {
+ var prop = hoozit(o);
+ if (prop) {
+ if (hoozit(callbacks[prop]) === "function") {
+ return callbacks[prop].apply(callbacks, args);
+ } else {
+ return callbacks[prop]; // or undefined
+ }
+ }
+ }
+
+ var callbacks = function () {
+
+ // for string, boolean, number and null
+ function useStrictEquality(b, a) {
+ if (b instanceof a.constructor || a instanceof b.constructor) {
+ // to catch short annotaion VS 'new' annotation of a declaration
+ // e.g. var i = 1;
+ // var j = new Number(1);
+ return a == b;
+ } else {
+ return a === b;
+ }
+ }
+
+ return {
+ "string": useStrictEquality,
+ "boolean": useStrictEquality,
+ "number": useStrictEquality,
+ "null": useStrictEquality,
+ "undefined": useStrictEquality,
+
+ "nan": function (b) {
+ return isNaN(b);
+ },
+
+ "date": function (b, a) {
+ return hoozit(b) === "date" && a.valueOf() === b.valueOf();
+ },
+
+ "regexp": function (b, a) {
+ return hoozit(b) === "regexp" &&
+ a.source === b.source && // the regex itself
+ a.global === b.global && // and its modifers (gmi) ...
+ a.ignoreCase === b.ignoreCase &&
+ a.multiline === b.multiline;
+ },
+
+ // - skip when the property is a method of an instance (OOP)
+ // - abort otherwise,
+ // initial === would have catch identical references anyway
+ "function": function () {
+ var caller = callers[callers.length - 1];
+ return caller !== Object &&
+ typeof caller !== "undefined";
+ },
+
+ "array": function (b, a) {
+ var i;
+ var len;
+
+ // b could be an object literal here
+ if ( ! (hoozit(b) === "array")) {
+ return false;
+ }
+
+ len = a.length;
+ if (len !== b.length) { // safe and faster
+ return false;
+ }
+ for (i = 0; i < len; i++) {
+ if ( ! innerEquiv(a[i], b[i])) {
+ return false;
+ }
+ }
+ return true;
+ },
+
+ "object": function (b, a) {
+ var i;
+ var eq = true; // unless we can proove it
+ var aProperties = [], bProperties = []; // collection of strings
+
+ // comparing constructors is more strict than using instanceof
+ if ( a.constructor !== b.constructor) {
+ return false;
+ }
+
+ // stack constructor before traversing properties
+ callers.push(a.constructor);
+
+ for (i in a) { // be strict: don't ensures hasOwnProperty and go deep
+
+ aProperties.push(i); // collect a's properties
+
+ if ( ! innerEquiv(a[i], b[i])) {
+ eq = false;
+ }
+ }
+
+ callers.pop(); // unstack, we are done
+
+ for (i in b) {
+ bProperties.push(i); // collect b's properties
+ }
+
+ // Ensures identical properties name
+ return eq && innerEquiv(aProperties.sort(), bProperties.sort());
+ }
+ };
+ }();
+
+ innerEquiv = function () { // can take multiple arguments
+ var args = Array.prototype.slice.apply(arguments);
+ if (args.length < 2) {
+ return true; // end transition
+ }
+
+ return (function (a, b) {
+ if (a === b) {
+ return true; // catch the most you can
+ } else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || hoozit(a) !== hoozit(b)) {
+ return false; // don't lose time with error prone cases
+ } else {
+ return bindCallbacks(a, callbacks, [b, a]);
+ }
+
+ // apply transition with (1..n) arguments
+ })(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1));
+ };
+
+ return innerEquiv;
+
+}();
+
+/**
+ * jsDump
+ * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
+ * Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)
+ * Date: 5/15/2008
+ * @projectDescription Advanced and extensible data dumping for Javascript.
+ * @version 1.0.0
+ * @author Ariel Flesler
+ * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
+ */
+QUnit.jsDump = (function() {
+ function quote( str ) {
+ return '"' + str.toString().replace(/"/g, '\\"') + '"';
+ };
+ function literal( o ) {
+ return o + '';
+ };
+ function join( pre, arr, post ) {
+ var s = jsDump.separator(),
+ base = jsDump.indent(),
+ inner = jsDump.indent(1);
+ if ( arr.join )
+ arr = arr.join( ',' + s + inner );
+ if ( !arr )
+ return pre + post;
+ return [ pre, inner + arr, base + post ].join(s);
+ };
+ function array( arr ) {
+ var i = arr.length, ret = Array(i);
+ this.up();
+ while ( i-- )
+ ret[i] = this.parse( arr[i] );
+ this.down();
+ return join( '[', ret, ']' );
+ };
+
+ var reName = /^function (\w+)/;
+
+ var jsDump = {
+ parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance
+ var parser = this.parsers[ type || this.typeOf(obj) ];
+ type = typeof parser;
+
+ return type == 'function' ? parser.call( this, obj ) :
+ type == 'string' ? parser :
+ this.parsers.error;
+ },
+ typeOf:function( obj ) {
+ var type = typeof obj,
+ f = 'function';//we'll use it 3 times, save it
+ return type != 'object' && type != f ? type :
+ !obj ? 'null' :
+ obj.exec ? 'regexp' :// some browsers (FF) consider regexps functions
+ obj.getHours ? 'date' :
+ obj.scrollBy ? 'window' :
+ obj.nodeName == '#document' ? 'document' :
+ obj.nodeName ? 'node' :
+ obj.item ? 'nodelist' : // Safari reports nodelists as functions
+ obj.callee ? 'arguments' :
+ obj.call || obj.constructor != Array && //an array would also fall on this hack
+ (obj+'').indexOf(f) != -1 ? f : //IE reports functions like alert, as objects
+ 'length' in obj ? 'array' :
+ type;
+ },
+ separator:function() {
+ return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? ' ' : ' ';
+ },
+ indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
+ if ( !this.multiline )
+ return '';
+ var chr = this.indentChar;
+ if ( this.HTML )
+ chr = chr.replace(/\t/g,' ').replace(/ /g,' ');
+ return Array( this._depth_ + (extra||0) ).join(chr);
+ },
+ up:function( a ) {
+ this._depth_ += a || 1;
+ },
+ down:function( a ) {
+ this._depth_ -= a || 1;
+ },
+ setParser:function( name, parser ) {
+ this.parsers[name] = parser;
+ },
+ // The next 3 are exposed so you can use them
+ quote:quote,
+ literal:literal,
+ join:join,
+ //
+ _depth_: 1,
+ // This is the list of parsers, to modify them, use jsDump.setParser
+ parsers:{
+ window: '[Window]',
+ document: '[Document]',
+ error:'[ERROR]', //when no parser is found, shouldn't happen
+ unknown: '[Unknown]',
+ 'null':'null',
+ undefined:'undefined',
+ 'function':function( fn ) {
+ var ret = 'function',
+ name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE
+ if ( name )
+ ret += ' ' + name;
+ ret += '(';
+
+ ret = [ ret, this.parse( fn, 'functionArgs' ), '){'].join('');
+ return join( ret, this.parse(fn,'functionCode'), '}' );
+ },
+ array: array,
+ nodelist: array,
+ arguments: array,
+ object:function( map ) {
+ var ret = [ ];
+ this.up();
+ for ( var key in map )
+ ret.push( this.parse(key,'key') + ': ' + this.parse(map[key]) );
+ this.down();
+ return join( '{', ret, '}' );
+ },
+ node:function( node ) {
+ var open = this.HTML ? '<' : '<',
+ close = this.HTML ? '>' : '>';
+
+ var tag = node.nodeName.toLowerCase(),
+ ret = open + tag;
+
+ for ( var a in this.DOMAttrs ) {
+ var val = node[this.DOMAttrs[a]];
+ if ( val )
+ ret += ' ' + a + '=' + this.parse( val, 'attribute' );
+ }
+ return ret + close + open + '/' + tag + close;
+ },
+ functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function
+ var l = fn.length;
+ if ( !l ) return '';
+
+ var args = Array(l);
+ while ( l-- )
+ args[l] = String.fromCharCode(97+l);//97 is 'a'
+ return ' ' + args.join(', ') + ' ';
+ },
+ key:quote, //object calls it internally, the key part of an item in a map
+ functionCode:'[code]', //function calls it internally, it's the content of the function
+ attribute:quote, //node calls it internally, it's an html attribute value
+ string:quote,
+ date:quote,
+ regexp:literal, //regex
+ number:literal,
+ 'boolean':literal
+ },
+ DOMAttrs:{//attributes to dump from nodes, name=>realName
+ id:'id',
+ name:'name',
+ 'class':'className'
+ },
+ HTML:true,//if true, entities are escaped ( <, >, \t, space and \n )
+ indentChar:' ',//indentation unit
+ multiline:true //if true, items in a collection, are separated by a \n, else just a space.
+ };
+
+ return jsDump;
+})();
+
+})(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/Jakefile
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/Jakefile b/blackberry10/node_modules/jake/Jakefile
new file mode 100644
index 0000000..b7725cd
--- /dev/null
+++ b/blackberry10/node_modules/jake/Jakefile
@@ -0,0 +1,43 @@
+var fs = require('fs')
+ , path = require('path');
+
+var t = new jake.TestTask('Jake', function () {
+ this.testFiles.include('test/*.js');
+ this.testFiles.exclude('test/helpers.js');
+});
+
+namespace('doc', function () {
+ task('generate', ['doc:clobber'], function () {
+ var cmd = '../node-jsdoc-toolkit/app/run.js -n -r=100 ' +
+ '-t=../node-jsdoc-toolkit/templates/codeview -d=./doc/ ./lib';
+ jake.logger.log('Generating docs ...');
+ jake.exec([cmd], function () {
+ jake.logger.log('Done.');
+ complete();
+ });
+ }, {async: true});
+
+ task('clobber', function () {
+ var cmd = 'rm -fr ./doc/*';
+ jake.exec([cmd], function () {
+ jake.logger.log('Clobbered old docs.');
+ complete();
+ });
+ }, {async: true});
+
+});
+
+desc('Generate docs for Jake');
+task('doc', ['doc:generate']);
+
+var p = new jake.NpmPublishTask('jake', [
+ 'Makefile'
+, 'Jakefile'
+, 'README.md'
+, 'package.json'
+, 'lib/**'
+, 'bin/**'
+, 'test/**'
+]);
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/Makefile
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/Makefile b/blackberry10/node_modules/jake/Makefile
new file mode 100644
index 0000000..3d0574e
--- /dev/null
+++ b/blackberry10/node_modules/jake/Makefile
@@ -0,0 +1,44 @@
+#
+# Jake JavaScript build tool
+# Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+#
+# 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.
+#
+
+.PHONY: all build install clean uninstall
+
+PREFIX=/usr/local
+DESTDIR=
+
+all: build
+
+build:
+ @echo 'Jake built.'
+
+install:
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin && \
+ mkdir -p $(DESTDIR)$(PREFIX)/lib/node_modules/jake && \
+ mkdir -p ./node_modules && \
+ npm install utilities minimatch && \
+ cp -R ./* $(DESTDIR)$(PREFIX)/lib/node_modules/jake/ && \
+ ln -snf ../lib/node_modules/jake/bin/cli.js $(DESTDIR)$(PREFIX)/bin/jake && \
+ chmod 755 $(DESTDIR)$(PREFIX)/lib/node_modules/jake/bin/cli.js && \
+ echo 'Jake installed.'
+
+clean:
+ @true
+
+uninstall:
+ @rm -f $(DESTDIR)$(PREFIX)/bin/jake && \
+ rm -fr $(DESTDIR)$(PREFIX)/lib/node_modules/jake/ && \
+ echo 'Jake uninstalled.'
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/README.md b/blackberry10/node_modules/jake/README.md
new file mode 100644
index 0000000..5cb7cc9
--- /dev/null
+++ b/blackberry10/node_modules/jake/README.md
@@ -0,0 +1,946 @@
+### Jake -- JavaScript build tool for Node.js
+
+### Installing with [NPM](http://npmjs.org/)
+
+Install globally with:
+
+ npm install -g jake
+
+Or you may also install it as a development dependency in a package.json file:
+
+ // package.json
+ "devDependencies": {
+ "jake": "latest"
+ }
+
+Then install it with `npm install`
+
+Note Jake is intended to be mostly a command-line tool, but lately there have been
+changes to it so it can be either embedded, or run from inside your project.
+
+### Installing from source
+
+Prerequisites: Jake requires [Node.js](<http://nodejs.org/>), and the
+[utilities](https://npmjs.org/package/utilities) and
+[minimatch](https://npmjs.org/package/minimatch) modules.
+
+Get Jake:
+
+ git clone git://github.com/mde/jake.git
+
+Build Jake:
+
+ cd jake && make && sudo make install
+
+Even if you're installing Jake from source, you'll still need NPM for installing
+the few modules Jake depends on. `make install` will do this automatically for
+you.
+
+By default Jake is installed in "/usr/local." To install it into a different
+directory (e.g., one that doesn't require super-user privilege), pass the PREFIX
+variable to the `make install` command. For example, to install it into a
+"jake" directory in your home directory, you could use this:
+
+ make && make install PREFIX=~/jake
+
+If do you install Jake somewhere special, you'll need to add the "bin" directory
+in the install target to your PATH to get access to the `jake` executable.
+
+### Windows, installing from source
+
+For Windows users installing from source, there are some additional steps.
+
+*Assumed: current directory is the same directory where node.exe is present.*
+
+Get Jake:
+
+ git clone git://github.com/mde/jake.git node_modules/jake
+
+Copy jake.bat and jake to the same directory as node.exe
+
+ copy node_modules/jake/jake.bat jake.bat
+ copy node_modules/jake/jake jake
+
+Add the directory of node.exe to the environment PATH variable.
+
+### Basic usage
+
+ jake [options ...] [env variables ...] target
+
+### Description
+
+ Jake is a simple JavaScript build program with capabilities similar to the
+ regular make or rake command.
+
+ Jake has the following features:
+ * Jakefiles are in standard JavaScript syntax
+ * Tasks with prerequisites
+ * Namespaces for tasks
+ * Async task execution
+
+### Options
+
+ -V/v
+ --version Display the Jake version.
+
+ -h
+ --help Display help message.
+
+ -f *FILE*
+ --jakefile *FILE* Use FILE as the Jakefile.
+
+ -C *DIRECTORY*
+ --directory *DIRECTORY* Change to DIRECTORY before running tasks.
+
+ -q
+ --quiet Do not log messages to standard output.
+
+ -J *JAKELIBDIR*
+ --jakelibdir *JAKELIBDIR* Auto-import any .jake files in JAKELIBDIR.
+ (default is 'jakelib')
+
+ -B
+ --always-make Unconditionally make all targets.
+
+ -t
+ --trace Enable full backtrace.
+
+ -T/ls
+ --tasks Display the tasks (matching optional PATTERN)
+ with descriptions, then exit.
+
+### Jakefile syntax
+
+A Jakefile is just executable JavaScript. You can include whatever JavaScript
+you want in it.
+
+## API Docs
+
+API docs [can be found here](http://mde.github.com/jake/doc/).
+
+## Tasks
+
+Use `task` to define tasks. It has one required argument, the task-name, and
+three optional arguments:
+
+```javascript
+task(name, [prerequisites], [action], [opts]);
+```
+
+The `name` argument is a String with the name of the task, and `prerequisites`
+is an optional Array arg of the list of prerequisite tasks to perform first.
+
+The `action` is a Function defininng the action to take for the task. (Note that
+Object-literal syntax for name/prerequisites in a single argument a la Rake is
+also supported, but JavaScript's lack of support for dynamic keys in Object
+literals makes it not very useful.) The action is invoked with the Task object
+itself as the execution context (i.e, "this" inside the action references the
+Task object).
+
+The `opts` argument is the normal JavaScript-style 'options' object. When a
+task's operations are asynchronous, the `async` property should be set to
+`true`, and the task must call `complete()` to signal to Jake that the task is
+done, and execution can proceed. By default the `async` property is `false`.
+
+Tasks created with `task` are always executed when asked for (or are a
+prerequisite). Tasks created with `file` are only executed if no file with the
+given name exists or if any of its file-prerequisites are more recent than the
+file named by the task. Also, if any prerequisite is a regular task, the file
+task will always be executed.
+
+Use `desc` to add a string description of the task.
+
+Here's an example:
+
+```javascript
+desc('This is the default task.');
+task('default', function (params) {
+ console.log('This is the default task.');
+});
+
+desc('This task has prerequisites.');
+task('hasPrereqs', ['foo', 'bar', 'baz'], function (params) {
+ console.log('Ran some prereqs first.');
+});
+```
+
+And here's an example of an asynchronous task:
+
+```javascript
+desc('This is an asynchronous task.');
+task('asyncTask', {async: true}, function () {
+ setTimeout(complete, 1000);
+});
+```
+
+A Task is also an EventEmitter which emits the 'complete' event when it is
+finished. This allows asynchronous tasks to be run from within other asked via
+either `invoke` or `execute`, and ensure they will complete before the rest of
+the containing task executes. See the section "Running tasks from within other
+tasks," below.
+
+### File-tasks
+
+Create a file-task by calling `file`.
+
+File-tasks create a file from one or more other files. With a file-task, Jake
+checks both that the file exists, and also that it is not older than the files
+specified by any prerequisite tasks. File-tasks are particularly useful for
+compiling something from a tree of source files.
+
+```javascript
+desc('This builds a minified JS file for production.');
+file('foo-minified.js', ['bar', 'foo-bar.js', 'foo-baz.js'], function () {
+ // Code to concat and minify goes here
+});
+```
+
+### Directory-tasks
+
+Create a directory-task by calling `directory`.
+
+Directory-tasks create a directory for use with for file-tasks. Jake checks for
+the existence of the directory, and only creates it if needed.
+
+```javascript
+desc('This creates the bar directory for use with the foo-minified.js file-task.');
+directory('bar');
+```
+
+This task will create the directory when used as a prerequisite for a file-task,
+or when run from the command-line.
+
+### Namespaces
+
+Use `namespace` to create a namespace of tasks to perform. Call it with two arguments:
+
+```javascript
+namespace(name, namespaceTasks);
+```
+
+Where is `name` is the name of the namespace, and `namespaceTasks` is a function
+with calls inside it to `task` or `desc` definining all the tasks for that
+namespace.
+
+Here's an example:
+
+```javascript
+desc('This is the default task.');
+task('default', function () {
+ console.log('This is the default task.');
+});
+
+namespace('foo', function () {
+ desc('This the foo:bar task');
+ task('bar', function () {
+ console.log('doing foo:bar task');
+ });
+
+ desc('This the foo:baz task');
+ task('baz', ['default', 'foo:bar'], function () {
+ console.log('doing foo:baz task');
+ });
+
+});
+```
+
+In this example, the foo:baz task depends on the the default and foo:bar tasks.
+
+### Passing parameters to jake
+
+Parameters can be passed to Jake two ways: plain arguments, and environment
+variables.
+
+To pass positional arguments to the Jake tasks, enclose them in square braces,
+separated by commas, after the name of the task on the command-line. For
+example, with the following Jakefile:
+
+```javascript
+desc('This is an awesome task.');
+task('awesome', function (a, b, c) {
+ console.log(a, b, c);
+});
+```
+
+You could run `jake` like this:
+
+ jake awesome[foo,bar,baz]
+
+And you'd get the following output:
+
+ foo bar baz
+
+Note that you *cannot* uses spaces between the commas separating the parameters.
+
+Any parameters passed after the Jake task that contain an equals sign (=) will
+be added to process.env.
+
+With the following Jakefile:
+
+```javascript
+desc('This is an awesome task.');
+task('awesome', function (a, b, c) {
+ console.log(a, b, c);
+ console.log(process.env.qux, process.env.frang);
+});
+```
+
+You could run `jake` like this:
+
+ jake awesome[foo,bar,baz] qux=zoobie frang=asdf
+
+And you'd get the following output:
+
+ foo bar baz
+ zoobie asdf
+Running `jake` with no arguments runs the default task.
+
+__Note for zsh users__ : you will need to escape the brackets or wrap in single
+quotes like this to pass parameters :
+
+ jake 'awesome[foo,bar,baz]'
+
+An other solution is to desactivate permannently file-globbing for the `jake`
+command. You can do this by adding this line to your `.zshrc` file :
+
+ alias jake="noglob jake"
+
+### Cleanup after all tasks run, jake 'complete' event
+
+The base 'jake' object is an EventEmitter, and fires a 'complete' event after
+running all tasks.
+
+This is sometimes useful when a task starts a process which keeps the Node
+event-loop running (e.g., a database connection). If you know you want to stop
+the running Node process after all tasks have finished, you can set a listener
+for the 'complete' event, like so:
+
+```javascript
+jake.addListener('complete', function () {
+ process.exit();
+});
+```
+
+### Running tasks from within other tasks
+
+Jake supports the ability to run a task from within another task via the
+`invoke` and `execute` methods.
+
+The `invoke` method will run the desired task, along with its prerequisites:
+
+```javascript
+desc('Calls the foo:bar task and its prerequisites.');
+task('invokeFooBar', function () {
+ // Calls foo:bar and its prereqs
+ jake.Task['foo:bar'].invoke();
+});
+```
+
+The `invoke` method will only run the task once, even if you call it repeatedly.
+
+```javascript
+desc('Calls the foo:bar task and its prerequisites.');
+task('invokeFooBar', function () {
+ // Calls foo:bar and its prereqs
+ jake.Task['foo:bar'].invoke();
+ // Does nothing
+ jake.Task['foo:bar'].invoke();
+});
+```
+
+The `execute` method will run the desired task without its prerequisites:
+
+```javascript
+desc('Calls the foo:bar task without its prerequisites.');
+task('executeFooBar', function () {
+ // Calls foo:bar without its prereqs
+ jake.Task['foo:baz'].execute();
+});
+```
+
+Calling `execute` repeatedly will run the desired task repeatedly.
+
+```javascript
+desc('Calls the foo:bar task without its prerequisites.');
+task('executeFooBar', function () {
+ // Calls foo:bar without its prereqs
+ jake.Task['foo:baz'].execute();
+ // Can keep running this over and over
+ jake.Task['foo:baz'].execute();
+ jake.Task['foo:baz'].execute();
+});
+```
+
+If you want to run the task and its prerequisites more than once, you can use
+`invoke` with the `reenable` method.
+
+```javascript
+desc('Calls the foo:bar task and its prerequisites.');
+task('invokeFooBar', function () {
+ // Calls foo:bar and its prereqs
+ jake.Task['foo:bar'].invoke();
+ // Does nothing
+ jake.Task['foo:bar'].invoke();
+ // Only re-runs foo:bar, but not its prerequisites
+ jake.Task['foo:bar'].reenable();
+ jake.Task['foo:bar'].invoke();
+});
+```
+
+The `reenable` method takes a single Boolean arg, a 'deep' flag, which reenables
+the task's prerequisites if set to true.
+
+```javascript
+desc('Calls the foo:bar task and its prerequisites.');
+task('invokeFooBar', function () {
+ // Calls foo:bar and its prereqs
+ jake.Task['foo:bar'].invoke();
+ // Does nothing
+ jake.Task['foo:bar'].invoke();
+ // Re-runs foo:bar and all of its prerequisites
+ jake.Task['foo:bar'].reenable(true);
+ jake.Task['foo:bar'].invoke();
+});
+```
+
+It's easy to pass params on to a sub-task run via `invoke` or `execute`:
+
+```javascript
+desc('Passes params on to other tasks.');
+task('passParams', function () {
+ var t = jake.Task['foo:bar'];
+ // Calls foo:bar, passing along current args
+ t.invoke.apply(t, arguments);
+});
+```
+
+### Managing asynchrony without prereqs (e.g., when using `invoke`)
+
+You can mix sync and async without problems when using normal prereqs, because
+the Jake execution loop takes care of the difference for you. But when you call
+`invoke` or `execute`, you have to manage the asynchrony yourself.
+
+Here's a correct working example:
+
+```javascript
+task('async1', ['async2'], {async: true}, function () {
+ console.log('-- async1 start ----------------');
+ setTimeout(function () {
+ console.log('-- async1 done ----------------');
+ complete();
+ }, 1000);
+});
+
+task('async2', {async: true}, function () {
+ console.log('-- async2 start ----------------');
+ setTimeout(function () {
+ console.log('-- async2 done ----------------');
+ complete();
+ }, 500);
+});
+
+task('init', ['async1', 'async2'], {async: true}, function () {
+ console.log('-- init start ----------------');
+ setTimeout(function () {
+ console.log('-- init done ----------------');
+ complete();
+ }, 100);
+});
+
+task('default', {async: true}, function () {
+ console.log('-- default start ----------------');
+ var init = jake.Task.init;
+ init.addListener('complete', function () {
+ console.log('-- default done ----------------');
+ complete();
+ });
+ init.invoke();
+});
+```
+
+You have to declare the "default" task as asynchronous as well, and call
+`complete` on it when "init" finishes. Here's the output:
+
+ -- default start ----------------
+ -- async2 start ----------------
+ -- async2 done ----------------
+ -- async1 start ----------------
+ -- async1 done ----------------
+ -- init start ----------------
+ -- init done ----------------
+ -- default done ----------------
+
+You get what you expect -- "default" starts, the rest runs, and finally
+"default" finishes.
+
+### Evented tasks
+
+Tasks are EventEmitters. They can fire 'complete' and 'error' events.
+
+If a task called via `invoke` is asynchronous, you can set a listener on the
+'complete' event to run any code that depends on it.
+
+```javascript
+desc('Calls the async foo:baz task and its prerequisites.');
+task('invokeFooBaz', {async: true}, function () {
+ var t = jake.Task['foo:baz'];
+ t.addListener('complete', function () {
+ console.log('Finished executing foo:baz');
+ // Maybe run some other code
+ // ...
+ // Complete the containing task
+ complete();
+ });
+ // Kick off foo:baz
+ t.invoke();
+});
+```
+
+If you want to handle the errors in a task in some specific way, you can set a
+listener for the 'error' event, like so:
+
+```javascript
+namespace('vronk', function () {
+ task('groo', function () {
+ var t = jake.Task['vronk:zong'];
+ t.addListener('error', function (e) {
+ console.log(e.message);
+ });
+ t.invoke();
+ });
+
+ task('zong', function () {
+ throw new Error('OMFGZONG');
+ });
+});
+```
+
+If no specific listener is set for the "error" event, errors are handled by
+Jake's generic error-handling.
+
+### Aborting a task
+
+You can abort a task by calling the `fail` function, and Jake will abort the
+currently running task. You can pass a customized error message to `fail`:
+
+```javascript
+desc('This task fails.');
+task('failTask', function () {
+ fail('Yikes. Something back happened.');
+});
+```
+
+You can also pass an optional exit status-code to the fail command, like so:
+
+```javascript
+desc('This task fails with an exit-status of 42.');
+task('failTaskQuestionCustomStatus', function () {
+ fail('What is the answer?', 42);
+});
+```
+
+The process will exit with a status of 42.
+
+Uncaught errors will also abort the currently running task.
+
+### Showing the list of tasks
+
+Passing `jake` the -T or --tasks flag will display the full list of tasks
+available in a Jakefile, along with their descriptions:
+
+ $ jake -T
+ jake default # This is the default task.
+ jake asdf # This is the asdf task.
+ jake concat.txt # File task, concating two files together
+ jake failure # Failing task.
+ jake lookup # Jake task lookup by name.
+ jake foo:bar # This the foo:bar task
+ jake foo:fonebone # This the foo:fonebone task
+
+Setting a value for -T/--tasks will filter the list by that value:
+
+ $ jake -T foo
+ jake foo:bar # This the foo:bar task
+ jake foo:fonebone # This the foo:fonebone task
+
+The list displayed will be all tasks whose namespace/name contain the filter-string.
+
+## Breaking things up into multiple files
+
+Jake will automatically look for files with a .jake extension in a 'jakelib'
+directory in your project, and load them (via `require`) after loading your
+Jakefile. (The directory name can be overridden using the -J/--jakelibdir
+command-line option.)
+
+This allows you to break your tasks up over multiple files -- a good way to do
+it is one namespace per file: e.g., a `zardoz` namespace full of tasks in
+'jakelib/zardox.jake'.
+
+Note that these .jake files each run in their own module-context, so they don't
+have access to each others' data. However, the Jake API methods, and the
+task-hierarchy are globally available, so you can use tasks in any file as
+prerequisites for tasks in any other, just as if everything were in a single
+file.
+
+Environment-variables set on the command-line are likewise also naturally
+available to code in all files via process.env.
+
+## File-utils
+
+Since shelling out in Node is an asynchronous operation, Jake comes with a few
+useful file-utilities with a synchronous API, that make scripting easier.
+
+The `jake.mkdirP` utility recursively creates a set of nested directories. It
+will not throw an error if any of the directories already exists. Here's an example:
+
+```javascript
+jake.mkdirP('app/views/layouts');
+```
+
+The `jake.cpR` utility does a recursive copy of a file or directory. It takes
+two arguments, the file/directory to copy, and the destination. Note that this
+command can only copy files and directories; it does not perform globbing (so
+arguments like '*.txt' are not possible).
+
+```javascript
+jake.cpR(path.join(sourceDir, '/templates'), currentDir);
+```
+
+This would copy 'templates' (and all its contents) into `currentDir`.
+
+The `jake.readdirR` utility gives you a recursive directory listing, giving you
+output somewhat similar to the Unix `find` command. It only works with a
+directory name, and does not perform filtering or globbing.
+
+```javascript
+jake.readdirR('pkg');
+```
+
+This would return an array of filepaths for all files in the 'pkg' directory,
+and all its subdirectories.
+
+The `jake.rmRf` utility recursively removes a directory and all its contents.
+
+```javascript
+jake.rmRf('pkg');
+```
+
+This would remove the 'pkg' directory, and all its contents.
+
+## Running shell-commands: `jake.exec` and `jake.createExec`
+
+Jake also provides a more general utility function for running a sequence of
+shell-commands.
+
+### `jake.exec`
+
+The `jake.exec` command takes an array of shell-command strings, and an optional
+callback to run after completing them. Here's an example from Jake's Jakefile,
+that runs the tests:
+
+```javascript
+desc('Runs the Jake tests.');
+task('test', {async: true}, function () {
+ var cmds = [
+ 'node ./tests/parseargs.js'
+ , 'node ./tests/task_base.js'
+ , 'node ./tests/file_task.js'
+ ];
+ jake.exec(cmds, {printStdout: true}, function () {
+ console.log('All tests passed.');
+ complete();
+ });
+
+desc('Runs some apps in interactive mode.');
+task('interactiveTask', {async: true}, function () {
+ var cmds = [
+ 'node' // Node conosle
+ , 'vim' // Open Vim
+ ];
+ jake.exec(cmds, {interactive: true}, function () {
+ complete();
+ });
+});
+```
+
+It also takes an optional options-object, with the following options:
+
+ * `interactive` (tasks are interactive, trumps printStdout and
+ printStderr below, default false)
+
+ * `printStdout` (print to stdout, default false)
+
+ * `printStderr` (print to stderr, default false)
+
+ * `breakOnError` (stop execution on error, default true)
+
+This command doesn't pipe input between commands -- it's for simple execution.
+
+### `jake.createExec` and the evented Exec object
+
+Jake also provides an evented interface for running shell commands. Calling
+`jake.createExec` returns an instance of `jake.Exec`, which is an `EventEmitter`
+that fires events as it executes commands.
+
+It emits the following events:
+
+* 'cmdStart': When a new command begins to run. Passes one arg, the command
+being run.
+
+* 'cmdEnd': When a command finishes. Passes one arg, the command
+being run.
+
+* 'stdout': When the stdout for the child-process recieves data. This streams
+the stdout data. Passes one arg, the chunk of data.
+
+* 'stderr': When the stderr for the child-process recieves data. This streams
+the stderr data. Passes one arg, the chunk of data.
+
+* 'error': When a shell-command exits with a non-zero status-code. Passes two
+args -- the error message, and the status code. If you do not set an error
+handler, and a command exits with an error-code, Jake will throw the unhandled
+error. If `breakOnError` is set to true, the Exec object will emit and 'error'
+event after the first error, and stop any further execution.
+
+To begin running the commands, you have to call the `run` method on it. It also
+has an `append` method for adding new commands to the list of commands to run.
+
+Here's an example:
+
+```javascript
+var ex = jake.createExec(['do_thing.sh'], {printStdout: true});
+ex.addListener('error', function (msg, code) {
+ if (code == 127) {
+ console.log("Couldn't find do_thing script, trying do_other_thing");
+ ex.append('do_other_thing.sh');
+ }
+ else {
+ fail('Fatal error: ' + msg, code);
+ }
+});
+ex.run();
+```
+
+Using the evented Exec object gives you a lot more flexibility in running shell
+commmands. But if you need something more sophisticated, Procstreams
+(<https://github.com/polotek/procstreams>) might be a good option.
+
+## Logging and output
+
+Using the -q/--quiet flag at the command-line will stop Jake from sending its
+normal output to standard output. Note that this only applies to built-in output
+from Jake; anything you output normally from your tasks will still be displayed.
+
+If you want to take advantage of the -q/--quiet flag in your own programs, you
+can use `jake.logger.log` and `jake.logger.error` for displaying output. These
+two commands will respect the flag, and suppress output correctly when the
+quiet-flag is on.
+
+You can check the current value of this flag in your own tasks by using
+`jake.program.opts.quiet`. If you want the output of a `jake.exec` shell-command
+to respect the quiet-flag, set your `printStdout` and `printStderr` options to
+false if the quiet-option is on:
+
+```javascript
+task('echo', {async: true}, function () {
+ jake.exec(['echo "hello"'], function () {
+ jake.logger.log('Done.');
+ complete();
+ }, {printStdout: !jake.program.opts.quiet});
+});
+```
+
+## PackageTask
+
+Instantiating a PackageTask programmically creates a set of tasks for packaging
+up your project for distribution. Here's an example:
+
+```javascript
+var t = new jake.PackageTask('fonebone', 'v0.1.2112', function () {
+ var fileList = [
+ 'Jakefile'
+ , 'README.md'
+ , 'package.json'
+ , 'lib/*'
+ , 'bin/*'
+ , 'tests/*'
+ ];
+ this.packageFiles.include(fileList);
+ this.needTarGz = true;
+ this.needTarBz2 = true;
+});
+```
+
+This will automatically create a 'package' task that will assemble the specified
+files in 'pkg/fonebone-v0.1.2112,' and compress them according to the specified
+options. After running `jake package`, you'll have the following in pkg/:
+
+ fonebone-v0.1.2112
+ fonebone-v0.1.2112.tar.bz2
+ fonebone-v0.1.2112.tar.gz
+
+PackageTask also creates a 'clobber' task that removes the pkg/
+directory.
+
+The [PackageTask API
+docs](http://mde.github.com/jake/doc/symbols/jake.PackageTask.html) include a
+lot more information, including different archiving options.
+
+### FileList
+
+Jake's FileList takes a list of glob-patterns and file-names, and lazy-creates a
+list of files to include. Instead of immediately searching the filesystem to
+find the files, a FileList holds the pattern until it is actually used.
+
+When any of the normal JavaScript Array methods (or the `toArray` method) are
+called on the FileList, the pending patterns are resolved into an actual list of
+file-names. FileList uses the [minimatch](https://github.com/isaacs/minimatch) module.
+
+To build the list of files, use FileList's `include` and `exclude` methods:
+
+```javascript
+var list = new jake.FileList();
+list.include('foo/*.txt');
+list.include(['bar/*.txt', 'README.md']);
+list.include('Makefile', 'package.json');
+list.exclude('foo/zoobie.txt');
+list.exclude(/foo\/src.*.txt/);
+console.log(list.toArray());
+```
+
+The `include` method can be called either with an array of items, or multiple
+single parameters. Items can be either glob-patterns, or individual file-names.
+
+The `exclude` method will prevent files from being included in the list. These
+files must resolve to actual files on the filesystem. It can be called either
+with an array of items, or mutliple single parameters. Items can be
+glob-patterns, individual file-names, string-representations of
+regular-expressions, or regular-expression literals.
+
+## TestTask
+
+Instantiating a TestTask programmically creates a simple task for running tests
+for your project. The first argument of the constructor is the project-name
+(used in the description of the task), and the second argument is a function
+that defines the task. It allows you to specifify what files to run as tests,
+and what to name the task that gets created (defaults to "test" if unset).
+
+```javascript
+var t = new jake.TestTask('fonebone', function () {
+ var fileList = [
+ 'tests/*'
+ , 'lib/adapters/**/test.js'
+ ];
+ this.testFiles.include(fileList);
+ this.testFiles.exclude('tests/helper.js');
+ this.testName = 'testMainAndAdapters';
+});
+```
+
+Tests in the specified file should be in the very simple format of
+test-functions hung off the export. These tests are converted into Jake tasks
+which Jake then runs normally.
+
+If a test needs to run asynchronously, simply define the test-function with a
+single argument, a callback. Jake will define this as an asynchronous task, and
+will wait until the callback is called in the test function to run the next test.
+
+Here's an example test-file:
+
+```javascript
+var assert = require('assert')
+ , tests;
+
+tests = {
+ 'sync test': function () {
+ // Assert something
+ assert.ok(true);
+ }
+, 'async test': function (next) {
+ // Assert something else
+ assert.ok(true);
+ // Won't go next until this is called
+ next();
+ }
+, 'another sync test': function () {
+ // Assert something else
+ assert.ok(true);
+ }
+};
+
+module.exports = tests;
+```
+
+Jake's tests are also a good example of use of a TestTask.
+
+## NpmPublishTask
+
+The NpmPublishTask builds on top of PackageTask to allow you to do a version
+bump of your project, package it, and publish it to NPM. Define the task with
+your project's name, and the list of files you want packaged and published to
+NPM.
+
+Here's an example from Jake's Jakefile:
+
+```javascript
+var p = new jake.NpmPublishTask('jake', [
+ 'Makefile'
+, 'Jakefile'
+, 'README.md'
+, 'package.json'
+, 'lib/*'
+, 'bin/*'
+, 'tests/*'
+]);
+```
+
+The NpmPublishTask will automatically create a `publish` task which performs the
+following steps:
+
+1. Bump the version number in your package.json
+2. Commit change in git, push it to GitHub
+3. Create a git tag for the version
+4. Push the tag to GitHub
+5. Package the new version of your project
+6. Publish it to NPM
+7. Clean up the package
+
+## CoffeeScript Jakefiles
+
+Jake can also handle Jakefiles in CoffeeScript. Be sure to make it
+Jakefile.coffee so Jake knows it's in CoffeeScript.
+
+Here's an example:
+
+```coffeescript
+util = require('util')
+
+desc 'This is the default task.'
+task 'default', (params) ->
+ console.log 'Ths is the default task.'
+ console.log(util.inspect(arguments))
+ jake.Task['new'].invoke []
+
+task 'new', ->
+ console.log 'ello from new'
+ jake.Task['foo:next'].invoke ['param']
+
+namespace 'foo', ->
+ task 'next', (param) ->
+ console.log 'ello from next with param: ' + param
+```
+
+## Related projects
+
+James Coglan's "Jake": <http://github.com/jcoglan/jake>
+
+Confusingly, this is a Ruby tool for building JavaScript packages from source code.
+
+280 North's Jake: <http://github.com/280north/jake>
+
+This is also a JavaScript port of Rake, which runs on the Narwhal platform.
+
+### License
+
+Licensed under the Apache License, Version 2.0
+(<http://www.apache.org/licenses/LICENSE-2.0>)
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/bin/cli.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/bin/cli.js b/blackberry10/node_modules/jake/bin/cli.js
new file mode 100755
index 0000000..e241f2b
--- /dev/null
+++ b/blackberry10/node_modules/jake/bin/cli.js
@@ -0,0 +1,23 @@
+#!/usr/bin/env node
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 args = process.argv.slice(2)
+ , jake = require('../lib/jake');
+
+jake.run.apply(jake, args);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/api.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/api.js b/blackberry10/node_modules/jake/lib/api.js
new file mode 100644
index 0000000..97d7c78
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/api.js
@@ -0,0 +1,241 @@
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 exec = require('child_process').exec;
+
+var api = new (function () {
+ /**
+ @name task
+ @static
+ @function
+ @description Creates a Jake Task
+ `
+ @param {String} name The name of the Task
+ @param {Array} [prereqs] Prerequisites to be run before this task
+ @param {Function} [action] The action to perform for this task
+ @param {Object} [opts]
+ @param {Boolean} [opts.asyc=false] Perform this task asynchronously.
+ If you flag a task with this option, you must call the global
+ `complete` method inside the task's action, for execution to proceed
+ to the next task.
+
+ @example
+ desc('This is the default task.');
+ task('default', function (params) {
+ console.log('This is the default task.');
+ });
+
+ desc('This task has prerequisites.');
+ task('hasPrereqs', ['foo', 'bar', 'baz'], function (params) {
+ console.log('Ran some prereqs first.');
+ });
+
+ desc('This is an asynchronous task.');
+ task('asyncTask', function () {
+ setTimeout(complete, 1000);
+ }, {async: true});
+ */
+ this.task = function (name, prereqs, action, opts) {
+ var args = Array.prototype.slice.call(arguments)
+ , type
+ , createdTask;
+ args.unshift('task');
+ createdTask = jake.createTask.apply(global, args);
+ jake.currentTaskDescription = null;
+ return createdTask;
+ };
+
+ /**
+ @name directory
+ @static
+ @function
+ @description Creates a Jake DirectoryTask. Can be used as a prerequisite
+ for FileTasks, or for simply ensuring a directory exists for use with a
+ Task's action.
+ `
+ @param {String} name The name of the DiretoryTask
+
+ @example
+
+ // Creates the package directory for distribution
+ directory('pkg');
+ */
+ this.directory = function (name) {
+ var args = Array.prototype.slice.call(arguments)
+ , createdTask;
+ args.unshift('directory');
+ createdTask = jake.createTask.apply(global, args);
+ jake.currentTaskDescription = null;
+ return createdTask;
+ };
+
+ /**
+ @name file
+ @static
+ @function
+ @description Creates a Jake FileTask.
+ `
+ @param {String} name The name of the FileTask
+ @param {Array} [prereqs] Prerequisites to be run before this task
+ @param {Function} [action] The action to create this file, if it doesn't
+ exist already.
+ @param {Object} [opts]
+ @param {Array} [opts.asyc=false] Perform this task asynchronously.
+ If you flag a task with this option, you must call the global
+ `complete` method inside the task's action, for execution to proceed
+ to the next task.
+
+ */
+ this.file = function (name, prereqs, action, opts) {
+ var args = Array.prototype.slice.call(arguments)
+ , createdTask;
+ args.unshift('file');
+ createdTask = jake.createTask.apply(global, args);
+ jake.currentTaskDescription = null;
+ return createdTask;
+ };
+
+ /**
+ @name desc
+ @static
+ @function
+ @description Creates a description for a Jake Task (or FileTask,
+ DirectoryTask). When invoked, the description that iscreated will
+ be associated with whatever Task is created next.
+ `
+ @param {String} description The description for the Task
+ */
+ this.desc = function (description) {
+ jake.currentTaskDescription = description;
+ };
+
+ /**
+ @name namespace
+ @static
+ @function
+ @description Creates a namespace which allows logical grouping
+ of tasks, and prevents name-collisions with task-names. Namespaces
+ can be nested inside of other namespaces.
+ `
+ @param {String} name The name of the namespace
+ @param {Function} scope The enclosing scope for the namespaced tasks
+
+ @example
+ namespace('doc', function () {
+ task('generate', ['doc:clobber'], function () {
+ // Generate some docs
+ });
+
+ task('clobber', function () {
+ // Clobber the doc directory first
+ });
+ });
+ */
+ this.namespace = function (name, scope) {
+ var curr = jake.currentNamespace
+ , ns = curr.childNamespaces[name] || new jake.Namespace(name, curr);
+ curr.childNamespaces[name] = ns;
+ jake.currentNamespace = ns;
+ scope();
+ jake.currentNamespace = curr;
+ jake.currentTaskDescription = null;
+ return ns;
+ };
+
+ /**
+ @name complete
+ @static
+ @function
+ @description Complets an asynchronous task, allowing Jake's
+ execution to proceed to the next task
+ `
+ @example
+ task('generate', ['doc:clobber'], function () {
+ exec('./generate_docs.sh', function (err, stdout, stderr) {
+ if (err || stderr) {
+ fail(err || stderr);
+ }
+ else {
+ console.log(stdout);
+ complete();
+ }
+ });
+ }, {async: true});
+ */
+ this.complete = function () {
+ var current = jake._invocationChain.pop();
+ if (current) {
+ current.complete();
+ }
+ };
+
+ /**
+ @name fail
+ @static
+ @function
+ @description Causes Jake execution to abort with an error.
+ Allows passing an optional error code, which will be used to
+ set the exit-code of exiting process.
+ `
+ @param {Error|String} err The error to thow when aborting execution.
+ If this argument is an Error object, it will simply be thrown. If
+ a String, it will be used as the error-message. (If it is a multi-line
+ String, the first line will be used as the Error message, and the
+ remaining lines will be used as the error-stack.)
+
+ @example
+ task('createTests, function () {
+ if (!fs.existsSync('./tests')) {
+ fail('Test directory does not exist.');
+ }
+ else {
+ // Do some testing stuff ...
+ }
+ });
+ */
+ this.fail = function (err, code) {
+ var msg
+ , errObj;
+ if (code) {
+ jake.errorCode = code;
+ }
+ if (err) {
+ if (typeof err == 'string') {
+ // Use the initial or only line of the error as the error-message
+ // If there was a multi-line error, use the rest as the stack
+ msg = err.split('/n');
+ errObj = new Error(msg.shift());
+ if (msg.length) {
+ errObj.stack = msg.join('\n');
+ }
+ throw errObj;
+ }
+ else if (err instanceof Error) {
+ throw err;
+ }
+ else {
+ throw new Error(err.toString());
+ }
+ }
+ else {
+ throw new Error();
+ }
+ };
+
+})();
+
+module.exports = api;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/file_list.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/file_list.js b/blackberry10/node_modules/jake/lib/file_list.js
new file mode 100644
index 0000000..6bf8401
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/file_list.js
@@ -0,0 +1,287 @@
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 fs = require('fs')
+, path = require('path')
+, minimatch = require('minimatch')
+, utils = require('utilities')
+, globSync;
+
+globSync = function (pat) {
+ var dirname = jake.basedir(pat)
+ , files = jake.readdirR(dirname)
+ , matches;
+ pat = path.normalize(pat);
+ // Hack, Minimatch doesn't support backslashes in the pattern
+ // https://github.com/isaacs/minimatch/issues/7
+ pat = pat.replace(/\\/g, '/');
+ matches = minimatch.match(files, pat, {});
+ return matches;
+};
+
+// Constants
+// ---------------
+// List of all the builtin Array methods we want to override
+var ARRAY_METHODS = Object.getOwnPropertyNames(Array.prototype)
+// Array methods that return a copy instead of affecting the original
+ , SPECIAL_RETURN = {
+ 'concat': true
+ , 'slice': true
+ , 'filter': true
+ , 'map': true
+ }
+// Default file-patterns we want to ignore
+ , DEFAULT_IGNORE_PATTERNS = [
+ /(^|[\/\\])CVS([\/\\]|$)/
+ , /(^|[\/\\])\.svn([\/\\]|$)/
+ , /(^|[\/\\])\.git([\/\\]|$)/
+ , /\.bak$/
+ , /~$/
+ ]
+// Ignore core files
+ , DEFAULT_IGNORE_FUNCS = [
+ function (name) {
+ var isDir = false
+ , stats;
+ try {
+ stats = fs.statSync(name);
+ isDir = stats.isDirectory();
+ }
+ catch(e) {}
+ return (/(^|[\/\\])core$/).test(name) && !isDir;
+ }
+ ];
+
+var FileList = function () {
+ var self = this
+ , wrap;
+
+ // List of glob-patterns or specific filenames
+ this.pendingAdd = [];
+ // Switched to false after lazy-eval of files
+ this.pending = true;
+ // Used to calculate exclusions from the list of files
+ this.excludes = {
+ pats: DEFAULT_IGNORE_PATTERNS.slice()
+ , funcs: DEFAULT_IGNORE_FUNCS.slice()
+ , regex: null
+ };
+ this.items = [];
+
+ // Wrap the array methods with the delegates
+ wrap = function (prop) {
+ var arr;
+ self[prop] = function () {
+ if (self.pending) {
+ self.resolve();
+ }
+ if (typeof self.items[prop] == 'function') {
+ // Special method that return a copy
+ if (SPECIAL_RETURN[prop]) {
+ arr = self.items[prop].apply(self.items, arguments);
+ return FileList.clone(self, arr);
+ }
+ else {
+ return self.items[prop].apply(self.items, arguments);
+ }
+ }
+ else {
+ return self.items[prop];
+ }
+ };
+ };
+ for (var i = 0, ii = ARRAY_METHODS.length; i < ii; i++) {
+ wrap(ARRAY_METHODS[i]);
+ }
+
+ // Include whatever files got passed to the constructor
+ this.include.apply(this, arguments);
+
+ // Fix constructor linkage
+ this.constructor = FileList;
+};
+
+FileList.prototype = new (function () {
+ var globPattern = /[*?\[\{]/;
+
+ var _addMatching = function (pat) {
+ var matches = globSync(pat);
+ this.items = this.items.concat(matches);
+ }
+
+ , _resolveAdd = function (name) {
+ if (globPattern.test(name)) {
+ _addMatching.call(this, name);
+ }
+ else {
+ this.push(name);
+ }
+ }
+
+ , _calculateExcludeRe = function () {
+ var pats = this.excludes.pats
+ , pat
+ , excl = []
+ , matches = [];
+
+ for (var i = 0, ii = pats.length; i < ii; i++) {
+ pat = pats[i];
+ if (typeof pat == 'string') {
+ // Glob, look up files
+ if (/[*?]/.test(pat)) {
+ matches = globSync(pat);
+ matches = matches.map(function (m) {
+ return utils.string.escapeRegExpChars(m);
+ });
+ excl = excl.concat(matches);
+ }
+ // String for regex
+ else {
+ excl.push(utils.string.escapeRegExpChars(pat));
+ }
+ }
+ // Regex, grab the string-representation
+ else if (pat instanceof RegExp) {
+ excl.push(pat.toString().replace(/^\/|\/$/g, ''));
+ }
+ }
+ if (excl.length) {
+ this.excludes.regex = new RegExp('(' + excl.join(')|(') + ')');
+ }
+ else {
+ this.excludes.regex = /^$/;
+ }
+ }
+
+ , _resolveExclude = function () {
+ var self = this;
+ _calculateExcludeRe.call(this);
+ // No `reject` method, so use reverse-filter
+ this.items = this.items.filter(function (name) {
+ return !self.shouldExclude(name);
+ });
+ }
+
+ /**
+ * Includes file-patterns in the FileList. Should be called with one or more
+ * pattern for finding file to include in the list. Arguments should be strings
+ * for either a glob-pattern or a specific file-name, or an array of them
+ */
+ this.include = function () {
+ var args = Array.isArray(arguments[0]) ? arguments[0] : arguments;
+ for (var i = 0, ii = args.length; i < ii; i++) {
+ this.pendingAdd.push(args[i]);
+ }
+ return this;
+ };
+
+ /**
+ * Indicates whether a particular file would be filtered out by the current
+ * exclusion rules for this FileList.
+ * @param {String} name The filename to check
+ * @return {Boolean} Whether or not the file should be excluded
+ */
+ this.shouldExclude = function (name) {
+ if (!this.excludes.regex) {
+ _calculateExcludeRe.call(this);
+ }
+ var excl = this.excludes;
+ return excl.regex.test(name) || excl.funcs.some(function (f) {
+ return !!f(name);
+ });
+ };
+
+ /**
+ * Excludes file-patterns from the FileList. Should be called with one or more
+ * pattern for finding file to include in the list. Arguments can be:
+ * 1. Strings for either a glob-pattern or a specific file-name
+ * 2. Regular expression literals
+ * 3. Functions to be run on the filename that return a true/false
+ */
+ this.exclude = function () {
+ var args = Array.isArray(arguments[0]) ? arguments[0] : arguments
+ , arg;
+ for (var i = 0, ii = args.length; i < ii; i++) {
+ arg = args[i];
+ if (typeof arg == 'function' && !(arg instanceof RegExp)) {
+ this.excludes.funcs.push(arg);
+ }
+ else {
+ this.excludes.pats.push(arg);
+ }
+ }
+ if (!this.pending) {
+ _resolveExclude.call(this);
+ }
+ return this;
+ };
+
+ /**
+ * Populates the FileList from the include/exclude rules with a list of
+ * actual files
+ */
+ this.resolve = function () {
+ var name;
+ if (this.pending) {
+ this.pending = false;
+ while ((name = this.pendingAdd.shift())) {
+ _resolveAdd.call(this, name);
+ }
+ _resolveExclude.call(this);
+ }
+ return this;
+ };
+
+ /**
+ * Convert to a plain-jane array
+ */
+ this.toArray = function () {
+ // Call slice to ensure lazy-resolution before slicing items
+ var ret = this.slice().items.slice();
+ return ret;
+ };
+
+ /**
+ * Get rid of any current exclusion rules
+ */
+ this.clearExclude = function () {
+ this.excludes = {
+ pats: []
+ , funcs: []
+ , regex: null
+ };
+ return this;
+ };
+
+})();
+
+// Static method, used to create copy returned by special
+// array methods
+FileList.clone = function (list, items) {
+ var clone = new FileList();
+ if (items) {
+ clone.items = items;
+ }
+ clone.pendingAdd = list.pendingAdd;
+ clone.pending = list.pending;
+ for (var p in list.excludes) {
+ clone.excludes[p] = list.excludes[p];
+ }
+ return clone;
+};
+
+exports.FileList = FileList;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/jake.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/jake.js b/blackberry10/node_modules/jake/lib/jake.js
new file mode 100644
index 0000000..e271342
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/jake.js
@@ -0,0 +1,280 @@
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 jake
+ , EventEmitter = require('events').EventEmitter
+ , fs = require('fs')
+ , path = require('path')
+ , taskNs = require('./task')
+ , Task = taskNs.Task
+ , FileTask = taskNs.FileTask
+ , DirectoryTask = taskNs.DirectoryTask
+ , api = require('./api')
+ , utils = require('./utils')
+ , Program = require('./program').Program
+ , Loader = require('./loader').Loader
+ , pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json').toString());
+
+var Namespace = function (name, parentNamespace) {
+ this.name = name;
+ this.parentNamespace = parentNamespace;
+ this.childNamespaces = {};
+ this.tasks = {};
+
+ this.resolve = function(relativeName) {
+ var parts = relativeName.split(':')
+ , name = parts.pop()
+ , ns = this
+ , task;
+ for(var i = 0, l = parts.length; ns && i < l; i++) {
+ ns = ns.childNamespaces[parts[i]];
+ }
+
+ return (ns && ns.tasks[name]) ||
+ (this.parentNamespace && this.parentNamespace.resolve(relativeName));
+ }
+
+};
+
+var Invocation = function (taskName, args) {
+ this.taskName = taskName;
+ this.args = args;
+};
+
+// And so it begins
+jake = new EventEmitter();
+
+// Globalize jake and top-level API methods (e.g., `task`, `desc`)
+global.jake = jake;
+utils.mixin(global, api);
+
+// Copy utils onto base jake
+utils.mixin(jake, utils);
+// File utils should be aliased directly on base jake as well
+utils.mixin(jake, utils.file);
+
+utils.mixin(jake, new (function () {
+
+ this._invocationChain = [];
+
+ // Private variables
+ // =================
+ // Local reference for scopage
+ var self = this;
+
+ // Public properties
+ // =================
+ this.version = pkg.version;
+ // Used when Jake exits with a specific error-code
+ this.errorCode = undefined;
+ // Loads Jakefiles/jakelibdirs
+ this.loader = new Loader();
+ // Name/value map of all the various tasks defined in a Jakefile.
+ // Non-namespaced tasks are placed into 'default.'
+ this.defaultNamespace = new Namespace('default', null);
+ // For namespaced tasks -- tasks with no namespace are put into the
+ // 'default' namespace so lookup code can work the same for both
+ // namespaced and non-namespaced.
+ this.currentNamespace = this.defaultNamespace;
+ // Saves the description created by a 'desc' call that prefaces a
+ // 'task' call that defines a task.
+ this.currentTaskDescription = null;
+ this.program = new Program()
+ this.FileList = require('./file_list').FileList;
+ this.PackageTask = require('./package_task').PackageTask;
+ this.NpmPublishTask = require('./npm_publish_task').NpmPublishTask;
+ this.TestTask = require('./test_task').TestTask;
+ this.Task = Task;
+ this.FileTask = FileTask;
+ this.DirectoryTask = DirectoryTask;
+ this.Namespace = Namespace;
+
+ this.parseAllTasks = function () {
+ var _parseNs = function (name, ns) {
+ var nsTasks = ns.tasks
+ , task
+ , nsNamespaces = ns.childNamespaces
+ , fullName;
+ // Iterate through the tasks in each namespace
+ for (var q in nsTasks) {
+ task = nsTasks[q];
+ // Preface only the namespaced tasks
+ fullName = name == 'default' ? q : name + ':' + q;
+ // Save with 'taskname' or 'namespace:taskname' key
+ task.fullName = fullName;
+ jake.Task[fullName] = task;
+ }
+ for (var p in nsNamespaces) {
+ fullName = name == 'default' ? p : name + ':' + p;
+ _parseNs(fullName, nsNamespaces[p]);
+ }
+ };
+
+ _parseNs('default', jake.defaultNamespace);
+ };
+
+ /**
+ * Displays the list of descriptions avaliable for tasks defined in
+ * a Jakefile
+ */
+ this.showAllTaskDescriptions = function (f) {
+ var maxTaskNameLength = 0
+ , task
+ , str = ''
+ , padding
+ , name
+ , descr
+ , filter = typeof f == 'string' ? f : null;
+
+ for (var p in jake.Task) {
+ task = jake.Task[p];
+ // Record the length of the longest task name -- used for
+ // pretty alignment of the task descriptions
+ maxTaskNameLength = p.length > maxTaskNameLength ?
+ p.length : maxTaskNameLength;
+ }
+ // Print out each entry with descriptions neatly aligned
+ for (var p in jake.Task) {
+ if (filter && p.indexOf(filter) == -1) {
+ continue;
+ }
+ task = jake.Task[p];
+
+ name = '\033[32m' + p + '\033[39m ';
+
+ // Create padding-string with calculated length
+ padding = (new Array(maxTaskNameLength - p.length + 2)).join(' ');
+
+ descr = task.description
+ if (descr) {
+ descr = '\033[90m # ' + descr + '\033[39m \033[37m \033[39m';
+ console.log('jake ' + name + padding + descr);
+ }
+ }
+ };
+
+ this.createTask = function () {
+ var args = Array.prototype.slice.call(arguments)
+ , arg
+ , task
+ , type
+ , name
+ , action
+ , opts = {}
+ , prereqs = [];
+
+ type = args.shift()
+
+ // name, [deps], [action]
+ // Name (string) + deps (array) format
+ if (typeof args[0] == 'string') {
+ name = args.shift();
+ if (Array.isArray(args[0])) {
+ prereqs = args.shift();
+ }
+ }
+ // name:deps, [action]
+ // Legacy object-literal syntax, e.g.: {'name': ['depA', 'depB']}
+ else {
+ obj = args.shift()
+ for (var p in obj) {
+ prereqs = prereqs.concat(obj[p]);
+ name = p;
+ }
+ }
+
+ // Optional opts/callback or callback/opts
+ while ((arg = args.shift())) {
+ if (typeof arg == 'function') {
+ action = arg;
+ }
+ else {
+ opts = arg;
+ }
+ }
+
+ task = jake.currentNamespace.resolve(name);
+ if (task && !action) {
+ // Task already exists and no action, just update prereqs, and return it.
+ task.prereqs = task.prereqs.concat(prereqs);
+ return task;
+ }
+
+ switch (type) {
+ case 'directory':
+ action = function () {
+ jake.mkdirP(name);
+ };
+ task = new DirectoryTask(name, prereqs, action, opts);
+ break;
+ case 'file':
+ task = new FileTask(name, prereqs, action, opts);
+ break;
+ default:
+ task = new Task(name, prereqs, action, opts);
+ }
+
+ if (jake.currentTaskDescription) {
+ task.description = jake.currentTaskDescription;
+ jake.currentTaskDescription = null;
+ }
+ jake.currentNamespace.tasks[name] = task;
+ task.namespace = jake.currentNamespace;
+
+ // FIXME: Should only need to add a new entry for the current
+ // task-definition, not reparse the entire structure
+ jake.parseAllTasks();
+
+ return task;
+ };
+
+ this.init = function () {
+ var self = this;
+ process.addListener('uncaughtException', function (err) {
+ self.program.handleErr(err);
+ });
+
+ };
+
+ this.run = function () {
+ var args = Array.prototype.slice.call(arguments)
+ , program = this.program
+ , loader = this.loader
+ , preempt
+ , opts;
+
+ program.parseArgs(args);
+ program.init();
+
+ preempt = program.firstPreemptiveOption();
+ if (preempt) {
+ preempt();
+ }
+ else {
+ opts = program.opts;
+ // Load Jakefile and jakelibdir files
+ loader.loadFile(opts.jakefile);
+ loader.loadDirectory(opts.jakelibdir);
+
+ program.run();
+ }
+ };
+
+})());
+
+module.exports = jake;
[16/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/CONTRIBUTING.md b/blackberry10/node_modules/jasmine-node/node_modules/underscore/CONTRIBUTING.md
new file mode 100644
index 0000000..e133ebe
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/underscore/CONTRIBUTING.md
@@ -0,0 +1,9 @@
+## How to contribute to Underscore.js
+
+* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/underscore/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one.
+
+* Before sending a pull request for a feature, be sure to have [tests](http://underscorejs.org/test/).
+
+* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/underscore/blob/master/underscore.js).
+
+* In your pull request, do not add documentation or re-build the minified `underscore-min.js` file. We'll do those things before cutting a new release.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/LICENSE b/blackberry10/node_modules/jasmine-node/node_modules/underscore/LICENSE
new file mode 100644
index 0000000..3acf908
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/underscore/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative
+Reporters & Editors
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/README.md b/blackberry10/node_modules/jasmine-node/node_modules/underscore/README.md
new file mode 100644
index 0000000..c2ba259
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/underscore/README.md
@@ -0,0 +1,22 @@
+ __
+ /\ \ __
+ __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____
+ /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\
+ \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\
+ \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/
+ \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/
+ \ \____/
+ \/___/
+
+Underscore.js is a utility-belt library for JavaScript that provides
+support for the usual functional suspects (each, map, reduce, filter...)
+without extending any core JavaScript objects.
+
+For Docs, License, Tests, and pre-packed downloads, see:
+http://underscorejs.org
+
+Underscore is an open-sourced component of DocumentCloud:
+https://github.com/documentcloud
+
+Many thanks to our contributors:
+https://github.com/jashkenas/underscore/contributors
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/favicon.ico
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/favicon.ico b/blackberry10/node_modules/jasmine-node/node_modules/underscore/favicon.ico
new file mode 100644
index 0000000..0304968
Binary files /dev/null and b/blackberry10/node_modules/jasmine-node/node_modules/underscore/favicon.ico differ
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/index.js b/blackberry10/node_modules/jasmine-node/node_modules/underscore/index.js
new file mode 100644
index 0000000..2cf0ca5
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/underscore/index.js
@@ -0,0 +1 @@
+module.exports = require('./underscore');
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/package.json b/blackberry10/node_modules/jasmine-node/node_modules/underscore/package.json
new file mode 100644
index 0000000..0d9ace4
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/underscore/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "underscore",
+ "description": "JavaScript's functional programming helper library.",
+ "homepage": "http://underscorejs.org",
+ "keywords": [
+ "util",
+ "functional",
+ "server",
+ "client",
+ "browser"
+ ],
+ "author": {
+ "name": "Jeremy Ashkenas",
+ "email": "jeremy@documentcloud.org"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/jashkenas/underscore.git"
+ },
+ "main": "underscore.js",
+ "version": "1.5.1",
+ "devDependencies": {
+ "phantomjs": "1.9.0-1"
+ },
+ "scripts": {
+ "test": "phantomjs test/vendor/runner.js test/index.html?noglobals=true"
+ },
+ "license": "MIT",
+ "readme": " __\n /\\ \\ __\n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____\n /\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\\n \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/\n \\ \\____/\n \\/___/\n\nUnderscore.js is a utility-belt library for JavaScript that provides\nsupport for the usu
al functional suspects (each, map, reduce, filter...)\nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://underscorejs.org\n\nUnderscore is an open-sourced component of DocumentCloud:\nhttps://github.com/documentcloud\n\nMany thanks to our contributors:\nhttps://github.com/jashkenas/underscore/contributors\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/jashkenas/underscore/issues"
+ },
+ "_id": "underscore@1.5.1",
+ "dist": {
+ "shasum": "d2bde817d176ffade894ab71458e682a14b86dc9"
+ },
+ "_from": "underscore@>= 1.3.1",
+ "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.5.1.tgz"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/underscore-min.map
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/underscore-min.map b/blackberry10/node_modules/jasmine-node/node_modules/underscore/underscore-min.map
new file mode 100644
index 0000000..fee224f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/underscore/underscore-min.map
@@ -0,0 +1 @@
+{"version":3,"file":"underscore-min.js","sources":["underscore.js"],"names":["root","this","previousUnderscore","_","breaker","ArrayProto","Array","prototype","ObjProto","Object","FuncProto","Function","push","slice","concat","toString","hasOwnProperty","nativeForEach","forEach","nativeMap","map","nativeReduce","reduce","nativeReduceRight","reduceRight","nativeFilter","filter","nativeEvery","every","nativeSome","some","nativeIndexOf","indexOf","nativeLastIndexOf","lastIndexOf","nativeIsArray","isArray","nativeKeys","keys","nativeBind","bind","obj","_wrapped","exports","module","VERSION","each","iterator","context","length","i","l","call","key","has","collect","results","value","index","list","reduceError","foldl","inject","memo","initial","arguments","TypeError","foldr","find","detect","result","any","select","reject","all","identity","contains","include","target","invoke","method","args","isFunc","isFunction","apply","pluck","where","attrs","first","isEmpty","findWhere","max","Math
","Infinity","computed","min","shuffle","rand","shuffled","random","lookupIterator","sortBy","criteria","sort","left","right","a","b","group","behavior","groupBy","countBy","sortedIndex","array","low","high","mid","toArray","values","size","head","take","n","guard","last","rest","tail","drop","compact","flatten","input","shallow","output","isArguments","without","difference","uniq","unique","isSorted","seen","union","intersection","item","other","zip","object","from","hasIndex","range","start","stop","step","len","ceil","idx","ctor","func","bound","self","partial","bindAll","funcs","Error","f","memoize","hasher","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","Date","now","remaining","clearTimeout","trailing","debounce","immediate","callNow","once","ran","wrap","wrapper","compose","after","times","pairs","invert","functions","methods","names","extend","source","prop","pick","copy","omit","defaults","clone","isObject","tap","interceptor
","eq","aStack","bStack","className","String","global","multiline","ignoreCase","aCtor","constructor","bCtor","pop","isEqual","isString","isElement","nodeType","name","isFinite","isNaN","parseFloat","isNumber","isBoolean","isNull","isUndefined","noConflict","accum","floor","entityMap","escape","&","<",">","\"","'","/","unescape","entityRegexes","RegExp","join","string","replace","match","property","mixin","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","\t","
","
","escaper","template","text","data","settings","render","matcher","offset","variable","e","chain","_chain"],"mappings":";;;;CAKA,WAME,GAAIA,GAAOC,KAGPC,EAAqBF,EAAKG,EAG1BC,KAGAC,EAAaC,MAAMC,UAAWC,EAAWC,OAAOF,UAAWG,EAAYC,SAASJ,UAIlFK,EAAmBP,EAAWO,KAC9BC,EAAmBR,EAAWQ,MAC9BC,EAAmBT,EAAWS,OAC9BC,EAAmBP,EAASO,SAC5BC,EAAmBR,EAASQ,eAK5BC,EAAqBZ,EAAWa,QAChCC,EAAqBd,EAAWe,IAChCC,EAAqBhB,EAAWiB,OAChCC,EAAqBlB,EAAWmB,YAChCC,EAAqBpB,EAAWqB,OAChCC,EAAqBtB,EAAWuB,MA
ChCC,EAAqBxB,EAAWyB,KAChCC,EAAqB1B,EAAW2B,QAChCC,EAAqB5B,EAAW6B,YAChCC,EAAqB7B,MAAM8B,QAC3BC,EAAqB5B,OAAO6B,KAC5BC,EAAqB7B,EAAU8B,KAG7BrC,EAAI,SAASsC,GACf,MAAIA,aAAetC,GAAUsC,EACvBxC,eAAgBE,IACtBF,KAAKyC,SAAWD,EAAhBxC,QADiC,GAAIE,GAAEsC,GAQlB,oBAAZE,UACa,mBAAXC,SAA0BA,OAAOD,UAC1CA,QAAUC,OAAOD,QAAUxC,GAE7BwC,QAAQxC,EAAIA,GAEZH,EAAKG,EAAIA,EAIXA,EAAE0C,QAAU,OAQZ,IAAIC,GAAO3C,EAAE2C,KAAO3C,EAAEe,QAAU,SAASuB,EAAKM,EAAUC,GACtD,GAAW,MAAPP,EACJ,GAAIxB,GAAiBwB,EAAIvB,UAAYD,EACnCwB,EAAIvB,QAAQ6B,EAAUC,OACjB,IAAIP,EAAIQ,UAAYR,EAAIQ,QAC7B,IAAK,GAAIC,GAAI,EAAGC,EAAIV,EAAIQ,OAAYE,EAAJD,EAAOA,IACrC,GAAIH,EAASK,KAAKJ,EAASP,EAAIS,GAAIA,EAAGT,KAASrC,EAAS,WAG1D,KAAK,GAAIiD,KAAOZ,GACd,GAAItC,EAAEmD,IAAIb,EAAKY,IACTN,EAASK,KAAKJ,EAASP,EAAIY,GAAMA,EAAKZ,KAASrC,EAAS,OAQpED,GAAEiB,IAAMjB,EAAEoD,QAAU,SAASd,EAAKM,EAAUC,GAC1C,GAAIQ,KACJ,OAAW,OAAPf,EAAoBe,EACpBrC,GAAasB,EAAIrB,MAAQD,EAAkBsB,EAAIrB,IAAI2B,EAAUC,IACjEF,EAAKL,EAAK,SAASgB,EAAOC,EAAOC,GAC/BH,EAAQ5C,KAAKmC,EAASK,KAAKJ,EAASS,EAAOC,EAAOC,MAE7CH,GAGT,
IAAII,GAAc,6CAIlBzD,GAAEmB,OAASnB,EAAE0D,MAAQ1D,EAAE2D,OAAS,SAASrB,EAAKM,EAAUgB,EAAMf,GAC5D,GAAIgB,GAAUC,UAAUhB,OAAS,CAEjC,IADW,MAAPR,IAAaA,MACbpB,GAAgBoB,EAAInB,SAAWD,EAEjC,MADI2B,KAASD,EAAW5C,EAAEqC,KAAKO,EAAUC,IAClCgB,EAAUvB,EAAInB,OAAOyB,EAAUgB,GAAQtB,EAAInB,OAAOyB,EAU3D,IARAD,EAAKL,EAAK,SAASgB,EAAOC,EAAOC,GAC1BK,EAIHD,EAAOhB,EAASK,KAAKJ,EAASe,EAAMN,EAAOC,EAAOC,IAHlDI,EAAON,EACPO,GAAU,MAKTA,EAAS,KAAM,IAAIE,WAAUN,EAClC,OAAOG,IAKT5D,EAAEqB,YAAcrB,EAAEgE,MAAQ,SAAS1B,EAAKM,EAAUgB,EAAMf,GACtD,GAAIgB,GAAUC,UAAUhB,OAAS,CAEjC,IADW,MAAPR,IAAaA,MACblB,GAAqBkB,EAAIjB,cAAgBD,EAE3C,MADIyB,KAASD,EAAW5C,EAAEqC,KAAKO,EAAUC,IAClCgB,EAAUvB,EAAIjB,YAAYuB,EAAUgB,GAAQtB,EAAIjB,YAAYuB,EAErE,IAAIE,GAASR,EAAIQ,MACjB,IAAIA,KAAYA,EAAQ,CACtB,GAAIX,GAAOnC,EAAEmC,KAAKG,EAClBQ,GAASX,EAAKW,OAWhB,GATAH,EAAKL,EAAK,SAASgB,EAAOC,EAAOC,GAC/BD,EAAQpB,EAAOA,IAAOW,KAAYA,EAC7Be,EAIHD,EAAOhB,EAASK,KAAKJ,EAASe,EAAMtB,EAAIiB,GAAQA,EAAOC,IAHvDI,EAAOtB,EAAIiB,GACXM,GAAU,MAKTA,EAAS,KAAM,IAAIE,WAAUN,EAClC,OAAOG,IAIT5D,EAAEiE
,KAAOjE,EAAEkE,OAAS,SAAS5B,EAAKM,EAAUC,GAC1C,GAAIsB,EAOJ,OANAC,GAAI9B,EAAK,SAASgB,EAAOC,EAAOC,GAC9B,MAAIZ,GAASK,KAAKJ,EAASS,EAAOC,EAAOC,IACvCW,EAASb,GACF,GAFT,SAKKa,GAMTnE,EAAEuB,OAASvB,EAAEqE,OAAS,SAAS/B,EAAKM,EAAUC,GAC5C,GAAIQ,KACJ,OAAW,OAAPf,EAAoBe,EACpB/B,GAAgBgB,EAAIf,SAAWD,EAAqBgB,EAAIf,OAAOqB,EAAUC,IAC7EF,EAAKL,EAAK,SAASgB,EAAOC,EAAOC,GAC3BZ,EAASK,KAAKJ,EAASS,EAAOC,EAAOC,IAAOH,EAAQ5C,KAAK6C,KAExDD,IAITrD,EAAEsE,OAAS,SAAShC,EAAKM,EAAUC,GACjC,MAAO7C,GAAEuB,OAAOe,EAAK,SAASgB,EAAOC,EAAOC,GAC1C,OAAQZ,EAASK,KAAKJ,EAASS,EAAOC,EAAOC,IAC5CX,IAML7C,EAAEyB,MAAQzB,EAAEuE,IAAM,SAASjC,EAAKM,EAAUC,GACxCD,IAAaA,EAAW5C,EAAEwE,SAC1B,IAAIL,IAAS,CACb,OAAW,OAAP7B,EAAoB6B,EACpB3C,GAAec,EAAIb,QAAUD,EAAoBc,EAAIb,MAAMmB,EAAUC,IACzEF,EAAKL,EAAK,SAASgB,EAAOC,EAAOC,GAC/B,OAAMW,EAASA,GAAUvB,EAASK,KAAKJ,EAASS,EAAOC,EAAOC,IAA9D,OAA6EvD,MAEtEkE,GAMX,IAAIC,GAAMpE,EAAE2B,KAAO3B,EAAEoE,IAAM,SAAS9B,EAAKM,EAAUC,GACjDD,IAAaA,EAAW5C,EAAEwE,SAC1B,IAAIL,IAAS,CACb,OAAW,OAAP7B,EAAoB6B,EACpBzC,GAAcY,EAAIX,OAASD,EAAmBY,
EAAIX,KAAKiB,EAAUC,IACrEF,EAAKL,EAAK,SAASgB,EAAOC,EAAOC,GAC/B,MAAIW,KAAWA,EAASvB,EAASK,KAAKJ,EAASS,EAAOC,EAAOC,IAAevD,EAA5E,WAEOkE,GAKXnE,GAAEyE,SAAWzE,EAAE0E,QAAU,SAASpC,EAAKqC,GACrC,MAAW,OAAPrC,GAAoB,EACpBV,GAAiBU,EAAIT,UAAYD,EAAsBU,EAAIT,QAAQ8C,KAAY,EAC5EP,EAAI9B,EAAK,SAASgB,GACvB,MAAOA,KAAUqB,KAKrB3E,EAAE4E,OAAS,SAAStC,EAAKuC,GACvB,GAAIC,GAAOpE,EAAMuC,KAAKa,UAAW,GAC7BiB,EAAS/E,EAAEgF,WAAWH,EAC1B,OAAO7E,GAAEiB,IAAIqB,EAAK,SAASgB,GACzB,OAAQyB,EAASF,EAASvB,EAAMuB,IAASI,MAAM3B,EAAOwB,MAK1D9E,EAAEkF,MAAQ,SAAS5C,EAAKY,GACtB,MAAOlD,GAAEiB,IAAIqB,EAAK,SAASgB,GAAQ,MAAOA,GAAMJ,MAKlDlD,EAAEmF,MAAQ,SAAS7C,EAAK8C,EAAOC,GAC7B,MAAIrF,GAAEsF,QAAQF,GAAeC,MAAa,MACnCrF,EAAEqF,EAAQ,OAAS,UAAU/C,EAAK,SAASgB,GAChD,IAAK,GAAIJ,KAAOkC,GACd,GAAIA,EAAMlC,KAASI,EAAMJ,GAAM,OAAO,CAExC,QAAO,KAMXlD,EAAEuF,UAAY,SAASjD,EAAK8C,GAC1B,MAAOpF,GAAEmF,MAAM7C,EAAK8C,GAAO,IAM7BpF,EAAEwF,IAAM,SAASlD,EAAKM,EAAUC,GAC9B,IAAKD,GAAY5C,EAAEiC,QAAQK,IAAQA,EAAI,MAAQA,EAAI,IAAMA,EAAIQ,OAAS,MACpE,MAAO2C,MAAKD,IAAIP,MAAMQ,KAAMnD,EAE
9B,KAAKM,GAAY5C,EAAEsF,QAAQhD,GAAM,OAAQoD,GACzC,IAAIvB,IAAUwB,UAAYD,IAAUpC,OAAQoC,IAK5C,OAJA/C,GAAKL,EAAK,SAASgB,EAAOC,EAAOC,GAC/B,GAAImC,GAAW/C,EAAWA,EAASK,KAAKJ,EAASS,EAAOC,EAAOC,GAAQF,CACvEqC,GAAWxB,EAAOwB,WAAaxB,GAAUb,MAAQA,EAAOqC,SAAWA,MAE9DxB,EAAOb,OAIhBtD,EAAE4F,IAAM,SAAStD,EAAKM,EAAUC,GAC9B,IAAKD,GAAY5C,EAAEiC,QAAQK,IAAQA,EAAI,MAAQA,EAAI,IAAMA,EAAIQ,OAAS,MACpE,MAAO2C,MAAKG,IAAIX,MAAMQ,KAAMnD,EAE9B,KAAKM,GAAY5C,EAAEsF,QAAQhD,GAAM,MAAOoD,IACxC,IAAIvB,IAAUwB,SAAWD,IAAUpC,MAAOoC,IAK1C,OAJA/C,GAAKL,EAAK,SAASgB,EAAOC,EAAOC,GAC/B,GAAImC,GAAW/C,EAAWA,EAASK,KAAKJ,EAASS,EAAOC,EAAOC,GAAQF,CACvEqC,GAAWxB,EAAOwB,WAAaxB,GAAUb,MAAQA,EAAOqC,SAAWA,MAE9DxB,EAAOb,OAIhBtD,EAAE6F,QAAU,SAASvD,GACnB,GAAIwD,GACAvC,EAAQ,EACRwC,IAMJ,OALApD,GAAKL,EAAK,SAASgB,GACjBwC,EAAO9F,EAAEgG,OAAOzC,KAChBwC,EAASxC,EAAQ,GAAKwC,EAASD,GAC/BC,EAASD,GAAQxC,IAEZyC,EAIT,IAAIE,GAAiB,SAAS3C,GAC5B,MAAOtD,GAAEgF,WAAW1B,GAASA,EAAQ,SAAShB,GAAM,MAAOA,GAAIgB,IAIjEtD,GAAEkG,OAAS,SAAS5D,EAAKgB,EAAOT,GAC9B,GAAID,GAAWqD,EAAe3C,EAC9B
,OAAOtD,GAAEkF,MAAMlF,EAAEiB,IAAIqB,EAAK,SAASgB,EAAOC,EAAOC,GAC/C,OACEF,MAAQA,EACRC,MAAQA,EACR4C,SAAWvD,EAASK,KAAKJ,EAASS,EAAOC,EAAOC,MAEjD4C,KAAK,SAASC,EAAMC,GACrB,GAAIC,GAAIF,EAAKF,SACTK,EAAIF,EAAMH,QACd,IAAII,IAAMC,EAAG,CACX,GAAID,EAAIC,GAAKD,QAAW,GAAG,MAAO,EAClC,IAAQC,EAAJD,GAASC,QAAW,GAAG,OAAQ,EAErC,MAAOH,GAAK9C,MAAQ+C,EAAM/C,OAAS,EAAI,IACrC,SAIN,IAAIkD,GAAQ,SAASnE,EAAKgB,EAAOT,EAAS6D,GACxC,GAAIvC,MACAvB,EAAWqD,EAAwB,MAAT3C,EAAgBtD,EAAEwE,SAAWlB,EAK3D,OAJAX,GAAKL,EAAK,SAASgB,EAAOC,GACxB,GAAIL,GAAMN,EAASK,KAAKJ,EAASS,EAAOC,EAAOjB,EAC/CoE,GAASvC,EAAQjB,EAAKI,KAEjBa,EAKTnE,GAAE2G,QAAU,SAASrE,EAAKgB,EAAOT,GAC/B,MAAO4D,GAAMnE,EAAKgB,EAAOT,EAAS,SAASsB,EAAQjB,EAAKI,IACrDtD,EAAEmD,IAAIgB,EAAQjB,GAAOiB,EAAOjB,GAAQiB,EAAOjB,OAAYzC,KAAK6C,MAOjEtD,EAAE4G,QAAU,SAAStE,EAAKgB,EAAOT,GAC/B,MAAO4D,GAAMnE,EAAKgB,EAAOT,EAAS,SAASsB,EAAQjB,GAC5ClD,EAAEmD,IAAIgB,EAAQjB,KAAMiB,EAAOjB,GAAO,GACvCiB,EAAOjB,QAMXlD,EAAE6G,YAAc,SAASC,EAAOxE,EAAKM,EAAUC,GAC7CD,EAAuB,MAAZA,EAAmB5C,EAAEwE,SAAWyB,EAAerD,EAG1D,K
AFA,GAAIU,GAAQV,EAASK,KAAKJ,EAASP,GAC/ByE,EAAM,EAAGC,EAAOF,EAAMhE,OACbkE,EAAND,GAAY,CACjB,GAAIE,GAAOF,EAAMC,IAAU,CAC3BpE,GAASK,KAAKJ,EAASiE,EAAMG,IAAQ3D,EAAQyD,EAAME,EAAM,EAAID,EAAOC,EAEtE,MAAOF,IAIT/G,EAAEkH,QAAU,SAAS5E,GACnB,MAAKA,GACDtC,EAAEiC,QAAQK,GAAa5B,EAAMuC,KAAKX,GAClCA,EAAIQ,UAAYR,EAAIQ,OAAe9C,EAAEiB,IAAIqB,EAAKtC,EAAEwE,UAC7CxE,EAAEmH,OAAO7E,OAIlBtC,EAAEoH,KAAO,SAAS9E,GAChB,MAAW,OAAPA,EAAoB,EAChBA,EAAIQ,UAAYR,EAAIQ,OAAUR,EAAIQ,OAAS9C,EAAEmC,KAAKG,GAAKQ,QASjE9C,EAAEqF,MAAQrF,EAAEqH,KAAOrH,EAAEsH,KAAO,SAASR,EAAOS,EAAGC,GAC7C,MAAa,OAATV,MAA2B,GAClB,MAALS,GAAeC,EAAkCV,EAAM,GAAhCpG,EAAMuC,KAAK6D,EAAO,EAAGS,IAOtDvH,EAAE6D,QAAU,SAASiD,EAAOS,EAAGC,GAC7B,MAAO9G,GAAMuC,KAAK6D,EAAO,EAAGA,EAAMhE,QAAgB,MAALyE,GAAcC,EAAQ,EAAID,KAKzEvH,EAAEyH,KAAO,SAASX,EAAOS,EAAGC,GAC1B,MAAa,OAATV,MAA2B,GACrB,MAALS,GAAeC,EAGXV,EAAMA,EAAMhE,OAAS,GAFrBpC,EAAMuC,KAAK6D,EAAOrB,KAAKD,IAAIsB,EAAMhE,OAASyE,EAAG,KAUxDvH,EAAE0H,KAAO1H,EAAE2H,KAAO3H,EAAE4H,KAAO,SAASd,EAAOS,EAAGC,GAC5C,MAAO9G,GAAMuC,KAAK6D,EAAa,M
AALS,GAAcC,EAAQ,EAAID,IAItDvH,EAAE6H,QAAU,SAASf,GACnB,MAAO9G,GAAEuB,OAAOuF,EAAO9G,EAAEwE,UAI3B,IAAIsD,GAAU,SAASC,EAAOC,EAASC,GACrC,MAAID,IAAWhI,EAAEyB,MAAMsG,EAAO/H,EAAEiC,SACvBtB,EAAOsE,MAAMgD,EAAQF,IAE9BpF,EAAKoF,EAAO,SAASzE,GACftD,EAAEiC,QAAQqB,IAAUtD,EAAEkI,YAAY5E,GACpC0E,EAAUvH,EAAKwE,MAAMgD,EAAQ3E,GAASwE,EAAQxE,EAAO0E,EAASC,GAE9DA,EAAOxH,KAAK6C,KAGT2E,GAITjI,GAAE8H,QAAU,SAAShB,EAAOkB,GAC1B,MAAOF,GAAQhB,EAAOkB,OAIxBhI,EAAEmI,QAAU,SAASrB,GACnB,MAAO9G,GAAEoI,WAAWtB,EAAOpG,EAAMuC,KAAKa,UAAW,KAMnD9D,EAAEqI,KAAOrI,EAAEsI,OAAS,SAASxB,EAAOyB,EAAU3F,EAAUC,GAClD7C,EAAEgF,WAAWuD,KACf1F,EAAUD,EACVA,EAAW2F,EACXA,GAAW,EAEb,IAAI1E,GAAUjB,EAAW5C,EAAEiB,IAAI6F,EAAOlE,EAAUC,GAAWiE,EACvDzD,KACAmF,IAOJ,OANA7F,GAAKkB,EAAS,SAASP,EAAOC,IACxBgF,EAAahF,GAASiF,EAAKA,EAAK1F,OAAS,KAAOQ,EAAUtD,EAAEyE,SAAS+D,EAAMlF,MAC7EkF,EAAK/H,KAAK6C,GACVD,EAAQ5C,KAAKqG,EAAMvD,OAGhBF,GAKTrD,EAAEyI,MAAQ,WACR,MAAOzI,GAAEqI,KAAKrI,EAAE8H,QAAQhE,WAAW,KAKrC9D,EAAE0I,aAAe,SAAS5B,GACxB,GAAIY,GAAOhH,EAAMuC,KAAKa,UAAW,EACjC,OAAO
9D,GAAEuB,OAAOvB,EAAEqI,KAAKvB,GAAQ,SAAS6B,GACtC,MAAO3I,GAAEyB,MAAMiG,EAAM,SAASkB,GAC5B,MAAO5I,GAAE6B,QAAQ+G,EAAOD,IAAS,OAOvC3I,EAAEoI,WAAa,SAAStB,GACtB,GAAIY,GAAO/G,EAAOsE,MAAM/E,EAAYQ,EAAMuC,KAAKa,UAAW,GAC1D,OAAO9D,GAAEuB,OAAOuF,EAAO,SAASxD,GAAQ,OAAQtD,EAAEyE,SAASiD,EAAMpE,MAKnEtD,EAAE6I,IAAM,WAGN,IAAK,GAFD/F,GAAS9C,EAAEwF,IAAIxF,EAAEkF,MAAMpB,UAAW,UAAUnD,OAAO,IACnD0C,EAAU,GAAIlD,OAAM2C,GACfC,EAAI,EAAOD,EAAJC,EAAYA,IAC1BM,EAAQN,GAAK/C,EAAEkF,MAAMpB,UAAW,GAAKf,EAEvC,OAAOM,IAMTrD,EAAE8I,OAAS,SAAStF,EAAM2D,GACxB,GAAY,MAAR3D,EAAc,QAElB,KAAK,GADDW,MACKpB,EAAI,EAAGC,EAAIQ,EAAKV,OAAYE,EAAJD,EAAOA,IAClCoE,EACFhD,EAAOX,EAAKT,IAAMoE,EAAOpE,GAEzBoB,EAAOX,EAAKT,GAAG,IAAMS,EAAKT,GAAG,EAGjC,OAAOoB,IASTnE,EAAE6B,QAAU,SAASiF,EAAO6B,EAAMJ,GAChC,GAAa,MAATzB,EAAe,OAAQ,CAC3B,IAAI/D,GAAI,EAAGC,EAAI8D,EAAMhE,MACrB,IAAIyF,EAAU,CACZ,GAAuB,gBAAZA,GAIT,MADAxF,GAAI/C,EAAE6G,YAAYC,EAAO6B,GAClB7B,EAAM/D,KAAO4F,EAAO5F,GAAK,CAHhCA,GAAgB,EAAXwF,EAAe9C,KAAKD,IAAI,EAAGxC,EAAIuF,GAAYA,EAMpD,GAAI3G,GAAiBkF,EAAMjF,UA
AYD,EAAe,MAAOkF,GAAMjF,QAAQ8G,EAAMJ,EACjF,MAAWvF,EAAJD,EAAOA,IAAK,GAAI+D,EAAM/D,KAAO4F,EAAM,MAAO5F,EACjD,QAAQ,GAIV/C,EAAE+B,YAAc,SAAS+E,EAAO6B,EAAMI,GACpC,GAAa,MAATjC,EAAe,OAAQ,CAC3B,IAAIkC,GAAmB,MAARD,CACf,IAAIjH,GAAqBgF,EAAM/E,cAAgBD,EAC7C,MAAOkH,GAAWlC,EAAM/E,YAAY4G,EAAMI,GAAQjC,EAAM/E,YAAY4G,EAGtE,KADA,GAAI5F,GAAKiG,EAAWD,EAAOjC,EAAMhE,OAC1BC,KAAK,GAAI+D,EAAM/D,KAAO4F,EAAM,MAAO5F,EAC1C,QAAQ,GAMV/C,EAAEiJ,MAAQ,SAASC,EAAOC,EAAMC,GAC1BtF,UAAUhB,QAAU,IACtBqG,EAAOD,GAAS,EAChBA,EAAQ,GAEVE,EAAOtF,UAAU,IAAM,CAMvB,KAJA,GAAIuF,GAAM5D,KAAKD,IAAIC,KAAK6D,MAAMH,EAAOD,GAASE,GAAO,GACjDG,EAAM,EACNN,EAAQ,GAAI9I,OAAMkJ,GAEVA,EAANE,GACJN,EAAMM,KAASL,EACfA,GAASE,CAGX,OAAOH,GAOT,IAAIO,GAAO,YAKXxJ,GAAEqC,KAAO,SAASoH,EAAM5G,GACtB,GAAIiC,GAAM4E,CACV,IAAItH,GAAcqH,EAAKpH,OAASD,EAAY,MAAOA,GAAW6C,MAAMwE,EAAM/I,EAAMuC,KAAKa,UAAW,GAChG,KAAK9D,EAAEgF,WAAWyE,GAAO,KAAM,IAAI1F,UAEnC,OADAe,GAAOpE,EAAMuC,KAAKa,UAAW,GACtB4F,EAAQ,WACb,KAAM5J,eAAgB4J,IAAQ,MAAOD,GAAKxE,MAAMpC,EAASiC,EAAKnE,OAAOD,EAAMuC,KAAKa,YAChF0F,
GAAKpJ,UAAYqJ,EAAKrJ,SACtB,IAAIuJ,GAAO,GAAIH,EACfA,GAAKpJ,UAAY,IACjB,IAAI+D,GAASsF,EAAKxE,MAAM0E,EAAM7E,EAAKnE,OAAOD,EAAMuC,KAAKa,YACrD,OAAIxD,QAAO6D,KAAYA,EAAeA,EAC/BwF,IAMX3J,EAAE4J,QAAU,SAASH,GACnB,GAAI3E,GAAOpE,EAAMuC,KAAKa,UAAW,EACjC,OAAO,YACL,MAAO2F,GAAKxE,MAAMnF,KAAMgF,EAAKnE,OAAOD,EAAMuC,KAAKa,eAMnD9D,EAAE6J,QAAU,SAASvH,GACnB,GAAIwH,GAAQpJ,EAAMuC,KAAKa,UAAW,EAClC,IAAqB,IAAjBgG,EAAMhH,OAAc,KAAM,IAAIiH,OAAM,wCAExC,OADApH,GAAKmH,EAAO,SAASE,GAAK1H,EAAI0H,GAAKhK,EAAEqC,KAAKC,EAAI0H,GAAI1H,KAC3CA,GAITtC,EAAEiK,QAAU,SAASR,EAAMS,GACzB,GAAItG,KAEJ,OADAsG,KAAWA,EAASlK,EAAEwE,UACf,WACL,GAAItB,GAAMgH,EAAOjF,MAAMnF,KAAMgE,UAC7B,OAAO9D,GAAEmD,IAAIS,EAAMV,GAAOU,EAAKV,GAAQU,EAAKV,GAAOuG,EAAKxE,MAAMnF,KAAMgE,aAMxE9D,EAAEmK,MAAQ,SAASV,EAAMW,GACvB,GAAItF,GAAOpE,EAAMuC,KAAKa,UAAW,EACjC,OAAOuG,YAAW,WAAY,MAAOZ,GAAKxE,MAAM,KAAMH,IAAUsF,IAKlEpK,EAAEsK,MAAQ,SAASb,GACjB,MAAOzJ,GAAEmK,MAAMlF,MAAMjF,GAAIyJ,EAAM,GAAG9I,OAAOD,EAAMuC,KAAKa,UAAW,MAQjE9D,EAAEuK,SAAW,SAASd,EAAMW,EAAMI,GAChC,GAAI3H,GAASiC,EAA
MX,EACfsG,EAAU,KACVC,EAAW,CACfF,KAAYA,KACZ,IAAIG,GAAQ,WACVD,EAAWF,EAAQI,WAAY,EAAQ,EAAI,GAAIC,MAC/CJ,EAAU,KACVtG,EAASsF,EAAKxE,MAAMpC,EAASiC,GAE/B,OAAO,YACL,GAAIgG,GAAM,GAAID,KACTH,IAAYF,EAAQI,WAAY,IAAOF,EAAWI,EACvD,IAAIC,GAAYX,GAAQU,EAAMJ,EAW9B,OAVA7H,GAAU/C,KACVgF,EAAOhB,UACU,GAAbiH,GACFC,aAAaP,GACbA,EAAU,KACVC,EAAWI,EACX3G,EAASsF,EAAKxE,MAAMpC,EAASiC,IACnB2F,GAAWD,EAAQS,YAAa,IAC1CR,EAAUJ,WAAWM,EAAOI,IAEvB5G,IAQXnE,EAAEkL,SAAW,SAASzB,EAAMW,EAAMe,GAChC,GAAIhH,GACAsG,EAAU,IACd,OAAO,YACL,GAAI5H,GAAU/C,KAAMgF,EAAOhB,UACvB6G,EAAQ,WACVF,EAAU,KACLU,IAAWhH,EAASsF,EAAKxE,MAAMpC,EAASiC,KAE3CsG,EAAUD,IAAcV,CAI5B,OAHAO,cAAaP,GACbA,EAAUJ,WAAWM,EAAOP,GACxBgB,IAASjH,EAASsF,EAAKxE,MAAMpC,EAASiC,IACnCX,IAMXnE,EAAEqL,KAAO,SAAS5B,GAChB,GAAiB7F,GAAb0H,GAAM,CACV,OAAO,YACL,MAAIA,GAAY1H,GAChB0H,GAAM,EACN1H,EAAO6F,EAAKxE,MAAMnF,KAAMgE,WACxB2F,EAAO,KACA7F,KAOX5D,EAAEuL,KAAO,SAAS9B,EAAM+B,GACtB,MAAO,YACL,GAAI1G,IAAQ2E,EAEZ,OADAhJ,GAAKwE,MAAMH,EAAMhB,WACV0H,EAAQvG,MAAMnF,KAAMgF,KAM/B9E,EAAEyL,QAAU,WACV,GAAI3
B,GAAQhG,SACZ,OAAO,YAEL,IAAK,GADDgB,GAAOhB,UACFf,EAAI+G,EAAMhH,OAAS,EAAGC,GAAK,EAAGA,IACrC+B,GAAQgF,EAAM/G,GAAGkC,MAAMnF,KAAMgF,GAE/B,OAAOA,GAAK,KAKhB9E,EAAE0L,MAAQ,SAASC,EAAOlC,GACxB,MAAO,YACL,QAAMkC,EAAQ,EACLlC,EAAKxE,MAAMnF,KAAMgE,WAD1B,SAWJ9D,EAAEmC,KAAOD,GAAc,SAASI,GAC9B,GAAIA,IAAQhC,OAAOgC,GAAM,KAAM,IAAIyB,WAAU,iBAC7C,IAAI5B,KACJ,KAAK,GAAIe,KAAOZ,GAAStC,EAAEmD,IAAIb,EAAKY,IAAMf,EAAK1B,KAAKyC,EACpD,OAAOf,IAITnC,EAAEmH,OAAS,SAAS7E,GAClB,GAAI6E,KACJ,KAAK,GAAIjE,KAAOZ,GAAStC,EAAEmD,IAAIb,EAAKY,IAAMiE,EAAO1G,KAAK6B,EAAIY,GAC1D,OAAOiE,IAITnH,EAAE4L,MAAQ,SAAStJ,GACjB,GAAIsJ,KACJ,KAAK,GAAI1I,KAAOZ,GAAStC,EAAEmD,IAAIb,EAAKY,IAAM0I,EAAMnL,MAAMyC,EAAKZ,EAAIY,IAC/D,OAAO0I,IAIT5L,EAAE6L,OAAS,SAASvJ,GAClB,GAAI6B,KACJ,KAAK,GAAIjB,KAAOZ,GAAStC,EAAEmD,IAAIb,EAAKY,KAAMiB,EAAO7B,EAAIY,IAAQA,EAC7D,OAAOiB,IAKTnE,EAAE8L,UAAY9L,EAAE+L,QAAU,SAASzJ,GACjC,GAAI0J,KACJ,KAAK,GAAI9I,KAAOZ,GACVtC,EAAEgF,WAAW1C,EAAIY,KAAO8I,EAAMvL,KAAKyC,EAEzC,OAAO8I,GAAM5F,QAIfpG,EAAEiM,OAAS,SAAS3J,GAQlB,MAPAK,GAAKjC,EAAMuC
,KAAKa,UAAW,GAAI,SAASoI,GACtC,GAAIA,EACF,IAAK,GAAIC,KAAQD,GACf5J,EAAI6J,GAAQD,EAAOC,KAIlB7J,GAITtC,EAAEoM,KAAO,SAAS9J,GAChB,GAAI+J,MACAlK,EAAOxB,EAAOsE,MAAM/E,EAAYQ,EAAMuC,KAAKa,UAAW,GAI1D,OAHAnB,GAAKR,EAAM,SAASe,GACdA,IAAOZ,KAAK+J,EAAKnJ,GAAOZ,EAAIY,MAE3BmJ,GAITrM,EAAEsM,KAAO,SAAShK,GAChB,GAAI+J,MACAlK,EAAOxB,EAAOsE,MAAM/E,EAAYQ,EAAMuC,KAAKa,UAAW,GAC1D,KAAK,GAAIZ,KAAOZ,GACTtC,EAAEyE,SAAStC,EAAMe,KAAMmJ,EAAKnJ,GAAOZ,EAAIY,GAE9C,OAAOmJ,IAITrM,EAAEuM,SAAW,SAASjK,GAQpB,MAPAK,GAAKjC,EAAMuC,KAAKa,UAAW,GAAI,SAASoI,GACtC,GAAIA,EACF,IAAK,GAAIC,KAAQD,GACX5J,EAAI6J,SAAe,KAAG7J,EAAI6J,GAAQD,EAAOC,MAI5C7J,GAITtC,EAAEwM,MAAQ,SAASlK,GACjB,MAAKtC,GAAEyM,SAASnK,GACTtC,EAAEiC,QAAQK,GAAOA,EAAI5B,QAAUV,EAAEiM,UAAW3J,GADtBA,GAO/BtC,EAAE0M,IAAM,SAASpK,EAAKqK,GAEpB,MADAA,GAAYrK,GACLA,EAIT,IAAIsK,GAAK,SAASrG,EAAGC,EAAGqG,EAAQC,GAG9B,GAAIvG,IAAMC,EAAG,MAAa,KAAND,GAAW,EAAIA,GAAK,EAAIC,CAE5C,IAAS,MAALD,GAAkB,MAALC,EAAW,MAAOD,KAAMC,CAErCD,aAAavG,KAAGuG,EAAIA,EAAEhE,UACtBiE,YAAaxG,KAAGwG,EAAIA,EAAEjE,SAE1B,IAA
IwK,GAAYnM,EAASqC,KAAKsD,EAC9B,IAAIwG,GAAanM,EAASqC,KAAKuD,GAAI,OAAO,CAC1C,QAAQuG,GAEN,IAAK,kBAGH,MAAOxG,IAAKyG,OAAOxG,EACrB,KAAK,kBAGH,MAAOD,KAAMA,EAAIC,IAAMA,EAAU,GAALD,EAAS,EAAIA,GAAK,EAAIC,EAAID,IAAMC,CAC9D,KAAK,gBACL,IAAK,mBAIH,OAAQD,IAAMC,CAEhB,KAAK,kBACH,MAAOD,GAAE2F,QAAU1F,EAAE0F,QACd3F,EAAE0G,QAAUzG,EAAEyG,QACd1G,EAAE2G,WAAa1G,EAAE0G,WACjB3G,EAAE4G,YAAc3G,EAAE2G,WAE7B,GAAgB,gBAAL5G,IAA6B,gBAALC,GAAe,OAAO,CAIzD,KADA,GAAI1D,GAAS+J,EAAO/J,OACbA,KAGL,GAAI+J,EAAO/J,IAAWyD,EAAG,MAAOuG,GAAOhK,IAAW0D,CAIpD,IAAI4G,GAAQ7G,EAAE8G,YAAaC,EAAQ9G,EAAE6G,WACrC,IAAID,IAAUE,KAAWtN,EAAEgF,WAAWoI,IAAWA,YAAiBA,IACzCpN,EAAEgF,WAAWsI,IAAWA,YAAiBA,IAChE,OAAO,CAGTT,GAAOpM,KAAK8F,GACZuG,EAAOrM,KAAK+F,EACZ,IAAIY,GAAO,EAAGjD,GAAS,CAEvB,IAAiB,kBAAb4I,GAIF,GAFA3F,EAAOb,EAAEzD,OACTqB,EAASiD,GAAQZ,EAAE1D,OAGjB,KAAOsE,MACCjD,EAASyI,EAAGrG,EAAEa,GAAOZ,EAAEY,GAAOyF,EAAQC,WAG3C,CAEL,IAAK,GAAI5J,KAAOqD,GACd,GAAIvG,EAAEmD,IAAIoD,EAAGrD,KAEXkE,MAEMjD,EAASnE,EAAEmD,IAAIqD,EAAGtD,IAAQ0J,EAAGrG,EAAErD,GAAMsD,EAAEtD
,GAAM2J,EAAQC,KAAU,KAIzE,IAAI3I,EAAQ,CACV,IAAKjB,IAAOsD,GACV,GAAIxG,EAAEmD,IAAIqD,EAAGtD,KAAUkE,IAAS,KAElCjD,IAAUiD,GAMd,MAFAyF,GAAOU,MACPT,EAAOS,MACApJ,EAITnE,GAAEwN,QAAU,SAASjH,EAAGC,GACtB,MAAOoG,GAAGrG,EAAGC,UAKfxG,EAAEsF,QAAU,SAAShD,GACnB,GAAW,MAAPA,EAAa,OAAO,CACxB,IAAItC,EAAEiC,QAAQK,IAAQtC,EAAEyN,SAASnL,GAAM,MAAsB,KAAfA,EAAIQ,MAClD,KAAK,GAAII,KAAOZ,GAAK,GAAItC,EAAEmD,IAAIb,EAAKY,GAAM,OAAO,CACjD,QAAO,GAITlD,EAAE0N,UAAY,SAASpL,GACrB,SAAUA,GAAwB,IAAjBA,EAAIqL,WAKvB3N,EAAEiC,QAAUD,GAAiB,SAASM,GACpC,MAA6B,kBAAtB1B,EAASqC,KAAKX,IAIvBtC,EAAEyM,SAAW,SAASnK,GACpB,MAAOA,KAAQhC,OAAOgC,IAIxBK,GAAM,YAAa,WAAY,SAAU,SAAU,OAAQ,UAAW,SAASiL,GAC7E5N,EAAE,KAAO4N,GAAQ,SAAStL,GACxB,MAAO1B,GAASqC,KAAKX,IAAQ,WAAasL,EAAO,OAMhD5N,EAAEkI,YAAYpE,aACjB9D,EAAEkI,YAAc,SAAS5F,GACvB,SAAUA,IAAOtC,EAAEmD,IAAIb,EAAK,aAKX,kBAAV,MACTtC,EAAEgF,WAAa,SAAS1C,GACtB,MAAsB,kBAARA,KAKlBtC,EAAE6N,SAAW,SAASvL,GACpB,MAAOuL,UAASvL,KAASwL,MAAMC,WAAWzL,KAI5CtC,EAAE8N,MAAQ,SAASxL,GACjB,MAAOtC,GAAEgO,SAAS1L,IAAQA,IAAQA,GAIpCtC,EAA
EiO,UAAY,SAAS3L,GACrB,MAAOA,MAAQ,GAAQA,KAAQ,GAA+B,oBAAtB1B,EAASqC,KAAKX,IAIxDtC,EAAEkO,OAAS,SAAS5L,GAClB,MAAe,QAARA,GAITtC,EAAEmO,YAAc,SAAS7L,GACvB,MAAOA,SAAa,IAKtBtC,EAAEmD,IAAM,SAASb,EAAKY,GACpB,MAAOrC,GAAeoC,KAAKX,EAAKY,IAQlClD,EAAEoO,WAAa,WAEb,MADAvO,GAAKG,EAAID,EACFD,MAITE,EAAEwE,SAAW,SAASlB,GACpB,MAAOA,IAITtD,EAAE2L,MAAQ,SAASpE,EAAG3E,EAAUC,GAE9B,IAAK,GADDwL,GAAQlO,MAAMsF,KAAKD,IAAI,EAAG+B,IACrBxE,EAAI,EAAOwE,EAAJxE,EAAOA,IAAKsL,EAAMtL,GAAKH,EAASK,KAAKJ,EAASE,EAC9D,OAAOsL,IAITrO,EAAEgG,OAAS,SAASJ,EAAKJ,GAKvB,MAJW,OAAPA,IACFA,EAAMI,EACNA,EAAM,GAEDA,EAAMH,KAAK6I,MAAM7I,KAAKO,UAAYR,EAAMI,EAAM,IAIvD,IAAI2I,IACFC,QACEC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAGTP,GAAUQ,SAAW/O,EAAE6L,OAAO0C,EAAUC,OAGxC,IAAIQ,IACFR,OAAU,GAAIS,QAAO,IAAMjP,EAAEmC,KAAKoM,EAAUC,QAAQU,KAAK,IAAM,IAAK,KACpEH,SAAU,GAAIE,QAAO,IAAMjP,EAAEmC,KAAKoM,EAAUQ,UAAUG,KAAK,KAAO,IAAK,KAIzElP,GAAE2C,MAAM,SAAU,YAAa,SAASkC,GACtC7E,EAAE6E,GAAU,SAASsK,GACnB,MAAc,OAAVA,EAAuB,IACnB,GAAKA,GAAQC,QAAQJ,EAAcnK
,GAAS,SAASwK,GAC3D,MAAOd,GAAU1J,GAAQwK,QAO/BrP,EAAEmE,OAAS,SAAS2E,EAAQwG,GAC1B,GAAc,MAAVxG,EAAgB,WAAY,EAChC,IAAIxF,GAAQwF,EAAOwG,EACnB,OAAOtP,GAAEgF,WAAW1B,GAASA,EAAML,KAAK6F,GAAUxF,GAIpDtD,EAAEuP,MAAQ,SAASjN,GACjBK,EAAK3C,EAAE8L,UAAUxJ,GAAM,SAASsL,GAC9B,GAAInE,GAAOzJ,EAAE4N,GAAQtL,EAAIsL,EACzB5N,GAAEI,UAAUwN,GAAQ,WAClB,GAAI9I,IAAQhF,KAAKyC,SAEjB,OADA9B,GAAKwE,MAAMH,EAAMhB,WACVK,EAAOlB,KAAKnD,KAAM2J,EAAKxE,MAAMjF,EAAG8E,OAO7C,IAAI0K,GAAY,CAChBxP,GAAEyP,SAAW,SAASC,GACpB,GAAIC,KAAOH,EAAY,EACvB,OAAOE,GAASA,EAASC,EAAKA,GAKhC3P,EAAE4P,kBACAC,SAAc,kBACdC,YAAc,mBACdtB,OAAc,mBAMhB,IAAIuB,GAAU,OAIVC,GACFnB,IAAU,IACVoB,KAAU,KACVC,KAAU,IACVC,KAAU,IACVC,IAAU,IACVC,SAAU,QACVC,SAAU,SAGRC,EAAU,8BAKdvQ,GAAEwQ,SAAW,SAASC,EAAMC,EAAMC,GAChC,GAAIC,EACJD,GAAW3Q,EAAEuM,YAAaoE,EAAU3Q,EAAE4P,iBAGtC,IAAIiB,GAAU,GAAI5B,UACf0B,EAASnC,QAAUuB,GAAS7D,QAC5ByE,EAASb,aAAeC,GAAS7D,QACjCyE,EAASd,UAAYE,GAAS7D,QAC/BgD,KAAK,KAAO,KAAM,KAGhB3L,EAAQ,EACR2I,EAAS,QACbuE,GAAKrB,QAAQyB,EAAS,SAASxB,EAAOb,EAAQsB,EAAaD,EAAUiB,GAc
nE,MAbA5E,IAAUuE,EAAK/P,MAAM6C,EAAOuN,GACzB1B,QAAQmB,EAAS,SAASlB,GAAS,MAAO,KAAOW,EAAQX,KAExDb,IACFtC,GAAU,cAAgBsC,EAAS,kCAEjCsB,IACF5D,GAAU,cAAgB4D,EAAc,wBAEtCD,IACF3D,GAAU,OAAS2D,EAAW,YAEhCtM,EAAQuN,EAASzB,EAAMvM,OAChBuM,IAETnD,GAAU,OAGLyE,EAASI,WAAU7E,EAAS,mBAAqBA,EAAS,OAE/DA,EAAS,2CACP,oDACAA,EAAS,eAEX,KACE0E,EAAS,GAAIpQ,UAASmQ,EAASI,UAAY,MAAO,IAAK7E,GACvD,MAAO8E,GAEP,KADAA,GAAE9E,OAASA,EACL8E,EAGR,GAAIN,EAAM,MAAOE,GAAOF,EAAM1Q,EAC9B,IAAIwQ,GAAW,SAASE,GACtB,MAAOE,GAAO3N,KAAKnD,KAAM4Q,EAAM1Q,GAMjC,OAFAwQ,GAAStE,OAAS,aAAeyE,EAASI,UAAY,OAAS,OAAS7E,EAAS,IAE1EsE,GAITxQ,EAAEiR,MAAQ,SAAS3O,GACjB,MAAOtC,GAAEsC,GAAK2O,QAUhB,IAAI9M,GAAS,SAAS7B,GACpB,MAAOxC,MAAKoR,OAASlR,EAAEsC,GAAK2O,QAAU3O,EAIxCtC,GAAEuP,MAAMvP,GAGR2C,GAAM,MAAO,OAAQ,UAAW,QAAS,OAAQ,SAAU,WAAY,SAASiL,GAC9E,GAAI/I,GAAS3E,EAAW0N,EACxB5N,GAAEI,UAAUwN,GAAQ,WAClB,GAAItL,GAAMxC,KAAKyC,QAGf,OAFAsC,GAAOI,MAAM3C,EAAKwB,WACL,SAAR8J,GAA2B,UAARA,GAAoC,IAAftL,EAAIQ,cAAqBR,GAAI,GACnE6B,EAAOlB,KAAKnD,KAAMwC,MAK7BK,GAAM,SAAU,OAAQ,SAAU,SAASi
L,GACzC,GAAI/I,GAAS3E,EAAW0N,EACxB5N,GAAEI,UAAUwN,GAAQ,WAClB,MAAOzJ,GAAOlB,KAAKnD,KAAM+E,EAAOI,MAAMnF,KAAKyC,SAAUuB,eAIzD9D,EAAEiM,OAAOjM,EAAEI,WAGT6Q,MAAO,WAEL,MADAnR,MAAKoR,QAAS,EACPpR,MAITwD,MAAO,WACL,MAAOxD,MAAKyC,aAKfU,KAAKnD"}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/underscore.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/underscore.js b/blackberry10/node_modules/jasmine-node/node_modules/underscore/underscore.js
new file mode 100644
index 0000000..7d4ee27
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/underscore/underscore.js
@@ -0,0 +1,1246 @@
+// Underscore.js 1.5.1
+// http://underscorejs.org
+// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+// Underscore may be freely distributed under the MIT license.
+
+(function() {
+
+ // Baseline setup
+ // --------------
+
+ // Establish the root object, `window` in the browser, or `global` on the server.
+ var root = this;
+
+ // Save the previous value of the `_` variable.
+ var previousUnderscore = root._;
+
+ // Establish the object that gets returned to break out of a loop iteration.
+ var breaker = {};
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var
+ push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ concat = ArrayProto.concat,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // All **ECMAScript 5** native function implementations that we hope to use
+ // are declared here.
+ var
+ nativeForEach = ArrayProto.forEach,
+ nativeMap = ArrayProto.map,
+ nativeReduce = ArrayProto.reduce,
+ nativeReduceRight = ArrayProto.reduceRight,
+ nativeFilter = ArrayProto.filter,
+ nativeEvery = ArrayProto.every,
+ nativeSome = ArrayProto.some,
+ nativeIndexOf = ArrayProto.indexOf,
+ nativeLastIndexOf = ArrayProto.lastIndexOf,
+ nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeBind = FuncProto.bind;
+
+ // Create a safe reference to the Underscore object for use below.
+ var _ = function(obj) {
+ if (obj instanceof _) return obj;
+ if (!(this instanceof _)) return new _(obj);
+ this._wrapped = obj;
+ };
+
+ // Export the Underscore object for **Node.js**, with
+ // backwards-compatibility for the old `require()` API. If we're in
+ // the browser, add `_` as a global object via a string identifier,
+ // for Closure Compiler "advanced" mode.
+ if (typeof exports !== 'undefined') {
+ if (typeof module !== 'undefined' && module.exports) {
+ exports = module.exports = _;
+ }
+ exports._ = _;
+ } else {
+ root._ = _;
+ }
+
+ // Current version.
+ _.VERSION = '1.5.1';
+
+ // Collection Functions
+ // --------------------
+
+ // The cornerstone, an `each` implementation, aka `forEach`.
+ // Handles objects with the built-in `forEach`, arrays, and raw objects.
+ // Delegates to **ECMAScript 5**'s native `forEach` if available.
+ var each = _.each = _.forEach = function(obj, iterator, context) {
+ if (obj == null) return;
+ if (nativeForEach && obj.forEach === nativeForEach) {
+ obj.forEach(iterator, context);
+ } else if (obj.length === +obj.length) {
+ for (var i = 0, l = obj.length; i < l; i++) {
+ if (iterator.call(context, obj[i], i, obj) === breaker) return;
+ }
+ } else {
+ for (var key in obj) {
+ if (_.has(obj, key)) {
+ if (iterator.call(context, obj[key], key, obj) === breaker) return;
+ }
+ }
+ }
+ };
+
+ // Return the results of applying the iterator to each element.
+ // Delegates to **ECMAScript 5**'s native `map` if available.
+ _.map = _.collect = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
+ each(obj, function(value, index, list) {
+ results.push(iterator.call(context, value, index, list));
+ });
+ return results;
+ };
+
+ var reduceError = 'Reduce of empty array with no initial value';
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
+ _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
+ var initial = arguments.length > 2;
+ if (obj == null) obj = [];
+ if (nativeReduce && obj.reduce === nativeReduce) {
+ if (context) iterator = _.bind(iterator, context);
+ return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
+ }
+ each(obj, function(value, index, list) {
+ if (!initial) {
+ memo = value;
+ initial = true;
+ } else {
+ memo = iterator.call(context, memo, value, index, list);
+ }
+ });
+ if (!initial) throw new TypeError(reduceError);
+ return memo;
+ };
+
+ // The right-associative version of reduce, also known as `foldr`.
+ // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
+ _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
+ var initial = arguments.length > 2;
+ if (obj == null) obj = [];
+ if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
+ if (context) iterator = _.bind(iterator, context);
+ return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
+ }
+ var length = obj.length;
+ if (length !== +length) {
+ var keys = _.keys(obj);
+ length = keys.length;
+ }
+ each(obj, function(value, index, list) {
+ index = keys ? keys[--length] : --length;
+ if (!initial) {
+ memo = obj[index];
+ initial = true;
+ } else {
+ memo = iterator.call(context, memo, obj[index], index, list);
+ }
+ });
+ if (!initial) throw new TypeError(reduceError);
+ return memo;
+ };
+
+ // Return the first value which passes a truth test. Aliased as `detect`.
+ _.find = _.detect = function(obj, iterator, context) {
+ var result;
+ any(obj, function(value, index, list) {
+ if (iterator.call(context, value, index, list)) {
+ result = value;
+ return true;
+ }
+ });
+ return result;
+ };
+
+ // Return all the elements that pass a truth test.
+ // Delegates to **ECMAScript 5**'s native `filter` if available.
+ // Aliased as `select`.
+ _.filter = _.select = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
+ each(obj, function(value, index, list) {
+ if (iterator.call(context, value, index, list)) results.push(value);
+ });
+ return results;
+ };
+
+ // Return all the elements for which a truth test fails.
+ _.reject = function(obj, iterator, context) {
+ return _.filter(obj, function(value, index, list) {
+ return !iterator.call(context, value, index, list);
+ }, context);
+ };
+
+ // Determine whether all of the elements match a truth test.
+ // Delegates to **ECMAScript 5**'s native `every` if available.
+ // Aliased as `all`.
+ _.every = _.all = function(obj, iterator, context) {
+ iterator || (iterator = _.identity);
+ var result = true;
+ if (obj == null) return result;
+ if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
+ each(obj, function(value, index, list) {
+ if (!(result = result && iterator.call(context, value, index, list))) return breaker;
+ });
+ return !!result;
+ };
+
+ // Determine if at least one element in the object matches a truth test.
+ // Delegates to **ECMAScript 5**'s native `some` if available.
+ // Aliased as `any`.
+ var any = _.some = _.any = function(obj, iterator, context) {
+ iterator || (iterator = _.identity);
+ var result = false;
+ if (obj == null) return result;
+ if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
+ each(obj, function(value, index, list) {
+ if (result || (result = iterator.call(context, value, index, list))) return breaker;
+ });
+ return !!result;
+ };
+
+ // Determine if the array or object contains a given value (using `===`).
+ // Aliased as `include`.
+ _.contains = _.include = function(obj, target) {
+ if (obj == null) return false;
+ if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
+ return any(obj, function(value) {
+ return value === target;
+ });
+ };
+
+ // Invoke a method (with arguments) on every item in a collection.
+ _.invoke = function(obj, method) {
+ var args = slice.call(arguments, 2);
+ var isFunc = _.isFunction(method);
+ return _.map(obj, function(value) {
+ return (isFunc ? method : value[method]).apply(value, args);
+ });
+ };
+
+ // Convenience version of a common use case of `map`: fetching a property.
+ _.pluck = function(obj, key) {
+ return _.map(obj, function(value){ return value[key]; });
+ };
+
+ // Convenience version of a common use case of `filter`: selecting only objects
+ // containing specific `key:value` pairs.
+ _.where = function(obj, attrs, first) {
+ if (_.isEmpty(attrs)) return first ? void 0 : [];
+ return _[first ? 'find' : 'filter'](obj, function(value) {
+ for (var key in attrs) {
+ if (attrs[key] !== value[key]) return false;
+ }
+ return true;
+ });
+ };
+
+ // Convenience version of a common use case of `find`: getting the first object
+ // containing specific `key:value` pairs.
+ _.findWhere = function(obj, attrs) {
+ return _.where(obj, attrs, true);
+ };
+
+ // Return the maximum element or (element-based computation).
+ // Can't optimize arrays of integers longer than 65,535 elements.
+ // See [WebKit Bug 80797](https://bugs.webkit.org/show_bug.cgi?id=80797)
+ _.max = function(obj, iterator, context) {
+ if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+ return Math.max.apply(Math, obj);
+ }
+ if (!iterator && _.isEmpty(obj)) return -Infinity;
+ var result = {computed : -Infinity, value: -Infinity};
+ each(obj, function(value, index, list) {
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
+ computed > result.computed && (result = {value : value, computed : computed});
+ });
+ return result.value;
+ };
+
+ // Return the minimum element (or element-based computation).
+ _.min = function(obj, iterator, context) {
+ if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+ return Math.min.apply(Math, obj);
+ }
+ if (!iterator && _.isEmpty(obj)) return Infinity;
+ var result = {computed : Infinity, value: Infinity};
+ each(obj, function(value, index, list) {
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
+ computed < result.computed && (result = {value : value, computed : computed});
+ });
+ return result.value;
+ };
+
+ // Shuffle an array.
+ _.shuffle = function(obj) {
+ var rand;
+ var index = 0;
+ var shuffled = [];
+ each(obj, function(value) {
+ rand = _.random(index++);
+ shuffled[index - 1] = shuffled[rand];
+ shuffled[rand] = value;
+ });
+ return shuffled;
+ };
+
+ // An internal function to generate lookup iterators.
+ var lookupIterator = function(value) {
+ return _.isFunction(value) ? value : function(obj){ return obj[value]; };
+ };
+
+ // Sort the object's values by a criterion produced by an iterator.
+ _.sortBy = function(obj, value, context) {
+ var iterator = lookupIterator(value);
+ return _.pluck(_.map(obj, function(value, index, list) {
+ return {
+ value : value,
+ index : index,
+ criteria : iterator.call(context, value, index, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
+ if (a !== b) {
+ if (a > b || a === void 0) return 1;
+ if (a < b || b === void 0) return -1;
+ }
+ return left.index < right.index ? -1 : 1;
+ }), 'value');
+ };
+
+ // An internal function used for aggregate "group by" operations.
+ var group = function(obj, value, context, behavior) {
+ var result = {};
+ var iterator = lookupIterator(value == null ? _.identity : value);
+ each(obj, function(value, index) {
+ var key = iterator.call(context, value, index, obj);
+ behavior(result, key, value);
+ });
+ return result;
+ };
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ _.groupBy = function(obj, value, context) {
+ return group(obj, value, context, function(result, key, value) {
+ (_.has(result, key) ? result[key] : (result[key] = [])).push(value);
+ });
+ };
+
+ // Counts instances of an object that group by a certain criterion. Pass
+ // either a string attribute to count by, or a function that returns the
+ // criterion.
+ _.countBy = function(obj, value, context) {
+ return group(obj, value, context, function(result, key) {
+ if (!_.has(result, key)) result[key] = 0;
+ result[key]++;
+ });
+ };
+
+ // Use a comparator function to figure out the smallest index at which
+ // an object should be inserted so as to maintain order. Uses binary search.
+ _.sortedIndex = function(array, obj, iterator, context) {
+ iterator = iterator == null ? _.identity : lookupIterator(iterator);
+ var value = iterator.call(context, obj);
+ var low = 0, high = array.length;
+ while (low < high) {
+ var mid = (low + high) >>> 1;
+ iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
+ }
+ return low;
+ };
+
+ // Safely create a real, live array from anything iterable.
+ _.toArray = function(obj) {
+ if (!obj) return [];
+ if (_.isArray(obj)) return slice.call(obj);
+ if (obj.length === +obj.length) return _.map(obj, _.identity);
+ return _.values(obj);
+ };
+
+ // Return the number of elements in an object.
+ _.size = function(obj) {
+ if (obj == null) return 0;
+ return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
+ };
+
+ // Array Functions
+ // ---------------
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. Aliased as `head` and `take`. The **guard** check
+ // allows it to work with `_.map`.
+ _.first = _.head = _.take = function(array, n, guard) {
+ if (array == null) return void 0;
+ return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
+ };
+
+ // Returns everything but the last entry of the array. Especially useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N. The **guard** check allows it to work with
+ // `_.map`.
+ _.initial = function(array, n, guard) {
+ return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
+ };
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array. The **guard** check allows it to work with `_.map`.
+ _.last = function(array, n, guard) {
+ if (array == null) return void 0;
+ if ((n != null) && !guard) {
+ return slice.call(array, Math.max(array.length - n, 0));
+ } else {
+ return array[array.length - 1];
+ }
+ };
+
+ // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
+ // Especially useful on the arguments object. Passing an **n** will return
+ // the rest N values in the array. The **guard**
+ // check allows it to work with `_.map`.
+ _.rest = _.tail = _.drop = function(array, n, guard) {
+ return slice.call(array, (n == null) || guard ? 1 : n);
+ };
+
+ // Trim out all falsy values from an array.
+ _.compact = function(array) {
+ return _.filter(array, _.identity);
+ };
+
+ // Internal implementation of a recursive `flatten` function.
+ var flatten = function(input, shallow, output) {
+ if (shallow && _.every(input, _.isArray)) {
+ return concat.apply(output, input);
+ }
+ each(input, function(value) {
+ if (_.isArray(value) || _.isArguments(value)) {
+ shallow ? push.apply(output, value) : flatten(value, shallow, output);
+ } else {
+ output.push(value);
+ }
+ });
+ return output;
+ };
+
+ // Return a completely flattened version of an array.
+ _.flatten = function(array, shallow) {
+ return flatten(array, shallow, []);
+ };
+
+ // Return a version of the array that does not contain the specified value(s).
+ _.without = function(array) {
+ return _.difference(array, slice.call(arguments, 1));
+ };
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // Aliased as `unique`.
+ _.uniq = _.unique = function(array, isSorted, iterator, context) {
+ if (_.isFunction(isSorted)) {
+ context = iterator;
+ iterator = isSorted;
+ isSorted = false;
+ }
+ var initial = iterator ? _.map(array, iterator, context) : array;
+ var results = [];
+ var seen = [];
+ each(initial, function(value, index) {
+ if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
+ seen.push(value);
+ results.push(array[index]);
+ }
+ });
+ return results;
+ };
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ _.union = function() {
+ return _.uniq(_.flatten(arguments, true));
+ };
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays.
+ _.intersection = function(array) {
+ var rest = slice.call(arguments, 1);
+ return _.filter(_.uniq(array), function(item) {
+ return _.every(rest, function(other) {
+ return _.indexOf(other, item) >= 0;
+ });
+ });
+ };
+
+ // Take the difference between one array and a number of other arrays.
+ // Only the elements present in just the first array will remain.
+ _.difference = function(array) {
+ var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
+ return _.filter(array, function(value){ return !_.contains(rest, value); });
+ };
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ _.zip = function() {
+ var length = _.max(_.pluck(arguments, "length").concat(0));
+ var results = new Array(length);
+ for (var i = 0; i < length; i++) {
+ results[i] = _.pluck(arguments, '' + i);
+ }
+ return results;
+ };
+
+ // Converts lists into objects. Pass either a single array of `[key, value]`
+ // pairs, or two parallel arrays of the same length -- one of keys, and one of
+ // the corresponding values.
+ _.object = function(list, values) {
+ if (list == null) return {};
+ var result = {};
+ for (var i = 0, l = list.length; i < l; i++) {
+ if (values) {
+ result[list[i]] = values[i];
+ } else {
+ result[list[i][0]] = list[i][1];
+ }
+ }
+ return result;
+ };
+
+ // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
+ // we need this function. Return the position of the first occurrence of an
+ // item in an array, or -1 if the item is not included in the array.
+ // Delegates to **ECMAScript 5**'s native `indexOf` if available.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ _.indexOf = function(array, item, isSorted) {
+ if (array == null) return -1;
+ var i = 0, l = array.length;
+ if (isSorted) {
+ if (typeof isSorted == 'number') {
+ i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);
+ } else {
+ i = _.sortedIndex(array, item);
+ return array[i] === item ? i : -1;
+ }
+ }
+ if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
+ for (; i < l; i++) if (array[i] === item) return i;
+ return -1;
+ };
+
+ // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
+ _.lastIndexOf = function(array, item, from) {
+ if (array == null) return -1;
+ var hasIndex = from != null;
+ if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
+ return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
+ }
+ var i = (hasIndex ? from : array.length);
+ while (i--) if (array[i] === item) return i;
+ return -1;
+ };
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](http://docs.python.org/library/functions.html#range).
+ _.range = function(start, stop, step) {
+ if (arguments.length <= 1) {
+ stop = start || 0;
+ start = 0;
+ }
+ step = arguments[2] || 1;
+
+ var len = Math.max(Math.ceil((stop - start) / step), 0);
+ var idx = 0;
+ var range = new Array(len);
+
+ while(idx < len) {
+ range[idx++] = start;
+ start += step;
+ }
+
+ return range;
+ };
+
+ // Function (ahem) Functions
+ // ------------------
+
+ // Reusable constructor function for prototype setting.
+ var ctor = function(){};
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
+ // available.
+ _.bind = function(func, context) {
+ var args, bound;
+ if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+ if (!_.isFunction(func)) throw new TypeError;
+ args = slice.call(arguments, 2);
+ return bound = function() {
+ if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
+ ctor.prototype = func.prototype;
+ var self = new ctor;
+ ctor.prototype = null;
+ var result = func.apply(self, args.concat(slice.call(arguments)));
+ if (Object(result) === result) return result;
+ return self;
+ };
+ };
+
+ // Partially apply a function by creating a version that has had some of its
+ // arguments pre-filled, without changing its dynamic `this` context.
+ _.partial = function(func) {
+ var args = slice.call(arguments, 1);
+ return function() {
+ return func.apply(this, args.concat(slice.call(arguments)));
+ };
+ };
+
+ // Bind all of an object's methods to that object. Useful for ensuring that
+ // all callbacks defined on an object belong to it.
+ _.bindAll = function(obj) {
+ var funcs = slice.call(arguments, 1);
+ if (funcs.length === 0) throw new Error("bindAll must be passed function names");
+ each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
+ return obj;
+ };
+
+ // Memoize an expensive function by storing its results.
+ _.memoize = function(func, hasher) {
+ var memo = {};
+ hasher || (hasher = _.identity);
+ return function() {
+ var key = hasher.apply(this, arguments);
+ return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
+ };
+ };
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ _.delay = function(func, wait) {
+ var args = slice.call(arguments, 2);
+ return setTimeout(function(){ return func.apply(null, args); }, wait);
+ };
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ _.defer = function(func) {
+ return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
+ };
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time. Normally, the throttled function will run
+ // as much as it can, without ever going more than once per `wait` duration;
+ // but if you'd like to disable the execution on the leading edge, pass
+ // `{leading: false}`. To disable execution on the trailing edge, ditto.
+ _.throttle = function(func, wait, options) {
+ var context, args, result;
+ var timeout = null;
+ var previous = 0;
+ options || (options = {});
+ var later = function() {
+ previous = options.leading === false ? 0 : new Date;
+ timeout = null;
+ result = func.apply(context, args);
+ };
+ return function() {
+ var now = new Date;
+ if (!previous && options.leading === false) previous = now;
+ var remaining = wait - (now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0) {
+ clearTimeout(timeout);
+ timeout = null;
+ previous = now;
+ result = func.apply(context, args);
+ } else if (!timeout && options.trailing !== false) {
+ timeout = setTimeout(later, remaining);
+ }
+ return result;
+ };
+ };
+
+ // Returns a function, that, as long as it continues to be invoked, will not
+ // be triggered. The function will be called after it stops being called for
+ // N milliseconds. If `immediate` is passed, trigger the function on the
+ // leading edge, instead of the trailing.
+ _.debounce = function(func, wait, immediate) {
+ var result;
+ var timeout = null;
+ return function() {
+ var context = this, args = arguments;
+ var later = function() {
+ timeout = null;
+ if (!immediate) result = func.apply(context, args);
+ };
+ var callNow = immediate && !timeout;
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+ if (callNow) result = func.apply(context, args);
+ return result;
+ };
+ };
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ _.once = function(func) {
+ var ran = false, memo;
+ return function() {
+ if (ran) return memo;
+ ran = true;
+ memo = func.apply(this, arguments);
+ func = null;
+ return memo;
+ };
+ };
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ _.wrap = function(func, wrapper) {
+ return function() {
+ var args = [func];
+ push.apply(args, arguments);
+ return wrapper.apply(this, args);
+ };
+ };
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ _.compose = function() {
+ var funcs = arguments;
+ return function() {
+ var args = arguments;
+ for (var i = funcs.length - 1; i >= 0; i--) {
+ args = [funcs[i].apply(this, args)];
+ }
+ return args[0];
+ };
+ };
+
+ // Returns a function that will only be executed after being called N times.
+ _.after = function(times, func) {
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ };
+
+ // Object Functions
+ // ----------------
+
+ // Retrieve the names of an object's properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`
+ _.keys = nativeKeys || function(obj) {
+ if (obj !== Object(obj)) throw new TypeError('Invalid object');
+ var keys = [];
+ for (var key in obj) if (_.has(obj, key)) keys.push(key);
+ return keys;
+ };
+
+ // Retrieve the values of an object's properties.
+ _.values = function(obj) {
+ var values = [];
+ for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);
+ return values;
+ };
+
+ // Convert an object into a list of `[key, value]` pairs.
+ _.pairs = function(obj) {
+ var pairs = [];
+ for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);
+ return pairs;
+ };
+
+ // Invert the keys and values of an object. The values must be serializable.
+ _.invert = function(obj) {
+ var result = {};
+ for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;
+ return result;
+ };
+
+ // Return a sorted list of the function names available on the object.
+ // Aliased as `methods`
+ _.functions = _.methods = function(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (_.isFunction(obj[key])) names.push(key);
+ }
+ return names.sort();
+ };
+
+ // Extend a given object with all the properties in passed-in object(s).
+ _.extend = function(obj) {
+ each(slice.call(arguments, 1), function(source) {
+ if (source) {
+ for (var prop in source) {
+ obj[prop] = source[prop];
+ }
+ }
+ });
+ return obj;
+ };
+
+ // Return a copy of the object only containing the whitelisted properties.
+ _.pick = function(obj) {
+ var copy = {};
+ var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+ each(keys, function(key) {
+ if (key in obj) copy[key] = obj[key];
+ });
+ return copy;
+ };
+
+ // Return a copy of the object without the blacklisted properties.
+ _.omit = function(obj) {
+ var copy = {};
+ var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+ for (var key in obj) {
+ if (!_.contains(keys, key)) copy[key] = obj[key];
+ }
+ return copy;
+ };
+
+ // Fill in a given object with default properties.
+ _.defaults = function(obj) {
+ each(slice.call(arguments, 1), function(source) {
+ if (source) {
+ for (var prop in source) {
+ if (obj[prop] === void 0) obj[prop] = source[prop];
+ }
+ }
+ });
+ return obj;
+ };
+
+ // Create a (shallow-cloned) duplicate of an object.
+ _.clone = function(obj) {
+ if (!_.isObject(obj)) return obj;
+ return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+ };
+
+ // Invokes interceptor with the obj, and then returns obj.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ _.tap = function(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ };
+
+ // Internal recursive comparison function for `isEqual`.
+ var eq = function(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).
+ if (a === b) return a !== 0 || 1 / a == 1 / b;
+ // A strict comparison is necessary because `null == undefined`.
+ if (a == null || b == null) return a === b;
+ // Unwrap any wrapped objects.
+ if (a instanceof _) a = a._wrapped;
+ if (b instanceof _) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className != toString.call(b)) return false;
+ switch (className) {
+ // Strings, numbers, dates, and booleans are compared by value.
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return a == String(b);
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
+ // other numeric values.
+ return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a == +b;
+ // RegExps are compared by their source patterns and flags.
+ case '[object RegExp]':
+ return a.source == b.source &&
+ a.global == b.global &&
+ a.multiline == b.multiline &&
+ a.ignoreCase == b.ignoreCase;
+ }
+ if (typeof a != 'object' || typeof b != 'object') return false;
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] == a) return bStack[length] == b;
+ }
+ // Objects with different constructors are not equivalent, but `Object`s
+ // from different frames are.
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
+ _.isFunction(bCtor) && (bCtor instanceof bCtor))) {
+ return false;
+ }
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
+ var size = 0, result = true;
+ // Recursively compare objects and arrays.
+ if (className == '[object Array]') {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ size = a.length;
+ result = size == b.length;
+ if (result) {
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (size--) {
+ if (!(result = eq(a[size], b[size], aStack, bStack))) break;
+ }
+ }
+ } else {
+ // Deep compare objects.
+ for (var key in a) {
+ if (_.has(a, key)) {
+ // Count the expected number of properties.
+ size++;
+ // Deep compare each member.
+ if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
+ }
+ }
+ // Ensure that both objects contain the same number of properties.
+ if (result) {
+ for (key in b) {
+ if (_.has(b, key) && !(size--)) break;
+ }
+ result = !size;
+ }
+ }
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return result;
+ };
+
+ // Perform a deep comparison to check if two objects are equal.
+ _.isEqual = function(a, b) {
+ return eq(a, b, [], []);
+ };
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ _.isEmpty = function(obj) {
+ if (obj == null) return true;
+ if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
+ for (var key in obj) if (_.has(obj, key)) return false;
+ return true;
+ };
+
+ // Is a given value a DOM element?
+ _.isElement = function(obj) {
+ return !!(obj && obj.nodeType === 1);
+ };
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native Array.isArray
+ _.isArray = nativeIsArray || function(obj) {
+ return toString.call(obj) == '[object Array]';
+ };
+
+ // Is a given variable an object?
+ _.isObject = function(obj) {
+ return obj === Object(obj);
+ };
+
+ // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
+ each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
+ _['is' + name] = function(obj) {
+ return toString.call(obj) == '[object ' + name + ']';
+ };
+ });
+
+ // Define a fallback version of the method in browsers (ahem, IE), where
+ // there isn't any inspectable "Arguments" type.
+ if (!_.isArguments(arguments)) {
+ _.isArguments = function(obj) {
+ return !!(obj && _.has(obj, 'callee'));
+ };
+ }
+
+ // Optimize `isFunction` if appropriate.
+ if (typeof (/./) !== 'function') {
+ _.isFunction = function(obj) {
+ return typeof obj === 'function';
+ };
+ }
+
+ // Is a given object a finite number?
+ _.isFinite = function(obj) {
+ return isFinite(obj) && !isNaN(parseFloat(obj));
+ };
+
+ // Is the given value `NaN`? (NaN is the only number which does not equal itself).
+ _.isNaN = function(obj) {
+ return _.isNumber(obj) && obj != +obj;
+ };
+
+ // Is a given value a boolean?
+ _.isBoolean = function(obj) {
+ return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
+ };
+
+ // Is a given value equal to null?
+ _.isNull = function(obj) {
+ return obj === null;
+ };
+
+ // Is a given variable undefined?
+ _.isUndefined = function(obj) {
+ return obj === void 0;
+ };
+
+ // Shortcut function for checking if an object has a given property directly
+ // on itself (in other words, not on a prototype).
+ _.has = function(obj, key) {
+ return hasOwnProperty.call(obj, key);
+ };
+
+ // Utility Functions
+ // -----------------
+
+ // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+ // previous owner. Returns a reference to the Underscore object.
+ _.noConflict = function() {
+ root._ = previousUnderscore;
+ return this;
+ };
+
+ // Keep the identity function around for default iterators.
+ _.identity = function(value) {
+ return value;
+ };
+
+ // Run a function **n** times.
+ _.times = function(n, iterator, context) {
+ var accum = Array(Math.max(0, n));
+ for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
+ return accum;
+ };
+
+ // Return a random integer between min and max (inclusive).
+ _.random = function(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
+ }
+ return min + Math.floor(Math.random() * (max - min + 1));
+ };
+
+ // List of HTML entities for escaping.
+ var entityMap = {
+ escape: {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '/': '/'
+ }
+ };
+ entityMap.unescape = _.invert(entityMap.escape);
+
+ // Regexes containing the keys and values listed immediately above.
+ var entityRegexes = {
+ escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
+ unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
+ };
+
+ // Functions for escaping and unescaping strings to/from HTML interpolation.
+ _.each(['escape', 'unescape'], function(method) {
+ _[method] = function(string) {
+ if (string == null) return '';
+ return ('' + string).replace(entityRegexes[method], function(match) {
+ return entityMap[method][match];
+ });
+ };
+ });
+
+ // If the value of the named `property` is a function then invoke it with the
+ // `object` as context; otherwise, return it.
+ _.result = function(object, property) {
+ if (object == null) return void 0;
+ var value = object[property];
+ return _.isFunction(value) ? value.call(object) : value;
+ };
+
+ // Add your own custom functions to the Underscore object.
+ _.mixin = function(obj) {
+ each(_.functions(obj), function(name){
+ var func = _[name] = obj[name];
+ _.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return result.call(this, func.apply(_, args));
+ };
+ });
+ };
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ _.uniqueId = function(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ };
+
+ // By default, Underscore uses ERB-style template delimiters, change the
+ // following template settings to use alternative delimiters.
+ _.templateSettings = {
+ evaluate : /<%([\s\S]+?)%>/g,
+ interpolate : /<%=([\s\S]+?)%>/g,
+ escape : /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /(.)^/;
+
+ // Certain characters need to be escaped so that they can be put into a
+ // string literal.
+ var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\t': 't',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ _.template = function(text, data, settings) {
+ var render;
+ settings = _.defaults({}, settings, _.templateSettings);
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = new RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ var index = 0;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset)
+ .replace(escaper, function(match) { return '\\' + escapes[match]; });
+
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ }
+ if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ }
+ if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
+ }
+ index = offset + match.length;
+ return match;
+ });
+ source += "';\n";
+
+ // If a variable is not specified, place data values in local scope.
+ if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + "return __p;\n";
+
+ try {
+ render = new Function(settings.variable || 'obj', '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
+ }
+
+ if (data) return render(data, _);
+ var template = function(data) {
+ return render.call(this, data, _);
+ };
+
+ // Provide the compiled function source as a convenience for precompilation.
+ template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
+
+ return template;
+ };
+
+ // Add a "chain" function, which will delegate to the wrapper.
+ _.chain = function(obj) {
+ return _(obj).chain();
+ };
+
+ // OOP
+ // ---------------
+ // If Underscore is called as a function, it returns a wrapped object that
+ // can be used OO-style. This wrapper holds altered versions of all the
+ // underscore functions. Wrapped objects may be chained.
+
+ // Helper function to continue chaining intermediate results.
+ var result = function(obj) {
+ return this._chain ? _(obj).chain() : obj;
+ };
+
+ // Add all of the Underscore functions to the wrapper object.
+ _.mixin(_);
+
+ // Add all mutator Array functions to the wrapper.
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ method.apply(obj, arguments);
+ if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
+ return result.call(this, obj);
+ };
+ });
+
+ // Add all accessor Array functions to the wrapper.
+ each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ return result.call(this, method.apply(this._wrapped, arguments));
+ };
+ });
+
+ _.extend(_.prototype, {
+
+ // Start chaining a wrapped Underscore object.
+ chain: function() {
+ this._chain = true;
+ return this;
+ },
+
+ // Extracts the result from a wrapped and chained object.
+ value: function() {
+ return this._wrapped;
+ }
+
+ });
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.jshintignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.jshintignore b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.jshintignore
new file mode 100644
index 0000000..aa916f8
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.jshintignore
@@ -0,0 +1,3 @@
+node_modules
+test/dir
+test/comparison
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.npmignore b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.npmignore
new file mode 100644
index 0000000..042ccf2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.npmignore
@@ -0,0 +1,2 @@
+node_modules
+*~
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.travis.yml b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.travis.yml
new file mode 100644
index 0000000..58f2371
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - 0.6
+ - 0.8
+ - 0.10
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/license
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/license b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/license
new file mode 100644
index 0000000..4e2b3b9
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/license
@@ -0,0 +1,10 @@
+The MIT License (MIT)
+
+Copyright (c) 2012 Ryan Day
+
+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.
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/package.json b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/package.json
new file mode 100644
index 0000000..4ca4d7c
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/package.json
@@ -0,0 +1,45 @@
+{
+ "name": "walkdir",
+ "description": "Find files simply. Walks a directory tree emitting events based on what it finds. Presents a familliar callback/emitter/a+sync interface. Walk a tree of any depth.",
+ "version": "0.0.7",
+ "author": {
+ "name": "Ryan Day",
+ "email": "soldair@gmail.com"
+ },
+ "keywords": [
+ "find",
+ "walk",
+ "tree",
+ "files",
+ "fs"
+ ],
+ "main": "./walkdir.js",
+ "homepage": "http://github.com/soldair/node-walkdir",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/soldair/node-walkdir.git"
+ },
+ "scripts": {
+ "test": "./test.sh"
+ },
+ "devDependencies": {
+ "tap": "*",
+ "jshint": "0.5.x"
+ },
+ "engines": {
+ "node": ">=0.6.0"
+ },
+ "license": "MIT/X11",
+ "contributors": [
+ {
+ "name": "tjfontaine"
+ }
+ ],
+ "readme": "[](http://travis-ci.org/soldair/node-walkdir)\n \n## walkdir\n\nFind files. Walks a directory tree emitting events based on what it finds. Presents a familliar callback/emitter/sync interface. Walk a tree of any depth. This is a performant option any pull requests to make it more so will be talken into consderation.. \n\n## Example\n\n```js\n\nvar walk = require('walkdir');\n\n//async with path callback \n\nwalk('../',function(path,stat){\n console.log('found: ',path);\n});\n\n//use async emitter to capture more events\n\nvar emitter = walk('../');\n\nemitter.on('file',function(filename,stat){\n console.log('file from emitter: ', filename);\n});\n\n\n//sync with callback\n\nwalk.sync('../',function(path,stat){\n console.log('found sync:',path);\n});\n\n//sync just need paths\n\nvar paths = walk.sync('../');\nconsole.log('found paths sync: ',paths);\n\n```\n\n\n## install\n\n\tnpm install walkdir\n\
n## arguments\n\nwalkdir(path, [options], [callback])\nwalkdir.sync(path, [options], [callback]);\n\n- path\n - the starting point of your directory walk\n\n- options. supported options are\n - general\n\n\t```js\n\t{\n\t\"follow_symlinks\":false, // default is off \n\t\"no_recurse\":false, // only recurse one level deep\n\t\"max_depth\":undefined // only recurse down to max_depth. if you need more than no_recurse\n\t}\n\t```\n\n - sync only\n\n\t```js\n\t{\n\t\"return_object\":false, // if true the sync return will be in {path:stat} format instead of [path,path,...]\n\t\"no_return\":false, // if true null will be returned and no array or object will be created with found paths. useful for large listings\n\t}\n\t```\n\n- callback\n - this is bound to the path event of the emitter. its optional in all cases.\n\n\t```js\n\tcallback(path,stat)\n\t```\n\n## events\n\nnon error type events are emitted with (path,stat). stat is an instanceof fs.Stats\n\n###path\nfired for ever
ything\n\n###file\nfired only for regular files\n\n###directory\nfired only for directories\n\n###link\nfired when a symbolic link is found\n\n###end\nfired when the entire tree has been read and emitted.\n\n###socket\nfired when a socket descriptor is found\n\n###fifo\nfired when a fifo is found\n\n###characterdevice\nfired when a character device is found\n\n###blockdevice\nfired when a block device is found\n\n###targetdirectory\nfired for the stat of the path you provided as the first argument. is is only fired if it is a directory.\n\n###empty\nfired for empty directory\n\n## error events\nerror type events are emitted with (path,error). error being the error object returned from an fs call or other opperation.\n\n###error\nif the target path cannot be read an error event is emitted. this is the only failure case.\n\n###fail\nwhen stat or read fails on a path somewhere in the walk and it is not your target path you get a fail event instead of error.\nThis is handy if you want t
o find places you dont have access too.\n\n## notes\nthe async emitter returned supports 3 methods\n\n###end\n stop a walk in progress\n\n###pause\n pause the walk. no more events will be emitted until resume\n\n###resume\n resume the walk\n\n### cancel a walk in progress\n ```js\n //cancel a walk in progress within callback.\n\n var walk = require('walkdir');\n walk('../',function(path,stat){\n this.end();\n });\n\n //cancel a walk in progress with emitter handle\n var walk = require('walkdir');\n var emitter = walk('../');\n\n doSomethingAsync(function(){\n\temitter.end();\n })\n ```\n\n## thanks\nthanks to substack. the interface for this module is based off of node-findit\n\n",
+ "readmeFilename": "readme.md",
+ "bugs": {
+ "url": "https://github.com/soldair/node-walkdir/issues"
+ },
+ "_id": "walkdir@0.0.7",
+ "_from": "walkdir@>= 0.0.1"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/readme.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/readme.md b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/readme.md
new file mode 100644
index 0000000..1b359de
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/readme.md
@@ -0,0 +1,160 @@
+[](http://travis-ci.org/soldair/node-walkdir)
+
+## walkdir
+
+Find files. Walks a directory tree emitting events based on what it finds. Presents a familliar callback/emitter/sync interface. Walk a tree of any depth. This is a performant option any pull requests to make it more so will be talken into consderation..
+
+## Example
+
+```js
+
+var walk = require('walkdir');
+
+//async with path callback
+
+walk('../',function(path,stat){
+ console.log('found: ',path);
+});
+
+//use async emitter to capture more events
+
+var emitter = walk('../');
+
+emitter.on('file',function(filename,stat){
+ console.log('file from emitter: ', filename);
+});
+
+
+//sync with callback
+
+walk.sync('../',function(path,stat){
+ console.log('found sync:',path);
+});
+
+//sync just need paths
+
+var paths = walk.sync('../');
+console.log('found paths sync: ',paths);
+
+```
+
+
+## install
+
+ npm install walkdir
+
+## arguments
+
+walkdir(path, [options], [callback])
+walkdir.sync(path, [options], [callback]);
+
+- path
+ - the starting point of your directory walk
+
+- options. supported options are
+ - general
+
+ ```js
+ {
+ "follow_symlinks":false, // default is off
+ "no_recurse":false, // only recurse one level deep
+ "max_depth":undefined // only recurse down to max_depth. if you need more than no_recurse
+ }
+ ```
+
+ - sync only
+
+ ```js
+ {
+ "return_object":false, // if true the sync return will be in {path:stat} format instead of [path,path,...]
+ "no_return":false, // if true null will be returned and no array or object will be created with found paths. useful for large listings
+ }
+ ```
+
+- callback
+ - this is bound to the path event of the emitter. its optional in all cases.
+
+ ```js
+ callback(path,stat)
+ ```
+
+## events
+
+non error type events are emitted with (path,stat). stat is an instanceof fs.Stats
+
+###path
+fired for everything
+
+###file
+fired only for regular files
+
+###directory
+fired only for directories
+
+###link
+fired when a symbolic link is found
+
+###end
+fired when the entire tree has been read and emitted.
+
+###socket
+fired when a socket descriptor is found
+
+###fifo
+fired when a fifo is found
+
+###characterdevice
+fired when a character device is found
+
+###blockdevice
+fired when a block device is found
+
+###targetdirectory
+fired for the stat of the path you provided as the first argument. is is only fired if it is a directory.
+
+###empty
+fired for empty directory
+
+## error events
+error type events are emitted with (path,error). error being the error object returned from an fs call or other opperation.
+
+###error
+if the target path cannot be read an error event is emitted. this is the only failure case.
+
+###fail
+when stat or read fails on a path somewhere in the walk and it is not your target path you get a fail event instead of error.
+This is handy if you want to find places you dont have access too.
+
+## notes
+the async emitter returned supports 3 methods
+
+###end
+ stop a walk in progress
+
+###pause
+ pause the walk. no more events will be emitted until resume
+
+###resume
+ resume the walk
+
+### cancel a walk in progress
+ ```js
+ //cancel a walk in progress within callback.
+
+ var walk = require('walkdir');
+ walk('../',function(path,stat){
+ this.end();
+ });
+
+ //cancel a walk in progress with emitter handle
+ var walk = require('walkdir');
+ var emitter = walk('../');
+
+ doSomethingAsync(function(){
+ emitter.end();
+ })
+ ```
+
+## thanks
+thanks to substack. the interface for this module is based off of node-findit
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test.sh
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test.sh b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test.sh
new file mode 100755
index 0000000..14679f8
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/walkdir/test.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+./node_modules/jshint/bin/hint ./*
+hint=$?
+if [ $hint != 0 ]; then
+ echo "< script runner stopped jshint failed >";
+ exit $hint
+else
+ echo "< jshint passed >";
+fi
+
+./node_modules/tap/bin/tap.js ./test/*.js
+unit=$?
+if [ $unit != 0 ]; then
+ echo "< script runner stopped unit tests failed >";
+ exit $unit
+else
+ echo "< unit tests passed >";
+fi
+
[40/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/test/test_jworkflow.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/test/test_jworkflow.js b/blackberry10/node_modules/jWorkflow/test/test_jworkflow.js
new file mode 100644
index 0000000..afb13a2
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/test/test_jworkflow.js
@@ -0,0 +1,521 @@
+$(document).ready(function () {
+ module("jWorkflow ordering and starting workflows");
+
+ test("jWorkflow: we can place an order", function () {
+ expect(1);
+ var order = jWorkflow.order(function () {});
+ ok(order, "we should have an order");
+ });
+
+ test("jWorkflow: order throws an error when not given a function", function () {
+ expect(1);
+ var errored = false;
+ try {
+ jWorkflow.order(42);
+ }
+ catch (ex) {
+ errored = true;
+ }
+
+ ok(errored, "expected an error");
+
+ });
+
+ test("jWorkflow: we can call andThen on the return value of order", function () {
+ expect(2);
+
+ var transfunctioner = function () { },
+ order = jWorkflow.order(transfunctioner);
+
+ ok(order.andThen, "expected to be asked: 'andThen'");
+ equals(typeof(order.andThen), "function", "expected andThen to be a function");
+ });
+
+ test("jWorkflow: andThen throws an error when not given a function", function () {
+ expect(1);
+
+ var errored = false;
+ try {
+ jWorkflow.order(function () {}).andThen(42);
+ }
+ catch (ex) {
+ errored = true;
+ }
+
+ ok(errored, "expected an error");
+
+ });
+
+ test("jWorkflow: we can call andThen on the return value of andThen", function () {
+ expect(2);
+
+ var garlicChicken = function () {},
+ whiteRice = function () {},
+ wontonSoup = function () {},
+ cookiesFortune = function () {},
+ noAndThen = function () {},
+ order = jWorkflow.order(garlicChicken)
+ .andThen(whiteRice)
+ .andThen(wontonSoup)
+ .andThen(cookiesFortune);
+
+ order.andThen(noAndThen).andThen(noAndThen);
+
+ ok(order.andThen, "expected to be asked: 'andThen'");
+ equals(typeof(order.andThen), "function", "expected andThen to be a function");
+
+ });
+
+ test("jWorkflow: it doesnt invoke the order function when start isnt called", function () {
+ var dude = true,
+ sweet = function () {
+ dude = false;
+ },
+ order = jWorkflow.order(sweet);
+
+ ok(dude, "expected sweet to have not been invoked");
+
+ });
+
+ test("jWorkflow: it calls the order function when start is called", function () {
+ var dude = false,
+ sweet = function () {
+ dude = true;
+ },
+ order = jWorkflow.order(sweet);
+
+ order.start();
+
+ ok(dude, "expected sweet to have been invoked");
+ });
+
+ asyncTest("jWorkflow: it can handle multiple orders without mixing them", function () {
+ expect(1);
+ var dude = false,
+ what = false,
+ sweet = function () {
+ dude = true;
+ },
+ whatup = function () {
+ what = true;
+ },
+ order = jWorkflow.order(sweet),
+ order2 = jWorkflow.order(whatup);
+
+
+ order.start(function () {
+ start();
+ ok(what === false, "whatup shouldn't have been called");
+ });
+ });
+
+ test("jWorkflow: it calls the order in the order that it was built", function () {
+ expect(1);
+
+ var result = [],
+ garlicChicken = function () {
+ result.push("garlicChicken");
+ },
+ whiteRice = function () {
+ result.push("whiteRice");
+ },
+ wontonSoup = function () {
+ result.push("wontonSoup");
+ },
+ cookiesFortune = function () {
+ result.push("cookiesFortune");
+ },
+ noAndThen = function () {
+ result.push("noAndThen");
+ },
+ order = jWorkflow.order(garlicChicken)
+ .andThen(whiteRice)
+ .andThen(wontonSoup)
+ .andThen(cookiesFortune);
+
+ order.andThen(noAndThen).andThen(noAndThen);
+
+ order.start();
+
+ same(["garlicChicken", "whiteRice", "wontonSoup", "cookiesFortune", "noAndThen", "noAndThen"], result, "expected functions to be called in order");
+ });
+
+ test("jWorkflow: it get the return value of the previous func", function () {
+
+ var dude = function () {
+ return 42;
+ },
+ sweet = function (previous) {
+ equals(previous, 42, "expected previous to be return value");
+ },
+ order = jWorkflow.order(dude).andThen(sweet);
+
+ order.start();
+
+ });
+
+ test("jWorkflow: we get a baton play with", function () {
+ var order = jWorkflow.order(function (previous, baton) {
+ ok(baton, "expected a baton");
+ ok(baton.take, "expected to be able to take the baton");
+ ok(baton.pass, "expected to be able to pass the baton");
+ });
+
+ order.start();
+
+ });
+
+ test("jWorkflow: when I take the baton, the next methods are not called if I don't pass it", function () {
+ var transfunctioner = true,
+ dude = function () {},
+ sweet = function () {},
+ noAndThen = function (previous, baton) {
+ baton.take();
+ },
+ fortuneCookie = function () {
+ transfunctioner = false;
+ },
+ order = jWorkflow.order(dude).andThen(sweet).andThen(noAndThen).andThen(fortuneCookie);
+
+ order.start();
+
+ ok(transfunctioner, "fortune Cookie should not have been called because we took the baton and didn't pass it");
+ });
+
+ asyncTest("jWorkflow: when I take the baton and pass it async, the next methods are called", function () {
+ expect(1);
+ var transfunctioner = false,
+ dude = function () {},
+ sweet = function () {},
+ noAndThen = function (previous, baton) {
+ baton.take();
+ window.setTimeout(function () {
+ baton.pass();
+ }, 10);
+ },
+ fortuneCookie = function () {
+ transfunctioner = true;
+ },
+ order = jWorkflow.order(dude).andThen(sweet).andThen(noAndThen).andThen(fortuneCookie);
+
+ order.start(function () {
+ start();
+ ok(transfunctioner, "fortune Cookie should have been called because we passed the baton");
+ });
+
+ });
+
+ asyncTest("jWorkflow: it calls the order in the order that it was built, even with Async calls", function () {
+ expect(1);
+
+ var result = [],
+ procrastinate = function (msg, baton) {
+ baton.take();
+ window.setTimeout(function () {
+ result.push(msg);
+ baton.pass();
+ }, 10);
+ },
+ garlicChicken = function (previous, baton) {
+ procrastinate("garlicChicken", baton);
+ },
+ whiteRice = function (previous, baton) {
+ result.push("whiteRice");
+ },
+ wontonSoup = function (previous, baton) {
+ procrastinate("wontonSoup", baton);
+ },
+ cookiesFortune = function (previous, baton) {
+ result.push("cookiesFortune");
+ },
+ noAndThen = function (previous, baton) {
+ procrastinate("noAndThen", baton);
+ },
+ order = jWorkflow.order(garlicChicken)
+ .andThen(whiteRice)
+ .andThen(wontonSoup)
+ .andThen(cookiesFortune);
+
+ order.andThen(noAndThen).andThen(noAndThen);
+
+ order.start(function () {
+ start();
+ same(result, ["garlicChicken", "whiteRice", "wontonSoup", "cookiesFortune", "noAndThen", "noAndThen"], "expected functions to be called in order");
+ });
+ });
+
+ test("jWorkflow: we can give context for the function passed to andThen", function () {
+ expect(1);
+
+ var zoltan = {
+ toMyParentsMinivan: function () {
+ ok(this.getCultMembers, "expected to be able to get the cult members");
+ },
+
+ getCultMembers: function () {
+ return ["Zarnoff", "Zabu", "Zellnor", "Zelbor", "Zelmina", "Jeff"];
+ }
+ },
+ order = jWorkflow.order(zoltan.toMyParentsMinivan, zoltan);
+
+ order.start();
+ });
+
+ test("jWorkflow, we can pass in a different context for each function", function () {
+ expect(2);
+
+ var jesse = {
+ smokeyMcPot: true,
+ test: function () {
+ ok(this.smokeyMcPot, "I should be SmokeyMcPot");
+ }
+ },
+ chester = {
+ johnnyPotsmoker: true,
+ test: function () {
+ ok(this.johnnyPotsmoker, "I should be Johnny Potsmoker");
+ }
+ },
+ order = jWorkflow.order(jesse.test, jesse)
+ .andThen(chester.test, chester);
+
+
+ order.start();
+
+
+ });
+
+ test("jWorkflow: we can pass context into start", function () {
+ expect(1);
+
+ var jesse = {
+ smokeyMcPot: true,
+ test: function () {
+ ok(this.smokeyMcPot, "I should be SmokeyMcPot");
+ }
+ },
+ order = jWorkflow.order();
+
+ order.start(jesse.test, jesse);
+ });
+
+ test("jWorkflow, we can pass null into order", function () {
+ expect(1);
+
+ var order = jWorkflow.order();
+
+ ok(order, "expected to have an order when not passing in an initial function");
+ });
+
+ test("jWorkflow, we can NOT pass null into andThen", function () {
+ expect(1);
+ var errored = false,
+ order = jWorkflow.order();
+
+ try {
+ order.andThen();
+ }
+ catch (ex) {
+ errored = true;
+ }
+
+ ok(errored, "expected an exception when calling andThen with no order");
+ });
+
+ asyncTest("jWorkflow, we can pass a return value from an async function into a sync function via the baton", function () {
+ expect(1);
+
+ var correct,
+ was,
+ order = jWorkflow.order(function (previous, baton) {
+ baton.take();
+ setTimeout(function () {
+ baton.pass(420);
+ }, 10);
+
+ return 11;
+
+ }).andThen(function (answer) {
+ was = answer;
+ correct = answer === 420;
+ });
+
+ order.start(function () {
+ start();
+ ok(correct, "expected it to be 420 but was " + was);
+ });
+ });
+
+ asyncTest("jWorkflow, we can reuse an order", function () {
+ expect(1);
+
+ var sheep_teleported = 0,
+ teleport = function () {
+ sheep_teleported += 1;
+ },
+ order = jWorkflow.order(teleport).andThen(teleport);
+
+
+ order.start(function () {
+ order.start(function () {
+ start();
+ equals(sheep_teleported, 4, "expected to teleport 4 sheep");
+ });
+ });
+ });
+
+ asyncTest("jWorkflow, we can chill for a little bit between tasks", function () {
+ var time = [],
+ inhale = function () {
+ time.push(new Date());
+ },
+ exhale = inhale;
+
+ jWorkflow.order(inhale).chill(100).andThen(exhale).start(function () {
+ start();
+ var chilled = time[1] - time[0];
+ ok(chilled > 50, "expected to chill a little bit between tasks: " + chilled);
+ });
+ });
+
+ test("jWorkflow, it passes the final result to the callback passed to start", function () {
+ expect(1);
+ var plus1 = function (prev) {
+ return prev + 1;
+ };
+
+ jWorkflow.order(function () {
+ return 0;
+ })
+ .andThen(plus1)
+ .andThen(plus1)
+ .start(function (result) {
+ equals(2, result);
+ });
+ });
+
+ test("jWorkflow, we can pass the initial value into start", function () {
+ expect(1);
+
+ jWorkflow.order().andThen(function (prev) {
+ equals(5, prev);
+ }).start({
+ initialValue: 5
+ });
+ });
+
+ asyncTest("jWorkflow, we can pass another workflow into andThen", function () {
+ expect(1);
+
+ var plus1 = function (prev) {
+ return prev + 1;
+ },
+ plus4 = function (prev, baton) {
+ baton.take();
+ setTimeout(function () {
+ baton.pass(prev + 4);
+ }, 10);
+ },
+ addTen = jWorkflow.order(plus4).andThen(plus1).andThen(plus4).andThen(plus1),
+ addFive = jWorkflow.order(plus4).andThen(plus1);
+
+ jWorkflow.order()
+ .andThen(addTen)
+ .andThen(addTen)
+ .andThen(addFive)
+ .start({
+ callback: function (result) {
+ start();
+ equals(result, 25);
+ },
+ initialValue: 0
+ });
+ });
+
+ asyncTest("jWorkflow, we can pass an array of functions into andThen", function () {
+ expect(1);
+
+ var x = "",
+ w = function (letter, delay) {
+ return function (prev, baton) {
+ if (delay) {
+ baton.take();
+ window.setTimeout(function () {
+ x += letter;
+ baton.pass();
+ }, delay);
+ }
+ else {
+ x += letter;
+ }
+ };
+ };
+
+ jWorkflow.order(w("d"))
+ .andThen([w("U", 100), w("u", 10), w("u")])
+ .andThen(w("de"))
+ .start(function () {
+ start();
+ equals(x, "duuUde");
+ });
+
+ });
+
+ asyncTest("jWorkflow, we can pass an array of workflows into andThen", function () {
+ expect(1);
+
+ var x = "",
+ w = function (letter, delay) {
+ return function (prev, baton) {
+ if (delay) {
+ baton.take();
+ window.setTimeout(function () {
+ x += letter;
+ baton.pass();
+ }, delay);
+ }
+ else {
+ x += letter;
+ }
+ };
+ };
+
+ jWorkflow.order(jWorkflow.order(w("s")))
+ .andThen([jWorkflow.order(w("w", 1)).andThen(w("e")), jWorkflow.order(w("e", 30))])
+ .andThen(w("et"))
+ .start(function () {
+ start();
+ equals(x, "sweeet");
+ });
+ });
+
+ asyncTest("jWorkflow, we can stop execution of a workflow with baton.drop", function () {
+ expect(2);
+
+ var inc = function (prev, baton) {
+ if (prev >= 3) {
+ baton.drop(prev);
+ }
+ return ++prev;
+ },
+ protected = false;
+
+ jWorkflow.order(inc)
+ .andThen(inc)
+ .andThen(inc)
+ .andThen(inc)
+ .andThen(inc)
+ .andThen(inc)
+ .andThen(function (prev) {
+ protected = true;
+ return prev;
+ }).start({
+ initialValue: 0,
+ callback: function (result) {
+ start();
+ equals(protected, false);
+ equals(result, 3);
+ }
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/test/vendor/jquery.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/test/vendor/jquery.js b/blackberry10/node_modules/jWorkflow/test/vendor/jquery.js
new file mode 100644
index 0000000..a0fb883
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/test/vendor/jquery.js
@@ -0,0 +1,19 @@
+/*
+ * jQuery JavaScript Library v1.3.2
+ * http://jquery.com/
+ *
+ * Copyright (c) 2009 John Resig
+ * Dual licensed under the MIT and GPL licenses.
+ * http://docs.jquery.com/License
+ *
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
+ * Revision: 6246
+ */
+(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.sele
ctor=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this
;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G
){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="st
ring"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o
.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(t
his[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Obje
ct.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!=
=false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="m
argin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDoc
ument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[
2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J
.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return
J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webk
it/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K
=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache
[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"
}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
+/*
+ * Sizzle CSS Selector Engine - v0.9.3
+ * Copyright 2009, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ * More information: http://sizzlejs.com/
+ */
+(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.cal
l(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].
exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((
?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:functi
on(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[
1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"
===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U
=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)=
==U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){va
r V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagNa
me(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElem
entsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:f
unction(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U=
=T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeT
ype==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.
indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.tes
t(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY
=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.is
DefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F|
|H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.sel
ector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatecha
nge",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;o
pacity:.5;">a</a><select><option>text</option></select><object><param/></object>';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("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:func
tion(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.ext
end(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"
="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);
return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.
httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try
{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.conca
t.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?
this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return tr
ue})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.pr
ototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop==
"height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J
,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.
offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElem
ent("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();va
r G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxMod
el&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/test/vendor/qunit.css
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/test/vendor/qunit.css b/blackberry10/node_modules/jWorkflow/test/vendor/qunit.css
new file mode 100644
index 0000000..1d3b97e
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/test/vendor/qunit.css
@@ -0,0 +1,17 @@
+h1#qunit-header, h1.qunit-header { padding: 15px; font-size: large; background-color: #06b; color: white; font-family: 'trebuchet ms', verdana, arial; margin: 0; }
+h1#qunit-header a { color: white; }
+
+h2#qunit-banner { height: 2em; border-bottom: 1px solid white; background-color: #eee; margin: 0; font-family: 'trebuchet ms', verdana, arial; }
+h2#qunit-banner.pass { background-color: green; }
+h2#qunit-banner.fail { background-color: red; }
+
+h2#qunit-userAgent, h2.qunit-userAgent { padding: 10px; background-color: #eee; color: black; margin: 0; font-size: small; font-weight: normal; font-family: 'trebuchet ms', verdana, arial; font-size: 10pt; }
+
+div#qunit-testrunner-toolbar { background: #eee; border-top: 1px solid black; padding: 10px; font-family: 'trebuchet ms', verdana, arial; margin: 0; font-size: 10pt; }
+
+ol#qunit-tests { font-family: 'trebuchet ms', verdana, arial; font-size: 10pt; }
+ol#qunit-tests li strong { cursor:pointer; }
+ol#qunit-tests .pass { color: green; }
+ol#qunit-tests .fail { color: red; }
+
+p#qunit-testresult { margin-left: 1em; font-size: 10pt; font-family: 'trebuchet ms', verdana, arial; }
[14/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/README.md b/blackberry10/node_modules/localize/README.md
new file mode 100644
index 0000000..54f52ba
--- /dev/null
+++ b/blackberry10/node_modules/localize/README.md
@@ -0,0 +1,267 @@
+# The *node-localize* library
+provides a [GNU gettext](http://www.gnu.org/s/gettext/)-inspired (but not conformant) translation utility for [Node.js](http://nodejs.org) that tries to avoid some of the limitations of the ``sprintf``-bound ``gettext`` (such as translation string parameters being in a fixed order in all translation results) and "fit in" better than a straight port.
+
+## Installation
+
+If you have [npm](http://npmjs.org), just type:
+
+```sh
+npm install localize
+```
+
+## Usage
+
+``node-localize`` returns an object constructor so multiple simultaneous localization objects may be in use at once (though most cases will probably be a singleton instantiation). The only required parameter on initialization is a ``translations`` object, using the following structure:
+
+```js
+var Localize = require('localize');
+
+var myLocalize = new Localize({
+ "Testing...": {
+ "es": "Pruebas...",
+ "sr": "тестирање..."
+ },
+ "Substitution: $[1]": {
+ "es": "Sustitución: $[1]",
+ "sr": "замена: $[1]"
+ }
+});
+
+console.log(myLocalize.translate("Testing...")); // Testing...
+console.log(myLocalize.translate("Substitution: $[1]", 5)); // Substitution: 5
+
+myLocalize.setLocale("es");
+console.log(myLocalize.translate("Testing...")); // Pruebas...
+
+myLocalize.setLocale("sr");
+console.log(myLocalize.translate("Substitution: $[1]", 5)); // замена: 5
+```
+
+``node-localize`` objects can also be passed a string indicating the directory a ``translations.json`` file can be found. This directory is searched recursively for all ``translations.json`` files in all subdirectories, and their contents combined together, so you can organize your translations as you wish.
+
+The directory is also searched recursively for directories named ``translations``. These directories are checked for special text files of the form ``varname.txt``, ``varname.es.txt``, ``varname.sr.txt``, etc. The text in ``varname.txt`` is treated as the default language of the application and the ``varname.xx.txt`` are treated as translations of the text. A special ``strings`` object is created where the ``varname`` becomes a property of that object and the default language text is the value of the property. So you can also do the following:
+
+```js
+var Localize = require('localize');
+
+var myLocalize = new Localize('./path/to/text/files/');
+
+console.log(myLocalize.translate(myLocalize.strings.reallyLongText); // The contents of ./path/to/text/files/translations/reallyLongText.txt, if it exists
+
+myLocalize.setLocale("es");
+console.log(myLocalize.translate(myLocalize.strings.reallyLongText); // The contents of ./path/to/text/files/translations/reallyLongText.es.txt, if it exists
+```
+
+## Dates
+
+Because date formats differ so wildly in different languages and these differences cannot be solved via simple substitution, there is also a ``localDate`` method for translating these values.
+
+```js
+var theDate = new Date("4-Jul-1776");
+var dateLocalize = new Localize("./translations");
+dateLocalize.loadDateFormats({
+ "es": {
+ dayNames: [
+ 'Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb',
+ 'Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'
+ ],
+ monthNames: [
+ 'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic',
+ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'
+ ],
+ masks: {
+ "default": "dddd, d 'de' mmmm yyyy"
+ }
+ }
+});
+
+console.log(dateLocalize.localDate(theDate)); // Thu Jul 04 1776 00:00:00
+console.log(dateLocalize.localDate(theDate, "fullDate")); // Thursday, July 4, 1776
+console.log(dateLocalize.localDate(theDate, "mm/dd/yyyy")); // 07/04/1776
+
+dateLocalize.setLocale("es");
+console.log(dateLocalize.localDate(theDate)); // Jueves, 4 de Julio 1776
+```
+
+The date formatting rules and configuration have been taken from [node-dateformat](https://github.com/felixge/node-dateformat), which has been extended to support multiple simultaneous locales and subsumed into ``node-localize``.
+
+## Complete API
+
+```js
+var myLocalize = new Localize(translationsObjOrStr, dateFormatObj, defaultLocaleStr);
+// translationsObjOrStr: a conformant translations object or a string indicating
+// the directory where one or more conformant translations.json files are stored
+// dateFormatObj: a conformant date format object, containing one or more locales
+// if not specified, will auto-generate an 'en' locale; if initially specified,
+// will *overwrite* this auto-generated locale object
+// defaultLocale: the locale of all keys in the translations object. Defaults to 'en'
+```
+
+```js
+myLocalize.setLocale(localeStr);
+// localeStr: a locale string to switch to
+```
+
+```js
+myLocalize.loadTranslations(translationsObjOrStr);
+// translationsObjOrStr: a conformant translations object or a string indicating
+// the directory where one or more conformant translations.json files are stored
+// Multiple calls to loadTranslations *appends* the keys to the translations
+// object in memory (overwriting duplicate keys).
+```
+
+```js
+myLocalize.clearTranslations();
+// Wipes out the translations object entirely (if a clean reload is desired)
+```
+
+```js
+myLocalize.throwOnMissingTranslation(throwBool);
+// throwBool: Boolean indicating whether or not missing translations should
+// throw an error or be silently ignored and the text stay in the default
+// locale. Useful for development to turn off.
+```
+
+```js
+myLocalize.translate(translateStr, arg1, arg2, ...);
+// translateStr: The string to be translated and optionally perform a
+// substitution of specified args into. Arguments are specified in a RegExp
+// style by number starting with 1 (it is the first argument that can be
+// used and also is the arguments[1] value...), while using a jQuery-style
+// demarcation of $[x], where x is the argument number.
+```
+
+```js
+myLocalize.loadDateFormats(dateFormatObj);
+// dateFormatObj: a conformant date format object, containing one or more locales
+// Specified locales are appended to the internal object just like
+// loadTranslations.
+```
+
+```js
+myLocalize.clearDateFormats();
+// Resets the date formats object to just the 'en' locale.
+```
+
+```js
+myLocalize.localDate(dateObjOrStr, maskStr, utcBool)
+// dateObjOrStr: the date object or string to format as desired in the current
+// locale.
+// maskStr: the predefined mask to use, or a custom mask.
+// utcBool: a boolean indicating whether the timezone should be local or UTC
+```
+
+```js
+myLocalize.strings
+// Object of key-value pairs defined by files in ``translations`` directories
+// Key is the filename (sans extension) and value is the default language
+// text. Useful for translating very large blocks of text that shouldn't really
+// exist in code.
+```
+
+## _xlocalize_ CLI Utility
+
+Starting at version 0.2.0, ``node-localize``, when installed via NPM, adds an ``xlocalize`` utility command to the _PATH_, which allows for automatic construction of ``translations.json`` files (and can be re-run in the future to update existing files without clobbering any current translations present). It's command switches are as follows:
+
+```
+xlocalize USAGE:
+
+-l Set the default language for the translations.json file(s) (default: en)
+-r Set xlocalize to generate translations.json files recursively (default)
+-R Set xlocalize to only generate a translations.json file for the current directory
+-e Set the file extensions to include for translation (default: html,js)
+-t Set the languages to translate to (comma separated)
+-h Show this help message.
+```
+
+For example, to create a ``translations.json`` file in the current directory only that will translate from English to Spanish, Portuguese, Italian, and French for HTML and JS files:
+
+```sh
+xlocalize -R -t es,pt,it,fr
+```
+
+And if a new language, such as Serbian, is to be translated at a later time, you can use the command:
+```sh
+xlocalize -R -t es,pt,it,fr,sr
+```
+
+## [Express](http://expressjs.com) Integration Tips
+
+If your website supports multiple languages (probably why you're using this library!), you'll want to translate the page content for each supported language. The following snippets of code should make it easy to use within Express.
+
+### Middleware to switch locale on request
+
+```js
+app.configure(function() {
+ ...
+ app.use(function(request, response, next) {
+ var lang = request.session.lang || "en";
+ localize.setLocale(lang);
+ next();
+ });
+ ...
+});
+```
+
+I'm assuming you're storing their language preference inside of a session, but the logic can be easily tweaked for however you detect which language to show.
+
+### Export *translate*, *localDate*, and *strings* as static helpers
+
+```js
+app.helpers({
+ ...
+ translate: localize.translate,
+ localDate: localize.localDate,
+ strings: localize.strings
+});
+```
+
+Your controllers shouldn't really even be aware of any localization issues; the views should be doing that, so this ought to be enough configuration within your ``app.js`` file.
+
+### Using *translate*, *localDate*, and *strings* in your views
+
+```html
+<h1>${translate("My Awesome Webpage")}</h1>
+
+<h2>${translate("By: $[1]", webpageAuthor)}</h2>
+
+<h3>${translate("Published: $[1]", localDate(publicationDate))}</h3>
+
+{{if translate(strings.reallyLongPost) == strings.reallyLongPost}}
+<strong>${translate("Warning: The following content is in English.")}</strong>
+{{/if}}
+
+{{html translate(strings.reallyLongPost)}}
+```
+
+I'm using [jQuery Templates for Express](https://github.com/kof/node-jqtpl) here, but it should be easy to translate to whatever templating language you prefer.
+
+## Planned Features
+
+* Browser compatibility (use same functions for client-side jQuery Templates, for instance)
+* Optional Country Code support (that falls back to baseline language translation if a specific country code is missing) for regional language differences
+* Numeric localization (1,234,567.89 versus 1.234.567,89 versus 1 234 567,89 versus [Japanese Numerals](http://en.wikipedia.org/wiki/Japanese_numerals) [no idea how to handle that one at the moment])
+* Currency localization; not just representing $100.00 versus 100,00$, but perhaps hooking into currency conversion, as well.
+* Pluralization; one area gettext still beats node-localize is the ability to pluralize words correctly when given the number to pluralize against.
+
+## License (MIT)
+
+Copyright (C) 2011 by Agrosica, Inc, David Ellis, Felix Geisendörfer, Steven Levithan, Scott Trenda, Kris Kowal, Jerry Jalava, Clint Andrew Hall.
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/bin/translations.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/bin/translations.json b/blackberry10/node_modules/localize/bin/translations.json
new file mode 100644
index 0000000..a4d2575
--- /dev/null
+++ b/blackberry10/node_modules/localize/bin/translations.json
@@ -0,0 +1,6 @@
+{
+ "MISSING TRANSLATION": {
+ },
+ "FOUND VARIABLE INPUT $[1]": {
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/bin/xlocalize.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/bin/xlocalize.js b/blackberry10/node_modules/localize/bin/xlocalize.js
new file mode 100755
index 0000000..d34df65
--- /dev/null
+++ b/blackberry10/node_modules/localize/bin/xlocalize.js
@@ -0,0 +1,139 @@
+#!/usr/bin/node
+
+// Load required modules
+var fs = require('fs');
+var path = require('path');
+
+// Use localize for internal localizations
+var localize = new require('localize')(__dirname);
+localize.throwOnMissingTranslation(false);
+var translate = localize.translate;
+
+// Defaults for ``xlocalize``
+var defaultLang = "en";
+var recurse = true;
+var extensions = ['html', 'js'];
+var outLangs = [];
+
+// Load arguments
+for(var i = 0; i < process.argv.length; i++) {
+ switch(process.argv[i]) {
+ case "-l":
+ defaultLang = process.argv[i+1];
+ break;
+ case "-r":
+ recurse = true;
+ break;
+ case "-R":
+ recurse = false;
+ break;
+ case "-e":
+ extensions = process.argv[i+1].split(",");
+ break;
+ case "-t":
+ outLangs = process.argv[i+1].split(",");
+ break;
+ case "-h":
+ case "--help":
+ console.log("xlocalize USAGE:\n");
+ console.log("-l\tSet the default language for the translations.json file(s) (default: en)");
+ console.log("-r\tSet xlocalize to generate translations.json files recursively (default)");
+ console.log("-R\tSet xlocalize to only generate a translations.json file for the current directory");
+ console.log("-e\tSet the file extensions to include for translation (default: html,js)");
+ console.log("-t\tSet the languages to translate to (comma separated)");
+ console.log("-h\tShow this help message.");
+ process.exit();
+ default:
+ break;
+ }
+}
+
+// Set internal localize object to use the user's default language
+localize.setLocale(defaultLang);
+
+// ## The *mergeObjs* function
+// is a helper function that clones the value of various object into a new one.
+// This simplistic one is fast, but assumes no recursive objects to merge.
+function mergeObjs() {
+ var outObj = {};
+ for(var i in arguments) {
+ if(arguments[i] instanceof Object) {
+ for(var j in arguments[i]) {
+ // Does not check for collisions, newer object
+ // definitions clobber old definitions
+ outObj[j] = arguments[i][j];
+ }
+ }
+ }
+ return outObj;
+}
+
+// ## The *processDir* function
+// generates a ``translations.json`` file for the current directory, but does
+// not override the previous file -- only augments it
+function processDir(dir) {
+ // JSON object for the current directory
+ var dirJSON = {};
+ // Path where translations will go
+ var translations = path.join(dir, "translations.json");
+ // Check for pre-existing ``translations.json`` file
+ if(path.existsSync(translations)) {
+ var currJSON = JSON.parse(fs.readFileSync(translations, "utf8"));
+ dirJSON = mergeObjs(dirJSON, currJSON);
+ }
+
+ // Build pattern matching for searchable files
+ var extRegExpStr = "(";
+ for(var i = 0; i < extensions.length; i++) {
+ extRegExpStr += extensions[i];
+ if(i < extensions.length-1) { extRegExpStr += "|"; }
+ else { extRegExpStr += ")$"; }
+ }
+ var extRegExp = new RegExp(extRegExpStr);
+
+ // Process files in the current directory
+ var files = fs.readdirSync(dir);
+ files.forEach(function(file) {
+ if(extRegExp.test(file)) {
+ processFile(path.join(dir, file), dirJSON);
+ }
+ if(recurse && fs.statSync(path.join(dir, file)).isDirectory()) {
+ processDir(path.join(dir, file));
+ }
+ });
+
+ // Output dirJSON to file
+ fs.writeFileSync(translations, JSON.stringify(dirJSON, null, " "), "utf8");
+}
+
+// ## The *processFile* function
+// extracts all translatable pieces of a source file into the dirJSON object,
+// unless already there.
+function processFile(filename, dirJSON) {
+ // Hacky, hacky RegExp parsing right now; replace with something better
+ var fileContents = fs.readFileSync(filename, "utf8");
+ var translatables = fileContents.match(/translate\s*\([^\),]*/);
+ if(translatables) {
+ for(var i = 0; i < translatables.length; i++) {
+ if(/^translate\s*\(\s*['"](.*)['"]$/.test(translatables[i])) { // A string-looking thing
+ if(!dirJSON[RegExp.$1]) { // Does not yet exist
+ dirJSON[RegExp.$1] = {};
+ }
+ outLangs.forEach(function(lang) {
+ if(!dirJSON[RegExp.$1][lang]) { // No translation, yet
+ dirJSON[RegExp.$1][lang] = translate("MISSING TRANSLATION");
+ }
+ });
+ } else {
+ var translateMessage = translate("FOUND VARIABLE INPUT: $[1]", translatables[i]);
+ dirJSON[translateMessage] = {};
+ outLangs.forEach(function(lang) {
+ dirJSON[translateMessage][lang] = translate("MISSING TRANSLATION");
+ });
+ }
+ }
+ }
+}
+
+// Get the ball rollin'
+processDir(process.cwd());
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/lib/localize.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/lib/localize.js b/blackberry10/node_modules/localize/lib/localize.js
new file mode 100644
index 0000000..648325e
--- /dev/null
+++ b/blackberry10/node_modules/localize/lib/localize.js
@@ -0,0 +1,405 @@
+// # Localize
+// is a GNU gettext-inspired (but not conformant) localization library for
+// Node.js
+
+// Libraries, if in a CommonJS environment
+if(typeof(require) != 'undefined') {
+ var path = require('path');
+ var fs = require('fs');
+}
+
+function Localize(translations, dateFormats, defaultLocale) {
+
+ // Make sure the defaultLocale is something sane, and set the locale to
+ // its value. Also configure ``Localize`` to throw an error if missing
+ // a translation.
+ defaultLocale = typeof(defaultLocale) == "string" ? defaultLocale : "en";
+ var locale = defaultLocale;
+ var missingTranslationThrow = true;
+
+ // ## The *mergeObjs* function
+ // is a simple helper function to create a new object based on input objects.
+ function mergeObjs() {
+ var outObj = {};
+ for(var i in arguments) {
+ if(arguments[i] instanceof Object) {
+ for(var j in arguments[i]) {
+ // Does not check for collisions, newer object
+ // definitions clobber old definitions
+ outObj[j] = arguments[i][j];
+ }
+ }
+ }
+ return outObj;
+ }
+
+ // ## The *setLocale* function
+ // simply sets the locale to whatever is specified at the moment, as long as it
+ // is a string.
+ this.setLocale = function(newLocale) {
+ if(typeof(newLocale) == "string") {
+ locale = newLocale;
+ } else {
+ throw new Error("Locale must be a string");
+ }
+ };
+
+ // ## The *strings* object
+ // contains a series of key-val pairs to be used for translating very large strings
+ // that aren't desirable to have duplicated in several locations
+ this.strings = {};
+
+ // ## The *getTranslations* function
+ // is a recursive function that checks the specified directory, and all child
+ // directories, for ``translations.json`` files, combines them into one JSON
+ // object, and returns them.
+ function getTranslations(currDir, translations, strings) {
+ if(path.existsSync(currDir)) {
+ // Load translations.json file in current directory, if any
+ if(path.existsSync(path.join(currDir, "translations.json"))) {
+ translations = mergeObjs(translations,
+ JSON.parse(fs.readFileSync(path.join(path.resolve(currDir), "translations.json")))
+ );
+ }
+ // Load large text translations in translations subdirectory, if it exists
+ var translationPath = path.join(currDir, "translations");
+ if(path.existsSync(translationPath) && fs.statSync(translationPath).isDirectory()) {
+ // Get all children in the translations directory
+ var pathChildren = fs.readdirSync(translationPath);
+ // Filter out all non-default translations (the ones without a lang type)
+ pathChildren.filter(function(child) {
+ return !/^.*\..*\..*/.test(child);
+ // And map these default translations into an object containing the variable name to use,
+ // the default text, and an array of translations for this text
+ }).map(function(child) {
+ return {
+ name: child.replace(/\..*$/, ""),
+ defaultText: fs.readFileSync(path.join(translationPath, child), 'utf8'),
+ // To make the array of translations for this default translation, filter out
+ // all files that do not start with the primary translation filename (minus extension), with a special
+ // case to filter out the primary translation, as well
+ translations: pathChildren.filter(function(secondChild) {
+ return (new RegExp("^" + child.replace(/\..*$/, ""))).test(secondChild) && child != secondChild;
+ // Then map this array of files into an object containing the language specified
+ // and the translation text for this language
+ }).map(function(secondChild) {
+ return {
+ lang: secondChild.replace(/\.[^\.]*$/, "").replace(/^[^\.]*\./, ""),
+ text: fs.readFileSync(path.join(translationPath, secondChild), 'utf8')
+ }
+ })
+ }
+ // For each of these long-form translation objects, add the default text to the strings object using the
+ // desired variable name, and create a translation object for all defined languages for this text.
+ }).forEach(function(translation) {
+ strings[translation.name] = translation.defaultText;
+ translations[translation.defaultText] = {};
+ translation.translations.forEach(function(lang) {
+ translations[translation.defaultText][lang.lang] = lang.text;
+ });
+ });
+ }
+ // Recurse down each directory and get the translations for that directory
+ var pathChildren = fs.readdirSync(currDir);
+ for(var child in pathChildren) {
+ var childPath = path.resolve(path.join(currDir, pathChildren[child]));
+ if(fs.statSync(childPath).isDirectory()) {
+ var tempArray = getTranslations(childPath, translations, strings);
+ translations = tempArray[0], strings = tempArray[1];
+ }
+ }
+ } else {
+ throw new Error("Translation Path Invalid");
+ }
+ return [translations, strings];
+ }
+
+ // ## The *validateTranslations* function
+ // determines whether or not the provided JSON object is in a valid
+ // format for ``localize``.
+ function validateTranslations(newTranslations) {
+ if(typeof(newTranslations) != "object") { return false; }
+ for(var translation in newTranslations) {
+ if(typeof(translation) != "string") { return false; }
+ if(typeof(newTranslations[translation]) != "object" ) { return false; }
+ for(var lang in newTranslations[translation]) {
+ if(typeof(lang) != "string") { return false; }
+ if(typeof(newTranslations[translation][lang]) != "string") { return false; }
+ }
+ }
+ return true;
+ }
+
+ // ## The *loadTranslations* function
+ // takes a string or object, and attempts to append the specified translation
+ // to its store of translations, either by loading all translations from the
+ // specified directory (string), or appending the object directly.
+ this.loadTranslations = function(newTranslations) {
+ if(typeof(newTranslations) == "string") {
+ var tempArray = getTranslations(newTranslations, {}, this.strings);
+ newTranslations = tempArray[0];
+ this.strings = tempArray[1];
+ }
+ if(validateTranslations(newTranslations)) {
+ translations = mergeObjs(translations, newTranslations);
+ } else {
+ throw new Error("Must provide a valid set of translations.");
+ }
+ };
+
+ // Now that we have the infrastructure in place, let's verify that the
+ // provided translations are valid.
+ this.loadTranslations(translations);
+
+ // ## The *clearTranslations* function
+ // simply resets the translations variable to a clean slate.
+ this.clearTranslations = function() {
+ translations = {};
+ };
+
+ // ## The *getTranslations* function
+ // simply returns the entire translations object, or returns that portion
+ // of translations matched by the elements of a provided array of text to
+ // translate
+ this.getTranslations = function(textArr) {
+ if(textArr instanceof Array) {
+ var outObj = {};
+ textArr.forEach(function(text) {
+ outObj[text] = translations[text];
+ });
+ return outObj;
+ } else {
+ return translations;
+ }
+ };
+
+ // ## The *throwOnMissingTranslation* function
+ // lets the user decide if a missing translation should cause an Error
+ // to be thrown. Turning it off for development and on for testing is
+ // recommended. The function coerces whatever it receives into a bool.
+ this.throwOnMissingTranslation = function(shouldThrow) {
+ missingTranslationThrow = !!shouldThrow;
+ };
+
+ // ## The *buildString* function
+ // is a string-building function inspired by both ``sprintf`` and
+ // [jQuery Templates](http://api.jquery.com/category/plugins/templates/)
+ // and a small helping of RegExp. The first argument to buildString is
+ // the source string, which has special ``$[x]`` blocks, where ``x`` is
+ // a number from 1 to Infinity, matching the nth argument provided.
+ // Because of ``.toString()``, string formatting _a la_ ``sprintf`` is
+ // avoided, and the numeric identification allows the same parameter to
+ // be used multiple times, and the parameter order need not match the
+ // string referencing order (important for translations)
+ function buildString() {
+ var outString = arguments[0];
+ for(var i = 1; i < arguments.length; i++) {
+ outString = outString.replace(new RegExp("\\$\\[" + i + "\\]", "g"), arguments[i]);
+ }
+ return outString;
+ }
+
+ // ## The *translate* function
+ // is a thin automatic substitution wrapper around ``buildString``. In
+ // fact, it short-circuits to ``buildString`` when ``locale`` equals
+ // ``defaultLocale``. Otherwise, it looks up the required translated
+ // string and executes ``buildString`` on that, instead
+ this.translate = function() {
+ if(locale == defaultLocale) {
+ return buildString.apply(this, arguments);
+ }
+ var newText = translations[arguments[0]] && translations[arguments[0]][locale] ?
+ translations[arguments[0]][locale] : null;
+ if(missingTranslationThrow && typeof(newText) != "string") {
+ throw new Error("Could not find translation for '" +
+ arguments[0] + "' in the " + locale + " locale");
+ } else if(typeof(newText) != "string") {
+ newText = arguments[0];
+ }
+ var newArr = Array.prototype.splice.call(arguments, 1, arguments.length - 1);
+ newArr.unshift(newText);
+ return buildString.apply(this, newArr);
+ };
+
+ // ## The *validateDateFormats* function
+ // determines whether or not the provided dateFormat object conforms to
+ // the necessary structure
+ function validateDateFormats(dateFormats) {
+ if(typeof(dateFormats) != "object") { return false; }
+ for(var lang in dateFormats) {
+ if(typeof(lang) != "string") { return false; }
+ if(typeof(dateFormats[lang]) != "object") { return false; }
+ if(!(dateFormats[lang].dayNames instanceof Array)) { return false; }
+ if(!(dateFormats[lang].monthNames instanceof Array)) { return false; }
+ if(typeof(dateFormats[lang].masks) != "object") { return false; }
+ if(typeof(dateFormats[lang].masks["default"]) != "string") { return false; }
+ if(dateFormats[lang].dayNames.length != 14) { return false; }
+ if(dateFormats[lang].monthNames.length != 24) { return false; }
+ for(var i = 0; i < 24; i++) {
+ if(i < 14 && typeof(dateFormats[lang].dayNames[i]) != "string") { return false; }
+ if(typeof(dateFormats[lang].monthNames[i]) != "string") { return false; }
+ }
+ }
+ return true;
+ }
+
+ // ## The *loadDateFormats* function
+ // appends the provided ``dateFormats`` object, if valid, to the current
+ // ``dateFormats`` object. Otherwise, it throws an error.
+ this.loadDateFormats = function(newDateFormats) {
+ if(validateDateFormats(newDateFormats)) {
+ dateFormats = mergeObjs(dateFormats, newDateFormats);
+ } else {
+ throw new Error("Invalid Date Format provided");
+ }
+ };
+
+ // ## The *clearDateFormats* function
+ // resets the ``dateFormats`` object to English dates.
+ this.clearDateFormats = function() {
+ dateFormats = {
+ "en": {
+ dayNames: [
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
+ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
+ ],
+ monthNames: [
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ ],
+ masks: {
+ "default": "ddd mmm dd yyyy HH:MM:ss",
+ shortDate: "m/d/yy",
+ mediumDate: "mmm d, yyyy",
+ longDate: "mmmm d, yyyy",
+ fullDate: "dddd, mmmm d, yyyy",
+ shortTime: "h:MM TT",
+ mediumTime: "h:MM:ss TT",
+ longTime: "h:MM:ss TT Z",
+ isoDate: "yyyy-mm-dd",
+ isoTime: "HH:MM:ss",
+ isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
+ isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
+ }
+ }
+ };
+ };
+
+ // ## The *getDateFormats* function
+ // returns the currently-defined ``dateFormats`` object
+ this.getDateFormats = function() {
+ return dateFormats;
+ };
+
+ // Now that we have the infrastructure in place, let's validate the
+ // optional ``dateFormats`` object if provided, or initialize it.
+ if(validateDateFormats(dateFormats)) {
+ this.loadDateFormats(dateFormats);
+ } else {
+ this.clearDateFormats();
+ }
+
+ // The *localDate* function
+ // provides easy-to-use date localization support. Based heavily on
+ // [node-dateFormat](https://github.com/felixge/node-dateformat) by
+ // Steven Levithan <stevenlevithan.com>
+ // Scott Trenda <scott.trenda.net>
+ // Kris Kowal <cixar.com/~kris.kowal/>
+ // Felix Geisendörfer <debuggable.com>
+ // MIT Licensed, as with this library. The resultant API is one where
+ // a date string or object is the first argument, a mask string (being
+ // either a key in the ``masks`` object or an arbitrary mask is the
+ // second argument, and a third is a bool flag on whether local or UTC
+ // time should be used.
+ this.localDate = function() {
+ var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,
+ timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
+ timezoneClip = /[^-+\dA-Z]/g,
+ pad = function (val, len) {
+ val = String(val);
+ len = len || 2;
+ while (val.length < len) val = "0" + val;
+ return val;
+ };
+
+ // Regexes and supporting functions are cached through closure
+ return function (date, mask, utc) {
+ // You can't provide utc if you skip other args (use the "UTC:" mask prefix)
+ if (arguments.length == 1 &&
+ Object.prototype.toString.call(date) == "[object String]" &&
+ !/\d/.test(date)) {
+ mask = date;
+ date = undefined;
+ }
+
+ date = date || new Date;
+
+ if(!(date instanceof Date)) {
+ date = new Date(date);
+ }
+
+ if(isNaN(date)) {
+ throw TypeError("Invalid date");
+ }
+
+ mask = String(dateFormats[locale].masks[mask] || mask || dateFormats[locale].masks["default"]);
+
+ // Allow setting the utc argument via the mask
+ if (mask.slice(0, 4) == "UTC:") {
+ mask = mask.slice(4);
+ utc = true;
+ }
+
+ var _ = utc ? "getUTC" : "get",
+ d = date[_ + "Date"](),
+ D = date[_ + "Day"](),
+ m = date[_ + "Month"](),
+ y = date[_ + "FullYear"](),
+ H = date[_ + "Hours"](),
+ M = date[_ + "Minutes"](),
+ s = date[_ + "Seconds"](),
+ L = date[_ + "Milliseconds"](),
+ o = utc ? 0 : date.getTimezoneOffset(),
+ flags = {
+ d: d,
+ dd: pad(d),
+ ddd: dateFormats[locale].dayNames[D],
+ dddd: dateFormats[locale].dayNames[D + 7],
+ m: m + 1,
+ mm: pad(m + 1),
+ mmm: dateFormats[locale].monthNames[m],
+ mmmm: dateFormats[locale].monthNames[m + 12],
+ yy: String(y).slice(2),
+ yyyy: y,
+ h: H % 12 || 12,
+ hh: pad(H % 12 || 12),
+ H: H,
+ HH: pad(H),
+ M: M,
+ MM: pad(M),
+ s: s,
+ ss: pad(s),
+ l: pad(L, 3),
+ L: pad(L > 99 ? Math.round(L / 10) : L),
+ t: H < 12 ? "a" : "p",
+ tt: H < 12 ? "am" : "pm",
+ T: H < 12 ? "A" : "P",
+ TT: H < 12 ? "AM" : "PM",
+ Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
+ o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
+ S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
+ };
+
+ return mask.replace(token, function ($0) {
+ return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
+ });
+ };
+ }();
+
+ return this;
+}
+
+// Publish as a module, if in a CommonJS environment
+if(typeof(module) != 'undefined') {
+ module.exports = Localize;
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/package.json b/blackberry10/node_modules/localize/package.json
new file mode 100644
index 0000000..d709584
--- /dev/null
+++ b/blackberry10/node_modules/localize/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "localize",
+ "description": "A GNU gettext-inspired (but not conformant) localization library for Node.js",
+ "homepage": "https://github.com/AGROSICA/node-localize",
+ "author": {
+ "name": "David Ellis"
+ },
+ "contributors": [
+ {
+ "name": "Steven Levithan"
+ },
+ {
+ "name": "Felix Geisendörfer"
+ },
+ {
+ "name": "Clint Andrew Hall"
+ },
+ {
+ "name": "Jerry Jalava"
+ }
+ ],
+ "version": "0.4.2",
+ "main": "./lib/localize",
+ "dependencies": {},
+ "devDependencies": {
+ "expresso": ">=0.8.1"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "bin": {
+ "xlocalize": "./bin/xlocalize.js"
+ },
+ "readme": "# The *node-localize* library\nprovides a [GNU gettext](http://www.gnu.org/s/gettext/)-inspired (but not conformant) translation utility for [Node.js](http://nodejs.org) that tries to avoid some of the limitations of the ``sprintf``-bound ``gettext`` (such as translation string parameters being in a fixed order in all translation results) and \"fit in\" better than a straight port.\n\n## Installation\n\nIf you have [npm](http://npmjs.org), just type:\n\n```sh\nnpm install localize\n```\n\n## Usage\n\n``node-localize`` returns an object constructor so multiple simultaneous localization objects may be in use at once (though most cases will probably be a singleton instantiation). The only required parameter on initialization is a ``translations`` object, using the following structure:\n\n```js\nvar Localize = require('localize');\n\nvar myLocalize = new Localize({\n \"Testing...\": {\n \"es\": \"Pruebas...\",\n \"sr\": \"тестирање...\"\n },\n
\"Substitution: $[1]\": {\n \"es\": \"Sustitución: $[1]\",\n \"sr\": \"замена: $[1]\"\n }\n});\n\nconsole.log(myLocalize.translate(\"Testing...\")); // Testing...\nconsole.log(myLocalize.translate(\"Substitution: $[1]\", 5)); // Substitution: 5\n\nmyLocalize.setLocale(\"es\");\nconsole.log(myLocalize.translate(\"Testing...\")); // Pruebas...\n\nmyLocalize.setLocale(\"sr\");\nconsole.log(myLocalize.translate(\"Substitution: $[1]\", 5)); // замена: 5\n```\n\n``node-localize`` objects can also be passed a string indicating the directory a ``translations.json`` file can be found. This directory is searched recursively for all ``translations.json`` files in all subdirectories, and their contents combined together, so you can organize your translations as you wish.\n\nThe directory is also searched recursively for directories named ``translations``. These directories are checked for special text files of the form ``varname.txt``, ``varname.es.txt``, ``varna
me.sr.txt``, etc. The text in ``varname.txt`` is treated as the default language of the application and the ``varname.xx.txt`` are treated as translations of the text. A special ``strings`` object is created where the ``varname`` becomes a property of that object and the default language text is the value of the property. So you can also do the following:\n\n```js\nvar Localize = require('localize');\n\nvar myLocalize = new Localize('./path/to/text/files/');\n\nconsole.log(myLocalize.translate(myLocalize.strings.reallyLongText); // The contents of ./path/to/text/files/translations/reallyLongText.txt, if it exists\n\nmyLocalize.setLocale(\"es\");\nconsole.log(myLocalize.translate(myLocalize.strings.reallyLongText); // The contents of ./path/to/text/files/translations/reallyLongText.es.txt, if it exists\n```\n\n## Dates\n\nBecause date formats differ so wildly in different languages and these differences cannot be solved via simple substitution, there is also a ``localDate`` method fo
r translating these values.\n\n```js\nvar theDate = new Date(\"4-Jul-1776\");\nvar dateLocalize = new Localize(\"./translations\");\ndateLocalize.loadDateFormats({\n\t\"es\": {\n\t\tdayNames: [\n\t\t\t'Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb',\n\t\t\t'Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'\n\t\t],\n\t\tmonthNames: [\n\t\t\t'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic',\n\t\t\t'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'\n\t\t],\n\t\tmasks: {\n\t\t\t\"default\": \"dddd, d 'de' mmmm yyyy\"\n\t\t}\n\t}\n});\n\nconsole.log(dateLocalize.localDate(theDate)); // Thu Jul 04 1776 00:00:00\nconsole.log(dateLocalize.localDate(theDate, \"fullDate\")); // Thursday, July 4, 1776\nconsole.log(dateLocalize.localDate(theDate, \"mm/dd/yyyy\")); // 07/04/1776\n\ndateLocalize.setLocale(\"es\");\nconsole.log(dateLocalize.localDate(theDate)); // Ju
eves, 4 de Julio 1776\n```\n\nThe date formatting rules and configuration have been taken from [node-dateformat](https://github.com/felixge/node-dateformat), which has been extended to support multiple simultaneous locales and subsumed into ``node-localize``.\n\n## Complete API\n\n```js\nvar myLocalize = new Localize(translationsObjOrStr, dateFormatObj, defaultLocaleStr);\n// translationsObjOrStr: a conformant translations object or a string indicating\n// the directory where one or more conformant translations.json files are stored\n// dateFormatObj: a conformant date format object, containing one or more locales\n// if not specified, will auto-generate an 'en' locale; if initially specified,\n// will *overwrite* this auto-generated locale object\n// defaultLocale: the locale of all keys in the translations object. Defaults to 'en'\n```\n\n```js\nmyLocalize.setLocale(localeStr);\n// localeStr: a locale string to switch to\n```\n\n```js\nmyLocalize.loadTranslations(trans
lationsObjOrStr);\n// translationsObjOrStr: a conformant translations object or a string indicating\n// the directory where one or more conformant translations.json files are stored\n// Multiple calls to loadTranslations *appends* the keys to the translations\n// object in memory (overwriting duplicate keys).\n```\n\n```js\nmyLocalize.clearTranslations();\n// Wipes out the translations object entirely (if a clean reload is desired)\n```\n\n```js\nmyLocalize.throwOnMissingTranslation(throwBool);\n// throwBool: Boolean indicating whether or not missing translations should\n// throw an error or be silently ignored and the text stay in the default\n// locale. Useful for development to turn off.\n```\n\n```js\nmyLocalize.translate(translateStr, arg1, arg2, ...);\n// translateStr: The string to be translated and optionally perform a\n// substitution of specified args into. Arguments are specified in a RegExp\n// style by number starting with 1 (it is the first
argument that can be\n// used and also is the arguments[1] value...), while using a jQuery-style\n// demarcation of $[x], where x is the argument number.\n```\n\n```js\nmyLocalize.loadDateFormats(dateFormatObj);\n// dateFormatObj: a conformant date format object, containing one or more locales\n// Specified locales are appended to the internal object just like\n// loadTranslations.\n```\n\n```js\nmyLocalize.clearDateFormats();\n// Resets the date formats object to just the 'en' locale.\n```\n\n```js\nmyLocalize.localDate(dateObjOrStr, maskStr, utcBool)\n// dateObjOrStr: the date object or string to format as desired in the current\n// locale.\n// maskStr: the predefined mask to use, or a custom mask.\n// utcBool: a boolean indicating whether the timezone should be local or UTC\n```\n\n```js\nmyLocalize.strings\n// Object of key-value pairs defined by files in ``translations`` directories\n// Key is the filename (sans extension) and value is the default language\n
// text. Useful for translating very large blocks of text that shouldn't really\n// exist in code.\n```\n\n## _xlocalize_ CLI Utility\n\nStarting at version 0.2.0, ``node-localize``, when installed via NPM, adds an ``xlocalize`` utility command to the _PATH_, which allows for automatic construction of ``translations.json`` files (and can be re-run in the future to update existing files without clobbering any current translations present). It's command switches are as follows:\n\n```\nxlocalize USAGE:\n\n-l\tSet the default language for the translations.json file(s) (default: en)\n-r\tSet xlocalize to generate translations.json files recursively (default)\n-R\tSet xlocalize to only generate a translations.json file for the current directory\n-e\tSet the file extensions to include for translation (default: html,js)\n-t\tSet the languages to translate to (comma separated)\n-h\tShow this help message.\n```\n\nFor example, to create a ``translations.json`` file in the current directory o
nly that will translate from English to Spanish, Portuguese, Italian, and French for HTML and JS files:\n\n```sh\nxlocalize -R -t es,pt,it,fr\n```\n\nAnd if a new language, such as Serbian, is to be translated at a later time, you can use the command:\n```sh\nxlocalize -R -t es,pt,it,fr,sr\n```\n\n## [Express](http://expressjs.com) Integration Tips\n\nIf your website supports multiple languages (probably why you're using this library!), you'll want to translate the page content for each supported language. The following snippets of code should make it easy to use within Express.\n\n### Middleware to switch locale on request\n\n```js\napp.configure(function() {\n ...\n app.use(function(request, response, next) {\n var lang = request.session.lang || \"en\";\n localize.setLocale(lang);\n next();\n });\n ...\n});\n```\n\nI'm assuming you're storing their language preference inside of a session, but the logic can be easily tweaked for however you detect w
hich language to show.\n\n### Export *translate*, *localDate*, and *strings* as static helpers\n\n```js\napp.helpers({\n ...\n translate: localize.translate,\n localDate: localize.localDate,\n strings: localize.strings\n});\n```\n\nYour controllers shouldn't really even be aware of any localization issues; the views should be doing that, so this ought to be enough configuration within your ``app.js`` file.\n\n### Using *translate*, *localDate*, and *strings* in your views\n\n```html\n<h1>${translate(\"My Awesome Webpage\")}</h1>\n\n<h2>${translate(\"By: $[1]\", webpageAuthor)}</h2>\n\n<h3>${translate(\"Published: $[1]\", localDate(publicationDate))}</h3>\n\n{{if translate(strings.reallyLongPost) == strings.reallyLongPost}}\n<strong>${translate(\"Warning: The following content is in English.\")}</strong>\n{{/if}}\n\n{{html translate(strings.reallyLongPost)}}\n```\n\nI'm using [jQuery Templates for Express](https://github.com/kof/node-jqtpl) here, but it should be easy to
translate to whatever templating language you prefer.\n\n## Planned Features\n\n* Browser compatibility (use same functions for client-side jQuery Templates, for instance)\n* Optional Country Code support (that falls back to baseline language translation if a specific country code is missing) for regional language differences\n* Numeric localization (1,234,567.89 versus 1.234.567,89 versus 1 234 567,89 versus [Japanese Numerals](http://en.wikipedia.org/wiki/Japanese_numerals) [no idea how to handle that one at the moment])\n* Currency localization; not just representing $100.00 versus 100,00$, but perhaps hooking into currency conversion, as well.\n* Pluralization; one area gettext still beats node-localize is the ability to pluralize words correctly when given the number to pluralize against.\n\n## License (MIT)\n\nCopyright (C) 2011 by Agrosica, Inc, David Ellis, Felix Geisendörfer, Steven Levithan, Scott Trenda, Kris Kowal, Jerry Jalava, Clint Andrew Hall.\n\nPermission is hereb
y granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN\nTHE SOFTWARE.\n",
+ "readmeFilename": "README.md",
+ "_id": "localize@0.4.2",
+ "_from": "localize@*0.4.2"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/localize.test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/localize.test.js b/blackberry10/node_modules/localize/test/localize.test.js
new file mode 100644
index 0000000..49dd92b
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/localize.test.js
@@ -0,0 +1,179 @@
+var assert = require('assert');
+var Localize = require('../lib/localize');
+
+module.exports = {
+ 'test empty initialization error': function() {
+ assert.throws(function() {
+ var badLocalize = new Localize();
+ }, function(err) {
+ if(err instanceof Error &&
+ err.message == "Must provide a valid set of translations.") {
+ return true;
+ }
+ return false;
+ });
+ },
+ 'test bad translations var error': function() {
+ assert.throws(function() {
+ var badLocalize = new Localize([1,2,3]);
+ }, function(err) {
+ if(err instanceof Error &&
+ err.message == "Must provide a valid set of translations.") {
+ return true;
+ }
+ return false;
+ });
+ },
+ 'test bad translations path error': function() {
+ assert.throws(function() {
+ var badLocalize = new Localize("/nowheresville");
+ }, function(err) {
+ if(err instanceof Error &&
+ err.message == "Translation Path Invalid") {
+ return true;
+ }
+ return false;
+ });
+ },
+ 'test good translations var': function() {
+ assert.doesNotThrow(function() {
+ var goodLocalize = new Localize({
+ "Testing...": {
+ "es": "Pruebas..."
+ }
+ });
+ });
+ },
+ 'test good translations path': function() {
+ assert.doesNotThrow(function() {
+ var goodLocalize = new Localize("./translations");
+ });
+ },
+ 'test bad setLocale var': function() {
+ assert.throws(function() {
+ var goodLocalize = new Localize("./translations");
+ goodLocalize.setLocale(23);
+ }, function(err) {
+ if(err instanceof Error &&
+ err.message == "Locale must be a string") {
+ return true;
+ }
+ return false;
+ });
+ },
+ 'test good setLocale var': function() {
+ assert.doesNotThrow(function() {
+ var goodLocalize = new Localize("./translations");
+ goodLocalize.setLocale("es");
+ });
+ },
+ 'test bad translate string': function() {
+ assert.throws(function() {
+ var goodLocalize = new Localize("./translations");
+ goodLocalize.setLocale("es");
+ goodLocalize.translate("Test2");
+ }, function(err) {
+ if(err instanceof Error &&
+ err.message == "Could not find translation for 'Test2' in the es locale") {
+ return true;
+ }
+ return false;
+ });
+ },
+ 'test good translate string': function() {
+ assert.doesNotThrow(function() {
+ var goodLocalize = new Localize("./translations");
+ goodLocalize.setLocale("es");
+ assert.strictEqual(goodLocalize.translate("Testing..."), "Pruebas...");
+ });
+ },
+ 'test good translate nop': function() {
+ var goodLocalize = new Localize("./translations");
+ assert.strictEqual(goodLocalize.translate("Testing..."), "Testing...");
+ },
+ 'test good translate substitution': function() {
+ var goodLocalize = new Localize("./translations");
+ assert.strictEqual(goodLocalize.translate("Substitution: $[1]", 5), "Substitution: 5");
+ goodLocalize.setLocale("es");
+ assert.strictEqual(goodLocalize.translate("Substitution: $[1]", 5), "Sustitución: 5");
+ },
+ 'test good translate multiple substitution': function() {
+ var goodLocalize = new Localize("./translations");
+ assert.strictEqual(goodLocalize.translate("Multiple substitution: $[1], $[2]", 5, 25), "Multiple substitution: 5, 25");
+ goodLocalize.setLocale("es");
+ assert.strictEqual(goodLocalize.translate("Multiple substitution: $[1], $[2]", 5, 25), "Sustitución múltiple: 5, 25");
+ },
+ 'test bad dateFormat var initialization': function() {
+ assert.doesNotThrow(function() {
+ var goodLocalize = new Localize("./translations", 25);
+ });
+ },
+ 'test bad dateFormat var post-initialization': function() {
+ assert.throws(function() {
+ var badLocalize = new Localize("./translations", 25);
+ badLocalize.loadDateFormats(25);
+ }, function(err) {
+ if(err instanceof Error &&
+ err.message == "Invalid Date Format provided") {
+ return true;
+ }
+ return false;
+ });
+ },
+ 'test good dateFormat var post-initialization': function() {
+ assert.doesNotThrow(function() {
+ var goodLocalize = new Localize("./translations");
+ goodLocalize.loadDateFormats({
+ "es": {
+ dayNames: [
+ 'Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb',
+ 'Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'
+ ],
+ monthNames: [
+ 'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic',
+ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'
+ ],
+ masks: {
+ "default": "dddd, d 'de' mmmm yyyy"
+ }
+ }
+ });
+ });
+ },
+ 'test good localDate': function() {
+ var theDate = new Date("4-Jul-1776");
+ var goodLocalize = new Localize("./translations");
+ goodLocalize.loadDateFormats({
+ "es": {
+ dayNames: [
+ 'Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb',
+ 'Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'
+ ],
+ monthNames: [
+ 'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic',
+ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'
+ ],
+ masks: {
+ "default": "dddd, d 'de' mmmm yyyy"
+ }
+ }
+ });
+ assert.strictEqual(goodLocalize.localDate(theDate), "Thu Jul 04 1776 00:00:00");
+ assert.strictEqual(goodLocalize.localDate(theDate, "fullDate"), "Thursday, July 4, 1776");
+ assert.strictEqual(goodLocalize.localDate(theDate, "mm/dd/yyyy"), "07/04/1776");
+ goodLocalize.setLocale("es");
+ assert.strictEqual(goodLocalize.localDate(theDate), "Jueves, 4 de Julio 1776");
+ },
+ 'test good missing translation ignore': function() {
+ var goodLocalize = new Localize("./translations");
+ goodLocalize.throwOnMissingTranslation(false);
+ goodLocalize.setLocale("es");
+ assert.strictEqual(goodLocalize.translate("Not found"), "Not found");
+ },
+ 'test translations dir': function() {
+ var goodLocalize = new Localize('./translations');
+ assert.strictEqual(goodLocalize.translate(goodLocalize.strings.helloWorld), "Hello, World!\n");
+ goodLocalize.setLocale("es");
+ assert.strictEqual(goodLocalize.translate(goodLocalize.strings.helloWorld), "¡Hola, mundo!\n");
+ }
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/translations/subsitution/translations.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/translations/subsitution/translations.json b/blackberry10/node_modules/localize/test/translations/subsitution/translations.json
new file mode 100644
index 0000000..1a68bb3
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/translations/subsitution/translations.json
@@ -0,0 +1,8 @@
+{
+ "Substitution: $[1]": {
+ "es": "Sustitución: $[1]"
+ },
+ "Multiple substitution: $[1], $[2]": {
+ "es": "Sustitución múltiple: $[1], $[2]"
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/translations/translations.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/translations/translations.json b/blackberry10/node_modules/localize/test/translations/translations.json
new file mode 100644
index 0000000..e83ace0
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/translations/translations.json
@@ -0,0 +1,5 @@
+{
+ "Testing...": {
+ "es": "Pruebas..."
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/translations/translations/helloWorld.es.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/translations/translations/helloWorld.es.txt b/blackberry10/node_modules/localize/test/translations/translations/helloWorld.es.txt
new file mode 100644
index 0000000..59b3e13
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/translations/translations/helloWorld.es.txt
@@ -0,0 +1 @@
+¡Hola, mundo!
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/translations/translations/helloWorld.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/translations/translations/helloWorld.txt b/blackberry10/node_modules/localize/test/translations/translations/helloWorld.txt
new file mode 100644
index 0000000..8ab686e
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/translations/translations/helloWorld.txt
@@ -0,0 +1 @@
+Hello, World!
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/xlocalize.test.sh
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/xlocalize.test.sh b/blackberry10/node_modules/localize/test/xlocalize.test.sh
new file mode 100755
index 0000000..700cb5b
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/xlocalize.test.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+testdir=`pwd`
+cd xlocalize
+../../bin/xlocalize.js -t es,pt,it,fr
+test1=`diff translations.json ../xlocalize.testfile1.json`
+if [ "$test1" = "" ]
+then
+ cd subdir
+ test2=`diff translations.json ../../xlocalize.testfile2.json`
+ if [ "$test2" = "" ]
+ then
+ cd ..
+ ../../bin/xlocalize.js -t es,pt,it,fr,sr
+ test3=`diff translations.json ../xlocalize.testfile3.json`
+ if [ "$test3" = "" ]
+ then
+ cd subdir
+ test4=`diff translations.json ../../xlocalize.testfile4.json`
+ if [ "$test4" = "" ]
+ then
+ echo "Success"
+ else
+ echo "testfile4 Failed";
+ fi
+ else
+ echo "testfile3 Failed";
+ fi
+ else
+ echo "testfile2 Failed";
+ fi
+else
+ echo "testfile1 Failed";
+fi
+cd $testdir
+rm xlocalize/translations.json
+rm xlocalize/subdir/translations.json
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/xlocalize.testfile1.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/xlocalize.testfile1.json b/blackberry10/node_modules/localize/test/xlocalize.testfile1.json
new file mode 100644
index 0000000..3ff0677
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/xlocalize.testfile1.json
@@ -0,0 +1,8 @@
+{
+ "This page is in English.": {
+ "es": "MISSING TRANSLATION",
+ "pt": "MISSING TRANSLATION",
+ "it": "MISSING TRANSLATION",
+ "fr": "MISSING TRANSLATION"
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/xlocalize.testfile2.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/xlocalize.testfile2.json b/blackberry10/node_modules/localize/test/xlocalize.testfile2.json
new file mode 100644
index 0000000..8e9ccdf
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/xlocalize.testfile2.json
@@ -0,0 +1,8 @@
+{
+ "You called foo!": {
+ "es": "MISSING TRANSLATION",
+ "pt": "MISSING TRANSLATION",
+ "it": "MISSING TRANSLATION",
+ "fr": "MISSING TRANSLATION"
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/xlocalize.testfile3.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/xlocalize.testfile3.json b/blackberry10/node_modules/localize/test/xlocalize.testfile3.json
new file mode 100644
index 0000000..18d86f7
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/xlocalize.testfile3.json
@@ -0,0 +1,9 @@
+{
+ "This page is in English.": {
+ "es": "MISSING TRANSLATION",
+ "pt": "MISSING TRANSLATION",
+ "it": "MISSING TRANSLATION",
+ "fr": "MISSING TRANSLATION",
+ "sr": "MISSING TRANSLATION"
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/xlocalize.testfile4.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/xlocalize.testfile4.json b/blackberry10/node_modules/localize/test/xlocalize.testfile4.json
new file mode 100644
index 0000000..7ee91e9
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/xlocalize.testfile4.json
@@ -0,0 +1,9 @@
+{
+ "You called foo!": {
+ "es": "MISSING TRANSLATION",
+ "pt": "MISSING TRANSLATION",
+ "it": "MISSING TRANSLATION",
+ "fr": "MISSING TRANSLATION",
+ "sr": "MISSING TRANSLATION"
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/xlocalize/subdir/test2.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/xlocalize/subdir/test2.js b/blackberry10/node_modules/localize/test/xlocalize/subdir/test2.js
new file mode 100644
index 0000000..f05ca6a
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/xlocalize/subdir/test2.js
@@ -0,0 +1,3 @@
+function foo() {
+ alert(translate("You called foo!"));
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/localize/test/xlocalize/test.html
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/localize/test/xlocalize/test.html b/blackberry10/node_modules/localize/test/xlocalize/test.html
new file mode 100644
index 0000000..ce37ee7
--- /dev/null
+++ b/blackberry10/node_modules/localize/test/xlocalize/test.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML>
+
+<html>
+ <head>
+ <title>Test Doc!</title>
+ </head>
+ <body>
+ {{if session.lang != "en"}}
+ <h1>${translate("This page is in English.")}</h1>
+ {{/if}}
+ Foo. Foobar. Tada.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/.hgignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/.hgignore b/blackberry10/node_modules/net-ping/.hgignore
new file mode 100644
index 0000000..13cfce5
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/.hgignore
@@ -0,0 +1,2 @@
+syntax: glob
+node_modules
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/.hgtags
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/.hgtags b/blackberry10/node_modules/net-ping/.hgtags
new file mode 100644
index 0000000..7730a61
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/.hgtags
@@ -0,0 +1,18 @@
+9c3a64710c2fe43626ff9a63f3f5869dd1bfeb6e 1.0.0
+b1424b13eeb49c48692849c5b8616b0ba78529f7 1.0.1
+b1424b13eeb49c48692849c5b8616b0ba78529f7 1.0.1
+b0bbf8d3877664bd4ebc6b06bde6f81b8e36bfff 1.0.1
+af474759ad43eaeb6fae62be95b6194de8675ff2 1.0.2
+3af98475085396f6de474bc797f25784046a7ff4 1.1.0
+56c5153f97484cca265c26cc000e07f54a8bb01d 1.1.1
+3755c403b4ac77543ca303659017713c18e459bd 1.1.2
+b95860ddebe2366967b024d1c1818e06005eda49 1.1.3
+5f06497425fa2f31e36b22951dba5e6d08365fa9 1.1.5
+65d8b86b0b2667948a09fee2aa9997d93112575a 1.1.6
+a1b6fbaeda9d93da9a4db17be687667907b7ca86 1.1.7
+a1b6fbaeda9d93da9a4db17be687667907b7ca86 1.1.7
+80b8cf0dd0314e0828cdb3ad9a0955282306a914 1.1.7
+80b8cf0dd0314e0828cdb3ad9a0955282306a914 1.1.7
+7add610f4d27355af05f24af24505c7f86d484a6 1.1.7
+7a1911146a69d7028a27ebd8d30e1257336ba15c 1.1.8
+1b5f2a51510ca8304a95c9b352cd26cba0d8b0a7 1.1.9
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/README.md b/blackberry10/node_modules/net-ping/README.md
new file mode 100644
index 0000000..7f2d197
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/README.md
@@ -0,0 +1,473 @@
+
+# net-ping - [homepage][homepage]
+
+This module implements ICMP Echo (ping) support for [Node.js][nodejs].
+
+This module is installed using [node package manager (npm)][npm]:
+
+ npm install net-ping
+
+It is loaded using the `require()` function:
+
+ var ping = require ("net-ping");
+
+A ping session can then be created to ping or trace route to many hosts:
+
+ var session = ping.createSession ();
+
+ session.pingHost (target, function (error, target) {
+ if (error)
+ console.log (target + ": " + error.toString ());
+ else
+ console.log (target + ": Alive");
+ });
+
+[homepage]: http://re-tool.org "Homepage"
+[nodejs]: http://nodejs.org "Node.js"
+[npm]: https://npmjs.org/ "npm"
+
+# Network Protocol Support
+
+This module supports IPv4 using the ICMP, and IPv6 using the ICMPv6.
+
+# Error Handling
+
+Each request exposed by this module requires one or more mandatory callback
+functions. Callback functions are typically provided an `error` argument.
+
+All errors are sub-classes of the `Error` class. For timed out errors the
+error passed to the callback function will be an instance of the
+`ping.RequestTimedOutError` class, with the exposed `message` attribute set
+to `Request timed out`.
+
+This makes it easy to determine if a host responded, a time out occurred, or
+whether an error response was received:
+
+ session.pingHost ("1.2.3.4", function (error, target) {
+ if (error)
+ if (error instanceof ping.RequestTimedOutError)
+ console.log (target + ": Not alive");
+ else
+ console.log (target + ": " + error.toString ());
+ else
+ console.log (target + ": Alive");
+ });
+
+In addition to the the `ping.RequestTimedOutError` class, the following errors
+are also exported by this module to wrap ICMP error responses:
+
+ * `DestinationUnreachableError`
+ * `PacketTooBigError`
+ * `ParameterProblemError`
+ * `RedirectReceivedError`
+ * `SourceQuenchError`
+ * `TimeExceededError`
+
+These errors are typically reported by hosts other than the intended target.
+In all cases each class exposes a `source` attribute which will specify the
+host who reported the error (which could be the intended target). This will
+also be included in the errors `message` attribute, i.e.:
+
+ $ sudo node example/ping-ttl.js 1 192.168.2.10 192.168.2.20 192.168.2.30
+ 192.168.2.10: Alive
+ 192.168.2.20: TimeExceededError: Time exceeded (source=192.168.1.1)
+ 192.168.2.30: Not alive
+
+The `Session` class will emit an `error` event for any other error not
+directly associated with a request. This is typically an instance of the
+`Error` class with the errors `message` attribute specifying the reason.
+
+# Packet Size
+
+By default ICMP echo request packets sent by this module are 16 bytes in size.
+Some implementations cannot cope with such small ICMP echo requests. For
+example, some implementations will return an ICMP echo reply, but will include
+an incorrect ICMP checksum.
+
+This module exposes a `packetSize` option to the `createSession()` method which
+specifies how big ICMP echo request packets should be:
+
+ var session = ping.createSession ({packetSize: 64});
+
+# Round Trip Times
+
+Some callbacks used by methods exposed by this module provide two instances of
+the JavaScript `Date` class specifying when the first ping was sent for a
+request, and when a request completed.
+
+These parameters are typically named `sent` and `rcvd`, and are provided to
+help round trip time calculation.
+
+A request can complete in one of two ways. In the first, a ping response is
+received and `rcvd - sent` will yield the round trip time for the request in
+milliseconds.
+
+In the second, no ping response is received resulting in a request time out.
+In this case `rcvd - sent` will yield the total time spent waiting for each
+retry to timeout if any. For example, if the `retries` option to the
+`createSession()` method was specified as `2` and `timeout` as `2000` then
+`rcvd - sent` will yield more than `6000` milliseconds.
+
+Although this module provides instances of the `Date` class to help round trip
+time calculation the dates and times represented in each instance should not be
+considered 100% accurate.
+
+Environmental conditions can affect when a date and time is actually
+calculated, e.g. garbage collection introducing a delay or the receipt of many
+packets at once. There are also a number of functions through which received
+packets must pass, which can also introduce a slight variable delay.
+
+Throughout development experience has shown that, in general the smaller the
+round trip time the less accurate it will be - but the information is still
+useful nonetheless.
+
+# Constants
+
+The following sections describe constants exported and used by this module.
+
+## ping.NetworkProtocol
+
+This object contains constants which can be used for the `networkProtocol`
+option to the `createSession()` function exposed by this module. This option
+specifies the IP protocol version to use when creating the raw socket.
+
+The following constants are defined in this object:
+
+ * `IPv4` - IPv4 protocol
+ * `IPv6` - IPv6 protocol
+
+# Using This Module
+
+The `Session` class is used to issue ping and trace route requests to many
+hosts. This module exports the `createSession()` function which is used to
+create instances of the `Session` class.
+
+## ping.createSession ([options])
+
+The `createSession()` function instantiates and returns an instance of the
+`Session` class:
+
+ // Default options
+ var options = {
+ networkProtocol: ping.NetworkProtocol.IPv4,
+ packetSize: 16,
+ retries: 1,
+ sessionId: (process.pid % 65535),
+ timeout: 2000,
+ ttl: 128
+ };
+
+ var session = ping.createSession (options);
+
+The optional `options` parameter is an object, and can contain the following
+items:
+
+ * `networkProtocol` - Either the constant `ping.NetworkProtocol.IPv4` or the
+ constant `ping.NetworkProtocol.IPv6`, defaults to the constant
+ `ping.NetworkProtocol.IPv4`
+ * `packetSize` - How many bytes each ICMP echo request packet should be,
+ defaults to `16`, if the value specified is less that `12` then the value
+ `12` will be used (8 bytes are required for the ICMP packet itself, then 4
+ bytes are required to encode a unique session ID in the request and response
+ packets)
+ * `retries` - Number of times to re-send a ping requests, defaults to `1`
+ * `sessionId` - A unique ID used to identify request and response packets sent
+ by this instance of the `Session` class, valid numbers are in the range of
+ `1` to `65535`, defaults to the value of `process.pid % 65535`
+ * `timeout` - Number of milliseconds to wait for a response before re-trying
+ or failing, defaults to `2000`
+ * `ttl` - Value to use for the IP header time to live field, defaults to `128`
+
+After creating the ping `Session` object an underlying raw socket will be
+created. If the underlying raw socket cannot be opened an exception with be
+thrown. The error will be an instance of the `Error` class.
+
+Seperate instances of the `Session` class must be created for IPv4 and IPv6.
+
+## session.on ("close", callback)
+
+The `close` event is emitted by the session when the underlying raw socket
+is closed.
+
+No arguments are passed to the callback.
+
+The following example prints a message to the console when the underlying raw
+socket is closed:
+
+ session.on ("close", function () {
+ console.log ("socket closed");
+ });
+
+## session.on ("error", callback)
+
+The `error` event is emitted by the session when the underlying raw socket
+emits an error.
+
+The following arguments will be passed to the `callback` function:
+
+ * `error` - An instance of the `Error` class, the exposed `message` attribute
+ will contain a detailed error message.
+
+The following example prints a message to the console when an error occurs
+with the underlying raw socket, the session is then closed:
+
+ session.on ("error", function (error) {
+ console.log (error.toString ());
+ session.close ();
+ });
+
+## session.close ()
+
+The `close()` method closes the underlying raw socket, and cancels all
+outstanding requsts.
+
+The calback function for each outstanding ping requests will be called. The
+error parameter will be an instance of the `Error` class, and the `message`
+attribute set to `Socket forcibly closed`.
+
+The sessoin can be re-used simply by submitting more ping requests, a new raw
+socket will be created to serve the new ping requests. This is a way in which
+to clear outstanding requests.
+
+The following example submits a ping request and prints the target which
+successfully responded first, and then closes the session which will clear the
+other outstanding ping requests.
+
+ var targets = ["1.1.1.1", "2.2.2.2", "3.3.3.3"];
+
+ for (var i = 0; i < targets.length; i++) {
+ session.pingHost (targets[i], function (error, target) {
+ if (! error) {
+ console.log (target);
+ session.close ();
+ }
+ });
+ }
+
+## session.pingHost (target, callback)
+
+The `pingHost()` method sends a ping request to a remote host.
+
+The `target` parameter is the dotted quad formatted IP address of the target
+host for IPv4 sessions, or the compressed formatted IP address of the target
+host for IPv6 sessions.
+
+The `callback` function is called once the ping requests is complete. The
+following arguments will be passed to the `callback` function:
+
+ * `error` - Instance of the `Error` class or a sub-class, or `null` if no
+ error occurred
+ * `target` - The target parameter as specified in the request
+ still be the target host and NOT the responding gateway
+ * `sent` - An instance of the `Date` class specifying when the first ping
+ was sent for this request (refer to the Round Trip Time section for more
+ information)
+ * `rcvd` - An instance of the `Date` class specifying when the request
+ completed (refer to the Round Trip Time section for more information)
+
+The following example sends a ping request to a remote host:
+
+ var target = "fe80::a00:27ff:fe2a:3427";
+
+ session.pingHost (target, function (error, target, sent, rcvd) {
+ var ms = rcvd - sent;
+ if (error)
+ console.log (target + ": " + error.toString ());
+ else
+ console.log (target + ": Alive (ms=" + ms + ")");
+ });
+
+## session.traceRoute (target, ttl, feedCallback, doneCallback)
+
+The `traceRoute()` method provides similar functionality to the trace route
+utility typically provided with most networked operating systems.
+
+The `target` parameter is the dotted quad formatted IP address of the target
+host for IPv4 sessions, or the compressed formatted IP address of the target
+host for IPv6 sessions. The optional `ttl` parameter specifies the maximum
+number of hops used by the trace route and defaults to the `ttl` options
+parameter as defined by the `createSession()` method.
+
+Some hosts do not respond to ping requests when the time to live is `0`, that
+is they will not send back an time exceeded error response. Instead of
+stopping the trace route at the first time out this method will move on to the
+next hop, by increasing the time to live by 1. It will do this 2 times,
+meaning that a trace route will continue until the target host responds or at
+most 3 request time outs are experienced.
+
+Each requst is subject to the `retries` and `timeout` option parameters to the
+`createSession()` method. That is, requests will be retried per hop as per
+these parameters.
+
+This method will not call a single callback once the trace route is complete.
+Instead the `feedCallback` function will be called each time a ping response is
+received or a time out occurs. The following arguments will be passed to the
+`feedCallback` function:
+
+ * `error` - Instance of the `Error` class or a sub-class, or `null` if no
+ error occurred
+ * `target` - The target parameter as specified in the request
+ * `ttl` - The time to live used in the request which triggered this respinse
+ * `sent` - An instance of the `Date` class specifying when the first ping
+ was sent for this request (refer to the Round Trip Time section for more
+ information)
+ * `rcvd` - An instance of the `Date` class specifying when the request
+ completed (refer to the Round Trip Time section for more information)
+
+Once a ping response has been received from the target, or more than three
+request timed out errors are experienced, the `doneCallback` function will be
+called. The following arguments will be passed to the `doneCallback` function:
+
+ * `error` - Instance of the `Error` class or a sub-class, or `null` if no
+ error occurred
+ * `target` - The target parameter as specified in the request
+
+Once the `doneCallback` function has been called the request is complete and
+the `requestCallback` function will no longer be called.
+
+If the `feedCallback` function returns a true value when called the trace route
+will stop and the `doneCallback` will be called.
+
+The following example initiates a trace route to a remote host:
+
+ function doneCb (error, target) {
+ if (error)
+ console.log (target + ": " + error.toString ());
+ else
+ console.log (target + ": Done");
+ }
+
+ function feedCb (error, target, ttl, sent, rcvd) {
+ var ms = rcvd - sent;
+ if (error) {
+ if (error instanceof ping.TimeExceededError) {
+ console.log (target + ": " + error.source + " (ttl="
+ + ttl + " ms=" + ms +")");
+ } else {
+ console.log (target + ": " + error.toString ()
+ + " (ttl=" + ttl + " ms=" + ms +")");
+ }
+ } else {
+ console.log (target + ": " + target + " (ttl=" + ttl
+ + " ms=" + ms +")");
+ }
+ }
+
+ session.traceRoute ("192.168.10.10", 10, feedCb, doneCb);
+
+# Example Programs
+
+Example programs are included under the modules `example` directory.
+
+# Bugs & Known Issues
+
+None, yet!
+
+Bug reports should be sent to <st...@gmail.com>.
+
+# Changes
+
+## Version 1.0.0 - 03/02/2013
+
+ * Initial release
+
+## Version 1.0.1 - 04/02/2013
+
+ * Minor corrections to the README.md
+ * Add note to README.md about error handling
+ * Timed out errors are now instances of the `ping.RequestTimedOutError`
+ object
+
+## Version 1.0.2 - 11/02/2013
+
+ * The RequestTimedOutError class is not being exported
+
+## Version 1.1.0 - 13/02/2013
+
+ * Support IPv6
+
+## Version 1.1.1 - 15/02/2013
+
+ * The `ping.Session.close()` method was not undefining the sessions raw
+ socket after closing
+ * Return self from the `pingHost()` method to chain method calls
+
+## Version 1.1.2 - 04/03/2013
+
+ * Use the `raw.Socket.pauseRecv()` and `raw.Socket.resumeRecv()` methods
+ instead of closing a socket when there are no more outstanding requests
+
+## Version 1.1.3 - 07/03/2013
+
+ * Sessions were limited to sending 65535 ping requests
+
+## Version 1.1.4 - 09/04/2013
+
+ * Add the `packetSize` option to the `createSession()` method to specify how
+ many bytes each ICMP echo request packet should be
+
+## Version 1.1.5 - 17/05/2013
+
+ * Incorrectly parsing ICMP error responses resulting in responses matching
+ the wrong request
+ * Use a unique session ID per instance of the `Session` class to identify
+ requests and responses sent by a session
+ * Added the (internal) `_debugRequest()` and `_debugResponse()` methods, and
+ the `_debug` option to the `createSession()` method
+ * Added example programs `ping-ttl.js` and `ping6-ttl.js`
+ * Use MIT license instead of GPL
+
+## Version 1.1.6 - 17/05/2013
+
+ * Session IDs are now 2 bytes (previously 1 byte), and request IDs are also
+ now 2 bytes (previously 3 bytes)
+ * Each ICMP error response now has an associated error class (e.g. the
+ `Time exceeded` response maps onto the `ping.TimeExceededError` class)
+ * Call request callbacks with an error when there are no free request IDs
+ because of too many outstanding requests
+
+## Version 1.1.7 - 19/05/2013
+
+ * Added the `traceRoute()` method
+ * Added the `ttl` option parameter to the `createSession()` method, and
+ updated the example programs `ping-ttl.js` and `ping6-ttl.js` to use it
+ * Response callback for `pingHost()` now includes two instances of the
+ `Date` class to specify when a request was sent and a response received
+
+## Version 1.1.8 - 01/07/2013
+
+ * Use `raw.Socket.createChecksum()` instead of automatic checksum generation
+
+## Version 1.1.9 - 01/07/2013
+
+ * Use `raw.Socket.writeChecksum()` instead of manually rendering checksums
+
+# Roadmap
+
+Suggestions and requirements should be sent to <st...@gmail.com>.
+
+# License
+
+Copyright (c) 2013 Stephen Vickers
+
+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.
+
+# Author
+
+Stephen Vickers <st...@gmail.com>
[42/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/package.json b/blackberry10/node_modules/elementtree/node_modules/sax/package.json
new file mode 100644
index 0000000..0b6cf3b
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/package.json
@@ -0,0 +1,63 @@
+{
+ "name": "sax",
+ "description": "An evented streaming XML parser in JavaScript",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "version": "0.3.5",
+ "main": "lib/sax.js",
+ "license": {
+ "type": "MIT",
+ "url": "https://raw.github.com/isaacs/sax-js/master/LICENSE"
+ },
+ "scripts": {
+ "test": "node test/index.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/sax-js.git"
+ },
+ "contributors": [
+ {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "Stein Martin Hustad",
+ "email": "stein@hustad.com"
+ },
+ {
+ "name": "Mikeal Rogers",
+ "email": "mikeal.rogers@gmail.com"
+ },
+ {
+ "name": "Laurie Harper",
+ "email": "laurie@holoweb.net"
+ },
+ {
+ "name": "Jann Horn",
+ "email": "jann@Jann-PC.fritz.box"
+ },
+ {
+ "name": "Elijah Insua",
+ "email": "tmpvar@gmail.com"
+ },
+ {
+ "name": "Henry Rawas",
+ "email": "henryr@schakra.com"
+ },
+ {
+ "name": "Justin Makeig",
+ "email": "jmpublic@makeig.com"
+ }
+ ],
+ "readme": "# sax js\n\nA sax-style parser for XML and HTML.\n\nDesigned with [node](http://nodejs.org/) in mind, but should work fine in\nthe browser or other CommonJS implementations.\n\n## What This Is\n\n* A very simple tool to parse through an XML string.\n* A stepping stone to a streaming HTML parser.\n* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML \n docs.\n\n## What This Is (probably) Not\n\n* An HTML Parser - That's a fine goal, but this isn't it. It's just\n XML.\n* A DOM Builder - You can use it to build an object model out of XML,\n but it doesn't do that out of the box.\n* XSLT - No DOM = no querying.\n* 100% Compliant with (some other SAX implementation) - Most SAX\n implementations are in Java and do a lot more than this does.\n* An XML Validator - It does a little validation when in strict mode, but\n not much.\n* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic \n masochism.\n* A DTD-aware Thing - Fetching DTDs is a
much bigger job.\n\n## Regarding `<!DOCTYPE`s and `<!ENTITY`s\n\nThe parser will handle the basic XML entities in text nodes and attribute\nvalues: `& < > ' "`. It's possible to define additional\nentities in XML by putting them in the DTD. This parser doesn't do anything\nwith that. If you want to listen to the `ondoctype` event, and then fetch\nthe doctypes, and read the entities and add them to `parser.ENTITIES`, then\nbe my guest.\n\nUnknown entities will fail in strict mode, and in loose mode, will pass\nthrough unmolested.\n\n## Usage\n\n var sax = require(\"./lib/sax\"),\n strict = true, // set to false for html-mode\n parser = sax.parser(strict);\n\n parser.onerror = function (e) {\n // an error happened.\n };\n parser.ontext = function (t) {\n // got some text. t is the string of text.\n };\n parser.onopentag = function (node) {\n // opened a tag. node has \"name\" and \"attributes\"\n };\n parser.onattr
ibute = function (attr) {\n // an attribute. attr has \"name\" and \"value\"\n };\n parser.onend = function () {\n // parser stream is done, and ready to have more stuff written to it.\n };\n\n parser.write('<xml>Hello, <who name=\"world\">world</who>!</xml>').close();\n\n // stream usage\n // takes the same options as the parser\n var saxStream = require(\"sax\").createStream(strict, options)\n saxStream.on(\"error\", function (e) {\n // unhandled errors will throw, since this is a proper node\n // event emitter.\n console.error(\"error!\", e)\n // clear the error\n this._parser.error = null\n this._parser.resume()\n })\n saxStream.on(\"opentag\", function (node) {\n // same object as above\n })\n // pipe is supported, and it's readable/writable\n // same chunks coming in also go out.\n fs.createReadStream(\"file.xml\")\n .pipe(saxStream)\n .pipe(fs.createReadStream(\"file-copy.xml\"))
\n\n\n\n## Arguments\n\nPass the following arguments to the parser function. All are optional.\n\n`strict` - Boolean. Whether or not to be a jerk. Default: `false`.\n\n`opt` - Object bag of settings regarding string formatting. All default to `false`.\n\nSettings supported:\n\n* `trim` - Boolean. Whether or not to trim text and comment nodes.\n* `normalize` - Boolean. If true, then turn any whitespace into a single\n space.\n* `lowercasetags` - Boolean. If true, then lowercase tags in loose mode, \n rather than uppercasing them.\n* `xmlns` - Boolean. If true, then namespaces are supported.\n\n## Methods\n\n`write` - Write bytes onto the stream. You don't have to do this all at\nonce. You can keep writing as much as you want.\n\n`close` - Close the stream. Once closed, no more data may be written until\nit is done processing the buffer, which is signaled by the `end` event.\n\n`resume` - To gracefully handle errors, assign a listener to the `error`\nevent. Then, when the error is
taken care of, you can call `resume` to\ncontinue parsing. Otherwise, the parser will not continue while in an error\nstate.\n\n## Members\n\nAt all times, the parser object will have the following members:\n\n`line`, `column`, `position` - Indications of the position in the XML\ndocument where the parser currently is looking.\n\n`startTagPosition` - Indicates the position where the current tag starts.\n\n`closed` - Boolean indicating whether or not the parser can be written to.\nIf it's `true`, then wait for the `ready` event to write again.\n\n`strict` - Boolean indicating whether or not the parser is a jerk.\n\n`opt` - Any options passed into the constructor.\n\n`tag` - The current tag being dealt with.\n\nAnd a bunch of other stuff that you probably shouldn't touch.\n\n## Events\n\nAll events emit with a single argument. To listen to an event, assign a\nfunction to `on<eventname>`. Functions get executed in the this-context of\nthe parser object. The list of supported events ar
e also in the exported\n`EVENTS` array.\n\nWhen using the stream interface, assign handlers using the EventEmitter\n`on` function in the normal fashion.\n\n`error` - Indication that something bad happened. The error will be hanging\nout on `parser.error`, and must be deleted before parsing can continue. By\nlistening to this event, you can keep an eye on that kind of stuff. Note:\nthis happens *much* more in strict mode. Argument: instance of `Error`.\n\n`text` - Text node. Argument: string of text.\n\n`doctype` - The `<!DOCTYPE` declaration. Argument: doctype string.\n\n`processinginstruction` - Stuff like `<?xml foo=\"blerg\" ?>`. Argument:\nobject with `name` and `body` members. Attributes are not parsed, as\nprocessing instructions have implementation dependent semantics.\n\n`sgmldeclaration` - Random SGML declarations. Stuff like `<!ENTITY p>`\nwould trigger this kind of event. This is a weird thing to support, so it\nmight go away at some point. SAX isn't intended to be used t
o parse SGML,\nafter all.\n\n`opentag` - An opening tag. Argument: object with `name` and `attributes`.\nIn non-strict mode, tag names are uppercased, unless the `lowercasetags`\noption is set. If the `xmlns` option is set, then it will contain\nnamespace binding information on the `ns` member, and will have a\n`local`, `prefix`, and `uri` member.\n\n`closetag` - A closing tag. In loose mode, tags are auto-closed if their\nparent closes. In strict mode, well-formedness is enforced. Note that\nself-closing tags will have `closeTag` emitted immediately after `openTag`.\nArgument: tag name.\n\n`attribute` - An attribute node. Argument: object with `name` and `value`,\nand also namespace information if the `xmlns` option flag is set.\n\n`comment` - A comment node. Argument: the string of the comment.\n\n`opencdata` - The opening tag of a `<![CDATA[` block.\n\n`cdata` - The text of a `<![CDATA[` block. Since `<![CDATA[` blocks can get\nquite large, this event may fire multiple times f
or a single block, if it\nis broken up into multiple `write()`s. Argument: the string of random\ncharacter data.\n\n`closecdata` - The closing tag (`]]>`) of a `<![CDATA[` block.\n\n`opennamespace` - If the `xmlns` option is set, then this event will\nsignal the start of a new namespace binding.\n\n`closenamespace` - If the `xmlns` option is set, then this event will\nsignal the end of a namespace binding.\n\n`end` - Indication that the closed stream has ended.\n\n`ready` - Indication that the stream has reset, and is ready to be written\nto.\n\n`noscript` - In non-strict mode, `<script>` tags trigger a `\"script\"`\nevent, and their contents are not checked for special xml characters.\nIf you pass `noscript: true`, then this behavior is suppressed.\n\n## Reporting Problems\n\nIt's best to write a failing test if you find an issue. I will always\naccept pull requests with failing tests if they demonstrate intended\nbehavior, but it is very hard to figure out what issue you're descr
ibing\nwithout a test. Writing a test is also the best way for you yourself\nto figure out if you really understand the issue you think you have with\nsax-js.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/sax-js/issues"
+ },
+ "_id": "sax@0.3.5",
+ "_from": "sax@0.3.5"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/buffer-overrun.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/buffer-overrun.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/buffer-overrun.js
new file mode 100644
index 0000000..8d12fac
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/buffer-overrun.js
@@ -0,0 +1,25 @@
+// set this really low so that I don't have to put 64 MB of xml in here.
+var sax = require("../lib/sax")
+var bl = sax.MAX_BUFFER_LENGTH
+sax.MAX_BUFFER_LENGTH = 5;
+
+require(__dirname).test({
+ expect : [
+ ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 15\nChar: "],
+ ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 30\nChar: "],
+ ["error", "Max buffer length exceeded: tagName\nLine: 0\nColumn: 45\nChar: "],
+ ["opentag", {
+ "name": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ",
+ "attributes": {}
+ }],
+ ["text", "yo"],
+ ["closetag", "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"]
+ ]
+}).write("<abcdefghijklmn")
+ .write("opqrstuvwxyzABC")
+ .write("DEFGHIJKLMNOPQR")
+ .write("STUVWXYZ>")
+ .write("yo")
+ .write("</abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ>")
+ .close();
+sax.MAX_BUFFER_LENGTH = bl
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-chunked.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-chunked.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-chunked.js
new file mode 100644
index 0000000..ccd5ee6
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-chunked.js
@@ -0,0 +1,11 @@
+
+require(__dirname).test({
+ expect : [
+ ["opentag", {"name": "R","attributes": {}}],
+ ["opencdata", undefined],
+ ["cdata", " this is character data "],
+ ["closecdata", undefined],
+ ["closetag", "R"]
+ ]
+}).write("<r><![CDATA[ this is ").write("character data ").write("]]></r>").close();
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-end-split.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-end-split.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-end-split.js
new file mode 100644
index 0000000..b41bd00
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-end-split.js
@@ -0,0 +1,15 @@
+
+require(__dirname).test({
+ expect : [
+ ["opentag", {"name": "R","attributes": {}}],
+ ["opencdata", undefined],
+ ["cdata", " this is "],
+ ["closecdata", undefined],
+ ["closetag", "R"]
+ ]
+})
+ .write("<r><![CDATA[ this is ]")
+ .write("]>")
+ .write("</r>")
+ .close();
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-fake-end.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-fake-end.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-fake-end.js
new file mode 100644
index 0000000..07aeac4
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-fake-end.js
@@ -0,0 +1,28 @@
+
+var p = require(__dirname).test({
+ expect : [
+ ["opentag", {"name": "R","attributes": {}}],
+ ["opencdata", undefined],
+ ["cdata", "[[[[[[[[]]]]]]]]"],
+ ["closecdata", undefined],
+ ["closetag", "R"]
+ ]
+})
+var x = "<r><![CDATA[[[[[[[[[]]]]]]]]]]></r>"
+for (var i = 0; i < x.length ; i ++) {
+ p.write(x.charAt(i))
+}
+p.close();
+
+
+var p2 = require(__dirname).test({
+ expect : [
+ ["opentag", {"name": "R","attributes": {}}],
+ ["opencdata", undefined],
+ ["cdata", "[[[[[[[[]]]]]]]]"],
+ ["closecdata", undefined],
+ ["closetag", "R"]
+ ]
+})
+var x = "<r><![CDATA[[[[[[[[[]]]]]]]]]]></r>"
+p2.write(x).close();
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-multiple.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-multiple.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-multiple.js
new file mode 100644
index 0000000..dab2015
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata-multiple.js
@@ -0,0 +1,15 @@
+
+require(__dirname).test({
+ expect : [
+ ["opentag", {"name": "R","attributes": {}}],
+ ["opencdata", undefined],
+ ["cdata", " this is "],
+ ["closecdata", undefined],
+ ["opencdata", undefined],
+ ["cdata", "character data "],
+ ["closecdata", undefined],
+ ["closetag", "R"]
+ ]
+}).write("<r><![CDATA[ this is ]]>").write("<![CDA").write("T").write("A[")
+ .write("character data ").write("]]></r>").close();
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata.js
new file mode 100644
index 0000000..0f09cce
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/cdata.js
@@ -0,0 +1,10 @@
+require(__dirname).test({
+ xml : "<r><![CDATA[ this is character data ]]></r>",
+ expect : [
+ ["opentag", {"name": "R","attributes": {}}],
+ ["opencdata", undefined],
+ ["cdata", " this is character data "],
+ ["closecdata", undefined],
+ ["closetag", "R"]
+ ]
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/index.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/index.js
new file mode 100644
index 0000000..d4e1ef4
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/index.js
@@ -0,0 +1,86 @@
+var globalsBefore = JSON.stringify(Object.keys(global))
+ , util = require("util")
+ , assert = require("assert")
+ , fs = require("fs")
+ , path = require("path")
+ , sax = require("../lib/sax")
+
+exports.sax = sax
+
+// handy way to do simple unit tests
+// if the options contains an xml string, it'll be written and the parser closed.
+// otherwise, it's assumed that the test will write and close.
+exports.test = function test (options) {
+ var xml = options.xml
+ , parser = sax.parser(options.strict, options.opt)
+ , expect = options.expect
+ , e = 0
+ sax.EVENTS.forEach(function (ev) {
+ parser["on" + ev] = function (n) {
+ if (process.env.DEBUG) {
+ console.error({ expect: expect[e]
+ , actual: [ev, n] })
+ }
+ if (e >= expect.length && (ev === "end" || ev === "ready")) return
+ assert.ok( e < expect.length,
+ "expectation #"+e+" "+util.inspect(expect[e])+"\n"+
+ "Unexpected event: "+ev+" "+(n ? util.inspect(n) : ""))
+ var inspected = n instanceof Error ? "\n"+ n.message : util.inspect(n)
+ assert.equal(ev, expect[e][0],
+ "expectation #"+e+"\n"+
+ "Didn't get expected event\n"+
+ "expect: "+expect[e][0] + " " +util.inspect(expect[e][1])+"\n"+
+ "actual: "+ev+" "+inspected+"\n")
+ if (ev === "error") assert.equal(n.message, expect[e][1])
+ else assert.deepEqual(n, expect[e][1],
+ "expectation #"+e+"\n"+
+ "Didn't get expected argument\n"+
+ "expect: "+expect[e][0] + " " +util.inspect(expect[e][1])+"\n"+
+ "actual: "+ev+" "+inspected+"\n")
+ e++
+ if (ev === "error") parser.resume()
+ }
+ })
+ if (xml) parser.write(xml).close()
+ return parser
+}
+
+if (module === require.main) {
+ var running = true
+ , failures = 0
+
+ function fail (file, er) {
+ util.error("Failed: "+file)
+ util.error(er.stack || er.message)
+ failures ++
+ }
+
+ fs.readdir(__dirname, function (error, files) {
+ files = files.filter(function (file) {
+ return (/\.js$/.exec(file) && file !== 'index.js')
+ })
+ var n = files.length
+ , i = 0
+ console.log("0.." + n)
+ files.forEach(function (file) {
+ // run this test.
+ try {
+ require(path.resolve(__dirname, file))
+ var globalsAfter = JSON.stringify(Object.keys(global))
+ if (globalsAfter !== globalsBefore) {
+ var er = new Error("new globals introduced\n"+
+ "expected: "+globalsBefore+"\n"+
+ "actual: "+globalsAfter)
+ globalsBefore = globalsAfter
+ throw er
+ }
+ console.log("ok " + (++i) + " - " + file)
+ } catch (er) {
+ console.log("not ok "+ (++i) + " - " + file)
+ fail(file, er)
+ }
+ })
+ if (!failures) return console.log("#all pass")
+ else return console.error(failures + " failure" + (failures > 1 ? "s" : ""))
+ })
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-23.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-23.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-23.js
new file mode 100644
index 0000000..e7991b2
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-23.js
@@ -0,0 +1,43 @@
+
+require(__dirname).test
+ ( { xml :
+ "<compileClassesResponse>"+
+ "<result>"+
+ "<bodyCrc>653724009</bodyCrc>"+
+ "<column>-1</column>"+
+ "<id>01pG0000002KoSUIA0</id>"+
+ "<line>-1</line>"+
+ "<name>CalendarController</name>"+
+ "<success>true</success>"+
+ "</result>"+
+ "</compileClassesResponse>"
+
+ , expect :
+ [ [ "opentag", { name: "COMPILECLASSESRESPONSE", attributes: {} } ]
+ , [ "opentag", { name : "RESULT", attributes: {} } ]
+ , [ "opentag", { name: "BODYCRC", attributes: {} } ]
+ , [ "text", "653724009" ]
+ , [ "closetag", "BODYCRC" ]
+ , [ "opentag", { name: "COLUMN", attributes: {} } ]
+ , [ "text", "-1" ]
+ , [ "closetag", "COLUMN" ]
+ , [ "opentag", { name: "ID", attributes: {} } ]
+ , [ "text", "01pG0000002KoSUIA0" ]
+ , [ "closetag", "ID" ]
+ , [ "opentag", {name: "LINE", attributes: {} } ]
+ , [ "text", "-1" ]
+ , [ "closetag", "LINE" ]
+ , [ "opentag", {name: "NAME", attributes: {} } ]
+ , [ "text", "CalendarController" ]
+ , [ "closetag", "NAME" ]
+ , [ "opentag", {name: "SUCCESS", attributes: {} } ]
+ , [ "text", "true" ]
+ , [ "closetag", "SUCCESS" ]
+ , [ "closetag", "RESULT" ]
+ , [ "closetag", "COMPILECLASSESRESPONSE" ]
+ ]
+ , strict : false
+ , opt : {}
+ }
+ )
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-30.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-30.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-30.js
new file mode 100644
index 0000000..c2cc809
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-30.js
@@ -0,0 +1,24 @@
+// https://github.com/isaacs/sax-js/issues/33
+require(__dirname).test
+ ( { xml : "<xml>\n"+
+ "<!-- \n"+
+ " comment with a single dash- in it\n"+
+ "-->\n"+
+ "<data/>\n"+
+ "</xml>"
+
+ , expect :
+ [ [ "opentag", { name: "xml", attributes: {} } ]
+ , [ "text", "\n" ]
+ , [ "comment", " \n comment with a single dash- in it\n" ]
+ , [ "text", "\n" ]
+ , [ "opentag", { name: "data", attributes: {} } ]
+ , [ "closetag", "data" ]
+ , [ "text", "\n" ]
+ , [ "closetag", "xml" ]
+ ]
+ , strict : true
+ , opt : {}
+ }
+ )
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-35.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-35.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-35.js
new file mode 100644
index 0000000..7c521c5
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-35.js
@@ -0,0 +1,15 @@
+// https://github.com/isaacs/sax-js/issues/35
+require(__dirname).test
+ ( { xml : "<xml>

\n"+
+ "</xml>"
+
+ , expect :
+ [ [ "opentag", { name: "xml", attributes: {} } ]
+ , [ "text", "\r\r\n" ]
+ , [ "closetag", "xml" ]
+ ]
+ , strict : true
+ , opt : {}
+ }
+ )
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-47.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-47.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-47.js
new file mode 100644
index 0000000..911c7d0
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-47.js
@@ -0,0 +1,13 @@
+// https://github.com/isaacs/sax-js/issues/47
+require(__dirname).test
+ ( { xml : '<a href="query.svc?x=1&y=2&z=3"/>'
+ , expect : [
+ [ "attribute", { name:'href', value:"query.svc?x=1&y=2&z=3"} ],
+ [ "opentag", { name: "a", attributes: { href:"query.svc?x=1&y=2&z=3"} } ],
+ [ "closetag", "a" ]
+ ]
+ , strict : true
+ , opt : {}
+ }
+ )
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-49.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-49.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-49.js
new file mode 100644
index 0000000..2964325
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/issue-49.js
@@ -0,0 +1,31 @@
+// https://github.com/isaacs/sax-js/issues/49
+require(__dirname).test
+ ( { xml : "<xml><script>hello world</script></xml>"
+ , expect :
+ [ [ "opentag", { name: "xml", attributes: {} } ]
+ , [ "opentag", { name: "script", attributes: {} } ]
+ , [ "text", "hello world" ]
+ , [ "closetag", "script" ]
+ , [ "closetag", "xml" ]
+ ]
+ , strict : false
+ , opt : { lowercasetags: true, noscript: true }
+ }
+ )
+
+require(__dirname).test
+ ( { xml : "<xml><script><![CDATA[hello world]]></script></xml>"
+ , expect :
+ [ [ "opentag", { name: "xml", attributes: {} } ]
+ , [ "opentag", { name: "script", attributes: {} } ]
+ , [ "opencdata", undefined ]
+ , [ "cdata", "hello world" ]
+ , [ "closecdata", undefined ]
+ , [ "closetag", "script" ]
+ , [ "closetag", "xml" ]
+ ]
+ , strict : false
+ , opt : { lowercasetags: true, noscript: true }
+ }
+ )
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/parser-position.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/parser-position.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/parser-position.js
new file mode 100644
index 0000000..e4a68b1
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/parser-position.js
@@ -0,0 +1,28 @@
+var sax = require("../lib/sax"),
+ assert = require("assert")
+
+function testPosition(chunks, expectedEvents) {
+ var parser = sax.parser();
+ expectedEvents.forEach(function(expectation) {
+ parser['on' + expectation[0]] = function() {
+ for (var prop in expectation[1]) {
+ assert.equal(parser[prop], expectation[1][prop]);
+ }
+ }
+ });
+ chunks.forEach(function(chunk) {
+ parser.write(chunk);
+ });
+};
+
+testPosition(['<div>abcdefgh</div>'],
+ [ ['opentag', { position: 5, startTagPosition: 1 }]
+ , ['text', { position: 19, startTagPosition: 14 }]
+ , ['closetag', { position: 19, startTagPosition: 14 }]
+ ]);
+
+testPosition(['<div>abcde','fgh</div>'],
+ [ ['opentag', { position: 5, startTagPosition: 1 }]
+ , ['text', { position: 19, startTagPosition: 14 }]
+ , ['closetag', { position: 19, startTagPosition: 14 }]
+ ]);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/script.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/script.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/script.js
new file mode 100644
index 0000000..464c051
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/script.js
@@ -0,0 +1,12 @@
+require(__dirname).test({
+ xml : "<html><head><script>if (1 < 0) { console.log('elo there'); }</script></head></html>",
+ expect : [
+ ["opentag", {"name": "HTML","attributes": {}}],
+ ["opentag", {"name": "HEAD","attributes": {}}],
+ ["opentag", {"name": "SCRIPT","attributes": {}}],
+ ["script", "if (1 < 0) { console.log('elo there'); }"],
+ ["closetag", "SCRIPT"],
+ ["closetag", "HEAD"],
+ ["closetag", "HTML"]
+ ]
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-child-strict.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-child-strict.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-child-strict.js
new file mode 100644
index 0000000..ce9c045
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-child-strict.js
@@ -0,0 +1,40 @@
+
+require(__dirname).test({
+ xml :
+ "<root>"+
+ "<child>" +
+ "<haha />" +
+ "</child>" +
+ "<monkey>" +
+ "=(|)" +
+ "</monkey>" +
+ "</root>",
+ expect : [
+ ["opentag", {
+ "name": "root",
+ "attributes": {}
+ }],
+ ["opentag", {
+ "name": "child",
+ "attributes": {}
+ }],
+ ["opentag", {
+ "name": "haha",
+ "attributes": {}
+ }],
+ ["closetag", "haha"],
+ ["closetag", "child"],
+ ["opentag", {
+ "name": "monkey",
+ "attributes": {}
+ }],
+ ["text", "=(|)"],
+ ["closetag", "monkey"],
+ ["closetag", "root"],
+ ["end"],
+ ["ready"]
+ ],
+ strict : true,
+ opt : {}
+});
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-child.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-child.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-child.js
new file mode 100644
index 0000000..bc6b52b
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-child.js
@@ -0,0 +1,40 @@
+
+require(__dirname).test({
+ xml :
+ "<root>"+
+ "<child>" +
+ "<haha />" +
+ "</child>" +
+ "<monkey>" +
+ "=(|)" +
+ "</monkey>" +
+ "</root>",
+ expect : [
+ ["opentag", {
+ "name": "ROOT",
+ "attributes": {}
+ }],
+ ["opentag", {
+ "name": "CHILD",
+ "attributes": {}
+ }],
+ ["opentag", {
+ "name": "HAHA",
+ "attributes": {}
+ }],
+ ["closetag", "HAHA"],
+ ["closetag", "CHILD"],
+ ["opentag", {
+ "name": "MONKEY",
+ "attributes": {}
+ }],
+ ["text", "=(|)"],
+ ["closetag", "MONKEY"],
+ ["closetag", "ROOT"],
+ ["end"],
+ ["ready"]
+ ],
+ strict : false,
+ opt : {}
+});
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-tag.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-tag.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-tag.js
new file mode 100644
index 0000000..b2c5736
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/self-closing-tag.js
@@ -0,0 +1,25 @@
+
+require(__dirname).test({
+ xml :
+ "<root> "+
+ "<haha /> "+
+ "<haha/> "+
+ "<monkey> "+
+ "=(|) "+
+ "</monkey>"+
+ "</root> ",
+ expect : [
+ ["opentag", {name:"ROOT", attributes:{}}],
+ ["opentag", {name:"HAHA", attributes:{}}],
+ ["closetag", "HAHA"],
+ ["opentag", {name:"HAHA", attributes:{}}],
+ ["closetag", "HAHA"],
+ // ["opentag", {name:"HAHA", attributes:{}}],
+ // ["closetag", "HAHA"],
+ ["opentag", {name:"MONKEY", attributes:{}}],
+ ["text", "=(|)"],
+ ["closetag", "MONKEY"],
+ ["closetag", "ROOT"]
+ ],
+ opt : { trim : true }
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/stray-ending.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/stray-ending.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/stray-ending.js
new file mode 100644
index 0000000..6b0aa7f
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/stray-ending.js
@@ -0,0 +1,17 @@
+// stray ending tags should just be ignored in non-strict mode.
+// https://github.com/isaacs/sax-js/issues/32
+require(__dirname).test
+ ( { xml :
+ "<a><b></c></b></a>"
+ , expect :
+ [ [ "opentag", { name: "A", attributes: {} } ]
+ , [ "opentag", { name: "B", attributes: {} } ]
+ , [ "text", "</c>" ]
+ , [ "closetag", "B" ]
+ , [ "closetag", "A" ]
+ ]
+ , strict : false
+ , opt : {}
+ }
+ )
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/trailing-non-whitespace.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/trailing-non-whitespace.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/trailing-non-whitespace.js
new file mode 100644
index 0000000..3e1fb2e
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/trailing-non-whitespace.js
@@ -0,0 +1,17 @@
+
+require(__dirname).test({
+ xml : "<span>Welcome,</span> to monkey land",
+ expect : [
+ ["opentag", {
+ "name": "SPAN",
+ "attributes": {}
+ }],
+ ["text", "Welcome,"],
+ ["closetag", "SPAN"],
+ ["text", " to monkey land"],
+ ["end"],
+ ["ready"]
+ ],
+ strict : false,
+ opt : {}
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/unquoted.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/unquoted.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/unquoted.js
new file mode 100644
index 0000000..79f1d0b
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/unquoted.js
@@ -0,0 +1,17 @@
+// unquoted attributes should be ok in non-strict mode
+// https://github.com/isaacs/sax-js/issues/31
+require(__dirname).test
+ ( { xml :
+ "<span class=test hello=world></span>"
+ , expect :
+ [ [ "attribute", { name: "class", value: "test" } ]
+ , [ "attribute", { name: "hello", value: "world" } ]
+ , [ "opentag", { name: "SPAN",
+ attributes: { class: "test", hello: "world" } } ]
+ , [ "closetag", "SPAN" ]
+ ]
+ , strict : false
+ , opt : {}
+ }
+ )
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-issue-41.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-issue-41.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-issue-41.js
new file mode 100644
index 0000000..596d82b
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-issue-41.js
@@ -0,0 +1,67 @@
+var t = require(__dirname)
+
+ , xmls = // should be the same both ways.
+ [ "<parent xmlns:a='http://ATTRIBUTE' a:attr='value' />"
+ , "<parent a:attr='value' xmlns:a='http://ATTRIBUTE' />" ]
+
+ , ex1 =
+ [ [ "opennamespace"
+ , { prefix: "a"
+ , uri: "http://ATTRIBUTE"
+ }
+ ]
+ , [ "attribute"
+ , { name: "xmlns:a"
+ , value: "http://ATTRIBUTE"
+ , prefix: "xmlns"
+ , local: "a"
+ , uri: "http://www.w3.org/2000/xmlns/"
+ }
+ ]
+ , [ "attribute"
+ , { name: "a:attr"
+ , local: "attr"
+ , prefix: "a"
+ , uri: "http://ATTRIBUTE"
+ , value: "value"
+ }
+ ]
+ , [ "opentag"
+ , { name: "parent"
+ , uri: ""
+ , prefix: ""
+ , local: "parent"
+ , attributes:
+ { "a:attr":
+ { name: "a:attr"
+ , local: "attr"
+ , prefix: "a"
+ , uri: "http://ATTRIBUTE"
+ , value: "value"
+ }
+ , "xmlns:a":
+ { name: "xmlns:a"
+ , local: "a"
+ , prefix: "xmlns"
+ , uri: "http://www.w3.org/2000/xmlns/"
+ , value: "http://ATTRIBUTE"
+ }
+ }
+ , ns: {"a": "http://ATTRIBUTE"}
+ }
+ ]
+ , ["closetag", "parent"]
+ , ["closenamespace", { prefix: "a", uri: "http://ATTRIBUTE" }]
+ ]
+
+ // swap the order of elements 2 and 1
+ , ex2 = [ex1[0], ex1[2], ex1[1]].concat(ex1.slice(3))
+ , expected = [ex1, ex2]
+
+xmls.forEach(function (x, i) {
+ t.test({ xml: x
+ , expect: expected[i]
+ , strict: true
+ , opt: { xmlns: true }
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-rebinding.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-rebinding.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-rebinding.js
new file mode 100644
index 0000000..f464876
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-rebinding.js
@@ -0,0 +1,59 @@
+
+require(__dirname).test
+ ( { xml :
+ "<root xmlns:x='x1' xmlns:y='y1' x:a='x1' y:a='y1'>"+
+ "<rebind xmlns:x='x2'>"+
+ "<check x:a='x2' y:a='y1'/>"+
+ "</rebind>"+
+ "<check x:a='x1' y:a='y1'/>"+
+ "</root>"
+
+ , expect :
+ [ [ "opennamespace", { prefix: "x", uri: "x1" } ]
+ , [ "opennamespace", { prefix: "y", uri: "y1" } ]
+ , [ "attribute", { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ]
+ , [ "attribute", { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } ]
+ , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ]
+ , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ]
+ , [ "opentag", { name: "root", uri: "", prefix: "", local: "root",
+ attributes: { "xmlns:x": { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" }
+ , "xmlns:y": { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" }
+ , "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" }
+ , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } },
+ ns: { x: 'x1', y: 'y1' } } ]
+
+ , [ "opennamespace", { prefix: "x", uri: "x2" } ]
+ , [ "attribute", { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ]
+ , [ "opentag", { name: "rebind", uri: "", prefix: "", local: "rebind",
+ attributes: { "xmlns:x": { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } },
+ ns: { x: 'x2' } } ]
+
+ , [ "attribute", { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } ]
+ , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ]
+ , [ "opentag", { name: "check", uri: "", prefix: "", local: "check",
+ attributes: { "x:a": { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" }
+ , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } },
+ ns: { x: 'x2' } } ]
+
+ , [ "closetag", "check" ]
+
+ , [ "closetag", "rebind" ]
+ , [ "closenamespace", { prefix: "x", uri: "x2" } ]
+
+ , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ]
+ , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ]
+ , [ "opentag", { name: "check", uri: "", prefix: "", local: "check",
+ attributes: { "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" }
+ , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } },
+ ns: { x: 'x1', y: 'y1' } } ]
+ , [ "closetag", "check" ]
+
+ , [ "closetag", "root" ]
+ , [ "closenamespace", { prefix: "x", uri: "x1" } ]
+ , [ "closenamespace", { prefix: "y", uri: "y1" } ]
+ ]
+ , strict : true
+ , opt : { xmlns: true }
+ }
+ )
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-strict.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-strict.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-strict.js
new file mode 100644
index 0000000..4ad615b
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-strict.js
@@ -0,0 +1,71 @@
+
+require(__dirname).test
+ ( { xml :
+ "<root>"+
+ "<plain attr='normal'/>"+
+ "<ns1 xmlns='uri:default'>"+
+ "<plain attr='normal'/>"+
+ "</ns1>"+
+ "<ns2 xmlns:a='uri:nsa'>"+
+ "<plain attr='normal'/>"+
+ "<a:ns a:attr='namespaced'/>"+
+ "</ns2>"+
+ "</root>"
+
+ , expect :
+ [ [ "opentag", { name: "root", prefix: "", local: "root", uri: "",
+ attributes: {}, ns: {} } ]
+
+ , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ]
+ , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "",
+ attributes: { "attr": { name: "attr", value: "normal", uri: "", prefix: "", local: "attr", uri: "" } },
+ ns: {} } ]
+ , [ "closetag", "plain" ]
+
+ , [ "opennamespace", { prefix: "", uri: "uri:default" } ]
+
+ , [ "attribute", { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } ]
+ , [ "opentag", { name: "ns1", prefix: "", local: "ns1", uri: "uri:default",
+ attributes: { "xmlns": { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } },
+ ns: { "": "uri:default" } } ]
+
+ , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "uri:default" } ]
+ , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "uri:default", ns: { '': 'uri:default' },
+ attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "uri:default" } } } ]
+ , [ "closetag", "plain" ]
+
+ , [ "closetag", "ns1" ]
+
+ , [ "closenamespace", { prefix: "", uri: "uri:default" } ]
+
+ , [ "opennamespace", { prefix: "a", uri: "uri:nsa" } ]
+
+ , [ "attribute", { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } ]
+
+ , [ "opentag", { name: "ns2", prefix: "", local: "ns2", uri: "",
+ attributes: { "xmlns:a": { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } },
+ ns: { a: "uri:nsa" } } ]
+
+ , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ]
+ , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "",
+ attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } },
+ ns: { a: 'uri:nsa' } } ]
+ , [ "closetag", "plain" ]
+
+ , [ "attribute", { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } ]
+ , [ "opentag", { name: "a:ns", prefix: "a", local: "ns", uri: "uri:nsa",
+ attributes: { "a:attr": { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } },
+ ns: { a: 'uri:nsa' } } ]
+ , [ "closetag", "a:ns" ]
+
+ , [ "closetag", "ns2" ]
+
+ , [ "closenamespace", { prefix: "a", uri: "uri:nsa" } ]
+
+ , [ "closetag", "root" ]
+ ]
+ , strict : true
+ , opt : { xmlns: true }
+ }
+ )
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-unbound.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-unbound.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-unbound.js
new file mode 100644
index 0000000..2944b87
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-unbound.js
@@ -0,0 +1,15 @@
+
+require(__dirname).test(
+ { strict : true
+ , opt : { xmlns: true }
+ , expect :
+ [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"]
+
+ , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ]
+ , [ "opentag", { name: "root", uri: "", prefix: "", local: "root",
+ attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } },
+ ns: {} } ]
+ , [ "closetag", "root" ]
+ ]
+ }
+).write("<root unbound:attr='value'/>")
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js
new file mode 100644
index 0000000..16da771
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js
@@ -0,0 +1,35 @@
+require(__dirname).test(
+ { xml : "<root xml:lang='en'/>"
+ , expect :
+ [ [ "attribute"
+ , { name: "xml:lang"
+ , local: "lang"
+ , prefix: "xml"
+ , uri: "http://www.w3.org/XML/1998/namespace"
+ , value: "en"
+ }
+ ]
+ , [ "opentag"
+ , { name: "root"
+ , uri: ""
+ , prefix: ""
+ , local: "root"
+ , attributes:
+ { "xml:lang":
+ { name: "xml:lang"
+ , local: "lang"
+ , prefix: "xml"
+ , uri: "http://www.w3.org/XML/1998/namespace"
+ , value: "en"
+ }
+ }
+ , ns: {}
+ }
+ ]
+ , ["closetag", "root"]
+ ]
+ , strict : true
+ , opt : { xmlns: true }
+ }
+)
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-prefix.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-prefix.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-prefix.js
new file mode 100644
index 0000000..9a1ce1b
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-prefix.js
@@ -0,0 +1,20 @@
+require(__dirname).test(
+ { xml : "<xml:root/>"
+ , expect :
+ [
+ [ "opentag"
+ , { name: "xml:root"
+ , uri: "http://www.w3.org/XML/1998/namespace"
+ , prefix: "xml"
+ , local: "root"
+ , attributes: {}
+ , ns: {}
+ }
+ ]
+ , ["closetag", "xml:root"]
+ ]
+ , strict : true
+ , opt : { xmlns: true }
+ }
+)
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-redefine.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-redefine.js b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-redefine.js
new file mode 100644
index 0000000..1eba9c7
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/test/xmlns-xml-default-redefine.js
@@ -0,0 +1,40 @@
+require(__dirname).test(
+ { xml : "<xml:root xmlns:xml='ERROR'/>"
+ , expect :
+ [ ["error"
+ , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n"
+ + "Actual: ERROR\n"
+ + "Line: 0\nColumn: 27\nChar: '"
+ ]
+ , [ "attribute"
+ , { name: "xmlns:xml"
+ , local: "xml"
+ , prefix: "xmlns"
+ , uri: "http://www.w3.org/2000/xmlns/"
+ , value: "ERROR"
+ }
+ ]
+ , [ "opentag"
+ , { name: "xml:root"
+ , uri: "http://www.w3.org/XML/1998/namespace"
+ , prefix: "xml"
+ , local: "root"
+ , attributes:
+ { "xmlns:xml":
+ { name: "xmlns:xml"
+ , local: "xml"
+ , prefix: "xmlns"
+ , uri: "http://www.w3.org/2000/xmlns/"
+ , value: "ERROR"
+ }
+ }
+ , ns: {}
+ }
+ ]
+ , ["closetag", "xml:root"]
+ ]
+ , strict : true
+ , opt : { xmlns: true }
+ }
+)
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/package.json b/blackberry10/node_modules/elementtree/package.json
new file mode 100644
index 0000000..5a637e9
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/package.json
@@ -0,0 +1,59 @@
+{
+ "author": {
+ "name": "Rackspace US, Inc."
+ },
+ "contributors": [
+ {
+ "name": "Paul Querna",
+ "email": "paul.querna@rackspace.com"
+ },
+ {
+ "name": "Tomaz Muraus",
+ "email": "tomaz.muraus@rackspace.com"
+ }
+ ],
+ "name": "elementtree",
+ "description": "XML Serialization and Parsing module based on Python's ElementTree.",
+ "version": "0.1.5",
+ "keywords": [
+ "xml",
+ "sax",
+ "parser",
+ "seralization",
+ "elementtree"
+ ],
+ "homepage": "https://github.com/racker/node-elementtree",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/racker/node-elementtree.git"
+ },
+ "main": "lib/elementtree.js",
+ "directories": {
+ "lib": "lib"
+ },
+ "scripts": {
+ "test": "make test"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
+ },
+ "dependencies": {
+ "sax": "0.3.5"
+ },
+ "devDependencies": {
+ "whiskey": "0.6.8"
+ },
+ "licenses": [
+ {
+ "type": "Apache",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+ }
+ ],
+ "readme": "node-elementtree\n====================\n\nnode-elementtree is a [Node.js](http://nodejs.org) XML parser and serializer based upon the [Python ElementTree v1.3](http://effbot.org/zone/element-index.htm) module.\n\nInstallation\n====================\n\n $ npm install elementtree\n \nUsing the library\n====================\n\nFor the usage refer to the Python ElementTree library documentation - [http://effbot.org/zone/element-index.htm#usage](http://effbot.org/zone/element-index.htm#usage).\n\nSupported XPath expressions in `find`, `findall` and `findtext` methods are listed on [http://effbot.org/zone/element-xpath.htm](http://effbot.org/zone/element-xpath.htm).\n\nBuild status\n====================\n\n[](http://travis-ci.org/racker/node-elementtree)\n\n\nLicense\n====================\n\nnode-elementtree is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html).\
n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/racker/node-elementtree/issues"
+ },
+ "_id": "elementtree@0.1.5",
+ "_from": "elementtree@0.1.x"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/tests/data/xml1.xml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/tests/data/xml1.xml b/blackberry10/node_modules/elementtree/tests/data/xml1.xml
new file mode 100644
index 0000000..72c33ae
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/tests/data/xml1.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<container name="test_container_1" xmlns:android="http://schemas.android.com/apk/res/android">
+ <object>dd
+ <name>test_object_1</name>
+ <hash>4281c348eaf83e70ddce0e07221c3d28</hash>
+ <bytes android:type="cool">14</bytes>
+ <content_type>application/octetstream</content_type>
+ <last_modified>2009-02-03T05:26:32.612278</last_modified>
+ </object>
+ <object>
+ <name>test_object_2</name>
+ <hash>b039efe731ad111bc1b0ef221c3849d0</hash>
+ <bytes android:type="lame">64</bytes>
+ <content_type>application/octetstream</content_type>
+ <last_modified>2009-02-03T05:26:32.612278</last_modified>
+ </object>
+</container>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/tests/data/xml2.xml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/tests/data/xml2.xml b/blackberry10/node_modules/elementtree/tests/data/xml2.xml
new file mode 100644
index 0000000..5f94bbd
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/tests/data/xml2.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<object>
+ <title>
+ Hello World
+ </title>
+ <children>
+ <object id="obj1" />
+ <object id="obj2" />
+ <object id="obj3" />
+ </children>
+ <text><![CDATA[
+ Test & Test & Test
+ ]]></text>
+</object>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/tests/test-simple.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/tests/test-simple.js b/blackberry10/node_modules/elementtree/tests/test-simple.js
new file mode 100644
index 0000000..2ab0b7b
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/tests/test-simple.js
@@ -0,0 +1,299 @@
+/**
+ * Copyright 2011 Rackspace
+ *
+ * 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 fs = require('fs');
+var path = require('path');
+
+var sprintf = require('./../lib/sprintf').sprintf;
+var et = require('elementtree');
+var XML = et.XML;
+var ElementTree = et.ElementTree;
+var Element = et.Element;
+var SubElement = et.SubElement;
+var SyntaxError = require('./../lib/errors').SyntaxError;
+
+function readFile(name) {
+ return fs.readFileSync(path.join(__dirname, '/data/', name), 'utf8');
+}
+
+exports['test_simplest'] = function(test, assert) {
+ /* Ported from <https://github.com/lxml/lxml/blob/master/src/lxml/tests/test_elementtree.py> */
+ var Element = et.Element;
+ var root = Element('root');
+ root.append(Element('one'));
+ root.append(Element('two'));
+ root.append(Element('three'));
+ assert.equal(3, root.len());
+ assert.equal('one', root.getItem(0).tag);
+ assert.equal('two', root.getItem(1).tag);
+ assert.equal('three', root.getItem(2).tag);
+ test.finish();
+};
+
+
+exports['test_attribute_values'] = function(test, assert) {
+ var XML = et.XML;
+ var root = XML('<doc alpha="Alpha" beta="Beta" gamma="Gamma"/>');
+ assert.equal('Alpha', root.attrib['alpha']);
+ assert.equal('Beta', root.attrib['beta']);
+ assert.equal('Gamma', root.attrib['gamma']);
+ test.finish();
+};
+
+
+exports['test_findall'] = function(test, assert) {
+ var XML = et.XML;
+ var root = XML('<a><b><c/></b><b/><c><b/></c></a>');
+
+ assert.equal(root.findall("c").length, 1);
+ assert.equal(root.findall(".//c").length, 2);
+ assert.equal(root.findall(".//b").length, 3);
+ assert.equal(root.findall(".//b")[0]._children.length, 1);
+ assert.equal(root.findall(".//b")[1]._children.length, 0);
+ assert.equal(root.findall(".//b")[2]._children.length, 0);
+ assert.deepEqual(root.findall('.//b')[0], root.getchildren()[0]);
+
+ test.finish();
+};
+
+exports['test_find'] = function(test, assert) {
+ var a = Element('a');
+ var b = SubElement(a, 'b');
+ var c = SubElement(a, 'c');
+
+ assert.deepEqual(a.find('./b/..'), a);
+ test.finish();
+};
+
+exports['test_elementtree_find_qname'] = function(test, assert) {
+ var tree = new et.ElementTree(XML('<a><b><c/></b><b/><c><b/></c></a>'));
+ assert.deepEqual(tree.find(new et.QName('c')), tree.getroot()._children[2]);
+ test.finish();
+};
+
+exports['test_attrib_ns_clear'] = function(test, assert) {
+ var attribNS = '{http://foo/bar}x';
+
+ var par = Element('par');
+ par.set(attribNS, 'a');
+ var child = SubElement(par, 'child');
+ child.set(attribNS, 'b');
+
+ assert.equal('a', par.get(attribNS));
+ assert.equal('b', child.get(attribNS));
+
+ par.clear();
+ assert.equal(null, par.get(attribNS));
+ assert.equal('b', child.get(attribNS));
+ test.finish();
+};
+
+exports['test_create_tree_and_parse_simple'] = function(test, assert) {
+ var i = 0;
+ var e = new Element('bar', {});
+ var expected = "<?xml version='1.0' encoding='utf-8'?>\n" +
+ '<bar><blah a="11" /><blah a="12" /><gag a="13" b="abc">ponies</gag></bar>';
+
+ SubElement(e, "blah", {a: 11});
+ SubElement(e, "blah", {a: 12});
+ var se = et.SubElement(e, "gag", {a: '13', b: 'abc'});
+ se.text = 'ponies';
+
+ se.itertext(function(text) {
+ assert.equal(text, 'ponies');
+ i++;
+ });
+
+ assert.equal(i, 1);
+ var etree = new ElementTree(e);
+ var xml = etree.write();
+ assert.equal(xml, expected);
+ test.finish();
+};
+
+exports['test_write_with_options'] = function(test, assert) {
+ var i = 0;
+ var e = new Element('bar', {});
+ var expected1 = "<?xml version='1.0' encoding='utf-8'?>\n" +
+ '<bar>\n' +
+ ' <blah a="11">\n' +
+ ' <baz d="11">test</baz>\n' +
+ ' </blah>\n' +
+ ' <blah a="12" />\n' +
+ ' <gag a="13" b="abc">ponies</gag>\n' +
+ '</bar>\n';
+ var expected2 = "<?xml version='1.0' encoding='utf-8'?>\n" +
+ '<bar>\n' +
+ ' <blah a="11">\n' +
+ ' <baz d="11">test</baz>\n' +
+ ' </blah>\n' +
+ ' <blah a="12" />\n' +
+ ' <gag a="13" b="abc">ponies</gag>\n' +
+ '</bar>\n';
+
+ var expected3 = "<?xml version='1.0' encoding='utf-8'?>\n" +
+ '<object>\n' +
+ ' <title>\n' +
+ ' Hello World\n' +
+ ' </title>\n' +
+ ' <children>\n' +
+ ' <object id="obj1" />\n' +
+ ' <object id="obj2" />\n' +
+ ' <object id="obj3" />\n' +
+ ' </children>\n' +
+ ' <text>\n' +
+ ' Test & Test & Test\n' +
+ ' </text>\n' +
+ '</object>\n';
+
+ var se1 = SubElement(e, "blah", {a: 11});
+ var se2 = SubElement(se1, "baz", {d: 11});
+ se2.text = 'test';
+ SubElement(e, "blah", {a: 12});
+ var se = et.SubElement(e, "gag", {a: '13', b: 'abc'});
+ se.text = 'ponies';
+
+ se.itertext(function(text) {
+ assert.equal(text, 'ponies');
+ i++;
+ });
+
+ assert.equal(i, 1);
+ var etree = new ElementTree(e);
+ var xml1 = etree.write({'indent': 4});
+ var xml2 = etree.write({'indent': 2});
+ assert.equal(xml1, expected1);
+ assert.equal(xml2, expected2);
+
+ var file = readFile('xml2.xml');
+ var etree2 = et.parse(file);
+ var xml3 = etree2.write({'indent': 4});
+ assert.equal(xml3, expected3);
+ test.finish();
+};
+
+exports['test_parse_and_find_2'] = function(test, assert) {
+ var data = readFile('xml1.xml');
+ var etree = et.parse(data);
+
+ assert.equal(etree.findall('./object').length, 2);
+ assert.equal(etree.findall('[@name]').length, 1);
+ assert.equal(etree.findall('[@name="test_container_1"]').length, 1);
+ assert.equal(etree.findall('[@name=\'test_container_1\']').length, 1);
+ assert.equal(etree.findall('./object')[0].findtext('name'), 'test_object_1');
+ assert.equal(etree.findtext('./object/name'), 'test_object_1');
+ assert.equal(etree.findall('.//bytes').length, 2);
+ assert.equal(etree.findall('*/bytes').length, 2);
+ assert.equal(etree.findall('*/foobar').length, 0);
+
+ test.finish();
+};
+
+exports['test_namespaced_attribute'] = function(test, assert) {
+ var data = readFile('xml1.xml');
+ var etree = et.parse(data);
+
+ assert.equal(etree.findall('*/bytes[@android:type="cool"]').length, 1);
+
+ test.finish();
+}
+
+exports['test_syntax_errors'] = function(test, assert) {
+ var expressions = [ './/@bar', '[@bar', '[@foo=bar]', '[@', '/bar' ];
+ var errCount = 0;
+ var data = readFile('xml1.xml');
+ var etree = et.parse(data);
+
+ expressions.forEach(function(expression) {
+ try {
+ etree.findall(expression);
+ }
+ catch (err) {
+ errCount++;
+ }
+ });
+
+ assert.equal(errCount, expressions.length);
+ test.finish();
+};
+
+exports['test_register_namespace'] = function(test, assert){
+ var prefix = 'TESTPREFIX';
+ var namespace = 'http://seriously.unknown/namespace/URI';
+ var errCount = 0;
+
+ var etree = Element(sprintf('{%s}test', namespace));
+ assert.equal(et.tostring(etree, { 'xml_declaration': false}),
+ sprintf('<ns0:test xmlns:ns0="%s" />', namespace));
+
+ et.register_namespace(prefix, namespace);
+ var etree = Element(sprintf('{%s}test', namespace));
+ assert.equal(et.tostring(etree, { 'xml_declaration': false}),
+ sprintf('<%s:test xmlns:%s="%s" />', prefix, prefix, namespace));
+
+ try {
+ et.register_namespace('ns25', namespace);
+ }
+ catch (err) {
+ errCount++;
+ }
+
+ assert.equal(errCount, 1, 'Reserved prefix used, but exception was not thrown');
+ test.finish();
+};
+
+exports['test_tostring'] = function(test, assert) {
+ var a = Element('a');
+ var b = SubElement(a, 'b');
+ var c = SubElement(a, 'c');
+ c.text = 543;
+
+ assert.equal(et.tostring(a, { 'xml_declaration': false }), '<a><b /><c>543</c></a>');
+ assert.equal(et.tostring(c, { 'xml_declaration': false }), '<c>543</c>');
+ test.finish();
+};
+
+exports['test_escape'] = function(test, assert) {
+ var a = Element('a');
+ var b = SubElement(a, 'b');
+ b.text = '&&&&<>"\n\r';
+
+ assert.equal(et.tostring(a, { 'xml_declaration': false }), '<a><b>&&&&<>\"\n\r</b></a>');
+ test.finish();
+};
+
+exports['test_find_null'] = function(test, assert) {
+ var root = Element('root');
+ var node = SubElement(root, 'node');
+ var leaf = SubElement(node, 'leaf');
+ leaf.text = 'ipsum';
+
+ assert.equal(root.find('node/leaf'), leaf);
+ assert.equal(root.find('no-such-node/leaf'), null);
+ test.finish();
+};
+
+exports['test_findtext_null'] = function(test, assert) {
+ var root = Element('root');
+ var node = SubElement(root, 'node');
+ var leaf = SubElement(node, 'leaf');
+ leaf.text = 'ipsum';
+
+ assert.equal(root.findtext('node/leaf'), 'ipsum');
+ assert.equal(root.findtext('no-such-node/leaf'), null);
+ test.finish();
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/.jshintrc
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/.jshintrc b/blackberry10/node_modules/exit/.jshintrc
new file mode 100644
index 0000000..2b7e39b
--- /dev/null
+++ b/blackberry10/node_modules/exit/.jshintrc
@@ -0,0 +1,14 @@
+{
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": "nofunc",
+ "newcap": true,
+ "noarg": true,
+ "sub": true,
+ "undef": true,
+ "unused": true,
+ "boss": true,
+ "eqnull": true,
+ "node": true
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/.npmignore b/blackberry10/node_modules/exit/.npmignore
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/.travis.yml b/blackberry10/node_modules/exit/.travis.yml
new file mode 100644
index 0000000..42d4302
--- /dev/null
+++ b/blackberry10/node_modules/exit/.travis.yml
@@ -0,0 +1,6 @@
+language: node_js
+node_js:
+ - 0.8
+ - '0.10'
+before_script:
+ - npm install -g grunt-cli
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/Gruntfile.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/Gruntfile.js b/blackberry10/node_modules/exit/Gruntfile.js
new file mode 100644
index 0000000..ff37751
--- /dev/null
+++ b/blackberry10/node_modules/exit/Gruntfile.js
@@ -0,0 +1,48 @@
+'use strict';
+
+module.exports = function(grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ nodeunit: {
+ files: ['test/**/*_test.js'],
+ },
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc'
+ },
+ gruntfile: {
+ src: 'Gruntfile.js'
+ },
+ lib: {
+ src: ['lib/**/*.js']
+ },
+ test: {
+ src: ['test/**/*.js']
+ },
+ },
+ watch: {
+ gruntfile: {
+ files: '<%= jshint.gruntfile.src %>',
+ tasks: ['jshint:gruntfile']
+ },
+ lib: {
+ files: '<%= jshint.lib.src %>',
+ tasks: ['jshint:lib', 'nodeunit']
+ },
+ test: {
+ files: '<%= jshint.test.src %>',
+ tasks: ['jshint:test', 'nodeunit']
+ },
+ },
+ });
+
+ // These plugins provide necessary tasks.
+ grunt.loadNpmTasks('grunt-contrib-nodeunit');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-watch');
+
+ // Default task.
+ grunt.registerTask('default', ['jshint', 'nodeunit']);
+
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/LICENSE-MIT
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/LICENSE-MIT b/blackberry10/node_modules/exit/LICENSE-MIT
new file mode 100644
index 0000000..bb2aad6
--- /dev/null
+++ b/blackberry10/node_modules/exit/LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2013 "Cowboy" Ben Alman
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/README.md b/blackberry10/node_modules/exit/README.md
new file mode 100644
index 0000000..a022301
--- /dev/null
+++ b/blackberry10/node_modules/exit/README.md
@@ -0,0 +1,74 @@
+# exit [](http://travis-ci.org/cowboy/node-exit)
+
+A replacement for process.exit that ensures stdio are fully drained before exiting.
+
+To make a long story short, if `process.exit` is called on Windows, script output is often truncated when pipe-redirecting `stdout` or `stderr`. This module attempts to work around this issue by waiting until those streams have been completely drained before actually calling `process.exit`.
+
+See [Node.js issue #3584](https://github.com/joyent/node/issues/3584) for further reference.
+
+Tested in OS X 10.8, Windows 7 on Node.js 0.8.25 and 0.10.18.
+
+Based on some code by [@vladikoff](https://github.com/vladikoff).
+
+## Getting Started
+Install the module with: `npm install exit`
+
+```javascript
+var exit = require('exit');
+
+// These lines should appear in the output, EVEN ON WINDOWS.
+console.log("omg");
+console.error("yay");
+
+// process.exit(5);
+exit(5);
+
+// These lines shouldn't appear in the output.
+console.log("wtf");
+console.error("bro");
+```
+
+## Don't believe me? Try it for yourself.
+
+In Windows, clone the repo and cd to the `test\fixtures` directory. The only difference between [log.js](test/fixtures/log.js) and [log-broken.js](test/fixtures/log-broken.js) is that the former uses `exit` while the latter calls `process.exit` directly.
+
+This test was done using cmd.exe, but you can see the same results using `| grep "std"` in either PowerShell or git-bash.
+
+```
+C:\node-exit\test\fixtures>node log.js 0 10 stdout stderr 2>&1 | find "std"
+stdout 0
+stderr 0
+stdout 1
+stderr 1
+stdout 2
+stderr 2
+stdout 3
+stderr 3
+stdout 4
+stderr 4
+stdout 5
+stderr 5
+stdout 6
+stderr 6
+stdout 7
+stderr 7
+stdout 8
+stderr 8
+stdout 9
+stderr 9
+
+C:\node-exit\test\fixtures>node log-broken.js 0 10 stdout stderr 2>&1 | find "std"
+
+C:\node-exit\test\fixtures>
+```
+
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
+
+## Release History
+2013-09-26 - v0.1.1 - Fixed some bugs. It seems to actually work now!
+2013-09-20 - v0.1.0 - Initial release.
+
+## License
+Copyright (c) 2013 "Cowboy" Ben Alman
+Licensed under the MIT license.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/lib/exit.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/lib/exit.js b/blackberry10/node_modules/exit/lib/exit.js
new file mode 100644
index 0000000..3c411ed
--- /dev/null
+++ b/blackberry10/node_modules/exit/lib/exit.js
@@ -0,0 +1,41 @@
+/*
+ * exit
+ * https://github.com/cowboy/node-exit
+ *
+ * Copyright (c) 2013 "Cowboy" Ben Alman
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+module.exports = function exit(exitCode, streams) {
+ if (!streams) { streams = [process.stdout, process.stderr]; }
+ var drainCount = 0;
+ // Actually exit if all streams are drained.
+ function tryToExit() {
+ if (drainCount === streams.length) {
+ process.exit(exitCode);
+ }
+ }
+ streams.forEach(function(stream) {
+ // Prevent further writing.
+ stream.write = function() {};
+ // Count drained streams now, but monitor non-drained streams.
+ if (stream.bufferSize === 0) {
+ drainCount++;
+ } else {
+ stream.once('drain', function() {
+ drainCount++;
+ tryToExit();
+ });
+ }
+ });
+ // If all streams were already drained, exit now.
+ tryToExit();
+ // In Windows, when run as a Node.js child process, a script utilizing
+ // this library might just exit with a 0 exit code, regardless. This code,
+ // despite the fact that it looks a bit crazy, appears to fix that.
+ process.on('exit', function() {
+ process.exit(exitCode);
+ });
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/package.json b/blackberry10/node_modules/exit/package.json
new file mode 100644
index 0000000..57841ee
--- /dev/null
+++ b/blackberry10/node_modules/exit/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "exit",
+ "description": "A replacement for process.exit that ensures stdio are fully drained before exiting.",
+ "version": "0.1.1",
+ "homepage": "https://github.com/cowboy/node-exit",
+ "author": {
+ "name": "\"Cowboy\" Ben Alman",
+ "url": "http://benalman.com/"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/cowboy/node-exit.git"
+ },
+ "bugs": {
+ "url": "https://github.com/cowboy/node-exit/issues"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/cowboy/node-exit/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "lib/exit",
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "grunt nodeunit"
+ },
+ "devDependencies": {
+ "grunt-contrib-jshint": "~0.6.4",
+ "grunt-contrib-nodeunit": "~0.2.0",
+ "grunt-contrib-watch": "~0.5.3",
+ "grunt": "~0.4.1",
+ "which": "~1.0.5"
+ },
+ "keywords": [
+ "exit",
+ "process",
+ "stdio",
+ "stdout",
+ "stderr",
+ "drain",
+ "flush",
+ "3584"
+ ],
+ "readme": "# exit [](http://travis-ci.org/cowboy/node-exit)\n\nA replacement for process.exit that ensures stdio are fully drained before exiting.\n\nTo make a long story short, if `process.exit` is called on Windows, script output is often truncated when pipe-redirecting `stdout` or `stderr`. This module attempts to work around this issue by waiting until those streams have been completely drained before actually calling `process.exit`.\n\nSee [Node.js issue #3584](https://github.com/joyent/node/issues/3584) for further reference.\n\nTested in OS X 10.8, Windows 7 on Node.js 0.8.25 and 0.10.18.\n\nBased on some code by [@vladikoff](https://github.com/vladikoff).\n\n## Getting Started\nInstall the module with: `npm install exit`\n\n```javascript\nvar exit = require('exit');\n\n// These lines should appear in the output, EVEN ON WINDOWS.\nconsole.log(\"omg\");\nconsole.error(\"yay\");\n\n// process.exit
(5);\nexit(5);\n\n// These lines shouldn't appear in the output.\nconsole.log(\"wtf\");\nconsole.error(\"bro\");\n```\n\n## Don't believe me? Try it for yourself.\n\nIn Windows, clone the repo and cd to the `test\\fixtures` directory. The only difference between [log.js](test/fixtures/log.js) and [log-broken.js](test/fixtures/log-broken.js) is that the former uses `exit` while the latter calls `process.exit` directly.\n\nThis test was done using cmd.exe, but you can see the same results using `| grep \"std\"` in either PowerShell or git-bash.\n\n```\nC:\\node-exit\\test\\fixtures>node log.js 0 10 stdout stderr 2>&1 | find \"std\"\nstdout 0\nstderr 0\nstdout 1\nstderr 1\nstdout 2\nstderr 2\nstdout 3\nstderr 3\nstdout 4\nstderr 4\nstdout 5\nstderr 5\nstdout 6\nstderr 6\nstdout 7\nstderr 7\nstdout 8\nstderr 8\nstdout 9\nstderr 9\n\nC:\\node-exit\\test\\fixtures>node log-broken.js 0 10 stdout stderr 2>&1 | find \"std\"\n\nC:\\node-exit\\test\\fixtures>\n```\n\n## Contributing\nIn lieu o
f a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\n\n## Release History\n2013-09-26 - v0.1.1 - Fixed some bugs. It seems to actually work now! \n2013-09-20 - v0.1.0 - Initial release.\n\n## License\nCopyright (c) 2013 \"Cowboy\" Ben Alman \nLicensed under the MIT license.\n",
+ "readmeFilename": "README.md",
+ "_id": "exit@0.1.1",
+ "dist": {
+ "shasum": "8bf4af1e41fdb092476006764db9f750dfcddc4e"
+ },
+ "_from": "exit@0.1.1",
+ "_resolved": "https://registry.npmjs.org/exit/-/exit-0.1.1.tgz"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/exit_test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/exit_test.js b/blackberry10/node_modules/exit/test/exit_test.js
new file mode 100644
index 0000000..a91afb9
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/exit_test.js
@@ -0,0 +1,121 @@
+'use strict';
+
+/*
+ ======== A Handy Little Nodeunit Reference ========
+ https://github.com/caolan/nodeunit
+
+ Test methods:
+ test.expect(numAssertions)
+ test.done()
+ Test assertions:
+ test.ok(value, [message])
+ test.equal(actual, expected, [message])
+ test.notEqual(actual, expected, [message])
+ test.deepEqual(actual, expected, [message])
+ test.notDeepEqual(actual, expected, [message])
+ test.strictEqual(actual, expected, [message])
+ test.notStrictEqual(actual, expected, [message])
+ test.throws(block, [error], [message])
+ test.doesNotThrow(block, [error], [message])
+ test.ifError(value)
+*/
+
+var fs = require('fs');
+var exec = require('child_process').exec;
+
+var _which = require('which').sync;
+function which(command) {
+ try {
+ _which(command);
+ return command;
+ } catch (err) {
+ return false;
+ }
+}
+
+// Look for grep first (any OS). If not found (but on Windows) look for find,
+// which is Windows' horribly crippled grep alternative.
+var grep = which('grep') || process.platform === 'win32' && which('find');
+
+exports['exit'] = {
+ setUp: function(done) {
+ this.origCwd = process.cwd();
+ process.chdir('test/fixtures');
+ done();
+ },
+ tearDown: function(done) {
+ process.chdir(this.origCwd);
+ done();
+ },
+ 'grep': function(test) {
+ test.expect(1);
+ // Many unit tests depend on this.
+ test.ok(grep, 'A suitable "grep" or "find" program was not found in the PATH.');
+ test.done();
+ },
+ // The rest of the tests are built dynamically, to keep things sane.
+};
+
+// A few helper functions.
+function normalizeLineEndings(s) {
+ return s.replace(/\r?\n/g, '\n');
+}
+
+// Capture command output, normalizing captured stdout to unix file endings.
+function run(command, callback) {
+ exec(command, function(error, stdout) {
+ callback(error ? error.code : 0, normalizeLineEndings(stdout));
+ });
+}
+
+// Read a fixture file, normalizing file contents to unix file endings.
+function fixture(filename) {
+ return normalizeLineEndings(String(fs.readFileSync(filename)));
+}
+
+function buildTests() {
+ // Build individual unit tests for command output.
+ var counts = [10, 100, 1000];
+ var outputs = [' stdout stderr', ' stdout', ' stderr'];
+ var pipes = ['', ' | ' + grep + ' "std"'];
+ counts.forEach(function(count) {
+ outputs.forEach(function(output) {
+ pipes.forEach(function(pipe) {
+ var command = 'node log.js 0 ' + count + output + ' 2>&1' + pipe;
+ exports['exit']['output (' + command + ')'] = function(test) {
+ test.expect(2);
+ run(command, function(code, actual) {
+ var expected = fixture(count + output.replace(/ /g, '-') + '.txt');
+ // Sometimes, the actual file lines are out of order on Windows.
+ // But since the point of this lib is to drain the buffer and not
+ // guarantee output order, we only test the length.
+ test.equal(actual.length, expected.length, 'should be the same length.');
+ // The "fail" lines in log.js should NOT be output!
+ test.ok(actual.indexOf('fail') === -1, 'should not output after exit is called.');
+ test.done();
+ });
+ };
+ });
+ });
+ });
+
+ // Build individual unit tests for exit codes.
+ var codes = [0, 1, 123];
+ codes.forEach(function(code) {
+ var command = 'node log.js ' + code + ' 10 stdout stderr';
+ exports['exit']['exit code (' + command + ')'] = function(test) {
+ test.expect(1);
+ run(command, function(actual) {
+ // The specified exit code should be passed through.
+ test.equal(actual, code, 'should exit with ' + code + ' error code.');
+ test.done();
+ });
+ };
+ });
+}
+
+// Don't bother building tests if grep wasn't found, otherwise everything will
+// fail and the error will get lost.
+if (grep) {
+ buildTests();
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/10-stderr.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/10-stderr.txt b/blackberry10/node_modules/exit/test/fixtures/10-stderr.txt
new file mode 100644
index 0000000..2859200
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/10-stderr.txt
@@ -0,0 +1,10 @@
+stderr 0
+stderr 1
+stderr 2
+stderr 3
+stderr 4
+stderr 5
+stderr 6
+stderr 7
+stderr 8
+stderr 9
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/10-stdout-stderr.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/10-stdout-stderr.txt b/blackberry10/node_modules/exit/test/fixtures/10-stdout-stderr.txt
new file mode 100644
index 0000000..9de8616
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/10-stdout-stderr.txt
@@ -0,0 +1,20 @@
+stdout 0
+stderr 0
+stdout 1
+stdout 2
+stderr 1
+stdout 3
+stderr 2
+stderr 3
+stdout 4
+stderr 4
+stdout 5
+stderr 5
+stdout 6
+stderr 6
+stdout 7
+stderr 7
+stdout 8
+stderr 8
+stdout 9
+stderr 9
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/10-stdout.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/10-stdout.txt b/blackberry10/node_modules/exit/test/fixtures/10-stdout.txt
new file mode 100644
index 0000000..1ce90dc
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/10-stdout.txt
@@ -0,0 +1,10 @@
+stdout 0
+stdout 1
+stdout 2
+stdout 3
+stdout 4
+stdout 5
+stdout 6
+stdout 7
+stdout 8
+stdout 9
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/100-stderr.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/100-stderr.txt b/blackberry10/node_modules/exit/test/fixtures/100-stderr.txt
new file mode 100644
index 0000000..3a78c85
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/100-stderr.txt
@@ -0,0 +1,100 @@
+stderr 0
+stderr 1
+stderr 2
+stderr 3
+stderr 4
+stderr 5
+stderr 6
+stderr 7
+stderr 8
+stderr 9
+stderr 10
+stderr 11
+stderr 12
+stderr 13
+stderr 14
+stderr 15
+stderr 16
+stderr 17
+stderr 18
+stderr 19
+stderr 20
+stderr 21
+stderr 22
+stderr 23
+stderr 24
+stderr 25
+stderr 26
+stderr 27
+stderr 28
+stderr 29
+stderr 30
+stderr 31
+stderr 32
+stderr 33
+stderr 34
+stderr 35
+stderr 36
+stderr 37
+stderr 38
+stderr 39
+stderr 40
+stderr 41
+stderr 42
+stderr 43
+stderr 44
+stderr 45
+stderr 46
+stderr 47
+stderr 48
+stderr 49
+stderr 50
+stderr 51
+stderr 52
+stderr 53
+stderr 54
+stderr 55
+stderr 56
+stderr 57
+stderr 58
+stderr 59
+stderr 60
+stderr 61
+stderr 62
+stderr 63
+stderr 64
+stderr 65
+stderr 66
+stderr 67
+stderr 68
+stderr 69
+stderr 70
+stderr 71
+stderr 72
+stderr 73
+stderr 74
+stderr 75
+stderr 76
+stderr 77
+stderr 78
+stderr 79
+stderr 80
+stderr 81
+stderr 82
+stderr 83
+stderr 84
+stderr 85
+stderr 86
+stderr 87
+stderr 88
+stderr 89
+stderr 90
+stderr 91
+stderr 92
+stderr 93
+stderr 94
+stderr 95
+stderr 96
+stderr 97
+stderr 98
+stderr 99
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/100-stdout-stderr.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/100-stdout-stderr.txt b/blackberry10/node_modules/exit/test/fixtures/100-stdout-stderr.txt
new file mode 100644
index 0000000..65f35f4
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/100-stdout-stderr.txt
@@ -0,0 +1,200 @@
+stdout 0
+stderr 0
+stdout 1
+stderr 1
+stdout 2
+stderr 2
+stdout 3
+stderr 3
+stdout 4
+stderr 4
+stdout 5
+stderr 5
+stdout 6
+stderr 6
+stdout 7
+stderr 7
+stdout 8
+stderr 8
+stdout 9
+stderr 9
+stdout 10
+stderr 10
+stdout 11
+stderr 11
+stdout 12
+stderr 12
+stdout 13
+stderr 13
+stdout 14
+stderr 14
+stdout 15
+stderr 15
+stdout 16
+stderr 16
+stdout 17
+stderr 17
+stdout 18
+stderr 18
+stdout 19
+stderr 19
+stdout 20
+stderr 20
+stdout 21
+stderr 21
+stdout 22
+stderr 22
+stdout 23
+stderr 23
+stdout 24
+stderr 24
+stdout 25
+stderr 25
+stdout 26
+stderr 26
+stdout 27
+stderr 27
+stdout 28
+stderr 28
+stdout 29
+stderr 29
+stdout 30
+stderr 30
+stdout 31
+stderr 31
+stdout 32
+stderr 32
+stdout 33
+stderr 33
+stdout 34
+stderr 34
+stdout 35
+stderr 35
+stdout 36
+stderr 36
+stdout 37
+stderr 37
+stdout 38
+stderr 38
+stdout 39
+stderr 39
+stdout 40
+stderr 40
+stdout 41
+stderr 41
+stdout 42
+stderr 42
+stdout 43
+stderr 43
+stdout 44
+stderr 44
+stdout 45
+stderr 45
+stdout 46
+stderr 46
+stdout 47
+stderr 47
+stdout 48
+stderr 48
+stdout 49
+stderr 49
+stdout 50
+stderr 50
+stdout 51
+stderr 51
+stdout 52
+stderr 52
+stdout 53
+stderr 53
+stdout 54
+stderr 54
+stdout 55
+stderr 55
+stdout 56
+stderr 56
+stdout 57
+stderr 57
+stdout 58
+stderr 58
+stdout 59
+stderr 59
+stdout 60
+stderr 60
+stdout 61
+stderr 61
+stdout 62
+stderr 62
+stdout 63
+stderr 63
+stdout 64
+stderr 64
+stdout 65
+stderr 65
+stdout 66
+stderr 66
+stdout 67
+stderr 67
+stdout 68
+stderr 68
+stdout 69
+stderr 69
+stdout 70
+stderr 70
+stdout 71
+stderr 71
+stdout 72
+stderr 72
+stdout 73
+stderr 73
+stdout 74
+stderr 74
+stdout 75
+stderr 75
+stdout 76
+stderr 76
+stdout 77
+stderr 77
+stdout 78
+stderr 78
+stdout 79
+stderr 79
+stdout 80
+stderr 80
+stdout 81
+stderr 81
+stdout 82
+stderr 82
+stdout 83
+stderr 83
+stdout 84
+stderr 84
+stdout 85
+stderr 85
+stdout 86
+stderr 86
+stdout 87
+stderr 87
+stdout 88
+stderr 88
+stdout 89
+stderr 89
+stdout 90
+stderr 90
+stdout 91
+stderr 91
+stdout 92
+stderr 92
+stdout 93
+stderr 93
+stdout 94
+stderr 94
+stdout 95
+stderr 95
+stdout 96
+stderr 96
+stdout 97
+stderr 97
+stdout 98
+stderr 98
+stdout 99
+stderr 99
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/100-stdout.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/100-stdout.txt b/blackberry10/node_modules/exit/test/fixtures/100-stdout.txt
new file mode 100644
index 0000000..5d9cac2
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/100-stdout.txt
@@ -0,0 +1,100 @@
+stdout 0
+stdout 1
+stdout 2
+stdout 3
+stdout 4
+stdout 5
+stdout 6
+stdout 7
+stdout 8
+stdout 9
+stdout 10
+stdout 11
+stdout 12
+stdout 13
+stdout 14
+stdout 15
+stdout 16
+stdout 17
+stdout 18
+stdout 19
+stdout 20
+stdout 21
+stdout 22
+stdout 23
+stdout 24
+stdout 25
+stdout 26
+stdout 27
+stdout 28
+stdout 29
+stdout 30
+stdout 31
+stdout 32
+stdout 33
+stdout 34
+stdout 35
+stdout 36
+stdout 37
+stdout 38
+stdout 39
+stdout 40
+stdout 41
+stdout 42
+stdout 43
+stdout 44
+stdout 45
+stdout 46
+stdout 47
+stdout 48
+stdout 49
+stdout 50
+stdout 51
+stdout 52
+stdout 53
+stdout 54
+stdout 55
+stdout 56
+stdout 57
+stdout 58
+stdout 59
+stdout 60
+stdout 61
+stdout 62
+stdout 63
+stdout 64
+stdout 65
+stdout 66
+stdout 67
+stdout 68
+stdout 69
+stdout 70
+stdout 71
+stdout 72
+stdout 73
+stdout 74
+stdout 75
+stdout 76
+stdout 77
+stdout 78
+stdout 79
+stdout 80
+stdout 81
+stdout 82
+stdout 83
+stdout 84
+stdout 85
+stdout 86
+stdout 87
+stdout 88
+stdout 89
+stdout 90
+stdout 91
+stdout 92
+stdout 93
+stdout 94
+stdout 95
+stdout 96
+stdout 97
+stdout 98
+stdout 99
[46/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/example.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/example.js b/blackberry10/node_modules/elementtree/node_modules/sax/examples/example.js
new file mode 100644
index 0000000..e7f81e6
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/example.js
@@ -0,0 +1,41 @@
+
+var fs = require("fs"),
+ sys = require("sys"),
+ path = require("path"),
+ xml = fs.cat(path.join(__dirname, "test.xml")),
+ sax = require("../lib/sax"),
+ strict = sax.parser(true),
+ loose = sax.parser(false, {trim:true}),
+ inspector = function (ev) { return function (data) {
+ // sys.error("");
+ // sys.error(ev+": "+sys.inspect(data));
+ // for (var i in data) sys.error(i+ " "+sys.inspect(data[i]));
+ // sys.error(this.line+":"+this.column);
+ }};
+
+xml.addCallback(function (xml) {
+ // strict.write(xml);
+
+ sax.EVENTS.forEach(function (ev) {
+ loose["on"+ev] = inspector(ev);
+ });
+ loose.onend = function () {
+ // sys.error("end");
+ // sys.error(sys.inspect(loose));
+ };
+
+ // do this one char at a time to verify that it works.
+ // (function () {
+ // if (xml) {
+ // loose.write(xml.substr(0,1000));
+ // xml = xml.substr(1000);
+ // process.nextTick(arguments.callee);
+ // } else loose.close();
+ // })();
+
+ for (var i = 0; i < 1000; i ++) {
+ loose.write(xml);
+ loose.close();
+ }
+
+});
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/get-products.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/get-products.js b/blackberry10/node_modules/elementtree/node_modules/sax/examples/get-products.js
new file mode 100644
index 0000000..9e8d74a
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/get-products.js
@@ -0,0 +1,58 @@
+// pull out /GeneralSearchResponse/categories/category/items/product tags
+// the rest we don't care about.
+
+var sax = require("../lib/sax.js")
+var fs = require("fs")
+var path = require("path")
+var xmlFile = path.resolve(__dirname, "shopping.xml")
+var util = require("util")
+var http = require("http")
+
+fs.readFile(xmlFile, function (er, d) {
+ http.createServer(function (req, res) {
+ if (er) throw er
+ var xmlstr = d.toString("utf8")
+
+ var parser = sax.parser(true)
+ var products = []
+ var product = null
+ var currentTag = null
+
+ parser.onclosetag = function (tagName) {
+ if (tagName === "product") {
+ products.push(product)
+ currentTag = product = null
+ return
+ }
+ if (currentTag && currentTag.parent) {
+ var p = currentTag.parent
+ delete currentTag.parent
+ currentTag = p
+ }
+ }
+
+ parser.onopentag = function (tag) {
+ if (tag.name !== "product" && !product) return
+ if (tag.name === "product") {
+ product = tag
+ }
+ tag.parent = currentTag
+ tag.children = []
+ tag.parent && tag.parent.children.push(tag)
+ currentTag = tag
+ }
+
+ parser.ontext = function (text) {
+ if (currentTag) currentTag.children.push(text)
+ }
+
+ parser.onend = function () {
+ var out = util.inspect(products, false, 3, true)
+ res.writeHead(200, {"content-type":"application/json"})
+ res.end("{\"ok\":true}")
+ // res.end(JSON.stringify(products))
+ }
+
+ parser.write(xmlstr).end()
+ }).listen(1337)
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/hello-world.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/hello-world.js b/blackberry10/node_modules/elementtree/node_modules/sax/examples/hello-world.js
new file mode 100644
index 0000000..cbfa518
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/hello-world.js
@@ -0,0 +1,4 @@
+require("http").createServer(function (req, res) {
+ res.writeHead(200, {"content-type":"application/json"})
+ res.end(JSON.stringify({ok: true}))
+}).listen(1337)
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/not-pretty.xml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/not-pretty.xml b/blackberry10/node_modules/elementtree/node_modules/sax/examples/not-pretty.xml
new file mode 100644
index 0000000..9592852
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/not-pretty.xml
@@ -0,0 +1,8 @@
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/pretty-print.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/pretty-print.js b/blackberry10/node_modules/elementtree/node_modules/sax/examples/pretty-print.js
new file mode 100644
index 0000000..cd6aca9
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/pretty-print.js
@@ -0,0 +1,74 @@
+var sax = require("../lib/sax")
+ , printer = sax.createStream(false, {lowercasetags:true, trim:true})
+ , fs = require("fs")
+
+function entity (str) {
+ return str.replace('"', '"')
+}
+
+printer.tabstop = 2
+printer.level = 0
+printer.indent = function () {
+ print("\n")
+ for (var i = this.level; i > 0; i --) {
+ for (var j = this.tabstop; j > 0; j --) {
+ print(" ")
+ }
+ }
+}
+printer.on("opentag", function (tag) {
+ this.indent()
+ this.level ++
+ print("<"+tag.name)
+ for (var i in tag.attributes) {
+ print(" "+i+"=\""+entity(tag.attributes[i])+"\"")
+ }
+ print(">")
+})
+
+printer.on("text", ontext)
+printer.on("doctype", ontext)
+function ontext (text) {
+ this.indent()
+ print(text)
+}
+
+printer.on("closetag", function (tag) {
+ this.level --
+ this.indent()
+ print("</"+tag+">")
+})
+
+printer.on("cdata", function (data) {
+ this.indent()
+ print("<![CDATA["+data+"]]>")
+})
+
+printer.on("comment", function (comment) {
+ this.indent()
+ print("<!--"+comment+"-->")
+})
+
+printer.on("error", function (error) {
+ console.error(error)
+ throw error
+})
+
+if (!process.argv[2]) {
+ throw new Error("Please provide an xml file to prettify\n"+
+ "TODO: read from stdin or take a file")
+}
+var xmlfile = require("path").join(process.cwd(), process.argv[2])
+var fstr = fs.createReadStream(xmlfile, { encoding: "utf8" })
+
+function print (c) {
+ if (!process.stdout.write(c)) {
+ fstr.pause()
+ }
+}
+
+process.stdout.on("drain", function () {
+ fstr.resume()
+})
+
+fstr.pipe(printer)
[50/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/.gitignore
----------------------------------------------------------------------
diff --git a/blackberry10/.gitignore b/blackberry10/.gitignore
index 64194f5..4a3592a 100644
--- a/blackberry10/.gitignore
+++ b/blackberry10/.gitignore
@@ -16,10 +16,8 @@ deliverables/
build/
dist/
-bin/node_modules
bin/templates/project/lib
bin/templates/project/cordova/lib/utils.js
bin/templates/project/cordova/lib/signing-utils.js
example/
-node_modules/
.tmp
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/bin/create
----------------------------------------------------------------------
diff --git a/blackberry10/bin/create b/blackberry10/bin/create
index 3484f81..94c99d3 100755
--- a/blackberry10/bin/create
+++ b/blackberry10/bin/create
@@ -29,19 +29,5 @@ BIN_DIR=$(dirname "$0")
source "$BIN_DIR/init"
CURRENT_DIR=$(pwd)
-NPM_PACKAGE_JSON="$BIN_DIR"/../package.json
-
-#Run npm install every time (even if node_modules folder is present) to cover platform upgrade
-if [ -e "$NPM_PACKAGE_JSON" ]; then
- cd "$BIN_DIR"/..
- #Removed sudo usage so that node modules are not owned by root
- "$CORDOVA_NODE/npm" install
- cd "$CURRENT_DIR"
-
- if ! [ $? -eq 0 ]; then
- echo "NPM install failed. Aborting."
- exit $?
- fi
-fi
"$CORDOVA_NODE/node" "$BIN_DIR"/create.js "$@"
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/bin/create.bat
----------------------------------------------------------------------
diff --git a/blackberry10/bin/create.bat b/blackberry10/bin/create.bat
index f2f3998..348c2a6 100644
--- a/blackberry10/bin/create.bat
+++ b/blackberry10/bin/create.bat
@@ -22,12 +22,5 @@ set "BIN_DIR=%~dp0"
call "%BIN_DIR%init"
if ERRORLEVEL 1 exit /B %ERRORLEVEL%
-if exist "%BIN_DIR%..\package.json" (
- pushd "%BIN_DIR%.."
- call "%CORDOVA_NODE%\npm" install
- if ERRORLEVEL 1 exit /B 1
- popd
-)
-
"%CORDOVA_NODE%\node" "%BIN_DIR%create.js" %*
if ERRORLEVEL 1 exit /B %ERRORLEVEL%
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/bin/init
----------------------------------------------------------------------
diff --git a/blackberry10/bin/init b/blackberry10/bin/init
index 212a85c..6f1ff0c 100755
--- a/blackberry10/bin/init
+++ b/blackberry10/bin/init
@@ -55,20 +55,15 @@ fi
#-------------check reqs---------------#
NODE="$CORDOVA_NODE/node"
-NPM="$CORDOVA_NODE/npm"
JAVA=$(command -v java)
PACKAGER="$CORDOVA_BBTOOLS/blackberry-nativepackager"
DEPLOYER="$CORDOVA_BBTOOLS/blackberry-deploy"
SIGNER="$CORDOVA_BBTOOLS/blackberry-signer"
DEBUGTOKENREQUEST="$CORDOVA_BBTOOLS/blackberry-debugtokenrequest"
-NPM_PACKAGE_JSON="$BIN_DIR"/../package.json
if [ ! -x "$NODE" ]; then
echo node cannot be found on the path. Aborting.
EXIT_CODE=2
-elif [ ! -x "$LOCAL_NODE_BIN" ] && [ ! -x "$NPM" ] && [ -e "$NPM_PACKAGE_JSON" ]; then
- echo npm cannot be found on the path. Aborting.
- EXIT_CODE=2
elif [ ! -x "$JAVA" ]; then
echo java cannot be found on the path. Aborting.
EXIT_CODE=2
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/bin/init.bat
----------------------------------------------------------------------
diff --git a/blackberry10/bin/init.bat b/blackberry10/bin/init.bat
index d7fe0bd..2159066 100644
--- a/blackberry10/bin/init.bat
+++ b/blackberry10/bin/init.bat
@@ -92,12 +92,6 @@ if not exist "%LOCAL_NODE_BINARY%" (
exit /b 2
)
)
-if exist "%~dp0..\package.json" (
- if not exist "%CORDOVA_NODE%\npm" (
- echo npm cannot be found on the path. Aborting.
- exit /b 2
- )
-)
if not defined FOUNDJAVAAT (
echo java cannot be found on the path. Aborting.
exit /b 2
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/.bin/jake
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/.bin/jake b/blackberry10/node_modules/.bin/jake
new file mode 120000
index 0000000..3626745
--- /dev/null
+++ b/blackberry10/node_modules/.bin/jake
@@ -0,0 +1 @@
+../jake/bin/cli.js
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/.bin/jasmine-node
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/.bin/jasmine-node b/blackberry10/node_modules/.bin/jasmine-node
new file mode 120000
index 0000000..a1c6532
--- /dev/null
+++ b/blackberry10/node_modules/.bin/jasmine-node
@@ -0,0 +1 @@
+../jasmine-node/bin/jasmine-node
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/.bin/plugman
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/.bin/plugman b/blackberry10/node_modules/.bin/plugman
new file mode 120000
index 0000000..58f3da5
--- /dev/null
+++ b/blackberry10/node_modules/.bin/plugman
@@ -0,0 +1 @@
+../plugman/main.js
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/.bin/shjs
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/.bin/shjs b/blackberry10/node_modules/.bin/shjs
new file mode 120000
index 0000000..a044997
--- /dev/null
+++ b/blackberry10/node_modules/.bin/shjs
@@ -0,0 +1 @@
+../shelljs/bin/shjs
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/.bin/xlocalize
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/.bin/xlocalize b/blackberry10/node_modules/.bin/xlocalize
new file mode 120000
index 0000000..34f4a5d
--- /dev/null
+++ b/blackberry10/node_modules/.bin/xlocalize
@@ -0,0 +1 @@
+../localize/bin/xlocalize.js
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/async/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/async/LICENSE b/blackberry10/node_modules/async/LICENSE
new file mode 100644
index 0000000..b7f9d50
--- /dev/null
+++ b/blackberry10/node_modules/async/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010 Caolan McMahon
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/async/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/async/README.md b/blackberry10/node_modules/async/README.md
new file mode 100644
index 0000000..9ff1acf
--- /dev/null
+++ b/blackberry10/node_modules/async/README.md
@@ -0,0 +1,1414 @@
+# Async.js
+
+Async is a utility module which provides straight-forward, powerful functions
+for working with asynchronous JavaScript. Although originally designed for
+use with [node.js](http://nodejs.org), it can also be used directly in the
+browser. Also supports [component](https://github.com/component/component).
+
+Async provides around 20 functions that include the usual 'functional'
+suspects (map, reduce, filter, each…) as well as some common patterns
+for asynchronous control flow (parallel, series, waterfall…). All these
+functions assume you follow the node.js convention of providing a single
+callback as the last argument of your async function.
+
+
+## Quick Examples
+
+```javascript
+async.map(['file1','file2','file3'], fs.stat, function(err, results){
+ // results is now an array of stats for each file
+});
+
+async.filter(['file1','file2','file3'], fs.exists, function(results){
+ // results now equals an array of the existing files
+});
+
+async.parallel([
+ function(){ ... },
+ function(){ ... }
+], callback);
+
+async.series([
+ function(){ ... },
+ function(){ ... }
+]);
+```
+
+There are many more functions available so take a look at the docs below for a
+full list. This module aims to be comprehensive, so if you feel anything is
+missing please create a GitHub issue for it.
+
+## Common Pitfalls
+
+### Binding a context to an iterator
+
+This section is really about bind, not about async. If you are wondering how to
+make async execute your iterators in a given context, or are confused as to why
+a method of another library isn't working as an iterator, study this example:
+
+```js
+// Here is a simple object with an (unnecessarily roundabout) squaring method
+var AsyncSquaringLibrary = {
+ squareExponent: 2,
+ square: function(number, callback){
+ var result = Math.pow(number, this.squareExponent);
+ setTimeout(function(){
+ callback(null, result);
+ }, 200);
+ }
+};
+
+async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){
+ // result is [NaN, NaN, NaN]
+ // This fails because the `this.squareExponent` expression in the square
+ // function is not evaluated in the context of AsyncSquaringLibrary, and is
+ // therefore undefined.
+});
+
+async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){
+ // result is [1, 4, 9]
+ // With the help of bind we can attach a context to the iterator before
+ // passing it to async. Now the square function will be executed in its
+ // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`
+ // will be as expected.
+});
+```
+
+## Download
+
+The source is available for download from
+[GitHub](http://github.com/caolan/async).
+Alternatively, you can install using Node Package Manager (npm):
+
+ npm install async
+
+__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed
+
+## In the Browser
+
+So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:
+
+```html
+<script type="text/javascript" src="async.js"></script>
+<script type="text/javascript">
+
+ async.map(data, asyncProcess, function(err, results){
+ alert(results);
+ });
+
+</script>
+```
+
+## Documentation
+
+### Collections
+
+* [each](#each)
+* [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)
+* [doWhilst](#doWhilst)
+* [until](#until)
+* [doUntil](#doUntil)
+* [forever](#forever)
+* [waterfall](#waterfall)
+* [compose](#compose)
+* [applyEach](#applyEach)
+* [queue](#queue)
+* [cargo](#cargo)
+* [auto](#auto)
+* [iterator](#iterator)
+* [apply](#apply)
+* [nextTick](#nextTick)
+* [times](#times)
+* [timesSeries](#timesSeries)
+
+### Utils
+
+* [memoize](#memoize)
+* [unmemoize](#unmemoize)
+* [log](#log)
+* [dir](#dir)
+* [noConflict](#noConflict)
+
+
+## Collections
+
+<a name="forEach" />
+<a name="each" />
+### each(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 each 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(err) which must be called once it has
+ completed. If no error has occured, the callback should be run without
+ arguments or with an explicit null argument.
+* callback(err) - A callback which is called after all the iterator functions
+ have finished, or an error has occurred.
+
+__Example__
+
+```js
+// assuming openFiles is an array of file names and saveFile is a function
+// to save the modified contents of that file:
+
+async.each(openFiles, saveFile, function(err){
+ // if any of the saves produced an error, err would equal that error
+});
+```
+
+---------------------------------------
+
+<a name="forEachSeries" />
+<a name="eachSeries" />
+### eachSeries(arr, iterator, callback)
+
+The same as each 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.
+
+
+---------------------------------------
+
+<a name="forEachLimit" />
+<a name="eachLimit" />
+### eachLimit(arr, limit, iterator, callback)
+
+The same as each only no more than "limit" iterators will be simultaneously
+running at any time.
+
+Note that the items are not processed in batches, so there is no guarantee that
+ the first "limit" iterator functions will complete before any others are
+started.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* limit - The maximum number of iterators to run at any time.
+* iterator(item, callback) - A function to apply to each item in the array.
+ The iterator is passed a callback(err) which must be called once it has
+ completed. If no error has occured, the callback should be run without
+ arguments or with an explicit null argument.
+* callback(err) - A callback which is called after all the iterator functions
+ have finished, or an error has occurred.
+
+__Example__
+
+```js
+// Assume documents is an array of JSON objects and requestApi is a
+// function that interacts with a rate-limited REST api.
+
+async.eachLimit(documents, 20, requestApi, function(err){
+ // if any of the saves produced an error, err would equal that error
+});
+```
+
+---------------------------------------
+
+<a name="map" />
+### 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(err, transformed) 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__
+
+```js
+async.map(['file1','file2','file3'], fs.stat, function(err, results){
+ // results is now an array of stats for each file
+});
+```
+
+---------------------------------------
+
+<a name="mapSeries" />
+### 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.
+
+
+---------------------------------------
+
+<a name="mapLimit" />
+### mapLimit(arr, limit, iterator, callback)
+
+The same as map only no more than "limit" iterators will be simultaneously
+running at any time.
+
+Note that the items are not processed in batches, so there is no guarantee that
+ the first "limit" iterator functions will complete before any others are
+started.
+
+__Arguments__
+
+* arr - An array to iterate over.
+* limit - The maximum number of iterators to run at any time.
+* iterator(item, callback) - A function to apply to each item in the array.
+ The iterator is passed a callback(err, transformed) 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__
+
+```js
+async.map(['file1','file2','file3'], 1, fs.stat, function(err, results){
+ // results is now an array of stats for each file
+});
+```
+
+---------------------------------------
+
+<a name="filter" />
+### 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 fs.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(truthValue) which must be called with a
+ boolean argument once it has completed.
+* callback(results) - A callback which is called after all the iterator
+ functions have finished.
+
+__Example__
+
+```js
+async.filter(['file1','file2','file3'], fs.exists, function(results){
+ // results now equals an array of the existing files
+});
+```
+
+---------------------------------------
+
+<a name="filterSeries" />
+### 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.
+
+---------------------------------------
+
+<a name="reject" />
+### reject(arr, iterator, callback)
+
+The opposite of filter. Removes values that pass an async truth test.
+
+---------------------------------------
+
+<a name="rejectSeries" />
+### rejectSeries(arr, iterator, callback)
+
+The same as reject, only the iterator is applied to each item in the array
+in series.
+
+
+---------------------------------------
+
+<a name="reduce" />
+### 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 it's 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(err, reduction) 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__
+
+```js
+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
+});
+```
+
+---------------------------------------
+
+<a name="reduceRight" />
+### reduceRight(arr, memo, iterator, callback)
+
+__Alias:__ foldr
+
+Same as reduce, only operates on the items in the array in reverse order.
+
+
+---------------------------------------
+
+<a name="detect" />
+### 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(truthValue) which must be called with a
+ boolean argument 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__
+
+```js
+async.detect(['file1','file2','file3'], fs.exists, function(result){
+ // result now equals the first file in the list that exists
+});
+```
+
+---------------------------------------
+
+<a name="detectSeries" />
+### 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.
+
+
+---------------------------------------
+
+<a name="sortBy" />
+### 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(err, sortValue) 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__
+
+```js
+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
+});
+```
+
+---------------------------------------
+
+<a name="some" />
+### 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 fs.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(truthValue) which must be called with a
+ boolean argument 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__
+
+```js
+async.some(['file1','file2','file3'], fs.exists, function(result){
+ // if result is true then at least one of the files exists
+});
+```
+
+---------------------------------------
+
+<a name="every" />
+### 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 fs.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(truthValue) which must be called with a
+ boolean argument 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__
+
+```js
+async.every(['file1','file2','file3'], fs.exists, function(result){
+ // if result is true then every file exists
+});
+```
+
+---------------------------------------
+
+<a name="concat" />
+### 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(err, results) 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__
+
+```js
+async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){
+ // files is now a list of filenames that exist in the 3 directories
+});
+```
+
+---------------------------------------
+
+<a name="concatSeries" />
+### concatSeries(arr, iterator, callback)
+
+Same as async.concat, but executes in series instead of parallel.
+
+
+## Control Flow
+
+<a name="series" />
+### 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(err, result) it must call on completion with an error (which can
+ be null) and an optional result value.
+* callback(err, results) - An optional callback to run once all the functions
+ have completed. This function gets a results array (or object) containing all
+ the result arguments passed to the task callbacks.
+
+__Example__
+
+```js
+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}
+});
+```
+
+---------------------------------------
+
+<a name="parallel" />
+### 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(err, result) it must call on completion with an error (which can
+ be null) and an optional result value.
+* callback(err, results) - An optional callback to run once all the functions
+ have completed. This function gets a results array (or object) containing all
+ the result arguments passed to the task callbacks.
+
+__Example__
+
+```js
+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}
+});
+```
+
+---------------------------------------
+
+<a name="parallel" />
+### parallelLimit(tasks, limit, [callback])
+
+The same as parallel only the tasks are executed in parallel with a maximum of "limit"
+tasks executing at any time.
+
+Note that the tasks are not executed in batches, so there is no guarantee that
+the first "limit" tasks will complete before any others are started.
+
+__Arguments__
+
+* tasks - An array or object containing functions to run, each function is passed
+ a callback(err, result) it must call on completion with an error (which can
+ be null) and an optional result value.
+* limit - The maximum number of tasks to run at any time.
+* callback(err, results) - An optional callback to run once all the functions
+ have completed. This function gets a results array (or object) containing all
+ the result arguments passed to the task callbacks.
+
+---------------------------------------
+
+<a name="whilst" />
+### 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(err) which must be called once it has completed with an
+ optional error argument.
+* callback(err) - A callback which is called after the test fails and repeated
+ execution of fn has stopped.
+
+__Example__
+
+```js
+var count = 0;
+
+async.whilst(
+ function () { return count < 5; },
+ function (callback) {
+ count++;
+ setTimeout(callback, 1000);
+ },
+ function (err) {
+ // 5 seconds have passed
+ }
+);
+```
+
+---------------------------------------
+
+<a name="doWhilst" />
+### doWhilst(fn, test, callback)
+
+The post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.
+
+---------------------------------------
+
+<a name="until" />
+### 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.
+
+---------------------------------------
+
+<a name="doUntil" />
+### doUntil(fn, test, callback)
+
+Like doWhilst except the test is inverted. Note the argument ordering differs from `until`.
+
+---------------------------------------
+
+<a name="forever" />
+### forever(fn, callback)
+
+Calls the asynchronous function 'fn' repeatedly, in series, indefinitely.
+If an error is passed to fn's callback then 'callback' is called with the
+error, otherwise it will never be called.
+
+---------------------------------------
+
+<a name="waterfall" />
+### 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(err, result1, result2, ...) it must call on completion. The first
+ argument is an error (which can be null) and any further arguments will be
+ passed as arguments in order to the next task.
+* 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__
+
+```js
+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'
+});
+```
+
+---------------------------------------
+<a name="compose" />
+### compose(fn1, fn2...)
+
+Creates a function which is a composition of the passed asynchronous
+functions. Each function consumes the return value of the function that
+follows. Composing functions f(), g() and h() would produce the result of
+f(g(h())), only this version uses callbacks to obtain the return values.
+
+Each function is executed with the `this` binding of the composed function.
+
+__Arguments__
+
+* functions... - the asynchronous functions to compose
+
+
+__Example__
+
+```js
+function add1(n, callback) {
+ setTimeout(function () {
+ callback(null, n + 1);
+ }, 10);
+}
+
+function mul3(n, callback) {
+ setTimeout(function () {
+ callback(null, n * 3);
+ }, 10);
+}
+
+var add1mul3 = async.compose(mul3, add1);
+
+add1mul3(4, function (err, result) {
+ // result now equals 15
+});
+```
+
+---------------------------------------
+<a name="applyEach" />
+### applyEach(fns, args..., callback)
+
+Applies the provided arguments to each function in the array, calling the
+callback after all functions have completed. If you only provide the first
+argument then it will return a function which lets you pass in the
+arguments as if it were a single function call.
+
+__Arguments__
+
+* fns - the asynchronous functions to all call with the same arguments
+* args... - any number of separate arguments to pass to the function
+* callback - the final argument should be the callback, called when all
+ functions have completed processing
+
+
+__Example__
+
+```js
+async.applyEach([enableSearch, updateSchema], 'bucket', callback);
+
+// partial application example:
+async.each(
+ buckets,
+ async.applyEach([enableSearch, updateSchema]),
+ callback
+);
+```
+
+---------------------------------------
+
+<a name="applyEachSeries" />
+### applyEachSeries(arr, iterator, callback)
+
+The same as applyEach only the functions are applied in series.
+
+---------------------------------------
+
+<a name="queue" />
+### 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, which must call its callback(err) argument when finished, with an
+ optional error as an argument.
+* 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.
+* unshift(task, [callback]) - add a new task to the front of the queue.
+* 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__
+
+```js
+// 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');
+});
+
+// add some items to the front of the queue
+
+q.unshift({name: 'bar'}, function (err) {
+ console.log('finished processing bar');
+});
+```
+
+---------------------------------------
+
+<a name="cargo" />
+### cargo(worker, [payload])
+
+Creates a cargo object with the specified payload. Tasks added to the
+cargo will be processed altogether (up to the payload limit). If the
+worker is in progress, the task is queued until it is available. Once
+the worker has completed some tasks, each callback of those tasks is called.
+
+__Arguments__
+
+* worker(tasks, callback) - An asynchronous function for processing an array of
+ queued tasks, which must call its callback(err) argument when finished, with
+ an optional error as an argument.
+* payload - An optional integer for determining how many tasks should be
+ processed per round; if omitted, the default is unlimited.
+
+__Cargo objects__
+
+The cargo object returned by this function has the following properties and
+methods:
+
+* length() - a function returning the number of items waiting to be processed.
+* payload - an integer for determining how many tasks should be
+ process per round. This property can be changed after a cargo is created to
+ alter the payload 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__
+
+```js
+// create a cargo object with payload 2
+
+var cargo = async.cargo(function (tasks, callback) {
+ for(var i=0; i<tasks.length; i++){
+ console.log('hello ' + tasks[i].name);
+ }
+ callback();
+}, 2);
+
+
+// add some items
+
+cargo.push({name: 'foo'}, function (err) {
+ console.log('finished processing foo');
+});
+cargo.push({name: 'bar'}, function (err) {
+ console.log('finished processing bar');
+});
+cargo.push({name: 'baz'}, function (err) {
+ console.log('finished processing baz');
+});
+```
+
+---------------------------------------
+
+<a name="auto" />
+### 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.
+
+Note, all functions are called with a results object as a second argument,
+so it is unsafe to pass functions in the tasks object which cannot handle the
+extra argument. For example, this snippet of code:
+
+```js
+async.auto({
+ readData: async.apply(fs.readFile, 'data.txt', 'utf-8');
+}, callback);
+```
+
+will have the effect of calling readFile with the results object as the last
+argument, which will fail:
+
+```js
+fs.readFile('data.txt', 'utf-8', cb, {});
+```
+
+Instead, wrap the call to readFile in a function which does not forward the
+results object:
+
+```js
+async.auto({
+ readData: function(cb, results){
+ fs.readFile('data.txt', 'utf-8', cb);
+ }
+}, callback);
+```
+
+__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
+ function receives two arguments: (1) a callback(err, result) which must be
+ called when finished, passing an error (which can be null) and the result of
+ the function's execution, and (2) a results object, containing the results of
+ the previously executed functions.
+* 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. Results will always be passed
+ but if an error occurred, no other tasks will be performed, and the results
+ object will only contain partial results.
+
+
+__Example__
+
+```js
+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:
+
+```js
+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(err, results){
+ async.series([
+ function(callback){
+ // once there is some data and the directory exists,
+ // write the data to a file in the directory
+ },
+ 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.
+
+
+---------------------------------------
+
+<a name="iterator" />
+### iterator(tasks)
+
+Creates an iterator function which calls the next function in the array,
+returning a continuation to call the next one after that. It's 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.
+
+__Example__
+
+```js
+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'
+```
+
+---------------------------------------
+
+<a name="apply" />
+### 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__
+
+```js
+// 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:
+
+```js
+node> var fn = async.apply(sys.puts, 'one');
+node> fn('two', 'three');
+one
+two
+three
+```
+
+---------------------------------------
+
+<a name="nextTick" />
+### 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 setImmediate(callback)
+if available, otherwise 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__
+
+```js
+var call_order = [];
+async.nextTick(function(){
+ call_order.push('two');
+ // call_order now equals ['one','two']
+});
+call_order.push('one')
+```
+
+<a name="times" />
+### times(n, callback)
+
+Calls the callback n times and accumulates results in the same manner
+you would use with async.map.
+
+__Arguments__
+
+* n - The number of times to run the function.
+* callback - The function to call n times.
+
+__Example__
+
+```js
+// Pretend this is some complicated async factory
+var createUser = function(id, callback) {
+ callback(null, {
+ id: 'user' + id
+ })
+}
+// generate 5 users
+async.times(5, function(n, next){
+ createUser(n, function(err, user) {
+ next(err, user)
+ })
+}, function(err, users) {
+ // we should now have 5 users
+});
+```
+
+<a name="timesSeries" />
+### timesSeries(n, callback)
+
+The same as times 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.
+
+
+## Utils
+
+<a name="memoize" />
+### 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.
+
+The cache of results is exposed as the `memo` property of the function returned
+by `memoize`.
+
+__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__
+
+```js
+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
+});
+```
+
+<a name="unmemoize" />
+### unmemoize(fn)
+
+Undoes a memoized function, reverting it to the original, unmemoized
+form. Comes handy in tests.
+
+__Arguments__
+
+* fn - the memoized function
+
+<a name="log" />
+### 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__
+
+```js
+var hello = function(name, callback){
+ setTimeout(function(){
+ callback(null, 'hello ' + name);
+ }, 1000);
+};
+```
+```js
+node> async.log(hello, 'world');
+'hello world'
+```
+
+---------------------------------------
+
+<a name="dir" />
+### 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__
+
+```js
+var hello = function(name, callback){
+ setTimeout(function(){
+ callback(null, {hello: name});
+ }, 1000);
+};
+```
+```js
+node> async.dir(hello, 'world');
+{hello: 'world'}
+```
+
+---------------------------------------
+
+<a name="noConflict" />
+### noConflict()
+
+Changes the value of async back to its original value, returning a reference to the
+async object.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/async/component.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/async/component.json b/blackberry10/node_modules/async/component.json
new file mode 100644
index 0000000..bbb0115
--- /dev/null
+++ b/blackberry10/node_modules/async/component.json
@@ -0,0 +1,11 @@
+{
+ "name": "async",
+ "repo": "caolan/async",
+ "description": "Higher-order functions and common patterns for asynchronous code",
+ "version": "0.1.23",
+ "keywords": [],
+ "dependencies": {},
+ "development": {},
+ "main": "lib/async.js",
+ "scripts": [ "lib/async.js" ]
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/async/lib/async.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/async/lib/async.js b/blackberry10/node_modules/async/lib/async.js
new file mode 100755
index 0000000..cb6320d
--- /dev/null
+++ b/blackberry10/node_modules/async/lib/async.js
@@ -0,0 +1,955 @@
+/*global setImmediate: false, setTimeout: false, console: false */
+(function () {
+
+ var async = {};
+
+ // global on the server, window in the browser
+ var root, previous_async;
+
+ root = this;
+ if (root != null) {
+ previous_async = root.async;
+ }
+
+ async.noConflict = function () {
+ root.async = previous_async;
+ return async;
+ };
+
+ function only_once(fn) {
+ var called = false;
+ return function() {
+ if (called) throw new Error("Callback was already called.");
+ called = true;
+ fn.apply(root, arguments);
+ }
+ }
+
+ //// cross-browser compatiblity functions ////
+
+ var _each = 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 = [];
+ _each(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);
+ }
+ _each(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)) {
+ if (typeof setImmediate === 'function') {
+ async.nextTick = function (fn) {
+ // not a direct alias for IE10 compatibility
+ setImmediate(fn);
+ };
+ async.setImmediate = async.nextTick;
+ }
+ else {
+ async.nextTick = function (fn) {
+ setTimeout(fn, 0);
+ };
+ async.setImmediate = async.nextTick;
+ }
+ }
+ else {
+ async.nextTick = process.nextTick;
+ if (typeof setImmediate !== 'undefined') {
+ async.setImmediate = setImmediate;
+ }
+ else {
+ async.setImmediate = async.nextTick;
+ }
+ }
+
+ async.each = function (arr, iterator, callback) {
+ callback = callback || function () {};
+ if (!arr.length) {
+ return callback();
+ }
+ var completed = 0;
+ _each(arr, function (x) {
+ iterator(x, only_once(function (err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ completed += 1;
+ if (completed >= arr.length) {
+ callback(null);
+ }
+ }
+ }));
+ });
+ };
+ async.forEach = async.each;
+
+ async.eachSeries = 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.forEachSeries = async.eachSeries;
+
+ async.eachLimit = function (arr, limit, iterator, callback) {
+ var fn = _eachLimit(limit);
+ fn.apply(null, [arr, iterator, callback]);
+ };
+ async.forEachLimit = async.eachLimit;
+
+ var _eachLimit = function (limit) {
+
+ return function (arr, 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.each].concat(args));
+ };
+ };
+ var doParallelLimit = function(limit, fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return fn.apply(null, [_eachLimit(limit)].concat(args));
+ };
+ };
+ var doSeries = function (fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return fn.apply(null, [async.eachSeries].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);
+ async.mapLimit = function (arr, limit, iterator, callback) {
+ return _mapLimit(limit)(arr, iterator, callback);
+ };
+
+ var _mapLimit = function(limit) {
+ return doParallelLimit(limit, _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.eachSeries(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.each(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.each(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 () {
+ _each(listeners.slice(0), function (fn) {
+ fn();
+ });
+ };
+
+ addListener(function () {
+ if (_keys(results).length === keys.length) {
+ callback(null, results);
+ callback = function () {};
+ }
+ });
+
+ _each(keys, function (k) {
+ var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k];
+ var taskCallback = function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ if (err) {
+ var safeResults = {};
+ _each(_keys(results), function(rkey) {
+ safeResults[rkey] = results[rkey];
+ });
+ safeResults[k] = args;
+ callback(err, safeResults);
+ // stop subsequent errors hitting callback multiple times
+ callback = function () {};
+ }
+ else {
+ results[k] = args;
+ async.setImmediate(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.constructor !== Array) {
+ var err = new Error('First argument to waterfall must be an array of functions');
+ return callback(err);
+ }
+ if (!tasks.length) {
+ return callback();
+ }
+ var wrapIterator = function (iterator) {
+ return function (err) {
+ if (err) {
+ callback.apply(null, arguments);
+ 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.setImmediate(function () {
+ iterator.apply(null, args);
+ });
+ }
+ };
+ };
+ wrapIterator(async.iterator(tasks))();
+ };
+
+ var _parallel = function(eachfn, tasks, callback) {
+ callback = callback || function () {};
+ if (tasks.constructor === Array) {
+ eachfn.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 = {};
+ eachfn.each(_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.parallel = function (tasks, callback) {
+ _parallel({ map: async.map, each: async.each }, tasks, callback);
+ };
+
+ async.parallelLimit = function(tasks, limit, callback) {
+ _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback);
+ };
+
+ 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.eachSeries(_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.doWhilst = function (iterator, test, callback) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ if (test()) {
+ async.doWhilst(iterator, test, 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.doUntil = function (iterator, test, callback) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ if (!test()) {
+ async.doUntil(iterator, test, callback);
+ }
+ else {
+ callback();
+ }
+ });
+ };
+
+ async.queue = function (worker, concurrency) {
+ if (concurrency === undefined) {
+ concurrency = 1;
+ }
+ function _insert(q, data, pos, callback) {
+ if(data.constructor !== Array) {
+ data = [data];
+ }
+ _each(data, function(task) {
+ var item = {
+ data: task,
+ callback: typeof callback === 'function' ? callback : null
+ };
+
+ if (pos) {
+ q.tasks.unshift(item);
+ } else {
+ q.tasks.push(item);
+ }
+
+ if (q.saturated && q.tasks.length === concurrency) {
+ q.saturated();
+ }
+ async.setImmediate(q.process);
+ });
+ }
+
+ var workers = 0;
+ var q = {
+ tasks: [],
+ concurrency: concurrency,
+ saturated: null,
+ empty: null,
+ drain: null,
+ push: function (data, callback) {
+ _insert(q, data, false, callback);
+ },
+ unshift: function (data, callback) {
+ _insert(q, data, true, callback);
+ },
+ 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;
+ var next = function () {
+ workers -= 1;
+ if (task.callback) {
+ task.callback.apply(task, arguments);
+ }
+ if (q.drain && q.tasks.length + workers === 0) {
+ q.drain();
+ }
+ q.process();
+ };
+ var cb = only_once(next);
+ worker(task.data, cb);
+ }
+ },
+ length: function () {
+ return q.tasks.length;
+ },
+ running: function () {
+ return workers;
+ }
+ };
+ return q;
+ };
+
+ async.cargo = function (worker, payload) {
+ var working = false,
+ tasks = [];
+
+ var cargo = {
+ tasks: tasks,
+ payload: payload,
+ saturated: null,
+ empty: null,
+ drain: null,
+ push: function (data, callback) {
+ if(data.constructor !== Array) {
+ data = [data];
+ }
+ _each(data, function(task) {
+ tasks.push({
+ data: task,
+ callback: typeof callback === 'function' ? callback : null
+ });
+ if (cargo.saturated && tasks.length === payload) {
+ cargo.saturated();
+ }
+ });
+ async.setImmediate(cargo.process);
+ },
+ process: function process() {
+ if (working) return;
+ if (tasks.length === 0) {
+ if(cargo.drain) cargo.drain();
+ return;
+ }
+
+ var ts = typeof payload === 'number'
+ ? tasks.splice(0, payload)
+ : tasks.splice(0);
+
+ var ds = _map(ts, function (task) {
+ return task.data;
+ });
+
+ if(cargo.empty) cargo.empty();
+ working = true;
+ worker(ds, function () {
+ working = false;
+
+ var args = arguments;
+ _each(ts, function (data) {
+ if (data.callback) {
+ data.callback.apply(null, args);
+ }
+ });
+
+ process();
+ });
+ },
+ length: function () {
+ return tasks.length;
+ },
+ running: function () {
+ return working;
+ }
+ };
+ return cargo;
+ };
+
+ 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]) {
+ _each(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.memo = memo;
+ memoized.unmemoized = fn;
+ return memoized;
+ };
+
+ async.unmemoize = function (fn) {
+ return function () {
+ return (fn.unmemoized || fn).apply(null, arguments);
+ };
+ };
+
+ async.times = function (count, iterator, callback) {
+ var counter = [];
+ for (var i = 0; i < count; i++) {
+ counter.push(i);
+ }
+ return async.map(counter, iterator, callback);
+ };
+
+ async.timesSeries = function (count, iterator, callback) {
+ var counter = [];
+ for (var i = 0; i < count; i++) {
+ counter.push(i);
+ }
+ return async.mapSeries(counter, iterator, callback);
+ };
+
+ async.compose = function (/* functions... */) {
+ var fns = Array.prototype.reverse.call(arguments);
+ return function () {
+ var that = this;
+ var args = Array.prototype.slice.call(arguments);
+ var callback = args.pop();
+ async.reduce(fns, args, function (newargs, fn, cb) {
+ fn.apply(that, newargs.concat([function () {
+ var err = arguments[0];
+ var nextargs = Array.prototype.slice.call(arguments, 1);
+ cb(err, nextargs);
+ }]))
+ },
+ function (err, results) {
+ callback.apply(that, [err].concat(results));
+ });
+ };
+ };
+
+ var _applyEach = function (eachfn, fns /*args...*/) {
+ var go = function () {
+ var that = this;
+ var args = Array.prototype.slice.call(arguments);
+ var callback = args.pop();
+ return eachfn(fns, function (fn, cb) {
+ fn.apply(that, args.concat([cb]));
+ },
+ callback);
+ };
+ if (arguments.length > 2) {
+ var args = Array.prototype.slice.call(arguments, 2);
+ return go.apply(this, args);
+ }
+ else {
+ return go;
+ }
+ };
+ async.applyEach = doParallel(_applyEach);
+ async.applyEachSeries = doSeries(_applyEach);
+
+ async.forever = function (fn, callback) {
+ function next(err) {
+ if (err) {
+ if (callback) {
+ return callback(err);
+ }
+ throw err;
+ }
+ fn(next);
+ }
+ next();
+ };
+
+ // AMD / RequireJS
+ if (typeof define !== 'undefined' && define.amd) {
+ define([], function () {
+ return async;
+ });
+ }
+ // Node.js
+ else if (typeof module !== 'undefined' && module.exports) {
+ module.exports = async;
+ }
+ // included directly via <script> tag
+ else {
+ root.async = async;
+ }
+
+}());
[32/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/index.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/index.js
new file mode 100755
index 0000000..c45520b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/index.js
@@ -0,0 +1,174 @@
+var fs = require('fs');
+var mkdirp = require('mkdirp');
+var util;
+try {
+ util = require('util')
+} catch(e) {
+ util = require('sys')
+}
+
+var path = require('path');
+
+var filename = __dirname + '/jasmine-1.3.1.js';
+var isWindowUndefined = typeof global.window === 'undefined';
+if (isWindowUndefined) {
+ global.window = {
+ setTimeout: setTimeout,
+ clearTimeout: clearTimeout,
+ setInterval: setInterval,
+ clearInterval: clearInterval
+ };
+}
+
+var src = fs.readFileSync(filename);
+// Put jasmine in the global context, this is somewhat like running in a
+// browser where every file will have access to `jasmine`
+var jasmine = require('vm').runInThisContext(src + "\njasmine;", filename);
+
+
+if (isWindowUndefined) {
+ delete global.window;
+}
+require("./async-callback");
+require("jasmine-reporters");
+var nodeReporters = require('./reporter').jasmineNode;
+jasmine.TerminalVerboseReporter = nodeReporters.TerminalVerboseReporter;
+jasmine.TerminalReporter = nodeReporters.TerminalReporter;
+
+
+jasmine.loadHelpersInFolder=function(folder, matcher)
+{
+ // Check to see if the folder is actually a file, if so, back up to the
+ // parent directory and find some helpers
+ folderStats = fs.statSync(folder);
+ if (folderStats.isFile()) {
+ folder = path.dirname(folder);
+ }
+ var helpers = [],
+ helperCollection = require('./spec-collection');
+
+ helperCollection.load([folder], matcher);
+ helpers = helperCollection.getSpecs();
+
+ for (var i = 0, len = helpers.length; i < len; ++i)
+ {
+ var file = helpers[i].path();
+ var helper= require(file.replace(/\.*$/, ""));
+ for (var key in helper)
+ global[key]= helper[key];
+ }
+};
+
+function removeJasmineFrames(text) {
+ var lines = [];
+ text.split(/\n/).forEach(function(line){
+ if (line.indexOf(filename) == -1) {
+ lines.push(line);
+ }
+ });
+ return lines.join('\n');
+}
+
+jasmine.executeSpecsInFolder = function(options){
+ var folders = options['specFolders'];
+ var done = options['onComplete'];
+ var isVerbose = options['isVerbose'];
+ var showColors = options['showColors'];
+ var teamcity = options['teamcity'];
+ var useRequireJs = options['useRequireJs'];
+ var matcher = options['regExpSpec'];
+ var junitreport = options['junitreport'];
+ var includeStackTrace = options['includeStackTrace'];
+
+ // Overwriting it allows us to handle custom async specs
+ it = function(desc, func, timeout) {
+ return jasmine.getEnv().it(desc, func, timeout);
+ }
+ var fileMatcher = matcher || new RegExp(".(js)$", "i"),
+ colors = showColors || false,
+ specs = require('./spec-collection'),
+ jasmineEnv = jasmine.getEnv();
+
+ specs.load(folders, fileMatcher);
+
+ if(junitreport && junitreport.report) {
+ var existsSync = fs.existsSync || path.existsSync;
+ if(!existsSync(junitreport.savePath)) {
+ util.puts('creating junit xml report save path: ' + junitreport.savePath);
+ mkdirp.sync(junitreport.savePath, "0755");
+ }
+ jasmineEnv.addReporter(new jasmine.JUnitXmlReporter(junitreport.savePath,
+ junitreport.consolidate,
+ junitreport.useDotNotation));
+ }
+
+ if(teamcity){
+ jasmineEnv.addReporter(new jasmine.TeamcityReporter());
+ } else if(isVerbose) {
+ jasmineEnv.addReporter(new jasmine.TerminalVerboseReporter({ print: util.print,
+ color: showColors,
+ onComplete: done,
+ stackFilter: removeJasmineFrames}));
+ } else {
+ jasmineEnv.addReporter(new jasmine.TerminalReporter({print: util.print,
+ color: showColors,
+ includeStackTrace: includeStackTrace,
+ onComplete: done,
+ stackFilter: removeJasmineFrames}));
+ }
+
+ if (useRequireJs) {
+ require('./requirejs-runner').executeJsRunner(
+ specs,
+ done,
+ jasmineEnv,
+ typeof useRequireJs === 'string' ? useRequireJs : null
+ );
+ } else {
+ var specsList = specs.getSpecs();
+
+ for (var i = 0, len = specsList.length; i < len; ++i) {
+ var filename = specsList[i];
+ delete require.cache[filename.path()];
+ // Catch exceptions in loading the spec
+ try {
+ require(filename.path().replace(/\.\w+$/, ""));
+ } catch (e) {
+ console.log("Exception loading: " + filename.path());
+ console.log(e);
+ }
+ }
+
+ jasmineEnv.execute();
+ }
+};
+
+function now(){
+ return new Date().getTime();
+}
+
+jasmine.asyncSpecWait = function(){
+ var wait = jasmine.asyncSpecWait;
+ wait.start = now();
+ wait.done = false;
+ (function innerWait(){
+ waits(10);
+ runs(function() {
+ if (wait.start + wait.timeout < now()) {
+ expect('timeout waiting for spec').toBeNull();
+ } else if (wait.done) {
+ wait.done = false;
+ } else {
+ innerWait();
+ }
+ });
+ })();
+};
+jasmine.asyncSpecWait.timeout = 4 * 1000;
+jasmine.asyncSpecDone = function(){
+ jasmine.asyncSpecWait.done = true;
+};
+
+for ( var key in jasmine) {
+ exports[key] = jasmine[key];
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js
new file mode 100644
index 0000000..6b3459b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/jasmine-1.3.1.js
@@ -0,0 +1,2600 @@
+var isCommonJS = typeof window == "undefined" && typeof exports == "object";
+
+/**
+ * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
+ *
+ * @namespace
+ */
+var jasmine = {};
+if (isCommonJS) exports.jasmine = jasmine;
+/**
+ * @private
+ */
+jasmine.unimplementedMethod_ = function() {
+ throw new Error("unimplemented method");
+};
+
+/**
+ * Use <code>jasmine.undefined</code> instead of <code>undefined</code>, since <code>undefined</code> is just
+ * a plain old variable and may be redefined by somebody else.
+ *
+ * @private
+ */
+jasmine.undefined = jasmine.___undefined___;
+
+/**
+ * Show diagnostic messages in the console if set to true
+ *
+ */
+jasmine.VERBOSE = false;
+
+/**
+ * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed.
+ *
+ */
+jasmine.DEFAULT_UPDATE_INTERVAL = 250;
+
+/**
+ * Maximum levels of nesting that will be included when an object is pretty-printed
+ */
+jasmine.MAX_PRETTY_PRINT_DEPTH = 40;
+
+/**
+ * Default timeout interval in milliseconds for waitsFor() blocks.
+ */
+jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;
+
+/**
+ * By default exceptions thrown in the context of a test are caught by jasmine so that it can run the remaining tests in the suite.
+ * Set to false to let the exception bubble up in the browser.
+ *
+ */
+jasmine.CATCH_EXCEPTIONS = true;
+
+jasmine.getGlobal = function() {
+ function getGlobal() {
+ return this;
+ }
+
+ return getGlobal();
+};
+
+/**
+ * Allows for bound functions to be compared. Internal use only.
+ *
+ * @ignore
+ * @private
+ * @param base {Object} bound 'this' for the function
+ * @param name {Function} function to find
+ */
+jasmine.bindOriginal_ = function(base, name) {
+ var original = base[name];
+ if (original.apply) {
+ return function() {
+ return original.apply(base, arguments);
+ };
+ } else {
+ // IE support
+ return jasmine.getGlobal()[name];
+ }
+};
+
+jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout');
+jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout');
+jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval');
+jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval');
+
+jasmine.MessageResult = function(values) {
+ this.type = 'log';
+ this.values = values;
+ this.trace = new Error(); // todo: test better
+};
+
+jasmine.MessageResult.prototype.toString = function() {
+ var text = "";
+ for (var i = 0; i < this.values.length; i++) {
+ if (i > 0) text += " ";
+ if (jasmine.isString_(this.values[i])) {
+ text += this.values[i];
+ } else {
+ text += jasmine.pp(this.values[i]);
+ }
+ }
+ return text;
+};
+
+jasmine.ExpectationResult = function(params) {
+ this.type = 'expect';
+ this.matcherName = params.matcherName;
+ this.passed_ = params.passed;
+ this.expected = params.expected;
+ this.actual = params.actual;
+ this.message = this.passed_ ? 'Passed.' : params.message;
+
+ var trace = (params.trace || new Error(this.message));
+ this.trace = this.passed_ ? '' : trace;
+};
+
+jasmine.ExpectationResult.prototype.toString = function () {
+ return this.message;
+};
+
+jasmine.ExpectationResult.prototype.passed = function () {
+ return this.passed_;
+};
+
+/**
+ * Getter for the Jasmine environment. Ensures one gets created
+ */
+jasmine.getEnv = function() {
+ var env = jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env();
+ return env;
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isArray_ = function(value) {
+ return jasmine.isA_("Array", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isString_ = function(value) {
+ return jasmine.isA_("String", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isNumber_ = function(value) {
+ return jasmine.isA_("Number", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param {String} typeName
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isA_ = function(typeName, value) {
+ return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';
+};
+
+/**
+ * Pretty printer for expecations. Takes any object and turns it into a human-readable string.
+ *
+ * @param value {Object} an object to be outputted
+ * @returns {String}
+ */
+jasmine.pp = function(value) {
+ var stringPrettyPrinter = new jasmine.StringPrettyPrinter();
+ stringPrettyPrinter.format(value);
+ return stringPrettyPrinter.string;
+};
+
+/**
+ * Returns true if the object is a DOM Node.
+ *
+ * @param {Object} obj object to check
+ * @returns {Boolean}
+ */
+jasmine.isDomNode = function(obj) {
+ return obj.nodeType > 0;
+};
+
+/**
+ * Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter.
+ *
+ * @example
+ * // don't care about which function is passed in, as long as it's a function
+ * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function));
+ *
+ * @param {Class} clazz
+ * @returns matchable object of the type clazz
+ */
+jasmine.any = function(clazz) {
+ return new jasmine.Matchers.Any(clazz);
+};
+
+/**
+ * Returns a matchable subset of a JSON object. For use in expectations when you don't care about all of the
+ * attributes on the object.
+ *
+ * @example
+ * // don't care about any other attributes than foo.
+ * expect(mySpy).toHaveBeenCalledWith(jasmine.objectContaining({foo: "bar"});
+ *
+ * @param sample {Object} sample
+ * @returns matchable object for the sample
+ */
+jasmine.objectContaining = function (sample) {
+ return new jasmine.Matchers.ObjectContaining(sample);
+};
+
+/**
+ * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
+ *
+ * Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine
+ * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
+ *
+ * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).
+ *
+ * Spies are torn down at the end of every spec.
+ *
+ * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
+ *
+ * @example
+ * // a stub
+ * var myStub = jasmine.createSpy('myStub'); // can be used anywhere
+ *
+ * // spy example
+ * var foo = {
+ * not: function(bool) { return !bool; }
+ * }
+ *
+ * // actual foo.not will not be called, execution stops
+ * spyOn(foo, 'not');
+
+ // foo.not spied upon, execution will continue to implementation
+ * spyOn(foo, 'not').andCallThrough();
+ *
+ * // fake example
+ * var foo = {
+ * not: function(bool) { return !bool; }
+ * }
+ *
+ * // foo.not(val) will return val
+ * spyOn(foo, 'not').andCallFake(function(value) {return value;});
+ *
+ * // mock example
+ * foo.not(7 == 7);
+ * expect(foo.not).toHaveBeenCalled();
+ * expect(foo.not).toHaveBeenCalledWith(true);
+ *
+ * @constructor
+ * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
+ * @param {String} name
+ */
+jasmine.Spy = function(name) {
+ /**
+ * The name of the spy, if provided.
+ */
+ this.identity = name || 'unknown';
+ /**
+ * Is this Object a spy?
+ */
+ this.isSpy = true;
+ /**
+ * The actual function this spy stubs.
+ */
+ this.plan = function() {
+ };
+ /**
+ * Tracking of the most recent call to the spy.
+ * @example
+ * var mySpy = jasmine.createSpy('foo');
+ * mySpy(1, 2);
+ * mySpy.mostRecentCall.args = [1, 2];
+ */
+ this.mostRecentCall = {};
+
+ /**
+ * Holds arguments for each call to the spy, indexed by call count
+ * @example
+ * var mySpy = jasmine.createSpy('foo');
+ * mySpy(1, 2);
+ * mySpy(7, 8);
+ * mySpy.mostRecentCall.args = [7, 8];
+ * mySpy.argsForCall[0] = [1, 2];
+ * mySpy.argsForCall[1] = [7, 8];
+ */
+ this.argsForCall = [];
+ this.calls = [];
+};
+
+/**
+ * Tells a spy to call through to the actual implemenatation.
+ *
+ * @example
+ * var foo = {
+ * bar: function() { // do some stuff }
+ * }
+ *
+ * // defining a spy on an existing property: foo.bar
+ * spyOn(foo, 'bar').andCallThrough();
+ */
+jasmine.Spy.prototype.andCallThrough = function() {
+ this.plan = this.originalValue;
+ return this;
+};
+
+/**
+ * For setting the return value of a spy.
+ *
+ * @example
+ * // defining a spy from scratch: foo() returns 'baz'
+ * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
+ *
+ * // defining a spy on an existing property: foo.bar() returns 'baz'
+ * spyOn(foo, 'bar').andReturn('baz');
+ *
+ * @param {Object} value
+ */
+jasmine.Spy.prototype.andReturn = function(value) {
+ this.plan = function() {
+ return value;
+ };
+ return this;
+};
+
+/**
+ * For throwing an exception when a spy is called.
+ *
+ * @example
+ * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
+ * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
+ *
+ * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
+ * spyOn(foo, 'bar').andThrow('baz');
+ *
+ * @param {String} exceptionMsg
+ */
+jasmine.Spy.prototype.andThrow = function(exceptionMsg) {
+ this.plan = function() {
+ throw exceptionMsg;
+ };
+ return this;
+};
+
+/**
+ * Calls an alternate implementation when a spy is called.
+ *
+ * @example
+ * var baz = function() {
+ * // do some stuff, return something
+ * }
+ * // defining a spy from scratch: foo() calls the function baz
+ * var foo = jasmine.createSpy('spy on foo').andCall(baz);
+ *
+ * // defining a spy on an existing property: foo.bar() calls an anonymnous function
+ * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
+ *
+ * @param {Function} fakeFunc
+ */
+jasmine.Spy.prototype.andCallFake = function(fakeFunc) {
+ this.plan = fakeFunc;
+ return this;
+};
+
+/**
+ * Resets all of a spy's the tracking variables so that it can be used again.
+ *
+ * @example
+ * spyOn(foo, 'bar');
+ *
+ * foo.bar();
+ *
+ * expect(foo.bar.callCount).toEqual(1);
+ *
+ * foo.bar.reset();
+ *
+ * expect(foo.bar.callCount).toEqual(0);
+ */
+jasmine.Spy.prototype.reset = function() {
+ this.wasCalled = false;
+ this.callCount = 0;
+ this.argsForCall = [];
+ this.calls = [];
+ this.mostRecentCall = {};
+};
+
+jasmine.createSpy = function(name) {
+
+ var spyObj = function() {
+ spyObj.wasCalled = true;
+ spyObj.callCount++;
+ var args = jasmine.util.argsToArray(arguments);
+ spyObj.mostRecentCall.object = this;
+ spyObj.mostRecentCall.args = args;
+ spyObj.argsForCall.push(args);
+ spyObj.calls.push({object: this, args: args});
+ return spyObj.plan.apply(this, arguments);
+ };
+
+ var spy = new jasmine.Spy(name);
+
+ for (var prop in spy) {
+ spyObj[prop] = spy[prop];
+ }
+
+ spyObj.reset();
+
+ return spyObj;
+};
+
+/**
+ * Determines whether an object is a spy.
+ *
+ * @param {jasmine.Spy|Object} putativeSpy
+ * @returns {Boolean}
+ */
+jasmine.isSpy = function(putativeSpy) {
+ return putativeSpy && putativeSpy.isSpy;
+};
+
+/**
+ * Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something
+ * large in one call.
+ *
+ * @param {String} baseName name of spy class
+ * @param {Array} methodNames array of names of methods to make spies
+ */
+jasmine.createSpyObj = function(baseName, methodNames) {
+ if (!jasmine.isArray_(methodNames) || methodNames.length === 0) {
+ throw new Error('createSpyObj requires a non-empty array of method names to create spies for');
+ }
+ var obj = {};
+ for (var i = 0; i < methodNames.length; i++) {
+ obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]);
+ }
+ return obj;
+};
+
+/**
+ * All parameters are pretty-printed and concatenated together, then written to the current spec's output.
+ *
+ * Be careful not to leave calls to <code>jasmine.log</code> in production code.
+ */
+jasmine.log = function() {
+ var spec = jasmine.getEnv().currentSpec;
+ spec.log.apply(spec, arguments);
+};
+
+/**
+ * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy.
+ *
+ * @example
+ * // spy example
+ * var foo = {
+ * not: function(bool) { return !bool; }
+ * }
+ * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
+ *
+ * @see jasmine.createSpy
+ * @param obj
+ * @param methodName
+ * @return {jasmine.Spy} a Jasmine spy that can be chained with all spy methods
+ */
+var spyOn = function(obj, methodName) {
+ return jasmine.getEnv().currentSpec.spyOn(obj, methodName);
+};
+if (isCommonJS) exports.spyOn = spyOn;
+
+/**
+ * Creates a Jasmine spec that will be added to the current suite.
+ *
+ * // TODO: pending tests
+ *
+ * @example
+ * it('should be true', function() {
+ * expect(true).toEqual(true);
+ * });
+ *
+ * @param {String} desc description of this specification
+ * @param {Function} func defines the preconditions and expectations of the spec
+ */
+var it = function(desc, func) {
+ return jasmine.getEnv().it(desc, func);
+};
+if (isCommonJS) exports.it = it;
+
+/**
+ * Creates a <em>disabled</em> Jasmine spec.
+ *
+ * A convenience method that allows existing specs to be disabled temporarily during development.
+ *
+ * @param {String} desc description of this specification
+ * @param {Function} func defines the preconditions and expectations of the spec
+ */
+var xit = function(desc, func) {
+ return jasmine.getEnv().xit(desc, func);
+};
+if (isCommonJS) exports.xit = xit;
+
+/**
+ * Starts a chain for a Jasmine expectation.
+ *
+ * It is passed an Object that is the actual value and should chain to one of the many
+ * jasmine.Matchers functions.
+ *
+ * @param {Object} actual Actual value to test against and expected value
+ * @return {jasmine.Matchers}
+ */
+var expect = function(actual) {
+ return jasmine.getEnv().currentSpec.expect(actual);
+};
+if (isCommonJS) exports.expect = expect;
+
+/**
+ * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.
+ *
+ * @param {Function} func Function that defines part of a jasmine spec.
+ */
+var runs = function(func) {
+ jasmine.getEnv().currentSpec.runs(func);
+};
+if (isCommonJS) exports.runs = runs;
+
+/**
+ * Waits a fixed time period before moving to the next block.
+ *
+ * @deprecated Use waitsFor() instead
+ * @param {Number} timeout milliseconds to wait
+ */
+var waits = function(timeout) {
+ jasmine.getEnv().currentSpec.waits(timeout);
+};
+if (isCommonJS) exports.waits = waits;
+
+/**
+ * Waits for the latchFunction to return true before proceeding to the next block.
+ *
+ * @param {Function} latchFunction
+ * @param {String} optional_timeoutMessage
+ * @param {Number} optional_timeout
+ */
+var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
+ jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments);
+};
+if (isCommonJS) exports.waitsFor = waitsFor;
+
+/**
+ * A function that is called before each spec in a suite.
+ *
+ * Used for spec setup, including validating assumptions.
+ *
+ * @param {Function} beforeEachFunction
+ */
+var beforeEach = function(beforeEachFunction) {
+ jasmine.getEnv().beforeEach(beforeEachFunction);
+};
+if (isCommonJS) exports.beforeEach = beforeEach;
+
+/**
+ * A function that is called after each spec in a suite.
+ *
+ * Used for restoring any state that is hijacked during spec execution.
+ *
+ * @param {Function} afterEachFunction
+ */
+var afterEach = function(afterEachFunction) {
+ jasmine.getEnv().afterEach(afterEachFunction);
+};
+if (isCommonJS) exports.afterEach = afterEach;
+
+/**
+ * Defines a suite of specifications.
+ *
+ * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
+ * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
+ * of setup in some tests.
+ *
+ * @example
+ * // TODO: a simple suite
+ *
+ * // TODO: a simple suite with a nested describe block
+ *
+ * @param {String} description A string, usually the class under test.
+ * @param {Function} specDefinitions function that defines several specs.
+ */
+var describe = function(description, specDefinitions) {
+ return jasmine.getEnv().describe(description, specDefinitions);
+};
+if (isCommonJS) exports.describe = describe;
+
+/**
+ * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.
+ *
+ * @param {String} description A string, usually the class under test.
+ * @param {Function} specDefinitions function that defines several specs.
+ */
+var xdescribe = function(description, specDefinitions) {
+ return jasmine.getEnv().xdescribe(description, specDefinitions);
+};
+if (isCommonJS) exports.xdescribe = xdescribe;
+
+
+// Provide the XMLHttpRequest class for IE 5.x-6.x:
+jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() {
+ function tryIt(f) {
+ try {
+ return f();
+ } catch(e) {
+ }
+ return null;
+ }
+
+ var xhr = tryIt(function() {
+ return new ActiveXObject("Msxml2.XMLHTTP.6.0");
+ }) ||
+ tryIt(function() {
+ return new ActiveXObject("Msxml2.XMLHTTP.3.0");
+ }) ||
+ tryIt(function() {
+ return new ActiveXObject("Msxml2.XMLHTTP");
+ }) ||
+ tryIt(function() {
+ return new ActiveXObject("Microsoft.XMLHTTP");
+ });
+
+ if (!xhr) throw new Error("This browser does not support XMLHttpRequest.");
+
+ return xhr;
+} : XMLHttpRequest;
+/**
+ * @namespace
+ */
+jasmine.util = {};
+
+/**
+ * Declare that a child class inherit it's prototype from the parent class.
+ *
+ * @private
+ * @param {Function} childClass
+ * @param {Function} parentClass
+ */
+jasmine.util.inherit = function(childClass, parentClass) {
+ /**
+ * @private
+ */
+ var subclass = function() {
+ };
+ subclass.prototype = parentClass.prototype;
+ childClass.prototype = new subclass();
+};
+
+jasmine.util.formatException = function(e) {
+ var lineNumber;
+ if (e.line) {
+ lineNumber = e.line;
+ }
+ else if (e.lineNumber) {
+ lineNumber = e.lineNumber;
+ }
+
+ var file;
+
+ if (e.sourceURL) {
+ file = e.sourceURL;
+ }
+ else if (e.fileName) {
+ file = e.fileName;
+ }
+
+ var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
+
+ if (file && lineNumber) {
+ message += ' in ' + file + ' (line ' + lineNumber + ')';
+ }
+
+ return message;
+};
+
+jasmine.util.htmlEscape = function(str) {
+ if (!str) return str;
+ return str.replace(/&/g, '&')
+ .replace(/</g, '<')
+ .replace(/>/g, '>');
+};
+
+jasmine.util.argsToArray = function(args) {
+ var arrayOfArgs = [];
+ for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
+ return arrayOfArgs;
+};
+
+jasmine.util.extend = function(destination, source) {
+ for (var property in source) destination[property] = source[property];
+ return destination;
+};
+
+/**
+ * Environment for Jasmine
+ *
+ * @constructor
+ */
+jasmine.Env = function() {
+ this.currentSpec = null;
+ this.currentSuite = null;
+ this.currentRunner_ = new jasmine.Runner(this);
+
+ this.reporter = new jasmine.MultiReporter();
+
+ this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL;
+ this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL;
+ this.lastUpdate = 0;
+ this.specFilter = function() {
+ return true;
+ };
+
+ this.nextSpecId_ = 0;
+ this.nextSuiteId_ = 0;
+ this.equalityTesters_ = [];
+
+ // wrap matchers
+ this.matchersClass = function() {
+ jasmine.Matchers.apply(this, arguments);
+ };
+ jasmine.util.inherit(this.matchersClass, jasmine.Matchers);
+
+ jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass);
+};
+
+
+jasmine.Env.prototype.setTimeout = jasmine.setTimeout;
+jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
+jasmine.Env.prototype.setInterval = jasmine.setInterval;
+jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
+
+/**
+ * @returns an object containing jasmine version build info, if set.
+ */
+jasmine.Env.prototype.version = function () {
+ if (jasmine.version_) {
+ return jasmine.version_;
+ } else {
+ throw new Error('Version not set');
+ }
+};
+
+/**
+ * @returns string containing jasmine version build info, if set.
+ */
+jasmine.Env.prototype.versionString = function() {
+ if (!jasmine.version_) {
+ return "version unknown";
+ }
+
+ var version = this.version();
+ var versionString = version.major + "." + version.minor + "." + version.build;
+ if (version.release_candidate) {
+ versionString += ".rc" + version.release_candidate;
+ }
+ versionString += " revision " + version.revision;
+ return versionString;
+};
+
+/**
+ * @returns a sequential integer starting at 0
+ */
+jasmine.Env.prototype.nextSpecId = function () {
+ return this.nextSpecId_++;
+};
+
+/**
+ * @returns a sequential integer starting at 0
+ */
+jasmine.Env.prototype.nextSuiteId = function () {
+ return this.nextSuiteId_++;
+};
+
+/**
+ * Register a reporter to receive status updates from Jasmine.
+ * @param {jasmine.Reporter} reporter An object which will receive status updates.
+ */
+jasmine.Env.prototype.addReporter = function(reporter) {
+ this.reporter.addReporter(reporter);
+};
+
+jasmine.Env.prototype.execute = function() {
+ this.currentRunner_.execute();
+};
+
+jasmine.Env.prototype.describe = function(description, specDefinitions) {
+ var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite);
+
+ var parentSuite = this.currentSuite;
+ if (parentSuite) {
+ parentSuite.add(suite);
+ } else {
+ this.currentRunner_.add(suite);
+ }
+
+ this.currentSuite = suite;
+
+ var declarationError = null;
+ try {
+ specDefinitions.call(suite);
+ } catch(e) {
+ declarationError = e;
+ }
+
+ if (declarationError) {
+ this.it("encountered a declaration exception", function() {
+ throw declarationError;
+ });
+ }
+
+ this.currentSuite = parentSuite;
+
+ return suite;
+};
+
+jasmine.Env.prototype.beforeEach = function(beforeEachFunction) {
+ if (this.currentSuite) {
+ this.currentSuite.beforeEach(beforeEachFunction);
+ } else {
+ this.currentRunner_.beforeEach(beforeEachFunction);
+ }
+};
+
+jasmine.Env.prototype.currentRunner = function () {
+ return this.currentRunner_;
+};
+
+jasmine.Env.prototype.afterEach = function(afterEachFunction) {
+ if (this.currentSuite) {
+ this.currentSuite.afterEach(afterEachFunction);
+ } else {
+ this.currentRunner_.afterEach(afterEachFunction);
+ }
+
+};
+
+jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) {
+ return {
+ execute: function() {
+ }
+ };
+};
+
+jasmine.Env.prototype.it = function(description, func) {
+ var spec = new jasmine.Spec(this, this.currentSuite, description);
+ this.currentSuite.add(spec);
+ this.currentSpec = spec;
+
+ if (func) {
+ spec.runs(func);
+ }
+
+ return spec;
+};
+
+jasmine.Env.prototype.xit = function(desc, func) {
+ return {
+ id: this.nextSpecId(),
+ runs: function() {
+ }
+ };
+};
+
+jasmine.Env.prototype.compareRegExps_ = function(a, b, mismatchKeys, mismatchValues) {
+ if (a.source != b.source)
+ mismatchValues.push("expected pattern /" + b.source + "/ is not equal to the pattern /" + a.source + "/");
+
+ if (a.ignoreCase != b.ignoreCase)
+ mismatchValues.push("expected modifier i was" + (b.ignoreCase ? " " : " not ") + "set and does not equal the origin modifier");
+
+ if (a.global != b.global)
+ mismatchValues.push("expected modifier g was" + (b.global ? " " : " not ") + "set and does not equal the origin modifier");
+
+ if (a.multiline != b.multiline)
+ mismatchValues.push("expected modifier m was" + (b.multiline ? " " : " not ") + "set and does not equal the origin modifier");
+
+ if (a.sticky != b.sticky)
+ mismatchValues.push("expected modifier y was" + (b.sticky ? " " : " not ") + "set and does not equal the origin modifier");
+
+ return (mismatchValues.length === 0);
+};
+
+jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
+ if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
+ return true;
+ }
+
+ a.__Jasmine_been_here_before__ = b;
+ b.__Jasmine_been_here_before__ = a;
+
+ var hasKey = function(obj, keyName) {
+ return obj !== null && obj[keyName] !== jasmine.undefined;
+ };
+
+ for (var property in b) {
+ if (!hasKey(a, property) && hasKey(b, property)) {
+ mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
+ }
+ }
+ for (property in a) {
+ if (!hasKey(b, property) && hasKey(a, property)) {
+ mismatchKeys.push("expected missing key '" + property + "', but present in actual.");
+ }
+ }
+ for (property in b) {
+ if (property == '__Jasmine_been_here_before__') continue;
+ if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) {
+ mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual.");
+ }
+ }
+
+ if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) {
+ mismatchValues.push("arrays were not the same length");
+ }
+
+ delete a.__Jasmine_been_here_before__;
+ delete b.__Jasmine_been_here_before__;
+ return (mismatchKeys.length === 0 && mismatchValues.length === 0);
+};
+
+jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
+ mismatchKeys = mismatchKeys || [];
+ mismatchValues = mismatchValues || [];
+
+ for (var i = 0; i < this.equalityTesters_.length; i++) {
+ var equalityTester = this.equalityTesters_[i];
+ var result = equalityTester(a, b, this, mismatchKeys, mismatchValues);
+ if (result !== jasmine.undefined) return result;
+ }
+
+ if (a === b) return true;
+
+ if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) {
+ return (a == jasmine.undefined && b == jasmine.undefined);
+ }
+
+ if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) {
+ return a === b;
+ }
+
+ if (a instanceof Date && b instanceof Date) {
+ return a.getTime() == b.getTime();
+ }
+
+ if (a.jasmineMatches) {
+ return a.jasmineMatches(b);
+ }
+
+ if (b.jasmineMatches) {
+ return b.jasmineMatches(a);
+ }
+
+ if (a instanceof jasmine.Matchers.ObjectContaining) {
+ return a.matches(b);
+ }
+
+ if (b instanceof jasmine.Matchers.ObjectContaining) {
+ return b.matches(a);
+ }
+
+ if (jasmine.isString_(a) && jasmine.isString_(b)) {
+ return (a == b);
+ }
+
+ if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) {
+ return (a == b);
+ }
+
+ if (a instanceof RegExp && b instanceof RegExp) {
+ return this.compareRegExps_(a, b, mismatchKeys, mismatchValues);
+ }
+
+ if (typeof a === "object" && typeof b === "object") {
+ return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
+ }
+
+ //Straight check
+ return (a === b);
+};
+
+jasmine.Env.prototype.contains_ = function(haystack, needle) {
+ if (jasmine.isArray_(haystack)) {
+ for (var i = 0; i < haystack.length; i++) {
+ if (this.equals_(haystack[i], needle)) return true;
+ }
+ return false;
+ }
+ return haystack.indexOf(needle) >= 0;
+};
+
+jasmine.Env.prototype.addEqualityTester = function(equalityTester) {
+ this.equalityTesters_.push(equalityTester);
+};
+/** No-op base class for Jasmine reporters.
+ *
+ * @constructor
+ */
+jasmine.Reporter = function() {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportRunnerStarting = function(runner) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportRunnerResults = function(runner) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSuiteResults = function(suite) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSpecStarting = function(spec) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSpecResults = function(spec) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.log = function(str) {
+};
+
+/**
+ * Blocks are functions with executable code that make up a spec.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {Function} func
+ * @param {jasmine.Spec} spec
+ */
+jasmine.Block = function(env, func, spec) {
+ this.env = env;
+ this.func = func;
+ this.spec = spec;
+};
+
+jasmine.Block.prototype.execute = function(onComplete) {
+ if (!jasmine.CATCH_EXCEPTIONS) {
+ this.func.apply(this.spec);
+ }
+ else {
+ try {
+ this.func.apply(this.spec);
+ } catch (e) {
+ this.spec.fail(e);
+ }
+ }
+ onComplete();
+};
+/** JavaScript API reporter.
+ *
+ * @constructor
+ */
+jasmine.JsApiReporter = function() {
+ this.started = false;
+ this.finished = false;
+ this.suites_ = [];
+ this.results_ = {};
+};
+
+jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) {
+ this.started = true;
+ var suites = runner.topLevelSuites();
+ for (var i = 0; i < suites.length; i++) {
+ var suite = suites[i];
+ this.suites_.push(this.summarize_(suite));
+ }
+};
+
+jasmine.JsApiReporter.prototype.suites = function() {
+ return this.suites_;
+};
+
+jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
+ var isSuite = suiteOrSpec instanceof jasmine.Suite;
+ var summary = {
+ id: suiteOrSpec.id,
+ name: suiteOrSpec.description,
+ type: isSuite ? 'suite' : 'spec',
+ children: []
+ };
+
+ if (isSuite) {
+ var children = suiteOrSpec.children();
+ for (var i = 0; i < children.length; i++) {
+ summary.children.push(this.summarize_(children[i]));
+ }
+ }
+ return summary;
+};
+
+jasmine.JsApiReporter.prototype.results = function() {
+ return this.results_;
+};
+
+jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) {
+ return this.results_[specId];
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) {
+ this.finished = true;
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) {
+ this.results_[spec.id] = {
+ messages: spec.results().getItems(),
+ result: spec.results().failedCount > 0 ? "failed" : "passed"
+ };
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.log = function(str) {
+};
+
+jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){
+ var results = {};
+ for (var i = 0; i < specIds.length; i++) {
+ var specId = specIds[i];
+ results[specId] = this.summarizeResult_(this.results_[specId]);
+ }
+ return results;
+};
+
+jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
+ var summaryMessages = [];
+ var messagesLength = result.messages.length;
+ for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {
+ var resultMessage = result.messages[messageIndex];
+ summaryMessages.push({
+ text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined,
+ passed: resultMessage.passed ? resultMessage.passed() : true,
+ type: resultMessage.type,
+ message: resultMessage.message,
+ trace: {
+ stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined
+ }
+ });
+ }
+
+ return {
+ result : result.result,
+ messages : summaryMessages
+ };
+};
+
+/**
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param actual
+ * @param {jasmine.Spec} spec
+ */
+jasmine.Matchers = function(env, actual, spec, opt_isNot) {
+ this.env = env;
+ this.actual = actual;
+ this.spec = spec;
+ this.isNot = opt_isNot || false;
+ this.reportWasCalled_ = false;
+};
+
+// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
+jasmine.Matchers.pp = function(str) {
+ throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!");
+};
+
+// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw]
+jasmine.Matchers.prototype.report = function(result, failing_message, details) {
+ throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs");
+};
+
+jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {
+ for (var methodName in prototype) {
+ if (methodName == 'report') continue;
+ var orig = prototype[methodName];
+ matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);
+ }
+};
+
+jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
+ return function() {
+ var matcherArgs = jasmine.util.argsToArray(arguments);
+ var result = matcherFunction.apply(this, arguments);
+
+ if (this.isNot) {
+ result = !result;
+ }
+
+ if (this.reportWasCalled_) return result;
+
+ var message;
+ if (!result) {
+ if (this.message) {
+ message = this.message.apply(this, arguments);
+ if (jasmine.isArray_(message)) {
+ message = message[this.isNot ? 1 : 0];
+ }
+ } else {
+ var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });
+ message = "Expected " + jasmine.pp(this.actual) + (this.isNot ? " not " : " ") + englishyPredicate;
+ if (matcherArgs.length > 0) {
+ for (var i = 0; i < matcherArgs.length; i++) {
+ if (i > 0) message += ",";
+ message += " " + jasmine.pp(matcherArgs[i]);
+ }
+ }
+ message += ".";
+ }
+ }
+ var expectationResult = new jasmine.ExpectationResult({
+ matcherName: matcherName,
+ passed: result,
+ expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0],
+ actual: this.actual,
+ message: message
+ });
+ this.spec.addMatcherResult(expectationResult);
+ return jasmine.undefined;
+ };
+};
+
+
+
+
+/**
+ * toBe: compares the actual to the expected using ===
+ * @param expected
+ */
+jasmine.Matchers.prototype.toBe = function(expected) {
+ return this.actual === expected;
+};
+
+/**
+ * toNotBe: compares the actual to the expected using !==
+ * @param expected
+ * @deprecated as of 1.0. Use not.toBe() instead.
+ */
+jasmine.Matchers.prototype.toNotBe = function(expected) {
+ return this.actual !== expected;
+};
+
+/**
+ * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
+ *
+ * @param expected
+ */
+jasmine.Matchers.prototype.toEqual = function(expected) {
+ return this.env.equals_(this.actual, expected);
+};
+
+/**
+ * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
+ * @param expected
+ * @deprecated as of 1.0. Use not.toEqual() instead.
+ */
+jasmine.Matchers.prototype.toNotEqual = function(expected) {
+ return !this.env.equals_(this.actual, expected);
+};
+
+/**
+ * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes
+ * a pattern or a String.
+ *
+ * @param expected
+ */
+jasmine.Matchers.prototype.toMatch = function(expected) {
+ return new RegExp(expected).test(this.actual);
+};
+
+/**
+ * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
+ * @param expected
+ * @deprecated as of 1.0. Use not.toMatch() instead.
+ */
+jasmine.Matchers.prototype.toNotMatch = function(expected) {
+ return !(new RegExp(expected).test(this.actual));
+};
+
+/**
+ * Matcher that compares the actual to jasmine.undefined.
+ */
+jasmine.Matchers.prototype.toBeDefined = function() {
+ return (this.actual !== jasmine.undefined);
+};
+
+/**
+ * Matcher that compares the actual to jasmine.undefined.
+ */
+jasmine.Matchers.prototype.toBeUndefined = function() {
+ return (this.actual === jasmine.undefined);
+};
+
+/**
+ * Matcher that compares the actual to null.
+ */
+jasmine.Matchers.prototype.toBeNull = function() {
+ return (this.actual === null);
+};
+
+/**
+ * Matcher that compares the actual to NaN.
+ */
+jasmine.Matchers.prototype.toBeNaN = function() {
+ this.message = function() {
+ return [ "Expected " + jasmine.pp(this.actual) + " to be NaN." ];
+ };
+
+ return (this.actual !== this.actual);
+};
+
+/**
+ * Matcher that boolean not-nots the actual.
+ */
+jasmine.Matchers.prototype.toBeTruthy = function() {
+ return !!this.actual;
+};
+
+
+/**
+ * Matcher that boolean nots the actual.
+ */
+jasmine.Matchers.prototype.toBeFalsy = function() {
+ return !this.actual;
+};
+
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was called.
+ */
+jasmine.Matchers.prototype.toHaveBeenCalled = function() {
+ if (arguments.length > 0) {
+ throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');
+ }
+
+ if (!jasmine.isSpy(this.actual)) {
+ throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+ }
+
+ this.message = function() {
+ return [
+ "Expected spy " + this.actual.identity + " to have been called.",
+ "Expected spy " + this.actual.identity + " not to have been called."
+ ];
+ };
+
+ return this.actual.wasCalled;
+};
+
+/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */
+jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled;
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was not called.
+ *
+ * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead
+ */
+jasmine.Matchers.prototype.wasNotCalled = function() {
+ if (arguments.length > 0) {
+ throw new Error('wasNotCalled does not take arguments');
+ }
+
+ if (!jasmine.isSpy(this.actual)) {
+ throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+ }
+
+ this.message = function() {
+ return [
+ "Expected spy " + this.actual.identity + " to not have been called.",
+ "Expected spy " + this.actual.identity + " to have been called."
+ ];
+ };
+
+ return !this.actual.wasCalled;
+};
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.
+ *
+ * @example
+ *
+ */
+jasmine.Matchers.prototype.toHaveBeenCalledWith = function() {
+ var expectedArgs = jasmine.util.argsToArray(arguments);
+ if (!jasmine.isSpy(this.actual)) {
+ throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+ }
+ this.message = function() {
+ var invertedMessage = "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but it was.";
+ var positiveMessage = "";
+ if (this.actual.callCount === 0) {
+ positiveMessage = "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but it was never called.";
+ } else {
+ positiveMessage = "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but actual calls were " + jasmine.pp(this.actual.argsForCall).replace(/^\[ | \]$/g, '')
+ }
+ return [positiveMessage, invertedMessage];
+ };
+
+ return this.env.contains_(this.actual.argsForCall, expectedArgs);
+};
+
+/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */
+jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith;
+
+/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */
+jasmine.Matchers.prototype.wasNotCalledWith = function() {
+ var expectedArgs = jasmine.util.argsToArray(arguments);
+ if (!jasmine.isSpy(this.actual)) {
+ throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+ }
+
+ this.message = function() {
+ return [
+ "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was",
+ "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was"
+ ];
+ };
+
+ return !this.env.contains_(this.actual.argsForCall, expectedArgs);
+};
+
+/**
+ * Matcher that checks that the expected item is an element in the actual Array.
+ *
+ * @param {Object} expected
+ */
+jasmine.Matchers.prototype.toContain = function(expected) {
+ return this.env.contains_(this.actual, expected);
+};
+
+/**
+ * Matcher that checks that the expected item is NOT an element in the actual Array.
+ *
+ * @param {Object} expected
+ * @deprecated as of 1.0. Use not.toContain() instead.
+ */
+jasmine.Matchers.prototype.toNotContain = function(expected) {
+ return !this.env.contains_(this.actual, expected);
+};
+
+jasmine.Matchers.prototype.toBeLessThan = function(expected) {
+ return this.actual < expected;
+};
+
+jasmine.Matchers.prototype.toBeGreaterThan = function(expected) {
+ return this.actual > expected;
+};
+
+/**
+ * Matcher that checks that the expected item is equal to the actual item
+ * up to a given level of decimal precision (default 2).
+ *
+ * @param {Number} expected
+ * @param {Number} precision, as number of decimal places
+ */
+jasmine.Matchers.prototype.toBeCloseTo = function(expected, precision) {
+ if (!(precision === 0)) {
+ precision = precision || 2;
+ }
+ return Math.abs(expected - this.actual) < (Math.pow(10, -precision) / 2);
+};
+
+/**
+ * Matcher that checks that the expected exception was thrown by the actual.
+ *
+ * @param {String} [expected]
+ */
+jasmine.Matchers.prototype.toThrow = function(expected) {
+ var result = false;
+ var exception;
+ if (typeof this.actual != 'function') {
+ throw new Error('Actual is not a function');
+ }
+ try {
+ this.actual();
+ } catch (e) {
+ exception = e;
+ }
+ if (exception) {
+ result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected));
+ }
+
+ var not = this.isNot ? "not " : "";
+
+ this.message = function() {
+ if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {
+ return ["Expected function " + not + "to throw", expected ? expected.message || expected : "an exception", ", but it threw", exception.message || exception].join(' ');
+ } else {
+ return "Expected function to throw an exception.";
+ }
+ };
+
+ return result;
+};
+
+jasmine.Matchers.Any = function(expectedClass) {
+ this.expectedClass = expectedClass;
+};
+
+jasmine.Matchers.Any.prototype.jasmineMatches = function(other) {
+ if (this.expectedClass == String) {
+ return typeof other == 'string' || other instanceof String;
+ }
+
+ if (this.expectedClass == Number) {
+ return typeof other == 'number' || other instanceof Number;
+ }
+
+ if (this.expectedClass == Function) {
+ return typeof other == 'function' || other instanceof Function;
+ }
+
+ if (this.expectedClass == Object) {
+ return typeof other == 'object';
+ }
+
+ return other instanceof this.expectedClass;
+};
+
+jasmine.Matchers.Any.prototype.jasmineToString = function() {
+ return '<jasmine.any(' + this.expectedClass + ')>';
+};
+
+jasmine.Matchers.ObjectContaining = function (sample) {
+ this.sample = sample;
+};
+
+jasmine.Matchers.ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) {
+ mismatchKeys = mismatchKeys || [];
+ mismatchValues = mismatchValues || [];
+
+ var env = jasmine.getEnv();
+
+ var hasKey = function(obj, keyName) {
+ return obj != null && obj[keyName] !== jasmine.undefined;
+ };
+
+ for (var property in this.sample) {
+ if (!hasKey(other, property) && hasKey(this.sample, property)) {
+ mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
+ }
+ else if (!env.equals_(this.sample[property], other[property], mismatchKeys, mismatchValues)) {
+ mismatchValues.push("'" + property + "' was '" + (other[property] ? jasmine.util.htmlEscape(other[property].toString()) : other[property]) + "' in expected, but was '" + (this.sample[property] ? jasmine.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in actual.");
+ }
+ }
+
+ return (mismatchKeys.length === 0 && mismatchValues.length === 0);
+};
+
+jasmine.Matchers.ObjectContaining.prototype.jasmineToString = function () {
+ return "<jasmine.objectContaining(" + jasmine.pp(this.sample) + ")>";
+};
+// Mock setTimeout, clearTimeout
+// Contributed by Pivotal Computer Systems, www.pivotalsf.com
+
+jasmine.FakeTimer = function() {
+ this.reset();
+
+ var self = this;
+ self.setTimeout = function(funcToCall, millis) {
+ self.timeoutsMade++;
+ self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);
+ return self.timeoutsMade;
+ };
+
+ self.setInterval = function(funcToCall, millis) {
+ self.timeoutsMade++;
+ self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);
+ return self.timeoutsMade;
+ };
+
+ self.clearTimeout = function(timeoutKey) {
+ self.scheduledFunctions[timeoutKey] = jasmine.undefined;
+ };
+
+ self.clearInterval = function(timeoutKey) {
+ self.scheduledFunctions[timeoutKey] = jasmine.undefined;
+ };
+
+};
+
+jasmine.FakeTimer.prototype.reset = function() {
+ this.timeoutsMade = 0;
+ this.scheduledFunctions = {};
+ this.nowMillis = 0;
+};
+
+jasmine.FakeTimer.prototype.tick = function(millis) {
+ var oldMillis = this.nowMillis;
+ var newMillis = oldMillis + millis;
+ this.runFunctionsWithinRange(oldMillis, newMillis);
+ this.nowMillis = newMillis;
+};
+
+jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
+ var scheduledFunc;
+ var funcsToRun = [];
+ for (var timeoutKey in this.scheduledFunctions) {
+ scheduledFunc = this.scheduledFunctions[timeoutKey];
+ if (scheduledFunc != jasmine.undefined &&
+ scheduledFunc.runAtMillis >= oldMillis &&
+ scheduledFunc.runAtMillis <= nowMillis) {
+ funcsToRun.push(scheduledFunc);
+ this.scheduledFunctions[timeoutKey] = jasmine.undefined;
+ }
+ }
+
+ if (funcsToRun.length > 0) {
+ funcsToRun.sort(function(a, b) {
+ return a.runAtMillis - b.runAtMillis;
+ });
+ for (var i = 0; i < funcsToRun.length; ++i) {
+ try {
+ var funcToRun = funcsToRun[i];
+ this.nowMillis = funcToRun.runAtMillis;
+ funcToRun.funcToCall();
+ if (funcToRun.recurring) {
+ this.scheduleFunction(funcToRun.timeoutKey,
+ funcToRun.funcToCall,
+ funcToRun.millis,
+ true);
+ }
+ } catch(e) {
+ }
+ }
+ this.runFunctionsWithinRange(oldMillis, nowMillis);
+ }
+};
+
+jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {
+ this.scheduledFunctions[timeoutKey] = {
+ runAtMillis: this.nowMillis + millis,
+ funcToCall: funcToCall,
+ recurring: recurring,
+ timeoutKey: timeoutKey,
+ millis: millis
+ };
+};
+
+/**
+ * @namespace
+ */
+jasmine.Clock = {
+ defaultFakeTimer: new jasmine.FakeTimer(),
+
+ reset: function() {
+ jasmine.Clock.assertInstalled();
+ jasmine.Clock.defaultFakeTimer.reset();
+ },
+
+ tick: function(millis) {
+ jasmine.Clock.assertInstalled();
+ jasmine.Clock.defaultFakeTimer.tick(millis);
+ },
+
+ runFunctionsWithinRange: function(oldMillis, nowMillis) {
+ jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis);
+ },
+
+ scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) {
+ jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring);
+ },
+
+ useMock: function() {
+ if (!jasmine.Clock.isInstalled()) {
+ var spec = jasmine.getEnv().currentSpec;
+ spec.after(jasmine.Clock.uninstallMock);
+
+ jasmine.Clock.installMock();
+ }
+ },
+
+ installMock: function() {
+ jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer;
+ },
+
+ uninstallMock: function() {
+ jasmine.Clock.assertInstalled();
+ jasmine.Clock.installed = jasmine.Clock.real;
+ },
+
+ real: {
+ setTimeout: jasmine.getGlobal().setTimeout,
+ clearTimeout: jasmine.getGlobal().clearTimeout,
+ setInterval: jasmine.getGlobal().setInterval,
+ clearInterval: jasmine.getGlobal().clearInterval
+ },
+
+ assertInstalled: function() {
+ if (!jasmine.Clock.isInstalled()) {
+ throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
+ }
+ },
+
+ isInstalled: function() {
+ return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer;
+ },
+
+ installed: null
+};
+jasmine.Clock.installed = jasmine.Clock.real;
+
+//else for IE support
+jasmine.getGlobal().setTimeout = function(funcToCall, millis) {
+ if (jasmine.Clock.installed.setTimeout.apply) {
+ return jasmine.Clock.installed.setTimeout.apply(this, arguments);
+ } else {
+ return jasmine.Clock.installed.setTimeout(funcToCall, millis);
+ }
+};
+
+jasmine.getGlobal().setInterval = function(funcToCall, millis) {
+ if (jasmine.Clock.installed.setInterval.apply) {
+ return jasmine.Clock.installed.setInterval.apply(this, arguments);
+ } else {
+ return jasmine.Clock.installed.setInterval(funcToCall, millis);
+ }
+};
+
+jasmine.getGlobal().clearTimeout = function(timeoutKey) {
+ if (jasmine.Clock.installed.clearTimeout.apply) {
+ return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
+ } else {
+ return jasmine.Clock.installed.clearTimeout(timeoutKey);
+ }
+};
+
+jasmine.getGlobal().clearInterval = function(timeoutKey) {
+ if (jasmine.Clock.installed.clearTimeout.apply) {
+ return jasmine.Clock.installed.clearInterval.apply(this, arguments);
+ } else {
+ return jasmine.Clock.installed.clearInterval(timeoutKey);
+ }
+};
+
+/**
+ * @constructor
+ */
+jasmine.MultiReporter = function() {
+ this.subReporters_ = [];
+};
+jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter);
+
+jasmine.MultiReporter.prototype.addReporter = function(reporter) {
+ this.subReporters_.push(reporter);
+};
+
+(function() {
+ var functionNames = [
+ "reportRunnerStarting",
+ "reportRunnerResults",
+ "reportSuiteResults",
+ "reportSpecStarting",
+ "reportSpecResults",
+ "log"
+ ];
+ for (var i = 0; i < functionNames.length; i++) {
+ var functionName = functionNames[i];
+ jasmine.MultiReporter.prototype[functionName] = (function(functionName) {
+ return function() {
+ for (var j = 0; j < this.subReporters_.length; j++) {
+ var subReporter = this.subReporters_[j];
+ if (subReporter[functionName]) {
+ subReporter[functionName].apply(subReporter, arguments);
+ }
+ }
+ };
+ })(functionName);
+ }
+})();
+/**
+ * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
+ *
+ * @constructor
+ */
+jasmine.NestedResults = function() {
+ /**
+ * The total count of results
+ */
+ this.totalCount = 0;
+ /**
+ * Number of passed results
+ */
+ this.passedCount = 0;
+ /**
+ * Number of failed results
+ */
+ this.failedCount = 0;
+ /**
+ * Was this suite/spec skipped?
+ */
+ this.skipped = false;
+ /**
+ * @ignore
+ */
+ this.items_ = [];
+};
+
+/**
+ * Roll up the result counts.
+ *
+ * @param result
+ */
+jasmine.NestedResults.prototype.rollupCounts = function(result) {
+ this.totalCount += result.totalCount;
+ this.passedCount += result.passedCount;
+ this.failedCount += result.failedCount;
+};
+
+/**
+ * Adds a log message.
+ * @param values Array of message parts which will be concatenated later.
+ */
+jasmine.NestedResults.prototype.log = function(values) {
+ this.items_.push(new jasmine.MessageResult(values));
+};
+
+/**
+ * Getter for the results: message & results.
+ */
+jasmine.NestedResults.prototype.getItems = function() {
+ return this.items_;
+};
+
+/**
+ * Adds a result, tracking counts (total, passed, & failed)
+ * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
+ */
+jasmine.NestedResults.prototype.addResult = function(result) {
+ if (result.type != 'log') {
+ if (result.items_) {
+ this.rollupCounts(result);
+ } else {
+ this.totalCount++;
+ if (result.passed()) {
+ this.passedCount++;
+ } else {
+ this.failedCount++;
+ }
+ }
+ }
+ this.items_.push(result);
+};
+
+/**
+ * @returns {Boolean} True if <b>everything</b> below passed
+ */
+jasmine.NestedResults.prototype.passed = function() {
+ return this.passedCount === this.totalCount;
+};
+/**
+ * Base class for pretty printing for expectation results.
+ */
+jasmine.PrettyPrinter = function() {
+ this.ppNestLevel_ = 0;
+};
+
+/**
+ * Formats a value in a nice, human-readable string.
+ *
+ * @param value
+ */
+jasmine.PrettyPrinter.prototype.format = function(value) {
+ this.ppNestLevel_++;
+ try {
+ if (value === jasmine.undefined) {
+ this.emitScalar('undefined');
+ } else if (value === null) {
+ this.emitScalar('null');
+ } else if (value === jasmine.getGlobal()) {
+ this.emitScalar('<global>');
+ } else if (value.jasmineToString) {
+ this.emitScalar(value.jasmineToString());
+ } else if (typeof value === 'string') {
+ this.emitString(value);
+ } else if (jasmine.isSpy(value)) {
+ this.emitScalar("spy on " + value.identity);
+ } else if (value instanceof RegExp) {
+ this.emitScalar(value.toString());
+ } else if (typeof value === 'function') {
+ this.emitScalar('Function');
+ } else if (typeof value.nodeType === 'number') {
+ this.emitScalar('HTMLNode');
+ } else if (value instanceof Date) {
+ this.emitScalar('Date(' + value + ')');
+ } else if (value.__Jasmine_been_here_before__) {
+ this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');
+ } else if (jasmine.isArray_(value) || typeof value == 'object') {
+ value.__Jasmine_been_here_before__ = true;
+ if (jasmine.isArray_(value)) {
+ this.emitArray(value);
+ } else {
+ this.emitObject(value);
+ }
+ delete value.__Jasmine_been_here_before__;
+ } else {
+ this.emitScalar(value.toString());
+ }
+ } finally {
+ this.ppNestLevel_--;
+ }
+};
+
+jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
+ for (var property in obj) {
+ if (!obj.hasOwnProperty(property)) continue;
+ if (property == '__Jasmine_been_here_before__') continue;
+ fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined &&
+ obj.__lookupGetter__(property) !== null) : false);
+ }
+};
+
+jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_;
+
+jasmine.StringPrettyPrinter = function() {
+ jasmine.PrettyPrinter.call(this);
+
+ this.string = '';
+};
+jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter);
+
+jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) {
+ this.append(value);
+};
+
+jasmine.StringPrettyPrinter.prototype.emitString = function(value) {
+ this.append("'" + value + "'");
+};
+
+jasmine.StringPrettyPrinter.prototype.emitArray = function(array) {
+ if (this.ppNestLevel_ > jasmine.MAX_PRETTY_PRINT_DEPTH) {
+ this.append("Array");
+ return;
+ }
+
+ this.append('[ ');
+ for (var i = 0; i < array.length; i++) {
+ if (i > 0) {
+ this.append(', ');
+ }
+ this.format(array[i]);
+ }
+ this.append(' ]');
+};
+
+jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) {
+ if (this.ppNestLevel_ > jasmine.MAX_PRETTY_PRINT_DEPTH) {
+ this.append("Object");
+ return;
+ }
+
+ var self = this;
+ this.append('{ ');
+ var first = true;
+
+ this.iterateObject(obj, function(property, isGetter) {
+ if (first) {
+ first = false;
+ } else {
+ self.append(', ');
+ }
+
+ self.append(property);
+ self.append(' : ');
+ if (isGetter) {
+ self.append('<getter>');
+ } else {
+ self.format(obj[property]);
+ }
+ });
+
+ this.append(' }');
+};
+
+jasmine.StringPrettyPrinter.prototype.append = function(value) {
+ this.string += value;
+};
+jasmine.Queue = function(env) {
+ this.env = env;
+
+ // parallel to blocks. each true value in this array means the block will
+ // get executed even if we abort
+ this.ensured = [];
+ this.blocks = [];
+ this.running = false;
+ this.index = 0;
+ this.offset = 0;
+ this.abort = false;
+};
+
+jasmine.Queue.prototype.addBefore = function(block, ensure) {
+ if (ensure === jasmine.undefined) {
+ ensure = false;
+ }
+
+ this.blocks.unshift(block);
+ this.ensured.unshift(ensure);
+};
+
+jasmine.Queue.prototype.add = function(block, ensure) {
+ if (ensure === jasmine.undefined) {
+ ensure = false;
+ }
+
+ this.blocks.push(block);
+ this.ensured.push(ensure);
+};
+
+jasmine.Queue.prototype.insertNext = function(block, ensure) {
+ if (ensure === jasmine.undefined) {
+ ensure = false;
+ }
+
+ this.ensured.splice((this.index + this.offset + 1), 0, ensure);
+ this.blocks.splice((this.index + this.offset + 1), 0, block);
+ this.offset++;
+};
+
+jasmine.Queue.prototype.start = function(onComplete) {
+ this.running = true;
+ this.onComplete = onComplete;
+ this.next_();
+};
+
+jasmine.Queue.prototype.isRunning = function() {
+ return this.running;
+};
+
+jasmine.Queue.LOOP_DONT_RECURSE = true;
+
+jasmine.Queue.prototype.next_ = function() {
+ var self = this;
+ var goAgain = true;
+
+ while (goAgain) {
+ goAgain = false;
+
+ if (self.index < self.blocks.length && !(this.abort && !this.ensured[self.index])) {
+ var calledSynchronously = true;
+ var completedSynchronously = false;
+
+ var onComplete = function () {
+ if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {
+ completedSynchronously = true;
+ return;
+ }
+
+ if (self.blocks[self.index].abort) {
+ self.abort = true;
+ }
+
+ self.offset = 0;
+ self.index++;
+
+ var now = new Date().getTime();
+ if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
+ self.env.lastUpdate = now;
+ self.env.setTimeout(function() {
+ self.next_();
+ }, 0);
+ } else {
+ if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {
+ goAgain = true;
+ } else {
+ self.next_();
+ }
+ }
+ };
+ self.blocks[self.index].execute(onComplete);
+
+ calledSynchronously = false;
+ if (completedSynchronously) {
+ onComplete();
+ }
+
+ } else {
+ self.running = false;
+ if (self.onComplete) {
+ self.onComplete();
+ }
+ }
+ }
+};
+
+jasmine.Queue.prototype.results = function() {
+ var results = new jasmine.NestedResults();
+ for (var i = 0; i < this.blocks.length; i++) {
+ if (this.blocks[i].results) {
+ results.addResult(this.blocks[i].results());
+ }
+ }
+ return results;
+};
+
+
+/**
+ * Runner
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ */
+jasmine.Runner = function(env) {
+ var self = this;
+ self.env = env;
+ self.queue = new jasmine.Queue(env);
+ self.before_ = [];
+ self.after_ = [];
+ self.suites_ = [];
+};
+
+jasmine.Runner.prototype.execute = function() {
+ var self = this;
+ if (self.env.reporter.reportRunnerStarting) {
+ self.env.reporter.reportRunnerStarting(this);
+ }
+ self.queue.start(function () {
+ self.finishCallback();
+ });
+};
+
+jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
+ beforeEachFunction.typeName = 'beforeEach';
+ this.before_.splice(0,0,beforeEachFunction);
+};
+
+jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
+ afterEachFunction.typeName = 'afterEach';
+ this.after_.splice(0,0,afterEachFunction);
+};
+
+
+jasmine.Runner.prototype.finishCallback = function() {
+ this.env.reporter.reportRunnerResults(this);
+};
+
+jasmine.Runner.prototype.addSuite = function(suite) {
+ this.suites_.push(suite);
+};
+
+jasmine.Runner.prototype.add = function(block) {
+ if (block instanceof jasmine.Suite) {
+ this.addSuite(block);
+ }
+ this.queue.add(block);
+};
+
+jasmine.Runner.prototype.specs = function () {
+ var suites = this.suites();
+ var specs = [];
+ for (var i = 0; i < suites.length; i++) {
+ specs = specs.concat(suites[i].specs());
+ }
+ return specs;
+};
+
+jasmine.Runner.prototype.suites = function() {
+ return this.suites_;
+};
+
+jasmine.Runner.prototype.topLevelSuites = function() {
+ var topLevelSuites = [];
+ for (var i = 0; i < this.suites_.length; i++) {
+ if (!this.suites_[i].parentSuite) {
+ topLevelSuites.push(this.suites_[i]);
+ }
+ }
+ return topLevelSuites;
+};
+
+jasmine.Runner.prototype.results = function() {
+ return this.queue.results();
+};
+/**
+ * Internal representation of a Jasmine specification, or test.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {jasmine.Suite} suite
+ * @param {String} description
+ */
+jasmine.Spec = function(env, suite, description) {
+ if (!env) {
+ throw new Error('jasmine.Env() required');
+ }
+ if (!suite) {
+ throw new Error('jasmine.Suite() required');
+ }
+ var spec = this;
+ spec.id = env.nextSpecId ? env.nextSpecId() : null;
+ spec.env = env;
+ spec.suite = suite;
+ spec.description = description;
+ spec.queue = new jasmine.Queue(env);
+
+ spec.afterCallbacks = [];
+ spec.spies_ = [];
+
+ spec.results_ = new jasmine.NestedResults();
+ spec.results_.description = description;
+ spec.matchersClass = null;
+};
+
+jasmine.Spec.prototype.getFullName = function() {
+ return this.suite.getFullName() + ' ' + this.description + '.';
+};
+
+
+jasmine.Spec.prototype.results = function() {
+ return this.results_;
+};
+
+/**
+ * All parameters are pretty-printed and concatenated together, then written to the spec's output.
+ *
+ * Be careful not to leave calls to <code>jasmine.log</code> in production code.
+ */
+jasmine.Spec.prototype.log = function() {
+ return this.results_.log(arguments);
+};
+
+jasmine.Spec.prototype.runs = function (func) {
+ var block = new jasmine.Block(this.env, func, this);
+ this.addToQueue(block);
+ return this;
+};
+
+jasmine.Spec.prototype.addToQueue = function (block) {
+ if (this.queue.isRunning()) {
+ this.queue.insertNext(block);
+ } else {
+ this.queue.add(block);
+ }
+};
+
+/**
+ * @param {jasmine.ExpectationResult} result
+ */
+jasmine.Spec.prototype.addMatcherResult = function(result) {
+ this.results_.addResult(result);
+};
+
+jasmine.Spec.prototype.expect = function(actual) {
+ var positive = new (this.getMatchersClass_())(this.env, actual, this);
+ positive.not = new (this.getMatchersClass_())(this.env, actual, this, true);
+ return positive;
+};
+
+/**
+ * Waits a fixed time period before moving to the next block.
+ *
+ * @deprecated Use waitsFor() instead
+ * @param {Number} timeout milliseconds to wait
+ */
+jasmine.Spec.prototype.waits = function(timeout) {
+ var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);
+ this.addToQueue(waitsFunc);
+ return this;
+};
+
+/**
+ * Waits for the latchFunction to return true before proceeding to the next block.
+ *
+ * @param {Function} latchFunction
+ * @param {String} optional_timeoutMessage
+ * @param {Number} optional_timeout
+ */
+jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
+ var latchFunction_ = null;
+ var optional_timeoutMessage_ = null;
+ var optional_timeout_ = null;
+
+ for (var i = 0; i < arguments.length; i++) {
+ var arg = arguments[i];
+ switch (typeof arg) {
+ case 'function':
+ latchFunction_ = arg;
+ break;
+ case 'string':
+ optional_timeoutMessage_ = arg;
+ break;
+ case 'number':
+ optional_timeout_ = arg;
+ break;
+ }
+ }
+
+ var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this);
+ this.addToQueue(waitsForFunc);
+ return this;
+};
+
+jasmine.Spec.prototype.fail = function (e) {
+ var expectationResult = new jasmine.ExpectationResult({
+ passed: false,
+ message: e ? jasmine.util.formatException(e) : 'Exception',
+ trace: { stack: e.stack }
+ });
+ this.results_.addResult(expectationResult);
+};
+
+jasmine.Spec.prototype.getMatchersClass_ = function() {
+ return this.matchersClass || this.env.matchersClass;
+};
+
+jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {
+ var parent = this.getMatchersClass_();
+ var newMatchersClass = function() {
+ parent.apply(this, arguments);
+ };
+ jasmine.util.inherit(newMatchersClass, parent);
+ jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass);
+ this.matchersClass = newMatchersClass;
+};
+
+jasmine.Spec.prototype.finishCallback = function() {
+ this.env.reporter.reportSpecResults(this);
+};
+
+jasmine.Spec.prototype.finish = function(onComplete) {
+ this.removeAllSpies();
+ this.finishCallback();
+ if (onComplete) {
+ onComplete();
+ }
+};
+
+jasmine.Spec.prototype.after = function(doAfter) {
+ if (this.queue.isRunning()) {
+ this.queue.add(new jasmine.Block(this.env, doAfter, this), true);
+ } else {
+ this.afterCallbacks.unshift(doAfter);
+ }
+};
+
+jasmine.Spec.prototype.execute = function(onComplete) {
+ var spec = this;
+ if (!spec.env.specFilter(spec)) {
+ spec.results_.skipped = true;
+ spec.finish(onComplete);
+ return;
+ }
+
+ this.env.reporter.reportSpecStarting(this);
+
+ spec.env.currentSpec = spec;
+
+ spec.addBeforesAndAftersToQueue();
+
+ spec.queue.start(function () {
+ spec.finish(onComplete);
+ });
+};
+
+jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {
+ var runner = this.env.currentRunner();
+ var i;
+
+ for (var suite = this.suite; suite; suite = suite.parentSuite) {
+ for (i = 0; i < suite.before_.length; i++) {
+ this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));
+ }
+ }
+ for (i = 0; i < runner.before_.length; i++) {
+ this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));
+ }
+ for (i = 0; i < this.afterCallbacks.length; i++) {
+ this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this), true);
+ }
+ for (suite = this.suite; suite; suite = suite.parentSuite) {
+ for (i = 0; i < suite.after_.length; i++) {
+ this.queue.add(new jasmine.Block(this.env, suite.after_[i], this), true);
+ }
+ }
+ for (i = 0; i < runner.after_.length; i++) {
+ this.queue.add(new jasmine.Block(this.env, runner.after_[i], this), true);
+ }
+};
+
+jasmine.Spec.prototype.explodes = function() {
+ throw 'explodes function should not have been called';
+};
+
+jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) {
+ if (obj == jasmine.undefined) {
+ throw "spyOn could not find an object to spy upon for " + methodName + "()";
+ }
+
+ if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) {
+ throw methodName + '() method does not exist';
+ }
+
+ if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) {
+ throw new Error(methodName + ' has already been spied upon');
+ }
+
+ var spyObj = jasmine.createSpy(methodName);
+
+ this.spies_.push(spyObj);
+ spyObj.baseObj = obj;
+ spyObj.methodName = methodName;
+ spyObj.originalValue = obj[methodName];
+
+ obj[methodName] = spyObj;
+
+ return spyObj;
+};
+
+jasmine.Spec.prototype.removeAllSpies = function() {
+ for (var i = 0; i < this.spies_.length; i++) {
+ var spy = this.spies_[i];
+ spy.baseObj[spy.methodName] = spy.originalValue;
+ }
+ this.spies_ = [];
+};
+
+/**
+ * Internal representation of a Jasmine suite.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {String} description
+ * @param {Function} specDefinitions
+ * @param {jasmine.Suite} parentSuite
+ */
+jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
+ var self = this;
+ self.id = env.nextSuiteId ? env.nextSuiteId() : null;
+ self.description = description;
+ self.queue = new jasmine.Queue(env);
+ self.parentSuite = parentSuite;
+ self.env = env;
+ self.before_ = [];
+ self.after_ = [];
+ self.children_ = [];
+ self.suites_ = [];
+ self.specs_ = [];
+};
+
+jasmine.Suite.prototype.getFullName = function() {
+ var fullName = this.description;
+ for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
+ fullName = parentSuite.description + ' ' + fullName;
+ }
+ return fullName;
+};
+
+jasmine.Suite.prototype.finish = function(onComplete) {
+ this.env.reporter.reportSuiteResults(this);
+ this.finished = true;
+ if (typeof(onComplete) == 'function') {
+ onComplete();
+ }
+};
+
+jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
+ beforeEachFunction.typeName = 'beforeEach';
+ this.before_.unshift(beforeEachFunction);
+};
+
+jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
+ afterEachFunction.typeName = 'afterEach';
+ this.after_.unshift(afterEachFunction);
+};
+
+jasmine.Suite.prototype.results = function() {
+ return this.queue.results();
+};
+
+jasmine.Suite.prototype.add = function(suiteOrSpec) {
+ this.children_.push(suiteOrSpec);
+ if (suiteOrSpec instanceof jasmine.Suite) {
+ this.suites_.push(suiteOrSpec);
+ this.env.currentRunner().addSuite(suiteOrSpec);
+ } else {
+ this.specs_.push(suiteOrSpec);
+ }
+ this.queue.add(suiteOrSpec);
+};
+
+jasmine.Suite.prototype.specs = function() {
+ return this.specs_;
+};
+
+jasmine.Suite.prototype.suites = function() {
+ return this.suites_;
+};
+
+jasmine.Suite.prototype.children = function() {
+ return this.children_;
+};
+
+jasmine.Suite.prototype.execute = function(onComplete) {
+ var self = this;
+ this.queue.start(function () {
+ self.finish(onComplete);
+ });
+};
+jasmine.WaitsBlock = function(env, timeout, spec) {
+ this.timeout = timeout;
+ jasmine.Block.call(this, env, null, spec);
+};
+
+jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
+
+jasmine.WaitsBlock.prototype.execute = function (onComplete) {
+ if (jasmine.VERBOSE) {
+ this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
+ }
+ this.env.setTimeout(function () {
+ onComplete();
+ }, this.timeout);
+};
+/**
+ * A block which waits for some condition to become true, with timeout.
+ *
+ * @constructor
+ * @extends jasmine.Block
+ * @param {jasmine.Env} env The Jasmine environment.
+ * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true.
+ * @param {Function} latchFunction A function which returns true when the desired condition has been met.
+ * @param {String} message The message to display if the desired condition hasn't been met within the given time period.
+ * @param {jasmine.Spec} spec The Jasmine spec.
+ */
+jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
+ this.timeout = timeout || env.defaultTimeoutInterval;
+ this.latchFunction = latchFunction;
+ this.message = message;
+ this.totalTimeSpentWaitingForLatch = 0;
+ jasmine.Block.call(this, env, null, spec);
+};
+jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
+
+jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10;
+
+jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
+ if (jasmine.VERBOSE) {
+ this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen'));
+ }
+ var latchFunctionResult;
+ try {
+ latchFunctionResult = this.latchFunction.apply(this.spec);
+ } catch (e) {
+ this.spec.fail(e);
+ onComplete();
+ return;
+ }
+
+ if (latchFunctionResult) {
+ onComplete();
+ } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) {
+ var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen');
+ this.spec.fail({
+ name: 'timeout',
+ message: message
+ });
+
+ this.abort = true;
+ onComplete();
+ } else {
+ this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
+ var self = this;
+ this.env.setTimeout(function() {
+ self.execute(onComplete);
+ }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
+ }
+};
+
+jasmine.version_= {
+ "major": 1,
+ "minor": 3,
+ "build": 1,
+ "revision": 1354556913
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/lib/jasmine-node/reporter.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/lib/jasmine-node/reporter.js b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/reporter.js
new file mode 100755
index 0000000..619fcae
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/lib/jasmine-node/reporter.js
@@ -0,0 +1,276 @@
+(function() {
+ //
+ // Imports
+ //
+ var util;
+ try {
+ util = require('util')
+ } catch(e) {
+ util = require('sys')
+ }
+
+ var jasmineNode = {};
+ //
+ // Helpers
+ //
+ function noop() {}
+
+
+ jasmineNode.TerminalReporter = function(config) {
+ this.print_ = config.print || util.print;
+ this.color_ = config.color ? this.ANSIColors : this.NoColors;
+
+ this.started_ = false;
+ this.finished_ = false;
+
+ this.callback_ = config.onComplete || false
+
+ this.suites_ = [];
+ this.specResults_ = {};
+ this.failures_ = [];
+ this.includeStackTrace_ = config.includeStackTrace === false ? false : true;
+ }
+
+
+ jasmineNode.TerminalReporter.prototype = {
+ reportRunnerStarting: function(runner) {
+ this.started_ = true;
+ this.startedAt = new Date();
+ var suites = runner.topLevelSuites();
+ for (var i = 0; i < suites.length; i++) {
+ var suite = suites[i];
+ this.suites_.push(this.summarize_(suite));
+ }
+ },
+
+ ANSIColors: {
+ pass: function() { return '\033[32m'; }, // Green
+ fail: function() { return '\033[31m'; }, // Red
+ neutral: function() { return '\033[0m'; } // Normal
+ },
+
+ NoColors: {
+ pass: function() { return ''; },
+ fail: function() { return ''; },
+ neutral: function() { return ''; }
+ },
+
+ summarize_: function(suiteOrSpec) {
+ var isSuite = suiteOrSpec instanceof jasmine.Suite;
+
+ // We could use a separate object for suite and spec
+ var summary = {
+ id: suiteOrSpec.id,
+ name: suiteOrSpec.description,
+ type: isSuite? 'suite' : 'spec',
+ suiteNestingLevel: 0,
+ children: []
+ };
+
+ if (isSuite) {
+ var calculateNestingLevel = function(examinedSuite) {
+ var nestingLevel = 0;
+ while (examinedSuite.parentSuite !== null) {
+ nestingLevel += 1;
+ examinedSuite = examinedSuite.parentSuite;
+ }
+ return nestingLevel;
+ };
+
+ summary.suiteNestingLevel = calculateNestingLevel(suiteOrSpec);
+
+ var children = suiteOrSpec.children();
+ for (var i = 0; i < children.length; i++) {
+ summary.children.push(this.summarize_(children[i]));
+ }
+ }
+
+ return summary;
+ },
+
+ // This is heavily influenced by Jasmine's Html/Trivial Reporter
+ reportRunnerResults: function(runner) {
+ this.reportFailures_();
+
+ var results = runner.results();
+ var resultColor = (results.failedCount > 0) ? this.color_.fail() : this.color_.pass();
+
+ var specs = runner.specs();
+ var specCount = specs.length;
+
+ var message = "\n\nFinished in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + " seconds";
+ this.printLine_(message);
+
+ // This is what jasmine-html.js has
+ //message = "" + specCount + " spec" + ( specCount === 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount === 1) ? "" : "s");
+
+ this.printLine_(this.stringWithColor_(this.printRunnerResults_(runner), resultColor));
+
+ this.finished_ = true;
+ if(this.callback_) { this.callback_(runner); }
+ },
+
+ reportFailures_: function() {
+ if (this.failures_.length === 0) {
+ return;
+ }
+
+ var indent = ' ', failure;
+ this.printLine_('\n');
+
+ this.print_('Failures:');
+
+ for (var i = 0; i < this.failures_.length; i++) {
+ failure = this.failures_[i];
+ this.printLine_('\n');
+ this.printLine_(' ' + (i + 1) + ') ' + failure.spec);
+ this.printLine_(' Message:');
+ this.printLine_(' ' + this.stringWithColor_(failure.message, this.color_.fail()));
+ if (this.includeStackTrace_) {
+ this.printLine_(' Stacktrace:');
+ this.print_(' ' + failure.stackTrace);
+ }
+ }
+ },
+
+ reportSuiteResults: function(suite) {
+ // Not used in this context
+ },
+
+ reportSpecResults: function(spec) {
+ var result = spec.results();
+ var msg = '';
+ if (result.passed()) {
+ msg = this.stringWithColor_('.', this.color_.pass());
+ // } else if (result.skipped) { TODO: Research why "result.skipped" returns false when "xit" is called on a spec?
+ // msg = (colors) ? (ansi.yellow + '*' + ansi.none) : '*';
+ } else {
+ msg = this.stringWithColor_('F', this.color_.fail());
+ this.addFailureToFailures_(spec);
+ }
+ this.spec_results += msg;
+ this.print_(msg);
+ },
+
+ addFailureToFailures_: function(spec) {
+ var result = spec.results();
+ var failureItem = null;
+
+ var items_length = result.items_.length;
+ for (var i = 0; i < items_length; i++) {
+ if (result.items_[i].passed_ === false) {
+ failureItem = result.items_[i];
+
+ var failure = {
+ spec: spec.suite.getFullName() + " " + spec.description,
+ message: failureItem.message,
+ stackTrace: failureItem.trace.stack
+ }
+
+ this.failures_.push(failure);
+ }
+ }
+ },
+
+ printRunnerResults_: function(runner){
+ var results = runner.results();
+ var specs = runner.specs();
+ var msg = '';
+ msg += specs.length + ' test' + ((specs.length === 1) ? '' : 's') + ', ';
+ msg += results.totalCount + ' assertion' + ((results.totalCount === 1) ? '' : 's') + ', ';
+ msg += results.failedCount + ' failure' + ((results.failedCount === 1) ? '' : 's') + '\n';
+ return msg;
+ },
+
+ // Helper Methods //
+ stringWithColor_: function(stringValue, color) {
+ return (color || this.color_.neutral()) + stringValue + this.color_.neutral();
+ },
+
+ printLine_: function(stringValue) {
+ this.print_(stringValue);
+ this.print_('\n');
+ }
+ };
+
+ // ***************************************************************
+ // TerminalVerboseReporter uses the TerminalReporter's constructor
+ // ***************************************************************
+ jasmineNode.TerminalVerboseReporter = function(config) {
+ jasmineNode.TerminalReporter.call(this, config);
+ // The extra field in this object
+ this.indent_ = 0;
+ }
+
+
+ jasmineNode.TerminalVerboseReporter.prototype = {
+ reportSpecResults: function(spec) {
+ if (spec.results().failedCount > 0) {
+ this.addFailureToFailures_(spec);
+ }
+
+ this.specResults_[spec.id] = {
+ messages: spec.results().getItems(),
+ result: spec.results().failedCount > 0 ? 'failed' : 'passed'
+ };
+ },
+
+ reportRunnerResults: function(runner) {
+ var messages = new Array();
+ this.buildMessagesFromResults_(messages, this.suites_);
+
+ var messages_length = messages.length;
+ for (var i = 0; i < messages_length-1; i++) {
+ this.printLine_(messages[i]);
+ }
+
+ this.print_(messages[messages_length-1]);
+
+ // Call the parent object's method
+ jasmineNode.TerminalReporter.prototype.reportRunnerResults.call(this, runner);
+ },
+
+ buildMessagesFromResults_: function(messages, results, depth) {
+ var element, specResult, specIndentSpaces, msg = '';
+ depth = (depth === undefined) ? 0 : depth;
+
+ var results_length = results.length;
+ for (var i = 0; i < results_length; i++) {
+ element = results[i];
+
+ if (element.type === 'spec') {
+ specResult = this.specResults_[element.id.toString()];
+
+ if (specResult.result === 'passed') {
+ msg = this.stringWithColor_(this.indentMessage_(element.name, depth), this.color_.pass());
+ } else {
+ msg = this.stringWithColor_(this.indentMessage_(element.name, depth), this.color_.fail());
+ }
+
+ messages.push(msg);
+ } else {
+ messages.push('');
+ messages.push(this.indentMessage_(element.name, depth));
+ }
+
+ this.buildMessagesFromResults_(messages, element.children, depth + 2);
+ }
+ },
+
+ indentMessage_: function(message, indentCount) {
+ var _indent = '';
+ for (var i = 0; i < indentCount; i++) {
+ _indent += ' ';
+ }
+ return (_indent + message);
+ }
+ };
+
+ // Inherit from TerminalReporter
+ jasmineNode.TerminalVerboseReporter.prototype.__proto__ = jasmineNode.TerminalReporter.prototype;
+
+ //
+ // Exports
+ //
+ exports.jasmineNode = jasmineNode;
+})();
[34/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/xml.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/xml.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/xml.js
new file mode 100644
index 0000000..42b0f39
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/xml.js
@@ -0,0 +1,282 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 core = require('./core')
+ , inflection = require('./inflection')
+
+/**
+ @name xml
+ @namespace xml
+*/
+
+exports.XML = new (function () {
+
+ // Default indention level
+ var indentLevel = 4
+ , tagFromType
+ , obj2xml;
+
+ tagFromType = function (item, prev) {
+ var ret
+ , type
+ , types;
+
+ if (item instanceof Array) {
+ ret = 'array';
+ } else {
+ types = ['string', 'number', 'boolean', 'object'];
+ for (var i = 0, ii = types.length; i < ii; i++) {
+ type = types[i];
+ if (typeof item == type) {
+ ret = type;
+ }
+ }
+ }
+
+ if (prev && ret != prev) {
+ return 'record'
+ } else {
+ return ret;
+ }
+ };
+
+ obj2xml = function (o, opts) {
+ var name = opts.name
+ , level = opts.level
+ , arrayRoot = opts.arrayRoot
+ , pack
+ , item
+ , n
+ , currentIndent = (new Array(level * indentLevel)).join(' ')
+ , nextIndent = (new Array((level + 1) * indentLevel)).join(' ')
+ , xml = '';
+
+ switch (typeof o) {
+ case 'string':
+ case 'number':
+ case 'boolean':
+ xml = o.toString();
+ break;
+ case 'object':
+ // Arrays
+ if (o instanceof Array) {
+
+ // Pack the processed version of each item into an array that
+ // can be turned into a tag-list with a `join` method below
+ // As the list gets iterated, if all items are the same type,
+ // that's the tag-name for the individual tags. If the items are
+ // a mixed, the tag-name is 'record'
+ pack = [];
+ for (var i = 0, ii = o.length; i < ii; i++) {
+ item = o[i];
+ if (!name) {
+ // Pass any previous tag-name, so it's possible to know if
+ // all items are the same type, or it's mixed types
+ n = tagFromType(item, n);
+ }
+ pack.push(obj2xml(item, {
+ name: name
+ , level: level + 1
+ , arrayRoot: arrayRoot
+ }));
+ }
+
+ // If this thing is attached to a named property on an object,
+ // use the name for the containing tag-name
+ if (name) {
+ n = name;
+ }
+
+ // If this is a top-level item, wrap in a top-level containing tag
+ if (level == 0) {
+ xml += currentIndent + '<' + inflection.pluralize(n) + ' type="array">\n'
+ }
+ xml += nextIndent + '<' + n + '>' +
+ pack.join('</' + n + '>\n' + nextIndent +
+ '<' + n + '>') + '</' + n + '>\n';
+
+ // If this is a top-level item, close the top-level containing tag
+ if (level == 0) {
+ xml += currentIndent + '</' + inflection.pluralize(n) + '>';
+ }
+ }
+ // Generic objects
+ else {
+ n = name || 'object';
+
+ // If this is a top-level item, wrap in a top-level containing tag
+ if (level == 0) {
+ xml += currentIndent + '<' + n;
+ // Lookahead hack to allow tags to have attributes
+ for (var p in o) {
+ if (p.indexOf('attr:') == 0) {
+ xml += ' ' + p.replace(/^attr:/, '') + '="' +
+ o[p] + '"'
+ }
+ }
+ xml += '>\n';
+ }
+ for (var p in o) {
+ item = o[p];
+
+ // Data properties only
+ if (typeof item == 'function') {
+ continue;
+ }
+ // No attr hack properties
+ if (p.indexOf('attr:') == 0) {
+ continue;
+ }
+
+ xml += nextIndent;
+
+ if (p == '#cdata') {
+ xml += '<![CDATA[' + item + ']]>\n';
+ }
+ else {
+
+ // Complex values, going to have items with multiple tags
+ // inside
+ if (typeof item == 'object') {
+ if (item instanceof Array) {
+ if (arrayRoot) {
+ xml += '<' + p + ' type="array">\n'
+ }
+ }
+ else {
+ xml += '<' + p;
+ // Lookahead hack to allow tags to have attributes
+ for (var q in item) {
+ if (q.indexOf('attr:') == 0) {
+ xml += ' ' + q.replace(/^attr:/, '') + '="' +
+ item[q] + '"'
+ }
+ }
+ xml += '>\n';
+ }
+ }
+ // Scalars, just a value and closing tag
+ else {
+ xml += '<' + p + '>'
+ }
+ xml += obj2xml(item, {
+ name: p
+ , level: level + 1
+ , arrayRoot: arrayRoot
+ });
+
+ // Objects and Arrays, need indentation before closing tag
+ if (typeof item == 'object') {
+ if (item instanceof Array) {
+ if (arrayRoot) {
+ xml += nextIndent;
+ xml += '</' + p + '>\n';
+ }
+ }
+ else {
+ xml += nextIndent;
+ xml += '</' + p + '>\n';
+ }
+ }
+ // Scalars, just close
+ else {
+ xml += '</' + p + '>\n';
+ }
+ }
+ }
+ // If this is a top-level item, close the top-level containing tag
+ if (level == 0) {
+ xml += currentIndent + '</' + n + '>\n';
+ }
+ }
+ break;
+ default:
+ // No default
+ }
+ return xml;
+ }
+
+ /*
+ * XML configuration
+ *
+ */
+ this.config = {
+ whitespace: true
+ , name: null
+ , fragment: false
+ , level: 0
+ , arrayRoot: true
+ };
+
+ /**
+ @name xml#setIndentLevel
+ @public
+ @function
+ @return {Number} Return the given `level`
+ @description SetIndentLevel changes the indent level for XML.stringify and returns it
+ @param {Number} level The indent level to use
+ */
+ this.setIndentLevel = function (level) {
+ if(!level) {
+ return;
+ }
+
+ return indentLevel = level;
+ };
+
+ /**
+ @name xml#stringify
+ @public
+ @function
+ @return {String} Return the XML entities of the given `obj`
+ @description Stringify returns an XML representation of the given `obj`
+ @param {Object} obj The object containing the XML entities to use
+ @param {Object} opts
+ @param {Boolean} [opts.whitespace=true] Don't insert indents and newlines after xml entities
+ @param {String} [opts.name=typeof obj] Use custom name as global namespace
+ @param {Boolean} [opts.fragment=false] If true no header fragment is added to the top
+ @param {Number} [opts.level=0] Remove this many levels from the output
+ @param {Boolean} [opts.arrayRoot=true]
+ */
+ this.stringify = function (obj, opts) {
+ var config = core.mixin({}, this.config)
+ , xml = '';
+ core.mixin(config, (opts || {}));
+
+ if (!config.whitespace) {
+ indentLevel = 0;
+ }
+
+ if (!config.fragment) {
+ xml += '<?xml version="1.0" encoding="UTF-8"?>\n';
+ }
+
+ xml += obj2xml(obj, {
+ name: config.name
+ , level: config.level
+ , arrayRoot: config.arrayRoot
+ });
+
+ if (!config.whitespace) {
+ xml = xml.replace(/>\n/g, '>');
+ }
+
+ return xml;
+ };
+
+})();
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/package.json b/blackberry10/node_modules/jake/node_modules/utilities/package.json
new file mode 100644
index 0000000..ee68c2a
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "utilities",
+ "description": "A classic collection of JavaScript utilities",
+ "keywords": [
+ "utilities",
+ "utils",
+ "jake",
+ "geddy"
+ ],
+ "version": "0.0.24",
+ "author": {
+ "name": "Matthew Eernisse",
+ "email": "mde@fleegix.org",
+ "url": "http://fleegix.org"
+ },
+ "main": "./lib/index.js",
+ "scripts": {
+ "test": "jake test"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mde/utilities.git"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "readme": "utilities\n=========\n\n[](http://travis-ci.org/mde/utilities)\n\nA classic collection of JavaScript utilities",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/mde/utilities/issues"
+ },
+ "_id": "utilities@0.0.24",
+ "_from": "utilities@0.0.x"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/array.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/array.js b/blackberry10/node_modules/jake/node_modules/utilities/test/array.js
new file mode 100644
index 0000000..07ad592
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/array.js
@@ -0,0 +1,71 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 assert = require('assert')
+ , array = require('../lib/array')
+ , tests;
+
+tests = {
+
+ 'test basic humanize for array': function () {
+ var actual = array.humanize(["array", "array", "array"])
+ , expected = "array, array and array";
+ assert.equal(expected, actual);
+ }
+
+, 'test humanize with two items for array': function () {
+ var actual = array.humanize(["array", "array"])
+ , expected = "array and array";
+ assert.equal(expected, actual);
+ }
+
+, 'test humanize with a single item for array': function () {
+ var actual = array.humanize(["array"])
+ , expected = "array";
+ assert.equal(expected, actual);
+ }
+
+, 'test humanize with no items for array': function () {
+ var actual = array.humanize([])
+ , expected = "";
+ assert.equal(expected, actual);
+ }
+
+, 'test basic include for array': function () {
+ var test = ["array"]
+ , actual = array.include(test, "array");
+ assert.equal(true, actual);
+ }
+
+, 'test false include for array': function () {
+ var test = ["array"]
+ , actual = array.include(test, 'nope');
+ assert.equal(false, actual);
+ }
+
+, 'test false boolean include for array': function () {
+ var test = ["array", false]
+ , actual = array.include(test, false);
+ assert.equal(true, actual);
+ }
+
+};
+
+module.exports = tests;
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/core.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/core.js b/blackberry10/node_modules/jake/node_modules/utilities/test/core.js
new file mode 100644
index 0000000..18e73b1
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/core.js
@@ -0,0 +1,75 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 assert = require('assert')
+ , core = require('../lib/core')
+ , tests;
+
+tests = {
+
+ 'simple mixin for core': function () {
+ var expected = {secret: 'asdf', geddy: 'geddyKey'}
+ , result = core.mixin({secret: 'asdf'}, {geddy: 'geddyKey'});
+ assert.deepEqual(expected, result);
+ }
+
+, 'mixin with overiding key for core': function () {
+ var expected = {secret: 'geddySecret', geddy: 'geddyKey'}
+ , result = core.mixin({secret: 'asdf'}, {geddy: 'geddyKey', secret: 'geddySecret'});
+ assert.deepEqual(expected, result);
+ }
+
+, 'simple enhance for core': function () {
+ var expected = {secret: 'asdf', geddy: 'geddyKey'}
+ , result = core.enhance({secret: 'asdf'}, {geddy: 'geddyKey'});
+ assert.deepEqual(expected, result);
+ }
+
+, 'enhance with overiding key for core': function () {
+ var expected = {secret: 'geddySecret', geddy: 'geddyKey'}
+ , result = core.enhance({secret: 'asdf'}, {geddy: 'geddyKey', secret: 'geddySecret'});
+ assert.deepEqual(expected, result);
+ }
+
+, 'isEmpty, empty string (true)': function () {
+ assert.ok(core.isEmpty(''));
+ }
+
+, 'isEmpty, null (true)': function () {
+ assert.ok(core.isEmpty(null));
+ }
+
+, 'isEmpty, undefined (true)': function () {
+ assert.ok(core.isEmpty(null));
+ }
+
+, 'isEmpty, NaN (true)': function () {
+ assert.ok(core.isEmpty(NaN));
+ }
+
+, 'isEmpty, invalid Date (true)': function () {
+ assert.ok(core.isEmpty(new Date(NaN)));
+ }
+
+, 'isEmpty, zero (false)': function () {
+ assert.ok(!core.isEmpty(0));
+ }
+
+};
+
+module.exports = tests;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/date.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/date.js b/blackberry10/node_modules/jake/node_modules/utilities/test/date.js
new file mode 100644
index 0000000..535562f
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/date.js
@@ -0,0 +1,75 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 date = require('../lib/date')
+ , assert = require('assert')
+ , tests = {}
+ , _date = new Date();
+
+tests = {
+
+ 'test strftime for date': function () {
+ var data = date.strftime(_date, "%w")
+ , actual = _date.getDay();
+ assert.equal(actual, data);
+ }
+
+, 'test calcCentury using current year for date': function () {
+ var data = date.calcCentury()
+ , actual = '21';
+ assert.equal(actual, data);
+ }
+
+, 'test calcCentury using 20th century year for date': function () {
+ var data = date.calcCentury(2000)
+ , actual = '20';
+ assert.equal(actual, data);
+ }
+
+, 'test calcCentury using 1st century year for date': function () {
+ var data = date.calcCentury(10)
+ , actual = '1';
+ assert.equal(actual, data);
+ }
+
+, 'test getMeridiem for date': function () {
+ var data = date.getMeridiem(_date.getHours())
+ , actual = (_date.getHours() > 11) ? 'PM' : 'AM';
+ assert.equal(actual, data);
+ }
+
+, 'test relativeTime week/weeks switchover': function () {
+ var dtA = new Date()
+ , dtB
+ , res;
+
+ dtB = date.add(dtA, 'day', 10);
+ dtB = date.add(dtB, 'hour', 23);
+ dtB = date.add(dtB, 'minute', 59);
+ dtB = date.add(dtB, 'second', 59);
+ dtB = date.add(dtB, 'millisecond', 999);
+ res = date.relativeTime(dtA, {now: dtB});
+ assert.equal('one week ago', res);
+
+ dtB = date.add(dtB, 'millisecond', 1);
+ res = date.relativeTime(dtA, {now: dtB});
+ assert.equal('about 2 weeks ago', res);
+ }
+
+};
+
+module.exports = tests;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/event_buffer.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/event_buffer.js b/blackberry10/node_modules/jake/node_modules/utilities/test/event_buffer.js
new file mode 100644
index 0000000..61dcc30
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/event_buffer.js
@@ -0,0 +1,45 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 Stream = require('stream').Stream
+ , EventEmitter = require('events').EventEmitter
+ , EventBuffer = require('../lib/event_buffer.js').EventBuffer
+ , assert = require('assert')
+ , tests;
+
+tests = {
+
+ 'test basic event buffer functionality': function () {
+ var source = new Stream()
+ , dest = new EventEmitter()
+ , buff = new EventBuffer(source)
+ , data = '';
+ dest.on('data', function (d) { data += d; });
+ source.writeable = true;
+ source.readable = true;
+ source.emit('data', 'abcdef');
+ source.emit('data', '123456');
+ buff.sync(dest);
+ assert.equal('abcdef123456', data);
+ source.emit('data', '---');
+ assert.equal('abcdef123456---', data);
+ }
+
+};
+
+module.exports = tests;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/file.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/file.js b/blackberry10/node_modules/jake/node_modules/utilities/test/file.js
new file mode 100644
index 0000000..183373a
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/file.js
@@ -0,0 +1,218 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 assert = require('assert')
+ , fs = require('fs')
+ , path = require('path')
+ , file = require('../lib/file')
+ , existsSync = fs.existsSync || path.existsSync
+ , tests;
+
+tests = {
+
+ 'before': function () {
+ process.chdir('./test');
+ }
+
+, 'after': function () {
+ process.chdir('../');
+ }
+
+, 'test mkdirP': function () {
+ var expected = [
+ ['foo']
+ , ['foo', 'bar']
+ , ['foo', 'bar', 'baz']
+ , ['foo', 'bar', 'baz', 'qux']
+ ]
+ , res;
+ file.mkdirP('foo/bar/baz/qux');
+ res = file.readdirR('foo');
+ for (var i = 0, ii = res.length; i < ii; i++) {
+ assert.equal(path.join.apply(path, expected[i]), res[i]);
+ }
+ file.rmRf('foo', {silent: true});
+ }
+
+, 'test rmRf': function () {
+ file.mkdirP('foo/bar/baz/qux', {silent: true});
+ file.rmRf('foo/bar', {silent: true});
+ res = file.readdirR('foo');
+ assert.equal(1, res.length);
+ assert.equal('foo', res[0]);
+ fs.rmdirSync('foo');
+ }
+
+, 'test cpR with same to and from will throw': function () {
+ assert.throws(function () {
+ file.cpR('foo.txt', 'foo.txt', {silent: true});
+ });
+ }
+
+, 'test cpR rename via copy in directory': function () {
+ file.mkdirP('foo', {silent: true});
+ fs.writeFileSync('foo/bar.txt', 'w00t');
+ file.cpR('foo/bar.txt', 'foo/baz.txt', {silent: true});
+ assert.ok(existsSync('foo/baz.txt'));
+ file.rmRf('foo', {silent: true});
+ }
+
+, 'test cpR rename via copy in base': function () {
+ fs.writeFileSync('bar.txt', 'w00t');
+ file.cpR('bar.txt', 'baz.txt', {silent: true});
+ assert.ok(existsSync('baz.txt'));
+ file.rmRf('bar.txt', {silent: true});
+ file.rmRf('baz.txt', {silent: true});
+ }
+
+, 'test readdirR': function () {
+ var expected = [
+ ['foo']
+ , ['foo', 'bar']
+ , ['foo', 'bar', 'baz']
+ , ['foo', 'bar', 'baz', 'qux']
+ ]
+ , res;
+
+ file.mkdirP('foo/bar/baz/qux', {silent: true});
+ res = file.readdirR('foo');
+
+ for (var i = 0, ii = res.length; i < ii; i++) {
+ assert.equal(path.join.apply(path, expected[i]), res[i]);
+ }
+ file.rmRf('foo', {silent: true});
+ }
+
+, 'test isAbsolute with Unix absolute path': function () {
+ var p = '/foo/bar/baz';
+ assert.equal('/', file.isAbsolute(p));
+ }
+
+, 'test isAbsolute with Unix relative path': function () {
+ var p = 'foo/bar/baz';
+ assert.equal(false, file.isAbsolute(p));
+ }
+
+, 'test isAbsolute with Win absolute path': function () {
+ var p = 'C:\\foo\\bar\\baz';
+ assert.equal('C:\\', file.isAbsolute(p));
+ }
+
+, 'test isAbsolute with Win relative path': function () {
+ var p = 'foo\\bar\\baz';
+ assert.equal(false, file.isAbsolute(p));
+ }
+
+, 'test absolutize with Unix absolute path': function () {
+ var expected = '/foo/bar/baz'
+ , actual = file.absolutize('/foo/bar/baz');
+ assert.equal(expected, actual);
+ }
+
+, 'test absolutize with Win absolute path': function () {
+ var expected = 'C:\\foo\\bar\\baz'
+ , actual = file.absolutize('C:\\foo\\bar\\baz');
+ assert.equal(expected, actual);
+ }
+
+, 'test absolutize with relative path': function () {
+ var expected = process.cwd()
+ , actual = '';
+
+ // We can't just create two different tests here
+ // because file.absolutize uses process.cwd()
+ // to get absolute path which is platform
+ // specific
+ if (process.platform === 'win32') {
+ expected += '\\foo\\bar\\baz'
+ actual = file.absolutize('foo\\bar\\baz')
+ }
+ else {
+ expected += '/foo/bar/baz'
+ actual = file.absolutize('foo/bar/baz');
+ }
+
+ assert.equal(expected, actual);
+ }
+
+, 'test basedir with Unix absolute path': function () {
+ var p = '/foo/bar/baz';
+ assert.equal('/foo/bar', file.basedir(p));
+ }
+
+, 'test basedir with Win absolute path': function () {
+ var p = 'C:\\foo\\bar\\baz';
+ assert.equal('C:\\foo\\bar', file.basedir(p));
+ }
+
+, 'test basedir with Unix root path': function () {
+ var p = '/';
+ assert.equal('/', file.basedir(p));
+ }
+
+, 'test basedir with Unix absolute path and double-asterisk': function () {
+ var p = '/**/foo/bar/baz';
+ assert.equal('/', file.basedir(p));
+ }
+
+, 'test basedir with leading double-asterisk': function () {
+ var p = '**/foo';
+ assert.equal('.', file.basedir(p));
+ }
+
+, 'test basedir with leading asterisk': function () {
+ var p = '*.js';
+ assert.equal('.', file.basedir(p));
+ }
+
+, 'test basedir with leading dot-slash and double-asterisk': function () {
+ var p = './**/foo';
+ assert.equal('.', file.basedir(p));
+ }
+
+, 'test basedir with leading dirname and double-asterisk': function () {
+ var p = 'a/**/*.js';
+ assert.equal('a', file.basedir(p));
+ }
+
+, 'test basedir with leading dot-dot-slash and double-asterisk': function () {
+ var p = '../../test/**/*.js';
+ assert.equal('../../test', file.basedir(p));
+ }
+
+, 'test basedir with single-asterisk in dirname': function () {
+ var p = 'a/test*/file';
+ assert.equal('a', file.basedir(p));
+ }
+
+, 'test basedir with single filename': function () {
+ var p = 'filename';
+ assert.equal('.', file.basedir(p));
+ }
+
+, 'test basedir with empty path': function () {
+ var p = '';
+ assert.equal('.', file.basedir(p));
+ assert.equal('.', file.basedir());
+ }
+
+};
+
+module.exports = tests;
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/i18n.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/i18n.js b/blackberry10/node_modules/jake/node_modules/utilities/test/i18n.js
new file mode 100644
index 0000000..ba3e972
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/i18n.js
@@ -0,0 +1,60 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 i18n = require('../lib/i18n')
+ , assert = require('assert')
+ , tests
+ , inst = {};
+
+tests = {
+
+ 'before': function () {
+ i18n.loadLocale('en-us', {foo: 'FOO', bar: 'BAR', baz: 'BAZ'});
+ i18n.loadLocale('ja-jp', {foo: 'フー', bar: 'バー'});
+ inst.en = new i18n.I18n('en-us');
+ inst.jp = new i18n.I18n('ja-jp');
+ inst.de = new i18n.I18n('de-de');
+ }
+
+, 'test default-locale fallback, defined strings': function () {
+ var expected = 'BAZ'
+ , actual = inst.jp.t('baz');
+ assert.equal(expected, actual);
+ }
+
+, 'test default-locale fallback, no defined strings': function () {
+ var expected = 'BAZ'
+ , actual = inst.de.t('baz');
+ assert.equal(expected, actual);
+ }
+
+, 'test key lookup, default-locale': function () {
+ var expected = 'FOO'
+ , actual = inst.en.t('foo');
+ assert.equal(expected, actual);
+ }
+
+, 'test key lookup, non-default-locale': function () {
+ var expected = 'フー'
+ , actual = inst.jp.t('foo');
+ assert.equal(expected, actual);
+ }
+
+};
+
+module.exports = tests;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/inflection.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/inflection.js b/blackberry10/node_modules/jake/node_modules/utilities/test/inflection.js
new file mode 100644
index 0000000..2a4cfe6
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/inflection.js
@@ -0,0 +1,388 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 inflection = require('../lib/inflection')
+ , assert = require('assert')
+ , esInflections
+ , sInflections
+ , iesInflections
+ , vesInflections
+ , icesInflections
+ , renInflections
+ , oesInflections
+ , iInflections
+ , genInflections
+ , irregularInflections
+ , noInflections
+ , tests;
+
+/**
+ * Most test inflections are from Ruby on Rails:
+ * https://github.com/rails/rails/blob/master/activesupport/test/inflector_test_cases.rb
+ *
+ * Ruby on Rails is MIT licensed: http://www.opensource.org/licenses/MIT
+*/
+esInflections = [
+ ["search", "searches"]
+ , ["switch", "switches"]
+ , ["fix", "fixes"]
+ , ["box", "boxes"]
+ , ["process", "processes"]
+ , ["address", "addresses"]
+ , ["wish", "wishes"]
+ , ["status", "statuses"]
+ , ["alias", "aliases"]
+ , ["basis", "bases"]
+ , ["diagnosis", "diagnoses"]
+ , ["bus", "buses"]
+];
+
+sInflections = [
+ ["stack", "stacks"]
+ , ["shoe", "shoes"]
+ , ["status_code", "status_codes"]
+ , ["case", "cases"]
+ , ["edge", "edges"]
+ , ["archive", "archives"]
+ , ["experience", "experiences"]
+ , ["day", "days"]
+ , ["comment", "comments"]
+ , ["foobar", "foobars"]
+ , ["newsletter", "newsletters"]
+ , ["old_news", "old_news"]
+ , ["perspective", "perspectives"]
+ , ["diagnosis_a", "diagnosis_as"]
+ , ["horse", "horses"]
+ , ["prize", "prizes"]
+];
+
+iesInflections = [
+ ["category", "categories"]
+ , ["query", "queries"]
+ , ["ability", "abilities"]
+ , ["agency", "agencies"]
+];
+
+vesInflections = [
+ ["wife", "wives"]
+ , ["safe", "saves"]
+ , ["half", "halves"]
+ , ["elf", "elves"]
+ , ["dwarf", "dwarves"]
+];
+
+icesInflections = [
+ ["index", "indices"]
+ , ["vertex", "vertices"]
+ , ["matrix", "matrices"]
+];
+
+renInflections = [
+ ["node_child", "node_children"]
+ , ["child", "children"]
+];
+
+oesInflections = [
+ ["buffalo", "buffaloes"]
+ , ["tomato", "tomatoes"]
+];
+
+iInflections = [
+ ["octopus", "octopi"]
+ , ["virus", "viri"]
+];
+
+genInflections = [
+ ["salesperson", "salespeople"]
+ , ["person", "people"]
+ , ["spokesman", "spokesmen"]
+ , ["man", "men"]
+ , ["woman", "women"]
+];
+
+irregularInflections = [
+ ["datum", "data"]
+ , ["medium", "media"]
+ , ["ox", "oxen"]
+ , ["cow", "kine"]
+ , ["mouse", "mice"]
+ , ["louse", "lice"]
+ , ["axis", "axes"]
+ , ["testis", "testes"]
+ , ["crisis", "crises"]
+ , ["analysis", "analyses"]
+ , ["quiz", "quizzes"]
+];
+
+noInflections = [
+ ["fish", "fish"]
+ , ["news", "news"]
+ , ["series", "series"]
+ , ["species", "species"]
+ , ["rice", "rice"]
+ , ["information", "information"]
+ , ["equipment", "equipment"]
+];
+
+tests = {
+
+ 'test es plural words for inflection': function () {
+ var i = esInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = esInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test es singular words for inflection': function () {
+ var i = esInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = esInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+, 'test s plural words for inflection': function () {
+ var i = sInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = sInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test s singular words for inflection': function () {
+ var i = sInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = sInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+, 'test ies plural words for inflection': function () {
+ var i = iesInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = iesInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test ies singular words for inflection': function () {
+ var i = iesInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = iesInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+, 'test ves plural words for inflection': function () {
+ var i = vesInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = vesInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test ves singular words for inflection': function () {
+ var i = vesInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = vesInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+, 'test ices plural words for inflection': function () {
+ var i = icesInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = icesInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test ices singular words for inflection': function () {
+ var i = icesInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = icesInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+, 'test ren plural words for inflection': function () {
+ var i = renInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = renInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test ren singular words for inflection': function () {
+ var i = renInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = renInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+, 'test oes plural words for inflection': function () {
+ var i = oesInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = oesInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test oes singular words for inflection': function () {
+ var i = oesInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = oesInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+, 'test i plural words for inflection': function () {
+ var i = iInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = iInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test i singular words for inflection': function () {
+ var i = iInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = iInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+, 'test gender and people plural words for inflection': function () {
+ var i = genInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = genInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test gender and people singular words for inflection': function () {
+ var i = genInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = genInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+, 'test irregular plural words for inflection': function () {
+ var i = irregularInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = irregularInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test irregular singular words for inflection': function () {
+ var i = irregularInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = irregularInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+, 'test no change plural words for inflection': function () {
+ var i = noInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = noInflections[i];
+
+ assert.equal(value[1], inflection.pluralize(value[0]))
+ }
+ }
+
+, 'test no change singular words for inflection': function () {
+ var i = noInflections.length
+ , value;
+
+ while (--i >= 0) {
+ value = noInflections[i];
+
+ assert.equal(value[0], inflection.singularize(value[1]))
+ }
+ }
+
+};
+
+module.exports = tests;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/network.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/network.js b/blackberry10/node_modules/jake/node_modules/utilities/test/network.js
new file mode 100644
index 0000000..9619912
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/network.js
@@ -0,0 +1,41 @@
+var assert = require('assert')
+ , sys = require('sys')
+ , net = require('net')
+ , network = require('../lib/network')
+ , tests;
+
+tests = {
+
+ 'test a port is open': function (next) {
+ var expected = false
+ , port = 49152;
+
+ network.isPortOpen(port, null, function (err, isOpen) {
+ assert.ifError(err);
+ assert.equal(expected, isOpen);
+
+ next();
+ });
+
+ }
+
+, 'test a port is closed': function (next) {
+
+ var expected = true
+ , port = 49153
+ , server = net.createServer();
+
+ server.listen(port, function () {
+ network.isPortOpen(port, null, function (err, isOpen) {
+ assert.ifError(err);
+ assert.equal(expected, isOpen);
+
+ server.close(function () {
+ next();
+ });
+ });
+ });
+ }
+}
+
+module.exports = tests;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/object.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/object.js b/blackberry10/node_modules/jake/node_modules/utilities/test/object.js
new file mode 100644
index 0000000..ea2cea5
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/object.js
@@ -0,0 +1,76 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 object = require('../lib/object')
+ , array = require('../lib/array')
+ , assert = require('assert')
+ , tests = {}
+ , checkObjects;
+
+tests = {
+
+ 'test merge in object': function () {
+ var expected = {user: 'geddy', key: 'key'}
+ , actual = object.merge({user: 'geddy'}, {key: 'key'});
+ assert.deepEqual(actual, expected);
+ }
+
+, 'test merge with overwriting keys in object': function () {
+ var expected = {user: 'geddy', key: 'key'}
+ , actual = object.merge({user: 'geddy', key: 'geddyKey'}, {key: 'key'});
+ assert.deepEqual(actual, expected);
+ }
+
+, 'test merge with objects as keys': function () {
+ var expected = {user: {name: 'geddy', password: 'random', key: 'key'}, key: 'key'}
+ , actual = object.merge({key: 'key'}, {user: {name: 'geddy', password: 'random', key: 'key'}});
+ assert.deepEqual(actual, expected);
+ }
+
+, 'test reverseMerge in object': function () {
+ var expected = {user: 'geddy', key: 'key'}
+ , actual = object.reverseMerge({user: 'geddy'}, {key: 'key'});
+ assert.deepEqual(actual, expected);
+ }
+
+, 'test reverseMerge with keys overwriting default in object': function () {
+ var expected = {user: 'geddy', key: 'geddyKey'}
+ , actual = object.reverseMerge({user: 'geddy', key: 'geddyKey'}, {key: 'key'});
+ assert.deepEqual(actual, expected);
+ }
+
+, 'test reverseMerge with objects as keys': function () {
+ var expected = {user: {name: 'geddy', password: 'random', key: 'key'}, key: 'key'}
+ , actual = object.merge({user: {name: 'geddy', password: 'random', key: 'key'}}, {key: 'key'});
+ assert.deepEqual(actual, expected);
+ }
+
+, 'test isEmpty with non empty object in object': function () {
+ var expected = false
+ , actual = object.isEmpty({user: 'geddy'});
+ assert.equal(actual, expected);
+ }
+
+, 'test isEmpty with empty object in object': function () {
+ var expected = true
+ , actual = object.isEmpty({});
+ assert.equal(actual, expected);
+ }
+
+};
+
+module.exports = tests;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/sorted_collection.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/sorted_collection.js b/blackberry10/node_modules/jake/node_modules/utilities/test/sorted_collection.js
new file mode 100644
index 0000000..2701a99
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/sorted_collection.js
@@ -0,0 +1,115 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 SortedCollection = require('../lib/sorted_collection').SortedCollection
+ , assert = require('assert')
+ , tests;
+
+tests = {
+
+ 'test no default value': function () {
+ // Set up a collection, no default value for new items
+ var c = new SortedCollection();
+ // Add some items
+ c.addItem('testA', 'AAAA');
+ c.addItem('testB', 'BBBB');
+ c.addItem('testC', 'CCCC');
+ // Test count
+ assert.equal(3, c.count);
+ // Test getItem by string key
+ var item = c.getItem('testC');
+ assert.equal('CCCC', item);
+ // Test getItem by index number
+ var item = c.getItem(1);
+ assert.equal('BBBB', item);
+ // Test setItem by string key
+ c.setItem('testA', 'aaaa');
+ var item = c.getItem('testA');
+ assert.equal('aaaa', item);
+ // Test setItem by index number
+ c.setItem(2, 'cccc');
+ var item = c.getItem(2);
+ assert.equal('cccc', item);
+ }
+
+, 'test default value': function () {
+ // Set up a collection, default value for new items is 'foo'
+ var c = new SortedCollection('foo');
+ // Add an item with no value -- should get
+ // default value
+ c.addItem('testA');
+ // Add some items with empty/falsey values --
+ // should be set to desired values
+ c.addItem('testB', null);
+ c.addItem('testC', false);
+ // Test getItem for default value
+ var item = c.getItem('testA');
+ assert.equal('foo', item);
+ var item = c.getItem('testB');
+ assert.equal(null, item);
+ var item = c.getItem('testC');
+ assert.equal(false, item);
+ }
+
+, 'test each': function () {
+ var c = new SortedCollection()
+ , str = '';
+ // Add an item with no value -- should get
+ // default value
+ c.addItem('a', 'A');
+ c.addItem('b', 'B');
+ c.addItem('c', 'C');
+ c.addItem('d', 'D');
+ c.each(function (val, key) {
+ str += val + key;
+ });
+ assert.equal('AaBbCcDd', str);
+ }
+
+, 'test removing an item': function () {
+ var c = new SortedCollection()
+ , str = '';
+ // Add an item with no value -- should get
+ // default value
+ c.addItem('a', 'A');
+ c.addItem('b', 'B');
+ c.addItem('c', 'C');
+ c.addItem('d', 'D');
+ assert.equal(4, c.count);
+
+ omg = c.removeItem('c');
+ assert.equal(3, c.count);
+
+ c.each(function (val, key) {
+ str += val + key;
+ });
+ assert.equal('AaBbDd', str);
+ }
+
+, 'test clone': function () {
+ var c = new SortedCollection()
+ , copy;
+ c.addItem('a', 'A');
+ c.addItem('b', 'B');
+ copy = c.clone();
+ assert.equal(2, copy.count);
+ assert.equal('A', copy.getItem('a'));
+ }
+
+};
+
+module.exports = tests;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/string.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/string.js b/blackberry10/node_modules/jake/node_modules/utilities/test/string.js
new file mode 100644
index 0000000..a03027c
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/string.js
@@ -0,0 +1,411 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 assert = require('assert')
+ , string = require('../lib/string')
+ , tests;
+
+tests = {
+
+ 'test basic escapeXML for string': function () {
+ var expected = '<html></html>'
+ , actual = string.escapeXML('<html></html>');
+ assert.equal(expected, actual);
+ }
+
+, 'test all escape characters for escapeXML': function () {
+ var expected = '<>&"''
+ , actual = string.escapeXML('<>&"\'');
+ assert.equal(expected, actual);
+ }
+
+, 'test no escape characters with string for escapeXML': function () {
+ var expected = 'Geddy'
+ , actual = string.escapeXML('Geddy');
+ assert.equal(expected, actual);
+ }
+
+, 'test no escape characters with numbers for escapeXML': function () {
+ var expected = 05
+ , actual = string.escapeXML(05);
+ assert.equal(expected, actual);
+ }
+
+, 'test basic unescapeXML for string': function () {
+ var expected = '<html></html>'
+ , actual = string.unescapeXML('<html></html>');
+ assert.equal(expected, actual);
+ }
+
+, 'test all escape characters for unescapeXML': function () {
+ var expected = '<>&"\''
+ , actual = string.unescapeXML('<>&"'');
+ assert.equal(expected, actual);
+ }
+
+, 'test no escape characters with string for unescapeXML': function () {
+ var expected = 'Geddy'
+ , actual = string.unescapeXML('Geddy');
+ assert.equal(expected, actual);
+ }
+
+, 'test no escape characters with numbers for unescapeXML': function () {
+ var expected = 05
+ , actual = string.unescapeXML(05);
+ assert.equal(expected, actual);
+ }
+
+, 'test basic needsEscape for string': function () {
+ var expected = true
+ , actual = string.needsEscape('Geddy>');
+ assert.equal(expected, actual);
+ }
+
+, 'test basic needsEscape thats false for string': function () {
+ var expected = false
+ , actual = string.needsEscape('Geddy');
+ assert.equal(expected, actual);
+ }
+
+, 'test basic needsUnescape for string': function () {
+ var expected = true
+ , actual = string.needsEscape('"Geddy"');
+ assert.equal(expected, actual);
+ }
+
+, 'test basic needsUnescape thats false for string': function () {
+ var expected = false
+ , actual = string.needsEscape('Geddy');
+ assert.equal(expected, actual);
+ }
+
+, 'test escapeRegExpCharacters': function () {
+ var expected = '\\^\\/\\.\\*\\+\\?\\|\\(\\)\\[\\]\\{\\}\\\\'
+ actual = string.escapeRegExpChars('^/.*+?|()[]{}\\');
+ assert.equal(expected, actual);
+ }
+
+, 'test toArray for string': function () {
+ var data = string.toArray('geddy')
+ , expected = ['g', 'e', 'd', 'd', 'y'];
+
+ // Loop through each item and check
+ // if not, then the arrays aren't _really_ the same
+ var i = expected.length;
+ while (--i >= 0) {
+ assert.equal(expected[i], data[i]);
+ }
+ }
+
+, 'test reverse for string': function () {
+ var data = string.reverse('yddeg')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test basic ltrim for string': function () {
+ var data = string.ltrim(' geddy')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test custom char ltrim for string': function () {
+ var data = string.ltrim('&&geddy', '&')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test basic rtrim for string': function () {
+ var data = string.rtrim('geddy ')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test custom char rtrim for string': function () {
+ var data = string.rtrim('geddy&&', '&')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test basic trim for string': function () {
+ var data = string.trim(' geddy ')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test custom char trim for string': function () {
+ var data = string.trim('&geddy&&', '&')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test chop special-case line-ending': function () {
+ var expected = 'geddy'
+ , actual = string.chop('geddy\r\n');
+ assert.equal(expected, actual);
+ }
+
+, 'test chop not actual special-case line-ending': function () {
+ var expected = 'geddy\n'
+ , actual = string.chop('geddy\n\r');
+ assert.equal(expected, actual);
+ }
+
+, 'test chop normal line-ending': function () {
+ var expected = 'geddy'
+ , actual = string.chop('geddy\n');
+ assert.equal(expected, actual);
+ }
+
+, 'test chop whatever character': function () {
+ var expected = 'gedd'
+ , actual = string.chop('geddy');
+ assert.equal(expected, actual);
+ }
+
+, 'test chop empty string': function () {
+ var expected = ''
+ , actual = string.chop('');
+ assert.equal(expected, actual);
+ }
+
+, 'test basic lpad for string': function () {
+ var data = string.lpad('geddy', '&', 7)
+ , expected = '&&geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test lpad without width for string': function () {
+ var data = string.lpad('geddy', '&')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test lpad without width of char for string': function () {
+ var data = string.lpad('geddy')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test basic rpad for string': function () {
+ var data = string.rpad('geddy', '&', 7)
+ , expected = 'geddy&&';
+ assert.equal(expected, data);
+ }
+
+, 'test rpad without width for string': function () {
+ var data = string.rpad('geddy', '&')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test rpad without width of char for string': function () {
+ var data = string.rpad('geddy')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test basic pad for string': function () {
+ var data = string.pad('geddy', '&', 7)
+ , expected = '&geddy&';
+ assert.equal(expected, data);
+ }
+
+, 'test pad without width for string': function () {
+ var data = string.pad('geddy', '&')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test pad without width of char for string': function () {
+ var data = string.pad('geddy')
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test single tags in truncateHTML': function () {
+ var str = string.truncateHTML('<p>Once upon a time in a world</p>', { length: 10 });
+ assert.equal(str, '<p>Once up...</p>');
+ }
+
+, 'test multiple tags in truncateHTML': function () {
+ var str = string.truncateHTML('<p>Once upon a time <small>in a world</small></p>', { length: 10 });
+ assert.equal(str, '<p>Once up...<small>in a wo...</small></p>');
+ }
+
+, 'test multiple tags but only truncate once in truncateHTML': function () {
+ var str = string.truncateHTML('<p>Once upon a time <small>in a world</small></p>', { length: 10, once: true });
+ assert.equal(str, '<p>Once up...<small>in a world</small></p>');
+ }
+
+, 'test standard truncate': function () {
+ var str = string.truncate('Once upon a time in a world', { length: 10 });
+ assert.equal(str, 'Once up...');
+ }
+
+, 'test custom omission in truncate': function () {
+ var str = string.truncate('Once upon a time in a world', { length: 10, omission: '///' });
+ assert.equal(str, 'Once up///');
+ }
+
+, 'test regex seperator in truncate': function () {
+ var str = string.truncate('Once upon a time in a world', { length: 15, seperator: /\s/ });
+ assert.equal(str, 'Once upon a...');
+ }
+
+, 'test string seperator in truncate': function () {
+ var str = string.truncate('Once upon a time in a world', { length: 15, seperator: ' ' });
+ assert.equal(str, 'Once upon a...');
+ }
+
+, 'test unsafe html in truncate': function () {
+ var str = string.truncate('<p>Once upon a time in a world</p>', { length: 20 });
+ assert.equal(str, '<p>Once upon a ti...');
+ }
+
+, 'test nl2br for string': function () {
+ var data = string.nl2br("geddy\n")
+ , expected = 'geddy<br />';
+ assert.equal(expected, data);
+ }
+
+, 'test snakeize for string': function () {
+ var data = string.snakeize("geddyJs")
+ , expected = 'geddy_js';
+ assert.equal(expected, data);
+ }
+
+, 'test snakeize with beginning caps for string': function () {
+ var data = string.snakeize("GeddyJs")
+ , expected = 'geddy_js';
+ assert.equal(expected, data);
+ }
+
+, 'test camelize for string': function () {
+ var data = string.camelize("geddy_js")
+ , expected = 'geddyJs';
+ assert.equal(expected, data);
+ }
+
+, 'test camelize with initialCap for string': function () {
+ var data = string.camelize("geddy_js", {initialCap: true})
+ , expected = 'GeddyJs';
+ assert.equal(expected, data);
+ }
+
+, 'test camelize with leadingUnderscore with no underscore for string': function () {
+ var data = string.camelize("geddy_js", {leadingUnderscore: true})
+ , expected = 'geddyJs';
+ assert.equal(expected, data);
+ }
+
+, 'test camelize with leadingUnderscore with underscore for string': function () {
+ var data = string.camelize("_geddy_js", {leadingUnderscore: true})
+ , expected = '_geddyJs';
+ assert.equal(expected, data);
+ }
+
+, 'test decapitalize for string': function () {
+ var data = string.decapitalize("Geddy")
+ , expected = 'geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test capitalize for string': function () {
+ var data = string.capitalize("geddy")
+ , expected = 'Geddy';
+ assert.equal(expected, data);
+ }
+
+, 'test dasherize for string': function () {
+ var data = string.dasherize("geddyJs")
+ , expected = 'geddy-js';
+ assert.equal(expected, data);
+ }
+
+, 'test dasherize with custom replace char for string': function () {
+ var data = string.dasherize("geddyJs", "_")
+ , expected = 'geddy_js';
+ assert.equal(expected, data);
+ }
+
+, 'test underscorize for string': function () {
+ var data = string.underscorize("geddyJs")
+ , expected = 'geddy_js';
+ assert.equal(expected, data);
+ }
+
+, 'test include for string with included string': function () {
+ assert.ok(string.include('foobarbaz', 'foo'));
+ }
+
+, 'test include for string with not included string': function () {
+ assert.ok(!string.include('foobarbaz', 'qux'));
+ }
+
+, 'test getInflections for string': function () {
+ var actual = string.getInflections("string")
+ , expected = {
+ filename: {
+ singular: "string"
+ , plural: "strings"
+ },
+ constructor: {
+ singular: "String"
+ , plural: "Strings"
+ },
+ property: {
+ singular: "string"
+ , plural: "strings"
+ },
+ };
+
+ assert.deepEqual(expected, actual);
+ }
+
+, 'test inflection with odd name for string': function () {
+ var actual = string.getInflections("snow_dog")
+ , expected = {
+ filename: {
+ singular: "snow_dog"
+ , plural: "snow_dogs"
+ },
+ constructor: {
+ singular: "SnowDog"
+ , plural: "SnowDogs"
+ },
+ property: {
+ singular: "snowDog"
+ , plural: "snowDogs"
+ },
+ };
+
+ assert.deepEqual(expected, actual);
+ }
+
+, 'test uuid length for string': function () {
+ var data = string.uuid(5).length
+ , expected = 5;
+ assert.equal(expected, data);
+ }
+
+};
+
+module.exports = tests;
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/uri.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/uri.js b/blackberry10/node_modules/jake/node_modules/utilities/test/uri.js
new file mode 100644
index 0000000..8048493
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/uri.js
@@ -0,0 +1,99 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 uri = require('../lib/uri')
+ , array = require('../lib/array')
+ , assert = require('assert')
+ , tests = {};
+
+tests = {
+
+ 'test getFileExtension for uri': function () {
+ var data = uri.getFileExtension('users.json')
+ , actual = 'json';
+ assert.equal(actual, data);
+ }
+
+, 'test paramify for uri': function () {
+ var data = uri.paramify({username: 'user', token: 'token', secret: 'secret'})
+ , actual = 'username=user&token=token&secret=secret';
+ assert.equal(actual, data);
+ }
+
+, 'test paramify with conslidate option for uri': function () {
+ var data = uri.paramify({username: 'user', auth: ['token', 'secret']}, {conslidate: true})
+ , actual = 'username=user&auth=token&auth=secret';
+ assert.equal(actual, data);
+ }
+
+, 'test paramify with includeEmpty option for uri': function () {
+ var data = uri.paramify({username: 'user', token: ''}, {includeEmpty: true})
+ , actual = 'username=user&token=';
+ assert.equal(actual, data);
+ }
+
+, 'test paramify with includeEmpty as 0 option for uri': function () {
+ var data = uri.paramify({username: 'user', token: 0}, {includeEmpty: true})
+ , actual = 'username=user&token=0';
+ assert.equal(actual, data);
+ }
+
+, 'test paramify with includeEmpty as null option for uri': function () {
+ var data = uri.paramify({username: 'user', token: null}, {includeEmpty: true})
+ , actual = 'username=user&token=';
+ assert.equal(actual, data);
+ }
+
+, 'test paramify with includeEmpty as undefined option for uri': function () {
+ var data = uri.paramify({username: 'user', token: undefined}, {includeEmpty: true})
+ , actual = 'username=user&token=';
+ assert.equal(actual, data);
+ }
+
+, 'test paramify with snakeize option for uri': function () {
+ var data = uri.paramify({username: 'user', authToken: 'token'}, {snakeize: true})
+ , actual = 'username=user&auth_token=token';
+ assert.equal(actual, data);
+ }
+
+, 'test paramify with escapeVals option for uri': function () {
+ var data = uri.paramify({username: 'user', token: '<token'}, {escapeVals: true})
+ , actual = 'username=user&token=%26lt%3Btoken';
+ assert.equal(actual, data);
+ }
+
+, 'test objectify for uri': function () {
+ var expected = {name: 'user'}
+ , actual = uri.objectify('name=user');
+ assert.deepEqual(actual, expected);
+ }
+
+, 'test objectify with multiple matching keys for uri': function () {
+ var expected = {name: ['user', 'user2']}
+ , actual = uri.objectify('name=user&name=user2');
+ assert.deepEqual(actual, expected);
+ }
+
+, 'test objectify with no conslidation for uri': function () {
+ var expected= {name: 'user2'}
+ , actual = uri.objectify('name=user&name=user2', {consolidate: false});
+ assert.deepEqual(actual, expected);
+ }
+
+};
+
+module.exports = tests;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/test/xml.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/test/xml.js b/blackberry10/node_modules/jake/node_modules/utilities/test/xml.js
new file mode 100644
index 0000000..3bb8e83
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/test/xml.js
@@ -0,0 +1,122 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 XML = require('../lib/xml').XML
+ , assert = require('assert')
+ , obj
+ , xml
+ , res
+ , serialize
+ , tests;
+
+serialize = function (o) {
+ return XML.stringify(o, {whitespace: false});
+};
+
+tests = {
+
+ 'test serialized object': function () {
+ obj = {foo: 'bar'};
+ xml = serialize(obj);
+ res = '<?xml version="1.0" encoding="UTF-8"?><object><foo>bar</foo></object>';
+ assert.equal(res, xml);
+ }
+
+, 'test array of numbers': function () {
+ obj = [1, 2, 3];
+ xml = serialize(obj);
+ res = '<?xml version="1.0" encoding="UTF-8"?><numbers type="array"><number>1</number><number>2</number><number>3</number></numbers>';
+ assert.equal(res, xml);
+ }
+
+, 'test array of strings': function () {
+ obj = ['foo', 'bar'];
+ xml = serialize(obj);
+ res = '<?xml version="1.0" encoding="UTF-8"?><strings type="array"><string>foo</string><string>bar</string></strings>';
+ assert.equal(res, xml);
+ }
+
+, 'test array of mixed datatypes': function () {
+ obj = ['foo', 1];
+ xml = serialize(obj);
+ res = '<?xml version="1.0" encoding="UTF-8"?><records type="array"><record>foo</record><record>1</record></records>';
+ assert.equal(res, xml);
+ }
+
+, 'test array property of an object': function () {
+ obj = {foo: ['bar', 'baz']};
+ xml = serialize(obj);
+ res = '<?xml version="1.0" encoding="UTF-8"?><object><foo type="array"><foo>bar</foo><foo>baz</foo></foo></object>';
+ assert.equal(res, xml);
+ }
+
+, 'test setIndentLevel for xml': function () {
+ var data = XML.setIndentLevel(5)
+ , actual = 5;
+ assert.equal(actual, data)
+ }
+
+, 'test stringify with object for xml': function () {
+ var data = XML.stringify({user: 'name'})
+ , actual = '<?xml version="1.0" encoding="UTF-8"?>\n<object>\n <user>name</user>\n</object>\n';
+ assert.equal(actual, data)
+ }
+
+, 'test stringify with array for xml': function () {
+ var data = XML.stringify(['user'])
+ , actual = '<?xml version="1.0" encoding="UTF-8"?>\n<strings type="array">\n\
+ <string>user</string>\n</strings>';
+ assert.equal(actual, data)
+ }
+
+, 'test stringify with object and no whitespace for xml': function () {
+ var data = XML.stringify({user: 'name'}, {whitespace: false})
+ , actual = '<?xml version="1.0" encoding="UTF-8"?><object><user>name</user></object>';
+ assert.equal(actual, data)
+ }
+
+, 'test stringify with object and name for xml': function () {
+ var data = XML.stringify({user: 'name'}, {name: 'omg'})
+ , actual = '<?xml version="1.0" encoding="UTF-8"?>\n<omg>\n<user>name</user>\n</omg>\n';
+ assert.equal(actual, data)
+ }
+
+, 'test stringify with object and fragment for xml': function () {
+ var data = XML.stringify({user: 'name'}, {fragment: true})
+ , actual = '<object>\n<user>name</user>\n</object>\n';
+ assert.equal(actual, data)
+ }
+
+, 'test stringify with object for xml': function () {
+ var data = XML.stringify({user: 'name'}, {level: 1})
+ , actual = '<?xml version="1.0" encoding="UTF-8"?>\n <user>name</user>\n';
+ assert.equal(actual, data)
+ }
+
+, 'test stringify with array and no arrayRoot for xml': function () {
+ var data = XML.stringify(['user'], {arrayRoot: false})
+ , actual = '<?xml version="1.0" encoding="UTF-8"?>\n<strings type="array">\n\
+<string>user</string>\n</strings>';
+ assert.equal(actual, data)
+ }
+
+
+};
+
+module.exports = tests;
+
[20/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine-html.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine-html.js b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine-html.js
new file mode 100644
index 0000000..c59f2de
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine-html.js
@@ -0,0 +1,182 @@
+jasmine.TrivialReporter = function(doc) {
+ this.document = doc || document;
+ this.suiteDivs = {};
+ this.logRunningSpecs = false;
+};
+
+jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
+ var el = document.createElement(type);
+
+ for (var i = 2; i < arguments.length; i++) {
+ var child = arguments[i];
+
+ if (typeof child === 'string') {
+ el.appendChild(document.createTextNode(child));
+ } else {
+ if (child) { el.appendChild(child); }
+ }
+ }
+
+ for (var attr in attrs) {
+ if (attr == "className") {
+ el[attr] = attrs[attr];
+ } else {
+ el.setAttribute(attr, attrs[attr]);
+ }
+ }
+
+ return el;
+};
+
+jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
+ var showPassed, showSkipped;
+
+ this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' },
+ this.createDom('div', { className: 'banner' },
+ this.createDom('div', { className: 'logo' },
+ this.createDom('a', { href: 'http://pivotal.github.com/jasmine/', target: "_blank" }, "Jasmine"),
+ this.createDom('span', { className: 'version' }, runner.env.versionString())),
+ this.createDom('div', { className: 'options' },
+ "Show ",
+ showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
+ this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
+ showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
+ this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
+ )
+ ),
+
+ this.runnerDiv = this.createDom('div', { className: 'runner running' },
+ this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
+ this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
+ this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
+ );
+
+ this.document.body.appendChild(this.outerDiv);
+
+ var suites = runner.suites();
+ for (var i = 0; i < suites.length; i++) {
+ var suite = suites[i];
+ var suiteDiv = this.createDom('div', { className: 'suite' },
+ this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
+ this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
+ this.suiteDivs[suite.id] = suiteDiv;
+ var parentDiv = this.outerDiv;
+ if (suite.parentSuite) {
+ parentDiv = this.suiteDivs[suite.parentSuite.id];
+ }
+ parentDiv.appendChild(suiteDiv);
+ }
+
+ this.startedAt = new Date();
+
+ var self = this;
+ showPassed.onchange = function(evt) {
+ if (evt.target.checked) {
+ self.outerDiv.className += ' show-passed';
+ } else {
+ self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
+ }
+ };
+
+ showSkipped.onchange = function(evt) {
+ if (evt.target.checked) {
+ self.outerDiv.className += ' show-skipped';
+ } else {
+ self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
+ }
+ };
+};
+
+jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
+ var results = runner.results();
+ var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
+ this.runnerDiv.setAttribute("class", className);
+ //do it twice for IE
+ this.runnerDiv.setAttribute("className", className);
+ var specs = runner.specs();
+ var specCount = 0;
+ for (var i = 0; i < specs.length; i++) {
+ if (this.specFilter(specs[i])) {
+ specCount++;
+ }
+ }
+ var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
+ message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
+ this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
+
+ this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
+};
+
+jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
+ var results = suite.results();
+ var status = results.passed() ? 'passed' : 'failed';
+ if (results.totalCount == 0) { // todo: change this to check results.skipped
+ status = 'skipped';
+ }
+ this.suiteDivs[suite.id].className += " " + status;
+};
+
+jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
+ if (this.logRunningSpecs) {
+ this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
+ }
+};
+
+jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
+ var results = spec.results();
+ var status = results.passed() ? 'passed' : 'failed';
+ if (results.skipped) {
+ status = 'skipped';
+ }
+ var specDiv = this.createDom('div', { className: 'spec ' + status },
+ this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
+ this.createDom('a', {
+ className: 'description',
+ href: '?spec=' + encodeURIComponent(spec.getFullName()),
+ title: spec.getFullName()
+ }, spec.description));
+
+
+ var resultItems = results.getItems();
+ var messagesDiv = this.createDom('div', { className: 'messages' });
+ for (var i = 0; i < resultItems.length; i++) {
+ var result = resultItems[i];
+
+ if (result.type == 'log') {
+ messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
+ } else if (result.type == 'expect' && result.passed && !result.passed()) {
+ messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
+
+ if (result.trace.stack) {
+ messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
+ }
+ }
+ }
+
+ if (messagesDiv.childNodes.length > 0) {
+ specDiv.appendChild(messagesDiv);
+ }
+
+ this.suiteDivs[spec.suite.id].appendChild(specDiv);
+};
+
+jasmine.TrivialReporter.prototype.log = function() {
+ var console = jasmine.getGlobal().console;
+ if (console && console.log) console.log.apply(console, arguments);
+};
+
+jasmine.TrivialReporter.prototype.getLocation = function() {
+ return this.document.location;
+};
+
+jasmine.TrivialReporter.prototype.specFilter = function(spec) {
+ var paramMap = {};
+ var params = this.getLocation().search.substring(1).split('&');
+ for (var i = 0; i < params.length; i++) {
+ var p = params[i].split('=');
+ paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
+ }
+
+ if (!paramMap["spec"]) return true;
+ return spec.getFullName().indexOf(paramMap["spec"]) == 0;
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine.css
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine.css b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine.css
new file mode 100644
index 0000000..6583fe7
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine.css
@@ -0,0 +1,166 @@
+body {
+ font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif;
+}
+
+
+.jasmine_reporter a:visited, .jasmine_reporter a {
+ color: #303;
+}
+
+.jasmine_reporter a:hover, .jasmine_reporter a:active {
+ color: blue;
+}
+
+.run_spec {
+ float:right;
+ padding-right: 5px;
+ font-size: .8em;
+ text-decoration: none;
+}
+
+.jasmine_reporter {
+ margin: 0 5px;
+}
+
+.banner {
+ color: #303;
+ background-color: #fef;
+ padding: 5px;
+}
+
+.logo {
+ float: left;
+ font-size: 1.1em;
+ padding-left: 5px;
+}
+
+.logo .version {
+ font-size: .6em;
+ padding-left: 1em;
+}
+
+.runner.running {
+ background-color: yellow;
+}
+
+
+.options {
+ text-align: right;
+ font-size: .8em;
+}
+
+
+
+
+.suite {
+ border: 1px outset gray;
+ margin: 5px 0;
+ padding-left: 1em;
+}
+
+.suite .suite {
+ margin: 5px;
+}
+
+.suite.passed {
+ background-color: #dfd;
+}
+
+.suite.failed {
+ background-color: #fdd;
+}
+
+.spec {
+ margin: 5px;
+ padding-left: 1em;
+ clear: both;
+}
+
+.spec.failed, .spec.passed, .spec.skipped {
+ padding-bottom: 5px;
+ border: 1px solid gray;
+}
+
+.spec.failed {
+ background-color: #fbb;
+ border-color: red;
+}
+
+.spec.passed {
+ background-color: #bfb;
+ border-color: green;
+}
+
+.spec.skipped {
+ background-color: #bbb;
+}
+
+.messages {
+ border-left: 1px dashed gray;
+ padding-left: 1em;
+ padding-right: 1em;
+}
+
+.passed {
+ background-color: #cfc;
+ display: none;
+}
+
+.failed {
+ background-color: #fbb;
+}
+
+.skipped {
+ color: #777;
+ background-color: #eee;
+ display: none;
+}
+
+
+/*.resultMessage {*/
+ /*white-space: pre;*/
+/*}*/
+
+.resultMessage span.result {
+ display: block;
+ line-height: 2em;
+ color: black;
+}
+
+.resultMessage .mismatch {
+ color: black;
+}
+
+.stackTrace {
+ white-space: pre;
+ font-size: .8em;
+ margin-left: 10px;
+ max-height: 5em;
+ overflow: auto;
+ border: 1px inset red;
+ padding: 1em;
+ background: #eef;
+}
+
+.finished-at {
+ padding-left: 1em;
+ font-size: .6em;
+}
+
+.show-passed .passed,
+.show-skipped .skipped {
+ display: block;
+}
+
+
+#jasmine_content {
+ position:fixed;
+ right: 100%;
+}
+
+.runner {
+ border: 1px solid gray;
+ display: block;
+ margin: 5px 0;
+ padding: 2px 0 2px 10px;
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine.js b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine.js
new file mode 100644
index 0000000..68baf53
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jasmine.js
@@ -0,0 +1,2421 @@
+/**
+ * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
+ *
+ * @namespace
+ */
+var jasmine = {};
+
+/**
+ * @private
+ */
+jasmine.unimplementedMethod_ = function() {
+ throw new Error("unimplemented method");
+};
+
+/**
+ * Use <code>jasmine.undefined</code> instead of <code>undefined</code>, since <code>undefined</code> is just
+ * a plain old variable and may be redefined by somebody else.
+ *
+ * @private
+ */
+jasmine.undefined = jasmine.___undefined___;
+
+/**
+ * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed.
+ *
+ */
+jasmine.DEFAULT_UPDATE_INTERVAL = 250;
+
+/**
+ * Default timeout interval in milliseconds for waitsFor() blocks.
+ */
+jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;
+
+jasmine.getGlobal = function() {
+ function getGlobal() {
+ return this;
+ }
+
+ return getGlobal();
+};
+
+/**
+ * Allows for bound functions to be compared. Internal use only.
+ *
+ * @ignore
+ * @private
+ * @param base {Object} bound 'this' for the function
+ * @param name {Function} function to find
+ */
+jasmine.bindOriginal_ = function(base, name) {
+ var original = base[name];
+ if (original.apply) {
+ return function() {
+ return original.apply(base, arguments);
+ };
+ } else {
+ // IE support
+ return jasmine.getGlobal()[name];
+ }
+};
+
+jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout');
+jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout');
+jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval');
+jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval');
+
+jasmine.MessageResult = function(values) {
+ this.type = 'log';
+ this.values = values;
+ this.trace = new Error(); // todo: test better
+};
+
+jasmine.MessageResult.prototype.toString = function() {
+ var text = "";
+ for(var i = 0; i < this.values.length; i++) {
+ if (i > 0) text += " ";
+ if (jasmine.isString_(this.values[i])) {
+ text += this.values[i];
+ } else {
+ text += jasmine.pp(this.values[i]);
+ }
+ }
+ return text;
+};
+
+jasmine.ExpectationResult = function(params) {
+ this.type = 'expect';
+ this.matcherName = params.matcherName;
+ this.passed_ = params.passed;
+ this.expected = params.expected;
+ this.actual = params.actual;
+
+ this.message = this.passed_ ? 'Passed.' : params.message;
+ this.trace = this.passed_ ? '' : new Error(this.message);
+};
+
+jasmine.ExpectationResult.prototype.toString = function () {
+ return this.message;
+};
+
+jasmine.ExpectationResult.prototype.passed = function () {
+ return this.passed_;
+};
+
+/**
+ * Getter for the Jasmine environment. Ensures one gets created
+ */
+jasmine.getEnv = function() {
+ return jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env();
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isArray_ = function(value) {
+ return jasmine.isA_("Array", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isString_ = function(value) {
+ return jasmine.isA_("String", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isNumber_ = function(value) {
+ return jasmine.isA_("Number", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param {String} typeName
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isA_ = function(typeName, value) {
+ return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';
+};
+
+/**
+ * Pretty printer for expecations. Takes any object and turns it into a human-readable string.
+ *
+ * @param value {Object} an object to be outputted
+ * @returns {String}
+ */
+jasmine.pp = function(value) {
+ var stringPrettyPrinter = new jasmine.StringPrettyPrinter();
+ stringPrettyPrinter.format(value);
+ return stringPrettyPrinter.string;
+};
+
+/**
+ * Returns true if the object is a DOM Node.
+ *
+ * @param {Object} obj object to check
+ * @returns {Boolean}
+ */
+jasmine.isDomNode = function(obj) {
+ return obj['nodeType'] > 0;
+};
+
+/**
+ * Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter.
+ *
+ * @example
+ * // don't care about which function is passed in, as long as it's a function
+ * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function));
+ *
+ * @param {Class} clazz
+ * @returns matchable object of the type clazz
+ */
+jasmine.any = function(clazz) {
+ return new jasmine.Matchers.Any(clazz);
+};
+
+/**
+ * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
+ *
+ * Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine
+ * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
+ *
+ * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).
+ *
+ * Spies are torn down at the end of every spec.
+ *
+ * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
+ *
+ * @example
+ * // a stub
+ * var myStub = jasmine.createSpy('myStub'); // can be used anywhere
+ *
+ * // spy example
+ * var foo = {
+ * not: function(bool) { return !bool; }
+ * }
+ *
+ * // actual foo.not will not be called, execution stops
+ * spyOn(foo, 'not');
+
+ // foo.not spied upon, execution will continue to implementation
+ * spyOn(foo, 'not').andCallThrough();
+ *
+ * // fake example
+ * var foo = {
+ * not: function(bool) { return !bool; }
+ * }
+ *
+ * // foo.not(val) will return val
+ * spyOn(foo, 'not').andCallFake(function(value) {return value;});
+ *
+ * // mock example
+ * foo.not(7 == 7);
+ * expect(foo.not).toHaveBeenCalled();
+ * expect(foo.not).toHaveBeenCalledWith(true);
+ *
+ * @constructor
+ * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
+ * @param {String} name
+ */
+jasmine.Spy = function(name) {
+ /**
+ * The name of the spy, if provided.
+ */
+ this.identity = name || 'unknown';
+ /**
+ * Is this Object a spy?
+ */
+ this.isSpy = true;
+ /**
+ * The actual function this spy stubs.
+ */
+ this.plan = function() {
+ };
+ /**
+ * Tracking of the most recent call to the spy.
+ * @example
+ * var mySpy = jasmine.createSpy('foo');
+ * mySpy(1, 2);
+ * mySpy.mostRecentCall.args = [1, 2];
+ */
+ this.mostRecentCall = {};
+
+ /**
+ * Holds arguments for each call to the spy, indexed by call count
+ * @example
+ * var mySpy = jasmine.createSpy('foo');
+ * mySpy(1, 2);
+ * mySpy(7, 8);
+ * mySpy.mostRecentCall.args = [7, 8];
+ * mySpy.argsForCall[0] = [1, 2];
+ * mySpy.argsForCall[1] = [7, 8];
+ */
+ this.argsForCall = [];
+ this.calls = [];
+};
+
+/**
+ * Tells a spy to call through to the actual implemenatation.
+ *
+ * @example
+ * var foo = {
+ * bar: function() { // do some stuff }
+ * }
+ *
+ * // defining a spy on an existing property: foo.bar
+ * spyOn(foo, 'bar').andCallThrough();
+ */
+jasmine.Spy.prototype.andCallThrough = function() {
+ this.plan = this.originalValue;
+ return this;
+};
+
+/**
+ * For setting the return value of a spy.
+ *
+ * @example
+ * // defining a spy from scratch: foo() returns 'baz'
+ * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
+ *
+ * // defining a spy on an existing property: foo.bar() returns 'baz'
+ * spyOn(foo, 'bar').andReturn('baz');
+ *
+ * @param {Object} value
+ */
+jasmine.Spy.prototype.andReturn = function(value) {
+ this.plan = function() {
+ return value;
+ };
+ return this;
+};
+
+/**
+ * For throwing an exception when a spy is called.
+ *
+ * @example
+ * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
+ * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
+ *
+ * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
+ * spyOn(foo, 'bar').andThrow('baz');
+ *
+ * @param {String} exceptionMsg
+ */
+jasmine.Spy.prototype.andThrow = function(exceptionMsg) {
+ this.plan = function() {
+ throw exceptionMsg;
+ };
+ return this;
+};
+
+/**
+ * Calls an alternate implementation when a spy is called.
+ *
+ * @example
+ * var baz = function() {
+ * // do some stuff, return something
+ * }
+ * // defining a spy from scratch: foo() calls the function baz
+ * var foo = jasmine.createSpy('spy on foo').andCall(baz);
+ *
+ * // defining a spy on an existing property: foo.bar() calls an anonymnous function
+ * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
+ *
+ * @param {Function} fakeFunc
+ */
+jasmine.Spy.prototype.andCallFake = function(fakeFunc) {
+ this.plan = fakeFunc;
+ return this;
+};
+
+/**
+ * Resets all of a spy's the tracking variables so that it can be used again.
+ *
+ * @example
+ * spyOn(foo, 'bar');
+ *
+ * foo.bar();
+ *
+ * expect(foo.bar.callCount).toEqual(1);
+ *
+ * foo.bar.reset();
+ *
+ * expect(foo.bar.callCount).toEqual(0);
+ */
+jasmine.Spy.prototype.reset = function() {
+ this.wasCalled = false;
+ this.callCount = 0;
+ this.argsForCall = [];
+ this.calls = [];
+ this.mostRecentCall = {};
+};
+
+jasmine.createSpy = function(name) {
+
+ var spyObj = function() {
+ spyObj.wasCalled = true;
+ spyObj.callCount++;
+ var args = jasmine.util.argsToArray(arguments);
+ spyObj.mostRecentCall.object = this;
+ spyObj.mostRecentCall.args = args;
+ spyObj.argsForCall.push(args);
+ spyObj.calls.push({object: this, args: args});
+ return spyObj.plan.apply(this, arguments);
+ };
+
+ var spy = new jasmine.Spy(name);
+
+ for (var prop in spy) {
+ spyObj[prop] = spy[prop];
+ }
+
+ spyObj.reset();
+
+ return spyObj;
+};
+
+/**
+ * Determines whether an object is a spy.
+ *
+ * @param {jasmine.Spy|Object} putativeSpy
+ * @returns {Boolean}
+ */
+jasmine.isSpy = function(putativeSpy) {
+ return putativeSpy && putativeSpy.isSpy;
+};
+
+/**
+ * Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something
+ * large in one call.
+ *
+ * @param {String} baseName name of spy class
+ * @param {Array} methodNames array of names of methods to make spies
+ */
+jasmine.createSpyObj = function(baseName, methodNames) {
+ if (!jasmine.isArray_(methodNames) || methodNames.length == 0) {
+ throw new Error('createSpyObj requires a non-empty array of method names to create spies for');
+ }
+ var obj = {};
+ for (var i = 0; i < methodNames.length; i++) {
+ obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]);
+ }
+ return obj;
+};
+
+/**
+ * All parameters are pretty-printed and concatenated together, then written to the current spec's output.
+ *
+ * Be careful not to leave calls to <code>jasmine.log</code> in production code.
+ */
+jasmine.log = function() {
+ var spec = jasmine.getEnv().currentSpec;
+ spec.log.apply(spec, arguments);
+};
+
+/**
+ * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy.
+ *
+ * @example
+ * // spy example
+ * var foo = {
+ * not: function(bool) { return !bool; }
+ * }
+ * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
+ *
+ * @see jasmine.createSpy
+ * @param obj
+ * @param methodName
+ * @returns a Jasmine spy that can be chained with all spy methods
+ */
+var spyOn = function(obj, methodName) {
+ return jasmine.getEnv().currentSpec.spyOn(obj, methodName);
+};
+
+/**
+ * Creates a Jasmine spec that will be added to the current suite.
+ *
+ * // TODO: pending tests
+ *
+ * @example
+ * it('should be true', function() {
+ * expect(true).toEqual(true);
+ * });
+ *
+ * @param {String} desc description of this specification
+ * @param {Function} func defines the preconditions and expectations of the spec
+ */
+var it = function(desc, func) {
+ return jasmine.getEnv().it(desc, func);
+};
+
+/**
+ * Creates a <em>disabled</em> Jasmine spec.
+ *
+ * A convenience method that allows existing specs to be disabled temporarily during development.
+ *
+ * @param {String} desc description of this specification
+ * @param {Function} func defines the preconditions and expectations of the spec
+ */
+var xit = function(desc, func) {
+ return jasmine.getEnv().xit(desc, func);
+};
+
+/**
+ * Starts a chain for a Jasmine expectation.
+ *
+ * It is passed an Object that is the actual value and should chain to one of the many
+ * jasmine.Matchers functions.
+ *
+ * @param {Object} actual Actual value to test against and expected value
+ */
+var expect = function(actual) {
+ return jasmine.getEnv().currentSpec.expect(actual);
+};
+
+/**
+ * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.
+ *
+ * @param {Function} func Function that defines part of a jasmine spec.
+ */
+var runs = function(func) {
+ jasmine.getEnv().currentSpec.runs(func);
+};
+
+/**
+ * Waits a fixed time period before moving to the next block.
+ *
+ * @deprecated Use waitsFor() instead
+ * @param {Number} timeout milliseconds to wait
+ */
+var waits = function(timeout) {
+ jasmine.getEnv().currentSpec.waits(timeout);
+};
+
+/**
+ * Waits for the latchFunction to return true before proceeding to the next block.
+ *
+ * @param {Function} latchFunction
+ * @param {String} optional_timeoutMessage
+ * @param {Number} optional_timeout
+ */
+var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
+ jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments);
+};
+
+/**
+ * A function that is called before each spec in a suite.
+ *
+ * Used for spec setup, including validating assumptions.
+ *
+ * @param {Function} beforeEachFunction
+ */
+var beforeEach = function(beforeEachFunction) {
+ jasmine.getEnv().beforeEach(beforeEachFunction);
+};
+
+/**
+ * A function that is called after each spec in a suite.
+ *
+ * Used for restoring any state that is hijacked during spec execution.
+ *
+ * @param {Function} afterEachFunction
+ */
+var afterEach = function(afterEachFunction) {
+ jasmine.getEnv().afterEach(afterEachFunction);
+};
+
+/**
+ * Defines a suite of specifications.
+ *
+ * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
+ * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
+ * of setup in some tests.
+ *
+ * @example
+ * // TODO: a simple suite
+ *
+ * // TODO: a simple suite with a nested describe block
+ *
+ * @param {String} description A string, usually the class under test.
+ * @param {Function} specDefinitions function that defines several specs.
+ */
+var describe = function(description, specDefinitions) {
+ return jasmine.getEnv().describe(description, specDefinitions);
+};
+
+/**
+ * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.
+ *
+ * @param {String} description A string, usually the class under test.
+ * @param {Function} specDefinitions function that defines several specs.
+ */
+var xdescribe = function(description, specDefinitions) {
+ return jasmine.getEnv().xdescribe(description, specDefinitions);
+};
+
+
+// Provide the XMLHttpRequest class for IE 5.x-6.x:
+jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() {
+ try {
+ return new ActiveXObject("Msxml2.XMLHTTP.6.0");
+ } catch(e) {
+ }
+ try {
+ return new ActiveXObject("Msxml2.XMLHTTP.3.0");
+ } catch(e) {
+ }
+ try {
+ return new ActiveXObject("Msxml2.XMLHTTP");
+ } catch(e) {
+ }
+ try {
+ return new ActiveXObject("Microsoft.XMLHTTP");
+ } catch(e) {
+ }
+ throw new Error("This browser does not support XMLHttpRequest.");
+} : XMLHttpRequest;
+/**
+ * @namespace
+ */
+jasmine.util = {};
+
+/**
+ * Declare that a child class inherit it's prototype from the parent class.
+ *
+ * @private
+ * @param {Function} childClass
+ * @param {Function} parentClass
+ */
+jasmine.util.inherit = function(childClass, parentClass) {
+ /**
+ * @private
+ */
+ var subclass = function() {
+ };
+ subclass.prototype = parentClass.prototype;
+ childClass.prototype = new subclass;
+};
+
+jasmine.util.formatException = function(e) {
+ var lineNumber;
+ if (e.line) {
+ lineNumber = e.line;
+ }
+ else if (e.lineNumber) {
+ lineNumber = e.lineNumber;
+ }
+
+ var file;
+
+ if (e.sourceURL) {
+ file = e.sourceURL;
+ }
+ else if (e.fileName) {
+ file = e.fileName;
+ }
+
+ var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
+
+ if (file && lineNumber) {
+ message += ' in ' + file + ' (line ' + lineNumber + ')';
+ }
+
+ return message;
+};
+
+jasmine.util.htmlEscape = function(str) {
+ if (!str) return str;
+ return str.replace(/&/g, '&')
+ .replace(/</g, '<')
+ .replace(/>/g, '>');
+};
+
+jasmine.util.argsToArray = function(args) {
+ var arrayOfArgs = [];
+ for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
+ return arrayOfArgs;
+};
+
+jasmine.util.extend = function(destination, source) {
+ for (var property in source) destination[property] = source[property];
+ return destination;
+};
+
+/**
+ * Environment for Jasmine
+ *
+ * @constructor
+ */
+jasmine.Env = function() {
+ this.currentSpec = null;
+ this.currentSuite = null;
+ this.currentRunner_ = new jasmine.Runner(this);
+
+ this.reporter = new jasmine.MultiReporter();
+
+ this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL;
+ this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL;
+ this.lastUpdate = 0;
+ this.specFilter = function() {
+ return true;
+ };
+
+ this.nextSpecId_ = 0;
+ this.nextSuiteId_ = 0;
+ this.equalityTesters_ = [];
+
+ // wrap matchers
+ this.matchersClass = function() {
+ jasmine.Matchers.apply(this, arguments);
+ };
+ jasmine.util.inherit(this.matchersClass, jasmine.Matchers);
+
+ jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass);
+};
+
+
+jasmine.Env.prototype.setTimeout = jasmine.setTimeout;
+jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
+jasmine.Env.prototype.setInterval = jasmine.setInterval;
+jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
+
+/**
+ * @returns an object containing jasmine version build info, if set.
+ */
+jasmine.Env.prototype.version = function () {
+ if (jasmine.version_) {
+ return jasmine.version_;
+ } else {
+ throw new Error('Version not set');
+ }
+};
+
+/**
+ * @returns string containing jasmine version build info, if set.
+ */
+jasmine.Env.prototype.versionString = function() {
+ if (jasmine.version_) {
+ var version = this.version();
+ return version.major + "." + version.minor + "." + version.build + " revision " + version.revision;
+ } else {
+ return "version unknown";
+ }
+};
+
+/**
+ * @returns a sequential integer starting at 0
+ */
+jasmine.Env.prototype.nextSpecId = function () {
+ return this.nextSpecId_++;
+};
+
+/**
+ * @returns a sequential integer starting at 0
+ */
+jasmine.Env.prototype.nextSuiteId = function () {
+ return this.nextSuiteId_++;
+};
+
+/**
+ * Register a reporter to receive status updates from Jasmine.
+ * @param {jasmine.Reporter} reporter An object which will receive status updates.
+ */
+jasmine.Env.prototype.addReporter = function(reporter) {
+ this.reporter.addReporter(reporter);
+};
+
+jasmine.Env.prototype.execute = function() {
+ this.currentRunner_.execute();
+};
+
+jasmine.Env.prototype.describe = function(description, specDefinitions) {
+ var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite);
+
+ var parentSuite = this.currentSuite;
+ if (parentSuite) {
+ parentSuite.add(suite);
+ } else {
+ this.currentRunner_.add(suite);
+ }
+
+ this.currentSuite = suite;
+
+ var declarationError = null;
+ try {
+ specDefinitions.call(suite);
+ } catch(e) {
+ declarationError = e;
+ }
+
+ this.currentSuite = parentSuite;
+
+ if (declarationError) {
+ this.it("encountered a declaration exception", function() {
+ throw declarationError;
+ });
+ }
+
+ return suite;
+};
+
+jasmine.Env.prototype.beforeEach = function(beforeEachFunction) {
+ if (this.currentSuite) {
+ this.currentSuite.beforeEach(beforeEachFunction);
+ } else {
+ this.currentRunner_.beforeEach(beforeEachFunction);
+ }
+};
+
+jasmine.Env.prototype.currentRunner = function () {
+ return this.currentRunner_;
+};
+
+jasmine.Env.prototype.afterEach = function(afterEachFunction) {
+ if (this.currentSuite) {
+ this.currentSuite.afterEach(afterEachFunction);
+ } else {
+ this.currentRunner_.afterEach(afterEachFunction);
+ }
+
+};
+
+jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) {
+ return {
+ execute: function() {
+ }
+ };
+};
+
+jasmine.Env.prototype.it = function(description, func) {
+ var spec = new jasmine.Spec(this, this.currentSuite, description);
+ this.currentSuite.add(spec);
+ this.currentSpec = spec;
+
+ if (func) {
+ spec.runs(func);
+ }
+
+ return spec;
+};
+
+jasmine.Env.prototype.xit = function(desc, func) {
+ return {
+ id: this.nextSpecId(),
+ runs: function() {
+ }
+ };
+};
+
+jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
+ if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
+ return true;
+ }
+
+ a.__Jasmine_been_here_before__ = b;
+ b.__Jasmine_been_here_before__ = a;
+
+ var hasKey = function(obj, keyName) {
+ return obj != null && obj[keyName] !== jasmine.undefined;
+ };
+
+ for (var property in b) {
+ if (!hasKey(a, property) && hasKey(b, property)) {
+ mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
+ }
+ }
+ for (property in a) {
+ if (!hasKey(b, property) && hasKey(a, property)) {
+ mismatchKeys.push("expected missing key '" + property + "', but present in actual.");
+ }
+ }
+ for (property in b) {
+ if (property == '__Jasmine_been_here_before__') continue;
+ if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) {
+ mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual.");
+ }
+ }
+
+ if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) {
+ mismatchValues.push("arrays were not the same length");
+ }
+
+ delete a.__Jasmine_been_here_before__;
+ delete b.__Jasmine_been_here_before__;
+ return (mismatchKeys.length == 0 && mismatchValues.length == 0);
+};
+
+jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
+ mismatchKeys = mismatchKeys || [];
+ mismatchValues = mismatchValues || [];
+
+ for (var i = 0; i < this.equalityTesters_.length; i++) {
+ var equalityTester = this.equalityTesters_[i];
+ var result = equalityTester(a, b, this, mismatchKeys, mismatchValues);
+ if (result !== jasmine.undefined) return result;
+ }
+
+ if (a === b) return true;
+
+ if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) {
+ return (a == jasmine.undefined && b == jasmine.undefined);
+ }
+
+ if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) {
+ return a === b;
+ }
+
+ if (a instanceof Date && b instanceof Date) {
+ return a.getTime() == b.getTime();
+ }
+
+ if (a instanceof jasmine.Matchers.Any) {
+ return a.matches(b);
+ }
+
+ if (b instanceof jasmine.Matchers.Any) {
+ return b.matches(a);
+ }
+
+ if (jasmine.isString_(a) && jasmine.isString_(b)) {
+ return (a == b);
+ }
+
+ if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) {
+ return (a == b);
+ }
+
+ if (typeof a === "object" && typeof b === "object") {
+ return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
+ }
+
+ //Straight check
+ return (a === b);
+};
+
+jasmine.Env.prototype.contains_ = function(haystack, needle) {
+ if (jasmine.isArray_(haystack)) {
+ for (var i = 0; i < haystack.length; i++) {
+ if (this.equals_(haystack[i], needle)) return true;
+ }
+ return false;
+ }
+ return haystack.indexOf(needle) >= 0;
+};
+
+jasmine.Env.prototype.addEqualityTester = function(equalityTester) {
+ this.equalityTesters_.push(equalityTester);
+};
+/** No-op base class for Jasmine reporters.
+ *
+ * @constructor
+ */
+jasmine.Reporter = function() {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportRunnerStarting = function(runner) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportRunnerResults = function(runner) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSuiteResults = function(suite) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSpecStarting = function(spec) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSpecResults = function(spec) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.log = function(str) {
+};
+
+/**
+ * Blocks are functions with executable code that make up a spec.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {Function} func
+ * @param {jasmine.Spec} spec
+ */
+jasmine.Block = function(env, func, spec) {
+ this.env = env;
+ this.func = func;
+ this.spec = spec;
+};
+
+jasmine.Block.prototype.execute = function(onComplete) {
+ try {
+ this.func.apply(this.spec);
+ } catch (e) {
+ this.spec.fail(e);
+ }
+ onComplete();
+};
+/** JavaScript API reporter.
+ *
+ * @constructor
+ */
+jasmine.JsApiReporter = function() {
+ this.started = false;
+ this.finished = false;
+ this.suites_ = [];
+ this.results_ = {};
+};
+
+jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) {
+ this.started = true;
+ var suites = runner.topLevelSuites();
+ for (var i = 0; i < suites.length; i++) {
+ var suite = suites[i];
+ this.suites_.push(this.summarize_(suite));
+ }
+};
+
+jasmine.JsApiReporter.prototype.suites = function() {
+ return this.suites_;
+};
+
+jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
+ var isSuite = suiteOrSpec instanceof jasmine.Suite;
+ var summary = {
+ id: suiteOrSpec.id,
+ name: suiteOrSpec.description,
+ type: isSuite ? 'suite' : 'spec',
+ children: []
+ };
+
+ if (isSuite) {
+ var children = suiteOrSpec.children();
+ for (var i = 0; i < children.length; i++) {
+ summary.children.push(this.summarize_(children[i]));
+ }
+ }
+ return summary;
+};
+
+jasmine.JsApiReporter.prototype.results = function() {
+ return this.results_;
+};
+
+jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) {
+ return this.results_[specId];
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) {
+ this.finished = true;
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) {
+ this.results_[spec.id] = {
+ messages: spec.results().getItems(),
+ result: spec.results().failedCount > 0 ? "failed" : "passed"
+ };
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.log = function(str) {
+};
+
+jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){
+ var results = {};
+ for (var i = 0; i < specIds.length; i++) {
+ var specId = specIds[i];
+ results[specId] = this.summarizeResult_(this.results_[specId]);
+ }
+ return results;
+};
+
+jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
+ var summaryMessages = [];
+ var messagesLength = result.messages.length;
+ for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {
+ var resultMessage = result.messages[messageIndex];
+ summaryMessages.push({
+ text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined,
+ passed: resultMessage.passed ? resultMessage.passed() : true,
+ type: resultMessage.type,
+ message: resultMessage.message,
+ trace: {
+ stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined
+ }
+ });
+ }
+
+ return {
+ result : result.result,
+ messages : summaryMessages
+ };
+};
+
+/**
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param actual
+ * @param {jasmine.Spec} spec
+ */
+jasmine.Matchers = function(env, actual, spec, opt_isNot) {
+ this.env = env;
+ this.actual = actual;
+ this.spec = spec;
+ this.isNot = opt_isNot || false;
+ this.reportWasCalled_ = false;
+};
+
+// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
+jasmine.Matchers.pp = function(str) {
+ throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!");
+};
+
+// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw]
+jasmine.Matchers.prototype.report = function(result, failing_message, details) {
+ throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs");
+};
+
+jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {
+ for (var methodName in prototype) {
+ if (methodName == 'report') continue;
+ var orig = prototype[methodName];
+ matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);
+ }
+};
+
+jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
+ return function() {
+ var matcherArgs = jasmine.util.argsToArray(arguments);
+ var result = matcherFunction.apply(this, arguments);
+
+ if (this.isNot) {
+ result = !result;
+ }
+
+ if (this.reportWasCalled_) return result;
+
+ var message;
+ if (!result) {
+ if (this.message) {
+ message = this.message.apply(this, arguments);
+ if (jasmine.isArray_(message)) {
+ message = message[this.isNot ? 1 : 0];
+ }
+ } else {
+ var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });
+ message = "Expected " + jasmine.pp(this.actual) + (this.isNot ? " not " : " ") + englishyPredicate;
+ if (matcherArgs.length > 0) {
+ for (var i = 0; i < matcherArgs.length; i++) {
+ if (i > 0) message += ",";
+ message += " " + jasmine.pp(matcherArgs[i]);
+ }
+ }
+ message += ".";
+ }
+ }
+ var expectationResult = new jasmine.ExpectationResult({
+ matcherName: matcherName,
+ passed: result,
+ expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0],
+ actual: this.actual,
+ message: message
+ });
+ this.spec.addMatcherResult(expectationResult);
+ return jasmine.undefined;
+ };
+};
+
+
+
+
+/**
+ * toBe: compares the actual to the expected using ===
+ * @param expected
+ */
+jasmine.Matchers.prototype.toBe = function(expected) {
+ return this.actual === expected;
+};
+
+/**
+ * toNotBe: compares the actual to the expected using !==
+ * @param expected
+ * @deprecated as of 1.0. Use not.toBe() instead.
+ */
+jasmine.Matchers.prototype.toNotBe = function(expected) {
+ return this.actual !== expected;
+};
+
+/**
+ * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
+ *
+ * @param expected
+ */
+jasmine.Matchers.prototype.toEqual = function(expected) {
+ return this.env.equals_(this.actual, expected);
+};
+
+/**
+ * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
+ * @param expected
+ * @deprecated as of 1.0. Use not.toNotEqual() instead.
+ */
+jasmine.Matchers.prototype.toNotEqual = function(expected) {
+ return !this.env.equals_(this.actual, expected);
+};
+
+/**
+ * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes
+ * a pattern or a String.
+ *
+ * @param expected
+ */
+jasmine.Matchers.prototype.toMatch = function(expected) {
+ return new RegExp(expected).test(this.actual);
+};
+
+/**
+ * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
+ * @param expected
+ * @deprecated as of 1.0. Use not.toMatch() instead.
+ */
+jasmine.Matchers.prototype.toNotMatch = function(expected) {
+ return !(new RegExp(expected).test(this.actual));
+};
+
+/**
+ * Matcher that compares the actual to jasmine.undefined.
+ */
+jasmine.Matchers.prototype.toBeDefined = function() {
+ return (this.actual !== jasmine.undefined);
+};
+
+/**
+ * Matcher that compares the actual to jasmine.undefined.
+ */
+jasmine.Matchers.prototype.toBeUndefined = function() {
+ return (this.actual === jasmine.undefined);
+};
+
+/**
+ * Matcher that compares the actual to null.
+ */
+jasmine.Matchers.prototype.toBeNull = function() {
+ return (this.actual === null);
+};
+
+/**
+ * Matcher that boolean not-nots the actual.
+ */
+jasmine.Matchers.prototype.toBeTruthy = function() {
+ return !!this.actual;
+};
+
+
+/**
+ * Matcher that boolean nots the actual.
+ */
+jasmine.Matchers.prototype.toBeFalsy = function() {
+ return !this.actual;
+};
+
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was called.
+ */
+jasmine.Matchers.prototype.toHaveBeenCalled = function() {
+ if (arguments.length > 0) {
+ throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');
+ }
+
+ if (!jasmine.isSpy(this.actual)) {
+ throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+ }
+
+ this.message = function() {
+ return [
+ "Expected spy " + this.actual.identity + " to have been called.",
+ "Expected spy " + this.actual.identity + " not to have been called."
+ ];
+ };
+
+ return this.actual.wasCalled;
+};
+
+/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */
+jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled;
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was not called.
+ *
+ * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead
+ */
+jasmine.Matchers.prototype.wasNotCalled = function() {
+ if (arguments.length > 0) {
+ throw new Error('wasNotCalled does not take arguments');
+ }
+
+ if (!jasmine.isSpy(this.actual)) {
+ throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+ }
+
+ this.message = function() {
+ return [
+ "Expected spy " + this.actual.identity + " to not have been called.",
+ "Expected spy " + this.actual.identity + " to have been called."
+ ];
+ };
+
+ return !this.actual.wasCalled;
+};
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.
+ *
+ * @example
+ *
+ */
+jasmine.Matchers.prototype.toHaveBeenCalledWith = function() {
+ var expectedArgs = jasmine.util.argsToArray(arguments);
+ if (!jasmine.isSpy(this.actual)) {
+ throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+ }
+ this.message = function() {
+ if (this.actual.callCount == 0) {
+ // todo: what should the failure message for .not.toHaveBeenCalledWith() be? is this right? test better. [xw]
+ return [
+ "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was never called.",
+ "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was."
+ ];
+ } else {
+ return [
+ "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall),
+ "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall)
+ ];
+ }
+ };
+
+ return this.env.contains_(this.actual.argsForCall, expectedArgs);
+};
+
+/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */
+jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith;
+
+/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */
+jasmine.Matchers.prototype.wasNotCalledWith = function() {
+ var expectedArgs = jasmine.util.argsToArray(arguments);
+ if (!jasmine.isSpy(this.actual)) {
+ throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+ }
+
+ this.message = function() {
+ return [
+ "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was",
+ "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was"
+ ]
+ };
+
+ return !this.env.contains_(this.actual.argsForCall, expectedArgs);
+};
+
+/**
+ * Matcher that checks that the expected item is an element in the actual Array.
+ *
+ * @param {Object} expected
+ */
+jasmine.Matchers.prototype.toContain = function(expected) {
+ return this.env.contains_(this.actual, expected);
+};
+
+/**
+ * Matcher that checks that the expected item is NOT an element in the actual Array.
+ *
+ * @param {Object} expected
+ * @deprecated as of 1.0. Use not.toNotContain() instead.
+ */
+jasmine.Matchers.prototype.toNotContain = function(expected) {
+ return !this.env.contains_(this.actual, expected);
+};
+
+jasmine.Matchers.prototype.toBeLessThan = function(expected) {
+ return this.actual < expected;
+};
+
+jasmine.Matchers.prototype.toBeGreaterThan = function(expected) {
+ return this.actual > expected;
+};
+
+/**
+ * Matcher that checks that the expected exception was thrown by the actual.
+ *
+ * @param {String} expected
+ */
+jasmine.Matchers.prototype.toThrow = function(expected) {
+ var result = false;
+ var exception;
+ if (typeof this.actual != 'function') {
+ throw new Error('Actual is not a function');
+ }
+ try {
+ this.actual();
+ } catch (e) {
+ exception = e;
+ }
+ if (exception) {
+ result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected));
+ }
+
+ var not = this.isNot ? "not " : "";
+
+ this.message = function() {
+ if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {
+ return ["Expected function " + not + "to throw", expected ? expected.message || expected : " an exception", ", but it threw", exception.message || exception].join(' ');
+ } else {
+ return "Expected function to throw an exception.";
+ }
+ };
+
+ return result;
+};
+
+jasmine.Matchers.Any = function(expectedClass) {
+ this.expectedClass = expectedClass;
+};
+
+jasmine.Matchers.Any.prototype.matches = function(other) {
+ if (this.expectedClass == String) {
+ return typeof other == 'string' || other instanceof String;
+ }
+
+ if (this.expectedClass == Number) {
+ return typeof other == 'number' || other instanceof Number;
+ }
+
+ if (this.expectedClass == Function) {
+ return typeof other == 'function' || other instanceof Function;
+ }
+
+ if (this.expectedClass == Object) {
+ return typeof other == 'object';
+ }
+
+ return other instanceof this.expectedClass;
+};
+
+jasmine.Matchers.Any.prototype.toString = function() {
+ return '<jasmine.any(' + this.expectedClass + ')>';
+};
+
+/**
+ * @constructor
+ */
+jasmine.MultiReporter = function() {
+ this.subReporters_ = [];
+};
+jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter);
+
+jasmine.MultiReporter.prototype.addReporter = function(reporter) {
+ this.subReporters_.push(reporter);
+};
+
+(function() {
+ var functionNames = [
+ "reportRunnerStarting",
+ "reportRunnerResults",
+ "reportSuiteResults",
+ "reportSpecStarting",
+ "reportSpecResults",
+ "log"
+ ];
+ for (var i = 0; i < functionNames.length; i++) {
+ var functionName = functionNames[i];
+ jasmine.MultiReporter.prototype[functionName] = (function(functionName) {
+ return function() {
+ for (var j = 0; j < this.subReporters_.length; j++) {
+ var subReporter = this.subReporters_[j];
+ if (subReporter[functionName]) {
+ subReporter[functionName].apply(subReporter, arguments);
+ }
+ }
+ };
+ })(functionName);
+ }
+})();
+/**
+ * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
+ *
+ * @constructor
+ */
+jasmine.NestedResults = function() {
+ /**
+ * The total count of results
+ */
+ this.totalCount = 0;
+ /**
+ * Number of passed results
+ */
+ this.passedCount = 0;
+ /**
+ * Number of failed results
+ */
+ this.failedCount = 0;
+ /**
+ * Was this suite/spec skipped?
+ */
+ this.skipped = false;
+ /**
+ * @ignore
+ */
+ this.items_ = [];
+};
+
+/**
+ * Roll up the result counts.
+ *
+ * @param result
+ */
+jasmine.NestedResults.prototype.rollupCounts = function(result) {
+ this.totalCount += result.totalCount;
+ this.passedCount += result.passedCount;
+ this.failedCount += result.failedCount;
+};
+
+/**
+ * Adds a log message.
+ * @param values Array of message parts which will be concatenated later.
+ */
+jasmine.NestedResults.prototype.log = function(values) {
+ this.items_.push(new jasmine.MessageResult(values));
+};
+
+/**
+ * Getter for the results: message & results.
+ */
+jasmine.NestedResults.prototype.getItems = function() {
+ return this.items_;
+};
+
+/**
+ * Adds a result, tracking counts (total, passed, & failed)
+ * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
+ */
+jasmine.NestedResults.prototype.addResult = function(result) {
+ if (result.type != 'log') {
+ if (result.items_) {
+ this.rollupCounts(result);
+ } else {
+ this.totalCount++;
+ if (result.passed()) {
+ this.passedCount++;
+ } else {
+ this.failedCount++;
+ }
+ }
+ }
+ this.items_.push(result);
+};
+
+/**
+ * @returns {Boolean} True if <b>everything</b> below passed
+ */
+jasmine.NestedResults.prototype.passed = function() {
+ return this.passedCount === this.totalCount;
+};
+/**
+ * Base class for pretty printing for expectation results.
+ */
+jasmine.PrettyPrinter = function() {
+ this.ppNestLevel_ = 0;
+};
+
+/**
+ * Formats a value in a nice, human-readable string.
+ *
+ * @param value
+ */
+jasmine.PrettyPrinter.prototype.format = function(value) {
+ if (this.ppNestLevel_ > 40) {
+ throw new Error('jasmine.PrettyPrinter: format() nested too deeply!');
+ }
+
+ this.ppNestLevel_++;
+ try {
+ if (value === jasmine.undefined) {
+ this.emitScalar('undefined');
+ } else if (value === null) {
+ this.emitScalar('null');
+ } else if (value === jasmine.getGlobal()) {
+ this.emitScalar('<global>');
+ } else if (value instanceof jasmine.Matchers.Any) {
+ this.emitScalar(value.toString());
+ } else if (typeof value === 'string') {
+ this.emitString(value);
+ } else if (jasmine.isSpy(value)) {
+ this.emitScalar("spy on " + value.identity);
+ } else if (value instanceof RegExp) {
+ this.emitScalar(value.toString());
+ } else if (typeof value === 'function') {
+ this.emitScalar('Function');
+ } else if (typeof value.nodeType === 'number') {
+ this.emitScalar('HTMLNode');
+ } else if (value instanceof Date) {
+ this.emitScalar('Date(' + value + ')');
+ } else if (value.__Jasmine_been_here_before__) {
+ this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');
+ } else if (jasmine.isArray_(value) || typeof value == 'object') {
+ value.__Jasmine_been_here_before__ = true;
+ if (jasmine.isArray_(value)) {
+ this.emitArray(value);
+ } else {
+ this.emitObject(value);
+ }
+ delete value.__Jasmine_been_here_before__;
+ } else {
+ this.emitScalar(value.toString());
+ }
+ } finally {
+ this.ppNestLevel_--;
+ }
+};
+
+jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
+ for (var property in obj) {
+ if (property == '__Jasmine_been_here_before__') continue;
+ fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) != null) : false);
+ }
+};
+
+jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_;
+
+jasmine.StringPrettyPrinter = function() {
+ jasmine.PrettyPrinter.call(this);
+
+ this.string = '';
+};
+jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter);
+
+jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) {
+ this.append(value);
+};
+
+jasmine.StringPrettyPrinter.prototype.emitString = function(value) {
+ this.append("'" + value + "'");
+};
+
+jasmine.StringPrettyPrinter.prototype.emitArray = function(array) {
+ this.append('[ ');
+ for (var i = 0; i < array.length; i++) {
+ if (i > 0) {
+ this.append(', ');
+ }
+ this.format(array[i]);
+ }
+ this.append(' ]');
+};
+
+jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) {
+ var self = this;
+ this.append('{ ');
+ var first = true;
+
+ this.iterateObject(obj, function(property, isGetter) {
+ if (first) {
+ first = false;
+ } else {
+ self.append(', ');
+ }
+
+ self.append(property);
+ self.append(' : ');
+ if (isGetter) {
+ self.append('<getter>');
+ } else {
+ self.format(obj[property]);
+ }
+ });
+
+ this.append(' }');
+};
+
+jasmine.StringPrettyPrinter.prototype.append = function(value) {
+ this.string += value;
+};
+jasmine.Queue = function(env) {
+ this.env = env;
+ this.blocks = [];
+ this.running = false;
+ this.index = 0;
+ this.offset = 0;
+ this.abort = false;
+};
+
+jasmine.Queue.prototype.addBefore = function(block) {
+ this.blocks.unshift(block);
+};
+
+jasmine.Queue.prototype.add = function(block) {
+ this.blocks.push(block);
+};
+
+jasmine.Queue.prototype.insertNext = function(block) {
+ this.blocks.splice((this.index + this.offset + 1), 0, block);
+ this.offset++;
+};
+
+jasmine.Queue.prototype.start = function(onComplete) {
+ this.running = true;
+ this.onComplete = onComplete;
+ this.next_();
+};
+
+jasmine.Queue.prototype.isRunning = function() {
+ return this.running;
+};
+
+jasmine.Queue.LOOP_DONT_RECURSE = true;
+
+jasmine.Queue.prototype.next_ = function() {
+ var self = this;
+ var goAgain = true;
+
+ while (goAgain) {
+ goAgain = false;
+
+ if (self.index < self.blocks.length && !this.abort) {
+ var calledSynchronously = true;
+ var completedSynchronously = false;
+
+ var onComplete = function () {
+ if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {
+ completedSynchronously = true;
+ return;
+ }
+
+ if (self.blocks[self.index].abort) {
+ self.abort = true;
+ }
+
+ self.offset = 0;
+ self.index++;
+
+ var now = new Date().getTime();
+ if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
+ self.env.lastUpdate = now;
+ self.env.setTimeout(function() {
+ self.next_();
+ }, 0);
+ } else {
+ if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {
+ goAgain = true;
+ } else {
+ self.next_();
+ }
+ }
+ };
+ self.blocks[self.index].execute(onComplete);
+
+ calledSynchronously = false;
+ if (completedSynchronously) {
+ onComplete();
+ }
+
+ } else {
+ self.running = false;
+ if (self.onComplete) {
+ self.onComplete();
+ }
+ }
+ }
+};
+
+jasmine.Queue.prototype.results = function() {
+ var results = new jasmine.NestedResults();
+ for (var i = 0; i < this.blocks.length; i++) {
+ if (this.blocks[i].results) {
+ results.addResult(this.blocks[i].results());
+ }
+ }
+ return results;
+};
+
+
+/**
+ * Runner
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ */
+jasmine.Runner = function(env) {
+ var self = this;
+ self.env = env;
+ self.queue = new jasmine.Queue(env);
+ self.before_ = [];
+ self.after_ = [];
+ self.suites_ = [];
+};
+
+jasmine.Runner.prototype.execute = function() {
+ var self = this;
+ if (self.env.reporter.reportRunnerStarting) {
+ self.env.reporter.reportRunnerStarting(this);
+ }
+ self.queue.start(function () {
+ self.finishCallback();
+ });
+};
+
+jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
+ beforeEachFunction.typeName = 'beforeEach';
+ this.before_.splice(0,0,beforeEachFunction);
+};
+
+jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
+ afterEachFunction.typeName = 'afterEach';
+ this.after_.splice(0,0,afterEachFunction);
+};
+
+
+jasmine.Runner.prototype.finishCallback = function() {
+ this.env.reporter.reportRunnerResults(this);
+};
+
+jasmine.Runner.prototype.addSuite = function(suite) {
+ this.suites_.push(suite);
+};
+
+jasmine.Runner.prototype.add = function(block) {
+ if (block instanceof jasmine.Suite) {
+ this.addSuite(block);
+ }
+ this.queue.add(block);
+};
+
+jasmine.Runner.prototype.specs = function () {
+ var suites = this.suites();
+ var specs = [];
+ for (var i = 0; i < suites.length; i++) {
+ specs = specs.concat(suites[i].specs());
+ }
+ return specs;
+};
+
+jasmine.Runner.prototype.suites = function() {
+ return this.suites_;
+};
+
+jasmine.Runner.prototype.topLevelSuites = function() {
+ var topLevelSuites = [];
+ for (var i = 0; i < this.suites_.length; i++) {
+ if (!this.suites_[i].parentSuite) {
+ topLevelSuites.push(this.suites_[i]);
+ }
+ }
+ return topLevelSuites;
+};
+
+jasmine.Runner.prototype.results = function() {
+ return this.queue.results();
+};
+/**
+ * Internal representation of a Jasmine specification, or test.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {jasmine.Suite} suite
+ * @param {String} description
+ */
+jasmine.Spec = function(env, suite, description) {
+ if (!env) {
+ throw new Error('jasmine.Env() required');
+ }
+ if (!suite) {
+ throw new Error('jasmine.Suite() required');
+ }
+ var spec = this;
+ spec.id = env.nextSpecId ? env.nextSpecId() : null;
+ spec.env = env;
+ spec.suite = suite;
+ spec.description = description;
+ spec.queue = new jasmine.Queue(env);
+
+ spec.afterCallbacks = [];
+ spec.spies_ = [];
+
+ spec.results_ = new jasmine.NestedResults();
+ spec.results_.description = description;
+ spec.matchersClass = null;
+};
+
+jasmine.Spec.prototype.getFullName = function() {
+ return this.suite.getFullName() + ' ' + this.description + '.';
+};
+
+
+jasmine.Spec.prototype.results = function() {
+ return this.results_;
+};
+
+/**
+ * All parameters are pretty-printed and concatenated together, then written to the spec's output.
+ *
+ * Be careful not to leave calls to <code>jasmine.log</code> in production code.
+ */
+jasmine.Spec.prototype.log = function() {
+ return this.results_.log(arguments);
+};
+
+jasmine.Spec.prototype.runs = function (func) {
+ var block = new jasmine.Block(this.env, func, this);
+ this.addToQueue(block);
+ return this;
+};
+
+jasmine.Spec.prototype.addToQueue = function (block) {
+ if (this.queue.isRunning()) {
+ this.queue.insertNext(block);
+ } else {
+ this.queue.add(block);
+ }
+};
+
+/**
+ * @param {jasmine.ExpectationResult} result
+ */
+jasmine.Spec.prototype.addMatcherResult = function(result) {
+ this.results_.addResult(result);
+};
+
+jasmine.Spec.prototype.expect = function(actual) {
+ var positive = new (this.getMatchersClass_())(this.env, actual, this);
+ positive.not = new (this.getMatchersClass_())(this.env, actual, this, true);
+ return positive;
+};
+
+/**
+ * Waits a fixed time period before moving to the next block.
+ *
+ * @deprecated Use waitsFor() instead
+ * @param {Number} timeout milliseconds to wait
+ */
+jasmine.Spec.prototype.waits = function(timeout) {
+ var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);
+ this.addToQueue(waitsFunc);
+ return this;
+};
+
+/**
+ * Waits for the latchFunction to return true before proceeding to the next block.
+ *
+ * @param {Function} latchFunction
+ * @param {String} optional_timeoutMessage
+ * @param {Number} optional_timeout
+ */
+jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
+ var latchFunction_ = null;
+ var optional_timeoutMessage_ = null;
+ var optional_timeout_ = null;
+
+ for (var i = 0; i < arguments.length; i++) {
+ var arg = arguments[i];
+ switch (typeof arg) {
+ case 'function':
+ latchFunction_ = arg;
+ break;
+ case 'string':
+ optional_timeoutMessage_ = arg;
+ break;
+ case 'number':
+ optional_timeout_ = arg;
+ break;
+ }
+ }
+
+ var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this);
+ this.addToQueue(waitsForFunc);
+ return this;
+};
+
+jasmine.Spec.prototype.fail = function (e) {
+ var expectationResult = new jasmine.ExpectationResult({
+ passed: false,
+ message: e ? jasmine.util.formatException(e) : 'Exception'
+ });
+ this.results_.addResult(expectationResult);
+};
+
+jasmine.Spec.prototype.getMatchersClass_ = function() {
+ return this.matchersClass || this.env.matchersClass;
+};
+
+jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {
+ var parent = this.getMatchersClass_();
+ var newMatchersClass = function() {
+ parent.apply(this, arguments);
+ };
+ jasmine.util.inherit(newMatchersClass, parent);
+ jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass);
+ this.matchersClass = newMatchersClass;
+};
+
+jasmine.Spec.prototype.finishCallback = function() {
+ this.env.reporter.reportSpecResults(this);
+};
+
+jasmine.Spec.prototype.finish = function(onComplete) {
+ this.removeAllSpies();
+ this.finishCallback();
+ if (onComplete) {
+ onComplete();
+ }
+};
+
+jasmine.Spec.prototype.after = function(doAfter) {
+ if (this.queue.isRunning()) {
+ this.queue.add(new jasmine.Block(this.env, doAfter, this));
+ } else {
+ this.afterCallbacks.unshift(doAfter);
+ }
+};
+
+jasmine.Spec.prototype.execute = function(onComplete) {
+ var spec = this;
+ if (!spec.env.specFilter(spec)) {
+ spec.results_.skipped = true;
+ spec.finish(onComplete);
+ return;
+ }
+
+ this.env.reporter.reportSpecStarting(this);
+
+ spec.env.currentSpec = spec;
+
+ spec.addBeforesAndAftersToQueue();
+
+ spec.queue.start(function () {
+ spec.finish(onComplete);
+ });
+};
+
+jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {
+ var runner = this.env.currentRunner();
+ var i;
+
+ for (var suite = this.suite; suite; suite = suite.parentSuite) {
+ for (i = 0; i < suite.before_.length; i++) {
+ this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));
+ }
+ }
+ for (i = 0; i < runner.before_.length; i++) {
+ this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));
+ }
+ for (i = 0; i < this.afterCallbacks.length; i++) {
+ this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this));
+ }
+ for (suite = this.suite; suite; suite = suite.parentSuite) {
+ for (i = 0; i < suite.after_.length; i++) {
+ this.queue.add(new jasmine.Block(this.env, suite.after_[i], this));
+ }
+ }
+ for (i = 0; i < runner.after_.length; i++) {
+ this.queue.add(new jasmine.Block(this.env, runner.after_[i], this));
+ }
+};
+
+jasmine.Spec.prototype.explodes = function() {
+ throw 'explodes function should not have been called';
+};
+
+jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) {
+ if (obj == jasmine.undefined) {
+ throw "spyOn could not find an object to spy upon for " + methodName + "()";
+ }
+
+ if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) {
+ throw methodName + '() method does not exist';
+ }
+
+ if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) {
+ throw new Error(methodName + ' has already been spied upon');
+ }
+
+ var spyObj = jasmine.createSpy(methodName);
+
+ this.spies_.push(spyObj);
+ spyObj.baseObj = obj;
+ spyObj.methodName = methodName;
+ spyObj.originalValue = obj[methodName];
+
+ obj[methodName] = spyObj;
+
+ return spyObj;
+};
+
+jasmine.Spec.prototype.removeAllSpies = function() {
+ for (var i = 0; i < this.spies_.length; i++) {
+ var spy = this.spies_[i];
+ spy.baseObj[spy.methodName] = spy.originalValue;
+ }
+ this.spies_ = [];
+};
+
+/**
+ * Internal representation of a Jasmine suite.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {String} description
+ * @param {Function} specDefinitions
+ * @param {jasmine.Suite} parentSuite
+ */
+jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
+ var self = this;
+ self.id = env.nextSuiteId ? env.nextSuiteId() : null;
+ self.description = description;
+ self.queue = new jasmine.Queue(env);
+ self.parentSuite = parentSuite;
+ self.env = env;
+ self.before_ = [];
+ self.after_ = [];
+ self.children_ = [];
+ self.suites_ = [];
+ self.specs_ = [];
+};
+
+jasmine.Suite.prototype.getFullName = function() {
+ var fullName = this.description;
+ for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
+ fullName = parentSuite.description + ' ' + fullName;
+ }
+ return fullName;
+};
+
+jasmine.Suite.prototype.finish = function(onComplete) {
+ this.env.reporter.reportSuiteResults(this);
+ this.finished = true;
+ if (typeof(onComplete) == 'function') {
+ onComplete();
+ }
+};
+
+jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
+ beforeEachFunction.typeName = 'beforeEach';
+ this.before_.unshift(beforeEachFunction);
+};
+
+jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
+ afterEachFunction.typeName = 'afterEach';
+ this.after_.unshift(afterEachFunction);
+};
+
+jasmine.Suite.prototype.results = function() {
+ return this.queue.results();
+};
+
+jasmine.Suite.prototype.add = function(suiteOrSpec) {
+ this.children_.push(suiteOrSpec);
+ if (suiteOrSpec instanceof jasmine.Suite) {
+ this.suites_.push(suiteOrSpec);
+ this.env.currentRunner().addSuite(suiteOrSpec);
+ } else {
+ this.specs_.push(suiteOrSpec);
+ }
+ this.queue.add(suiteOrSpec);
+};
+
+jasmine.Suite.prototype.specs = function() {
+ return this.specs_;
+};
+
+jasmine.Suite.prototype.suites = function() {
+ return this.suites_;
+};
+
+jasmine.Suite.prototype.children = function() {
+ return this.children_;
+};
+
+jasmine.Suite.prototype.execute = function(onComplete) {
+ var self = this;
+ this.queue.start(function () {
+ self.finish(onComplete);
+ });
+};
+jasmine.WaitsBlock = function(env, timeout, spec) {
+ this.timeout = timeout;
+ jasmine.Block.call(this, env, null, spec);
+};
+
+jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
+
+jasmine.WaitsBlock.prototype.execute = function (onComplete) {
+ this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
+ this.env.setTimeout(function () {
+ onComplete();
+ }, this.timeout);
+};
+/**
+ * A block which waits for some condition to become true, with timeout.
+ *
+ * @constructor
+ * @extends jasmine.Block
+ * @param {jasmine.Env} env The Jasmine environment.
+ * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true.
+ * @param {Function} latchFunction A function which returns true when the desired condition has been met.
+ * @param {String} message The message to display if the desired condition hasn't been met within the given time period.
+ * @param {jasmine.Spec} spec The Jasmine spec.
+ */
+jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
+ this.timeout = timeout || env.defaultTimeoutInterval;
+ this.latchFunction = latchFunction;
+ this.message = message;
+ this.totalTimeSpentWaitingForLatch = 0;
+ jasmine.Block.call(this, env, null, spec);
+};
+jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
+
+jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10;
+
+jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
+ this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen'));
+ var latchFunctionResult;
+ try {
+ latchFunctionResult = this.latchFunction.apply(this.spec);
+ } catch (e) {
+ this.spec.fail(e);
+ onComplete();
+ return;
+ }
+
+ if (latchFunctionResult) {
+ onComplete();
+ } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) {
+ var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen');
+ this.spec.fail({
+ name: 'timeout',
+ message: message
+ });
+
+ this.abort = true;
+ onComplete();
+ } else {
+ this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
+ var self = this;
+ this.env.setTimeout(function() {
+ self.execute(onComplete);
+ }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
+ }
+};
+// Mock setTimeout, clearTimeout
+// Contributed by Pivotal Computer Systems, www.pivotalsf.com
+
+jasmine.FakeTimer = function() {
+ this.reset();
+
+ var self = this;
+ self.setTimeout = function(funcToCall, millis) {
+ self.timeoutsMade++;
+ self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);
+ return self.timeoutsMade;
+ };
+
+ self.setInterval = function(funcToCall, millis) {
+ self.timeoutsMade++;
+ self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);
+ return self.timeoutsMade;
+ };
+
+ self.clearTimeout = function(timeoutKey) {
+ self.scheduledFunctions[timeoutKey] = jasmine.undefined;
+ };
+
+ self.clearInterval = function(timeoutKey) {
+ self.scheduledFunctions[timeoutKey] = jasmine.undefined;
+ };
+
+};
+
+jasmine.FakeTimer.prototype.reset = function() {
+ this.timeoutsMade = 0;
+ this.scheduledFunctions = {};
+ this.nowMillis = 0;
+};
+
+jasmine.FakeTimer.prototype.tick = function(millis) {
+ var oldMillis = this.nowMillis;
+ var newMillis = oldMillis + millis;
+ this.runFunctionsWithinRange(oldMillis, newMillis);
+ this.nowMillis = newMillis;
+};
+
+jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
+ var scheduledFunc;
+ var funcsToRun = [];
+ for (var timeoutKey in this.scheduledFunctions) {
+ scheduledFunc = this.scheduledFunctions[timeoutKey];
+ if (scheduledFunc != jasmine.undefined &&
+ scheduledFunc.runAtMillis >= oldMillis &&
+ scheduledFunc.runAtMillis <= nowMillis) {
+ funcsToRun.push(scheduledFunc);
+ this.scheduledFunctions[timeoutKey] = jasmine.undefined;
+ }
+ }
+
+ if (funcsToRun.length > 0) {
+ funcsToRun.sort(function(a, b) {
+ return a.runAtMillis - b.runAtMillis;
+ });
+ for (var i = 0; i < funcsToRun.length; ++i) {
+ try {
+ var funcToRun = funcsToRun[i];
+ this.nowMillis = funcToRun.runAtMillis;
+ funcToRun.funcToCall();
+ if (funcToRun.recurring) {
+ this.scheduleFunction(funcToRun.timeoutKey,
+ funcToRun.funcToCall,
+ funcToRun.millis,
+ true);
+ }
+ } catch(e) {
+ }
+ }
+ this.runFunctionsWithinRange(oldMillis, nowMillis);
+ }
+};
+
+jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {
+ this.scheduledFunctions[timeoutKey] = {
+ runAtMillis: this.nowMillis + millis,
+ funcToCall: funcToCall,
+ recurring: recurring,
+ timeoutKey: timeoutKey,
+ millis: millis
+ };
+};
+
+/**
+ * @namespace
+ */
+jasmine.Clock = {
+ defaultFakeTimer: new jasmine.FakeTimer(),
+
+ reset: function() {
+ jasmine.Clock.assertInstalled();
+ jasmine.Clock.defaultFakeTimer.reset();
+ },
+
+ tick: function(millis) {
+ jasmine.Clock.assertInstalled();
+ jasmine.Clock.defaultFakeTimer.tick(millis);
+ },
+
+ runFunctionsWithinRange: function(oldMillis, nowMillis) {
+ jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis);
+ },
+
+ scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) {
+ jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring);
+ },
+
+ useMock: function() {
+ if (!jasmine.Clock.isInstalled()) {
+ var spec = jasmine.getEnv().currentSpec;
+ spec.after(jasmine.Clock.uninstallMock);
+
+ jasmine.Clock.installMock();
+ }
+ },
+
+ installMock: function() {
+ jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer;
+ },
+
+ uninstallMock: function() {
+ jasmine.Clock.assertInstalled();
+ jasmine.Clock.installed = jasmine.Clock.real;
+ },
+
+ real: {
+ setTimeout: jasmine.getGlobal().setTimeout,
+ clearTimeout: jasmine.getGlobal().clearTimeout,
+ setInterval: jasmine.getGlobal().setInterval,
+ clearInterval: jasmine.getGlobal().clearInterval
+ },
+
+ assertInstalled: function() {
+ if (!jasmine.Clock.isInstalled()) {
+ throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
+ }
+ },
+
+ isInstalled: function() {
+ return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer;
+ },
+
+ installed: null
+};
+jasmine.Clock.installed = jasmine.Clock.real;
+
+//else for IE support
+jasmine.getGlobal().setTimeout = function(funcToCall, millis) {
+ if (jasmine.Clock.installed.setTimeout.apply) {
+ return jasmine.Clock.installed.setTimeout.apply(this, arguments);
+ } else {
+ return jasmine.Clock.installed.setTimeout(funcToCall, millis);
+ }
+};
+
+jasmine.getGlobal().setInterval = function(funcToCall, millis) {
+ if (jasmine.Clock.installed.setInterval.apply) {
+ return jasmine.Clock.installed.setInterval.apply(this, arguments);
+ } else {
+ return jasmine.Clock.installed.setInterval(funcToCall, millis);
+ }
+};
+
+jasmine.getGlobal().clearTimeout = function(timeoutKey) {
+ if (jasmine.Clock.installed.clearTimeout.apply) {
+ return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
+ } else {
+ return jasmine.Clock.installed.clearTimeout(timeoutKey);
+ }
+};
+
+jasmine.getGlobal().clearInterval = function(timeoutKey) {
+ if (jasmine.Clock.installed.clearTimeout.apply) {
+ return jasmine.Clock.installed.clearInterval.apply(this, arguments);
+ } else {
+ return jasmine.Clock.installed.clearInterval(timeoutKey);
+ }
+};
+
+
+jasmine.version_= {
+ "major": 1,
+ "minor": 0,
+ "build": 0,
+ "revision": 1284494074
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jline.jar
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jline.jar b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jline.jar
new file mode 100644
index 0000000..7728bf0
Binary files /dev/null and b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/jline.jar differ
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/js.jar
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/js.jar b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/js.jar
new file mode 100644
index 0000000..2369f99
Binary files /dev/null and b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/js.jar differ
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/package.json b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/package.json
new file mode 100644
index 0000000..c6b10bb
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/package.json
@@ -0,0 +1,24 @@
+{
+ "author": {
+ "name": "Larry Myers"
+ },
+ "name": "jasmine-reporters",
+ "description": "Reporters for the Jasmine BDD Framework",
+ "version": "0.2.1",
+ "homepage": "https://github.com/larrymyers/jasmine-reporters",
+ "maintainers": "Ben Loveridge <bl...@movenetworks.com>",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/larrymyers/jasmine-reporters.git"
+ },
+ "main": "./src/load_reporters.js",
+ "dependencies": {},
+ "devDependencies": {},
+ "readme": "# Jasmine Reporters\n\nJasmine Reporters is a collection of javascript jasmine.Reporter classes that can be used with\nthe [JasmineBDD testing framework](http://pivotal.github.com/jasmine/).\n\nRight now the project is focused on two new reporters:\n\n* ConsoleReporter - Report test results to the browser console.\n* JUnitXmlReporter - Report test results to a file (using Rhino or PyPhantomJS) in JUnit XML Report format.\n\n## Usage\n\nExamples are included in the test directory that show how to use the reporters,\nas well a basic runner scripts for Rhino + envjs, and a basic runner for \n[PhantomJS](https://github.com/ariya/phantomjs) (using PyPhantomJS and the\nsaveToFile plugin). Either of these methods could be used in a Continuous\nIntegration project for running headless tests and generating JUnit XML output.\n\n### Rhino + EnvJS\n\nEverything needed to run the tests in Rhino + EnvJS is included in this\nrepository inside the `ext` directory, specifically Rhino 1.
7r2 and envjs 1.2\nfor Rhino.\n\n### PhantomJS, PyPhantomJS\n\nPhantomJS is included as a submodule inside the `ext` directory. The included\nexample runner makes use of PyPhantomJS to execute the headless tests and\nsave XML output to the filesystem.\n\nWhile PhantomJS and PyPhantomJS both run on MacOS / Linux / Windows, there are\nspecific dependencies for each platform. Specifics on installing these are not\nincluded here, but is left as an exercise for the reader. The [PhantomJS](https://github.com/ariya/phantomjs)\nproject contains links to various documentation, including installation notes.\n\nHere is how I got it working in MacOSX 10.6 (YMMV):\n\n* ensure you are using Python 2.6+\n* install Xcode (this gives you make, et al)\n* install qt (this gives you qmake, et al)\n * this may be easiest via [homebrew](https://github.com/mxcl/homebrew)\n * `brew install qt`\n* install the python sip module\n * `pip install sip # this will fail to fully install sip, keep going`\n * `
cd build/sip`\n * `python configure.py`\n * `make && sudo make install`\n* install the python pyqt module\n * `pip install pyqt # this will fail to fully install pyqt, keep going`\n * `cd build/pyqt`\n * `python configure.py`\n * `make && sudo make install`\n",
+ "readmeFilename": "README.markdown",
+ "bugs": {
+ "url": "https://github.com/larrymyers/jasmine-reporters/issues"
+ },
+ "_id": "jasmine-reporters@0.2.1",
+ "_from": "jasmine-reporters@>=0.2.0"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.console_reporter.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.console_reporter.js b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.console_reporter.js
new file mode 100644
index 0000000..f4ba9b9
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/src/jasmine.console_reporter.js
@@ -0,0 +1,142 @@
+(function() {
+ if (! jasmine) {
+ throw new Exception("jasmine library does not exist in global namespace!");
+ }
+
+ /**
+ * Basic reporter that outputs spec results to the browser console.
+ * Useful if you need to test an html page and don't want the TrivialReporter
+ * markup mucking things up.
+ *
+ * Usage:
+ *
+ * jasmine.getEnv().addReporter(new jasmine.ConsoleReporter());
+ * jasmine.getEnv().execute();
+ */
+ var ConsoleReporter = function() {
+ this.started = false;
+ this.finished = false;
+ };
+
+ ConsoleReporter.prototype = {
+ reportRunnerResults: function(runner) {
+ if (this.hasGroupedConsole()) {
+ var suites = runner.suites();
+ startGroup(runner.results(), 'tests');
+ for (var i in suites) {
+ if (!suites[i].parentSuite) {
+ suiteResults(suites[i]);
+ }
+ }
+ console.groupEnd();
+ }
+ else {
+ var dur = (new Date()).getTime() - this.start_time;
+ var failed = this.executed_specs - this.passed_specs;
+ var spec_str = this.executed_specs + (this.executed_specs === 1 ? " spec, " : " specs, ");
+ var fail_str = failed + (failed === 1 ? " failure in " : " failures in ");
+
+ this.log("Runner Finished.");
+ this.log(spec_str + fail_str + (dur/1000) + "s.");
+ }
+ this.finished = true;
+ },
+
+ hasGroupedConsole: function() {
+ var console = jasmine.getGlobal().console;
+ return console && console.info && console.warn && console.group && console.groupEnd && console.groupCollapsed;
+ },
+
+ reportRunnerStarting: function(runner) {
+ this.started = true;
+ if (!this.hasGroupedConsole()) {
+ this.start_time = (new Date()).getTime();
+ this.executed_specs = 0;
+ this.passed_specs = 0;
+ this.log("Runner Started.");
+ }
+ },
+
+ reportSpecResults: function(spec) {
+ if (!this.hasGroupedConsole()) {
+ var resultText = "Failed.";
+
+ if (spec.results().passed()) {
+ this.passed_specs++;
+ resultText = "Passed.";
+ }
+
+ this.log(resultText);
+ }
+ },
+
+ reportSpecStarting: function(spec) {
+ if (!this.hasGroupedConsole()) {
+ this.executed_specs++;
+ this.log(spec.suite.description + ' : ' + spec.description + ' ... ');
+ }
+ },
+
+ reportSuiteResults: function(suite) {
+ if (!this.hasGroupedConsole()) {
+ var results = suite.results();
+ this.log(suite.description + ": " + results.passedCount + " of " + results.totalCount + " passed.");
+ }
+ },
+
+ log: function(str) {
+ var console = jasmine.getGlobal().console;
+ if (console && console.log) {
+ console.log(str);
+ }
+ }
+ };
+
+ function suiteResults(suite) {
+ var results = suite.results();
+ startGroup(results, suite.description);
+ var specs = suite.specs();
+ for (var i in specs) {
+ if (specs.hasOwnProperty(i)) {
+ specResults(specs[i]);
+ }
+ }
+ var suites = suite.suites();
+ for (var j in suites) {
+ if (suites.hasOwnProperty(j)) {
+ suiteResults(suites[j]);
+ }
+ }
+ console.groupEnd();
+ }
+
+ function specResults(spec) {
+ var results = spec.results();
+ startGroup(results, spec.description);
+ var items = results.getItems();
+ for (var k in items) {
+ if (items.hasOwnProperty(k)) {
+ itemResults(items[k]);
+ }
+ }
+ console.groupEnd();
+ }
+
+ function itemResults(item) {
+ if (item.passed && !item.passed()) {
+ console.warn({actual:item.actual,expected: item.expected});
+ item.trace.message = item.matcherName;
+ console.error(item.trace);
+ } else {
+ console.info('Passed');
+ }
+ }
+
+ function startGroup(results, description) {
+ var consoleFunc = (results.passed() && console.groupCollapsed) ? 'groupCollapsed' : 'group';
+ console[consoleFunc](description + ' (' + results.passedCount + '/' + results.totalCount + ' passed, ' + results.failedCount + ' failures)');
+ }
+
+ // export public
+ jasmine.ConsoleReporter = ConsoleReporter;
+})();
[30/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/lexer.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/lexer.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/lexer.js
new file mode 100644
index 0000000..b4db45f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/lexer.js
@@ -0,0 +1,889 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+ _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES;
+
+ _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError;
+
+ exports.Lexer = Lexer = (function() {
+ function Lexer() {}
+
+ Lexer.prototype.tokenize = function(code, opts) {
+ var consumed, i, tag, _ref2;
+ if (opts == null) {
+ opts = {};
+ }
+ this.literate = opts.literate;
+ this.indent = 0;
+ this.indebt = 0;
+ this.outdebt = 0;
+ this.indents = [];
+ this.ends = [];
+ this.tokens = [];
+ this.chunkLine = opts.line || 0;
+ this.chunkColumn = opts.column || 0;
+ code = this.clean(code);
+ i = 0;
+ while (this.chunk = code.slice(i)) {
+ consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken();
+ _ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = _ref2[0], this.chunkColumn = _ref2[1];
+ i += consumed;
+ }
+ this.closeIndentation();
+ if (tag = this.ends.pop()) {
+ this.error("missing " + tag);
+ }
+ if (opts.rewrite === false) {
+ return this.tokens;
+ }
+ return (new Rewriter).rewrite(this.tokens);
+ };
+
+ Lexer.prototype.clean = function(code) {
+ if (code.charCodeAt(0) === BOM) {
+ code = code.slice(1);
+ }
+ code = code.replace(/\r/g, '').replace(TRAILING_SPACES, '');
+ if (WHITESPACE.test(code)) {
+ code = "\n" + code;
+ this.chunkLine--;
+ }
+ if (this.literate) {
+ code = invertLiterate(code);
+ }
+ return code;
+ };
+
+ Lexer.prototype.identifierToken = function() {
+ var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4;
+ if (!(match = IDENTIFIER.exec(this.chunk))) {
+ return 0;
+ }
+ input = match[0], id = match[1], colon = match[2];
+ idLength = id.length;
+ poppedToken = void 0;
+ if (id === 'own' && this.tag() === 'FOR') {
+ this.token('OWN', id);
+ return id.length;
+ }
+ forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::' || _ref2 === '?::') || !prev.spaced && prev[0] === '@');
+ tag = 'IDENTIFIER';
+ if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) {
+ tag = id.toUpperCase();
+ if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) {
+ tag = 'LEADING_WHEN';
+ } else if (tag === 'FOR') {
+ this.seenFor = true;
+ } else if (tag === 'UNLESS') {
+ tag = 'IF';
+ } else if (__indexOf.call(UNARY, tag) >= 0) {
+ tag = 'UNARY';
+ } else if (__indexOf.call(RELATION, tag) >= 0) {
+ if (tag !== 'INSTANCEOF' && this.seenFor) {
+ tag = 'FOR' + tag;
+ this.seenFor = false;
+ } else {
+ tag = 'RELATION';
+ if (this.value() === '!') {
+ poppedToken = this.tokens.pop();
+ id = '!' + id;
+ }
+ }
+ }
+ }
+ if (__indexOf.call(JS_FORBIDDEN, id) >= 0) {
+ if (forcedIdentifier) {
+ tag = 'IDENTIFIER';
+ id = new String(id);
+ id.reserved = true;
+ } else if (__indexOf.call(RESERVED, id) >= 0) {
+ this.error("reserved word \"" + id + "\"");
+ }
+ }
+ if (!forcedIdentifier) {
+ if (__indexOf.call(COFFEE_ALIASES, id) >= 0) {
+ id = COFFEE_ALIAS_MAP[id];
+ }
+ tag = (function() {
+ switch (id) {
+ case '!':
+ return 'UNARY';
+ case '==':
+ case '!=':
+ return 'COMPARE';
+ case '&&':
+ case '||':
+ return 'LOGIC';
+ case 'true':
+ case 'false':
+ return 'BOOL';
+ case 'break':
+ case 'continue':
+ return 'STATEMENT';
+ default:
+ return tag;
+ }
+ })();
+ }
+ tagToken = this.token(tag, id, 0, idLength);
+ if (poppedToken) {
+ _ref4 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = _ref4[0], tagToken[2].first_column = _ref4[1];
+ }
+ if (colon) {
+ colonOffset = input.lastIndexOf(':');
+ this.token(':', ':', colonOffset, colon.length);
+ }
+ return input.length;
+ };
+
+ Lexer.prototype.numberToken = function() {
+ var binaryLiteral, lexedLength, match, number, octalLiteral;
+ if (!(match = NUMBER.exec(this.chunk))) {
+ return 0;
+ }
+ number = match[0];
+ if (/^0[BOX]/.test(number)) {
+ this.error("radix prefix '" + number + "' must be lowercase");
+ } else if (/E/.test(number) && !/^0x/.test(number)) {
+ this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'");
+ } else if (/^0\d*[89]/.test(number)) {
+ this.error("decimal literal '" + number + "' must not be prefixed with '0'");
+ } else if (/^0\d+/.test(number)) {
+ this.error("octal literal '" + number + "' must be prefixed with '0o'");
+ }
+ lexedLength = number.length;
+ if (octalLiteral = /^0o([0-7]+)/.exec(number)) {
+ number = '0x' + parseInt(octalLiteral[1], 8).toString(16);
+ }
+ if (binaryLiteral = /^0b([01]+)/.exec(number)) {
+ number = '0x' + parseInt(binaryLiteral[1], 2).toString(16);
+ }
+ this.token('NUMBER', number, 0, lexedLength);
+ return lexedLength;
+ };
+
+ Lexer.prototype.stringToken = function() {
+ var match, octalEsc, string;
+ switch (this.chunk.charAt(0)) {
+ case "'":
+ if (!(match = SIMPLESTR.exec(this.chunk))) {
+ return 0;
+ }
+ string = match[0];
+ this.token('STRING', string.replace(MULTILINER, '\\\n'), 0, string.length);
+ break;
+ case '"':
+ if (!(string = this.balancedString(this.chunk, '"'))) {
+ return 0;
+ }
+ if (0 < string.indexOf('#{', 1)) {
+ this.interpolateString(string.slice(1, -1), {
+ strOffset: 1,
+ lexedLength: string.length
+ });
+ } else {
+ this.token('STRING', this.escapeLines(string, 0, string.length));
+ }
+ break;
+ default:
+ return 0;
+ }
+ if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) {
+ this.error("octal escape sequences " + string + " are not allowed");
+ }
+ return string.length;
+ };
+
+ Lexer.prototype.heredocToken = function() {
+ var doc, heredoc, match, quote;
+ if (!(match = HEREDOC.exec(this.chunk))) {
+ return 0;
+ }
+ heredoc = match[0];
+ quote = heredoc.charAt(0);
+ doc = this.sanitizeHeredoc(match[2], {
+ quote: quote,
+ indent: null
+ });
+ if (quote === '"' && 0 <= doc.indexOf('#{')) {
+ this.interpolateString(doc, {
+ heredoc: true,
+ strOffset: 3,
+ lexedLength: heredoc.length
+ });
+ } else {
+ this.token('STRING', this.makeString(doc, quote, true), 0, heredoc.length);
+ }
+ return heredoc.length;
+ };
+
+ Lexer.prototype.commentToken = function() {
+ var comment, here, match;
+ if (!(match = this.chunk.match(COMMENT))) {
+ return 0;
+ }
+ comment = match[0], here = match[1];
+ if (here) {
+ this.token('HERECOMMENT', this.sanitizeHeredoc(here, {
+ herecomment: true,
+ indent: repeat(' ', this.indent)
+ }), 0, comment.length);
+ }
+ return comment.length;
+ };
+
+ Lexer.prototype.jsToken = function() {
+ var match, script;
+ if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) {
+ return 0;
+ }
+ this.token('JS', (script = match[0]).slice(1, -1), 0, script.length);
+ return script.length;
+ };
+
+ Lexer.prototype.regexToken = function() {
+ var flags, length, match, prev, regex, _ref2, _ref3;
+ if (this.chunk.charAt(0) !== '/') {
+ return 0;
+ }
+ if (match = HEREGEX.exec(this.chunk)) {
+ length = this.heregexToken(match);
+ return length;
+ }
+ prev = last(this.tokens);
+ if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) {
+ return 0;
+ }
+ if (!(match = REGEX.exec(this.chunk))) {
+ return 0;
+ }
+ _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2];
+ if (regex.slice(0, 2) === '/*') {
+ this.error('regular expressions cannot begin with `*`');
+ }
+ if (regex === '//') {
+ regex = '/(?:)/';
+ }
+ this.token('REGEX', "" + regex + flags, 0, match.length);
+ return match.length;
+ };
+
+ Lexer.prototype.heregexToken = function(match) {
+ var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4;
+ heregex = match[0], body = match[1], flags = match[2];
+ if (0 > body.indexOf('#{')) {
+ re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/');
+ if (re.match(/^\*/)) {
+ this.error('regular expressions cannot begin with `*`');
+ }
+ this.token('REGEX', "/" + (re || '(?:)') + "/" + flags, 0, heregex.length);
+ return heregex.length;
+ }
+ this.token('IDENTIFIER', 'RegExp', 0, 0);
+ this.token('CALL_START', '(', 0, 0);
+ tokens = [];
+ _ref2 = this.interpolateString(body, {
+ regex: true
+ });
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ token = _ref2[_i];
+ tag = token[0], value = token[1];
+ if (tag === 'TOKENS') {
+ tokens.push.apply(tokens, value);
+ } else if (tag === 'NEOSTRING') {
+ if (!(value = value.replace(HEREGEX_OMIT, ''))) {
+ continue;
+ }
+ value = value.replace(/\\/g, '\\\\');
+ token[0] = 'STRING';
+ token[1] = this.makeString(value, '"', true);
+ tokens.push(token);
+ } else {
+ this.error("Unexpected " + tag);
+ }
+ prev = last(this.tokens);
+ plusToken = ['+', '+'];
+ plusToken[2] = prev[2];
+ tokens.push(plusToken);
+ }
+ tokens.pop();
+ if (((_ref3 = tokens[0]) != null ? _ref3[0] : void 0) !== 'STRING') {
+ this.token('STRING', '""', 0, 0);
+ this.token('+', '+', 0, 0);
+ }
+ (_ref4 = this.tokens).push.apply(_ref4, tokens);
+ if (flags) {
+ flagsOffset = heregex.lastIndexOf(flags);
+ this.token(',', ',', flagsOffset, 0);
+ this.token('STRING', '"' + flags + '"', flagsOffset, flags.length);
+ }
+ this.token(')', ')', heregex.length - 1, 0);
+ return heregex.length;
+ };
+
+ Lexer.prototype.lineToken = function() {
+ var diff, indent, match, noNewlines, size;
+ if (!(match = MULTI_DENT.exec(this.chunk))) {
+ return 0;
+ }
+ indent = match[0];
+ this.seenFor = false;
+ size = indent.length - 1 - indent.lastIndexOf('\n');
+ noNewlines = this.unfinished();
+ if (size - this.indebt === this.indent) {
+ if (noNewlines) {
+ this.suppressNewlines();
+ } else {
+ this.newlineToken(0);
+ }
+ return indent.length;
+ }
+ if (size > this.indent) {
+ if (noNewlines) {
+ this.indebt = size - this.indent;
+ this.suppressNewlines();
+ return indent.length;
+ }
+ diff = size - this.indent + this.outdebt;
+ this.token('INDENT', diff, indent.length - size, size);
+ this.indents.push(diff);
+ this.ends.push('OUTDENT');
+ this.outdebt = this.indebt = 0;
+ } else {
+ this.indebt = 0;
+ this.outdentToken(this.indent - size, noNewlines, indent.length);
+ }
+ this.indent = size;
+ return indent.length;
+ };
+
+ Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) {
+ var dent, len;
+ while (moveOut > 0) {
+ len = this.indents.length - 1;
+ if (this.indents[len] === void 0) {
+ moveOut = 0;
+ } else if (this.indents[len] === this.outdebt) {
+ moveOut -= this.outdebt;
+ this.outdebt = 0;
+ } else if (this.indents[len] < this.outdebt) {
+ this.outdebt -= this.indents[len];
+ moveOut -= this.indents[len];
+ } else {
+ dent = this.indents.pop() + this.outdebt;
+ moveOut -= dent;
+ this.outdebt = 0;
+ this.pair('OUTDENT');
+ this.token('OUTDENT', dent, 0, outdentLength);
+ }
+ }
+ if (dent) {
+ this.outdebt -= moveOut;
+ }
+ while (this.value() === ';') {
+ this.tokens.pop();
+ }
+ if (!(this.tag() === 'TERMINATOR' || noNewlines)) {
+ this.token('TERMINATOR', '\n', outdentLength, 0);
+ }
+ return this;
+ };
+
+ Lexer.prototype.whitespaceToken = function() {
+ var match, nline, prev;
+ if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) {
+ return 0;
+ }
+ prev = last(this.tokens);
+ if (prev) {
+ prev[match ? 'spaced' : 'newLine'] = true;
+ }
+ if (match) {
+ return match[0].length;
+ } else {
+ return 0;
+ }
+ };
+
+ Lexer.prototype.newlineToken = function(offset) {
+ while (this.value() === ';') {
+ this.tokens.pop();
+ }
+ if (this.tag() !== 'TERMINATOR') {
+ this.token('TERMINATOR', '\n', offset, 0);
+ }
+ return this;
+ };
+
+ Lexer.prototype.suppressNewlines = function() {
+ if (this.value() === '\\') {
+ this.tokens.pop();
+ }
+ return this;
+ };
+
+ Lexer.prototype.literalToken = function() {
+ var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5;
+ if (match = OPERATOR.exec(this.chunk)) {
+ value = match[0];
+ if (CODE.test(value)) {
+ this.tagParameters();
+ }
+ } else {
+ value = this.chunk.charAt(0);
+ }
+ tag = value;
+ prev = last(this.tokens);
+ if (value === '=' && prev) {
+ if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) {
+ this.error("reserved word \"" + (this.value()) + "\" can't be assigned");
+ }
+ if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') {
+ prev[0] = 'COMPOUND_ASSIGN';
+ prev[1] += '=';
+ return value.length;
+ }
+ }
+ if (value === ';') {
+ this.seenFor = false;
+ tag = 'TERMINATOR';
+ } else if (__indexOf.call(MATH, value) >= 0) {
+ tag = 'MATH';
+ } else if (__indexOf.call(COMPARE, value) >= 0) {
+ tag = 'COMPARE';
+ } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) {
+ tag = 'COMPOUND_ASSIGN';
+ } else if (__indexOf.call(UNARY, value) >= 0) {
+ tag = 'UNARY';
+ } else if (__indexOf.call(SHIFT, value) >= 0) {
+ tag = 'SHIFT';
+ } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) {
+ tag = 'LOGIC';
+ } else if (prev && !prev.spaced) {
+ if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) {
+ if (prev[0] === '?') {
+ prev[0] = 'FUNC_EXIST';
+ }
+ tag = 'CALL_START';
+ } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) {
+ tag = 'INDEX_START';
+ switch (prev[0]) {
+ case '?':
+ prev[0] = 'INDEX_SOAK';
+ }
+ }
+ }
+ switch (value) {
+ case '(':
+ case '{':
+ case '[':
+ this.ends.push(INVERSES[value]);
+ break;
+ case ')':
+ case '}':
+ case ']':
+ this.pair(value);
+ }
+ this.token(tag, value);
+ return value.length;
+ };
+
+ Lexer.prototype.sanitizeHeredoc = function(doc, options) {
+ var attempt, herecomment, indent, match, _ref2;
+ indent = options.indent, herecomment = options.herecomment;
+ if (herecomment) {
+ if (HEREDOC_ILLEGAL.test(doc)) {
+ this.error("block comment cannot contain \"*/\", starting");
+ }
+ if (doc.indexOf('\n') < 0) {
+ return doc;
+ }
+ } else {
+ while (match = HEREDOC_INDENT.exec(doc)) {
+ attempt = match[1];
+ if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) {
+ indent = attempt;
+ }
+ }
+ }
+ if (indent) {
+ doc = doc.replace(RegExp("\\n" + indent, "g"), '\n');
+ }
+ if (!herecomment) {
+ doc = doc.replace(/^\n/, '');
+ }
+ return doc;
+ };
+
+ Lexer.prototype.tagParameters = function() {
+ var i, stack, tok, tokens;
+ if (this.tag() !== ')') {
+ return this;
+ }
+ stack = [];
+ tokens = this.tokens;
+ i = tokens.length;
+ tokens[--i][0] = 'PARAM_END';
+ while (tok = tokens[--i]) {
+ switch (tok[0]) {
+ case ')':
+ stack.push(tok);
+ break;
+ case '(':
+ case 'CALL_START':
+ if (stack.length) {
+ stack.pop();
+ } else if (tok[0] === '(') {
+ tok[0] = 'PARAM_START';
+ return this;
+ } else {
+ return this;
+ }
+ }
+ }
+ return this;
+ };
+
+ Lexer.prototype.closeIndentation = function() {
+ return this.outdentToken(this.indent);
+ };
+
+ Lexer.prototype.balancedString = function(str, end) {
+ var continueCount, i, letter, match, prev, stack, _i, _ref2;
+ continueCount = 0;
+ stack = [end];
+ for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) {
+ if (continueCount) {
+ --continueCount;
+ continue;
+ }
+ switch (letter = str.charAt(i)) {
+ case '\\':
+ ++continueCount;
+ continue;
+ case end:
+ stack.pop();
+ if (!stack.length) {
+ return str.slice(0, +i + 1 || 9e9);
+ }
+ end = stack[stack.length - 1];
+ continue;
+ }
+ if (end === '}' && (letter === '"' || letter === "'")) {
+ stack.push(end = letter);
+ } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) {
+ continueCount += match[0].length - 1;
+ } else if (end === '}' && letter === '{') {
+ stack.push(end = '}');
+ } else if (end === '"' && prev === '#' && letter === '{') {
+ stack.push(end = '}');
+ }
+ prev = letter;
+ }
+ return this.error("missing " + (stack.pop()) + ", starting");
+ };
+
+ Lexer.prototype.interpolateString = function(str, options) {
+ var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4;
+ if (options == null) {
+ options = {};
+ }
+ heredoc = options.heredoc, regex = options.regex, offsetInChunk = options.offsetInChunk, strOffset = options.strOffset, lexedLength = options.lexedLength;
+ offsetInChunk = offsetInChunk || 0;
+ strOffset = strOffset || 0;
+ lexedLength = lexedLength || str.length;
+ if (heredoc && str.length > 0 && str[0] === '\n') {
+ str = str.slice(1);
+ strOffset++;
+ }
+ tokens = [];
+ pi = 0;
+ i = -1;
+ while (letter = str.charAt(i += 1)) {
+ if (letter === '\\') {
+ i += 1;
+ continue;
+ }
+ if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) {
+ continue;
+ }
+ if (pi < i) {
+ tokens.push(this.makeToken('NEOSTRING', str.slice(pi, i), strOffset + pi));
+ }
+ inner = expr.slice(1, -1);
+ if (inner.length) {
+ _ref2 = this.getLineAndColumnFromChunk(strOffset + i + 1), line = _ref2[0], column = _ref2[1];
+ nested = new Lexer().tokenize(inner, {
+ line: line,
+ column: column,
+ rewrite: false
+ });
+ popped = nested.pop();
+ if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') {
+ popped = nested.shift();
+ }
+ if (len = nested.length) {
+ if (len > 1) {
+ nested.unshift(this.makeToken('(', '(', strOffset + i + 1, 0));
+ nested.push(this.makeToken(')', ')', strOffset + i + 1 + inner.length, 0));
+ }
+ tokens.push(['TOKENS', nested]);
+ }
+ }
+ i += expr.length;
+ pi = i + 1;
+ }
+ if ((i > pi && pi < str.length)) {
+ tokens.push(this.makeToken('NEOSTRING', str.slice(pi), strOffset + pi));
+ }
+ if (regex) {
+ return tokens;
+ }
+ if (!tokens.length) {
+ return this.token('STRING', '""', offsetInChunk, lexedLength);
+ }
+ if (tokens[0][0] !== 'NEOSTRING') {
+ tokens.unshift(this.makeToken('NEOSTRING', '', offsetInChunk));
+ }
+ if (interpolated = tokens.length > 1) {
+ this.token('(', '(', offsetInChunk, 0);
+ }
+ for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) {
+ token = tokens[i];
+ tag = token[0], value = token[1];
+ if (i) {
+ if (i) {
+ plusToken = this.token('+', '+');
+ }
+ locationToken = tag === 'TOKENS' ? value[0] : token;
+ plusToken[2] = {
+ first_line: locationToken[2].first_line,
+ first_column: locationToken[2].first_column,
+ last_line: locationToken[2].first_line,
+ last_column: locationToken[2].first_column
+ };
+ }
+ if (tag === 'TOKENS') {
+ (_ref4 = this.tokens).push.apply(_ref4, value);
+ } else if (tag === 'NEOSTRING') {
+ token[0] = 'STRING';
+ token[1] = this.makeString(value, '"', heredoc);
+ this.tokens.push(token);
+ } else {
+ this.error("Unexpected " + tag);
+ }
+ }
+ if (interpolated) {
+ rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0);
+ rparen.stringEnd = true;
+ this.tokens.push(rparen);
+ }
+ return tokens;
+ };
+
+ Lexer.prototype.pair = function(tag) {
+ var size, wanted;
+ if (tag !== (wanted = last(this.ends))) {
+ if ('OUTDENT' !== wanted) {
+ this.error("unmatched " + tag);
+ }
+ this.indent -= size = last(this.indents);
+ this.outdentToken(size, true);
+ return this.pair(tag);
+ }
+ return this.ends.pop();
+ };
+
+ Lexer.prototype.getLineAndColumnFromChunk = function(offset) {
+ var column, lineCount, lines, string;
+ if (offset === 0) {
+ return [this.chunkLine, this.chunkColumn];
+ }
+ if (offset >= this.chunk.length) {
+ string = this.chunk;
+ } else {
+ string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9);
+ }
+ lineCount = count(string, '\n');
+ column = this.chunkColumn;
+ if (lineCount > 0) {
+ lines = string.split('\n');
+ column = last(lines).length;
+ } else {
+ column += string.length;
+ }
+ return [this.chunkLine + lineCount, column];
+ };
+
+ Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) {
+ var lastCharacter, locationData, token, _ref2, _ref3;
+ if (offsetInChunk == null) {
+ offsetInChunk = 0;
+ }
+ if (length == null) {
+ length = value.length;
+ }
+ locationData = {};
+ _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1];
+ lastCharacter = Math.max(0, length - 1);
+ _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1];
+ token = [tag, value, locationData];
+ return token;
+ };
+
+ Lexer.prototype.token = function(tag, value, offsetInChunk, length) {
+ var token;
+ token = this.makeToken(tag, value, offsetInChunk, length);
+ this.tokens.push(token);
+ return token;
+ };
+
+ Lexer.prototype.tag = function(index, tag) {
+ var tok;
+ return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]);
+ };
+
+ Lexer.prototype.value = function(index, val) {
+ var tok;
+ return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]);
+ };
+
+ Lexer.prototype.unfinished = function() {
+ var _ref2;
+ return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS');
+ };
+
+ Lexer.prototype.escapeLines = function(str, heredoc) {
+ return str.replace(MULTILINER, heredoc ? '\\n' : '');
+ };
+
+ Lexer.prototype.makeString = function(body, quote, heredoc) {
+ if (!body) {
+ return quote + quote;
+ }
+ body = body.replace(/\\([\s\S])/g, function(match, contents) {
+ if (contents === '\n' || contents === quote) {
+ return contents;
+ } else {
+ return match;
+ }
+ });
+ body = body.replace(RegExp("" + quote, "g"), '\\$&');
+ return quote + this.escapeLines(body, heredoc) + quote;
+ };
+
+ Lexer.prototype.error = function(message) {
+ return throwSyntaxError(message, {
+ first_line: this.chunkLine,
+ first_column: this.chunkColumn
+ });
+ };
+
+ return Lexer;
+
+ })();
+
+ JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super'];
+
+ COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when'];
+
+ COFFEE_ALIAS_MAP = {
+ and: '&&',
+ or: '||',
+ is: '==',
+ isnt: '!=',
+ not: '!',
+ yes: 'true',
+ no: 'false',
+ on: 'true',
+ off: 'false'
+ };
+
+ COFFEE_ALIASES = (function() {
+ var _results;
+ _results = [];
+ for (key in COFFEE_ALIAS_MAP) {
+ _results.push(key);
+ }
+ return _results;
+ })();
+
+ COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES);
+
+ RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield'];
+
+ STRICT_PROSCRIBED = ['arguments', 'eval'];
+
+ JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED);
+
+ exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED);
+
+ exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED;
+
+ BOM = 65279;
+
+ IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/;
+
+ NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;
+
+ HEREDOC = /^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/;
+
+ OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/;
+
+ WHITESPACE = /^[^\n\S]+/;
+
+ COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/;
+
+ CODE = /^[-=]>/;
+
+ MULTI_DENT = /^(?:\n[^\n\S]*)+/;
+
+ SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/;
+
+ JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/;
+
+ REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/;
+
+ HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/;
+
+ HEREGEX_OMIT = /\s+(?:#.*)?/g;
+
+ MULTILINER = /\n/g;
+
+ HEREDOC_INDENT = /\n+([^\n\S]*)/g;
+
+ HEREDOC_ILLEGAL = /\*\//;
+
+ LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/;
+
+ TRAILING_SPACES = /\s+$/;
+
+ COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='];
+
+ UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO'];
+
+ LOGIC = ['&&', '||', '&', '|', '^'];
+
+ SHIFT = ['<<', '>>', '>>>'];
+
+ COMPARE = ['==', '!=', '<', '>', '<=', '>='];
+
+ MATH = ['*', '/', '%'];
+
+ RELATION = ['IN', 'OF', 'INSTANCEOF'];
+
+ BOOL = ['TRUE', 'FALSE'];
+
+ NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--'];
+
+ NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']');
+
+ CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER'];
+
+ INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED');
+
+ LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR'];
+
+}).call(this);
[12/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/src/raw.cc
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/src/raw.cc b/blackberry10/node_modules/net-ping/node_modules/raw-socket/src/raw.cc
new file mode 100644
index 0000000..e712760
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/src/raw.cc
@@ -0,0 +1,771 @@
+#ifndef RAW_CC
+#define RAW_CC
+
+#include <node.h>
+#include <node_buffer.h>
+
+#include <stdio.h>
+#include <string.h>
+#include "raw.h"
+
+#ifdef _WIN32
+static char errbuf[1024];
+#endif
+const char* raw_strerror (int code) {
+#ifdef _WIN32
+ if (FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, 0, code, 0, errbuf,
+ 1024, NULL)) {
+ return errbuf;
+ } else {
+ strcpy (errbuf, "Unknown error");
+ return errbuf;
+ }
+#else
+ return strerror (code);
+#endif
+}
+
+static uint16_t checksum (uint16_t start_with, unsigned char *buffer,
+ size_t length) {
+ unsigned i;
+ uint32_t sum = start_with > 0 ? ~start_with & 0xffff : 0;
+
+ for (i = 0; i < (length & ~1U); i += 2) {
+ sum += (uint16_t) ntohs (*((uint16_t *) (buffer + i)));
+ if (sum > 0xffff)
+ sum -= 0xffff;
+ }
+ if (i < length) {
+ sum += buffer [i] << 8;
+ if (sum > 0xffff)
+ sum -= 0xffff;
+ }
+
+ return ~sum & 0xffff;
+}
+
+namespace raw {
+
+static Persistent<String> CloseSymbol;
+static Persistent<String> EmitSymbol;
+static Persistent<String> ErrorSymbol;
+static Persistent<String> RecvReadySymbol;
+static Persistent<String> SendReadySymbol;
+
+void InitAll (Handle<Object> target) {
+ CloseSymbol = NODE_PSYMBOL("close");
+ EmitSymbol = NODE_PSYMBOL("emit");
+ ErrorSymbol = NODE_PSYMBOL("error");
+ RecvReadySymbol = NODE_PSYMBOL("recvReady");
+ SendReadySymbol = NODE_PSYMBOL("sendReady");
+
+ ExportConstants (target);
+ ExportFunctions (target);
+
+ SocketWrap::Init (target);
+}
+
+NODE_MODULE(raw, InitAll)
+
+Handle<Value> CreateChecksum (const Arguments& args) {
+ HandleScope scope;
+
+ if (args.Length () < 2) {
+ ThrowException (Exception::Error (String::New (
+ "At least one argument is required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[0]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Start with argument must be an unsigned integer")));
+ return scope.Close (args.This ());
+ }
+
+ uint16_t start_with = args[0]->ToUint32 ()->Value ();
+
+ if (start_with > 65535) {
+ ThrowException (Exception::TypeError (String::New (
+ "Start with argument cannot be larger than 65535")));
+ return scope.Close (args.This ());
+ }
+
+ if (! node::Buffer::HasInstance (args[1])) {
+ ThrowException (Exception::TypeError (String::New (
+ "Buffer argument must be a node Buffer object")));
+ return scope.Close (args.This ());
+ }
+
+ Local<Object> buffer = args[1]->ToObject ();
+ char *data = node::Buffer::Data (buffer);
+ size_t length = node::Buffer::Length (buffer);
+ unsigned int offset = 0;
+
+ if (args.Length () > 2) {
+ if (! args[2]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Offset argument must be an unsigned integer")));
+ return scope.Close (args.This ());
+ }
+ offset = args[2]->ToUint32 ()->Value ();
+ if (offset >= length) {
+ ThrowException (Exception::RangeError (String::New (
+ "Offset argument must be smaller than length of the buffer")));
+ return scope.Close (args.This ());
+ }
+ }
+
+ if (args.Length () > 3) {
+ if (! args[3]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Length argument must be an unsigned integer")));
+ return scope.Close (args.This ());
+ }
+ unsigned int new_length = args[3]->ToUint32 ()->Value ();
+ if (new_length > length) {
+ ThrowException (Exception::RangeError (String::New (
+ "Length argument must be smaller than length of the buffer")));
+ return scope.Close (args.This ());
+ }
+ length = new_length;
+ }
+
+ uint16_t sum = checksum (start_with, (unsigned char *) data + offset,
+ length);
+
+ Local<Integer> number = Integer::NewFromUnsigned (sum);
+
+ return scope.Close (number);
+}
+
+Handle<Value> Htonl (const Arguments& args) {
+ HandleScope scope;
+
+ if (args.Length () < 1) {
+ ThrowException (Exception::Error (String::New (
+ "One arguments is required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[0]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Number must be a 32 unsigned integer")));
+ return scope.Close (args.This ());
+ }
+
+ unsigned int number = args[0]->ToUint32 ()->Value ();
+ Local<Integer> converted = Integer::NewFromUnsigned (htonl (number));
+
+ return scope.Close (converted);
+}
+
+Handle<Value> Htons (const Arguments& args) {
+ HandleScope scope;
+
+ if (args.Length () < 1) {
+ ThrowException (Exception::Error (String::New (
+ "One arguments is required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[0]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Number must be a 16 unsigned integer")));
+ return scope.Close (args.This ());
+ }
+
+ unsigned int number = args[0]->ToUint32 ()->Value ();
+ if (number > 65535) {
+ ThrowException (Exception::RangeError (String::New (
+ "Number cannot be larger than 65535")));
+ return scope.Close (args.This ());
+ }
+ Local<Integer> converted = Integer::NewFromUnsigned (htons (number));
+
+ return scope.Close (converted);
+}
+
+Handle<Value> Ntohl (const Arguments& args) {
+ HandleScope scope;
+
+ if (args.Length () < 1) {
+ ThrowException (Exception::Error (String::New (
+ "One arguments is required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[0]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Number must be a 32 unsigned integer")));
+ return scope.Close (args.This ());
+ }
+
+ unsigned int number = args[0]->ToUint32 ()->Value ();
+ Local<Integer> converted = Integer::NewFromUnsigned (ntohl (number));
+
+ return scope.Close (converted);
+}
+
+Handle<Value> Ntohs (const Arguments& args) {
+ HandleScope scope;
+
+ if (args.Length () < 1) {
+ ThrowException (Exception::Error (String::New (
+ "One arguments is required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[0]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Number must be a 16 unsigned integer")));
+ return scope.Close (args.This ());
+ }
+
+ unsigned int number = args[0]->ToUint32 ()->Value ();
+ if (number > 65535) {
+ ThrowException (Exception::RangeError (String::New (
+ "Number cannot be larger than 65535")));
+ return scope.Close (args.This ());
+ }
+ Local<Integer> converted = Integer::NewFromUnsigned (htons (number));
+
+ return scope.Close (converted);
+}
+
+void ExportConstants (Handle<Object> target) {
+ Local<Object> socket_level = Object::New ();
+ Local<Object> socket_option = Object::New ();
+
+ target->Set (String::NewSymbol ("SocketLevel"), socket_level);
+ target->Set (String::NewSymbol ("SocketOption"), socket_option);
+
+ socket_level->Set (String::NewSymbol ("SOL_SOCKET"), Number::New (SOL_SOCKET));
+ socket_level->Set (String::NewSymbol ("IPPROTO_IP"), Number::New (IPPROTO_IP));
+ socket_level->Set (String::NewSymbol ("IPPROTO_IPV6"), Number::New (IPPROTO_IPV6));
+
+ socket_option->Set (String::NewSymbol ("SO_BROADCAST"), Number::New (SO_BROADCAST));
+ socket_option->Set (String::NewSymbol ("SO_RCVBUF"), Number::New (SO_RCVBUF));
+ socket_option->Set (String::NewSymbol ("SO_RCVTIMEO"), Number::New (SO_RCVTIMEO));
+ socket_option->Set (String::NewSymbol ("SO_SNDBUF"), Number::New (SO_SNDBUF));
+ socket_option->Set (String::NewSymbol ("SO_SNDTIMEO"), Number::New (SO_SNDTIMEO));
+
+ socket_option->Set (String::NewSymbol ("IP_HDRINCL"), Number::New (IP_HDRINCL));
+ socket_option->Set (String::NewSymbol ("IP_OPTIONS"), Number::New (IP_OPTIONS));
+ socket_option->Set (String::NewSymbol ("IP_TOS"), Number::New (IP_TOS));
+ socket_option->Set (String::NewSymbol ("IP_TTL"), Number::New (IP_TTL));
+
+#ifdef _WIN32
+ socket_option->Set (String::NewSymbol ("IPV6_HDRINCL"), Number::New (IPV6_HDRINCL));
+#endif
+ socket_option->Set (String::NewSymbol ("IPV6_TTL"), Number::New (IPV6_UNICAST_HOPS));
+ socket_option->Set (String::NewSymbol ("IPV6_UNICAST_HOPS"), Number::New (IPV6_UNICAST_HOPS));
+ socket_option->Set (String::NewSymbol ("IPV6_V6ONLY"), Number::New (IPV6_V6ONLY));
+}
+
+void ExportFunctions (Handle<Object> target) {
+ target->Set (String::NewSymbol ("createChecksum"), FunctionTemplate::New (CreateChecksum)->GetFunction ());
+
+ target->Set (String::NewSymbol ("htonl"), FunctionTemplate::New (Htonl)->GetFunction ());
+ target->Set (String::NewSymbol ("htons"), FunctionTemplate::New (Htons)->GetFunction ());
+ target->Set (String::NewSymbol ("ntohl"), FunctionTemplate::New (Ntohl)->GetFunction ());
+ target->Set (String::NewSymbol ("ntohs"), FunctionTemplate::New (Ntohs)->GetFunction ());
+}
+
+void SocketWrap::Init (Handle<Object> target) {
+ HandleScope scope;
+
+ Local<FunctionTemplate> tpl = FunctionTemplate::New (New);
+
+ tpl->InstanceTemplate ()->SetInternalFieldCount (1);
+ tpl->SetClassName (String::NewSymbol ("SocketWrap"));
+
+ NODE_SET_PROTOTYPE_METHOD(tpl, "close", Close);
+ NODE_SET_PROTOTYPE_METHOD(tpl, "getOption", GetOption);
+ NODE_SET_PROTOTYPE_METHOD(tpl, "pause", Pause);
+ NODE_SET_PROTOTYPE_METHOD(tpl, "recv", Recv);
+ NODE_SET_PROTOTYPE_METHOD(tpl, "send", Send);
+ NODE_SET_PROTOTYPE_METHOD(tpl, "setOption", SetOption);
+
+ target->Set (String::NewSymbol ("SocketWrap"), tpl->GetFunction ());
+}
+
+SocketWrap::SocketWrap () {}
+
+SocketWrap::~SocketWrap () {
+ this->CloseSocket ();
+}
+
+Handle<Value> SocketWrap::Close (const Arguments& args) {
+ HandleScope scope;
+ SocketWrap* socket = SocketWrap::Unwrap<SocketWrap> (args.This ());
+
+ socket->CloseSocket ();
+
+ return scope.Close (args.This ());
+}
+
+void SocketWrap::CloseSocket (void) {
+ HandleScope scope;
+
+ if (this->poll_initialised_) {
+ uv_poll_stop (&this->poll_watcher_);
+ closesocket (this->poll_fd_);
+ this->poll_fd_ = INVALID_SOCKET;
+
+ uv_close ((uv_handle_t *) &this->poll_watcher_, OnClose);
+ this->poll_initialised_ = false;
+ }
+
+ Local<Value> emit = this->handle_->Get (EmitSymbol);
+ Local<Function> cb = emit.As<Function> ();
+
+ Local<Value> args[1];
+ args[0] = Local<Value>::New (CloseSymbol);
+
+ cb->Call (this->handle_, 1, args);
+}
+
+int SocketWrap::CreateSocket (void) {
+ if (this->poll_initialised_)
+ return 0;
+
+ if ((this->poll_fd_ = socket (this->family_, SOCK_RAW, this->protocol_))
+ == INVALID_SOCKET)
+ return SOCKET_ERRNO;
+
+#ifdef _WIN32
+ unsigned long flag = 1;
+ if (ioctlsocket (this->poll_fd_, FIONBIO, &flag) == SOCKET_ERROR)
+ return SOCKET_ERRNO;
+#else
+ int flag = 1;
+ if ((flag = fcntl (this->poll_fd_, F_GETFL, 0)) == SOCKET_ERROR)
+ return SOCKET_ERRNO;
+ if (fcntl (this->poll_fd_, F_SETFL, flag | O_NONBLOCK) == SOCKET_ERROR)
+ return SOCKET_ERRNO;
+#endif
+
+ uv_poll_init_socket (uv_default_loop (), &this->poll_watcher_,
+ this->poll_fd_);
+ this->poll_watcher_.data = this;
+ uv_poll_start (&this->poll_watcher_, UV_READABLE, IoEvent);
+
+ this->poll_initialised_ = true;
+
+ return 0;
+}
+
+Handle<Value> SocketWrap::GetOption (const Arguments& args) {
+ HandleScope scope;
+ SocketWrap* socket = SocketWrap::Unwrap<SocketWrap> (args.This ());
+
+ if (args.Length () < 3) {
+ ThrowException (Exception::Error (String::New (
+ "Three arguments are required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[0]->IsNumber ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Level argument must be a number")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[1]->IsNumber ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Option argument must be a number")));
+ return scope.Close (args.This ());
+ }
+
+ int level = args[0]->ToInt32 ()->Value ();
+ int option = args[1]->ToInt32 ()->Value ();
+ SOCKET_OPT_TYPE val = NULL;
+ unsigned int ival = 0;
+ SOCKET_LEN_TYPE len;
+
+ if (! node::Buffer::HasInstance (args[2])) {
+ ThrowException (Exception::TypeError (String::New (
+ "Value argument must be a node Buffer object if length is "
+ "provided")));
+ return scope.Close (args.This ());
+ }
+
+ Local<Object> buffer = args[2]->ToObject ();
+ val = node::Buffer::Data (buffer);
+
+ if (! args[3]->IsInt32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Length argument must be an unsigned integer")));
+ return scope.Close (args.This ());
+ }
+
+ len = (SOCKET_LEN_TYPE) node::Buffer::Length (buffer);
+
+ int rc = getsockopt (socket->poll_fd_, level, option,
+ (val ? val : (SOCKET_OPT_TYPE) &ival), &len);
+
+ if (rc == SOCKET_ERROR) {
+ ThrowException (Exception::Error (String::New (
+ raw_strerror (SOCKET_ERRNO))));
+ return scope.Close (args.This ());
+ }
+
+ Local<Number> got = Integer::NewFromUnsigned (len);
+ return scope.Close (got);
+}
+
+void SocketWrap::HandleIOEvent (int status, int revents) {
+ HandleScope scope;
+
+ if (status) {
+ Local<Value> emit = this->handle_->Get (EmitSymbol);
+ Local<Function> cb = emit.As<Function> ();
+
+ Local<Value> args[2];
+ args[0] = Local<Value>::New (ErrorSymbol);
+ args[1] = Exception::Error (String::New (
+ raw_strerror (uv_last_error (uv_default_loop ()).code)));
+
+ cb->Call (this->handle_, 2, args);
+ } else {
+ Local<Value> emit = this->handle_->Get (EmitSymbol);
+ Local<Function> cb = emit.As<Function> ();
+
+ Local<Value> args[1];
+ if (revents & UV_READABLE)
+ args[0] = Local<Value>::New (RecvReadySymbol);
+ else
+ args[0] = Local<Value>::New (SendReadySymbol);
+
+ cb->Call (this->handle_, 1, args);
+ }
+}
+
+Handle<Value> SocketWrap::New (const Arguments& args) {
+ HandleScope scope;
+ SocketWrap* socket = new SocketWrap ();
+ int rc, family = AF_INET;
+
+ if (args.Length () < 1) {
+ ThrowException (Exception::Error (String::New (
+ "One argument is required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[0]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Protocol argument must be an unsigned integer")));
+ return scope.Close (args.This ());
+ } else {
+ socket->protocol_ = args[0]->ToUint32 ()->Value ();
+ }
+
+ if (args.Length () > 1) {
+ if (! args[1]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Address family argument must be an unsigned integer")));
+ return scope.Close (args.This ());
+ } else {
+ if (args[1]->ToUint32 ()->Value () == 2)
+ family = AF_INET6;
+ }
+ }
+
+ socket->family_ = family;
+
+ socket->poll_initialised_ = false;
+
+ socket->no_ip_header_ = false;
+
+ rc = socket->CreateSocket ();
+ if (rc != 0) {
+ ThrowException (Exception::Error (String::New (raw_strerror (rc))));
+ return scope.Close (args.This ());
+ }
+
+ socket->Wrap (args.This ());
+
+ return scope.Close (args.This ());
+}
+
+void SocketWrap::OnClose (uv_handle_t *handle) {
+ // We can re-use the socket so we won't actually do anything here
+}
+
+Handle<Value> SocketWrap::Pause (const Arguments& args) {
+ HandleScope scope;
+ SocketWrap* socket = SocketWrap::Unwrap<SocketWrap> (args.This ());
+
+ if (args.Length () < 2) {
+ ThrowException (Exception::Error (String::New (
+ "Two arguments are required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[0]->IsBoolean ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Recv argument must be a boolean")));
+ return scope.Close (args.This ());
+ }
+ bool pause_recv = args[0]->ToBoolean ()->Value ();
+
+ if (! args[0]->IsBoolean ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Send argument must be a boolean")));
+ return scope.Close (args.This ());
+ }
+ bool pause_send = args[0]->ToBoolean ()->Value ();
+
+ int events = (pause_recv ? 0 : UV_READABLE)
+ | (pause_send ? 0 : UV_WRITABLE);
+
+ uv_poll_stop (&socket->poll_watcher_);
+ uv_poll_start (&socket->poll_watcher_, events, IoEvent);
+
+ return scope.Close (args.This ());
+}
+
+Handle<Value> SocketWrap::Recv (const Arguments& args) {
+ HandleScope scope;
+ SocketWrap* socket = SocketWrap::Unwrap<SocketWrap> (args.This ());
+ Local<Object> buffer;
+ sockaddr_in sin_address;
+ sockaddr_in6 sin6_address;
+ char addr[50];
+ int rc;
+#ifdef _WIN32
+ int sin_length = socket->family_ == AF_INET6
+ ? sizeof (sin6_address)
+ : sizeof (sin_address);
+#else
+ socklen_t sin_length = socket->family_ == AF_INET6
+ ? sizeof (sin6_address)
+ : sizeof (sin_address);
+#endif
+
+ if (args.Length () < 2) {
+ ThrowException (Exception::Error (String::New (
+ "Five arguments are required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! node::Buffer::HasInstance (args[0])) {
+ ThrowException (Exception::TypeError (String::New (
+ "Buffer argument must be a node Buffer object")));
+ return scope.Close (args.This ());
+ } else {
+ buffer = args[0]->ToObject ();
+ }
+
+ if (! args[1]->IsFunction ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Callback argument must be a function")));
+ return scope.Close (args.This ());
+ }
+
+ rc = socket->CreateSocket ();
+ if (rc != 0) {
+ ThrowException (Exception::Error (String::New (raw_strerror (errno))));
+ return scope.Close (args.This ());
+ }
+
+ if (socket->family_ == AF_INET6) {
+ memset (&sin6_address, 0, sizeof (sin6_address));
+ rc = recvfrom (socket->poll_fd_, node::Buffer::Data (buffer),
+ (int) node::Buffer::Length (buffer), 0, (sockaddr *) &sin6_address,
+ &sin_length);
+ } else {
+ memset (&sin_address, 0, sizeof (sin_address));
+ rc = recvfrom (socket->poll_fd_, node::Buffer::Data (buffer),
+ (int) node::Buffer::Length (buffer), 0, (sockaddr *) &sin_address,
+ &sin_length);
+ }
+
+ if (rc == SOCKET_ERROR) {
+ ThrowException (Exception::Error (String::New (raw_strerror (
+ SOCKET_ERRNO))));
+ return scope.Close (args.This ());
+ }
+
+ if (socket->family_ == AF_INET6)
+ uv_ip6_name (&sin6_address, addr, 50);
+ else
+ uv_ip4_name (&sin_address, addr, 50);
+
+ Local<Function> cb = Local<Function>::Cast (args[1]);
+ const unsigned argc = 3;
+ Local<Value> argv[argc];
+ argv[0] = args[0];
+ argv[1] = Number::New (rc);
+ argv[2] = String::New (addr);
+ cb->Call (Context::GetCurrent ()->Global (), argc, argv);
+
+ return scope.Close (args.This ());
+}
+
+Handle<Value> SocketWrap::Send (const Arguments& args) {
+ HandleScope scope;
+ SocketWrap* socket = SocketWrap::Unwrap<SocketWrap> (args.This ());
+ Local<Object> buffer;
+ uint32_t offset;
+ uint32_t length;
+ int rc;
+ char *data;
+
+ if (args.Length () < 5) {
+ ThrowException (Exception::Error (String::New (
+ "Five arguments are required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! node::Buffer::HasInstance (args[0])) {
+ ThrowException (Exception::TypeError (String::New (
+ "Buffer argument must be a node Buffer object")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[1]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Offset argument must be an unsigned integer")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[2]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Length argument must be an unsigned integer")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[3]->IsString ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Address argument must be a string")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[4]->IsFunction ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Callback argument must be a function")));
+ return scope.Close (args.This ());
+ }
+
+ rc = socket->CreateSocket ();
+ if (rc != 0) {
+ ThrowException (Exception::Error (String::New (raw_strerror (errno))));
+ return scope.Close (args.This ());
+ }
+
+ buffer = args[0]->ToObject ();
+ offset = args[1]->ToUint32 ()->Value ();
+ length = args[2]->ToUint32 ()->Value ();
+ String::AsciiValue address (args[3]);
+
+ data = node::Buffer::Data (buffer) + offset;
+
+ if (socket->family_ == AF_INET6) {
+ struct sockaddr_in6 addr = uv_ip6_addr (*address, 0);
+ rc = sendto (socket->poll_fd_, data, length, 0,
+ (struct sockaddr *) &addr, sizeof (addr));
+ } else {
+ struct sockaddr_in addr = uv_ip4_addr (*address, 0);
+ rc = sendto (socket->poll_fd_, data, length, 0,
+ (struct sockaddr *) &addr, sizeof (addr));
+ }
+
+ if (rc == SOCKET_ERROR) {
+ ThrowException (Exception::Error (String::New (raw_strerror (
+ SOCKET_ERRNO))));
+ return scope.Close (args.This ());
+ }
+
+ Local<Function> cb = Local<Function>::Cast (args[4]);
+ const unsigned argc = 1;
+ Local<Value> argv[argc];
+ argv[0] = Number::New (rc);
+ cb->Call (Context::GetCurrent ()->Global (), argc, argv);
+
+ return scope.Close (args.This ());
+}
+
+Handle<Value> SocketWrap::SetOption (const Arguments& args) {
+ HandleScope scope;
+ SocketWrap* socket = SocketWrap::Unwrap<SocketWrap> (args.This ());
+
+ if (args.Length () < 3) {
+ ThrowException (Exception::Error (String::New (
+ "Three or four arguments are required")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[0]->IsNumber ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Level argument must be a number")));
+ return scope.Close (args.This ());
+ }
+
+ if (! args[1]->IsNumber ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Option argument must be a number")));
+ return scope.Close (args.This ());
+ }
+
+ int level = args[0]->ToInt32 ()->Value ();
+ int option = args[1]->ToInt32 ()->Value ();
+ SOCKET_OPT_TYPE val = NULL;
+ unsigned int ival = 0;
+ SOCKET_LEN_TYPE len;
+
+ if (args.Length () > 3) {
+ if (! node::Buffer::HasInstance (args[2])) {
+ ThrowException (Exception::TypeError (String::New (
+ "Value argument must be a node Buffer object if length is "
+ "provided")));
+ return scope.Close (args.This ());
+ }
+
+ Local<Object> buffer = args[2]->ToObject ();
+ val = node::Buffer::Data (buffer);
+
+ if (! args[3]->IsInt32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Length argument must be an unsigned integer")));
+ return scope.Close (args.This ());
+ }
+
+ len = args[3]->ToInt32 ()->Value ();
+
+ if (len > node::Buffer::Length (buffer)) {
+ ThrowException (Exception::TypeError (String::New (
+ "Length argument is larger than buffer length")));
+ return scope.Close (args.This ());
+ }
+ } else {
+ if (! args[2]->IsUint32 ()) {
+ ThrowException (Exception::TypeError (String::New (
+ "Value argument must be a unsigned integer")));
+ return scope.Close (args.This ());
+ }
+
+ ival = args[2]->ToUint32 ()->Value ();
+ len = 4;
+ }
+
+ int rc = setsockopt (socket->poll_fd_, level, option,
+ (val ? val : (SOCKET_OPT_TYPE) &ival), len);
+
+ if (rc == SOCKET_ERROR) {
+ ThrowException (Exception::Error (String::New (
+ raw_strerror (SOCKET_ERRNO))));
+ return scope.Close (args.This ());
+ }
+
+ return scope.Close (args.This ());
+}
+
+static void IoEvent (uv_poll_t* watcher, int status, int revents) {
+ SocketWrap *socket = static_cast<SocketWrap*>(watcher->data);
+ socket->HandleIOEvent (status, revents);
+}
+
+}; /* namespace raw */
+
+#endif /* RAW_CC */
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/node_modules/raw-socket/src/raw.h
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/node_modules/raw-socket/src/raw.h b/blackberry10/node_modules/net-ping/node_modules/raw-socket/src/raw.h
new file mode 100644
index 0000000..a446fe9
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/node_modules/raw-socket/src/raw.h
@@ -0,0 +1,100 @@
+#ifndef RAW_H
+#define RAW_H
+
+/**
+ ** The following warnings are displayed during compilation on win32 platforms
+ ** using node-gyp:
+ **
+ ** - C++ exception handler used, but unwind semantics are not enabled.
+ ** - no definition for inline function 'v8::Persistent<T> \
+ ** v8::Persistent<T>::New(v8::Handle<T>)'
+ **
+ ** There don't seem to be any issues which would suggest these are real
+ ** problems, so we've disabled them for now.
+ **/
+#ifdef _WIN32
+#pragma warning(disable:4506;disable:4530)
+#endif
+
+#include <string>
+
+#include <node.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#include <Ws2tcpip.h>
+#define SOCKET_ERRNO WSAGetLastError()
+#define SOCKET_OPT_TYPE char *
+#define SOCKET_LEN_TYPE int
+#else
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <fcntl.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#define SOCKET int
+#define SOCKET_ERROR -1
+#define SOCKET_ERRNO errno
+#define INVALID_SOCKET -1
+#define closesocket close
+#define SOCKET_OPT_TYPE void *
+#define SOCKET_LEN_TYPE socklen_t
+#endif
+
+using namespace v8;
+
+namespace raw {
+
+Handle<Value> CreateChecksum (const Arguments& args);
+
+void ExportConstants (Handle<Object> target);
+void ExportFunctions (Handle<Object> target);
+
+Handle<Value> Htonl (const Arguments& args);
+Handle<Value> Htons (const Arguments& args);
+Handle<Value> Ntohl (const Arguments& args);
+Handle<Value> Ntohs (const Arguments& args);
+
+class SocketWrap : public node::ObjectWrap {
+public:
+ void HandleIOEvent (int status, int revents);
+ static void Init (Handle<Object> target);
+
+private:
+ SocketWrap ();
+ ~SocketWrap ();
+
+ static Handle<Value> Close (const Arguments& args);
+
+ void CloseSocket (void);
+
+ int CreateSocket (void);
+
+ static Handle<Value> GetOption (const Arguments& args);
+
+ static Handle<Value> New (const Arguments& args);
+
+ static void OnClose (uv_handle_t *handle);
+
+ static Handle<Value> Pause (const Arguments& args);
+ static Handle<Value> Recv (const Arguments& args);
+ static Handle<Value> Send (const Arguments& args);
+ static Handle<Value> SetOption (const Arguments& args);
+
+ bool no_ip_header_;
+
+ uint32_t family_;
+ uint32_t protocol_;
+
+ SOCKET poll_fd_;
+ uv_poll_t poll_watcher_;
+ bool poll_initialised_;
+};
+
+static void IoEvent (uv_poll_t* watcher, int status, int revents);
+
+}; /* namespace raw */
+
+#endif /* RAW_H */
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/net-ping/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/net-ping/package.json b/blackberry10/node_modules/net-ping/package.json
new file mode 100644
index 0000000..649fb17
--- /dev/null
+++ b/blackberry10/node_modules/net-ping/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "net-ping",
+ "version": "1.1.9",
+ "description": "Ping and trace route to many hosts at once.",
+ "main": "index.js",
+ "directories": {
+ "example": "example"
+ },
+ "dependencies": {
+ "raw-socket": "*"
+ },
+ "contributors": [
+ {
+ "name": "Stephen Vickers",
+ "email": "stephen.vickers.sv@gmail.com"
+ }
+ ],
+ "repository": {
+ "type": "mercurial",
+ "url": "https://bitbucket.org/stephenwvickers/node-net-ping"
+ },
+ "keywords": [
+ "echo",
+ "icmp",
+ "monitor",
+ "monitoring",
+ "net",
+ "network",
+ "ping",
+ "trace",
+ "trace-route",
+ "traceroute",
+ "tracert"
+ ],
+ "author": {
+ "name": "Stephen Vickers",
+ "email": "stephen.vickers.sv@gmail.com"
+ },
+ "license": "MIT",
+ "readme": "\n# net-ping - [homepage][homepage]\n\nThis module implements ICMP Echo (ping) support for [Node.js][nodejs].\n\nThis module is installed using [node package manager (npm)][npm]:\n\n npm install net-ping\n\nIt is loaded using the `require()` function:\n\n var ping = require (\"net-ping\");\n\nA ping session can then be created to ping or trace route to many hosts:\n\n var session = ping.createSession ();\n\n session.pingHost (target, function (error, target) {\n if (error)\n console.log (target + \": \" + error.toString ());\n else\n console.log (target + \": Alive\");\n });\n\n[homepage]: http://re-tool.org \"Homepage\"\n[nodejs]: http://nodejs.org \"Node.js\"\n[npm]: https://npmjs.org/ \"npm\"\n\n# Network Protocol Support\n\nThis module supports IPv4 using the ICMP, and IPv6 using the ICMPv6.\n\n# Error Handling\n\nEach request exposed by this module requires one or more mandatory callback\nfunctions. Callback funct
ions are typically provided an `error` argument.\n\nAll errors are sub-classes of the `Error` class. For timed out errors the\nerror passed to the callback function will be an instance of the\n`ping.RequestTimedOutError` class, with the exposed `message` attribute set\nto `Request timed out`.\n\nThis makes it easy to determine if a host responded, a time out occurred, or\nwhether an error response was received:\n\n session.pingHost (\"1.2.3.4\", function (error, target) {\n if (error)\n if (error instanceof ping.RequestTimedOutError)\n console.log (target + \": Not alive\");\n else\n console.log (target + \": \" + error.toString ());\n else\n console.log (target + \": Alive\");\n });\n\nIn addition to the the `ping.RequestTimedOutError` class, the following errors\nare also exported by this module to wrap ICMP error responses:\n\n * `DestinationUnreachableError`\n * `PacketTooBigError`\n * `Parameter
ProblemError`\n * `RedirectReceivedError`\n * `SourceQuenchError`\n * `TimeExceededError`\n\nThese errors are typically reported by hosts other than the intended target.\nIn all cases each class exposes a `source` attribute which will specify the\nhost who reported the error (which could be the intended target). This will\nalso be included in the errors `message` attribute, i.e.:\n\n $ sudo node example/ping-ttl.js 1 192.168.2.10 192.168.2.20 192.168.2.30\n 192.168.2.10: Alive\n 192.168.2.20: TimeExceededError: Time exceeded (source=192.168.1.1)\n 192.168.2.30: Not alive\n\nThe `Session` class will emit an `error` event for any other error not\ndirectly associated with a request. This is typically an instance of the\n`Error` class with the errors `message` attribute specifying the reason.\n\n# Packet Size\n\nBy default ICMP echo request packets sent by this module are 16 bytes in size.\nSome implementations cannot cope with such small ICMP echo requests. For\nexample,
some implementations will return an ICMP echo reply, but will include\nan incorrect ICMP checksum.\n\nThis module exposes a `packetSize` option to the `createSession()` method which\nspecifies how big ICMP echo request packets should be:\n\n var session = ping.createSession ({packetSize: 64});\n\n# Round Trip Times\n\nSome callbacks used by methods exposed by this module provide two instances of\nthe JavaScript `Date` class specifying when the first ping was sent for a\nrequest, and when a request completed.\n\nThese parameters are typically named `sent` and `rcvd`, and are provided to\nhelp round trip time calculation.\n\nA request can complete in one of two ways. In the first, a ping response is\nreceived and `rcvd - sent` will yield the round trip time for the request in\nmilliseconds.\n\nIn the second, no ping response is received resulting in a request time out.\nIn this case `rcvd - sent` will yield the total time spent waiting for each\nretry to timeout if any. For exam
ple, if the `retries` option to the\n`createSession()` method was specified as `2` and `timeout` as `2000` then\n`rcvd - sent` will yield more than `6000` milliseconds.\n\nAlthough this module provides instances of the `Date` class to help round trip\ntime calculation the dates and times represented in each instance should not be\nconsidered 100% accurate.\n\nEnvironmental conditions can affect when a date and time is actually\ncalculated, e.g. garbage collection introducing a delay or the receipt of many\npackets at once. There are also a number of functions through which received\npackets must pass, which can also introduce a slight variable delay.\n\nThroughout development experience has shown that, in general the smaller the\nround trip time the less accurate it will be - but the information is still\nuseful nonetheless.\n\n# Constants\n\nThe following sections describe constants exported and used by this module.\n\n## ping.NetworkProtocol\n\nThis object contains constants whic
h can be used for the `networkProtocol`\noption to the `createSession()` function exposed by this module. This option\nspecifies the IP protocol version to use when creating the raw socket.\n\nThe following constants are defined in this object:\n\n * `IPv4` - IPv4 protocol\n * `IPv6` - IPv6 protocol\n\n# Using This Module\n\nThe `Session` class is used to issue ping and trace route requests to many\nhosts. This module exports the `createSession()` function which is used to\ncreate instances of the `Session` class.\n\n## ping.createSession ([options])\n\nThe `createSession()` function instantiates and returns an instance of the\n`Session` class:\n\n // Default options\n var options = {\n networkProtocol: ping.NetworkProtocol.IPv4,\n packetSize: 16,\n retries: 1,\n sessionId: (process.pid % 65535),\n timeout: 2000,\n ttl: 128\n };\n \n var session = ping.createSession (options);\n\nThe optional `options` parameter is an object
, and can contain the following\nitems:\n\n * `networkProtocol` - Either the constant `ping.NetworkProtocol.IPv4` or the\n constant `ping.NetworkProtocol.IPv6`, defaults to the constant\n `ping.NetworkProtocol.IPv4`\n * `packetSize` - How many bytes each ICMP echo request packet should be,\n defaults to `16`, if the value specified is less that `12` then the value\n `12` will be used (8 bytes are required for the ICMP packet itself, then 4\n bytes are required to encode a unique session ID in the request and response\n packets)\n * `retries` - Number of times to re-send a ping requests, defaults to `1`\n * `sessionId` - A unique ID used to identify request and response packets sent\n by this instance of the `Session` class, valid numbers are in the range of\n `1` to `65535`, defaults to the value of `process.pid % 65535`\n * `timeout` - Number of milliseconds to wait for a response before re-trying\n or failing, defaults to `2000`\n * `ttl` - Value to use for the I
P header time to live field, defaults to `128`\n\nAfter creating the ping `Session` object an underlying raw socket will be\ncreated. If the underlying raw socket cannot be opened an exception with be\nthrown. The error will be an instance of the `Error` class.\n\nSeperate instances of the `Session` class must be created for IPv4 and IPv6.\n\n## session.on (\"close\", callback)\n\nThe `close` event is emitted by the session when the underlying raw socket\nis closed.\n\nNo arguments are passed to the callback.\n\nThe following example prints a message to the console when the underlying raw\nsocket is closed:\n\n session.on (\"close\", function () {\n console.log (\"socket closed\");\n });\n\n## session.on (\"error\", callback)\n\nThe `error` event is emitted by the session when the underlying raw socket\nemits an error.\n\nThe following arguments will be passed to the `callback` function:\n\n * `error` - An instance of the `Error` class, the exposed `message` attribute
\n will contain a detailed error message.\n\nThe following example prints a message to the console when an error occurs\nwith the underlying raw socket, the session is then closed:\n\n session.on (\"error\", function (error) {\n console.log (error.toString ());\n session.close ();\n });\n\n## session.close ()\n\nThe `close()` method closes the underlying raw socket, and cancels all\noutstanding requsts.\n\nThe calback function for each outstanding ping requests will be called. The\nerror parameter will be an instance of the `Error` class, and the `message`\nattribute set to `Socket forcibly closed`.\n\nThe sessoin can be re-used simply by submitting more ping requests, a new raw\nsocket will be created to serve the new ping requests. This is a way in which\nto clear outstanding requests.\n\nThe following example submits a ping request and prints the target which\nsuccessfully responded first, and then closes the session which will clear the\nother outstanding
ping requests.\n\n var targets = [\"1.1.1.1\", \"2.2.2.2\", \"3.3.3.3\"];\n \n for (var i = 0; i < targets.length; i++) {\n session.pingHost (targets[i], function (error, target) {\n if (! error) {\n console.log (target);\n session.close (); \n }\n });\n }\n\n## session.pingHost (target, callback)\n\nThe `pingHost()` method sends a ping request to a remote host.\n\nThe `target` parameter is the dotted quad formatted IP address of the target\nhost for IPv4 sessions, or the compressed formatted IP address of the target\nhost for IPv6 sessions.\n\nThe `callback` function is called once the ping requests is complete. The\nfollowing arguments will be passed to the `callback` function:\n\n * `error` - Instance of the `Error` class or a sub-class, or `null` if no\n error occurred\n * `target` - The target parameter as specified in the request\n still be the target host and NOT the responding gateway\n * `se
nt` - An instance of the `Date` class specifying when the first ping\n was sent for this request (refer to the Round Trip Time section for more\n information)\n * `rcvd` - An instance of the `Date` class specifying when the request\n completed (refer to the Round Trip Time section for more information)\n\nThe following example sends a ping request to a remote host:\n\n var target = \"fe80::a00:27ff:fe2a:3427\";\n\n session.pingHost (target, function (error, target, sent, rcvd) {\n var ms = rcvd - sent;\n if (error)\n console.log (target + \": \" + error.toString ());\n else\n console.log (target + \": Alive (ms=\" + ms + \")\");\n });\n\n## session.traceRoute (target, ttl, feedCallback, doneCallback)\n\nThe `traceRoute()` method provides similar functionality to the trace route\nutility typically provided with most networked operating systems.\n\nThe `target` parameter is the dotted quad formatted IP address of the target\nho
st for IPv4 sessions, or the compressed formatted IP address of the target\nhost for IPv6 sessions. The optional `ttl` parameter specifies the maximum\nnumber of hops used by the trace route and defaults to the `ttl` options\nparameter as defined by the `createSession()` method.\n\nSome hosts do not respond to ping requests when the time to live is `0`, that\nis they will not send back an time exceeded error response. Instead of\nstopping the trace route at the first time out this method will move on to the\nnext hop, by increasing the time to live by 1. It will do this 2 times,\nmeaning that a trace route will continue until the target host responds or at\nmost 3 request time outs are experienced.\n\nEach requst is subject to the `retries` and `timeout` option parameters to the\n`createSession()` method. That is, requests will be retried per hop as per\nthese parameters.\n\nThis method will not call a single callback once the trace route is complete.\nInstead the `feedCallback`
function will be called each time a ping response is\nreceived or a time out occurs. The following arguments will be passed to the\n`feedCallback` function:\n\n * `error` - Instance of the `Error` class or a sub-class, or `null` if no\n error occurred\n * `target` - The target parameter as specified in the request\n * `ttl` - The time to live used in the request which triggered this respinse\n * `sent` - An instance of the `Date` class specifying when the first ping\n was sent for this request (refer to the Round Trip Time section for more\n information)\n * `rcvd` - An instance of the `Date` class specifying when the request\n completed (refer to the Round Trip Time section for more information)\n\nOnce a ping response has been received from the target, or more than three\nrequest timed out errors are experienced, the `doneCallback` function will be\ncalled. The following arguments will be passed to the `doneCallback` function:\n\n * `error` - Instance of the `Error` class
or a sub-class, or `null` if no\n error occurred\n * `target` - The target parameter as specified in the request\n\nOnce the `doneCallback` function has been called the request is complete and\nthe `requestCallback` function will no longer be called.\n\nIf the `feedCallback` function returns a true value when called the trace route\nwill stop and the `doneCallback` will be called.\n\nThe following example initiates a trace route to a remote host:\n\n function doneCb (error, target) {\n if (error)\n console.log (target + \": \" + error.toString ());\n else\n console.log (target + \": Done\");\n }\n\n function feedCb (error, target, ttl, sent, rcvd) {\n var ms = rcvd - sent;\n if (error) {\n if (error instanceof ping.TimeExceededError) {\n console.log (target + \": \" + error.source + \" (ttl=\"\n + ttl + \" ms=\" + ms +\")\");\n } else {\n console.l
og (target + \": \" + error.toString ()\n + \" (ttl=\" + ttl + \" ms=\" + ms +\")\");\n }\n } else {\n console.log (target + \": \" + target + \" (ttl=\" + ttl\n + \" ms=\" + ms +\")\");\n }\n }\n\n session.traceRoute (\"192.168.10.10\", 10, feedCb, doneCb);\n\n# Example Programs\n\nExample programs are included under the modules `example` directory.\n\n# Bugs & Known Issues\n\nNone, yet!\n\nBug reports should be sent to <st...@gmail.com>.\n\n# Changes\n\n## Version 1.0.0 - 03/02/2013\n\n * Initial release\n\n## Version 1.0.1 - 04/02/2013\n\n * Minor corrections to the README.md\n * Add note to README.md about error handling\n * Timed out errors are now instances of the `ping.RequestTimedOutError`\n object\n\n## Version 1.0.2 - 11/02/2013\n\n * The RequestTimedOutError class is not being exported\n\n## Version 1.1.0 - 13/02/2013\n\n * Support IPv6\n\n## Version 1.1.1 - 15/02/2013\n\n *
The `ping.Session.close()` method was not undefining the sessions raw\n socket after closing\n * Return self from the `pingHost()` method to chain method calls \n\n## Version 1.1.2 - 04/03/2013\n\n * Use the `raw.Socket.pauseRecv()` and `raw.Socket.resumeRecv()` methods\n instead of closing a socket when there are no more outstanding requests\n\n## Version 1.1.3 - 07/03/2013\n\n * Sessions were limited to sending 65535 ping requests\n\n## Version 1.1.4 - 09/04/2013\n\n * Add the `packetSize` option to the `createSession()` method to specify how\n many bytes each ICMP echo request packet should be\n\n## Version 1.1.5 - 17/05/2013\n\n * Incorrectly parsing ICMP error responses resulting in responses matching\n the wrong request\n * Use a unique session ID per instance of the `Session` class to identify\n requests and responses sent by a session\n * Added the (internal) `_debugRequest()` and `_debugResponse()` methods, and\n the `_debug` option to the `createSession()` met
hod\n * Added example programs `ping-ttl.js` and `ping6-ttl.js`\n * Use MIT license instead of GPL\n\n## Version 1.1.6 - 17/05/2013\n\n * Session IDs are now 2 bytes (previously 1 byte), and request IDs are also\n now 2 bytes (previously 3 bytes)\n * Each ICMP error response now has an associated error class (e.g. the\n `Time exceeded` response maps onto the `ping.TimeExceededError` class)\n * Call request callbacks with an error when there are no free request IDs\n because of too many outstanding requests\n\n## Version 1.1.7 - 19/05/2013\n\n * Added the `traceRoute()` method\n * Added the `ttl` option parameter to the `createSession()` method, and\n updated the example programs `ping-ttl.js` and `ping6-ttl.js` to use it\n * Response callback for `pingHost()` now includes two instances of the\n `Date` class to specify when a request was sent and a response received\n\n## Version 1.1.8 - 01/07/2013\n\n * Use `raw.Socket.createChecksum()` instead of automatic checksum genera
tion\n\n## Version 1.1.9 - 01/07/2013\n\n * Use `raw.Socket.writeChecksum()` instead of manually rendering checksums\n\n# Roadmap\n\nSuggestions and requirements should be sent to <st...@gmail.com>.\n\n# License\n\nCopyright (c) 2013 Stephen Vickers\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNE
SS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n# Author\n\nStephen Vickers <st...@gmail.com>\n",
+ "readmeFilename": "README.md",
+ "_id": "net-ping@1.1.9",
+ "dist": {
+ "shasum": "7e70d3a2a766b060d281b17686e94ff4948e26c0"
+ },
+ "_from": "net-ping@",
+ "_resolved": "https://registry.npmjs.org/net-ping/-/net-ping-1.1.9.tgz"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/.npmignore b/blackberry10/node_modules/plugman/.npmignore
new file mode 100644
index 0000000..9daa824
--- /dev/null
+++ b/blackberry10/node_modules/plugman/.npmignore
@@ -0,0 +1,2 @@
+.DS_Store
+node_modules
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/.reviewboardrc
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/.reviewboardrc b/blackberry10/node_modules/plugman/.reviewboardrc
new file mode 100644
index 0000000..30e9587
--- /dev/null
+++ b/blackberry10/node_modules/plugman/.reviewboardrc
@@ -0,0 +1,8 @@
+#
+# Settings for post-review (used for uploading diffs to reviews.apache.org).
+#
+GUESS_FIELDS = True
+OPEN_BROWSER = True
+TARGET_GROUPS = 'cordova'
+REVIEWBOARD_URL = 'http://reviews.apache.org'
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/LICENSE b/blackberry10/node_modules/plugman/LICENSE
new file mode 100644
index 0000000..45f03a3
--- /dev/null
+++ b/blackberry10/node_modules/plugman/LICENSE
@@ -0,0 +1,14 @@
+ Copyright 2012 Andrew Lunny, Adobe Systems
+
+ 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.
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/README.md b/blackberry10/node_modules/plugman/README.md
new file mode 100644
index 0000000..5f366e4
--- /dev/null
+++ b/blackberry10/node_modules/plugman/README.md
@@ -0,0 +1,163 @@
+# plugman
+
+A command line tool to install and uninstall plugins for use with [Apache Cordova](http://cordova.io) projects.
+
+This document defines tool usage.
+
+## Plugin Specification
+
+--> [plugin_spec.md](plugin_spec.md) <--
+
+## Quickstart
+
+ npm install -g plugman
+
+## Design Goals
+
+* Facilitate programmatic installation and manipulation of plugins
+* Detail the dependencies and components of individual plugins
+* Allow code reuse between different target platforms
+
+## Supported Platforms
+
+* iOS
+* Android
+* BlackBerry 10
+* Windows Phone (7+8)
+
+## Command Line Usage
+
+ plugman --platform <ios|android|blackberry10|wp7|wp8> --project <directory> --plugin <name|url|path> [--plugins_dir <directory>] [--www <directory>] [--variable <name>=<value> [--variable <name>=<value> ...]]
+ plugman --uninstall --platform <ios|android|blackberr10|wp7|wp8> --project <directory> --plugin <id> [--www <directory>] [--plugins_dir <directory>]
+
+* Using minimum parameters, installs a plugin into a cordova project. You must specify a platform and cordova project location for that platform. You also must specify a plugin, with the different `--plugin` parameter forms being:
+ * `name`: The directory name where the plugin contents exist. This must be an existing directory under the `--plugins_dir` path (see below for more info).
+ * `url`: A URL starting with https:// or git://, pointing to a valid git repository that is clonable and contains a `plugin.xml` file. The contents of this repository would be copied into the `--plugins_dir`.
+ * `path`: A path to a directory containing a valid plugin which includes a `plugin.xml` file. This path's contents will be copied into the `--plugins_dir`.
+* `--uninstall`: Uninstalls an already-`--install`'ed plugin from a cordova project. Specify the plugin ID.
+
+Other parameters:
+
+* `--plugins_dir` defaults to `<project>/cordova/plugins`, but can be any directory containing a subdirectory for each fetched plugin.
+* `--www` defaults to the project's `www` folder location, but can be any directory that is to be used as cordova project application web assets.
+* `--variable` allows to specify certain variables at install time, necessary for certain plugins requiring API keys or other custom, user-defined parameters. Please see the [plugin specification](plugin_spec.md) for more information.
+
+## Node Module Usage
+
+ node
+ > require('plugman')
+ { install: [Function: installPlugin],
+ uninstall: [Function: uninstallPlugin],
+ fetch: [Function: fetchPlugin],
+ prepare: [Function: handlePrepare] }
+
+### `install` method
+
+ module.exports = function installPlugin(platform, project_dir, id, plugins_dir, subdir, cli_variables, www_dir, callback) {
+
+Installs a plugin into a specified cordova project of a specified platform.
+
+ * `platform`: one of `android`, `ios`, `blackberry10`, `wp7` or `wp8`
+ * `project_dir`: path to an instance of the above specified platform's cordova project
+ * `id`: a string representing the `id` of the plugin, a path to a cordova plugin with a valid `plugin.xml` file, or an `https://` or `git://` url to a git repository of a valid cordova plugin
+ * `plugins_dir`: path to directory where plugins will be stored, defaults to `<project_dir>/cordova/plugins`
+ * `subdir`: subdirectory within the plugin directory to consider as plugin directory root, defaults to `.`
+ * `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values
+ * `www_dir`: path to directory where web assets are to be copied to, defaults to the specified project directory's `www` dir (dependent on platform)
+ * `callback`: callback to invoke once complete. If specified, will pass in an error object as a first parameter if the action failed. If not and an error occurs, `plugman` will throw the error
+
+### `uninstall` method
+
+ module.exports = function uninstallPlugin(platform, project_dir, id, plugins_dir, cli_variables, www_dir, callback) {
+
+Uninstalls a previously-installed cordova plugin from a specified cordova project of a specified platform.
+
+ * `platform`: one of `android`, `ios`, `blackberry10`, `wp7` or `wp8`
+ * `project_dir`: path to an instance of the above specified platform's cordova project
+ * `id`: a string representing the `id` of the plugin
+ * `plugins_dir`: path to directory where plugins are stored, defaults to `<project_dir>/cordova/plugins`
+ * `subdir`: subdirectory within the plugin directory to consider as plugin directory root, defaults to `.`
+ * `cli_variables`: an object mapping cordova plugin specification variable namess (see [plugin specification](plugin_spec.md)) to values
+ * `www_dir`: path to directory where web assets are to be copied to, defaults to the specified project directory's `www` dir (dependent on platform)
+ * `callback`: callback to invoke once complete. If specified, will pass in an error object as a first parameter if the action failed. If not and an error occurs, `plugman` will throw the error
+
+### `fetch` method
+
+Copies a cordova plugin into a single location that plugman uses to track which plugins are installed into a project.
+
+ module.exports = function fetchPlugin(plugin_dir, plugins_dir, link, subdir, git_ref, callback) {
+
+ * `plugin_dir`: path or URL to a plugin directory/repository
+ * `plugins_dir`: path housing all plugins used in this project
+ * `link`: if `plugin_dir` points to a local path, will create a symbolic link to that folder instead of copying into `plugins_dir`, defaults to `false`
+ * `subdir`: subdirectory within the plugin directory to consider as plugin directory root, defaults to `.`
+ * `gitref`: if `plugin_dir` points to a URL, this value will be used to pass into `git checkout` after the repository is cloned, defaults to `HEAD`
+ * `callback`: callback to invoke once complete. If specified, will pass in an error object as a first parameter if the action failed. If not and an error occurs, `plugman` will throw the error
+
+### `prepare` method
+
+Finalizes plugin installation by making configuration file changes and setting up a JavaScript loader for js-module support.
+
+ module.exports = function handlePrepare(project_dir, platform, plugins_dir) {
+
+ * `project_dir`: path to an instance of the above specified platform's cordova project
+ * `platform`: one of `android`, `ios`, `blackberry10`, `wp7` or `wp8`
+ * `plugins_dir`: path housing all plugins used in this project
+
+## Example Plugins
+
+- Google has a [bunch of plugins](https://github.com/MobileChromeApps/chrome-cordova/tree/master/plugins) which are maintained actively by a contributor to plugman
+- Adobe maintains plugins for its Build cloud service, which are open sourced and [available on GitHub](https://github.com/phonegap-build)
+- BlackBerry has a [bunch of plugins](https://github.com/blackberry/cordova-blackberry/tree/master/blackberry10/plugins) offering deep platform integration
+
+## Development
+
+Basic installation:
+
+ git clone https://git-wip-us.apache.org/repos/asf/cordova-plugman.git
+ cd cordova-plugman
+ npm install -g
+
+Linking the global executable to the git repo:
+
+ git clone https://git-wip-us.apache.org/repos/asf/cordova-plugman.git
+ cd cordova-plugman
+ npm install
+ sudo npm link
+
+### Running Tests
+
+ npm test
+
+## Plugin Directory Structure
+
+A plugin is typically a combination of some web/www code, and some native code.
+However, plugins may have only one of these things - a plugin could be a single
+JavaScript file, or some native code with no corresponding JavaScript.
+
+Here is a sample plugin named foo with android and ios platforms support, and 2 www assets.
+
+```
+foo-plugin/
+|- plugin.xml # xml-based manifest
+|- src/ # native source for each platform
+| |- android/
+| | `- Foo.java
+| `- ios/
+| |- CDVFoo.h
+| `- CDVFoo.m
+|- README.md
+`- www/
+ |- foo.js
+ `- foo.png
+```
+
+This structure is suggested, but not required.
+
+## Contributors
+
+See the [package.json](package.json) file for attribution notes.
+
+## License
+
+Apache License 2.0
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/doc/help.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/doc/help.txt b/blackberry10/node_modules/plugman/doc/help.txt
new file mode 100644
index 0000000..412b3ba
--- /dev/null
+++ b/blackberry10/node_modules/plugman/doc/help.txt
@@ -0,0 +1,35 @@
+plugman installs and uninstalls plugin.xml-compatible cordova plugins into cordova-generated projects.
+
+Usage
+=====
+
+Install a plugin
+----------------
+
+ $ plugman --platform <platform> --project <directory> --plugin <plugin> [--variable NAME=VALUE]
+
+Parameters:
+
+ - <platform>: One of android, ios, blackberry10, wp7 or wp8
+ - project <directory>: Path reference to a cordova-generated project of the platform you specify
+ - plugin <plugin>: One of a path reference to a local copy of a plugin, or a remote https: or git: URL pointing to a cordova plugin
+ - variable NAME=VALUE: Some plugins require install-time variables to be defined. These could be things like API keys/tokens or other app-specific variables.
+
+Uninstall a plugin
+------------------
+
+ $ plugman --uninstall --platform <platform> --project <directory> --plugin <plugin-id>
+
+Parameters:
+ - plugin <plugin-id>: The plugin to remove, identified by its id (see the plugin.xml's <plugin id> attribute)
+
+Optional parameters
+-------------------
+
+ - www <directory>: www assets for the plugin will be installed into this directory. Default is to install into the standard www directory for the platform specified
+ - plugins_dir <directory>: a copy of the plugin will be stored in this directory. Default is to install into the <project directory>/plugins folder
+
+Optional flags
+--------------
+
+ --debug : Verbose mode
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/main.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/main.js b/blackberry10/node_modules/plugman/main.js
new file mode 100755
index 0000000..4361aba
--- /dev/null
+++ b/blackberry10/node_modules/plugman/main.js
@@ -0,0 +1,95 @@
+#!/usr/bin/env node
+/*
+ *
+ * Copyright 2013 Anis Kadri
+ *
+ * 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.
+ *
+*/
+
+// copyright (c) 2013 Andrew Lunny, Adobe Systems
+var path = require('path')
+ , url = require('url')
+ , package = require(path.join(__dirname, 'package'))
+ , nopt = require('nopt')
+ , plugins = require('./src/util/plugins')
+ , plugman = require('./plugman');
+
+var known_opts = { 'platform' : [ 'ios', 'android', 'blackberry10', 'wp7', 'wp8' ]
+ , 'project' : path
+ , 'plugin' : [String, path, url]
+ , 'install' : Boolean
+ , 'uninstall' : Boolean
+ , 'v' : Boolean
+ , 'debug' : Boolean
+ , 'plugins': path
+ , 'link': Boolean
+ , 'variable' : Array
+ , 'www': path
+ }, shortHands = { 'var' : 'variable' };
+
+var cli_opts = nopt(known_opts);
+
+// Default the plugins_dir to './cordova/plugins'.
+var plugins_dir;
+
+// Without these arguments, the commands will fail and print the usage anyway.
+if (cli_opts.plugins_dir || cli_opts.project) {
+ plugins_dir = typeof cli_opts.plugins_dir == 'string' ?
+ cli_opts.plugins_dir :
+ path.join(cli_opts.project, 'cordova', 'plugins');
+}
+
+process.on('uncaughtException', function(error){
+ if (cli_opts.debug) {
+ console.error(error.stack);
+ } else {
+ console.error(error.message);
+ }
+ process.exit(1);
+});
+
+// Set up appropriate logging based on events
+if (cli_opts.debug) {
+ plugman.on('log', console.log);
+}
+plugman.on('warn', console.warn);
+plugman.on('error', console.error);
+plugman.on('results', console.log);
+
+if (cli_opts.v) {
+ console.log(package.name + ' version ' + package.version);
+}
+else if (!cli_opts.platform || !cli_opts.project || !cli_opts.plugin) {
+ console.log(plugman.help());
+}
+else if (cli_opts.uninstall) {
+ plugman.uninstall(cli_opts.platform, cli_opts.project, cli_opts.plugin, plugins_dir, { www_dir: cli_opts.www });
+}
+else {
+ var cli_variables = {}
+ if (cli_opts.variable) {
+ cli_opts.variable.forEach(function (variable) {
+ var tokens = variable.split('=');
+ var key = tokens.shift().toUpperCase();
+ if (/^[\w-_]+$/.test(key)) cli_variables[key] = tokens.join('=');
+ });
+ }
+ var opts = {
+ subdir: '.',
+ cli_variables: cli_variables,
+ www_dir: cli_opts.www
+ };
+ plugman.install(cli_opts.platform, cli_opts.project, cli_opts.plugin, plugins_dir, opts);
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/.bin/nopt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/.bin/nopt b/blackberry10/node_modules/plugman/node_modules/.bin/nopt
new file mode 120000
index 0000000..6b6566e
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/.bin/nopt
@@ -0,0 +1 @@
+../nopt/bin/nopt.js
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/.bin/semver
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/.bin/semver b/blackberry10/node_modules/plugman/node_modules/.bin/semver
new file mode 120000
index 0000000..317eb29
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/.npmignore b/blackberry10/node_modules/plugman/node_modules/bplist-parser/.npmignore
new file mode 100644
index 0000000..a9b46ea
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/bplist-parser/.npmignore
@@ -0,0 +1,8 @@
+/build/*
+node_modules
+*.node
+*.sh
+*.swp
+.lock*
+npm-debug.log
+.idea
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/README.md b/blackberry10/node_modules/plugman/node_modules/bplist-parser/README.md
new file mode 100644
index 0000000..37e5e1c
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/bplist-parser/README.md
@@ -0,0 +1,47 @@
+bplist-parser
+=============
+
+Binary Mac OS X Plist (property list) parser.
+
+## Installation
+
+```bash
+$ npm install bplist-parser
+```
+
+## Quick Examples
+
+```javascript
+var bplist = require('bplist-parser');
+
+bplist.parseFile('myPlist.bplist', function(err, obj) {
+ if (err) throw err;
+
+ console.log(JSON.stringify(obj));
+});
+```
+
+## License
+
+(The MIT License)
+
+Copyright (c) 2012 Near Infinity Corporation
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/bplistParser.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/bplistParser.js b/blackberry10/node_modules/plugman/node_modules/bplist-parser/bplistParser.js
new file mode 100644
index 0000000..573f513
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/bplist-parser/bplistParser.js
@@ -0,0 +1,309 @@
+'use strict';
+
+// adapted from http://code.google.com/p/plist/source/browse/trunk/src/com/dd/plist/BinaryPropertyListParser.java
+
+var fs = require('fs');
+var debug = false;
+
+exports.maxObjectSize = 100 * 1000 * 1000; // 100Meg
+
+// EPOCH = new SimpleDateFormat("yyyy MM dd zzz").parse("2001 01 01 GMT").getTime();
+// ...but that's annoying in a static initializer because it can throw exceptions, ick.
+// So we just hardcode the correct value.
+var EPOCH = 978307200000;
+
+var parseFile = exports.parseFile = function (fileName, callback) {
+ fs.readFile(fileName, function (err, data) {
+ if (err) {
+ return callback(err);
+ }
+ try {
+ var result = parseBuffer(data);
+ return callback(null, result);
+ } catch (ex) {
+ return callback(ex);
+ }
+ });
+};
+
+var parseBuffer = exports.parseBuffer = function (buffer) {
+ var result = {};
+
+ // check header
+ var header = buffer.slice(0, 'bplist'.length).toString('utf8');
+ if (header !== 'bplist') {
+ throw new Error("Invalid binary plist. Expected 'bplist' at offset 0.");
+ }
+
+ // Handle trailer, last 32 bytes of the file
+ var trailer = buffer.slice(buffer.length - 32, buffer.length);
+ // 6 null bytes (index 0 to 5)
+ var offsetSize = trailer.readUInt8(6);
+ if (debug) {
+ console.log("offsetSize: " + offsetSize);
+ }
+ var objectRefSize = trailer.readUInt8(7);
+ if (debug) {
+ console.log("objectRefSize: " + objectRefSize);
+ }
+ var numObjects = readUInt64BE(trailer, 8);
+ if (debug) {
+ console.log("numObjects: " + numObjects);
+ }
+ var topObject = readUInt64BE(trailer, 16);
+ if (debug) {
+ console.log("topObject: " + topObject);
+ }
+ var offsetTableOffset = readUInt64BE(trailer, 24);
+ if (debug) {
+ console.log("offsetTableOffset: " + offsetTableOffset);
+ }
+
+ // Handle offset table
+ var offsetTable = [];
+
+ for (var i = 0; i < numObjects; i++) {
+ var offsetBytes = buffer.slice(offsetTableOffset + i * offsetSize, offsetTableOffset + (i + 1) * offsetSize);
+ offsetTable[i] = readUInt(offsetBytes, 0);
+ if (debug) {
+ console.log("Offset for Object #" + i + " is " + offsetTable[i] + " [" + offsetTable[i].toString(16) + "]");
+ }
+ }
+
+ // Parses an object inside the currently parsed binary property list.
+ // For the format specification check
+ // <a href="http://www.opensource.apple.com/source/CF/CF-635/CFBinaryPList.c">
+ // Apple's binary property list parser implementation</a>.
+ function parseObject(tableOffset) {
+ var offset = offsetTable[tableOffset];
+ var type = buffer[offset];
+ var objType = (type & 0xF0) >> 4; //First 4 bits
+ var objInfo = (type & 0x0F); //Second 4 bits
+ switch (objType) {
+ case 0x0:
+ return parseSimple();
+ case 0x1:
+ case 0x8: // UID (really just an integer)
+ return parseInteger();
+ case 0x2:
+ return parseReal();
+ case 0x3:
+ return parseDate();
+ case 0x4:
+ return parseData();
+ case 0x5: // ASCII
+ return parsePlistString();
+ case 0x6: // UTF-16
+ return parsePlistString(true);
+ case 0xA:
+ return parseArray();
+ case 0xD:
+ return parseDictionary();
+ default:
+ throw new Error("Unhandled type 0x" + objType.toString(16));
+ }
+
+ function parseSimple() {
+ //Simple
+ switch (objInfo) {
+ case 0x0: // null
+ return null;
+ case 0x8: // false
+ return false;
+ case 0x9: // true
+ return true;
+ case 0xF: // filler byte
+ return null;
+ default:
+ throw new Error("Unhandled simple type 0x" + objType.toString(16));
+ }
+ }
+
+ function parseInteger() {
+ var length = Math.pow(2, objInfo);
+ if (length < exports.maxObjectSize) {
+ return readUInt(buffer.slice(offset + 1, offset + 1 + length));
+ } else {
+ throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available.");
+ }
+ }
+
+ function parseReal() {
+ var length = Math.pow(2, objInfo);
+ if (length < exports.maxObjectSize) {
+ var realBuffer = buffer.slice(offset + 1, offset + 1 + length);
+ if (length === 4) {
+ return realBuffer.readFloatBE(0);
+ }
+ else if (length === 8) {
+ return realBuffer.readDoubleBE(0);
+ }
+ } else {
+ throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available.");
+ }
+ }
+
+ function parseDate() {
+ if (objInfo != 0x3) {
+ console.error("Unknown date type :" + objInfo + ". Parsing anyway...");
+ }
+ var dateBuffer = buffer.slice(offset + 1, offset + 9);
+ return new Date(EPOCH + (1000 * dateBuffer.readDoubleBE(0)));
+ }
+
+ function parseData() {
+ var dataoffset = 1;
+ var length = objInfo;
+ if (objInfo == 0xF) {
+ var int_type = buffer[offset + 1];
+ var intType = (int_type & 0xF0) / 0x10;
+ if (intType != 0x1) {
+ console.error("0x4: UNEXPECTED LENGTH-INT TYPE! " + intType);
+ }
+ var intInfo = int_type & 0x0F;
+ var intLength = Math.pow(2, intInfo);
+ dataoffset = 2 + intLength;
+ if (intLength < 3) {
+ length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
+ } else {
+ length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
+ }
+ }
+ if (length < exports.maxObjectSize) {
+ return buffer.slice(offset + dataoffset, offset + dataoffset + length);
+ } else {
+ throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available.");
+ }
+ }
+
+ function parsePlistString (isUtf16) {
+ isUtf16 = isUtf16 || 0;
+ var enc = "utf8";
+ var length = objInfo;
+ var stroffset = 1;
+ if (objInfo == 0xF) {
+ var int_type = buffer[offset + 1];
+ var intType = (int_type & 0xF0) / 0x10;
+ if (intType != 0x1) {
+ console.err("UNEXPECTED LENGTH-INT TYPE! " + intType);
+ }
+ var intInfo = int_type & 0x0F;
+ var intLength = Math.pow(2, intInfo);
+ var stroffset = 2 + intLength;
+ if (intLength < 3) {
+ length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
+ } else {
+ length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
+ }
+ }
+ // length is String length -> to get byte length multiply by 2, as 1 character takes 2 bytes in UTF-16
+ length *= (isUtf16 + 1);
+ if (length < exports.maxObjectSize) {
+ var plistString = buffer.slice(offset + stroffset, offset + stroffset + length);
+ if (isUtf16) {
+ plistString = swapBytes(plistString);
+ enc = "ucs2";
+ }
+ return plistString.toString(enc);
+ } else {
+ throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available.");
+ }
+ }
+
+ function parseArray() {
+ var length = objInfo;
+ var arrayoffset = 1;
+ if (objInfo == 0xF) {
+ var int_type = buffer[offset + 1];
+ var intType = (int_type & 0xF0) / 0x10;
+ if (intType != 0x1) {
+ console.error("0xa: UNEXPECTED LENGTH-INT TYPE! " + intType);
+ }
+ var intInfo = int_type & 0x0F;
+ var intLength = Math.pow(2, intInfo);
+ arrayoffset = 2 + intLength;
+ if (intLength < 3) {
+ length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
+ } else {
+ length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
+ }
+ }
+ if (length * objectRefSize > exports.maxObjectSize) {
+ throw new Error("To little heap space available!");
+ }
+ var array = [];
+ for (var i = 0; i < length; i++) {
+ var objRef = readUInt(buffer.slice(offset + arrayoffset + i * objectRefSize, offset + arrayoffset + (i + 1) * objectRefSize));
+ array[i] = parseObject(objRef);
+ }
+ return array;
+ }
+
+ function parseDictionary() {
+ var length = objInfo;
+ var dictoffset = 1;
+ if (objInfo == 0xF) {
+ var int_type = buffer[offset + 1];
+ var intType = (int_type & 0xF0) / 0x10;
+ if (intType != 0x1) {
+ console.error("0xD: UNEXPECTED LENGTH-INT TYPE! " + intType);
+ }
+ var intInfo = int_type & 0x0F;
+ var intLength = Math.pow(2, intInfo);
+ dictoffset = 2 + intLength;
+ if (intLength < 3) {
+ length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
+ } else {
+ length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength));
+ }
+ }
+ if (length * 2 * objectRefSize > exports.maxObjectSize) {
+ throw new Error("To little heap space available!");
+ }
+ if (debug) {
+ console.log("Parsing dictionary #" + tableOffset);
+ }
+ var dict = {};
+ for (var i = 0; i < length; i++) {
+ var keyRef = readUInt(buffer.slice(offset + dictoffset + i * objectRefSize, offset + dictoffset + (i + 1) * objectRefSize));
+ var valRef = readUInt(buffer.slice(offset + dictoffset + (length * objectRefSize) + i * objectRefSize, offset + dictoffset + (length * objectRefSize) + (i + 1) * objectRefSize));
+ var key = parseObject(keyRef);
+ var val = parseObject(valRef);
+ if (debug) {
+ console.log(" DICT #" + tableOffset + ": Mapped " + key + " to " + val);
+ }
+ dict[key] = val;
+ }
+ return dict;
+ }
+ }
+
+ return [ parseObject(topObject) ];
+};
+
+function readUInt(buffer, start) {
+ start = start || 0;
+
+ var l = 0;
+ for (var i = start; i < buffer.length; i++) {
+ l <<= 8;
+ l |= buffer[i] & 0xFF;
+ }
+ return l;
+}
+
+// we're just going to toss the high order bits because javascript doesn't have 64-bit ints
+function readUInt64BE(buffer, start) {
+ var data = buffer.slice(start, start + 8);
+ return data.readUInt32BE(4, 8);
+}
+
+function swapBytes(buffer) {
+ var len = buffer.length;
+ for (var i = 0; i < len; i += 2) {
+ var a = buffer[i];
+ buffer[i] = buffer[i+1];
+ buffer[i+1] = a;
+ }
+ return buffer;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/package.json b/blackberry10/node_modules/plugman/node_modules/bplist-parser/package.json
new file mode 100644
index 0000000..8a33a97
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/bplist-parser/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "bplist-parser",
+ "version": "0.0.4",
+ "description": "Binary plist parser.",
+ "main": "bplistParser.js",
+ "scripts": {
+ "test": "./node_modules/nodeunit/bin/nodeunit test"
+ },
+ "keywords": [
+ "bplist",
+ "plist",
+ "parser"
+ ],
+ "author": {
+ "name": "Joe Ferner",
+ "email": "joe.ferner@nearinfinity.com"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "nodeunit": "~0.7.4"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/nearinfinity/node-bplist-parser.git"
+ },
+ "readme": "bplist-parser\n=============\n\nBinary Mac OS X Plist (property list) parser.\n\n## Installation\n\n```bash\n$ npm install bplist-parser\n```\n\n## Quick Examples\n\n```javascript\nvar bplist = require('bplist-parser');\n\nbplist.parseFile('myPlist.bplist', function(err, obj) {\n if (err) throw err;\n\n console.log(JSON.stringify(obj));\n});\n```\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2012 Near Infinity Corporation\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial p
ortions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/nearinfinity/node-bplist-parser/issues"
+ },
+ "_id": "bplist-parser@0.0.4",
+ "_from": "bplist-parser@0.0.x"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/airplay.bplist
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/airplay.bplist b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/airplay.bplist
new file mode 100644
index 0000000..931adea
Binary files /dev/null and b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/airplay.bplist differ
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/iTunes-small.bplist
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/iTunes-small.bplist b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/iTunes-small.bplist
new file mode 100644
index 0000000..b7edb14
Binary files /dev/null and b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/iTunes-small.bplist differ
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/parseTest.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/parseTest.js b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/parseTest.js
new file mode 100644
index 0000000..dcb6dd0
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/parseTest.js
@@ -0,0 +1,120 @@
+'use strict';
+
+// tests are adapted from https://github.com/TooTallNate/node-plist
+
+var path = require('path');
+var nodeunit = require('nodeunit');
+var bplist = require('../');
+
+module.exports = {
+ 'iTunes Small': function (test) {
+ var file = path.join(__dirname, "iTunes-small.bplist");
+ var startTime1 = new Date();
+
+ bplist.parseFile(file, function (err, dicts) {
+ if (err) {
+ throw err;
+ }
+
+ var endTime = new Date();
+ console.log('Parsed "' + file + '" in ' + (endTime - startTime1) + 'ms');
+ var dict = dicts[0];
+ test.equal(dict['Application Version'], "9.0.3");
+ test.equal(dict['Library Persistent ID'], "6F81D37F95101437");
+ test.done();
+ });
+ },
+
+ 'sample1': function (test) {
+ var file = path.join(__dirname, "sample1.bplist");
+ var startTime = new Date();
+
+ bplist.parseFile(file, function (err, dicts) {
+ if (err) {
+ throw err;
+ }
+
+ var endTime = new Date();
+ console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
+ var dict = dicts[0];
+ test.equal(dict['CFBundleIdentifier'], 'com.apple.dictionary.MySample');
+ test.done();
+ });
+ },
+
+ 'sample2': function (test) {
+ var file = path.join(__dirname, "sample2.bplist");
+ var startTime = new Date();
+
+ bplist.parseFile(file, function (err, dicts) {
+ if (err) {
+ throw err;
+ }
+
+ var endTime = new Date();
+ console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
+ var dict = dicts[0];
+ test.equal(dict['PopupMenu'][2]['Key'], "\n #import <Cocoa/Cocoa.h>\n\n#import <MacRuby/MacRuby.h>\n\nint main(int argc, char *argv[])\n{\n return macruby_main(\"rb_main.rb\", argc, argv);\n}\n");
+ test.done();
+ });
+ },
+
+ 'airplay': function (test) {
+ var file = path.join(__dirname, "airplay.bplist");
+ var startTime = new Date();
+
+ bplist.parseFile(file, function (err, dicts) {
+ if (err) {
+ throw err;
+ }
+
+ var endTime = new Date();
+ console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
+
+ var dict = dicts[0];
+ test.equal(dict['duration'], 5555.0495000000001);
+ test.equal(dict['position'], 4.6269989039999997);
+ test.done();
+ });
+ },
+
+ 'utf16': function (test) {
+ var file = path.join(__dirname, "utf16.bplist");
+ var startTime = new Date();
+
+ bplist.parseFile(file, function (err, dicts) {
+ if (err) {
+ throw err;
+ }
+
+ var endTime = new Date();
+ console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
+
+ var dict = dicts[0];
+ test.equal(dict['CFBundleName'], 'sellStuff');
+ test.equal(dict['CFBundleShortVersionString'], '2.6.1');
+ test.equal(dict['NSHumanReadableCopyright'], '©2008-2012, sellStuff, Inc.');
+ test.done();
+ });
+ },
+
+ 'uid': function (test) {
+ var file = path.join(__dirname, "uid.bplist");
+ var startTime = new Date();
+
+ bplist.parseFile(file, function (err, dicts) {
+ if (err) {
+ throw err;
+ }
+
+ var endTime = new Date();
+ console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms');
+
+ var dict = dicts[0];
+ test.deepEqual(dict['$objects'][1]['NS.keys'], [2, 3, 4]);
+ test.deepEqual(dict['$objects'][1]['NS.objects'], [5, 6, 7]);
+ test.equal(dict['$top']['root'], 1);
+ test.done();
+ });
+ }
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/sample1.bplist
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/sample1.bplist b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/sample1.bplist
new file mode 100644
index 0000000..5b808ff
Binary files /dev/null and b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/sample1.bplist differ
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/sample2.bplist
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/sample2.bplist b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/sample2.bplist
new file mode 100644
index 0000000..fc42979
Binary files /dev/null and b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/sample2.bplist differ
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/uid.bplist
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/uid.bplist b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/uid.bplist
new file mode 100644
index 0000000..59f341e
Binary files /dev/null and b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/uid.bplist differ
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/utf16.bplist
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/utf16.bplist b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/utf16.bplist
new file mode 100644
index 0000000..ba4bcfa
Binary files /dev/null and b/blackberry10/node_modules/plugman/node_modules/bplist-parser/test/utf16.bplist differ
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/.npmignore b/blackberry10/node_modules/plugman/node_modules/dep-graph/.npmignore
new file mode 100644
index 0000000..b512c09
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/.npmignore
@@ -0,0 +1 @@
+node_modules
\ No newline at end of file
[09/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/underscore.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/underscore.js b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/underscore.js
new file mode 100644
index 0000000..ab4c260
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/underscore.js
@@ -0,0 +1,958 @@
+// Underscore.js 1.2.1
+// (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.
+// Underscore is freely distributable under the MIT license.
+// Portions of Underscore are inspired or borrowed from Prototype,
+// Oliver Steele's Functional, and John Resig's Micro-Templating.
+// For all details and documentation:
+// http://documentcloud.github.com/underscore
+
+(function() {
+
+ // Baseline setup
+ // --------------
+
+ // Establish the root object, `window` in the browser, or `global` on the server.
+ var root = this;
+
+ // Save the previous value of the `_` variable.
+ var previousUnderscore = root._;
+
+ // Establish the object that gets returned to break out of a loop iteration.
+ var breaker = {};
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var slice = ArrayProto.slice,
+ unshift = ArrayProto.unshift,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // All **ECMAScript 5** native function implementations that we hope to use
+ // are declared here.
+ var
+ nativeForEach = ArrayProto.forEach,
+ nativeMap = ArrayProto.map,
+ nativeReduce = ArrayProto.reduce,
+ nativeReduceRight = ArrayProto.reduceRight,
+ nativeFilter = ArrayProto.filter,
+ nativeEvery = ArrayProto.every,
+ nativeSome = ArrayProto.some,
+ nativeIndexOf = ArrayProto.indexOf,
+ nativeLastIndexOf = ArrayProto.lastIndexOf,
+ nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeBind = FuncProto.bind;
+
+ // Create a safe reference to the Underscore object for use below.
+ var _ = function(obj) { return new wrapper(obj); };
+
+ // Export the Underscore object for **Node.js** and **"CommonJS"**, with
+ // backwards-compatibility for the old `require()` API. If we're not in
+ // CommonJS, add `_` to the global object.
+ if (typeof exports !== 'undefined') {
+ if (typeof module !== 'undefined' && module.exports) {
+ exports = module.exports = _;
+ }
+ exports._ = _;
+ } else if (typeof define === 'function' && define.amd) {
+ // Register as a named module with AMD.
+ define('underscore', function() {
+ return _;
+ });
+ } else {
+ // Exported as a string, for Closure Compiler "advanced" mode.
+ root['_'] = _;
+ }
+
+ // Current version.
+ _.VERSION = '1.2.1';
+
+ // Collection Functions
+ // --------------------
+
+ // The cornerstone, an `each` implementation, aka `forEach`.
+ // Handles objects with the built-in `forEach`, arrays, and raw objects.
+ // Delegates to **ECMAScript 5**'s native `forEach` if available.
+ var each = _.each = _.forEach = function(obj, iterator, context) {
+ if (obj == null) return;
+ if (nativeForEach && obj.forEach === nativeForEach) {
+ obj.forEach(iterator, context);
+ } else if (obj.length === +obj.length) {
+ for (var i = 0, l = obj.length; i < l; i++) {
+ if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
+ }
+ } else {
+ for (var key in obj) {
+ if (hasOwnProperty.call(obj, key)) {
+ if (iterator.call(context, obj[key], key, obj) === breaker) return;
+ }
+ }
+ }
+ };
+
+ // Return the results of applying the iterator to each element.
+ // Delegates to **ECMAScript 5**'s native `map` if available.
+ _.map = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
+ each(obj, function(value, index, list) {
+ results[results.length] = iterator.call(context, value, index, list);
+ });
+ return results;
+ };
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
+ _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
+ var initial = memo !== void 0;
+ if (obj == null) obj = [];
+ if (nativeReduce && obj.reduce === nativeReduce) {
+ if (context) iterator = _.bind(iterator, context);
+ return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
+ }
+ each(obj, function(value, index, list) {
+ if (!initial) {
+ memo = value;
+ initial = true;
+ } else {
+ memo = iterator.call(context, memo, value, index, list);
+ }
+ });
+ if (!initial) throw new TypeError("Reduce of empty array with no initial value");
+ return memo;
+ };
+
+ // The right-associative version of reduce, also known as `foldr`.
+ // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
+ _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
+ if (obj == null) obj = [];
+ if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
+ if (context) iterator = _.bind(iterator, context);
+ return memo !== void 0 ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
+ }
+ var reversed = (_.isArray(obj) ? obj.slice() : _.toArray(obj)).reverse();
+ return _.reduce(reversed, iterator, memo, context);
+ };
+
+ // Return the first value which passes a truth test. Aliased as `detect`.
+ _.find = _.detect = function(obj, iterator, context) {
+ var result;
+ any(obj, function(value, index, list) {
+ if (iterator.call(context, value, index, list)) {
+ result = value;
+ return true;
+ }
+ });
+ return result;
+ };
+
+ // Return all the elements that pass a truth test.
+ // Delegates to **ECMAScript 5**'s native `filter` if available.
+ // Aliased as `select`.
+ _.filter = _.select = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
+ each(obj, function(value, index, list) {
+ if (iterator.call(context, value, index, list)) results[results.length] = value;
+ });
+ return results;
+ };
+
+ // Return all the elements for which a truth test fails.
+ _.reject = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ each(obj, function(value, index, list) {
+ if (!iterator.call(context, value, index, list)) results[results.length] = value;
+ });
+ return results;
+ };
+
+ // Determine whether all of the elements match a truth test.
+ // Delegates to **ECMAScript 5**'s native `every` if available.
+ // Aliased as `all`.
+ _.every = _.all = function(obj, iterator, context) {
+ var result = true;
+ if (obj == null) return result;
+ if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
+ each(obj, function(value, index, list) {
+ if (!(result = result && iterator.call(context, value, index, list))) return breaker;
+ });
+ return result;
+ };
+
+ // Determine if at least one element in the object matches a truth test.
+ // Delegates to **ECMAScript 5**'s native `some` if available.
+ // Aliased as `any`.
+ var any = _.some = _.any = function(obj, iterator, context) {
+ iterator = iterator || _.identity;
+ var result = false;
+ if (obj == null) return result;
+ if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
+ each(obj, function(value, index, list) {
+ if (result |= iterator.call(context, value, index, list)) return breaker;
+ });
+ return !!result;
+ };
+
+ // Determine if a given value is included in the array or object using `===`.
+ // Aliased as `contains`.
+ _.include = _.contains = function(obj, target) {
+ var found = false;
+ if (obj == null) return found;
+ if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
+ found = any(obj, function(value) {
+ if (value === target) return true;
+ });
+ return found;
+ };
+
+ // Invoke a method (with arguments) on every item in a collection.
+ _.invoke = function(obj, method) {
+ var args = slice.call(arguments, 2);
+ return _.map(obj, function(value) {
+ return (method.call ? method || value : value[method]).apply(value, args);
+ });
+ };
+
+ // Convenience version of a common use case of `map`: fetching a property.
+ _.pluck = function(obj, key) {
+ return _.map(obj, function(value){ return value[key]; });
+ };
+
+ // Return the maximum element or (element-based computation).
+ _.max = function(obj, iterator, context) {
+ if (!iterator && _.isArray(obj)) return Math.max.apply(Math, obj);
+ if (!iterator && _.isEmpty(obj)) return -Infinity;
+ var result = {computed : -Infinity};
+ each(obj, function(value, index, list) {
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
+ computed >= result.computed && (result = {value : value, computed : computed});
+ });
+ return result.value;
+ };
+
+ // Return the minimum element (or element-based computation).
+ _.min = function(obj, iterator, context) {
+ if (!iterator && _.isArray(obj)) return Math.min.apply(Math, obj);
+ if (!iterator && _.isEmpty(obj)) return Infinity;
+ var result = {computed : Infinity};
+ each(obj, function(value, index, list) {
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
+ computed < result.computed && (result = {value : value, computed : computed});
+ });
+ return result.value;
+ };
+
+ // Shuffle an array.
+ _.shuffle = function(obj) {
+ var shuffled = [], rand;
+ each(obj, function(value, index, list) {
+ if (index == 0) {
+ shuffled[0] = value;
+ } else {
+ rand = Math.floor(Math.random() * (index + 1));
+ shuffled[index] = shuffled[rand];
+ shuffled[rand] = value;
+ }
+ });
+ return shuffled;
+ };
+
+ // Sort the object's values by a criterion produced by an iterator.
+ _.sortBy = function(obj, iterator, context) {
+ return _.pluck(_.map(obj, function(value, index, list) {
+ return {
+ value : value,
+ criteria : iterator.call(context, value, index, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria, b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ }), 'value');
+ };
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ _.groupBy = function(obj, val) {
+ var result = {};
+ var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
+ each(obj, function(value, index) {
+ var key = iterator(value, index);
+ (result[key] || (result[key] = [])).push(value);
+ });
+ return result;
+ };
+
+ // Use a comparator function to figure out at what index an object should
+ // be inserted so as to maintain order. Uses binary search.
+ _.sortedIndex = function(array, obj, iterator) {
+ iterator || (iterator = _.identity);
+ var low = 0, high = array.length;
+ while (low < high) {
+ var mid = (low + high) >> 1;
+ iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
+ }
+ return low;
+ };
+
+ // Safely convert anything iterable into a real, live array.
+ _.toArray = function(iterable) {
+ if (!iterable) return [];
+ if (iterable.toArray) return iterable.toArray();
+ if (_.isArray(iterable)) return slice.call(iterable);
+ if (_.isArguments(iterable)) return slice.call(iterable);
+ return _.values(iterable);
+ };
+
+ // Return the number of elements in an object.
+ _.size = function(obj) {
+ return _.toArray(obj).length;
+ };
+
+ // Array Functions
+ // ---------------
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. Aliased as `head`. The **guard** check allows it to work
+ // with `_.map`.
+ _.first = _.head = function(array, n, guard) {
+ return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
+ };
+
+ // Returns everything but the last entry of the array. Especcialy useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N. The **guard** check allows it to work with
+ // `_.map`.
+ _.initial = function(array, n, guard) {
+ return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
+ };
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array. The **guard** check allows it to work with `_.map`.
+ _.last = function(array, n, guard) {
+ return (n != null) && !guard ? slice.call(array, array.length - n) : array[array.length - 1];
+ };
+
+ // Returns everything but the first entry of the array. Aliased as `tail`.
+ // Especially useful on the arguments object. Passing an **index** will return
+ // the rest of the values in the array from that index onward. The **guard**
+ // check allows it to work with `_.map`.
+ _.rest = _.tail = function(array, index, guard) {
+ return slice.call(array, (index == null) || guard ? 1 : index);
+ };
+
+ // Trim out all falsy values from an array.
+ _.compact = function(array) {
+ return _.filter(array, function(value){ return !!value; });
+ };
+
+ // Return a completely flattened version of an array.
+ _.flatten = function(array, shallow) {
+ return _.reduce(array, function(memo, value) {
+ if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
+ memo[memo.length] = value;
+ return memo;
+ }, []);
+ };
+
+ // Return a version of the array that does not contain the specified value(s).
+ _.without = function(array) {
+ return _.difference(array, slice.call(arguments, 1));
+ };
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // Aliased as `unique`.
+ _.uniq = _.unique = function(array, isSorted, iterator) {
+ var initial = iterator ? _.map(array, iterator) : array;
+ var result = [];
+ _.reduce(initial, function(memo, el, i) {
+ if (0 == i || (isSorted === true ? _.last(memo) != el : !_.include(memo, el))) {
+ memo[memo.length] = el;
+ result[result.length] = array[i];
+ }
+ return memo;
+ }, []);
+ return result;
+ };
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ _.union = function() {
+ return _.uniq(_.flatten(arguments, true));
+ };
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays. (Aliased as "intersect" for back-compat.)
+ _.intersection = _.intersect = function(array) {
+ var rest = slice.call(arguments, 1);
+ return _.filter(_.uniq(array), function(item) {
+ return _.every(rest, function(other) {
+ return _.indexOf(other, item) >= 0;
+ });
+ });
+ };
+
+ // Take the difference between one array and another.
+ // Only the elements present in just the first array will remain.
+ _.difference = function(array, other) {
+ return _.filter(array, function(value){ return !_.include(other, value); });
+ };
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ _.zip = function() {
+ var args = slice.call(arguments);
+ var length = _.max(_.pluck(args, 'length'));
+ var results = new Array(length);
+ for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
+ return results;
+ };
+
+ // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
+ // we need this function. Return the position of the first occurrence of an
+ // item in an array, or -1 if the item is not included in the array.
+ // Delegates to **ECMAScript 5**'s native `indexOf` if available.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ _.indexOf = function(array, item, isSorted) {
+ if (array == null) return -1;
+ var i, l;
+ if (isSorted) {
+ i = _.sortedIndex(array, item);
+ return array[i] === item ? i : -1;
+ }
+ if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
+ for (i = 0, l = array.length; i < l; i++) if (array[i] === item) return i;
+ return -1;
+ };
+
+ // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
+ _.lastIndexOf = function(array, item) {
+ if (array == null) return -1;
+ if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
+ var i = array.length;
+ while (i--) if (array[i] === item) return i;
+ return -1;
+ };
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](http://docs.python.org/library/functions.html#range).
+ _.range = function(start, stop, step) {
+ if (arguments.length <= 1) {
+ stop = start || 0;
+ start = 0;
+ }
+ step = arguments[2] || 1;
+
+ var len = Math.max(Math.ceil((stop - start) / step), 0);
+ var idx = 0;
+ var range = new Array(len);
+
+ while(idx < len) {
+ range[idx++] = start;
+ start += step;
+ }
+
+ return range;
+ };
+
+ // Function (ahem) Functions
+ // ------------------
+
+ // Reusable constructor function for prototype setting.
+ var ctor = function(){};
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally). Binding with arguments is also known as `curry`.
+ // Delegates to **ECMAScript 5**'s native `Function.bind` if available.
+ // We check for `func.bind` first, to fail fast when `func` is undefined.
+ _.bind = function bind(func, context) {
+ var bound, args;
+ if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+ if (!_.isFunction(func)) throw new TypeError;
+ args = slice.call(arguments, 2);
+ return bound = function() {
+ if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
+ ctor.prototype = func.prototype;
+ var self = new ctor;
+ var result = func.apply(self, args.concat(slice.call(arguments)));
+ if (Object(result) === result) return result;
+ return self;
+ };
+ };
+
+ // Bind all of an object's methods to that object. Useful for ensuring that
+ // all callbacks defined on an object belong to it.
+ _.bindAll = function(obj) {
+ var funcs = slice.call(arguments, 1);
+ if (funcs.length == 0) funcs = _.functions(obj);
+ each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
+ return obj;
+ };
+
+ // Memoize an expensive function by storing its results.
+ _.memoize = function(func, hasher) {
+ var memo = {};
+ hasher || (hasher = _.identity);
+ return function() {
+ var key = hasher.apply(this, arguments);
+ return hasOwnProperty.call(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
+ };
+ };
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ _.delay = function(func, wait) {
+ var args = slice.call(arguments, 2);
+ return setTimeout(function(){ return func.apply(func, args); }, wait);
+ };
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ _.defer = function(func) {
+ return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
+ };
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time.
+ _.throttle = function(func, wait) {
+ var timeout, context, args, throttling, finishThrottle;
+ finishThrottle = _.debounce(function(){ throttling = false; }, wait);
+ return function() {
+ context = this; args = arguments;
+ var throttler = function() {
+ timeout = null;
+ func.apply(context, args);
+ finishThrottle();
+ };
+ if (!timeout) timeout = setTimeout(throttler, wait);
+ if (!throttling) func.apply(context, args);
+ if (finishThrottle) finishThrottle();
+ throttling = true;
+ };
+ };
+
+ // Returns a function, that, as long as it continues to be invoked, will not
+ // be triggered. The function will be called after it stops being called for
+ // N milliseconds.
+ _.debounce = function(func, wait) {
+ var timeout;
+ return function() {
+ var context = this, args = arguments;
+ var throttler = function() {
+ timeout = null;
+ func.apply(context, args);
+ };
+ clearTimeout(timeout);
+ timeout = setTimeout(throttler, wait);
+ };
+ };
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ _.once = function(func) {
+ var ran = false, memo;
+ return function() {
+ if (ran) return memo;
+ ran = true;
+ return memo = func.apply(this, arguments);
+ };
+ };
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ _.wrap = function(func, wrapper) {
+ return function() {
+ var args = [func].concat(slice.call(arguments));
+ return wrapper.apply(this, args);
+ };
+ };
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ _.compose = function() {
+ var funcs = slice.call(arguments);
+ return function() {
+ var args = slice.call(arguments);
+ for (var i = funcs.length - 1; i >= 0; i--) {
+ args = [funcs[i].apply(this, args)];
+ }
+ return args[0];
+ };
+ };
+
+ // Returns a function that will only be executed after being called N times.
+ _.after = function(times, func) {
+ return function() {
+ if (--times < 1) { return func.apply(this, arguments); }
+ };
+ };
+
+ // Object Functions
+ // ----------------
+
+ // Retrieve the names of an object's properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`
+ _.keys = nativeKeys || function(obj) {
+ if (obj !== Object(obj)) throw new TypeError('Invalid object');
+ var keys = [];
+ for (var key in obj) if (hasOwnProperty.call(obj, key)) keys[keys.length] = key;
+ return keys;
+ };
+
+ // Retrieve the values of an object's properties.
+ _.values = function(obj) {
+ return _.map(obj, _.identity);
+ };
+
+ // Return a sorted list of the function names available on the object.
+ // Aliased as `methods`
+ _.functions = _.methods = function(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (_.isFunction(obj[key])) names.push(key);
+ }
+ return names.sort();
+ };
+
+ // Extend a given object with all the properties in passed-in object(s).
+ _.extend = function(obj) {
+ each(slice.call(arguments, 1), function(source) {
+ for (var prop in source) {
+ if (source[prop] !== void 0) obj[prop] = source[prop];
+ }
+ });
+ return obj;
+ };
+
+ // Fill in a given object with default properties.
+ _.defaults = function(obj) {
+ each(slice.call(arguments, 1), function(source) {
+ for (var prop in source) {
+ if (obj[prop] == null) obj[prop] = source[prop];
+ }
+ });
+ return obj;
+ };
+
+ // Create a (shallow-cloned) duplicate of an object.
+ _.clone = function(obj) {
+ if (!_.isObject(obj)) return obj;
+ return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+ };
+
+ // Invokes interceptor with the obj, and then returns obj.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ _.tap = function(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ };
+
+ // Internal recursive comparison function.
+ function eq(a, b, stack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
+ if (a === b) return a !== 0 || 1 / a == 1 / b;
+ // A strict comparison is necessary because `null == undefined`.
+ if ((a == null) || (b == null)) return a === b;
+ // Unwrap any wrapped objects.
+ if (a._chain) a = a._wrapped;
+ if (b._chain) b = b._wrapped;
+ // Invoke a custom `isEqual` method if one is provided.
+ if (_.isFunction(a.isEqual)) return a.isEqual(b);
+ if (_.isFunction(b.isEqual)) return b.isEqual(a);
+ // Compare object types.
+ var typeA = typeof a;
+ if (typeA != typeof b) return false;
+ // Optimization; ensure that both values are truthy or falsy.
+ if (!a != !b) return false;
+ // `NaN` values are equal.
+ if (_.isNaN(a)) return _.isNaN(b);
+ // Compare string objects by value.
+ var isStringA = _.isString(a), isStringB = _.isString(b);
+ if (isStringA || isStringB) return isStringA && isStringB && String(a) == String(b);
+ // Compare number objects by value.
+ var isNumberA = _.isNumber(a), isNumberB = _.isNumber(b);
+ if (isNumberA || isNumberB) return isNumberA && isNumberB && +a == +b;
+ // Compare boolean objects by value. The value of `true` is 1; the value of `false` is 0.
+ var isBooleanA = _.isBoolean(a), isBooleanB = _.isBoolean(b);
+ if (isBooleanA || isBooleanB) return isBooleanA && isBooleanB && +a == +b;
+ // Compare dates by their millisecond values.
+ var isDateA = _.isDate(a), isDateB = _.isDate(b);
+ if (isDateA || isDateB) return isDateA && isDateB && a.getTime() == b.getTime();
+ // Compare RegExps by their source patterns and flags.
+ var isRegExpA = _.isRegExp(a), isRegExpB = _.isRegExp(b);
+ if (isRegExpA || isRegExpB) {
+ // Ensure commutative equality for RegExps.
+ return isRegExpA && isRegExpB &&
+ a.source == b.source &&
+ a.global == b.global &&
+ a.multiline == b.multiline &&
+ a.ignoreCase == b.ignoreCase;
+ }
+ // Ensure that both values are objects.
+ if (typeA != 'object') return false;
+ // Arrays or Arraylikes with different lengths are not equal.
+ if (a.length !== b.length) return false;
+ // Objects with different constructors are not equal.
+ if (a.constructor !== b.constructor) return false;
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+ var length = stack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (stack[length] == a) return true;
+ }
+ // Add the first object to the stack of traversed objects.
+ stack.push(a);
+ var size = 0, result = true;
+ // Deep compare objects.
+ for (var key in a) {
+ if (hasOwnProperty.call(a, key)) {
+ // Count the expected number of properties.
+ size++;
+ // Deep compare each member.
+ if (!(result = hasOwnProperty.call(b, key) && eq(a[key], b[key], stack))) break;
+ }
+ }
+ // Ensure that both objects contain the same number of properties.
+ if (result) {
+ for (key in b) {
+ if (hasOwnProperty.call(b, key) && !size--) break;
+ }
+ result = !size;
+ }
+ // Remove the first object from the stack of traversed objects.
+ stack.pop();
+ return result;
+ }
+
+ // Perform a deep comparison to check if two objects are equal.
+ _.isEqual = function(a, b) {
+ return eq(a, b, []);
+ };
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ _.isEmpty = function(obj) {
+ if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
+ for (var key in obj) if (hasOwnProperty.call(obj, key)) return false;
+ return true;
+ };
+
+ // Is a given value a DOM element?
+ _.isElement = function(obj) {
+ return !!(obj && obj.nodeType == 1);
+ };
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native Array.isArray
+ _.isArray = nativeIsArray || function(obj) {
+ return toString.call(obj) == '[object Array]';
+ };
+
+ // Is a given variable an object?
+ _.isObject = function(obj) {
+ return obj === Object(obj);
+ };
+
+ // Is a given variable an arguments object?
+ if (toString.call(arguments) == '[object Arguments]') {
+ _.isArguments = function(obj) {
+ return toString.call(obj) == '[object Arguments]';
+ };
+ } else {
+ _.isArguments = function(obj) {
+ return !!(obj && hasOwnProperty.call(obj, 'callee'));
+ };
+ }
+
+ // Is a given value a function?
+ _.isFunction = function(obj) {
+ return toString.call(obj) == '[object Function]';
+ };
+
+ // Is a given value a string?
+ _.isString = function(obj) {
+ return toString.call(obj) == '[object String]';
+ };
+
+ // Is a given value a number?
+ _.isNumber = function(obj) {
+ return toString.call(obj) == '[object Number]';
+ };
+
+ // Is the given value `NaN`?
+ _.isNaN = function(obj) {
+ // `NaN` is the only value for which `===` is not reflexive.
+ return obj !== obj;
+ };
+
+ // Is a given value a boolean?
+ _.isBoolean = function(obj) {
+ return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
+ };
+
+ // Is a given value a date?
+ _.isDate = function(obj) {
+ return toString.call(obj) == '[object Date]';
+ };
+
+ // Is the given value a regular expression?
+ _.isRegExp = function(obj) {
+ return toString.call(obj) == '[object RegExp]';
+ };
+
+ // Is a given value equal to null?
+ _.isNull = function(obj) {
+ return obj === null;
+ };
+
+ // Is a given variable undefined?
+ _.isUndefined = function(obj) {
+ return obj === void 0;
+ };
+
+ // Utility Functions
+ // -----------------
+
+ // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+ // previous owner. Returns a reference to the Underscore object.
+ _.noConflict = function() {
+ root._ = previousUnderscore;
+ return this;
+ };
+
+ // Keep the identity function around for default iterators.
+ _.identity = function(value) {
+ return value;
+ };
+
+ // Run a function **n** times.
+ _.times = function (n, iterator, context) {
+ for (var i = 0; i < n; i++) iterator.call(context, i);
+ };
+
+ // Escape a string for HTML interpolation.
+ _.escape = function(string) {
+ return (''+string).replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/');
+ };
+
+ // Add your own custom functions to the Underscore object, ensuring that
+ // they're correctly added to the OOP wrapper as well.
+ _.mixin = function(obj) {
+ each(_.functions(obj), function(name){
+ addToWrapper(name, _[name] = obj[name]);
+ });
+ };
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ _.uniqueId = function(prefix) {
+ var id = idCounter++;
+ return prefix ? prefix + id : id;
+ };
+
+ // By default, Underscore uses ERB-style template delimiters, change the
+ // following template settings to use alternative delimiters.
+ _.templateSettings = {
+ evaluate : /<%([\s\S]+?)%>/g,
+ interpolate : /<%=([\s\S]+?)%>/g,
+ escape : /<%-([\s\S]+?)%>/g
+ };
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ _.template = function(str, data) {
+ var c = _.templateSettings;
+ var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
+ 'with(obj||{}){__p.push(\'' +
+ str.replace(/\\/g, '\\\\')
+ .replace(/'/g, "\\'")
+ .replace(c.escape, function(match, code) {
+ return "',_.escape(" + code.replace(/\\'/g, "'") + "),'";
+ })
+ .replace(c.interpolate, function(match, code) {
+ return "'," + code.replace(/\\'/g, "'") + ",'";
+ })
+ .replace(c.evaluate || null, function(match, code) {
+ return "');" + code.replace(/\\'/g, "'")
+ .replace(/[\r\n\t]/g, ' ') + "__p.push('";
+ })
+ .replace(/\r/g, '\\r')
+ .replace(/\n/g, '\\n')
+ .replace(/\t/g, '\\t')
+ + "');}return __p.join('');";
+ var func = new Function('obj', tmpl);
+ return data ? func(data) : func;
+ };
+
+ // The OOP Wrapper
+ // ---------------
+
+ // If Underscore is called as a function, it returns a wrapped object that
+ // can be used OO-style. This wrapper holds altered versions of all the
+ // underscore functions. Wrapped objects may be chained.
+ var wrapper = function(obj) { this._wrapped = obj; };
+
+ // Expose `wrapper.prototype` as `_.prototype`
+ _.prototype = wrapper.prototype;
+
+ // Helper function to continue chaining intermediate results.
+ var result = function(obj, chain) {
+ return chain ? _(obj).chain() : obj;
+ };
+
+ // A method to easily add functions to the OOP wrapper.
+ var addToWrapper = function(name, func) {
+ wrapper.prototype[name] = function() {
+ var args = slice.call(arguments);
+ unshift.call(args, this._wrapped);
+ return result(func.apply(_, args), this._chain);
+ };
+ };
+
+ // Add all of the Underscore functions to the wrapper object.
+ _.mixin(_);
+
+ // Add all mutator Array functions to the wrapper.
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ wrapper.prototype[name] = function() {
+ method.apply(this._wrapped, arguments);
+ return result(this._wrapped, this._chain);
+ };
+ });
+
+ // Add all accessor Array functions to the wrapper.
+ each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ wrapper.prototype[name] = function() {
+ return result(method.apply(this._wrapped, arguments), this._chain);
+ };
+ });
+
+ // Start chaining a wrapped Underscore object.
+ wrapper.prototype.chain = function() {
+ this._chain = true;
+ return this;
+ };
+
+ // Extracts the result from a wrapped and chained object.
+ wrapper.prototype.value = function() {
+ return this._wrapped;
+ };
+
+})();
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/package.json b/blackberry10/node_modules/plugman/node_modules/dep-graph/package.json
new file mode 100644
index 0000000..6e00730
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/package.json
@@ -0,0 +1,30 @@
+{
+ "author": {
+ "name": "Trevor Burnham",
+ "url": "http://trevorburnham.com"
+ },
+ "name": "dep-graph",
+ "description": "Simple dependency graph management",
+ "version": "1.1.0",
+ "homepage": "http://github.com/TrevorBurnham/dep-graph",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TrevorBurnham/dep-graph.git"
+ },
+ "main": "lib/dep-graph.js",
+ "dependencies": {
+ "underscore": "1.2.1"
+ },
+ "devDependencies": {
+ "coffee-script": "1.1.2",
+ "nodeunit": "0.5.4",
+ "watchit": ">=0.0.1"
+ },
+ "readme": "# dep-graph.js\n\nThis is a small project spun off from [connect-assets](http://github.com/TrevorBurnham/connect-assets). Written in [CoffeeScript](coffeescript.org) by the author of [CoffeeScript: Accelerated JavaScript Development](http://pragprog.com/book/tbcoffee/coffeescript).\n\n## What's it for?\n\nSay you have a set of resources that depend on each other in some way. These resources can be anything—files, chains of command, plot twists on *Lost*—whatever. All that matters is that each one has a unique string identifier, and a list of direct dependencies.\n\n`dep-graph` makes it easy to compute \"chains\" of dependencies, with guaranteed logical ordering and no duplicates. That's trivial in most cases, but if `A` depends on `B` and `B` depends on `A`, a naïve dependency graph would get trapped in an infinite loop. `dep-graph` throws an error if any such \"cycles\" are detected.\n\n## How to use it?\n\n### In the browser\n\n deps = new DepGraph\n deps.a
dd 'A', 'B' # A requires B\n deps.add 'B', 'C' # B requires C\n deps.getChain 'A' # ['C', 'B', 'A']\n\n### In Node.js\n\nSame as above, but first run\n\n npm install dep-graph\n\nfrom your project's directory, and put\n\n DepGraph = require 'dep-graph'\n\nat the top of your file.\n\n## License\n\n©2011 Trevor Burnham and available under the [MIT license](http://www.opensource.org/licenses/mit-license.php):\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\n
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.",
+ "readmeFilename": "README.mdown",
+ "bugs": {
+ "url": "https://github.com/TrevorBurnham/dep-graph/issues"
+ },
+ "_id": "dep-graph@1.1.0",
+ "_from": "dep-graph@1.1.0"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/src/dep-graph.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/src/dep-graph.coffee b/blackberry10/node_modules/plugman/node_modules/dep-graph/src/dep-graph.coffee
new file mode 100644
index 0000000..fcff3a1
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/src/dep-graph.coffee
@@ -0,0 +1,59 @@
+# [dep-graph](http://github.com/TrevorBurnham/dep-graph)
+
+_ = require 'underscore'
+
+class DepGraph
+ constructor: ->
+ # The internal representation of the dependency graph in the format
+ # `id: [ids]`, indicating only *direct* dependencies.
+ @map = {}
+
+ # Add a direct dependency. Returns `false` if that dependency is a duplicate.
+ add: (id, depId) ->
+ @map[id] ?= []
+ return false if depId in @map[id]
+ @map[id].push depId
+ @map[id]
+
+ # Generate a list of all dependencies (direct and indirect) for the given id,
+ # in logical order with no duplicates.
+ getChain: (id) ->
+ # First, get a list of all dependencies (unordered)
+ deps = @descendantsOf id
+
+ # Second, order them (using the Tarjan algorithm)
+ chain = []
+ visited = {}
+ visit = (node) =>
+ return if visited[node] or node is id
+ visited[node] = true
+ visit parent for parent in @parentsOf(node) when parent in deps
+ chain.unshift node
+
+ for leafNode in _.intersection(deps, @leafNodes()).reverse()
+ visit leafNode
+
+ chain
+
+ leafNodes: ->
+ allNodes = _.uniq _.flatten _.values @map
+ node for node in allNodes when !@map[node]?.length
+
+ parentsOf: (child) ->
+ node for node in _.keys(@map) when child in @map[node]
+
+ descendantsOf: (parent, descendants = [], branch = []) ->
+ descendants.push parent
+ branch.push parent
+ for child in @map[parent] ? []
+ if child in branch # cycle
+ throw new Error("Cyclic dependency from #{parent} to #{child}")
+ continue if child in descendants # duplicate
+ @descendantsOf child, descendants, branch.slice(0)
+ descendants[1..]
+
+# Export the class in Node, make it global in the browser.
+if module?.exports?
+ module.exports = DepGraph
+else
+ @DepGraph = DepGraph
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/test/test.coffee
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/test/test.coffee b/blackberry10/node_modules/plugman/node_modules/dep-graph/test/test.coffee
new file mode 100644
index 0000000..47b6551
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/test/test.coffee
@@ -0,0 +1,50 @@
+DepGraph = require('../lib/dep-graph.js')
+depGraph = new DepGraph
+
+exports['Direct dependencies are chained in original order'] = (test) ->
+ depGraph.add '0', '1'
+ depGraph.add '0', '2'
+ depGraph.add '0', '3'
+ test.deepEqual depGraph.getChain('0'), ['1', '2', '3']
+ test.done()
+
+exports['Indirect dependencies are chained before their dependents'] = (test) ->
+ depGraph.add '2', 'A'
+ depGraph.add '2', 'B'
+ test.deepEqual depGraph.getChain('0'), ['1', 'A', 'B', '2', '3']
+ test.done()
+
+exports['getChain can safely be called for unknown resources'] = (test) ->
+ test.doesNotThrow -> depGraph.getChain('Z')
+ test.deepEqual depGraph.getChain('Z'), []
+ test.done()
+
+exports['Cyclic dependencies are detected'] = (test) ->
+ depGraph.add 'yin', 'yang'
+ depGraph.add 'yang', 'yin'
+ test.throws -> depGraph.getChain 'yin'
+ test.throws -> depGraph.getChain 'yang'
+ test.done()
+
+exports['Arc direction is taken into account (issue #1)'] = (test) ->
+ depGraph.add 'MAIN', 'One'
+ depGraph.add 'MAIN', 'Three'
+ depGraph.add 'One', 'Two'
+ depGraph.add 'Two', 'Three'
+ test.deepEqual depGraph.getChain('MAIN'), ['Three', 'Two', 'One']
+ test.done()
+
+exports['Dependency ordering is consistent (issue #2)'] = (test) ->
+ depGraph.add 'Head', 'Neck'
+ depGraph.add 'Head', 'Heart'
+ depGraph.add 'Heart', 'Neck'
+ depGraph.add 'Neck', 'Shoulders'
+ test.deepEqual depGraph.getChain('Head'), ['Shoulders', 'Neck', 'Heart']
+ test.done()
+
+exports['Nodes with same dependencies do not depend on each other (issue #6)'] = (test) ->
+ depGraph.add 'Java', 'JVM'
+ depGraph.add 'JRuby', 'JVM'
+ test.deepEqual depGraph.getChain('Java'), ['JVM']
+ test.deepEqual depGraph.getChain('JRuby'), ['JVM']
+ test.done()
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/.npmignore b/blackberry10/node_modules/plugman/node_modules/glob/.npmignore
new file mode 100644
index 0000000..2af4b71
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/.npmignore
@@ -0,0 +1,2 @@
+.*.swp
+test/a/
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/.travis.yml b/blackberry10/node_modules/plugman/node_modules/glob/.travis.yml
new file mode 100644
index 0000000..baa0031
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/.travis.yml
@@ -0,0 +1,3 @@
+language: node_js
+node_js:
+ - 0.8
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/LICENSE b/blackberry10/node_modules/plugman/node_modules/glob/LICENSE
new file mode 100644
index 0000000..0c44ae7
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. 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.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR CONTRIBUTORS
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/README.md b/blackberry10/node_modules/plugman/node_modules/glob/README.md
new file mode 100644
index 0000000..cc69164
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/README.md
@@ -0,0 +1,250 @@
+# Glob
+
+Match files using the patterns the shell uses, like stars and stuff.
+
+This is a glob implementation in JavaScript. It uses the `minimatch`
+library to do its matching.
+
+## Attention: node-glob users!
+
+The API has changed dramatically between 2.x and 3.x. This library is
+now 100% JavaScript, and the integer flags have been replaced with an
+options object.
+
+Also, there's an event emitter class, proper tests, and all the other
+things you've come to expect from node modules.
+
+And best of all, no compilation!
+
+## Usage
+
+```javascript
+var glob = require("glob")
+
+// options is optional
+glob("**/*.js", options, function (er, files) {
+ // files is an array of filenames.
+ // If the `nonull` option is set, and nothing
+ // was found, then files is ["**/*.js"]
+ // er is an error object or null.
+})
+```
+
+## Features
+
+Please see the [minimatch
+documentation](https://github.com/isaacs/minimatch) for more details.
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+* [minimatch documentation](https://github.com/isaacs/minimatch)
+
+## glob(pattern, [options], cb)
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* `cb` {Function}
+ * `err` {Error | null}
+ * `matches` {Array<String>} filenames found matching the pattern
+
+Perform an asynchronous glob search.
+
+## glob.sync(pattern, [options])
+
+* `pattern` {String} Pattern to be matched
+* `options` {Object}
+* return: {Array<String>} filenames found matching the pattern
+
+Perform a synchronous glob search.
+
+## Class: glob.Glob
+
+Create a Glob object by instanting the `glob.Glob` class.
+
+```javascript
+var Glob = require("glob").Glob
+var mg = new Glob(pattern, options, cb)
+```
+
+It's an EventEmitter, and starts walking the filesystem to find matches
+immediately.
+
+### new glob.Glob(pattern, [options], [cb])
+
+* `pattern` {String} pattern to search for
+* `options` {Object}
+* `cb` {Function} Called when an error occurs, or matches are found
+ * `err` {Error | null}
+ * `matches` {Array<String>} filenames found matching the pattern
+
+Note that if the `sync` flag is set in the options, then matches will
+be immediately available on the `g.found` member.
+
+### Properties
+
+* `minimatch` The minimatch object that the glob uses.
+* `options` The options object passed in.
+* `error` The error encountered. When an error is encountered, the
+ glob object is in an undefined state, and should be discarded.
+* `aborted` Boolean which is set to true when calling `abort()`. There
+ is no way at this time to continue a glob search after aborting, but
+ you can re-use the statCache to avoid having to duplicate syscalls.
+* `statCache` Collection of all the stat results the glob search
+ performed.
+* `cache` Convenience object. Each field has the following possible
+ values:
+ * `false` - Path does not exist
+ * `true` - Path exists
+ * `1` - Path exists, and is not a directory
+ * `2` - Path exists, and is a directory
+ * `[file, entries, ...]` - Path exists, is a directory, and the
+ array value is the results of `fs.readdir`
+
+### Events
+
+* `end` When the matching is finished, this is emitted with all the
+ matches found. If the `nonull` option is set, and no match was found,
+ then the `matches` list contains the original pattern. The matches
+ are sorted, unless the `nosort` flag is set.
+* `match` Every time a match is found, this is emitted with the matched.
+* `error` Emitted when an unexpected error is encountered, or whenever
+ any fs error occurs if `options.strict` is set.
+* `abort` When `abort()` is called, this event is raised.
+
+### Methods
+
+* `abort` Stop the search.
+
+### Options
+
+All the options that can be passed to Minimatch can also be passed to
+Glob to change pattern matching behavior. Also, some have been added,
+or have glob-specific ramifications.
+
+All options are false by default, unless otherwise noted.
+
+All options are added to the glob object, as well.
+
+* `cwd` The current working directory in which to search. Defaults
+ to `process.cwd()`.
+* `root` The place where patterns starting with `/` will be mounted
+ onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
+ systems, and `C:\` or some such on Windows.)
+* `dot` Include `.dot` files in normal matches and `globstar` matches.
+ Note that an explicit dot in a portion of the pattern will always
+ match dot files.
+* `nomount` By default, a pattern starting with a forward-slash will be
+ "mounted" onto the root setting, so that a valid filesystem path is
+ returned. Set this flag to disable that behavior.
+* `mark` Add a `/` character to directory matches. Note that this
+ requires additional stat calls.
+* `nosort` Don't sort the results.
+* `stat` Set to true to stat *all* results. This reduces performance
+ somewhat, and is completely unnecessary, unless `readdir` is presumed
+ to be an untrustworthy indicator of file existence. It will cause
+ ELOOP to be triggered one level sooner in the case of cyclical
+ symbolic links.
+* `silent` When an unusual error is encountered
+ when attempting to read a directory, a warning will be printed to
+ stderr. Set the `silent` option to true to suppress these warnings.
+* `strict` When an unusual error is encountered
+ when attempting to read a directory, the process will just continue on
+ in search of other matches. Set the `strict` option to raise an error
+ in these cases.
+* `cache` See `cache` property above. Pass in a previously generated
+ cache object to save some fs calls.
+* `statCache` A cache of results of filesystem information, to prevent
+ unnecessary stat calls. While it should not normally be necessary to
+ set this, you may pass the statCache from one glob() call to the
+ options object of another, if you know that the filesystem will not
+ change between calls. (See "Race Conditions" below.)
+* `sync` Perform a synchronous glob search.
+* `nounique` In some cases, brace-expanded patterns can result in the
+ same file showing up multiple times in the result set. By default,
+ this implementation prevents duplicates in the result set.
+ Set this flag to disable that behavior.
+* `nonull` Set to never return an empty set, instead returning a set
+ containing the pattern itself. This is the default in glob(3).
+* `nocase` Perform a case-insensitive match. Note that case-insensitive
+ filesystems will sometimes result in glob returning results that are
+ case-insensitively matched anyway, since readdir and stat will not
+ raise an error.
+* `debug` Set to enable debug logging in minimatch and glob.
+* `globDebug` Set to enable debug logging in glob, but not minimatch.
+
+## Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between node-glob and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not.
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then glob returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+## Windows
+
+**Please only use forward-slashes in glob expressions.**
+
+Though windows uses either `/` or `\` as its path separator, only `/`
+characters are used by this glob implementation. You must use
+forward-slashes **only** in glob expressions. Back-slashes will always
+be interpreted as escape characters, not path separators.
+
+Results from absolute patterns such as `/foo/*` are mounted onto the
+root setting using `path.join`. On windows, this will by default result
+in `/foo/*` matching `C:\foo\bar.txt`.
+
+## Race Conditions
+
+Glob searching, by its very nature, is susceptible to race conditions,
+since it relies on directory walking and such.
+
+As a result, it is possible that a file that exists when glob looks for
+it may have been deleted or modified by the time it returns the result.
+
+As part of its internal implementation, this program caches all stat
+and readdir calls that it makes, in order to cut down on system
+overhead. However, this also makes it even more susceptible to races,
+especially if the cache or statCache objects are reused between glob
+calls.
+
+Users are thus advised not to use a glob result as a guarantee of
+filesystem state in the face of rapid changes. For the vast majority
+of operations, this is never a problem.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/examples/g.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/examples/g.js b/blackberry10/node_modules/plugman/node_modules/glob/examples/g.js
new file mode 100644
index 0000000..be122df
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/examples/g.js
@@ -0,0 +1,9 @@
+var Glob = require("../").Glob
+
+var pattern = "test/a/**/[cg]/../[cg]"
+console.log(pattern)
+
+var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) {
+ console.log("matches", matches)
+})
+console.log("after")
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/examples/usr-local.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/examples/usr-local.js b/blackberry10/node_modules/plugman/node_modules/glob/examples/usr-local.js
new file mode 100644
index 0000000..327a425
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/examples/usr-local.js
@@ -0,0 +1,9 @@
+var Glob = require("../").Glob
+
+var pattern = "{./*/*,/*,/usr/local/*}"
+console.log(pattern)
+
+var mg = new Glob(pattern, {mark: true}, function (er, matches) {
+ console.log("matches", matches)
+})
+console.log("after")
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/glob.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/glob.js b/blackberry10/node_modules/plugman/node_modules/glob/glob.js
new file mode 100644
index 0000000..176be02
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/glob.js
@@ -0,0 +1,675 @@
+// Approach:
+//
+// 1. Get the minimatch set
+// 2. For each pattern in the set, PROCESS(pattern)
+// 3. Store matches per-set, then uniq them
+//
+// PROCESS(pattern)
+// Get the first [n] items from pattern that are all strings
+// Join these together. This is PREFIX.
+// If there is no more remaining, then stat(PREFIX) and
+// add to matches if it succeeds. END.
+// readdir(PREFIX) as ENTRIES
+// If fails, END
+// If pattern[n] is GLOBSTAR
+// // handle the case where the globstar match is empty
+// // by pruning it out, and testing the resulting pattern
+// PROCESS(pattern[0..n] + pattern[n+1 .. $])
+// // handle other cases.
+// for ENTRY in ENTRIES (not dotfiles)
+// // attach globstar + tail onto the entry
+// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $])
+//
+// else // not globstar
+// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
+// Test ENTRY against pattern[n]
+// If fails, continue
+// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
+//
+// Caveat:
+// Cache all stats and readdirs results to minimize syscall. Since all
+// we ever care about is existence and directory-ness, we can just keep
+// `true` for files, and [children,...] for directories, or `false` for
+// things that don't exist.
+
+
+
+module.exports = glob
+
+var fs = require("fs")
+, minimatch = require("minimatch")
+, Minimatch = minimatch.Minimatch
+, inherits = require("inherits")
+, EE = require("events").EventEmitter
+, path = require("path")
+, isDir = {}
+, assert = require("assert").ok
+
+function glob (pattern, options, cb) {
+ if (typeof options === "function") cb = options, options = {}
+ if (!options) options = {}
+
+ if (typeof options === "number") {
+ deprecated()
+ return
+ }
+
+ var g = new Glob(pattern, options, cb)
+ return g.sync ? g.found : g
+}
+
+glob.fnmatch = deprecated
+
+function deprecated () {
+ throw new Error("glob's interface has changed. Please see the docs.")
+}
+
+glob.sync = globSync
+function globSync (pattern, options) {
+ if (typeof options === "number") {
+ deprecated()
+ return
+ }
+
+ options = options || {}
+ options.sync = true
+ return glob(pattern, options)
+}
+
+
+glob.Glob = Glob
+inherits(Glob, EE)
+function Glob (pattern, options, cb) {
+ if (!(this instanceof Glob)) {
+ return new Glob(pattern, options, cb)
+ }
+
+ if (typeof cb === "function") {
+ this.on("error", cb)
+ this.on("end", function (matches) {
+ cb(null, matches)
+ })
+ }
+
+ options = options || {}
+
+ this.EOF = {}
+ this._emitQueue = []
+
+ this.maxDepth = options.maxDepth || 1000
+ this.maxLength = options.maxLength || Infinity
+ this.cache = options.cache || {}
+ this.statCache = options.statCache || {}
+
+ this.changedCwd = false
+ var cwd = process.cwd()
+ if (!options.hasOwnProperty("cwd")) this.cwd = cwd
+ else {
+ this.cwd = options.cwd
+ this.changedCwd = path.resolve(options.cwd) !== cwd
+ }
+
+ this.root = options.root || path.resolve(this.cwd, "/")
+ this.root = path.resolve(this.root)
+ if (process.platform === "win32")
+ this.root = this.root.replace(/\\/g, "/")
+
+ this.nomount = !!options.nomount
+
+ if (!pattern) {
+ throw new Error("must provide pattern")
+ }
+
+ // base-matching: just use globstar for that.
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
+ if (options.noglobstar) {
+ throw new Error("base matching requires globstar")
+ }
+ pattern = "**/" + pattern
+ }
+
+ this.strict = options.strict !== false
+ this.dot = !!options.dot
+ this.mark = !!options.mark
+ this.sync = !!options.sync
+ this.nounique = !!options.nounique
+ this.nonull = !!options.nonull
+ this.nosort = !!options.nosort
+ this.nocase = !!options.nocase
+ this.stat = !!options.stat
+
+ this.debug = !!options.debug || !!options.globDebug
+ if (this.debug)
+ this.log = console.error
+
+ this.silent = !!options.silent
+
+ var mm = this.minimatch = new Minimatch(pattern, options)
+ this.options = mm.options
+ pattern = this.pattern = mm.pattern
+
+ this.error = null
+ this.aborted = false
+
+ // list of all the patterns that ** has resolved do, so
+ // we can avoid visiting multiple times.
+ this._globstars = {}
+
+ EE.call(this)
+
+ // process each pattern in the minimatch set
+ var n = this.minimatch.set.length
+
+ // The matches are stored as {<filename>: true,...} so that
+ // duplicates are automagically pruned.
+ // Later, we do an Object.keys() on these.
+ // Keep them as a list so we can fill in when nonull is set.
+ this.matches = new Array(n)
+
+ this.minimatch.set.forEach(iterator.bind(this))
+ function iterator (pattern, i, set) {
+ this._process(pattern, 0, i, function (er) {
+ if (er) this.emit("error", er)
+ if (-- n <= 0) this._finish()
+ })
+ }
+}
+
+Glob.prototype.log = function () {}
+
+Glob.prototype._finish = function () {
+ assert(this instanceof Glob)
+
+ var nou = this.nounique
+ , all = nou ? [] : {}
+
+ for (var i = 0, l = this.matches.length; i < l; i ++) {
+ var matches = this.matches[i]
+ this.log("matches[%d] =", i, matches)
+ // do like the shell, and spit out the literal glob
+ if (!matches) {
+ if (this.nonull) {
+ var literal = this.minimatch.globSet[i]
+ if (nou) all.push(literal)
+ else all[literal] = true
+ }
+ } else {
+ // had matches
+ var m = Object.keys(matches)
+ if (nou) all.push.apply(all, m)
+ else m.forEach(function (m) {
+ all[m] = true
+ })
+ }
+ }
+
+ if (!nou) all = Object.keys(all)
+
+ if (!this.nosort) {
+ all = all.sort(this.nocase ? alphasorti : alphasort)
+ }
+
+ if (this.mark) {
+ // at *some* point we statted all of these
+ all = all.map(function (m) {
+ var sc = this.cache[m]
+ if (!sc)
+ return m
+ var isDir = (Array.isArray(sc) || sc === 2)
+ if (isDir && m.slice(-1) !== "/") {
+ return m + "/"
+ }
+ if (!isDir && m.slice(-1) === "/") {
+ return m.replace(/\/+$/, "")
+ }
+ return m
+ }, this)
+ }
+
+ this.log("emitting end", all)
+
+ this.EOF = this.found = all
+ this.emitMatch(this.EOF)
+}
+
+function alphasorti (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return alphasort(a, b)
+}
+
+function alphasort (a, b) {
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+Glob.prototype.abort = function () {
+ this.aborted = true
+ this.emit("abort")
+}
+
+Glob.prototype.pause = function () {
+ if (this.paused) return
+ if (this.sync)
+ this.emit("error", new Error("Can't pause/resume sync glob"))
+ this.paused = true
+ this.emit("pause")
+}
+
+Glob.prototype.resume = function () {
+ if (!this.paused) return
+ if (this.sync)
+ this.emit("error", new Error("Can't pause/resume sync glob"))
+ this.paused = false
+ this.emit("resume")
+ this._processEmitQueue()
+ //process.nextTick(this.emit.bind(this, "resume"))
+}
+
+Glob.prototype.emitMatch = function (m) {
+ if (!this.stat || this.statCache[m] || m === this.EOF) {
+ this._emitQueue.push(m)
+ this._processEmitQueue()
+ } else {
+ this._stat(m, function(exists, isDir) {
+ if (exists) {
+ this._emitQueue.push(m)
+ this._processEmitQueue()
+ }
+ })
+ }
+}
+
+Glob.prototype._processEmitQueue = function (m) {
+ while (!this._processingEmitQueue &&
+ !this.paused) {
+ this._processingEmitQueue = true
+ var m = this._emitQueue.shift()
+ if (!m) {
+ this._processingEmitQueue = false
+ break
+ }
+
+ this.log('emit!', m === this.EOF ? "end" : "match")
+
+ this.emit(m === this.EOF ? "end" : "match", m)
+ this._processingEmitQueue = false
+ }
+}
+
+Glob.prototype._process = function (pattern, depth, index, cb_) {
+ assert(this instanceof Glob)
+
+ var cb = function cb (er, res) {
+ assert(this instanceof Glob)
+ if (this.paused) {
+ if (!this._processQueue) {
+ this._processQueue = []
+ this.once("resume", function () {
+ var q = this._processQueue
+ this._processQueue = null
+ q.forEach(function (cb) { cb() })
+ })
+ }
+ this._processQueue.push(cb_.bind(this, er, res))
+ } else {
+ cb_.call(this, er, res)
+ }
+ }.bind(this)
+
+ if (this.aborted) return cb()
+
+ if (depth > this.maxDepth) return cb()
+
+ // Get the first [n] parts of pattern that are all strings.
+ var n = 0
+ while (typeof pattern[n] === "string") {
+ n ++
+ }
+ // now n is the index of the first one that is *not* a string.
+
+ // see if there's anything else
+ var prefix
+ switch (n) {
+ // if not, then this is rather simple
+ case pattern.length:
+ prefix = pattern.join("/")
+ this._stat(prefix, function (exists, isDir) {
+ // either it's there, or it isn't.
+ // nothing more to do, either way.
+ if (exists) {
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
+ if (prefix.charAt(0) === "/") {
+ prefix = path.join(this.root, prefix)
+ } else {
+ prefix = path.resolve(this.root, prefix)
+ }
+ }
+
+ if (process.platform === "win32")
+ prefix = prefix.replace(/\\/g, "/")
+
+ this.matches[index] = this.matches[index] || {}
+ this.matches[index][prefix] = true
+ this.emitMatch(prefix)
+ }
+ return cb()
+ })
+ return
+
+ case 0:
+ // pattern *starts* with some non-trivial item.
+ // going to readdir(cwd), but not include the prefix in matches.
+ prefix = null
+ break
+
+ default:
+ // pattern has some string bits in the front.
+ // whatever it starts with, whether that's "absolute" like /foo/bar,
+ // or "relative" like "../baz"
+ prefix = pattern.slice(0, n)
+ prefix = prefix.join("/")
+ break
+ }
+
+ // get the list of entries.
+ var read
+ if (prefix === null) read = "."
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) {
+ if (!prefix || !isAbsolute(prefix)) {
+ prefix = path.join("/", prefix)
+ }
+ read = prefix = path.resolve(prefix)
+
+ // if (process.platform === "win32")
+ // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/")
+
+ this.log('absolute: ', prefix, this.root, pattern, read)
+ } else {
+ read = prefix
+ }
+
+ this.log('readdir(%j)', read, this.cwd, this.root)
+
+ return this._readdir(read, function (er, entries) {
+ if (er) {
+ // not a directory!
+ // this means that, whatever else comes after this, it can never match
+ return cb()
+ }
+
+ // globstar is special
+ if (pattern[n] === minimatch.GLOBSTAR) {
+ // test without the globstar, and with every child both below
+ // and replacing the globstar.
+ var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ]
+ entries.forEach(function (e) {
+ if (e.charAt(0) === "." && !this.dot) return
+ // instead of the globstar
+ s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)))
+ // below the globstar
+ s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n)))
+ }, this)
+
+ s = s.filter(function (pattern) {
+ var key = gsKey(pattern)
+ var seen = !this._globstars[key]
+ this._globstars[key] = true
+ return seen
+ }, this)
+
+ if (!s.length)
+ return cb()
+
+ // now asyncForEach over this
+ var l = s.length
+ , errState = null
+ s.forEach(function (gsPattern) {
+ this._process(gsPattern, depth + 1, index, function (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (--l <= 0) return cb()
+ })
+ }, this)
+
+ return
+ }
+
+ // not a globstar
+ // It will only match dot entries if it starts with a dot, or if
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
+ var pn = pattern[n]
+ var rawGlob = pattern[n]._glob
+ , dotOk = this.dot || rawGlob.charAt(0) === "."
+
+ entries = entries.filter(function (e) {
+ return (e.charAt(0) !== "." || dotOk) &&
+ e.match(pattern[n])
+ })
+
+ // If n === pattern.length - 1, then there's no need for the extra stat
+ // *unless* the user has specified "mark" or "stat" explicitly.
+ // We know that they exist, since the readdir returned them.
+ if (n === pattern.length - 1 &&
+ !this.mark &&
+ !this.stat) {
+ entries.forEach(function (e) {
+ if (prefix) {
+ if (prefix !== "/") e = prefix + "/" + e
+ else e = prefix + e
+ }
+ if (e.charAt(0) === "/" && !this.nomount) {
+ e = path.join(this.root, e)
+ }
+
+ if (process.platform === "win32")
+ e = e.replace(/\\/g, "/")
+
+ this.matches[index] = this.matches[index] || {}
+ this.matches[index][e] = true
+ this.emitMatch(e)
+ }, this)
+ return cb.call(this)
+ }
+
+
+ // now test all the remaining entries as stand-ins for that part
+ // of the pattern.
+ var l = entries.length
+ , errState = null
+ if (l === 0) return cb() // no matches possible
+ entries.forEach(function (e) {
+ var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))
+ this._process(p, depth + 1, index, function (er) {
+ if (errState) return
+ if (er) return cb(errState = er)
+ if (--l === 0) return cb.call(this)
+ })
+ }, this)
+ })
+
+}
+
+function gsKey (pattern) {
+ return '**' + pattern.map(function (p) {
+ return (p === minimatch.GLOBSTAR) ? '**' : (''+p)
+ }).join('/')
+}
+
+Glob.prototype._stat = function (f, cb) {
+ assert(this instanceof Glob)
+ var abs = f
+ if (f.charAt(0) === "/") {
+ abs = path.join(this.root, f)
+ } else if (this.changedCwd) {
+ abs = path.resolve(this.cwd, f)
+ }
+
+ if (f.length > this.maxLength) {
+ var er = new Error("Path name too long")
+ er.code = "ENAMETOOLONG"
+ er.path = f
+ return this._afterStat(f, abs, cb, er)
+ }
+
+ this.log('stat', [this.cwd, f, '=', abs])
+
+ if (!this.stat && this.cache.hasOwnProperty(f)) {
+ var exists = this.cache[f]
+ , isDir = exists && (Array.isArray(exists) || exists === 2)
+ if (this.sync) return cb.call(this, !!exists, isDir)
+ return process.nextTick(cb.bind(this, !!exists, isDir))
+ }
+
+ var stat = this.statCache[abs]
+ if (this.sync || stat) {
+ var er
+ try {
+ stat = fs.statSync(abs)
+ } catch (e) {
+ er = e
+ }
+ this._afterStat(f, abs, cb, er, stat)
+ } else {
+ fs.stat(abs, this._afterStat.bind(this, f, abs, cb))
+ }
+}
+
+Glob.prototype._afterStat = function (f, abs, cb, er, stat) {
+ var exists
+ assert(this instanceof Glob)
+
+ if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) {
+ this.log("should be ENOTDIR, fake it")
+
+ er = new Error("ENOTDIR, not a directory '" + abs + "'")
+ er.path = abs
+ er.code = "ENOTDIR"
+ stat = null
+ }
+
+ var emit = !this.statCache[abs]
+ this.statCache[abs] = stat
+
+ if (er || !stat) {
+ exists = false
+ } else {
+ exists = stat.isDirectory() ? 2 : 1
+ if (emit)
+ this.emit('stat', f, stat)
+ }
+ this.cache[f] = this.cache[f] || exists
+ cb.call(this, !!exists, exists === 2)
+}
+
+Glob.prototype._readdir = function (f, cb) {
+ assert(this instanceof Glob)
+ var abs = f
+ if (f.charAt(0) === "/") {
+ abs = path.join(this.root, f)
+ } else if (isAbsolute(f)) {
+ abs = f
+ } else if (this.changedCwd) {
+ abs = path.resolve(this.cwd, f)
+ }
+
+ if (f.length > this.maxLength) {
+ var er = new Error("Path name too long")
+ er.code = "ENAMETOOLONG"
+ er.path = f
+ return this._afterReaddir(f, abs, cb, er)
+ }
+
+ this.log('readdir', [this.cwd, f, abs])
+ if (this.cache.hasOwnProperty(f)) {
+ var c = this.cache[f]
+ if (Array.isArray(c)) {
+ if (this.sync) return cb.call(this, null, c)
+ return process.nextTick(cb.bind(this, null, c))
+ }
+
+ if (!c || c === 1) {
+ // either ENOENT or ENOTDIR
+ var code = c ? "ENOTDIR" : "ENOENT"
+ , er = new Error((c ? "Not a directory" : "Not found") + ": " + f)
+ er.path = f
+ er.code = code
+ this.log(f, er)
+ if (this.sync) return cb.call(this, er)
+ return process.nextTick(cb.bind(this, er))
+ }
+
+ // at this point, c === 2, meaning it's a dir, but we haven't
+ // had to read it yet, or c === true, meaning it's *something*
+ // but we don't have any idea what. Need to read it, either way.
+ }
+
+ if (this.sync) {
+ var er, entries
+ try {
+ entries = fs.readdirSync(abs)
+ } catch (e) {
+ er = e
+ }
+ return this._afterReaddir(f, abs, cb, er, entries)
+ }
+
+ fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb))
+}
+
+Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) {
+ assert(this instanceof Glob)
+ if (entries && !er) {
+ this.cache[f] = entries
+ // if we haven't asked to stat everything for suresies, then just
+ // assume that everything in there exists, so we can avoid
+ // having to stat it a second time. This also gets us one step
+ // further into ELOOP territory.
+ if (!this.mark && !this.stat) {
+ entries.forEach(function (e) {
+ if (f === "/") e = f + e
+ else e = f + "/" + e
+ this.cache[e] = true
+ }, this)
+ }
+
+ return cb.call(this, er, entries)
+ }
+
+ // now handle errors, and cache the information
+ if (er) switch (er.code) {
+ case "ENOTDIR": // totally normal. means it *does* exist.
+ this.cache[f] = 1
+ return cb.call(this, er)
+ case "ENOENT": // not terribly unusual
+ case "ELOOP":
+ case "ENAMETOOLONG":
+ case "UNKNOWN":
+ this.cache[f] = false
+ return cb.call(this, er)
+ default: // some unusual error. Treat as failure.
+ this.cache[f] = false
+ if (this.strict) this.emit("error", er)
+ if (!this.silent) console.error("glob error", er)
+ return cb.call(this, er)
+ }
+}
+
+var isAbsolute = process.platform === "win32" ? absWin : absUnix
+
+function absWin (p) {
+ if (absUnix(p)) return true
+ // pull off the device/UNC bit from a windows path.
+ // from node's lib/path.js
+ var splitDeviceRe =
+ /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/
+ , result = splitDeviceRe.exec(p)
+ , device = result[1] || ''
+ , isUnc = device && device.charAt(1) !== ':'
+ , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute
+
+ return isAbsolute
+}
+
+function absUnix (p) {
+ return p.charAt(0) === "/" || p === ""
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/LICENSE b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/LICENSE
new file mode 100644
index 0000000..5a8e332
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/LICENSE
@@ -0,0 +1,14 @@
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright (C) 2004 Sam Hocevar <sa...@hocevar.net>
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/README.md b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/README.md
new file mode 100644
index 0000000..b1c5665
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/README.md
@@ -0,0 +1,42 @@
+Browser-friendly inheritance fully compatible with standard node.js
+[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).
+
+This package exports standard `inherits` from node.js `util` module in
+node environment, but also provides alternative browser-friendly
+implementation through [browser
+field](https://gist.github.com/shtylman/4339901). Alternative
+implementation is a literal copy of standard one located in standalone
+module to avoid requiring of `util`. It also has a shim for old
+browsers with no `Object.create` support.
+
+While keeping you sure you are using standard `inherits`
+implementation in node.js environment, it allows bundlers such as
+[browserify](https://github.com/substack/node-browserify) to not
+include full `util` package to your client code if all you need is
+just `inherits` function. It worth, because browser shim for `util`
+package is large and `inherits` is often the single function you need
+from it.
+
+It's recommended to use this package instead of
+`require('util').inherits` for any code that has chances to be used
+not only in node.js but in browser too.
+
+## usage
+
+```js
+var inherits = require('inherits');
+// then use exactly as the standard one
+```
+
+## note on version ~1.0
+
+Version ~1.0 had completely different motivation and is not compatible
+neither with 2.0 nor with standard node.js `inherits`.
+
+If you are using version ~1.0 and planning to switch to ~2.0, be
+careful:
+
+* new version uses `super_` instead of `super` for referencing
+ superclass
+* new version overwrites current prototype while old one preserves any
+ existing fields on it
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/inherits.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/inherits.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/inherits.js
new file mode 100644
index 0000000..29f5e24
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/inherits.js
@@ -0,0 +1 @@
+module.exports = require('util').inherits
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/inherits_browser.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/inherits_browser.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/inherits_browser.js
new file mode 100644
index 0000000..c1e78a7
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/inherits_browser.js
@@ -0,0 +1,23 @@
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/package.json b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/package.json
new file mode 100644
index 0000000..deec274
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "inherits",
+ "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()",
+ "version": "2.0.0",
+ "keywords": [
+ "inheritance",
+ "class",
+ "klass",
+ "oop",
+ "object-oriented",
+ "inherits",
+ "browser",
+ "browserify"
+ ],
+ "main": "./inherits.js",
+ "browser": "./inherits_browser.js",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/isaacs/inherits"
+ },
+ "license": {
+ "type": "WTFPL2"
+ },
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "scripts": {
+ "test": "node test"
+ },
+ "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom
it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/inherits/issues"
+ },
+ "_id": "inherits@2.0.0",
+ "_from": "inherits@2"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/test.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/test.js
new file mode 100644
index 0000000..fc53012
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/inherits/test.js
@@ -0,0 +1,25 @@
+var inherits = require('./inherits.js')
+var assert = require('assert')
+
+function test(c) {
+ assert(c.constructor === Child)
+ assert(c.constructor.super_ === Parent)
+ assert(Object.getPrototypeOf(c) === Child.prototype)
+ assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype)
+ assert(c instanceof Child)
+ assert(c instanceof Parent)
+}
+
+function Child() {
+ Parent.call(this)
+ test(this)
+}
+
+function Parent() {}
+
+inherits(Child, Parent)
+
+var c = new Child
+test(c)
+
+console.log('ok')
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/LICENSE b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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.
[17/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/requirejs/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/requirejs/package.json b/blackberry10/node_modules/jasmine-node/node_modules/requirejs/package.json
new file mode 100644
index 0000000..294b055
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/requirejs/package.json
@@ -0,0 +1,43 @@
+{
+ "name": "requirejs",
+ "description": "Node adapter for RequireJS, for loading AMD modules. Includes RequireJS optimizer",
+ "version": "2.1.8",
+ "homepage": "http://github.com/jrburke/r.js",
+ "author": {
+ "name": "James Burke",
+ "email": "jrburke@gmail.com",
+ "url": "http://github.com/jrburke"
+ },
+ "licenses": [
+ {
+ "type": "BSD",
+ "url": "https://github.com/jrburke/r.js/blob/master/LICENSE"
+ },
+ {
+ "type": "MIT",
+ "url": "https://github.com/jrburke/r.js/blob/master/LICENSE"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jrburke/r.js.git"
+ },
+ "main": "./bin/r.js",
+ "bin": {
+ "r.js": "./bin/r.js"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ },
+ "readme": "# requirejs\n\nRequireJS for use in Node. includes:\n\n* r.js: the RequireJS optimizer, and AMD runtime for use in Node.\n* require.js: The browser-based AMD loader.\n\nMore information at http://requirejs.org\n\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/jrburke/r.js/issues"
+ },
+ "_id": "requirejs@2.1.8",
+ "dist": {
+ "shasum": "6a99e83b8f4b604288b7ed1ff2232581d299a723"
+ },
+ "_from": "requirejs@>=0.27.1",
+ "_resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.1.8.tgz"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/requirejs/require.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/requirejs/require.js b/blackberry10/node_modules/jasmine-node/node_modules/requirejs/require.js
new file mode 100644
index 0000000..52c2b07
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/requirejs/require.js
@@ -0,0 +1,2053 @@
+/** vim: et:ts=4:sw=4:sts=4
+ * @license RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/jrburke/requirejs for details
+ */
+//Not using strict: uneven strict support in browsers, #392, and causes
+//problems with requirejs.exec()/transpiler plugins that may not be strict.
+/*jslint regexp: true, nomen: true, sloppy: true */
+/*global window, navigator, document, importScripts, setTimeout, opera */
+
+var requirejs, require, define;
+(function (global) {
+ var req, s, head, baseElement, dataMain, src,
+ interactiveScript, currentlyAddingScript, mainScript, subPath,
+ version = '2.1.8',
+ commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
+ cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
+ jsSuffixRegExp = /\.js$/,
+ currDirRegExp = /^\.\//,
+ op = Object.prototype,
+ ostring = op.toString,
+ hasOwn = op.hasOwnProperty,
+ ap = Array.prototype,
+ apsp = ap.splice,
+ isBrowser = !!(typeof window !== 'undefined' && navigator && window.document),
+ isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
+ //PS3 indicates loaded and complete, but need to wait for complete
+ //specifically. Sequence is 'loading', 'loaded', execution,
+ // then 'complete'. The UA check is unfortunate, but not sure how
+ //to feature test w/o causing perf issues.
+ readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?
+ /^complete$/ : /^(complete|loaded)$/,
+ defContextName = '_',
+ //Oh the tragedy, detecting opera. See the usage of isOpera for reason.
+ isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',
+ contexts = {},
+ cfg = {},
+ globalDefQueue = [],
+ useInteractive = false;
+
+ function isFunction(it) {
+ return ostring.call(it) === '[object Function]';
+ }
+
+ function isArray(it) {
+ return ostring.call(it) === '[object Array]';
+ }
+
+ /**
+ * Helper function for iterating over an array. If the func returns
+ * a true value, it will break out of the loop.
+ */
+ function each(ary, func) {
+ if (ary) {
+ var i;
+ for (i = 0; i < ary.length; i += 1) {
+ if (ary[i] && func(ary[i], i, ary)) {
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Helper function for iterating over an array backwards. If the func
+ * returns a true value, it will break out of the loop.
+ */
+ function eachReverse(ary, func) {
+ if (ary) {
+ var i;
+ for (i = ary.length - 1; i > -1; i -= 1) {
+ if (ary[i] && func(ary[i], i, ary)) {
+ break;
+ }
+ }
+ }
+ }
+
+ function hasProp(obj, prop) {
+ return hasOwn.call(obj, prop);
+ }
+
+ function getOwn(obj, prop) {
+ return hasProp(obj, prop) && obj[prop];
+ }
+
+ /**
+ * Cycles over properties in an object and calls a function for each
+ * property value. If the function returns a truthy value, then the
+ * iteration is stopped.
+ */
+ function eachProp(obj, func) {
+ var prop;
+ for (prop in obj) {
+ if (hasProp(obj, prop)) {
+ if (func(obj[prop], prop)) {
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * Simple function to mix in properties from source into target,
+ * but only if target does not already have a property of the same name.
+ */
+ function mixin(target, source, force, deepStringMixin) {
+ if (source) {
+ eachProp(source, function (value, prop) {
+ if (force || !hasProp(target, prop)) {
+ if (deepStringMixin && typeof value !== 'string') {
+ if (!target[prop]) {
+ target[prop] = {};
+ }
+ mixin(target[prop], value, force, deepStringMixin);
+ } else {
+ target[prop] = value;
+ }
+ }
+ });
+ }
+ return target;
+ }
+
+ //Similar to Function.prototype.bind, but the 'this' object is specified
+ //first, since it is easier to read/figure out what 'this' will be.
+ function bind(obj, fn) {
+ return function () {
+ return fn.apply(obj, arguments);
+ };
+ }
+
+ function scripts() {
+ return document.getElementsByTagName('script');
+ }
+
+ function defaultOnError(err) {
+ throw err;
+ }
+
+ //Allow getting a global that expressed in
+ //dot notation, like 'a.b.c'.
+ function getGlobal(value) {
+ if (!value) {
+ return value;
+ }
+ var g = global;
+ each(value.split('.'), function (part) {
+ g = g[part];
+ });
+ return g;
+ }
+
+ /**
+ * Constructs an error with a pointer to an URL with more information.
+ * @param {String} id the error ID that maps to an ID on a web page.
+ * @param {String} message human readable error.
+ * @param {Error} [err] the original error, if there is one.
+ *
+ * @returns {Error}
+ */
+ function makeError(id, msg, err, requireModules) {
+ var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
+ e.requireType = id;
+ e.requireModules = requireModules;
+ if (err) {
+ e.originalError = err;
+ }
+ return e;
+ }
+
+ if (typeof define !== 'undefined') {
+ //If a define is already in play via another AMD loader,
+ //do not overwrite.
+ return;
+ }
+
+ if (typeof requirejs !== 'undefined') {
+ if (isFunction(requirejs)) {
+ //Do not overwrite and existing requirejs instance.
+ return;
+ }
+ cfg = requirejs;
+ requirejs = undefined;
+ }
+
+ //Allow for a require config object
+ if (typeof require !== 'undefined' && !isFunction(require)) {
+ //assume it is a config object.
+ cfg = require;
+ require = undefined;
+ }
+
+ function newContext(contextName) {
+ var inCheckLoaded, Module, context, handlers,
+ checkLoadedTimeoutId,
+ config = {
+ //Defaults. Do not set a default for map
+ //config to speed up normalize(), which
+ //will run faster if there is no default.
+ waitSeconds: 7,
+ baseUrl: './',
+ paths: {},
+ pkgs: {},
+ shim: {},
+ config: {}
+ },
+ registry = {},
+ //registry of just enabled modules, to speed
+ //cycle breaking code when lots of modules
+ //are registered, but not activated.
+ enabledRegistry = {},
+ undefEvents = {},
+ defQueue = [],
+ defined = {},
+ urlFetched = {},
+ requireCounter = 1,
+ unnormalizedCounter = 1;
+
+ /**
+ * Trims the . and .. from an array of path segments.
+ * It will keep a leading path segment if a .. will become
+ * the first path segment, to help with module name lookups,
+ * which act like paths, but can be remapped. But the end result,
+ * all paths that use this function should look normalized.
+ * NOTE: this method MODIFIES the input array.
+ * @param {Array} ary the array of path segments.
+ */
+ function trimDots(ary) {
+ var i, part;
+ for (i = 0; ary[i]; i += 1) {
+ part = ary[i];
+ if (part === '.') {
+ ary.splice(i, 1);
+ i -= 1;
+ } else if (part === '..') {
+ if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
+ //End of the line. Keep at least one non-dot
+ //path segment at the front so it can be mapped
+ //correctly to disk. Otherwise, there is likely
+ //no path mapping for a path starting with '..'.
+ //This can still fail, but catches the most reasonable
+ //uses of ..
+ break;
+ } else if (i > 0) {
+ ary.splice(i - 1, 2);
+ i -= 2;
+ }
+ }
+ }
+ }
+
+ /**
+ * Given a relative module name, like ./something, normalize it to
+ * a real name that can be mapped to a path.
+ * @param {String} name the relative name
+ * @param {String} baseName a real name that the name arg is relative
+ * to.
+ * @param {Boolean} applyMap apply the map config to the value. Should
+ * only be done if this normalization is for a dependency ID.
+ * @returns {String} normalized name
+ */
+ function normalize(name, baseName, applyMap) {
+ var pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment,
+ foundMap, foundI, foundStarMap, starI,
+ baseParts = baseName && baseName.split('/'),
+ normalizedBaseParts = baseParts,
+ map = config.map,
+ starMap = map && map['*'];
+
+ //Adjust any relative paths.
+ if (name && name.charAt(0) === '.') {
+ //If have a base name, try to normalize against it,
+ //otherwise, assume it is a top-level require that will
+ //be relative to baseUrl in the end.
+ if (baseName) {
+ if (getOwn(config.pkgs, baseName)) {
+ //If the baseName is a package name, then just treat it as one
+ //name to concat the name with.
+ normalizedBaseParts = baseParts = [baseName];
+ } else {
+ //Convert baseName to array, and lop off the last part,
+ //so that . matches that 'directory' and not name of the baseName's
+ //module. For instance, baseName of 'one/two/three', maps to
+ //'one/two/three.js', but we want the directory, 'one/two' for
+ //this normalization.
+ normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
+ }
+
+ name = normalizedBaseParts.concat(name.split('/'));
+ trimDots(name);
+
+ //Some use of packages may use a . path to reference the
+ //'main' module name, so normalize for that.
+ pkgConfig = getOwn(config.pkgs, (pkgName = name[0]));
+ name = name.join('/');
+ if (pkgConfig && name === pkgName + '/' + pkgConfig.main) {
+ name = pkgName;
+ }
+ } else if (name.indexOf('./') === 0) {
+ // No baseName, so this is ID is resolved relative
+ // to baseUrl, pull off the leading dot.
+ name = name.substring(2);
+ }
+ }
+
+ //Apply map config if available.
+ if (applyMap && map && (baseParts || starMap)) {
+ nameParts = name.split('/');
+
+ for (i = nameParts.length; i > 0; i -= 1) {
+ nameSegment = nameParts.slice(0, i).join('/');
+
+ if (baseParts) {
+ //Find the longest baseName segment match in the config.
+ //So, do joins on the biggest to smallest lengths of baseParts.
+ for (j = baseParts.length; j > 0; j -= 1) {
+ mapValue = getOwn(map, baseParts.slice(0, j).join('/'));
+
+ //baseName segment has config, find if it has one for
+ //this name.
+ if (mapValue) {
+ mapValue = getOwn(mapValue, nameSegment);
+ if (mapValue) {
+ //Match, update name to the new value.
+ foundMap = mapValue;
+ foundI = i;
+ break;
+ }
+ }
+ }
+ }
+
+ if (foundMap) {
+ break;
+ }
+
+ //Check for a star map match, but just hold on to it,
+ //if there is a shorter segment match later in a matching
+ //config, then favor over this star map.
+ if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {
+ foundStarMap = getOwn(starMap, nameSegment);
+ starI = i;
+ }
+ }
+
+ if (!foundMap && foundStarMap) {
+ foundMap = foundStarMap;
+ foundI = starI;
+ }
+
+ if (foundMap) {
+ nameParts.splice(0, foundI, foundMap);
+ name = nameParts.join('/');
+ }
+ }
+
+ return name;
+ }
+
+ function removeScript(name) {
+ if (isBrowser) {
+ each(scripts(), function (scriptNode) {
+ if (scriptNode.getAttribute('data-requiremodule') === name &&
+ scriptNode.getAttribute('data-requirecontext') === context.contextName) {
+ scriptNode.parentNode.removeChild(scriptNode);
+ return true;
+ }
+ });
+ }
+ }
+
+ function hasPathFallback(id) {
+ var pathConfig = getOwn(config.paths, id);
+ if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
+ removeScript(id);
+ //Pop off the first array value, since it failed, and
+ //retry
+ pathConfig.shift();
+ context.require.undef(id);
+ context.require([id]);
+ return true;
+ }
+ }
+
+ //Turns a plugin!resource to [plugin, resource]
+ //with the plugin being undefined if the name
+ //did not have a plugin prefix.
+ function splitPrefix(name) {
+ var prefix,
+ index = name ? name.indexOf('!') : -1;
+ if (index > -1) {
+ prefix = name.substring(0, index);
+ name = name.substring(index + 1, name.length);
+ }
+ return [prefix, name];
+ }
+
+ /**
+ * Creates a module mapping that includes plugin prefix, module
+ * name, and path. If parentModuleMap is provided it will
+ * also normalize the name via require.normalize()
+ *
+ * @param {String} name the module name
+ * @param {String} [parentModuleMap] parent module map
+ * for the module name, used to resolve relative names.
+ * @param {Boolean} isNormalized: is the ID already normalized.
+ * This is true if this call is done for a define() module ID.
+ * @param {Boolean} applyMap: apply the map config to the ID.
+ * Should only be true if this map is for a dependency.
+ *
+ * @returns {Object}
+ */
+ function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
+ var url, pluginModule, suffix, nameParts,
+ prefix = null,
+ parentName = parentModuleMap ? parentModuleMap.name : null,
+ originalName = name,
+ isDefine = true,
+ normalizedName = '';
+
+ //If no name, then it means it is a require call, generate an
+ //internal name.
+ if (!name) {
+ isDefine = false;
+ name = '_@r' + (requireCounter += 1);
+ }
+
+ nameParts = splitPrefix(name);
+ prefix = nameParts[0];
+ name = nameParts[1];
+
+ if (prefix) {
+ prefix = normalize(prefix, parentName, applyMap);
+ pluginModule = getOwn(defined, prefix);
+ }
+
+ //Account for relative paths if there is a base name.
+ if (name) {
+ if (prefix) {
+ if (pluginModule && pluginModule.normalize) {
+ //Plugin is loaded, use its normalize method.
+ normalizedName = pluginModule.normalize(name, function (name) {
+ return normalize(name, parentName, applyMap);
+ });
+ } else {
+ normalizedName = normalize(name, parentName, applyMap);
+ }
+ } else {
+ //A regular module.
+ normalizedName = normalize(name, parentName, applyMap);
+
+ //Normalized name may be a plugin ID due to map config
+ //application in normalize. The map config values must
+ //already be normalized, so do not need to redo that part.
+ nameParts = splitPrefix(normalizedName);
+ prefix = nameParts[0];
+ normalizedName = nameParts[1];
+ isNormalized = true;
+
+ url = context.nameToUrl(normalizedName);
+ }
+ }
+
+ //If the id is a plugin id that cannot be determined if it needs
+ //normalization, stamp it with a unique ID so two matching relative
+ //ids that may conflict can be separate.
+ suffix = prefix && !pluginModule && !isNormalized ?
+ '_unnormalized' + (unnormalizedCounter += 1) :
+ '';
+
+ return {
+ prefix: prefix,
+ name: normalizedName,
+ parentMap: parentModuleMap,
+ unnormalized: !!suffix,
+ url: url,
+ originalName: originalName,
+ isDefine: isDefine,
+ id: (prefix ?
+ prefix + '!' + normalizedName :
+ normalizedName) + suffix
+ };
+ }
+
+ function getModule(depMap) {
+ var id = depMap.id,
+ mod = getOwn(registry, id);
+
+ if (!mod) {
+ mod = registry[id] = new context.Module(depMap);
+ }
+
+ return mod;
+ }
+
+ function on(depMap, name, fn) {
+ var id = depMap.id,
+ mod = getOwn(registry, id);
+
+ if (hasProp(defined, id) &&
+ (!mod || mod.defineEmitComplete)) {
+ if (name === 'defined') {
+ fn(defined[id]);
+ }
+ } else {
+ mod = getModule(depMap);
+ if (mod.error && name === 'error') {
+ fn(mod.error);
+ } else {
+ mod.on(name, fn);
+ }
+ }
+ }
+
+ function onError(err, errback) {
+ var ids = err.requireModules,
+ notified = false;
+
+ if (errback) {
+ errback(err);
+ } else {
+ each(ids, function (id) {
+ var mod = getOwn(registry, id);
+ if (mod) {
+ //Set error on module, so it skips timeout checks.
+ mod.error = err;
+ if (mod.events.error) {
+ notified = true;
+ mod.emit('error', err);
+ }
+ }
+ });
+
+ if (!notified) {
+ req.onError(err);
+ }
+ }
+ }
+
+ /**
+ * Internal method to transfer globalQueue items to this context's
+ * defQueue.
+ */
+ function takeGlobalQueue() {
+ //Push all the globalDefQueue items into the context's defQueue
+ if (globalDefQueue.length) {
+ //Array splice in the values since the context code has a
+ //local var ref to defQueue, so cannot just reassign the one
+ //on context.
+ apsp.apply(defQueue,
+ [defQueue.length - 1, 0].concat(globalDefQueue));
+ globalDefQueue = [];
+ }
+ }
+
+ handlers = {
+ 'require': function (mod) {
+ if (mod.require) {
+ return mod.require;
+ } else {
+ return (mod.require = context.makeRequire(mod.map));
+ }
+ },
+ 'exports': function (mod) {
+ mod.usingExports = true;
+ if (mod.map.isDefine) {
+ if (mod.exports) {
+ return mod.exports;
+ } else {
+ return (mod.exports = defined[mod.map.id] = {});
+ }
+ }
+ },
+ 'module': function (mod) {
+ if (mod.module) {
+ return mod.module;
+ } else {
+ return (mod.module = {
+ id: mod.map.id,
+ uri: mod.map.url,
+ config: function () {
+ var c,
+ pkg = getOwn(config.pkgs, mod.map.id);
+ // For packages, only support config targeted
+ // at the main module.
+ c = pkg ? getOwn(config.config, mod.map.id + '/' + pkg.main) :
+ getOwn(config.config, mod.map.id);
+ return c || {};
+ },
+ exports: defined[mod.map.id]
+ });
+ }
+ }
+ };
+
+ function cleanRegistry(id) {
+ //Clean up machinery used for waiting modules.
+ delete registry[id];
+ delete enabledRegistry[id];
+ }
+
+ function breakCycle(mod, traced, processed) {
+ var id = mod.map.id;
+
+ if (mod.error) {
+ mod.emit('error', mod.error);
+ } else {
+ traced[id] = true;
+ each(mod.depMaps, function (depMap, i) {
+ var depId = depMap.id,
+ dep = getOwn(registry, depId);
+
+ //Only force things that have not completed
+ //being defined, so still in the registry,
+ //and only if it has not been matched up
+ //in the module already.
+ if (dep && !mod.depMatched[i] && !processed[depId]) {
+ if (getOwn(traced, depId)) {
+ mod.defineDep(i, defined[depId]);
+ mod.check(); //pass false?
+ } else {
+ breakCycle(dep, traced, processed);
+ }
+ }
+ });
+ processed[id] = true;
+ }
+ }
+
+ function checkLoaded() {
+ var map, modId, err, usingPathFallback,
+ waitInterval = config.waitSeconds * 1000,
+ //It is possible to disable the wait interval by using waitSeconds of 0.
+ expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
+ noLoads = [],
+ reqCalls = [],
+ stillLoading = false,
+ needCycleCheck = true;
+
+ //Do not bother if this call was a result of a cycle break.
+ if (inCheckLoaded) {
+ return;
+ }
+
+ inCheckLoaded = true;
+
+ //Figure out the state of all the modules.
+ eachProp(enabledRegistry, function (mod) {
+ map = mod.map;
+ modId = map.id;
+
+ //Skip things that are not enabled or in error state.
+ if (!mod.enabled) {
+ return;
+ }
+
+ if (!map.isDefine) {
+ reqCalls.push(mod);
+ }
+
+ if (!mod.error) {
+ //If the module should be executed, and it has not
+ //been inited and time is up, remember it.
+ if (!mod.inited && expired) {
+ if (hasPathFallback(modId)) {
+ usingPathFallback = true;
+ stillLoading = true;
+ } else {
+ noLoads.push(modId);
+ removeScript(modId);
+ }
+ } else if (!mod.inited && mod.fetched && map.isDefine) {
+ stillLoading = true;
+ if (!map.prefix) {
+ //No reason to keep looking for unfinished
+ //loading. If the only stillLoading is a
+ //plugin resource though, keep going,
+ //because it may be that a plugin resource
+ //is waiting on a non-plugin cycle.
+ return (needCycleCheck = false);
+ }
+ }
+ }
+ });
+
+ if (expired && noLoads.length) {
+ //If wait time expired, throw error of unloaded modules.
+ err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);
+ err.contextName = context.contextName;
+ return onError(err);
+ }
+
+ //Not expired, check for a cycle.
+ if (needCycleCheck) {
+ each(reqCalls, function (mod) {
+ breakCycle(mod, {}, {});
+ });
+ }
+
+ //If still waiting on loads, and the waiting load is something
+ //other than a plugin resource, or there are still outstanding
+ //scripts, then just try back later.
+ if ((!expired || usingPathFallback) && stillLoading) {
+ //Something is still waiting to load. Wait for it, but only
+ //if a timeout is not already in effect.
+ if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
+ checkLoadedTimeoutId = setTimeout(function () {
+ checkLoadedTimeoutId = 0;
+ checkLoaded();
+ }, 50);
+ }
+ }
+
+ inCheckLoaded = false;
+ }
+
+ Module = function (map) {
+ this.events = getOwn(undefEvents, map.id) || {};
+ this.map = map;
+ this.shim = getOwn(config.shim, map.id);
+ this.depExports = [];
+ this.depMaps = [];
+ this.depMatched = [];
+ this.pluginMaps = {};
+ this.depCount = 0;
+
+ /* this.exports this.factory
+ this.depMaps = [],
+ this.enabled, this.fetched
+ */
+ };
+
+ Module.prototype = {
+ init: function (depMaps, factory, errback, options) {
+ options = options || {};
+
+ //Do not do more inits if already done. Can happen if there
+ //are multiple define calls for the same module. That is not
+ //a normal, common case, but it is also not unexpected.
+ if (this.inited) {
+ return;
+ }
+
+ this.factory = factory;
+
+ if (errback) {
+ //Register for errors on this module.
+ this.on('error', errback);
+ } else if (this.events.error) {
+ //If no errback already, but there are error listeners
+ //on this module, set up an errback to pass to the deps.
+ errback = bind(this, function (err) {
+ this.emit('error', err);
+ });
+ }
+
+ //Do a copy of the dependency array, so that
+ //source inputs are not modified. For example
+ //"shim" deps are passed in here directly, and
+ //doing a direct modification of the depMaps array
+ //would affect that config.
+ this.depMaps = depMaps && depMaps.slice(0);
+
+ this.errback = errback;
+
+ //Indicate this module has be initialized
+ this.inited = true;
+
+ this.ignore = options.ignore;
+
+ //Could have option to init this module in enabled mode,
+ //or could have been previously marked as enabled. However,
+ //the dependencies are not known until init is called. So
+ //if enabled previously, now trigger dependencies as enabled.
+ if (options.enabled || this.enabled) {
+ //Enable this module and dependencies.
+ //Will call this.check()
+ this.enable();
+ } else {
+ this.check();
+ }
+ },
+
+ defineDep: function (i, depExports) {
+ //Because of cycles, defined callback for a given
+ //export can be called more than once.
+ if (!this.depMatched[i]) {
+ this.depMatched[i] = true;
+ this.depCount -= 1;
+ this.depExports[i] = depExports;
+ }
+ },
+
+ fetch: function () {
+ if (this.fetched) {
+ return;
+ }
+ this.fetched = true;
+
+ context.startTime = (new Date()).getTime();
+
+ var map = this.map;
+
+ //If the manager is for a plugin managed resource,
+ //ask the plugin to load it now.
+ if (this.shim) {
+ context.makeRequire(this.map, {
+ enableBuildCallback: true
+ })(this.shim.deps || [], bind(this, function () {
+ return map.prefix ? this.callPlugin() : this.load();
+ }));
+ } else {
+ //Regular dependency.
+ return map.prefix ? this.callPlugin() : this.load();
+ }
+ },
+
+ load: function () {
+ var url = this.map.url;
+
+ //Regular dependency.
+ if (!urlFetched[url]) {
+ urlFetched[url] = true;
+ context.load(this.map.id, url);
+ }
+ },
+
+ /**
+ * Checks if the module is ready to define itself, and if so,
+ * define it.
+ */
+ check: function () {
+ if (!this.enabled || this.enabling) {
+ return;
+ }
+
+ var err, cjsModule,
+ id = this.map.id,
+ depExports = this.depExports,
+ exports = this.exports,
+ factory = this.factory;
+
+ if (!this.inited) {
+ this.fetch();
+ } else if (this.error) {
+ this.emit('error', this.error);
+ } else if (!this.defining) {
+ //The factory could trigger another require call
+ //that would result in checking this module to
+ //define itself again. If already in the process
+ //of doing that, skip this work.
+ this.defining = true;
+
+ if (this.depCount < 1 && !this.defined) {
+ if (isFunction(factory)) {
+ //If there is an error listener, favor passing
+ //to that instead of throwing an error. However,
+ //only do it for define()'d modules. require
+ //errbacks should not be called for failures in
+ //their callbacks (#699). However if a global
+ //onError is set, use that.
+ if ((this.events.error && this.map.isDefine) ||
+ req.onError !== defaultOnError) {
+ try {
+ exports = context.execCb(id, factory, depExports, exports);
+ } catch (e) {
+ err = e;
+ }
+ } else {
+ exports = context.execCb(id, factory, depExports, exports);
+ }
+
+ if (this.map.isDefine) {
+ //If setting exports via 'module' is in play,
+ //favor that over return value and exports. After that,
+ //favor a non-undefined return value over exports use.
+ cjsModule = this.module;
+ if (cjsModule &&
+ cjsModule.exports !== undefined &&
+ //Make sure it is not already the exports value
+ cjsModule.exports !== this.exports) {
+ exports = cjsModule.exports;
+ } else if (exports === undefined && this.usingExports) {
+ //exports already set the defined value.
+ exports = this.exports;
+ }
+ }
+
+ if (err) {
+ err.requireMap = this.map;
+ err.requireModules = this.map.isDefine ? [this.map.id] : null;
+ err.requireType = this.map.isDefine ? 'define' : 'require';
+ return onError((this.error = err));
+ }
+
+ } else {
+ //Just a literal value
+ exports = factory;
+ }
+
+ this.exports = exports;
+
+ if (this.map.isDefine && !this.ignore) {
+ defined[id] = exports;
+
+ if (req.onResourceLoad) {
+ req.onResourceLoad(context, this.map, this.depMaps);
+ }
+ }
+
+ //Clean up
+ cleanRegistry(id);
+
+ this.defined = true;
+ }
+
+ //Finished the define stage. Allow calling check again
+ //to allow define notifications below in the case of a
+ //cycle.
+ this.defining = false;
+
+ if (this.defined && !this.defineEmitted) {
+ this.defineEmitted = true;
+ this.emit('defined', this.exports);
+ this.defineEmitComplete = true;
+ }
+
+ }
+ },
+
+ callPlugin: function () {
+ var map = this.map,
+ id = map.id,
+ //Map already normalized the prefix.
+ pluginMap = makeModuleMap(map.prefix);
+
+ //Mark this as a dependency for this plugin, so it
+ //can be traced for cycles.
+ this.depMaps.push(pluginMap);
+
+ on(pluginMap, 'defined', bind(this, function (plugin) {
+ var load, normalizedMap, normalizedMod,
+ name = this.map.name,
+ parentName = this.map.parentMap ? this.map.parentMap.name : null,
+ localRequire = context.makeRequire(map.parentMap, {
+ enableBuildCallback: true
+ });
+
+ //If current map is not normalized, wait for that
+ //normalized name to load instead of continuing.
+ if (this.map.unnormalized) {
+ //Normalize the ID if the plugin allows it.
+ if (plugin.normalize) {
+ name = plugin.normalize(name, function (name) {
+ return normalize(name, parentName, true);
+ }) || '';
+ }
+
+ //prefix and name should already be normalized, no need
+ //for applying map config again either.
+ normalizedMap = makeModuleMap(map.prefix + '!' + name,
+ this.map.parentMap);
+ on(normalizedMap,
+ 'defined', bind(this, function (value) {
+ this.init([], function () { return value; }, null, {
+ enabled: true,
+ ignore: true
+ });
+ }));
+
+ normalizedMod = getOwn(registry, normalizedMap.id);
+ if (normalizedMod) {
+ //Mark this as a dependency for this plugin, so it
+ //can be traced for cycles.
+ this.depMaps.push(normalizedMap);
+
+ if (this.events.error) {
+ normalizedMod.on('error', bind(this, function (err) {
+ this.emit('error', err);
+ }));
+ }
+ normalizedMod.enable();
+ }
+
+ return;
+ }
+
+ load = bind(this, function (value) {
+ this.init([], function () { return value; }, null, {
+ enabled: true
+ });
+ });
+
+ load.error = bind(this, function (err) {
+ this.inited = true;
+ this.error = err;
+ err.requireModules = [id];
+
+ //Remove temp unnormalized modules for this module,
+ //since they will never be resolved otherwise now.
+ eachProp(registry, function (mod) {
+ if (mod.map.id.indexOf(id + '_unnormalized') === 0) {
+ cleanRegistry(mod.map.id);
+ }
+ });
+
+ onError(err);
+ });
+
+ //Allow plugins to load other code without having to know the
+ //context or how to 'complete' the load.
+ load.fromText = bind(this, function (text, textAlt) {
+ /*jslint evil: true */
+ var moduleName = map.name,
+ moduleMap = makeModuleMap(moduleName),
+ hasInteractive = useInteractive;
+
+ //As of 2.1.0, support just passing the text, to reinforce
+ //fromText only being called once per resource. Still
+ //support old style of passing moduleName but discard
+ //that moduleName in favor of the internal ref.
+ if (textAlt) {
+ text = textAlt;
+ }
+
+ //Turn off interactive script matching for IE for any define
+ //calls in the text, then turn it back on at the end.
+ if (hasInteractive) {
+ useInteractive = false;
+ }
+
+ //Prime the system by creating a module instance for
+ //it.
+ getModule(moduleMap);
+
+ //Transfer any config to this other module.
+ if (hasProp(config.config, id)) {
+ config.config[moduleName] = config.config[id];
+ }
+
+ try {
+ req.exec(text);
+ } catch (e) {
+ return onError(makeError('fromtexteval',
+ 'fromText eval for ' + id +
+ ' failed: ' + e,
+ e,
+ [id]));
+ }
+
+ if (hasInteractive) {
+ useInteractive = true;
+ }
+
+ //Mark this as a dependency for the plugin
+ //resource
+ this.depMaps.push(moduleMap);
+
+ //Support anonymous modules.
+ context.completeLoad(moduleName);
+
+ //Bind the value of that module to the value for this
+ //resource ID.
+ localRequire([moduleName], load);
+ });
+
+ //Use parentName here since the plugin's name is not reliable,
+ //could be some weird string with no path that actually wants to
+ //reference the parentName's path.
+ plugin.load(map.name, localRequire, load, config);
+ }));
+
+ context.enable(pluginMap, this);
+ this.pluginMaps[pluginMap.id] = pluginMap;
+ },
+
+ enable: function () {
+ enabledRegistry[this.map.id] = this;
+ this.enabled = true;
+
+ //Set flag mentioning that the module is enabling,
+ //so that immediate calls to the defined callbacks
+ //for dependencies do not trigger inadvertent load
+ //with the depCount still being zero.
+ this.enabling = true;
+
+ //Enable each dependency
+ each(this.depMaps, bind(this, function (depMap, i) {
+ var id, mod, handler;
+
+ if (typeof depMap === 'string') {
+ //Dependency needs to be converted to a depMap
+ //and wired up to this module.
+ depMap = makeModuleMap(depMap,
+ (this.map.isDefine ? this.map : this.map.parentMap),
+ false,
+ !this.skipMap);
+ this.depMaps[i] = depMap;
+
+ handler = getOwn(handlers, depMap.id);
+
+ if (handler) {
+ this.depExports[i] = handler(this);
+ return;
+ }
+
+ this.depCount += 1;
+
+ on(depMap, 'defined', bind(this, function (depExports) {
+ this.defineDep(i, depExports);
+ this.check();
+ }));
+
+ if (this.errback) {
+ on(depMap, 'error', bind(this, this.errback));
+ }
+ }
+
+ id = depMap.id;
+ mod = registry[id];
+
+ //Skip special modules like 'require', 'exports', 'module'
+ //Also, don't call enable if it is already enabled,
+ //important in circular dependency cases.
+ if (!hasProp(handlers, id) && mod && !mod.enabled) {
+ context.enable(depMap, this);
+ }
+ }));
+
+ //Enable each plugin that is used in
+ //a dependency
+ eachProp(this.pluginMaps, bind(this, function (pluginMap) {
+ var mod = getOwn(registry, pluginMap.id);
+ if (mod && !mod.enabled) {
+ context.enable(pluginMap, this);
+ }
+ }));
+
+ this.enabling = false;
+
+ this.check();
+ },
+
+ on: function (name, cb) {
+ var cbs = this.events[name];
+ if (!cbs) {
+ cbs = this.events[name] = [];
+ }
+ cbs.push(cb);
+ },
+
+ emit: function (name, evt) {
+ each(this.events[name], function (cb) {
+ cb(evt);
+ });
+ if (name === 'error') {
+ //Now that the error handler was triggered, remove
+ //the listeners, since this broken Module instance
+ //can stay around for a while in the registry.
+ delete this.events[name];
+ }
+ }
+ };
+
+ function callGetModule(args) {
+ //Skip modules already defined.
+ if (!hasProp(defined, args[0])) {
+ getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
+ }
+ }
+
+ function removeListener(node, func, name, ieName) {
+ //Favor detachEvent because of IE9
+ //issue, see attachEvent/addEventListener comment elsewhere
+ //in this file.
+ if (node.detachEvent && !isOpera) {
+ //Probably IE. If not it will throw an error, which will be
+ //useful to know.
+ if (ieName) {
+ node.detachEvent(ieName, func);
+ }
+ } else {
+ node.removeEventListener(name, func, false);
+ }
+ }
+
+ /**
+ * Given an event from a script node, get the requirejs info from it,
+ * and then removes the event listeners on the node.
+ * @param {Event} evt
+ * @returns {Object}
+ */
+ function getScriptData(evt) {
+ //Using currentTarget instead of target for Firefox 2.0's sake. Not
+ //all old browsers will be supported, but this one was easy enough
+ //to support and still makes sense.
+ var node = evt.currentTarget || evt.srcElement;
+
+ //Remove the listeners once here.
+ removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
+ removeListener(node, context.onScriptError, 'error');
+
+ return {
+ node: node,
+ id: node && node.getAttribute('data-requiremodule')
+ };
+ }
+
+ function intakeDefines() {
+ var args;
+
+ //Any defined modules in the global queue, intake them now.
+ takeGlobalQueue();
+
+ //Make sure any remaining defQueue items get properly processed.
+ while (defQueue.length) {
+ args = defQueue.shift();
+ if (args[0] === null) {
+ return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));
+ } else {
+ //args are id, deps, factory. Should be normalized by the
+ //define() function.
+ callGetModule(args);
+ }
+ }
+ }
+
+ context = {
+ config: config,
+ contextName: contextName,
+ registry: registry,
+ defined: defined,
+ urlFetched: urlFetched,
+ defQueue: defQueue,
+ Module: Module,
+ makeModuleMap: makeModuleMap,
+ nextTick: req.nextTick,
+ onError: onError,
+
+ /**
+ * Set a configuration for the context.
+ * @param {Object} cfg config object to integrate.
+ */
+ configure: function (cfg) {
+ //Make sure the baseUrl ends in a slash.
+ if (cfg.baseUrl) {
+ if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
+ cfg.baseUrl += '/';
+ }
+ }
+
+ //Save off the paths and packages since they require special processing,
+ //they are additive.
+ var pkgs = config.pkgs,
+ shim = config.shim,
+ objs = {
+ paths: true,
+ config: true,
+ map: true
+ };
+
+ eachProp(cfg, function (value, prop) {
+ if (objs[prop]) {
+ if (prop === 'map') {
+ if (!config.map) {
+ config.map = {};
+ }
+ mixin(config[prop], value, true, true);
+ } else {
+ mixin(config[prop], value, true);
+ }
+ } else {
+ config[prop] = value;
+ }
+ });
+
+ //Merge shim
+ if (cfg.shim) {
+ eachProp(cfg.shim, function (value, id) {
+ //Normalize the structure
+ if (isArray(value)) {
+ value = {
+ deps: value
+ };
+ }
+ if ((value.exports || value.init) && !value.exportsFn) {
+ value.exportsFn = context.makeShimExports(value);
+ }
+ shim[id] = value;
+ });
+ config.shim = shim;
+ }
+
+ //Adjust packages if necessary.
+ if (cfg.packages) {
+ each(cfg.packages, function (pkgObj) {
+ var location;
+
+ pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj;
+ location = pkgObj.location;
+
+ //Create a brand new object on pkgs, since currentPackages can
+ //be passed in again, and config.pkgs is the internal transformed
+ //state for all package configs.
+ pkgs[pkgObj.name] = {
+ name: pkgObj.name,
+ location: location || pkgObj.name,
+ //Remove leading dot in main, so main paths are normalized,
+ //and remove any trailing .js, since different package
+ //envs have different conventions: some use a module name,
+ //some use a file name.
+ main: (pkgObj.main || 'main')
+ .replace(currDirRegExp, '')
+ .replace(jsSuffixRegExp, '')
+ };
+ });
+
+ //Done with modifications, assing packages back to context config
+ config.pkgs = pkgs;
+ }
+
+ //If there are any "waiting to execute" modules in the registry,
+ //update the maps for them, since their info, like URLs to load,
+ //may have changed.
+ eachProp(registry, function (mod, id) {
+ //If module already has init called, since it is too
+ //late to modify them, and ignore unnormalized ones
+ //since they are transient.
+ if (!mod.inited && !mod.map.unnormalized) {
+ mod.map = makeModuleMap(id);
+ }
+ });
+
+ //If a deps array or a config callback is specified, then call
+ //require with those args. This is useful when require is defined as a
+ //config object before require.js is loaded.
+ if (cfg.deps || cfg.callback) {
+ context.require(cfg.deps || [], cfg.callback);
+ }
+ },
+
+ makeShimExports: function (value) {
+ function fn() {
+ var ret;
+ if (value.init) {
+ ret = value.init.apply(global, arguments);
+ }
+ return ret || (value.exports && getGlobal(value.exports));
+ }
+ return fn;
+ },
+
+ makeRequire: function (relMap, options) {
+ options = options || {};
+
+ function localRequire(deps, callback, errback) {
+ var id, map, requireMod;
+
+ if (options.enableBuildCallback && callback && isFunction(callback)) {
+ callback.__requireJsBuild = true;
+ }
+
+ if (typeof deps === 'string') {
+ if (isFunction(callback)) {
+ //Invalid call
+ return onError(makeError('requireargs', 'Invalid require call'), errback);
+ }
+
+ //If require|exports|module are requested, get the
+ //value for them from the special handlers. Caveat:
+ //this only works while module is being defined.
+ if (relMap && hasProp(handlers, deps)) {
+ return handlers[deps](registry[relMap.id]);
+ }
+
+ //Synchronous access to one module. If require.get is
+ //available (as in the Node adapter), prefer that.
+ if (req.get) {
+ return req.get(context, deps, relMap, localRequire);
+ }
+
+ //Normalize module name, if it contains . or ..
+ map = makeModuleMap(deps, relMap, false, true);
+ id = map.id;
+
+ if (!hasProp(defined, id)) {
+ return onError(makeError('notloaded', 'Module name "' +
+ id +
+ '" has not been loaded yet for context: ' +
+ contextName +
+ (relMap ? '' : '. Use require([])')));
+ }
+ return defined[id];
+ }
+
+ //Grab defines waiting in the global queue.
+ intakeDefines();
+
+ //Mark all the dependencies as needing to be loaded.
+ context.nextTick(function () {
+ //Some defines could have been added since the
+ //require call, collect them.
+ intakeDefines();
+
+ requireMod = getModule(makeModuleMap(null, relMap));
+
+ //Store if map config should be applied to this require
+ //call for dependencies.
+ requireMod.skipMap = options.skipMap;
+
+ requireMod.init(deps, callback, errback, {
+ enabled: true
+ });
+
+ checkLoaded();
+ });
+
+ return localRequire;
+ }
+
+ mixin(localRequire, {
+ isBrowser: isBrowser,
+
+ /**
+ * Converts a module name + .extension into an URL path.
+ * *Requires* the use of a module name. It does not support using
+ * plain URLs like nameToUrl.
+ */
+ toUrl: function (moduleNamePlusExt) {
+ var ext,
+ index = moduleNamePlusExt.lastIndexOf('.'),
+ segment = moduleNamePlusExt.split('/')[0],
+ isRelative = segment === '.' || segment === '..';
+
+ //Have a file extension alias, and it is not the
+ //dots from a relative path.
+ if (index !== -1 && (!isRelative || index > 1)) {
+ ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
+ moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
+ }
+
+ return context.nameToUrl(normalize(moduleNamePlusExt,
+ relMap && relMap.id, true), ext, true);
+ },
+
+ defined: function (id) {
+ return hasProp(defined, makeModuleMap(id, relMap, false, true).id);
+ },
+
+ specified: function (id) {
+ id = makeModuleMap(id, relMap, false, true).id;
+ return hasProp(defined, id) || hasProp(registry, id);
+ }
+ });
+
+ //Only allow undef on top level require calls
+ if (!relMap) {
+ localRequire.undef = function (id) {
+ //Bind any waiting define() calls to this context,
+ //fix for #408
+ takeGlobalQueue();
+
+ var map = makeModuleMap(id, relMap, true),
+ mod = getOwn(registry, id);
+
+ delete defined[id];
+ delete urlFetched[map.url];
+ delete undefEvents[id];
+
+ if (mod) {
+ //Hold on to listeners in case the
+ //module will be attempted to be reloaded
+ //using a different config.
+ if (mod.events.defined) {
+ undefEvents[id] = mod.events;
+ }
+
+ cleanRegistry(id);
+ }
+ };
+ }
+
+ return localRequire;
+ },
+
+ /**
+ * Called to enable a module if it is still in the registry
+ * awaiting enablement. A second arg, parent, the parent module,
+ * is passed in for context, when this method is overriden by
+ * the optimizer. Not shown here to keep code compact.
+ */
+ enable: function (depMap) {
+ var mod = getOwn(registry, depMap.id);
+ if (mod) {
+ getModule(depMap).enable();
+ }
+ },
+
+ /**
+ * Internal method used by environment adapters to complete a load event.
+ * A load event could be a script load or just a load pass from a synchronous
+ * load call.
+ * @param {String} moduleName the name of the module to potentially complete.
+ */
+ completeLoad: function (moduleName) {
+ var found, args, mod,
+ shim = getOwn(config.shim, moduleName) || {},
+ shExports = shim.exports;
+
+ takeGlobalQueue();
+
+ while (defQueue.length) {
+ args = defQueue.shift();
+ if (args[0] === null) {
+ args[0] = moduleName;
+ //If already found an anonymous module and bound it
+ //to this name, then this is some other anon module
+ //waiting for its completeLoad to fire.
+ if (found) {
+ break;
+ }
+ found = true;
+ } else if (args[0] === moduleName) {
+ //Found matching define call for this script!
+ found = true;
+ }
+
+ callGetModule(args);
+ }
+
+ //Do this after the cycle of callGetModule in case the result
+ //of those calls/init calls changes the registry.
+ mod = getOwn(registry, moduleName);
+
+ if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {
+ if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
+ if (hasPathFallback(moduleName)) {
+ return;
+ } else {
+ return onError(makeError('nodefine',
+ 'No define call for ' + moduleName,
+ null,
+ [moduleName]));
+ }
+ } else {
+ //A script that does not call define(), so just simulate
+ //the call for it.
+ callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);
+ }
+ }
+
+ checkLoaded();
+ },
+
+ /**
+ * Converts a module name to a file path. Supports cases where
+ * moduleName may actually be just an URL.
+ * Note that it **does not** call normalize on the moduleName,
+ * it is assumed to have already been normalized. This is an
+ * internal API, not a public one. Use toUrl for the public API.
+ */
+ nameToUrl: function (moduleName, ext, skipExt) {
+ var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url,
+ parentPath;
+
+ //If a colon is in the URL, it indicates a protocol is used and it is just
+ //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
+ //or ends with .js, then assume the user meant to use an url and not a module id.
+ //The slash is important for protocol-less URLs as well as full paths.
+ if (req.jsExtRegExp.test(moduleName)) {
+ //Just a plain path, not module name lookup, so just return it.
+ //Add extension if it is included. This is a bit wonky, only non-.js things pass
+ //an extension, this method probably needs to be reworked.
+ url = moduleName + (ext || '');
+ } else {
+ //A module that needs to be converted to a path.
+ paths = config.paths;
+ pkgs = config.pkgs;
+
+ syms = moduleName.split('/');
+ //For each module name segment, see if there is a path
+ //registered for it. Start with most specific name
+ //and work up from it.
+ for (i = syms.length; i > 0; i -= 1) {
+ parentModule = syms.slice(0, i).join('/');
+ pkg = getOwn(pkgs, parentModule);
+ parentPath = getOwn(paths, parentModule);
+ if (parentPath) {
+ //If an array, it means there are a few choices,
+ //Choose the one that is desired
+ if (isArray(parentPath)) {
+ parentPath = parentPath[0];
+ }
+ syms.splice(0, i, parentPath);
+ break;
+ } else if (pkg) {
+ //If module name is just the package name, then looking
+ //for the main module.
+ if (moduleName === pkg.name) {
+ pkgPath = pkg.location + '/' + pkg.main;
+ } else {
+ pkgPath = pkg.location;
+ }
+ syms.splice(0, i, pkgPath);
+ break;
+ }
+ }
+
+ //Join the path parts together, then figure out if baseUrl is needed.
+ url = syms.join('/');
+ url += (ext || (/\?/.test(url) || skipExt ? '' : '.js'));
+ url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
+ }
+
+ return config.urlArgs ? url +
+ ((url.indexOf('?') === -1 ? '?' : '&') +
+ config.urlArgs) : url;
+ },
+
+ //Delegates to req.load. Broken out as a separate function to
+ //allow overriding in the optimizer.
+ load: function (id, url) {
+ req.load(context, id, url);
+ },
+
+ /**
+ * Executes a module callback function. Broken out as a separate function
+ * solely to allow the build system to sequence the files in the built
+ * layer in the right sequence.
+ *
+ * @private
+ */
+ execCb: function (name, callback, args, exports) {
+ return callback.apply(exports, args);
+ },
+
+ /**
+ * callback for script loads, used to check status of loading.
+ *
+ * @param {Event} evt the event from the browser for the script
+ * that was loaded.
+ */
+ onScriptLoad: function (evt) {
+ //Using currentTarget instead of target for Firefox 2.0's sake. Not
+ //all old browsers will be supported, but this one was easy enough
+ //to support and still makes sense.
+ if (evt.type === 'load' ||
+ (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {
+ //Reset interactive script so a script node is not held onto for
+ //to long.
+ interactiveScript = null;
+
+ //Pull out the name of the module and the context.
+ var data = getScriptData(evt);
+ context.completeLoad(data.id);
+ }
+ },
+
+ /**
+ * Callback for script errors.
+ */
+ onScriptError: function (evt) {
+ var data = getScriptData(evt);
+ if (!hasPathFallback(data.id)) {
+ return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
+ }
+ }
+ };
+
+ context.require = context.makeRequire();
+ return context;
+ }
+
+ /**
+ * Main entry point.
+ *
+ * If the only argument to require is a string, then the module that
+ * is represented by that string is fetched for the appropriate context.
+ *
+ * If the first argument is an array, then it will be treated as an array
+ * of dependency string names to fetch. An optional function callback can
+ * be specified to execute when all of those dependencies are available.
+ *
+ * Make a local req variable to help Caja compliance (it assumes things
+ * on a require that are not standardized), and to give a short
+ * name for minification/local scope use.
+ */
+ req = requirejs = function (deps, callback, errback, optional) {
+
+ //Find the right context, use default
+ var context, config,
+ contextName = defContextName;
+
+ // Determine if have config object in the call.
+ if (!isArray(deps) && typeof deps !== 'string') {
+ // deps is a config object
+ config = deps;
+ if (isArray(callback)) {
+ // Adjust args if there are dependencies
+ deps = callback;
+ callback = errback;
+ errback = optional;
+ } else {
+ deps = [];
+ }
+ }
+
+ if (config && config.context) {
+ contextName = config.context;
+ }
+
+ context = getOwn(contexts, contextName);
+ if (!context) {
+ context = contexts[contextName] = req.s.newContext(contextName);
+ }
+
+ if (config) {
+ context.configure(config);
+ }
+
+ return context.require(deps, callback, errback);
+ };
+
+ /**
+ * Support require.config() to make it easier to cooperate with other
+ * AMD loaders on globally agreed names.
+ */
+ req.config = function (config) {
+ return req(config);
+ };
+
+ /**
+ * Execute something after the current tick
+ * of the event loop. Override for other envs
+ * that have a better solution than setTimeout.
+ * @param {Function} fn function to execute later.
+ */
+ req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {
+ setTimeout(fn, 4);
+ } : function (fn) { fn(); };
+
+ /**
+ * Export require as a global, but only if it does not already exist.
+ */
+ if (!require) {
+ require = req;
+ }
+
+ req.version = version;
+
+ //Used to filter out dependencies that are already paths.
+ req.jsExtRegExp = /^\/|:|\?|\.js$/;
+ req.isBrowser = isBrowser;
+ s = req.s = {
+ contexts: contexts,
+ newContext: newContext
+ };
+
+ //Create default context.
+ req({});
+
+ //Exports some context-sensitive methods on global require.
+ each([
+ 'toUrl',
+ 'undef',
+ 'defined',
+ 'specified'
+ ], function (prop) {
+ //Reference from contexts instead of early binding to default context,
+ //so that during builds, the latest instance of the default context
+ //with its config gets used.
+ req[prop] = function () {
+ var ctx = contexts[defContextName];
+ return ctx.require[prop].apply(ctx, arguments);
+ };
+ });
+
+ if (isBrowser) {
+ head = s.head = document.getElementsByTagName('head')[0];
+ //If BASE tag is in play, using appendChild is a problem for IE6.
+ //When that browser dies, this can be removed. Details in this jQuery bug:
+ //http://dev.jquery.com/ticket/2709
+ baseElement = document.getElementsByTagName('base')[0];
+ if (baseElement) {
+ head = s.head = baseElement.parentNode;
+ }
+ }
+
+ /**
+ * Any errors that require explicitly generates will be passed to this
+ * function. Intercept/override it if you want custom error handling.
+ * @param {Error} err the error object.
+ */
+ req.onError = defaultOnError;
+
+ /**
+ * Creates the node for the load command. Only used in browser envs.
+ */
+ req.createNode = function (config, moduleName, url) {
+ var node = config.xhtml ?
+ document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
+ document.createElement('script');
+ node.type = config.scriptType || 'text/javascript';
+ node.charset = 'utf-8';
+ node.async = true;
+ return node;
+ };
+
+ /**
+ * Does the request to load a module for the browser case.
+ * Make this a separate function to allow other environments
+ * to override it.
+ *
+ * @param {Object} context the require context to find state.
+ * @param {String} moduleName the name of the module.
+ * @param {Object} url the URL to the module.
+ */
+ req.load = function (context, moduleName, url) {
+ var config = (context && context.config) || {},
+ node;
+ if (isBrowser) {
+ //In the browser so use a script tag
+ node = req.createNode(config, moduleName, url);
+
+ node.setAttribute('data-requirecontext', context.contextName);
+ node.setAttribute('data-requiremodule', moduleName);
+
+ //Set up load listener. Test attachEvent first because IE9 has
+ //a subtle issue in its addEventListener and script onload firings
+ //that do not match the behavior of all other browsers with
+ //addEventListener support, which fire the onload event for a
+ //script right after the script execution. See:
+ //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution
+ //UNFORTUNATELY Opera implements attachEvent but does not follow the script
+ //script execution mode.
+ if (node.attachEvent &&
+ //Check if node.attachEvent is artificially added by custom script or
+ //natively supported by browser
+ //read https://github.com/jrburke/requirejs/issues/187
+ //if we can NOT find [native code] then it must NOT natively supported.
+ //in IE8, node.attachEvent does not have toString()
+ //Note the test for "[native code" with no closing brace, see:
+ //https://github.com/jrburke/requirejs/issues/273
+ !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&
+ !isOpera) {
+ //Probably IE. IE (at least 6-8) do not fire
+ //script onload right after executing the script, so
+ //we cannot tie the anonymous define call to a name.
+ //However, IE reports the script as being in 'interactive'
+ //readyState at the time of the define call.
+ useInteractive = true;
+
+ node.attachEvent('onreadystatechange', context.onScriptLoad);
+ //It would be great to add an error handler here to catch
+ //404s in IE9+. However, onreadystatechange will fire before
+ //the error handler, so that does not help. If addEventListener
+ //is used, then IE will fire error before load, but we cannot
+ //use that pathway given the connect.microsoft.com issue
+ //mentioned above about not doing the 'script execute,
+ //then fire the script load event listener before execute
+ //next script' that other browsers do.
+ //Best hope: IE10 fixes the issues,
+ //and then destroys all installs of IE 6-9.
+ //node.attachEvent('onerror', context.onScriptError);
+ } else {
+ node.addEventListener('load', context.onScriptLoad, false);
+ node.addEventListener('error', context.onScriptError, false);
+ }
+ node.src = url;
+
+ //For some cache cases in IE 6-8, the script executes before the end
+ //of the appendChild execution, so to tie an anonymous define
+ //call to the module name (which is stored on the node), hold on
+ //to a reference to this node, but clear after the DOM insertion.
+ currentlyAddingScript = node;
+ if (baseElement) {
+ head.insertBefore(node, baseElement);
+ } else {
+ head.appendChild(node);
+ }
+ currentlyAddingScript = null;
+
+ return node;
+ } else if (isWebWorker) {
+ try {
+ //In a web worker, use importScripts. This is not a very
+ //efficient use of importScripts, importScripts will block until
+ //its script is downloaded and evaluated. However, if web workers
+ //are in play, the expectation that a build has been done so that
+ //only one script needs to be loaded anyway. This may need to be
+ //reevaluated if other use cases become common.
+ importScripts(url);
+
+ //Account for anonymous modules
+ context.completeLoad(moduleName);
+ } catch (e) {
+ context.onError(makeError('importscripts',
+ 'importScripts failed for ' +
+ moduleName + ' at ' + url,
+ e,
+ [moduleName]));
+ }
+ }
+ };
+
+ function getInteractiveScript() {
+ if (interactiveScript && interactiveScript.readyState === 'interactive') {
+ return interactiveScript;
+ }
+
+ eachReverse(scripts(), function (script) {
+ if (script.readyState === 'interactive') {
+ return (interactiveScript = script);
+ }
+ });
+ return interactiveScript;
+ }
+
+ //Look for a data-main script attribute, which could also adjust the baseUrl.
+ if (isBrowser) {
+ //Figure out baseUrl. Get it from the script tag with require.js in it.
+ eachReverse(scripts(), function (script) {
+ //Set the 'head' where we can append children by
+ //using the script's parent.
+ if (!head) {
+ head = script.parentNode;
+ }
+
+ //Look for a data-main attribute to set main script for the page
+ //to load. If it is there, the path to data main becomes the
+ //baseUrl, if it is not already set.
+ dataMain = script.getAttribute('data-main');
+ if (dataMain) {
+ //Preserve dataMain in case it is a path (i.e. contains '?')
+ mainScript = dataMain;
+
+ //Set final baseUrl if there is not already an explicit one.
+ if (!cfg.baseUrl) {
+ //Pull off the directory of data-main for use as the
+ //baseUrl.
+ src = mainScript.split('/');
+ mainScript = src.pop();
+ subPath = src.length ? src.join('/') + '/' : './';
+
+ cfg.baseUrl = subPath;
+ }
+
+ //Strip off any trailing .js since mainScript is now
+ //like a module name.
+ mainScript = mainScript.replace(jsSuffixRegExp, '');
+
+ //If mainScript is still a path, fall back to dataMain
+ if (req.jsExtRegExp.test(mainScript)) {
+ mainScript = dataMain;
+ }
+
+ //Put the data-main script in the files to load.
+ cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];
+
+ return true;
+ }
+ });
+ }
+
+ /**
+ * The function that handles definitions of modules. Differs from
+ * require() in that a string for the module should be the first argument,
+ * and the function to execute after dependencies are loaded should
+ * return a value to define the module corresponding to the first argument's
+ * name.
+ */
+ define = function (name, deps, callback) {
+ var node, context;
+
+ //Allow for anonymous modules
+ if (typeof name !== 'string') {
+ //Adjust args appropriately
+ callback = deps;
+ deps = name;
+ name = null;
+ }
+
+ //This module may not have dependencies
+ if (!isArray(deps)) {
+ callback = deps;
+ deps = null;
+ }
+
+ //If no name, and callback is a function, then figure out if it a
+ //CommonJS thing with dependencies.
+ if (!deps && isFunction(callback)) {
+ deps = [];
+ //Remove comments from the callback string,
+ //look for require calls, and pull them into the dependencies,
+ //but only if there are function args.
+ if (callback.length) {
+ callback
+ .toString()
+ .replace(commentRegExp, '')
+ .replace(cjsRequireRegExp, function (match, dep) {
+ deps.push(dep);
+ });
+
+ //May be a CommonJS thing even without require calls, but still
+ //could use exports, and module. Avoid doing exports and module
+ //work though if it just needs require.
+ //REQUIRES the function to expect the CommonJS variables in the
+ //order listed below.
+ deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);
+ }
+ }
+
+ //If in IE 6-8 and hit an anonymous define() call, do the interactive
+ //work.
+ if (useInteractive) {
+ node = currentlyAddingScript || getInteractiveScript();
+ if (node) {
+ if (!name) {
+ name = node.getAttribute('data-requiremodule');
+ }
+ context = contexts[node.getAttribute('data-requirecontext')];
+ }
+ }
+
+ //Always save off evaluating the def call until the script onload handler.
+ //This allows multiple modules to be in a file without prematurely
+ //tracing dependencies, and allows for anonymous module support,
+ //where the module name is not known until the script onload event
+ //occurs. If no context, use the global queue, and get it processed
+ //in the onscript load callback.
+ (context ? context.defQueue : globalDefQueue).push([name, deps, callback]);
+ };
+
+ define.amd = {
+ jQuery: true
+ };
+
+
+ /**
+ * Executes the text. Normally just uses eval, but can be modified
+ * to use a better, environment-specific call. Only used for transpiling
+ * loader plugins, not for plain JS modules.
+ * @param {String} text the text to execute/evaluate.
+ */
+ req.exec = function (text) {
+ /*jslint evil: true */
+ return eval(text);
+ };
+
+ //Set up with config info.
+ req(cfg);
+}(this));
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/.npmignore b/blackberry10/node_modules/jasmine-node/node_modules/underscore/.npmignore
new file mode 100644
index 0000000..cfff910
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/underscore/.npmignore
@@ -0,0 +1,6 @@
+test/
+Rakefile
+docs/
+raw/
+index.html
+underscore-min.js
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/.travis.yml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/.travis.yml b/blackberry10/node_modules/jasmine-node/node_modules/underscore/.travis.yml
new file mode 100644
index 0000000..99dc771
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/underscore/.travis.yml
@@ -0,0 +1,5 @@
+language: node_js
+node_js:
+ - 0.8
+notifications:
+ email: false
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/underscore/CNAME
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/underscore/CNAME b/blackberry10/node_modules/jasmine-node/node_modules/underscore/CNAME
new file mode 100644
index 0000000..a007e65
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/underscore/CNAME
@@ -0,0 +1 @@
+underscorejs.org
[23/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/minimatch.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/minimatch.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/minimatch.js
new file mode 100644
index 0000000..405746b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/minimatch.js
@@ -0,0 +1,1079 @@
+;(function (require, exports, module, platform) {
+
+if (module) module.exports = minimatch
+else exports.minimatch = minimatch
+
+if (!require) {
+ require = function (id) {
+ switch (id) {
+ case "sigmund": return function sigmund (obj) {
+ return JSON.stringify(obj)
+ }
+ case "path": return { basename: function (f) {
+ f = f.split(/[\/\\]/)
+ var e = f.pop()
+ if (!e) e = f.pop()
+ return e
+ }}
+ case "lru-cache": return function LRUCache () {
+ // not quite an LRU, but still space-limited.
+ var cache = {}
+ var cnt = 0
+ this.set = function (k, v) {
+ cnt ++
+ if (cnt >= 100) cache = {}
+ cache[k] = v
+ }
+ this.get = function (k) { return cache[k] }
+ }
+ }
+ }
+}
+
+minimatch.Minimatch = Minimatch
+
+var LRU = require("lru-cache")
+ , cache = minimatch.cache = new LRU({max: 100})
+ , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+ , sigmund = require("sigmund")
+
+var path = require("path")
+ // any single thing other than /
+ // don't need to escape / when using new RegExp()
+ , qmark = "[^/]"
+
+ // * => any number of characters
+ , star = qmark + "*?"
+
+ // ** when dots are allowed. Anything goes, except .. and .
+ // not (^ or / followed by one or two dots followed by $ or /),
+ // followed by anything, any number of times.
+ , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
+
+ // not a ^ or / followed by a dot,
+ // followed by anything, any number of times.
+ , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?"
+
+ // characters that need to be escaped in RegExp.
+ , reSpecials = charSet("().*{}+?[]^$\\!")
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split("").reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.monkeyPatch = monkeyPatch
+function monkeyPatch () {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")
+ var orig = desc.value
+ desc.value = function (p) {
+ if (p instanceof Minimatch) return p.match(this)
+ return orig.call(this, p)
+ }
+ Object.defineProperty(String.prototype, desc)
+}
+
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
+
+function ext (a, b) {
+ a = a || {}
+ b = b || {}
+ var t = {}
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ return t
+}
+
+minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return minimatch
+
+ var orig = minimatch
+
+ var m = function minimatch (p, pattern, options) {
+ return orig.minimatch(p, pattern, ext(def, options))
+ }
+
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+
+ return m
+}
+
+Minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return Minimatch
+ return minimatch.defaults(def).Minimatch
+}
+
+
+function minimatch (p, pattern, options) {
+ if (typeof pattern !== "string") {
+ throw new TypeError("glob pattern string required")
+ }
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === "#") {
+ return false
+ }
+
+ // "" only matches ""
+ if (pattern.trim() === "") return p === ""
+
+ return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options, cache)
+ }
+
+ if (typeof pattern !== "string") {
+ throw new TypeError("glob pattern string required")
+ }
+
+ if (!options) options = {}
+ pattern = pattern.trim()
+
+ // windows: need to use /, not \
+ // On other platforms, \ is a valid (albeit bad) filename char.
+ if (platform === "win32") {
+ pattern = pattern.split("\\").join("/")
+ }
+
+ // lru storage.
+ // these things aren't particularly big, but walking down the string
+ // and turning it into a regexp can get pretty costly.
+ var cacheKey = pattern + "\n" + sigmund(options)
+ var cached = minimatch.cache.get(cacheKey)
+ if (cached) return cached
+ minimatch.cache.set(cacheKey, this)
+
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+
+ // make the set of regexps etc.
+ this.make()
+}
+
+Minimatch.prototype.make = make
+function make () {
+ // don't do it more than once.
+ if (this._made) return
+
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === "#") {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) console.error(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ if (options.debug) console.error(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ if (options.debug) console.error(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return -1 === s.indexOf(false)
+ })
+
+ if (options.debug) console.error(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ , negate = false
+ , options = this.options
+ , negateOffset = 0
+
+ if (options.nonegate) return
+
+ for ( var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === "!"
+ ; i ++) {
+ negate = !negate
+ negateOffset ++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return new Minimatch(pattern, options).braceExpand()
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+function braceExpand (pattern, options) {
+ options = options || this.options
+ pattern = typeof pattern === "undefined"
+ ? this.pattern : pattern
+
+ if (typeof pattern === "undefined") {
+ throw new Error("undefined pattern")
+ }
+
+ if (options.nobrace ||
+ !pattern.match(/\{.*\}/)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ var escaping = false
+
+ // examples and comments refer to this crazy pattern:
+ // a{b,c{d,e},{f,g}h}x{y,z}
+ // expected:
+ // abxy
+ // abxz
+ // acdxy
+ // acdxz
+ // acexy
+ // acexz
+ // afhxy
+ // afhxz
+ // aghxy
+ // aghxz
+
+ // everything before the first \{ is just a prefix.
+ // So, we pluck that off, and work with the rest,
+ // and then prepend it to everything we find.
+ if (pattern.charAt(0) !== "{") {
+ // console.error(pattern)
+ var prefix = null
+ for (var i = 0, l = pattern.length; i < l; i ++) {
+ var c = pattern.charAt(i)
+ // console.error(i, c)
+ if (c === "\\") {
+ escaping = !escaping
+ } else if (c === "{" && !escaping) {
+ prefix = pattern.substr(0, i)
+ break
+ }
+ }
+
+ // actually no sets, all { were escaped.
+ if (prefix === null) {
+ // console.error("no sets")
+ return [pattern]
+ }
+
+ var tail = braceExpand(pattern.substr(i), options)
+ return tail.map(function (t) {
+ return prefix + t
+ })
+ }
+
+ // now we have something like:
+ // {b,c{d,e},{f,g}h}x{y,z}
+ // walk through the set, expanding each part, until
+ // the set ends. then, we'll expand the suffix.
+ // If the set only has a single member, then'll put the {} back
+
+ // first, handle numeric sets, since they're easier
+ var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
+ if (numset) {
+ // console.error("numset", numset[1], numset[2])
+ var suf = braceExpand(pattern.substr(numset[0].length), options)
+ , start = +numset[1]
+ , end = +numset[2]
+ , inc = start > end ? -1 : 1
+ , set = []
+ for (var i = start; i != (end + inc); i += inc) {
+ // append all the suffixes
+ for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+ set.push(i + suf[ii])
+ }
+ }
+ return set
+ }
+
+ // ok, walk through the set
+ // We hope, somewhat optimistically, that there
+ // will be a } at the end.
+ // If the closing brace isn't found, then the pattern is
+ // interpreted as braceExpand("\\" + pattern) so that
+ // the leading \{ will be interpreted literally.
+ var i = 1 // skip the \{
+ , depth = 1
+ , set = []
+ , member = ""
+ , sawEnd = false
+ , escaping = false
+
+ function addMember () {
+ set.push(member)
+ member = ""
+ }
+
+ // console.error("Entering for")
+ FOR: for (i = 1, l = pattern.length; i < l; i ++) {
+ var c = pattern.charAt(i)
+ // console.error("", i, c)
+
+ if (escaping) {
+ escaping = false
+ member += "\\" + c
+ } else {
+ switch (c) {
+ case "\\":
+ escaping = true
+ continue
+
+ case "{":
+ depth ++
+ member += "{"
+ continue
+
+ case "}":
+ depth --
+ // if this closes the actual set, then we're done
+ if (depth === 0) {
+ addMember()
+ // pluck off the close-brace
+ i ++
+ break FOR
+ } else {
+ member += c
+ continue
+ }
+
+ case ",":
+ if (depth === 1) {
+ addMember()
+ } else {
+ member += c
+ }
+ continue
+
+ default:
+ member += c
+ continue
+ } // switch
+ } // else
+ } // for
+
+ // now we've either finished the set, and the suffix is
+ // pattern.substr(i), or we have *not* closed the set,
+ // and need to escape the leading brace
+ if (depth !== 0) {
+ // console.error("didn't close", pattern)
+ return braceExpand("\\" + pattern, options)
+ }
+
+ // x{y,z} -> ["xy", "xz"]
+ // console.error("set", set)
+ // console.error("suffix", pattern.substr(i))
+ var suf = braceExpand(pattern.substr(i), options)
+ // ["b", "c{d,e}","{f,g}h"] ->
+ // [["b"], ["cd", "ce"], ["fh", "gh"]]
+ var addBraces = set.length === 1
+ // console.error("set pre-expanded", set)
+ set = set.map(function (p) {
+ return braceExpand(p, options)
+ })
+ // console.error("set expanded", set)
+
+
+ // [["b"], ["cd", "ce"], ["fh", "gh"]] ->
+ // ["b", "cd", "ce", "fh", "gh"]
+ set = set.reduce(function (l, r) {
+ return l.concat(r)
+ })
+
+ if (addBraces) {
+ set = set.map(function (s) {
+ return "{" + s + "}"
+ })
+ }
+
+ // now attach the suffixes.
+ var ret = []
+ for (var i = 0, l = set.length; i < l; i ++) {
+ for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+ ret.push(set[i] + suf[ii])
+ }
+ }
+ return ret
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ var options = this.options
+
+ // shortcuts
+ if (!options.noglobstar && pattern === "**") return GLOBSTAR
+ if (pattern === "") return ""
+
+ var re = ""
+ , hasMagic = !!options.nocase
+ , escaping = false
+ // ? => one single character
+ , patternListStack = []
+ , plType
+ , stateChar
+ , inClass = false
+ , reClassStart = -1
+ , classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ , patternStart = pattern.charAt(0) === "." ? "" // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
+ : "(?!\\.)"
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case "*":
+ re += star
+ hasMagic = true
+ break
+ case "?":
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += "\\"+stateChar
+ break
+ }
+ stateChar = false
+ }
+ }
+
+ for ( var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i ++ ) {
+
+ if (options.debug) {
+ console.error("%s\t%s %s %j", pattern, i, re, c)
+ }
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += "\\" + c
+ escaping = false
+ continue
+ }
+
+ SWITCH: switch (c) {
+ case "/":
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+
+ case "\\":
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case "?":
+ case "*":
+ case "+":
+ case "@":
+ case "!":
+ if (options.debug) {
+ console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
+ }
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ if (c === "!" && i === classStart + 1) c = "^"
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case "(":
+ if (inClass) {
+ re += "("
+ continue
+ }
+
+ if (!stateChar) {
+ re += "\\("
+ continue
+ }
+
+ plType = stateChar
+ patternListStack.push({ type: plType
+ , start: i - 1
+ , reStart: re.length })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === "!" ? "(?:(?!" : "(?:"
+ stateChar = false
+ continue
+
+ case ")":
+ if (inClass || !patternListStack.length) {
+ re += "\\)"
+ continue
+ }
+
+ hasMagic = true
+ re += ")"
+ plType = patternListStack.pop().type
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:<pattern>)<type>
+ switch (plType) {
+ case "!":
+ re += "[^/]*?)"
+ break
+ case "?":
+ case "+":
+ case "*": re += plType
+ case "@": break // the default anyway
+ }
+ continue
+
+ case "|":
+ if (inClass || !patternListStack.length || escaping) {
+ re += "\\|"
+ escaping = false
+ continue
+ }
+
+ re += "|"
+ continue
+
+ // these are mostly the same in regexp and glob
+ case "[":
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += "\\" + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case "]":
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += "\\" + c
+ escaping = false
+ continue
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === "^" && inClass)) {
+ re += "\\"
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ var cs = pattern.substr(classStart + 1)
+ , sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + "\\[" + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ var pl
+ while (pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + 3)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = "\\"
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + "|"
+ })
+
+ // console.error("tail=%j\n %s", tail, tail)
+ var t = pl.type === "*" ? star
+ : pl.type === "?" ? qmark
+ : "\\" + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart)
+ + t + "\\("
+ + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += "\\\\"
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case ".":
+ case "[":
+ case "(": addPatternStart = true
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== "" && hasMagic) re = "(?=.)" + re
+
+ if (addPatternStart) re = patternStart + re
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [ re, hasMagic ]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? "i" : ""
+ , regExp = new RegExp("^" + re + "$", flags)
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) return this.regexp = false
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ , flags = options.nocase ? "i" : ""
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === "string") ? regExpEscape(p)
+ : p._src
+ }).join("\\\/")
+ }).join("|")
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = "^(?:" + re + ")$"
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = "^(?!" + re + ").*$"
+
+ try {
+ return this.regexp = new RegExp(re, flags)
+ } catch (ex) {
+ return this.regexp = false
+ }
+}
+
+minimatch.match = function (list, pattern, options) {
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+ // console.error("match", f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ""
+
+ if (f === "/" && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ // On other platforms, \ is a valid (albeit bad) filename char.
+ if (platform === "win32") {
+ f = f.split("\\").join("/")
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ if (options.debug) {
+ console.error(this.pattern, "split", f)
+ }
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ // console.error(this.pattern, "set", set)
+
+ for (var i = 0, l = set.length; i < l; i ++) {
+ var pattern = set[i]
+ var hit = this.matchOne(f, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ if (options.debug) {
+ console.error("matchOne",
+ { "this": this
+ , file: file
+ , pattern: pattern })
+ }
+
+ if (options.matchBase && pattern.length === 1) {
+ file = path.basename(file.join("/")).split("/")
+ }
+
+ if (options.debug) {
+ console.error("matchOne", file.length, pattern.length)
+ }
+
+ for ( var fi = 0
+ , pi = 0
+ , fl = file.length
+ , pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi ++, pi ++ ) {
+
+ if (options.debug) {
+ console.error("matchOne loop")
+ }
+ var p = pattern[pi]
+ , f = file[fi]
+
+ if (options.debug) {
+ console.error(pattern, p, f)
+ }
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ if (options.debug)
+ console.error('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ , pr = pi + 1
+ if (pr === pl) {
+ if (options.debug)
+ console.error('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for ( ; fi < fl; fi ++) {
+ if (file[fi] === "." || file[fi] === ".." ||
+ (!options.dot && file[fi].charAt(0) === ".")) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ WHILE: while (fr < fl) {
+ var swallowee = file[fr]
+
+ if (options.debug) {
+ console.error('\nglobstar while',
+ file, fr, pattern, pr, swallowee)
+ }
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ if (options.debug)
+ console.error('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === "." || swallowee === ".." ||
+ (!options.dot && swallowee.charAt(0) === ".")) {
+ if (options.debug)
+ console.error("dot detected!", file, fr, pattern, pr)
+ break WHILE
+ }
+
+ // ** swallows a segment, and continue.
+ if (options.debug)
+ console.error('globstar swallow a segment, and continue')
+ fr ++
+ }
+ }
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ if (partial) {
+ // ran out of file
+ // console.error("\n>>> no match, partial?", file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === "string") {
+ if (options.nocase) {
+ hit = f.toLowerCase() === p.toLowerCase()
+ } else {
+ hit = f === p
+ }
+ if (options.debug) {
+ console.error("string match", p, f, hit)
+ }
+ } else {
+ hit = f.match(p)
+ if (options.debug) {
+ console.error("pattern match", p, f, hit)
+ }
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ var emptyFileEnd = (fi === fl - 1) && (file[fi] === "")
+ return emptyFileEnd
+ }
+
+ // should be unreachable.
+ throw new Error("wtf?")
+}
+
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, "$1")
+}
+
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
+}
+
+})( typeof require === "function" ? require : null,
+ this,
+ typeof module === "object" ? module : null,
+ typeof process === "object" ? process.platform : "win32"
+ )
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/.npmignore b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/.npmignore
new file mode 100644
index 0000000..07e6e47
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/.npmignore
@@ -0,0 +1 @@
+/node_modules
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/AUTHORS
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/AUTHORS b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/AUTHORS
new file mode 100644
index 0000000..016d7fb
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/AUTHORS
@@ -0,0 +1,8 @@
+# Authors, sorted by whether or not they are me
+Isaac Z. Schlueter <i...@izs.me>
+Carlos Brito Lage <ca...@carloslage.net>
+Marko Mikulicic <ma...@isti.cnr.it>
+Trent Mick <tr...@gmail.com>
+Kevin O'Hara <ke...@gmail.com>
+Marco Rogers <ma...@gmail.com>
+Jesse Dailey <je...@gmail.com>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/LICENSE b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/README.md b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/README.md
new file mode 100644
index 0000000..03ee0f9
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/README.md
@@ -0,0 +1,97 @@
+# lru cache
+
+A cache object that deletes the least-recently-used items.
+
+## Usage:
+
+```javascript
+var LRU = require("lru-cache")
+ , options = { max: 500
+ , length: function (n) { return n * 2 }
+ , dispose: function (key, n) { n.close() }
+ , maxAge: 1000 * 60 * 60 }
+ , cache = LRU(options)
+ , otherCache = LRU(50) // sets just the max size
+
+cache.set("key", "value")
+cache.get("key") // "value"
+
+cache.reset() // empty the cache
+```
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
+## Options
+
+* `max` The maximum size of the cache, checked by applying the length
+ function to all values in the cache. Not setting this is kind of
+ silly, since that's the whole purpose of this lib, but it defaults
+ to `Infinity`.
+* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
+ as they age, but if you try to get an item that is too old, it'll
+ drop it and return undefined instead of giving it to you.
+* `length` Function that is used to calculate the length of stored
+ items. If you're storing strings or buffers, then you probably want
+ to do something like `function(n){return n.length}`. The default is
+ `function(n){return 1}`, which is fine if you want to store `n`
+ like-sized things.
+* `dispose` Function that is called on items when they are dropped
+ from the cache. This can be handy if you want to close file
+ descriptors or do other cleanup tasks when items are no longer
+ accessible. Called with `key, value`. It's called *before*
+ actually removing the item from the internal cache, so if you want
+ to immediately put it back in, you'll have to do that in a
+ `nextTick` or `setTimeout` callback or it won't do anything.
+* `stale` By default, if you set a `maxAge`, it'll only actually pull
+ stale items out of the cache when you `get(key)`. (That is, it's
+ not pre-emptively doing a `setTimeout` or anything.) If you set
+ `stale:true`, it'll return the stale value before deleting it. If
+ you don't set this, then it'll return `undefined` when you try to
+ get a stale entry, as if it had already been deleted.
+
+## API
+
+* `set(key, value)`
+* `get(key) => value`
+
+ Both of these will update the "recently used"-ness of the key.
+ They do what you think.
+
+* `peek(key)`
+
+ Returns the key value (or `undefined` if not found) without
+ updating the "recently used"-ness of the key.
+
+ (If you find yourself using this a lot, you *might* be using the
+ wrong sort of data structure, but there are some use cases where
+ it's handy.)
+
+* `del(key)`
+
+ Deletes a key out of the cache.
+
+* `reset()`
+
+ Clear the cache entirely, throwing away all values.
+
+* `has(key)`
+
+ Check if a key is in the cache, without updating the recent-ness
+ or deleting it for being stale.
+
+* `forEach(function(value,key,cache), [thisp])`
+
+ Just like `Array.prototype.forEach`. Iterates over all the keys
+ in the cache, in order of recent-ness. (Ie, more recently used
+ items are iterated over first.)
+
+* `keys()`
+
+ Return an array of the keys in the cache.
+
+* `values()`
+
+ Return an array of the values in the cache.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
new file mode 100644
index 0000000..8c80853
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
@@ -0,0 +1,257 @@
+;(function () { // closure for web browsers
+
+if (typeof module === 'object' && module.exports) {
+ module.exports = LRUCache
+} else {
+ // just set the global for non-node platforms.
+ this.LRUCache = LRUCache
+}
+
+function hOP (obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key)
+}
+
+function naiveLength () { return 1 }
+
+function LRUCache (options) {
+ if (!(this instanceof LRUCache)) {
+ return new LRUCache(options)
+ }
+
+ var max
+ if (typeof options === 'number') {
+ max = options
+ options = { max: max }
+ }
+
+ if (!options) options = {}
+
+ max = options.max
+
+ var lengthCalculator = options.length || naiveLength
+
+ if (typeof lengthCalculator !== "function") {
+ lengthCalculator = naiveLength
+ }
+
+ if (!max || !(typeof max === "number") || max <= 0 ) {
+ // a little bit silly. maybe this should throw?
+ max = Infinity
+ }
+
+ var allowStale = options.stale || false
+
+ var maxAge = options.maxAge || null
+
+ var dispose = options.dispose
+
+ var cache = Object.create(null) // hash of items by key
+ , lruList = Object.create(null) // list of items in order of use recency
+ , mru = 0 // most recently used
+ , lru = 0 // least recently used
+ , length = 0 // number of items in the list
+ , itemCount = 0
+
+
+ // resize the cache when the max changes.
+ Object.defineProperty(this, "max",
+ { set : function (mL) {
+ if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity
+ max = mL
+ // if it gets above double max, trim right away.
+ // otherwise, do it whenever it's convenient.
+ if (length > max) trim()
+ }
+ , get : function () { return max }
+ , enumerable : true
+ })
+
+ // resize the cache when the lengthCalculator changes.
+ Object.defineProperty(this, "lengthCalculator",
+ { set : function (lC) {
+ if (typeof lC !== "function") {
+ lengthCalculator = naiveLength
+ length = itemCount
+ for (var key in cache) {
+ cache[key].length = 1
+ }
+ } else {
+ lengthCalculator = lC
+ length = 0
+ for (var key in cache) {
+ cache[key].length = lengthCalculator(cache[key].value)
+ length += cache[key].length
+ }
+ }
+
+ if (length > max) trim()
+ }
+ , get : function () { return lengthCalculator }
+ , enumerable : true
+ })
+
+ Object.defineProperty(this, "length",
+ { get : function () { return length }
+ , enumerable : true
+ })
+
+
+ Object.defineProperty(this, "itemCount",
+ { get : function () { return itemCount }
+ , enumerable : true
+ })
+
+ this.forEach = function (fn, thisp) {
+ thisp = thisp || this
+ var i = 0;
+ for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) {
+ i++
+ var hit = lruList[k]
+ fn.call(thisp, hit.value, hit.key, this)
+ }
+ }
+
+ this.keys = function () {
+ var keys = new Array(itemCount)
+ var i = 0
+ for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) {
+ var hit = lruList[k]
+ keys[i++] = hit.key
+ }
+ return keys
+ }
+
+ this.values = function () {
+ var values = new Array(itemCount)
+ var i = 0
+ for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) {
+ var hit = lruList[k]
+ values[i++] = hit.value
+ }
+ return values
+ }
+
+ this.reset = function () {
+ if (dispose) {
+ for (var k in cache) {
+ dispose(k, cache[k].value)
+ }
+ }
+ cache = {}
+ lruList = {}
+ lru = 0
+ mru = 0
+ length = 0
+ itemCount = 0
+ }
+
+ // Provided for debugging/dev purposes only. No promises whatsoever that
+ // this API stays stable.
+ this.dump = function () {
+ return cache
+ }
+
+ this.dumpLru = function () {
+ return lruList
+ }
+
+ this.set = function (key, value) {
+ if (hOP(cache, key)) {
+ // dispose of the old one before overwriting
+ if (dispose) dispose(key, cache[key].value)
+ if (maxAge) cache[key].now = Date.now()
+ cache[key].value = value
+ this.get(key)
+ return true
+ }
+
+ var len = lengthCalculator(value)
+ var age = maxAge ? Date.now() : 0
+ var hit = new Entry(key, value, mru++, len, age)
+
+ // oversized objects fall out of cache automatically.
+ if (hit.length > max) {
+ if (dispose) dispose(key, value)
+ return false
+ }
+
+ length += hit.length
+ lruList[hit.lu] = cache[key] = hit
+ itemCount ++
+
+ if (length > max) trim()
+ return true
+ }
+
+ this.has = function (key) {
+ if (!hOP(cache, key)) return false
+ var hit = cache[key]
+ if (maxAge && (Date.now() - hit.now > maxAge)) {
+ return false
+ }
+ return true
+ }
+
+ this.get = function (key) {
+ return get(key, true)
+ }
+
+ this.peek = function (key) {
+ return get(key, false)
+ }
+
+ function get (key, doUse) {
+ var hit = cache[key]
+ if (hit) {
+ if (maxAge && (Date.now() - hit.now > maxAge)) {
+ del(hit)
+ if (!allowStale) hit = undefined
+ } else {
+ if (doUse) use(hit)
+ }
+ if (hit) hit = hit.value
+ }
+ return hit
+ }
+
+ function use (hit) {
+ shiftLU(hit)
+ hit.lu = mru ++
+ lruList[hit.lu] = hit
+ }
+
+ this.del = function (key) {
+ del(cache[key])
+ }
+
+ function trim () {
+ while (lru < mru && length > max)
+ del(lruList[lru])
+ }
+
+ function shiftLU(hit) {
+ delete lruList[ hit.lu ]
+ while (lru < mru && !lruList[lru]) lru ++
+ }
+
+ function del(hit) {
+ if (hit) {
+ if (dispose) dispose(hit.key, hit.value)
+ length -= hit.length
+ itemCount --
+ delete cache[ hit.key ]
+ shiftLU(hit)
+ }
+ }
+}
+
+// classy, since V8 prefers predictable objects.
+function Entry (key, value, mru, len, age) {
+ this.key = key
+ this.value = value
+ this.lu = mru
+ this.length = len
+ this.now = age
+}
+
+})()
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/package.json b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/package.json
new file mode 100644
index 0000000..73920bf
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "lru-cache",
+ "description": "A cache object that deletes the least-recently-used items.",
+ "version": "2.3.0",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ "scripts": {
+ "test": "tap test --gc"
+ },
+ "main": "lib/lru-cache.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-lru-cache.git"
+ },
+ "devDependencies": {
+ "tap": "",
+ "weak": ""
+ },
+ "license": {
+ "type": "MIT",
+ "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
+ },
+ "contributors": [
+ {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "Carlos Brito Lage",
+ "email": "carlos@carloslage.net"
+ },
+ {
+ "name": "Marko Mikulicic",
+ "email": "marko.mikulicic@isti.cnr.it"
+ },
+ {
+ "name": "Trent Mick",
+ "email": "trentm@gmail.com"
+ },
+ {
+ "name": "Kevin O'Hara",
+ "email": "kevinohara80@gmail.com"
+ },
+ {
+ "name": "Marco Rogers",
+ "email": "marco.rogers@gmail.com"
+ },
+ {
+ "name": "Jesse Dailey",
+ "email": "jesse.dailey@gmail.com"
+ }
+ ],
+ "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if yo
u try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is
, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(func
tion(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-lru-cache/issues"
+ },
+ "_id": "lru-cache@2.3.0",
+ "_from": "lru-cache@2"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/s.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/s.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/s.js
new file mode 100644
index 0000000..c2a9e54
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/s.js
@@ -0,0 +1,25 @@
+var LRU = require('lru-cache');
+
+var max = +process.argv[2] || 10240;
+var more = 1024;
+
+var cache = LRU({
+ max: max, maxAge: 86400e3
+});
+
+// fill cache
+for (var i = 0; i < max; ++i) {
+ cache.set(i, {});
+}
+
+var start = process.hrtime();
+
+// adding more items
+for ( ; i < max+more; ++i) {
+ cache.set(i, {});
+}
+
+var end = process.hrtime(start);
+var msecs = end[0] * 1E3 + end[1] / 1E6;
+
+console.log('adding %d items took %d ms', more, msecs.toPrecision(5));
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/basic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/basic.js
new file mode 100644
index 0000000..70f3f8b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/basic.js
@@ -0,0 +1,329 @@
+var test = require("tap").test
+ , LRU = require("../")
+
+test("basic", function (t) {
+ var cache = new LRU({max: 10})
+ cache.set("key", "value")
+ t.equal(cache.get("key"), "value")
+ t.equal(cache.get("nada"), undefined)
+ t.equal(cache.length, 1)
+ t.equal(cache.max, 10)
+ t.end()
+})
+
+test("least recently set", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("lru recently gotten", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.get("a")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("a"), "A")
+ t.end()
+})
+
+test("del", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.del("a")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("max", function (t) {
+ var cache = new LRU(3)
+
+ // test changing the max, verify that the LRU items get dropped.
+ cache.max = 100
+ for (var i = 0; i < 100; i ++) cache.set(i, i)
+ t.equal(cache.length, 100)
+ for (var i = 0; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ cache.max = 3
+ t.equal(cache.length, 3)
+ for (var i = 0; i < 97; i ++) {
+ t.equal(cache.get(i), undefined)
+ }
+ for (var i = 98; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+
+ // now remove the max restriction, and try again.
+ cache.max = "hello"
+ for (var i = 0; i < 100; i ++) cache.set(i, i)
+ t.equal(cache.length, 100)
+ for (var i = 0; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ // should trigger an immediate resize
+ cache.max = 3
+ t.equal(cache.length, 3)
+ for (var i = 0; i < 97; i ++) {
+ t.equal(cache.get(i), undefined)
+ }
+ for (var i = 98; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ t.end()
+})
+
+test("reset", function (t) {
+ var cache = new LRU(10)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.reset()
+ t.equal(cache.length, 0)
+ t.equal(cache.max, 10)
+ t.equal(cache.get("a"), undefined)
+ t.equal(cache.get("b"), undefined)
+ t.end()
+})
+
+
+// Note: `<cache>.dump()` is a debugging tool only. No guarantees are made
+// about the format/layout of the response.
+test("dump", function (t) {
+ var cache = new LRU(10)
+ var d = cache.dump();
+ t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache")
+ cache.set("a", "A")
+ var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } }
+ t.ok(d.a)
+ t.equal(d.a.key, "a")
+ t.equal(d.a.value, "A")
+ t.equal(d.a.lu, 0)
+
+ cache.set("b", "B")
+ cache.get("b")
+ d = cache.dump()
+ t.ok(d.b)
+ t.equal(d.b.key, "b")
+ t.equal(d.b.value, "B")
+ t.equal(d.b.lu, 2)
+
+ t.end()
+})
+
+
+test("basic with weighed length", function (t) {
+ var cache = new LRU({
+ max: 100,
+ length: function (item) { return item.size }
+ })
+ cache.set("key", {val: "value", size: 50})
+ t.equal(cache.get("key").val, "value")
+ t.equal(cache.get("nada"), undefined)
+ t.equal(cache.lengthCalculator(cache.get("key")), 50)
+ t.equal(cache.length, 50)
+ t.equal(cache.max, 100)
+ t.end()
+})
+
+
+test("weighed length item too large", function (t) {
+ var cache = new LRU({
+ max: 10,
+ length: function (item) { return item.size }
+ })
+ t.equal(cache.max, 10)
+
+ // should fall out immediately
+ cache.set("key", {val: "value", size: 50})
+
+ t.equal(cache.length, 0)
+ t.equal(cache.get("key"), undefined)
+ t.end()
+})
+
+test("least recently set with weighed length", function (t) {
+ var cache = new LRU({
+ max:8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ cache.set("d", "DDDD")
+ t.equal(cache.get("d"), "DDDD")
+ t.equal(cache.get("c"), "CCC")
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("lru recently gotten with weighed length", function (t) {
+ var cache = new LRU({
+ max: 8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ cache.get("a")
+ cache.get("b")
+ cache.set("d", "DDDD")
+ t.equal(cache.get("c"), undefined)
+ t.equal(cache.get("d"), "DDDD")
+ t.equal(cache.get("b"), "BB")
+ t.equal(cache.get("a"), "A")
+ t.end()
+})
+
+test("set returns proper booleans", function(t) {
+ var cache = new LRU({
+ max: 5,
+ length: function (item) { return item.length }
+ })
+
+ t.equal(cache.set("a", "A"), true)
+
+ // should return false for max exceeded
+ t.equal(cache.set("b", "donuts"), false)
+
+ t.equal(cache.set("b", "B"), true)
+ t.equal(cache.set("c", "CCCC"), true)
+ t.end()
+})
+
+test("drop the old items", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 50
+ })
+
+ cache.set("a", "A")
+
+ setTimeout(function () {
+ cache.set("b", "b")
+ t.equal(cache.get("a"), "A")
+ }, 25)
+
+ setTimeout(function () {
+ cache.set("c", "C")
+ // timed out
+ t.notOk(cache.get("a"))
+ }, 60)
+
+ setTimeout(function () {
+ t.notOk(cache.get("b"))
+ t.equal(cache.get("c"), "C")
+ }, 90)
+
+ setTimeout(function () {
+ t.notOk(cache.get("c"))
+ t.end()
+ }, 155)
+})
+
+test("disposal function", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+
+ cache.set(1, 1)
+ cache.set(2, 2)
+ t.equal(disposed, 1)
+ cache.set(3, 3)
+ t.equal(disposed, 2)
+ cache.reset()
+ t.equal(disposed, 3)
+ t.end()
+})
+
+test("disposal function on too big of item", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ length: function (k) {
+ return k.length
+ },
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+ var obj = [ 1, 2 ]
+
+ t.equal(disposed, false)
+ cache.set("obj", obj)
+ t.equal(disposed, obj)
+ t.end()
+})
+
+test("has()", function(t) {
+ var cache = new LRU({
+ max: 1,
+ maxAge: 10
+ })
+
+ cache.set('foo', 'bar')
+ t.equal(cache.has('foo'), true)
+ cache.set('blu', 'baz')
+ t.equal(cache.has('foo'), false)
+ t.equal(cache.has('blu'), true)
+ setTimeout(function() {
+ t.equal(cache.has('blu'), false)
+ t.end()
+ }, 15)
+})
+
+test("stale", function(t) {
+ var cache = new LRU({
+ maxAge: 10,
+ stale: true
+ })
+
+ cache.set('foo', 'bar')
+ t.equal(cache.get('foo'), 'bar')
+ t.equal(cache.has('foo'), true)
+ setTimeout(function() {
+ t.equal(cache.has('foo'), false)
+ t.equal(cache.get('foo'), 'bar')
+ t.equal(cache.get('foo'), undefined)
+ t.end()
+ }, 15)
+})
+
+test("lru update via set", function(t) {
+ var cache = LRU({ max: 2 });
+
+ cache.set('foo', 1);
+ cache.set('bar', 2);
+ cache.del('bar');
+ cache.set('baz', 3);
+ cache.set('qux', 4);
+
+ t.equal(cache.get('foo'), undefined)
+ t.equal(cache.get('bar'), undefined)
+ t.equal(cache.get('baz'), 3)
+ t.equal(cache.get('qux'), 4)
+ t.end()
+})
+
+test("least recently set w/ peek", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ t.equal(cache.peek("a"), "A")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
new file mode 100644
index 0000000..eefb80d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
@@ -0,0 +1,52 @@
+var test = require('tap').test
+var LRU = require('../')
+
+test('forEach', function (t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 9
+ l.forEach(function (val, key, cache) {
+ t.equal(cache, l)
+ t.equal(key, i.toString())
+ t.equal(val, i.toString(2))
+ i -= 1
+ })
+
+ // get in order of most recently used
+ l.get(6)
+ l.get(8)
+
+ var order = [ 8, 6, 9, 7, 5 ]
+ var i = 0
+
+ l.forEach(function (val, key, cache) {
+ var j = order[i ++]
+ t.equal(cache, l)
+ t.equal(key, j.toString())
+ t.equal(val, j.toString(2))
+ })
+
+ t.end()
+})
+
+test('keys() and values()', function (t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ t.similar(l.keys(), ['9', '8', '7', '6', '5'])
+ t.similar(l.values(), ['1001', '1000', '111', '110', '101'])
+
+ // get in order of most recently used
+ l.get(6)
+ l.get(8)
+
+ t.similar(l.keys(), ['8', '6', '9', '7', '5'])
+ t.similar(l.values(), ['1000', '110', '1001', '111', '101'])
+
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
new file mode 100644
index 0000000..7af45b0
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
@@ -0,0 +1,50 @@
+#!/usr/bin/env node --expose_gc
+
+var weak = require('weak');
+var test = require('tap').test
+var LRU = require('../')
+var l = new LRU({ max: 10 })
+var refs = 0
+function X() {
+ refs ++
+ weak(this, deref)
+}
+
+function deref() {
+ refs --
+}
+
+test('no leaks', function (t) {
+ // fill up the cache
+ for (var i = 0; i < 100; i++) {
+ l.set(i, new X);
+ // throw some gets in there, too.
+ if (i % 2 === 0)
+ l.get(i / 2)
+ }
+
+ gc()
+
+ var start = process.memoryUsage()
+
+ // capture the memory
+ var startRefs = refs
+
+ // do it again, but more
+ for (var i = 0; i < 10000; i++) {
+ l.set(i, new X);
+ // throw some gets in there, too.
+ if (i % 2 === 0)
+ l.get(i / 2)
+ }
+
+ gc()
+
+ var end = process.memoryUsage()
+ t.equal(refs, startRefs, 'no leaky refs')
+
+ console.error('start: %j\n' +
+ 'end: %j', start, end);
+ t.pass();
+ t.end();
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/LICENSE b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/LICENSE
new file mode 100644
index 0000000..0c44ae7
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. 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.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR CONTRIBUTORS
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/README.md b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/README.md
new file mode 100644
index 0000000..7e36512
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/README.md
@@ -0,0 +1,53 @@
+# sigmund
+
+Quick and dirty signatures for Objects.
+
+This is like a much faster `deepEquals` comparison, which returns a
+string key suitable for caches and the like.
+
+## Usage
+
+```javascript
+function doSomething (someObj) {
+ var key = sigmund(someObj, maxDepth) // max depth defaults to 10
+ var cached = cache.get(key)
+ if (cached) return cached)
+
+ var result = expensiveCalculation(someObj)
+ cache.set(key, result)
+ return result
+}
+```
+
+The resulting key will be as unique and reproducible as calling
+`JSON.stringify` or `util.inspect` on the object, but is much faster.
+In order to achieve this speed, some differences are glossed over.
+For example, the object `{0:'foo'}` will be treated identically to the
+array `['foo']`.
+
+Also, just as there is no way to summon the soul from the scribblings
+of a cocain-addled psychoanalyst, there is no way to revive the object
+from the signature string that sigmund gives you. In fact, it's
+barely even readable.
+
+As with `sys.inspect` and `JSON.stringify`, larger objects will
+produce larger signature strings.
+
+Because sigmund is a bit less strict than the more thorough
+alternatives, the strings will be shorter, and also there is a
+slightly higher chance for collisions. For example, these objects
+have the same signature:
+
+ var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
+ var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
+
+Like a good Freudian, sigmund is most effective when you already have
+some understanding of what you're looking for. It can help you help
+yourself, but you must be willing to do some work as well.
+
+Cycles are handled, and cyclical objects are silently omitted (though
+the key is included in the signature output.)
+
+The second argument is the maximum depth, which defaults to 10,
+because that is the maximum object traversal depth covered by most
+insurance carriers.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/bench.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/bench.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/bench.js
new file mode 100644
index 0000000..5acfd6d
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/bench.js
@@ -0,0 +1,283 @@
+// different ways to id objects
+// use a req/res pair, since it's crazy deep and cyclical
+
+// sparseFE10 and sigmund are usually pretty close, which is to be expected,
+// since they are essentially the same algorithm, except that sigmund handles
+// regular expression objects properly.
+
+
+var http = require('http')
+var util = require('util')
+var sigmund = require('./sigmund.js')
+var sreq, sres, creq, cres, test
+
+http.createServer(function (q, s) {
+ sreq = q
+ sres = s
+ sres.end('ok')
+ this.close(function () { setTimeout(function () {
+ start()
+ }, 200) })
+}).listen(1337, function () {
+ creq = http.get({ port: 1337 })
+ creq.on('response', function (s) { cres = s })
+})
+
+function start () {
+ test = [sreq, sres, creq, cres]
+ // test = sreq
+ // sreq.sres = sres
+ // sreq.creq = creq
+ // sreq.cres = cres
+
+ for (var i in exports.compare) {
+ console.log(i)
+ var hash = exports.compare[i]()
+ console.log(hash)
+ console.log(hash.length)
+ console.log('')
+ }
+
+ require('bench').runMain()
+}
+
+function customWs (obj, md, d) {
+ d = d || 0
+ var to = typeof obj
+ if (to === 'undefined' || to === 'function' || to === null) return ''
+ if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '')
+
+ if (Array.isArray(obj)) {
+ return obj.map(function (i, _, __) {
+ return customWs(i, md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+ }
+
+ var keys = Object.keys(obj)
+ return keys.map(function (k, _, __) {
+ return k + ':' + customWs(obj[k], md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+}
+
+function custom (obj, md, d) {
+ d = d || 0
+ var to = typeof obj
+ if (to === 'undefined' || to === 'function' || to === null) return ''
+ if (d > md || !obj || to !== 'object') return '' + obj
+
+ if (Array.isArray(obj)) {
+ return obj.map(function (i, _, __) {
+ return custom(i, md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+ }
+
+ var keys = Object.keys(obj)
+ return keys.map(function (k, _, __) {
+ return k + ':' + custom(obj[k], md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+}
+
+function sparseFE2 (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ Object.keys(v).forEach(function (k, _, __) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') return
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') return
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ })
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function sparseFE (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ Object.keys(v).forEach(function (k, _, __) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') return
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') return
+ soFar += k
+ ch(v[k], depth + 1)
+ })
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function sparse (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k
+ ch(v[k], depth + 1)
+ }
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function noCommas (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ }
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+
+function flatten (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ soFar += ','
+ }
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+exports.compare =
+{
+ // 'custom 2': function () {
+ // return custom(test, 2, 0)
+ // },
+ // 'customWs 2': function () {
+ // return customWs(test, 2, 0)
+ // },
+ 'JSON.stringify (guarded)': function () {
+ var seen = []
+ return JSON.stringify(test, function (k, v) {
+ if (typeof v !== 'object' || !v) return v
+ if (seen.indexOf(v) !== -1) return undefined
+ seen.push(v)
+ return v
+ })
+ },
+
+ 'flatten 10': function () {
+ return flatten(test, 10)
+ },
+
+ // 'flattenFE 10': function () {
+ // return flattenFE(test, 10)
+ // },
+
+ 'noCommas 10': function () {
+ return noCommas(test, 10)
+ },
+
+ 'sparse 10': function () {
+ return sparse(test, 10)
+ },
+
+ 'sparseFE 10': function () {
+ return sparseFE(test, 10)
+ },
+
+ 'sparseFE2 10': function () {
+ return sparseFE2(test, 10)
+ },
+
+ sigmund: function() {
+ return sigmund(test, 10)
+ },
+
+
+ // 'util.inspect 1': function () {
+ // return util.inspect(test, false, 1, false)
+ // },
+ // 'util.inspect undefined': function () {
+ // util.inspect(test)
+ // },
+ // 'util.inspect 2': function () {
+ // util.inspect(test, false, 2, false)
+ // },
+ // 'util.inspect 3': function () {
+ // util.inspect(test, false, 3, false)
+ // },
+ // 'util.inspect 4': function () {
+ // util.inspect(test, false, 4, false)
+ // },
+ // 'util.inspect Infinity': function () {
+ // util.inspect(test, false, Infinity, false)
+ // }
+}
+
+/** results
+**/
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/package.json b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/package.json
new file mode 100644
index 0000000..ec8e2eb
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "sigmund",
+ "version": "1.0.0",
+ "description": "Quick and dirty signatures for Objects.",
+ "main": "sigmund.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.3.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js",
+ "bench": "node bench.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/sigmund"
+ },
+ "keywords": [
+ "object",
+ "signature",
+ "key",
+ "data",
+ "psychoanalysis"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "BSD",
+ "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even rea
dable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/sigmund/issues"
+ },
+ "_id": "sigmund@1.0.0",
+ "_from": "sigmund@~1.0.0"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/sigmund.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/sigmund.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/sigmund.js
new file mode 100644
index 0000000..82c7ab8
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/sigmund.js
@@ -0,0 +1,39 @@
+module.exports = sigmund
+function sigmund (subject, maxSessions) {
+ maxSessions = maxSessions || 10;
+ var notes = [];
+ var analysis = '';
+ var RE = RegExp;
+
+ function psychoAnalyze (subject, session) {
+ if (session > maxSessions) return;
+
+ if (typeof subject === 'function' ||
+ typeof subject === 'undefined') {
+ return;
+ }
+
+ if (typeof subject !== 'object' || !subject ||
+ (subject instanceof RE)) {
+ analysis += subject;
+ return;
+ }
+
+ if (notes.indexOf(subject) !== -1 || session === maxSessions) return;
+
+ notes.push(subject);
+ analysis += '{';
+ Object.keys(subject).forEach(function (issue, _, __) {
+ // pseudo-private values. skip those.
+ if (issue.charAt(0) === '_') return;
+ var to = typeof subject[issue];
+ if (to === 'function' || to === 'undefined') return;
+ analysis += issue;
+ psychoAnalyze(subject[issue], session + 1);
+ });
+ }
+ psychoAnalyze(subject, 0);
+ return analysis;
+}
+
+// vim: set softtabstop=4 shiftwidth=4:
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/test/basic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/test/basic.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/test/basic.js
new file mode 100644
index 0000000..50c53a1
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/node_modules/sigmund/test/basic.js
@@ -0,0 +1,24 @@
+var test = require('tap').test
+var sigmund = require('../sigmund.js')
+
+
+// occasionally there are duplicates
+// that's an acceptable edge-case. JSON.stringify and util.inspect
+// have some collision potential as well, though less, and collision
+// detection is expensive.
+var hash = '{abc/def/g{0h1i2{jkl'
+var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
+var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
+
+var obj3 = JSON.parse(JSON.stringify(obj1))
+obj3.c = /def/
+obj3.g[2].cycle = obj3
+var cycleHash = '{abc/def/g{0h1i2{jklcycle'
+
+test('basic', function (t) {
+ t.equal(sigmund(obj1), hash)
+ t.equal(sigmund(obj2), hash)
+ t.equal(sigmund(obj3), cycleHash)
+ t.end()
+})
+
[51/51] [partial] webworks commit: CB-6346 - Add node_modules to
source control
Posted by bh...@apache.org.
CB-6346 - Add node_modules to source control
Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/1139813c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/1139813c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/1139813c
Branch: refs/heads/master
Commit: 1139813cd8b7ee4b1a103ada5577cab79b2c39e6
Parents: 7b56395
Author: Bryan Higgins <br...@bryanhiggins.net>
Authored: Wed Mar 26 09:30:58 2014 -0400
Committer: Bryan Higgins <br...@bryanhiggins.net>
Committed: Wed Mar 26 09:30:58 2014 -0400
----------------------------------------------------------------------
blackberry10/.gitignore | 2 -
blackberry10/bin/create | 14 -
blackberry10/bin/create.bat | 7 -
blackberry10/bin/init | 5 -
blackberry10/bin/init.bat | 6 -
blackberry10/node_modules/.bin/jake | 1 +
blackberry10/node_modules/.bin/jasmine-node | 1 +
blackberry10/node_modules/.bin/plugman | 1 +
blackberry10/node_modules/.bin/shjs | 1 +
blackberry10/node_modules/.bin/xlocalize | 1 +
blackberry10/node_modules/async/LICENSE | 19 +
blackberry10/node_modules/async/README.md | 1414 +
blackberry10/node_modules/async/component.json | 11 +
blackberry10/node_modules/async/lib/async.js | 955 +
blackberry10/node_modules/async/package.json | 42 +
blackberry10/node_modules/commander/.npmignore | 4 +
blackberry10/node_modules/commander/.travis.yml | 4 +
blackberry10/node_modules/commander/History.md | 107 +
blackberry10/node_modules/commander/Makefile | 7 +
blackberry10/node_modules/commander/Readme.md | 262 +
blackberry10/node_modules/commander/index.js | 2 +
.../node_modules/commander/lib/commander.js | 1026 +
.../node_modules/commander/package.json | 38 +
.../node_modules/elementtree/.npmignore | 1 +
.../node_modules/elementtree/.travis.yml | 10 +
.../node_modules/elementtree/CHANGES.md | 34 +
.../node_modules/elementtree/LICENSE.txt | 203 +
blackberry10/node_modules/elementtree/Makefile | 21 +
blackberry10/node_modules/elementtree/NOTICE | 5 +
blackberry10/node_modules/elementtree/README.md | 27 +
.../node_modules/elementtree/lib/constants.js | 20 +
.../node_modules/elementtree/lib/elementpath.js | 343 +
.../node_modules/elementtree/lib/elementtree.js | 598 +
.../node_modules/elementtree/lib/errors.js | 31 +
.../node_modules/elementtree/lib/parser.js | 33 +
.../elementtree/lib/parsers/index.js | 1 +
.../node_modules/elementtree/lib/parsers/sax.js | 56 +
.../node_modules/elementtree/lib/sprintf.js | 86 +
.../node_modules/elementtree/lib/treebuilder.js | 60 +
.../node_modules/elementtree/lib/utils.js | 72 +
.../elementtree/node_modules/sax/AUTHORS | 9 +
.../elementtree/node_modules/sax/LICENSE | 23 +
.../elementtree/node_modules/sax/README.md | 213 +
.../sax/examples/big-not-pretty.xml | 8002 +
.../node_modules/sax/examples/example.js | 41 +
.../node_modules/sax/examples/get-products.js | 58 +
.../node_modules/sax/examples/hello-world.js | 4 +
.../node_modules/sax/examples/not-pretty.xml | 8 +
.../node_modules/sax/examples/pretty-print.js | 74 +
.../node_modules/sax/examples/shopping.xml | 2 +
.../node_modules/sax/examples/strict.dtd | 870 +
.../node_modules/sax/examples/switch-bench.js | 45 +
.../node_modules/sax/examples/test.html | 15 +
.../node_modules/sax/examples/test.xml | 1254 +
.../elementtree/node_modules/sax/lib/sax.js | 1006 +
.../elementtree/node_modules/sax/package.json | 63 +
.../node_modules/sax/test/buffer-overrun.js | 25 +
.../node_modules/sax/test/cdata-chunked.js | 11 +
.../node_modules/sax/test/cdata-end-split.js | 15 +
.../node_modules/sax/test/cdata-fake-end.js | 28 +
.../node_modules/sax/test/cdata-multiple.js | 15 +
.../elementtree/node_modules/sax/test/cdata.js | 10 +
.../elementtree/node_modules/sax/test/index.js | 86 +
.../node_modules/sax/test/issue-23.js | 43 +
.../node_modules/sax/test/issue-30.js | 24 +
.../node_modules/sax/test/issue-35.js | 15 +
.../node_modules/sax/test/issue-47.js | 13 +
.../node_modules/sax/test/issue-49.js | 31 +
.../node_modules/sax/test/parser-position.js | 28 +
.../elementtree/node_modules/sax/test/script.js | 12 +
.../sax/test/self-closing-child-strict.js | 40 +
.../node_modules/sax/test/self-closing-child.js | 40 +
.../node_modules/sax/test/self-closing-tag.js | 25 +
.../node_modules/sax/test/stray-ending.js | 17 +
.../sax/test/trailing-non-whitespace.js | 17 +
.../node_modules/sax/test/unquoted.js | 17 +
.../node_modules/sax/test/xmlns-issue-41.js | 67 +
.../node_modules/sax/test/xmlns-rebinding.js | 59 +
.../node_modules/sax/test/xmlns-strict.js | 71 +
.../node_modules/sax/test/xmlns-unbound.js | 15 +
.../test/xmlns-xml-default-prefix-attribute.js | 35 +
.../sax/test/xmlns-xml-default-prefix.js | 20 +
.../sax/test/xmlns-xml-default-redefine.js | 40 +
.../node_modules/elementtree/package.json | 59 +
.../elementtree/tests/data/xml1.xml | 17 +
.../elementtree/tests/data/xml2.xml | 14 +
.../elementtree/tests/test-simple.js | 299 +
blackberry10/node_modules/exit/.jshintrc | 14 +
blackberry10/node_modules/exit/.npmignore | 0
blackberry10/node_modules/exit/.travis.yml | 6 +
blackberry10/node_modules/exit/Gruntfile.js | 48 +
blackberry10/node_modules/exit/LICENSE-MIT | 22 +
blackberry10/node_modules/exit/README.md | 74 +
blackberry10/node_modules/exit/lib/exit.js | 41 +
blackberry10/node_modules/exit/package.json | 55 +
.../node_modules/exit/test/exit_test.js | 121 +
.../exit/test/fixtures/10-stderr.txt | 10 +
.../exit/test/fixtures/10-stdout-stderr.txt | 20 +
.../exit/test/fixtures/10-stdout.txt | 10 +
.../exit/test/fixtures/100-stderr.txt | 100 +
.../exit/test/fixtures/100-stdout-stderr.txt | 200 +
.../exit/test/fixtures/100-stdout.txt | 100 +
.../exit/test/fixtures/1000-stderr.txt | 1000 +
.../exit/test/fixtures/1000-stdout-stderr.txt | 2000 +
.../exit/test/fixtures/1000-stdout.txt | 1000 +
.../exit/test/fixtures/create-files.sh | 8 +
.../exit/test/fixtures/log-broken.js | 23 +
.../node_modules/exit/test/fixtures/log.js | 25 +
blackberry10/node_modules/jWorkflow/.npmignore | 1 +
blackberry10/node_modules/jWorkflow/LICENSE | 9 +
blackberry10/node_modules/jWorkflow/README.md | 170 +
blackberry10/node_modules/jWorkflow/Rakefile | 12 +
.../jWorkflow/jworkflow-min-0.8.0.js | 3 +
.../node_modules/jWorkflow/lib/jWorkflow.js | 140 +
.../node_modules/jWorkflow/package.json | 27 +
.../node_modules/jWorkflow/test/test.html | 17 +
.../jWorkflow/test/test_jworkflow.js | 521 +
.../jWorkflow/test/vendor/jquery.js | 19 +
.../jWorkflow/test/vendor/qunit.css | 17 +
.../node_modules/jWorkflow/test/vendor/qunit.js | 997 +
blackberry10/node_modules/jake/Jakefile | 43 +
blackberry10/node_modules/jake/Makefile | 44 +
blackberry10/node_modules/jake/README.md | 946 +
blackberry10/node_modules/jake/bin/cli.js | 23 +
blackberry10/node_modules/jake/lib/api.js | 241 +
blackberry10/node_modules/jake/lib/file_list.js | 287 +
blackberry10/node_modules/jake/lib/jake.js | 280 +
blackberry10/node_modules/jake/lib/loader.js | 94 +
.../node_modules/jake/lib/npm_publish_task.js | 193 +
.../node_modules/jake/lib/package_task.js | 365 +
blackberry10/node_modules/jake/lib/parseargs.js | 134 +
blackberry10/node_modules/jake/lib/program.js | 236 +
.../jake/lib/task/directory_task.js | 29 +
.../node_modules/jake/lib/task/file_task.js | 134 +
.../node_modules/jake/lib/task/index.js | 9 +
blackberry10/node_modules/jake/lib/task/task.js | 241 +
blackberry10/node_modules/jake/lib/test_task.js | 216 +
.../node_modules/jake/lib/utils/index.js | 242 +
.../node_modules/jake/lib/utils/logger.js | 24 +
.../jake/node_modules/minimatch/LICENSE | 23 +
.../jake/node_modules/minimatch/README.md | 218 +
.../jake/node_modules/minimatch/minimatch.js | 1079 +
.../minimatch/node_modules/lru-cache/.npmignore | 1 +
.../minimatch/node_modules/lru-cache/AUTHORS | 8 +
.../minimatch/node_modules/lru-cache/LICENSE | 23 +
.../minimatch/node_modules/lru-cache/README.md | 97 +
.../node_modules/lru-cache/lib/lru-cache.js | 257 +
.../node_modules/lru-cache/package.json | 62 +
.../minimatch/node_modules/lru-cache/s.js | 25 +
.../node_modules/lru-cache/test/basic.js | 329 +
.../node_modules/lru-cache/test/foreach.js | 52 +
.../node_modules/lru-cache/test/memory-leak.js | 50 +
.../minimatch/node_modules/sigmund/LICENSE | 27 +
.../minimatch/node_modules/sigmund/README.md | 53 +
.../minimatch/node_modules/sigmund/bench.js | 283 +
.../minimatch/node_modules/sigmund/package.json | 41 +
.../minimatch/node_modules/sigmund/sigmund.js | 39 +
.../node_modules/sigmund/test/basic.js | 24 +
.../jake/node_modules/minimatch/package.json | 39 +
.../jake/node_modules/minimatch/test/basic.js | 399 +
.../node_modules/minimatch/test/brace-expand.js | 33 +
.../jake/node_modules/minimatch/test/caching.js | 14 +
.../node_modules/minimatch/test/defaults.js | 274 +
.../jake/node_modules/utilities/Jakefile | 37 +
.../jake/node_modules/utilities/README.md | 6 +
.../jake/node_modules/utilities/lib/array.js | 93 +
.../jake/node_modules/utilities/lib/async.js | 291 +
.../jake/node_modules/utilities/lib/core.js | 106 +
.../jake/node_modules/utilities/lib/date.js | 903 +
.../node_modules/utilities/lib/event_buffer.js | 109 +
.../jake/node_modules/utilities/lib/file.js | 520 +
.../jake/node_modules/utilities/lib/i18n.js | 60 +
.../jake/node_modules/utilities/lib/index.js | 59 +
.../node_modules/utilities/lib/inflection.js | 222 +
.../jake/node_modules/utilities/lib/log.js | 67 +
.../jake/node_modules/utilities/lib/network.js | 72 +
.../jake/node_modules/utilities/lib/object.js | 108 +
.../jake/node_modules/utilities/lib/request.js | 143 +
.../utilities/lib/sorted_collection.js | 558 +
.../jake/node_modules/utilities/lib/string.js | 791 +
.../jake/node_modules/utilities/lib/uri.js | 177 +
.../jake/node_modules/utilities/lib/xml.js | 282 +
.../jake/node_modules/utilities/package.json | 34 +
.../jake/node_modules/utilities/test/array.js | 71 +
.../jake/node_modules/utilities/test/core.js | 75 +
.../jake/node_modules/utilities/test/date.js | 75 +
.../node_modules/utilities/test/event_buffer.js | 45 +
.../jake/node_modules/utilities/test/file.js | 218 +
.../jake/node_modules/utilities/test/i18n.js | 60 +
.../node_modules/utilities/test/inflection.js | 388 +
.../jake/node_modules/utilities/test/network.js | 41 +
.../jake/node_modules/utilities/test/object.js | 76 +
.../utilities/test/sorted_collection.js | 115 +
.../jake/node_modules/utilities/test/string.js | 411 +
.../jake/node_modules/utilities/test/uri.js | 99 +
.../jake/node_modules/utilities/test/xml.js | 122 +
blackberry10/node_modules/jake/package.json | 40 +
blackberry10/node_modules/jake/test/Jakefile | 214 +
blackberry10/node_modules/jake/test/exec.js | 113 +
.../node_modules/jake/test/file_task.js | 123 +
blackberry10/node_modules/jake/test/foo.html | 0
blackberry10/node_modules/jake/test/foo.txt | 0
blackberry10/node_modules/jake/test/helpers.js | 59 +
.../node_modules/jake/test/namespace.js | 27 +
.../node_modules/jake/test/parseargs.js | 150 +
.../node_modules/jake/test/task_base.js | 137 +
.../node_modules/jasmine-node/.npmignore | 13 +
.../node_modules/jasmine-node/.travis.yml | 6 +
blackberry10/node_modules/jasmine-node/LICENSE | 22 +
.../node_modules/jasmine-node/README.md | 161 +
.../node_modules/jasmine-node/bin/jasmine-node | 6 +
.../lib/jasmine-node/async-callback.js | 61 +
.../jasmine-node/lib/jasmine-node/autotest.js | 85 +
.../jasmine-node/lib/jasmine-node/cli.js | 250 +
.../jasmine-node/lib/jasmine-node/cs.js | 160 +
.../jasmine-node/lib/jasmine-node/index.js | 174 +
.../lib/jasmine-node/jasmine-1.3.1.js | 2600 +
.../jasmine-node/lib/jasmine-node/reporter.js | 276 +
.../lib/jasmine-node/requirejs-runner.js | 87 +
.../lib/jasmine-node/requirejs-spec-loader.js | 48 +
.../jasmine-node/requirejs-wrapper-template.js | 78 +
.../lib/jasmine-node/spec-collection.js | 44 +
.../jasmine-node/node_modules/.bin/cake | 1 +
.../jasmine-node/node_modules/.bin/coffee | 1 +
.../jasmine-node/node_modules/.bin/r.js | 1 +
.../node_modules/coffee-script/.npmignore | 11 +
.../node_modules/coffee-script/CNAME | 1 +
.../node_modules/coffee-script/CONTRIBUTING.md | 9 +
.../node_modules/coffee-script/LICENSE | 22 +
.../node_modules/coffee-script/README | 51 +
.../node_modules/coffee-script/Rakefile | 79 +
.../node_modules/coffee-script/bin/cake | 7 +
.../node_modules/coffee-script/bin/coffee | 7 +
.../coffee-script/lib/coffee-script/browser.js | 118 +
.../coffee-script/lib/coffee-script/cake.js | 114 +
.../lib/coffee-script/coffee-script.js | 358 +
.../coffee-script/lib/coffee-script/command.js | 526 +
.../coffee-script/lib/coffee-script/grammar.js | 625 +
.../coffee-script/lib/coffee-script/helpers.js | 223 +
.../coffee-script/lib/coffee-script/index.js | 11 +
.../coffee-script/lib/coffee-script/lexer.js | 889 +
.../coffee-script/lib/coffee-script/nodes.js | 3048 +
.../coffee-script/lib/coffee-script/optparse.js | 139 +
.../coffee-script/lib/coffee-script/parser.js | 610 +
.../coffee-script/lib/coffee-script/repl.js | 159 +
.../coffee-script/lib/coffee-script/rewriter.js | 485 +
.../coffee-script/lib/coffee-script/scope.js | 146 +
.../lib/coffee-script/sourcemap.js | 161 +
.../node_modules/coffee-script/package.json | 50 +
.../node_modules/gaze/.editorconfig | 10 +
.../jasmine-node/node_modules/gaze/.jshintrc | 14 +
.../jasmine-node/node_modules/gaze/.npmignore | 1 +
.../jasmine-node/node_modules/gaze/.travis.yml | 6 +
.../jasmine-node/node_modules/gaze/AUTHORS | 5 +
.../jasmine-node/node_modules/gaze/Gruntfile.js | 32 +
.../jasmine-node/node_modules/gaze/LICENSE-MIT | 22 +
.../jasmine-node/node_modules/gaze/README.md | 172 +
.../node_modules/gaze/benchmarks/gaze100s.js | 46 +
.../jasmine-node/node_modules/gaze/lib/gaze.js | 466 +
.../gaze/node_modules/fileset/.npmignore | 1 +
.../gaze/node_modules/fileset/.travis.yml | 5 +
.../gaze/node_modules/fileset/LICENSE-MIT | 22 +
.../gaze/node_modules/fileset/README.md | 87 +
.../gaze/node_modules/fileset/lib/fileset.js | 64 +
.../fileset/node_modules/glob/.npmignore | 2 +
.../fileset/node_modules/glob/.travis.yml | 3 +
.../fileset/node_modules/glob/LICENSE | 27 +
.../fileset/node_modules/glob/README.md | 250 +
.../fileset/node_modules/glob/examples/g.js | 9 +
.../node_modules/glob/examples/usr-local.js | 9 +
.../fileset/node_modules/glob/glob.js | 675 +
.../glob/node_modules/graceful-fs/.npmignore | 1 +
.../glob/node_modules/graceful-fs/LICENSE | 27 +
.../glob/node_modules/graceful-fs/README.md | 33 +
.../node_modules/graceful-fs/graceful-fs.js | 152 +
.../glob/node_modules/graceful-fs/package.json | 52 +
.../glob/node_modules/graceful-fs/polyfills.js | 228 +
.../glob/node_modules/graceful-fs/test/open.js | 39 +
.../glob/node_modules/inherits/LICENSE | 14 +
.../glob/node_modules/inherits/README.md | 42 +
.../glob/node_modules/inherits/inherits.js | 1 +
.../node_modules/inherits/inherits_browser.js | 23 +
.../glob/node_modules/inherits/package.json | 43 +
.../glob/node_modules/inherits/test.js | 25 +
.../fileset/node_modules/glob/package.json | 43 +
.../fileset/node_modules/glob/test/00-setup.js | 176 +
.../node_modules/glob/test/bash-comparison.js | 63 +
.../node_modules/glob/test/bash-results.json | 350 +
.../fileset/node_modules/glob/test/cwd-test.js | 55 +
.../node_modules/glob/test/globstar-match.js | 19 +
.../fileset/node_modules/glob/test/mark.js | 74 +
.../node_modules/glob/test/nocase-nomagic.js | 113 +
.../node_modules/glob/test/pause-resume.js | 73 +
.../node_modules/glob/test/root-nomount.js | 39 +
.../fileset/node_modules/glob/test/root.js | 46 +
.../fileset/node_modules/glob/test/stat.js | 32 +
.../node_modules/glob/test/zz-cleanup.js | 11 +
.../gaze/node_modules/fileset/package.json | 34 +
.../fileset/tests/fixtures/an (odd) filename.js | 1 +
.../gaze/node_modules/fileset/tests/helper.js | 61 +
.../gaze/node_modules/fileset/tests/test.js | 133 +
.../gaze/node_modules/minimatch/LICENSE | 23 +
.../gaze/node_modules/minimatch/README.md | 218 +
.../gaze/node_modules/minimatch/minimatch.js | 1079 +
.../minimatch/node_modules/lru-cache/.npmignore | 1 +
.../minimatch/node_modules/lru-cache/AUTHORS | 8 +
.../minimatch/node_modules/lru-cache/LICENSE | 23 +
.../minimatch/node_modules/lru-cache/README.md | 97 +
.../node_modules/lru-cache/lib/lru-cache.js | 257 +
.../node_modules/lru-cache/package.json | 62 +
.../minimatch/node_modules/lru-cache/s.js | 25 +
.../node_modules/lru-cache/test/basic.js | 329 +
.../node_modules/lru-cache/test/foreach.js | 52 +
.../node_modules/lru-cache/test/memory-leak.js | 50 +
.../minimatch/node_modules/sigmund/LICENSE | 27 +
.../minimatch/node_modules/sigmund/README.md | 53 +
.../minimatch/node_modules/sigmund/bench.js | 283 +
.../minimatch/node_modules/sigmund/package.json | 41 +
.../minimatch/node_modules/sigmund/sigmund.js | 39 +
.../node_modules/sigmund/test/basic.js | 24 +
.../gaze/node_modules/minimatch/package.json | 39 +
.../gaze/node_modules/minimatch/test/basic.js | 399 +
.../node_modules/minimatch/test/brace-expand.js | 33 +
.../gaze/node_modules/minimatch/test/caching.js | 14 +
.../node_modules/minimatch/test/defaults.js | 274 +
.../jasmine-node/node_modules/gaze/package.json | 70 +
.../node_modules/gaze/test/add_test.js | 50 +
.../node_modules/gaze/test/api_test.js | 38 +
.../gaze/test/fixtures/Project (LO)/one.js | 1 +
.../gaze/test/fixtures/nested/one.js | 1 +
.../gaze/test/fixtures/nested/sub/two.js | 1 +
.../gaze/test/fixtures/nested/sub2/two.js | 1 +
.../gaze/test/fixtures/nested/three.js | 1 +
.../node_modules/gaze/test/fixtures/one.js | 1 +
.../node_modules/gaze/test/fixtures/sub/one.js | 1 +
.../node_modules/gaze/test/fixtures/sub/two.js | 1 +
.../node_modules/gaze/test/matching_test.js | 57 +
.../node_modules/gaze/test/patterns_test.js | 42 +
.../node_modules/gaze/test/relative_test.js | 28 +
.../node_modules/gaze/test/rename_test.js | 43 +
.../node_modules/gaze/test/safewrite_test.js | 61 +
.../node_modules/gaze/test/watch_test.js | 207 +
.../node_modules/jasmine-reporters/.npmignore | 2 +
.../node_modules/jasmine-reporters/LICENSE | 21 +
.../jasmine-reporters/README.markdown | 52 +
.../jasmine-reporters/ext/env.rhino.1.2.js | 13989 +
.../jasmine-reporters/ext/jasmine-html.js | 182 +
.../jasmine-reporters/ext/jasmine.css | 166 +
.../jasmine-reporters/ext/jasmine.js | 2421 +
.../jasmine-reporters/ext/jline.jar | Bin 0 -> 46424 bytes
.../node_modules/jasmine-reporters/ext/js.jar | Bin 0 -> 871260 bytes
.../node_modules/jasmine-reporters/package.json | 24 +
.../src/jasmine.console_reporter.js | 142 +
.../src/jasmine.junit_reporter.js | 200 +
.../src/jasmine.teamcity_reporter.js | 139 +
.../jasmine-reporters/src/load_reporters.js | 3 +
.../test/JUnitXmlReporterSpec.js | 214 +
.../test/console_reporter.html | 36 +
.../jasmine-reporters/test/envjs.bootstrap.js | 14 +
.../jasmine-reporters/test/envjs.runner.sh | 7 +
.../test/junit_xml_reporter.html | 23 +
.../test/phantomjs-testrunner.js | 183 +
.../jasmine-reporters/test/phantomjs.runner.sh | 36 +
.../test/teamcity_reporter.html | 36 +
.../jasmine-node/node_modules/mkdirp/.npmignore | 2 +
.../node_modules/mkdirp/.travis.yml | 5 +
.../jasmine-node/node_modules/mkdirp/LICENSE | 21 +
.../node_modules/mkdirp/examples/pow.js | 6 +
.../jasmine-node/node_modules/mkdirp/index.js | 82 +
.../node_modules/mkdirp/package.json | 33 +
.../node_modules/mkdirp/readme.markdown | 63 +
.../node_modules/mkdirp/test/chmod.js | 38 +
.../node_modules/mkdirp/test/clobber.js | 37 +
.../node_modules/mkdirp/test/mkdirp.js | 28 +
.../node_modules/mkdirp/test/perm.js | 32 +
.../node_modules/mkdirp/test/perm_sync.js | 39 +
.../node_modules/mkdirp/test/race.js | 41 +
.../node_modules/mkdirp/test/rel.js | 32 +
.../node_modules/mkdirp/test/return.js | 25 +
.../node_modules/mkdirp/test/return_sync.js | 24 +
.../node_modules/mkdirp/test/root.js | 18 +
.../node_modules/mkdirp/test/sync.js | 32 +
.../node_modules/mkdirp/test/umask.js | 28 +
.../node_modules/mkdirp/test/umask_sync.js | 32 +
.../node_modules/requirejs/README.md | 9 +
.../node_modules/requirejs/bin/r.js | 25757 ++
.../node_modules/requirejs/package.json | 43 +
.../node_modules/requirejs/require.js | 2053 +
.../node_modules/underscore/.npmignore | 6 +
.../node_modules/underscore/.travis.yml | 5 +
.../jasmine-node/node_modules/underscore/CNAME | 1 +
.../node_modules/underscore/CONTRIBUTING.md | 9 +
.../node_modules/underscore/LICENSE | 23 +
.../node_modules/underscore/README.md | 22 +
.../node_modules/underscore/favicon.ico | Bin 0 -> 1406 bytes
.../node_modules/underscore/index.js | 1 +
.../node_modules/underscore/package.json | 40 +
.../node_modules/underscore/underscore-min.map | 1 +
.../node_modules/underscore/underscore.js | 1246 +
.../node_modules/walkdir/.jshintignore | 3 +
.../node_modules/walkdir/.npmignore | 2 +
.../node_modules/walkdir/.travis.yml | 5 +
.../jasmine-node/node_modules/walkdir/license | 10 +
.../node_modules/walkdir/package.json | 45 +
.../jasmine-node/node_modules/walkdir/readme.md | 160 +
.../jasmine-node/node_modules/walkdir/test.sh | 19 +
.../node_modules/walkdir/test/async.js | 62 +
.../walkdir/test/comparison/find.js | 33 +
.../walkdir/test/comparison/find.py | 26 +
.../walkdir/test/comparison/finditsynctest.js | 15 +
.../walkdir/test/comparison/findittest.js | 14 +
.../walkdir/test/comparison/fstream.js | 24 +
.../test/comparison/install_test_deps.sh | 1 +
.../node_modules/walkdir/test/comparison/lsr.js | 18 +
.../walkdir/test/comparison/package.json | 10 +
.../node_modules/walkdir/test/dir/foo/a/b/c/w | 0
.../node_modules/walkdir/test/dir/foo/a/b/z | 0
.../node_modules/walkdir/test/dir/foo/a/y | 0
.../node_modules/walkdir/test/dir/foo/x | 0
.../walkdir/test/dir/symlinks/dir1/file1 | 0
.../walkdir/test/dir/symlinks/dir2/file2 | 0
.../node_modules/walkdir/test/dir/symlinks/file | 0
.../node_modules/walkdir/test/endearly.js | 19 +
.../node_modules/walkdir/test/max_depth.js | 27 +
.../node_modules/walkdir/test/no_recurse.js | 25 +
.../node_modules/walkdir/test/nofailemptydir.js | 34 +
.../node_modules/walkdir/test/pauseresume.js | 36 +
.../node_modules/walkdir/test/symlink.js | 37 +
.../node_modules/walkdir/test/sync.js | 50 +
.../node_modules/walkdir/walkdir.js | 233 +
.../node_modules/jasmine-node/package.json | 56 +
.../node_modules/jasmine-node/scripts/specs | 37 +
.../spec-requirejs-coffee/RequireCsSpec.coffee | 5 +
.../spec-requirejs-coffee/RequireJsSpec.coffee | 5 +
.../spec-requirejs-coffee/requirecs.sut.coffee | 3 +
.../spec-requirejs-coffee/requirejs-setup.js | 13 +
.../spec-requirejs/requirejs.spec.js | 19 +
.../spec-requirejs/requirejs.sut.js | 8 +
.../jasmine-node/spec/AsyncSpec.coffee | 11 +
.../jasmine-node/spec/CoffeeSpec.coffee | 4 +
.../jasmine-node/spec/GrammarHelper.coffee | 22 +
.../jasmine-node/spec/HelperSpec.coffee | 6 +
.../jasmine-node/spec/SampleSpecs.js | 25 +
.../node_modules/jasmine-node/spec/TestSpec.js | 82 +
.../node_modules/jasmine-node/spec/TimerSpec.js | 34 +
.../jasmine-node/spec/async-callback_spec.js | 174 +
.../jasmine-node/spec/helper_spec.js | 7 +
.../spec/litcoffee/Litcoffee.spec.litcoffee | 9 +
.../jasmine-node/spec/nested.js/NestedSpec.js | 5 +
.../jasmine-node/spec/nested/NestedSpec.js | 5 +
.../spec/nested/uber-nested/UberNestedSpec.js | 11 +
.../jasmine-node/spec/reporter_spec.js | 476 +
.../jasmine-node/spec/sample_helper.js | 15 +
blackberry10/node_modules/jasmine-node/specs.sh | 37 +
blackberry10/node_modules/localize/README.md | 267 +
.../node_modules/localize/bin/translations.json | 6 +
.../node_modules/localize/bin/xlocalize.js | 139 +
.../node_modules/localize/lib/localize.js | 405 +
blackberry10/node_modules/localize/package.json | 38 +
.../node_modules/localize/test/localize.test.js | 179 +
.../translations/subsitution/translations.json | 8 +
.../test/translations/translations.json | 5 +
.../translations/translations/helloWorld.es.txt | 1 +
.../translations/translations/helloWorld.txt | 1 +
.../localize/test/xlocalize.test.sh | 37 +
.../localize/test/xlocalize.testfile1.json | 8 +
.../localize/test/xlocalize.testfile2.json | 8 +
.../localize/test/xlocalize.testfile3.json | 9 +
.../localize/test/xlocalize.testfile4.json | 9 +
.../localize/test/xlocalize/subdir/test2.js | 3 +
.../localize/test/xlocalize/test.html | 13 +
blackberry10/node_modules/net-ping/.hgignore | 2 +
blackberry10/node_modules/net-ping/.hgtags | 18 +
blackberry10/node_modules/net-ping/README.md | 473 +
blackberry10/node_modules/net-ping/index.js | 526 +
.../net-ping/node_modules/raw-socket/.npmignore | 5 +
.../net-ping/node_modules/raw-socket/README.md | 651 +
.../node_modules/raw-socket/binding.gyp | 15 +
.../net-ping/node_modules/raw-socket/index.js | 216 +
.../node_modules/raw-socket/package.json | 52 +
.../net-ping/node_modules/raw-socket/src/raw.cc | 771 +
.../net-ping/node_modules/raw-socket/src/raw.h | 100 +
blackberry10/node_modules/net-ping/package.json | 48 +
blackberry10/node_modules/plugman/.npmignore | 2 +
.../node_modules/plugman/.reviewboardrc | 8 +
blackberry10/node_modules/plugman/LICENSE | 14 +
blackberry10/node_modules/plugman/README.md | 163 +
blackberry10/node_modules/plugman/doc/help.txt | 35 +
blackberry10/node_modules/plugman/main.js | 95 +
.../node_modules/plugman/node_modules/.bin/nopt | 1 +
.../plugman/node_modules/.bin/semver | 1 +
.../node_modules/bplist-parser/.npmignore | 8 +
.../node_modules/bplist-parser/README.md | 47 +
.../node_modules/bplist-parser/bplistParser.js | 309 +
.../node_modules/bplist-parser/package.json | 33 +
.../bplist-parser/test/airplay.bplist | Bin 0 -> 341 bytes
.../bplist-parser/test/iTunes-small.bplist | Bin 0 -> 24433 bytes
.../bplist-parser/test/parseTest.js | 120 +
.../bplist-parser/test/sample1.bplist | Bin 0 -> 605 bytes
.../bplist-parser/test/sample2.bplist | Bin 0 -> 384 bytes
.../node_modules/bplist-parser/test/uid.bplist | Bin 0 -> 365 bytes
.../bplist-parser/test/utf16.bplist | Bin 0 -> 1273 bytes
.../plugman/node_modules/dep-graph/.npmignore | 1 +
.../plugman/node_modules/dep-graph/Cakefile | 51 +
.../plugman/node_modules/dep-graph/README.mdown | 40 +
.../node_modules/dep-graph/docs/dep-graph.html | 44 +
.../node_modules/dep-graph/docs/docco.css | 186 +
.../node_modules/dep-graph/lib/dep-graph.js | 115 +
.../node_modules/underscore/.npmignore | 3 +
.../dep-graph/node_modules/underscore/LICENSE | 22 +
.../dep-graph/node_modules/underscore/README | 19 +
.../node_modules/underscore/index.html | 1726 +
.../dep-graph/node_modules/underscore/index.js | 1 +
.../node_modules/underscore/package.json | 31 +
.../node_modules/underscore/underscore-min.js | 30 +
.../node_modules/underscore/underscore.js | 958 +
.../plugman/node_modules/dep-graph/package.json | 30 +
.../node_modules/dep-graph/src/dep-graph.coffee | 59 +
.../node_modules/dep-graph/test/test.coffee | 50 +
.../plugman/node_modules/glob/.npmignore | 2 +
.../plugman/node_modules/glob/.travis.yml | 3 +
.../plugman/node_modules/glob/LICENSE | 27 +
.../plugman/node_modules/glob/README.md | 250 +
.../plugman/node_modules/glob/examples/g.js | 9 +
.../node_modules/glob/examples/usr-local.js | 9 +
.../plugman/node_modules/glob/glob.js | 675 +
.../glob/node_modules/inherits/LICENSE | 14 +
.../glob/node_modules/inherits/README.md | 42 +
.../glob/node_modules/inherits/inherits.js | 1 +
.../node_modules/inherits/inherits_browser.js | 23 +
.../glob/node_modules/inherits/package.json | 39 +
.../glob/node_modules/inherits/test.js | 25 +
.../glob/node_modules/minimatch/LICENSE | 23 +
.../glob/node_modules/minimatch/README.md | 218 +
.../glob/node_modules/minimatch/minimatch.js | 1079 +
.../minimatch/node_modules/lru-cache/.npmignore | 1 +
.../minimatch/node_modules/lru-cache/AUTHORS | 8 +
.../minimatch/node_modules/lru-cache/LICENSE | 23 +
.../minimatch/node_modules/lru-cache/README.md | 97 +
.../node_modules/lru-cache/lib/lru-cache.js | 257 +
.../node_modules/lru-cache/package.json | 62 +
.../minimatch/node_modules/lru-cache/s.js | 25 +
.../node_modules/lru-cache/test/basic.js | 329 +
.../node_modules/lru-cache/test/foreach.js | 52 +
.../node_modules/lru-cache/test/memory-leak.js | 50 +
.../minimatch/node_modules/sigmund/LICENSE | 27 +
.../minimatch/node_modules/sigmund/README.md | 53 +
.../minimatch/node_modules/sigmund/bench.js | 283 +
.../minimatch/node_modules/sigmund/package.json | 41 +
.../minimatch/node_modules/sigmund/sigmund.js | 39 +
.../node_modules/sigmund/test/basic.js | 24 +
.../glob/node_modules/minimatch/package.json | 39 +
.../glob/node_modules/minimatch/test/basic.js | 399 +
.../node_modules/minimatch/test/brace-expand.js | 33 +
.../glob/node_modules/minimatch/test/caching.js | 14 +
.../node_modules/minimatch/test/defaults.js | 274 +
.../plugman/node_modules/glob/package.json | 38 +
.../plugman/node_modules/glob/test/00-setup.js | 176 +
.../node_modules/glob/test/bash-comparison.js | 63 +
.../node_modules/glob/test/bash-results.json | 349 +
.../plugman/node_modules/glob/test/cwd-test.js | 55 +
.../node_modules/glob/test/globstar-match.js | 19 +
.../plugman/node_modules/glob/test/mark.js | 74 +
.../node_modules/glob/test/nocase-nomagic.js | 113 +
.../node_modules/glob/test/pause-resume.js | 73 +
.../node_modules/glob/test/root-nomount.js | 39 +
.../plugman/node_modules/glob/test/root.js | 46 +
.../plugman/node_modules/glob/test/stat.js | 32 +
.../node_modules/glob/test/zz-cleanup.js | 11 +
.../plugman/node_modules/ncallbacks/README.md | 17 +
.../node_modules/ncallbacks/ncallbacks.js | 16 +
.../node_modules/ncallbacks/package.json | 23 +
.../plugman/node_modules/nopt/.npmignore | 0
.../plugman/node_modules/nopt/LICENSE | 23 +
.../plugman/node_modules/nopt/README.md | 208 +
.../plugman/node_modules/nopt/bin/nopt.js | 44 +
.../node_modules/nopt/examples/my-program.js | 30 +
.../plugman/node_modules/nopt/lib/nopt.js | 552 +
.../nopt/node_modules/abbrev/LICENSE | 23 +
.../nopt/node_modules/abbrev/README.md | 23 +
.../nopt/node_modules/abbrev/lib/abbrev.js | 111 +
.../nopt/node_modules/abbrev/package.json | 28 +
.../plugman/node_modules/nopt/package.json | 35 +
.../plugman/node_modules/osenv/LICENSE | 25 +
.../plugman/node_modules/osenv/README.md | 63 +
.../plugman/node_modules/osenv/osenv.js | 80 +
.../plugman/node_modules/osenv/package.json | 42 +
.../plugman/node_modules/osenv/test/unix.js | 76 +
.../plugman/node_modules/osenv/test/windows.js | 82 +
.../plugman/node_modules/plist/.npmignore | 2 +
.../plugman/node_modules/plist/LICENSE | 22 +
.../plugman/node_modules/plist/README.md | 62 +
.../plugman/node_modules/plist/lib/plist.js | 301 +
.../plist/node_modules/xmlbuilder/.npmignore | 8 +
.../plist/node_modules/xmlbuilder/README.md | 73 +
.../node_modules/xmlbuilder/lib/XMLBuilder.js | 119 +
.../node_modules/xmlbuilder/lib/XMLFragment.js | 422 +
.../plist/node_modules/xmlbuilder/lib/index.js | 15 +
.../plist/node_modules/xmlbuilder/package.json | 41 +
.../plist/node_modules/xmldom/.npmignore | 2 +
.../plist/node_modules/xmldom/.project | 11 +
.../plist/node_modules/xmldom/.travis.yml | 18 +
.../plist/node_modules/xmldom/__package__.js | 4 +
.../plist/node_modules/xmldom/changelog | 14 +
.../plist/node_modules/xmldom/component.json | 10 +
.../plist/node_modules/xmldom/dom-parser.js | 253 +
.../plist/node_modules/xmldom/dom.js | 1138 +
.../plist/node_modules/xmldom/package.json | 73 +
.../plist/node_modules/xmldom/readme.md | 213 +
.../plist/node_modules/xmldom/sax.js | 564 +
.../plist/node_modules/xmldom/t/cover | 18 +
.../node_modules/xmldom/t/dom/require.t.js | 5 +
.../plist/node_modules/xmldom/t/test | 17 +
.../node_modules/xmldom/test/3rd-cases/index.js | 1 +
.../node_modules/xmldom/test/3rd-cases/mock.js | 1 +
.../node_modules/xmldom/test/3rd-cases/o3xml.js | 21 +
.../xmldom/test/big-file-performance.js | 152 +
.../plist/node_modules/xmldom/test/dom/attr.js | 64 +
.../plist/node_modules/xmldom/test/dom/clone.js | 22 +
.../node_modules/xmldom/test/dom/element.js | 139 +
.../node_modules/xmldom/test/dom/fragment.js | 15 +
.../plist/node_modules/xmldom/test/dom/index.js | 5 +
.../node_modules/xmldom/test/dom/level3.js | 8 +
.../node_modules/xmldom/test/dom/serializer.js | 14 +
.../plist/node_modules/xmldom/test/error.js | 71 +
.../node_modules/xmldom/test/html/normalize.js | 89 +
.../plist/node_modules/xmldom/test/index.js | 63 +
.../plist/node_modules/xmldom/test/locator.js | 50 +
.../plist/node_modules/xmldom/test/namespace.js | 32 +
.../plist/node_modules/xmldom/test/node.js | 102 +
.../node_modules/xmldom/test/parse-element.js | 31 +
.../plist/node_modules/xmldom/test/simple.js | 11 +
.../plist/node_modules/xmldom/test/test.js | 24 +
.../plist/node_modules/xmldom/test/test.xml | 19719 +
.../plugman/node_modules/plist/package.json | 58 +
.../node_modules/plist/tests/Cordova.plist | 87 +
.../node_modules/plist/tests/Xcode-Info.plist | 49 +
.../plist/tests/Xcode-PhoneGap.plist | 55 +
.../node_modules/plist/tests/airplay.xml | 38 +
.../node_modules/plist/tests/iTunes-BIG.xml | 299484 ++++++++++++++++
.../node_modules/plist/tests/iTunes-small.xml | 1704 +
.../node_modules/plist/tests/sample1.plist | 35 +
.../node_modules/plist/tests/sample2.plist | 45 +
.../node_modules/plist/tests/test-base64.js | 28 +
.../node_modules/plist/tests/test-big-xml.js | 28 +
.../node_modules/plist/tests/test-build.js | 171 +
.../node_modules/plist/tests/test-parseFile.js | 52 +
.../plist/tests/test-parseString.js | 45 +
.../node_modules/plist/tests/utf8data.xml | 10 +
.../plugman/node_modules/semver/.npmignore | 1 +
.../plugman/node_modules/semver/LICENSE | 27 +
.../plugman/node_modules/semver/Makefile | 24 +
.../plugman/node_modules/semver/README.md | 111 +
.../plugman/node_modules/semver/bin/semver | 119 +
.../plugman/node_modules/semver/foot.js | 6 +
.../plugman/node_modules/semver/head.js | 2 +
.../plugman/node_modules/semver/package.json | 31 +
.../plugman/node_modules/semver/r.js | 4 +
.../node_modules/semver/semver.browser.js | 851 +
.../node_modules/semver/semver.browser.js.gz | Bin 0 -> 6077 bytes
.../plugman/node_modules/semver/semver.js | 855 +
.../plugman/node_modules/semver/semver.min.js | 1 +
.../node_modules/semver/semver.min.js.gz | Bin 0 -> 2850 bytes
.../plugman/node_modules/semver/test/amd.js | 15 +
.../plugman/node_modules/semver/test/index.js | 533 +
.../node_modules/semver/test/no-module.js | 19 +
.../plugman/node_modules/underscore/.npmignore | 4 +
.../plugman/node_modules/underscore/.travis.yml | 5 +
.../plugman/node_modules/underscore/CNAME | 1 +
.../node_modules/underscore/CONTRIBUTING.md | 9 +
.../plugman/node_modules/underscore/LICENSE | 22 +
.../plugman/node_modules/underscore/README.md | 19 +
.../plugman/node_modules/underscore/favicon.ico | Bin 0 -> 1406 bytes
.../plugman/node_modules/underscore/index.html | 2467 +
.../plugman/node_modules/underscore/index.js | 1 +
.../node_modules/underscore/package.json | 35 +
.../node_modules/underscore/underscore-min.js | 1 +
.../node_modules/underscore/underscore.js | 1226 +
.../plugman/node_modules/xcode/.npmignore | 3 +
.../plugman/node_modules/xcode/AUTHORS | 6 +
.../plugman/node_modules/xcode/LICENSE | 14 +
.../plugman/node_modules/xcode/Makefile | 5 +
.../plugman/node_modules/xcode/README.md | 42 +
.../plugman/node_modules/xcode/index.js | 1 +
.../plugman/node_modules/xcode/lib/parseJob.js | 16 +
.../node_modules/xcode/lib/parser/pbxproj.js | 2680 +
.../node_modules/xcode/lib/parser/pbxproj.pegjs | 259 +
.../plugman/node_modules/xcode/lib/pbxFile.js | 94 +
.../node_modules/xcode/lib/pbxProject.js | 646 +
.../plugman/node_modules/xcode/lib/pbxWriter.js | 282 +
.../node_modules/xcode/node_modules/.bin/pegjs | 1 +
.../xcode/node_modules/node-uuid/.npmignore | 2 +
.../xcode/node_modules/node-uuid/LICENSE.md | 3 +
.../xcode/node_modules/node-uuid/README.md | 199 +
.../node_modules/node-uuid/benchmark/README.md | 53 +
.../node_modules/node-uuid/benchmark/bench.gnu | 174 +
.../node_modules/node-uuid/benchmark/bench.sh | 34 +
.../node-uuid/benchmark/benchmark-native.c | 34 +
.../node-uuid/benchmark/benchmark.js | 84 +
.../xcode/node_modules/node-uuid/package.json | 34 +
.../node_modules/node-uuid/test/compare_v1.js | 63 +
.../xcode/node_modules/node-uuid/test/test.html | 17 +
.../xcode/node_modules/node-uuid/test/test.js | 240 +
.../xcode/node_modules/node-uuid/uuid.js | 249 +
.../xcode/node_modules/pegjs/CHANGELOG | 146 +
.../xcode/node_modules/pegjs/LICENSE | 22 +
.../xcode/node_modules/pegjs/README.md | 226 +
.../xcode/node_modules/pegjs/VERSION | 1 +
.../xcode/node_modules/pegjs/bin/pegjs | 142 +
.../pegjs/examples/arithmetics.pegjs | 22 +
.../xcode/node_modules/pegjs/examples/css.pegjs | 554 +
.../pegjs/examples/javascript.pegjs | 1530 +
.../node_modules/pegjs/examples/json.pegjs | 120 +
.../xcode/node_modules/pegjs/lib/peg.js | 5141 +
.../xcode/node_modules/pegjs/package.json | 33 +
.../plugman/node_modules/xcode/package.json | 59 +
.../xcode/test/LibrarySearchPaths.js | 48 +
.../node_modules/xcode/test/addFramework.js | 145 +
.../node_modules/xcode/test/addHeaderFile.js | 98 +
.../node_modules/xcode/test/addResourceFile.js | 251 +
.../node_modules/xcode/test/addSourceFile.js | 157 +
.../node_modules/xcode/test/addStaticLibrary.js | 251 +
.../xcode/test/fixtures/buildFiles.json | 1 +
.../xcode/test/fixtures/full-project.json | 1 +
.../xcode/test/parser/build-config.js | 30 +
.../node_modules/xcode/test/parser/comments.js | 12 +
.../xcode/test/parser/file-references.js | 12 +
.../node_modules/xcode/test/parser/hash.js | 35 +
.../xcode/test/parser/header-search.js | 16 +
.../test/parser/projects/build-config.pbxproj | 112 +
.../test/parser/projects/build-files.pbxproj | 41 +
.../xcode/test/parser/projects/comments.pbxproj | 30 +
.../xcode/test/parser/projects/fail.pbxproj | 18 +
.../parser/projects/file-references.pbxproj | 45 +
.../xcode/test/parser/projects/full.pbxproj | 534 +
.../xcode/test/parser/projects/hash.pbxproj | 9 +
.../test/parser/projects/header-search.pbxproj | 47 +
.../test/parser/projects/nested-object.pbxproj | 39 +
.../parser/projects/section-entries.pbxproj | 28 +
.../xcode/test/parser/projects/section.pbxproj | 17 +
.../test/parser/projects/two-sections.pbxproj | 29 +
.../test/parser/projects/with_array.pbxproj | 18 +
.../xcode/test/parser/section-entries.js | 25 +
.../node_modules/xcode/test/parser/section.js | 28 +
.../xcode/test/parser/two-sections.js | 18 +
.../xcode/test/parser/with_array.js | 39 +
.../plugman/node_modules/xcode/test/pbxFile.js | 203 +
.../node_modules/xcode/test/pbxProject.js | 185 +
.../node_modules/xcode/test/pbxWriter.js | 75 +
.../node_modules/xcode/test/removeFramework.js | 103 +
.../node_modules/xcode/test/removeHeaderFile.js | 105 +
.../xcode/test/removeResourceFile.js | 184 +
.../node_modules/xcode/test/removeSourceFile.js | 131 +
blackberry10/node_modules/plugman/package.json | 84 +
.../node_modules/plugman/plugin_spec.md | 397 +
blackberry10/node_modules/plugman/plugman.js | 35 +
.../node_modules/plugman/spec/fetch.spec.js | 63 +
.../node_modules/plugman/spec/install.spec.js | 129 +
.../plugman/spec/platforms/android.spec.js | 121 +
.../plugman/spec/platforms/blackberry10.spec.js | 148 +
.../plugman/spec/platforms/common.spec.js | 134 +
.../plugman/spec/platforms/ios.spec.js | 366 +
.../plugman/spec/platforms/wp7.spec.js | 128 +
.../plugman/spec/platforms/wp8.spec.js | 128 +
.../node_modules/plugman/spec/plugins/.gitkeep | 0
.../plugman/spec/plugins/AndroidJS/plugin.xml | 34 +
.../spec/plugins/AndroidJS/www/android.js | 1 +
.../spec/plugins/ChildBrowser/plugin.xml | 142 +
.../ChildBrowser/src/android/ChildBrowser.java | 19 +
.../src/ios/ChildBrowser.bundle/arrow_left.png | Bin 0 -> 2946 bytes
.../ios/ChildBrowser.bundle/arrow_left@2x.png | Bin 0 -> 2946 bytes
.../src/ios/ChildBrowser.bundle/arrow_right.png | Bin 0 -> 2946 bytes
.../ios/ChildBrowser.bundle/arrow_right@2x.png | Bin 0 -> 2946 bytes
.../src/ios/ChildBrowser.bundle/but_refresh.png | Bin 0 -> 3369 bytes
.../ios/ChildBrowser.bundle/but_refresh@2x.png | Bin 0 -> 3369 bytes
.../src/ios/ChildBrowser.bundle/compass.png | Bin 0 -> 3035 bytes
.../src/ios/ChildBrowser.bundle/compass@2x.png | Bin 0 -> 3035 bytes
.../ChildBrowser/src/ios/ChildBrowserCommand.h | 49 +
.../ChildBrowser/src/ios/ChildBrowserCommand.m | 86 +
.../src/ios/ChildBrowserViewController.h | 73 +
.../src/ios/ChildBrowserViewController.m | 239 +
.../src/ios/ChildBrowserViewController.xib | 875 +
.../ChildBrowser/src/ios/TargetDirTest.h | 20 +
.../ChildBrowser/src/ios/TargetDirTest.m | 1 +
.../src/ios/preserveDirs/PreserveDirsTest.h | 20 +
.../src/ios/preserveDirs/PreserveDirsTest.m | 1 +
.../plugins/ChildBrowser/www/childbrowser.js | 19 +
.../ChildBrowser/www/childbrowser/image.jpg | 1 +
.../ChildBrowser/www/childbrowser_file.html | 1 +
.../spec/plugins/ConfigTestPlugin/plugin.xml | 37 +
.../plugman/spec/plugins/DummyPlugin/plugin.xml | 126 +
.../DummyPlugin/src/android/DummyPlugin.java | 19 +
.../DummyPlugin/src/blackberry10/index.js | 19 +
.../DummyPlugin/src/ios/DummyPlugin.bundle | 0
.../DummyPlugin/src/ios/DummyPluginCommand.h | 0
.../DummyPlugin/src/ios/DummyPluginCommand.m | 0
.../DummyPlugin/src/ios/SourceWithFramework.m | 0
.../plugins/DummyPlugin/src/ios/TargetDirTest.h | 0
.../plugins/DummyPlugin/src/ios/TargetDirTest.m | 0
.../DummyPlugin/src/ios/libsqlite3.dylib | 0
.../plugins/DummyPlugin/src/wp7/DummyPlugin.cs | 19 +
.../plugins/DummyPlugin/src/wp8/DummyPlugin.cs | 19 +
.../spec/plugins/DummyPlugin/www/dummyplugin.js | 19 +
.../DummyPlugin/www/dummyplugin/image.jpg | 1 +
.../spec/plugins/EnginePlugin/plugin.xml | 30 +
.../spec/plugins/FaultyPlugin/plugin.xml | 119 +
.../FaultyPlugin/src/android/FaultyPlugin.java | 19 +
.../FaultyPlugin/src/blackberry10/client.js | 0
.../plugins/FaultyPlugin/src/ios/FaultyPlugin.h | 49 +
.../plugins/FaultyPlugin/src/ios/FaultyPlugin.m | 86 +
.../FaultyPlugin/src/wp7/FaultyPlugin.cs | 19 +
.../FaultyPlugin/src/wp8/FaultyPlugin.cs | 19 +
.../spec/plugins/PluginsPlistOnly/plugin.xml | 31 +
.../spec/plugins/VariablePlugin/plugin.xml | 47 +
.../spec/plugins/WebNotifications/plugin.xml | 47 +
.../WebNotifications/src/ios/AppDelegate.m.diff | 18 +
.../WebNotifications/src/ios/WebNotifications.h | 35 +
.../WebNotifications/src/ios/WebNotifications.m | 124 +
.../WebNotifications/www/webnotifications.js | 123 +
.../spec/plugins/WeblessPlugin/plugin.xml | 83 +
.../src/android/WeblessPlugin.java | 19 +
.../src/ios/WeblessPlugin.bundle/arrow_left.png | Bin 0 -> 2946 bytes
.../ios/WeblessPlugin.bundle/arrow_left@2x.png | Bin 0 -> 2946 bytes
.../ios/WeblessPlugin.bundle/arrow_right.png | Bin 0 -> 2946 bytes
.../ios/WeblessPlugin.bundle/arrow_right@2x.png | Bin 0 -> 2946 bytes
.../ios/WeblessPlugin.bundle/but_refresh.png | Bin 0 -> 3369 bytes
.../ios/WeblessPlugin.bundle/but_refresh@2x.png | Bin 0 -> 3369 bytes
.../src/ios/WeblessPlugin.bundle/compass.png | Bin 0 -> 3035 bytes
.../src/ios/WeblessPlugin.bundle/compass@2x.png | Bin 0 -> 3035 bytes
.../src/ios/WeblessPluginCommand.h | 49 +
.../src/ios/WeblessPluginCommand.m | 86 +
.../src/ios/WeblessPluginViewController.h | 73 +
.../src/ios/WeblessPluginViewController.m | 239 +
.../src/ios/WeblessPluginViewController.xib | 875 +
.../spec/plugins/cordova.echo/.npmignore | 1 +
.../spec/plugins/cordova.echo/plugin.xml | 24 +
.../cordova.echo/src/blackberry10/index.js | 85 +
.../src/blackberry10/native/device/echoJnext.so | Bin 0 -> 1291818 bytes
.../blackberry10/native/public/json/autolink.h | 19 +
.../blackberry10/native/public/json/config.h | 43 +
.../blackberry10/native/public/json/features.h | 42 +
.../blackberry10/native/public/json/forwards.h | 39 +
.../src/blackberry10/native/public/json/json.h | 10 +
.../blackberry10/native/public/json/reader.h | 196 +
.../src/blackberry10/native/public/json/value.h | 1069 +
.../blackberry10/native/public/json/writer.h | 174 +
.../native/public/json_batchallocator.h | 125 +
.../native/public/json_internalarray.inl | 448 +
.../native/public/json_internalmap.inl | 607 +
.../blackberry10/native/public/json_reader.cpp | 894 +
.../blackberry10/native/public/json_value.cpp | 1726 +
.../native/public/json_valueiterator.inl | 292 +
.../blackberry10/native/public/json_writer.cpp | 829 +
.../src/blackberry10/native/public/plugin.cpp | 320 +
.../src/blackberry10/native/public/plugin.h | 70 +
.../blackberry10/native/public/tokenizer.cpp | 222 +
.../src/blackberry10/native/public/tokenizer.h | 55 +
.../blackberry10/native/simulator/echoJnext.so | Bin 0 -> 231778 bytes
.../src/blackberry10/native/src/echo.cpp | 121 +
.../src/blackberry10/native/src/echo.hpp | 45 +
.../spec/plugins/cordova.echo/www/client.js | 53 +
.../spec/plugins/dependencies/A/plugin.xml | 60 +
.../plugins/dependencies/A/src/android/A.java | 0
.../dependencies/A/src/ios/APluginCommand.h | 0
.../dependencies/A/src/ios/APluginCommand.m | 0
.../spec/plugins/dependencies/A/www/plugin-a.js | 0
.../spec/plugins/dependencies/B/plugin.xml | 60 +
.../plugins/dependencies/B/src/android/B.java | 0
.../dependencies/B/src/ios/BPluginCommand.h | 0
.../dependencies/B/src/ios/BPluginCommand.m | 0
.../spec/plugins/dependencies/B/www/plugin-b.js | 0
.../spec/plugins/dependencies/C/plugin.xml | 57 +
.../plugins/dependencies/C/src/android/C.java | 0
.../dependencies/C/src/ios/CPluginCommand.h | 0
.../dependencies/C/src/ios/CPluginCommand.m | 0
.../spec/plugins/dependencies/C/www/plugin-c.js | 0
.../spec/plugins/dependencies/D/plugin.xml | 57 +
.../plugins/dependencies/D/src/android/D.java | 0
.../dependencies/D/src/ios/DPluginCommand.h | 0
.../dependencies/D/src/ios/DPluginCommand.m | 0
.../spec/plugins/dependencies/D/www/plugin-d.js | 0
.../spec/plugins/dependencies/E/plugin.xml | 57 +
.../plugins/dependencies/E/src/android/E.java | 0
.../dependencies/E/src/ios/EPluginCommand.h | 0
.../dependencies/E/src/ios/EPluginCommand.m | 0
.../spec/plugins/dependencies/E/www/plugin-e.js | 0
.../plugman/spec/plugins/dependencies/README.md | 5 +
.../spec/plugins/multiple-children/plugin.xml | 108 +
.../plugins/shared-deps-multi-child/plugin.xml | 34 +
.../node_modules/plugman/spec/prepare.spec.js | 84 +
.../node_modules/plugman/spec/projects/.gitkeep | 0
.../projects/android_one/AndroidManifest.xml | 71 +
.../projects/android_one/assets/www/.gitkeep | 0
.../projects/android_one/assets/www/cordova.js | 6848 +
.../projects/android_one/cordova/appinfo.jar | Bin 0 -> 1574 bytes
.../spec/projects/android_one/cordova/build | 23 +
.../spec/projects/android_one/cordova/clean | 23 +
.../projects/android_one/cordova/lib/cordova | 386 +
.../android_one/cordova/lib/install-device | 23 +
.../android_one/cordova/lib/install-emulator | 23 +
.../android_one/cordova/lib/list-devices | 23 +
.../cordova/lib/list-emulator-images | 23 +
.../cordova/lib/list-started-emulators | 23 +
.../android_one/cordova/lib/start-emulator | 23 +
.../spec/projects/android_one/cordova/log | 23 +
.../spec/projects/android_one/cordova/run | 23 +
.../spec/projects/android_one/cordova/version | 32 +
.../projects/android_one/res/xml/plugins.xml | 38 +
.../spec/projects/android_one/src/.gitkeep | 0
.../projects/android_two/AndroidManifest.xml | 69 +
.../projects/android_two/assets/www/.gitkeep | 0
.../projects/android_two/res/xml/config.xml | 54 +
.../spec/projects/android_two/src/.gitkeep | 0
.../android_two_no_perms/AndroidManifest.xml | 49 +
.../android_two_no_perms/assets/www/.gitkeep | 0
.../android_two_no_perms/res/xml/config.xml | 54 +
.../projects/android_two_no_perms/src/.gitkeep | 0
.../spec/projects/blackberry10/www/config.xml | 97 +
.../CordovaLib.xcodeproj/project.pbxproj | 636 +
.../SampleApp.xcodeproj/project.orig.pbxproj | 498 +
.../SampleApp.xcodeproj/project.pbxproj | 498 +
.../SampleApp/SampleApp-Info.plist | 78 +
.../ios-config-xml/SampleApp/config.xml | 59 +
.../spec/projects/ios-config-xml/www/.gitkeep | 0
.../CordovaLib.xcodeproj/project.pbxproj | 636 +
.../SampleApp.xcodeproj/project.orig.pbxproj | 498 +
.../SampleApp.xcodeproj/project.pbxproj | 498 +
.../projects/ios-plist/SampleApp/PhoneGap.plist | 53 +
.../ios-plist/SampleApp/SampleApp-Info.plist | 80 +
.../spec/projects/ios-plist/www/.gitkeep | 0
.../multiple-children/AndroidManifest.xml | 69 +
.../multiple-children/res/xml/plugins.xml | 38 +
.../spec/projects/wp7/CordovaAppProj.csproj | 100 +
.../projects/wp7/Properties/WMAppManifest.xml | 28 +
.../plugman/spec/projects/wp8/An_App.csproj | 201 +
.../projects/wp8/Properties/WMAppManifest.xml | 39 +
.../plugman/spec/projects/www-only/.gitkeep | 0
.../node_modules/plugman/spec/uninstall.spec.js | 237 +
.../plugman/spec/util/action-stack.spec.js | 53 +
.../plugman/spec/util/config-changes.spec.js | 437 +
.../plugman/spec/util/csproj.spec.js | 104 +
.../plugman/spec/util/dependencies.spec.js | 41 +
.../plugman/spec/util/plugins.spec.js | 71 +
.../plugman/spec/util/xml-helpers.spec.js | 128 +
blackberry10/node_modules/plugman/src/events.js | 3 +
blackberry10/node_modules/plugman/src/fetch.js | 77 +
blackberry10/node_modules/plugman/src/help.js | 7 +
.../node_modules/plugman/src/install.js | 316 +
.../node_modules/plugman/src/platforms.js | 7 +
.../plugman/src/platforms/android.js | 47 +
.../plugman/src/platforms/blackberry10.js | 68 +
.../plugman/src/platforms/common.js | 85 +
.../node_modules/plugman/src/platforms/ios.js | 179 +
.../node_modules/plugman/src/platforms/wp7.js | 56 +
.../node_modules/plugman/src/platforms/wp8.js | 56 +
.../node_modules/plugman/src/prepare.js | 180 +
.../node_modules/plugman/src/uninstall.js | 178 +
.../plugman/src/util/action-stack.js | 87 +
.../plugman/src/util/config-changes.js | 363 +
.../node_modules/plugman/src/util/csproj.js | 109 +
.../plugman/src/util/dependencies.js | 33 +
.../node_modules/plugman/src/util/fs.js | 34 +
.../node_modules/plugman/src/util/metadata.js | 19 +
.../plugman/src/util/plist-helpers.js | 88 +
.../node_modules/plugman/src/util/plugins.js | 82 +
.../plugman/src/util/search-and-replace.js | 37 +
.../plugman/src/util/xml-helpers.js | 164 +
.../node_modules/portchecker/.npmignore | 16 +
blackberry10/node_modules/portchecker/README | 34 +
blackberry10/node_modules/portchecker/index.js | 3 +
.../node_modules/portchecker/lib/portchecker.js | 104 +
.../node_modules/portchecker/package.json | 28 +
blackberry10/node_modules/prompt/.jshintrc | 54 +
blackberry10/node_modules/prompt/.npmignore | 3 +
blackberry10/node_modules/prompt/.travis.yml | 9 +
blackberry10/node_modules/prompt/CHANGELOG.md | 13 +
blackberry10/node_modules/prompt/LICENSE | 19 +
blackberry10/node_modules/prompt/README.md | 293 +
blackberry10/node_modules/prompt/docs/docco.css | 194 +
.../node_modules/prompt/docs/prompt.html | 296 +
.../prompt/examples/add-properties.js | 35 +
.../prompt/examples/existing-properties.js | 35 +
.../node_modules/prompt/examples/history.js | 44 +
.../prompt/examples/nested-properties-prompt.js | 37 +
.../node_modules/prompt/examples/old-schema.js | 36 +
.../prompt/examples/override-validation.js | 52 +
.../node_modules/prompt/examples/password.js | 34 +
.../prompt/examples/prompt-override.js | 36 +
.../prompt/examples/property-prompt.js | 45 +
.../prompt/examples/simple-prompt.js | 25 +
.../prompt/examples/yes-or-no-prompt.js | 32 +
blackberry10/node_modules/prompt/lib/prompt.js | 756 +
.../prompt/node_modules/pkginfo/.npmignore | 2 +
.../prompt/node_modules/pkginfo/LICENSE | 19 +
.../prompt/node_modules/pkginfo/README.md | 86 +
.../prompt/node_modules/pkginfo/docs/docco.css | 194 +
.../node_modules/pkginfo/docs/pkginfo.html | 101 +
.../pkginfo/examples/all-properties.js | 19 +
.../pkginfo/examples/array-argument.js | 20 +
.../pkginfo/examples/multiple-properties.js | 19 +
.../pkginfo/examples/object-argument.js | 22 +
.../node_modules/pkginfo/examples/package.json | 10 +
.../pkginfo/examples/single-property.js | 19 +
.../pkginfo/examples/subdir/package.json | 11 +
.../node_modules/pkginfo/examples/target-dir.js | 20 +
.../prompt/node_modules/pkginfo/lib/pkginfo.js | 136 +
.../prompt/node_modules/pkginfo/package.json | 35 +
.../node_modules/pkginfo/test/pkginfo-test.js | 83 +
.../prompt/node_modules/read/.npmignore | 2 +
.../prompt/node_modules/read/LICENCE | 25 +
.../prompt/node_modules/read/README.md | 53 +
.../prompt/node_modules/read/lib/read.js | 113 +
.../read/node_modules/mute-stream/LICENSE | 27 +
.../read/node_modules/mute-stream/README.md | 68 +
.../read/node_modules/mute-stream/mute.js | 140 +
.../read/node_modules/mute-stream/package.json | 37 +
.../read/node_modules/mute-stream/test/basic.js | 207 +
.../prompt/node_modules/read/package.json | 35 +
.../node_modules/prompt/node_modules/read/rs.js | 4 +
.../prompt/node_modules/read/test/basic.js | 60 +
.../prompt/node_modules/read/test/defaults.js | 60 +
.../prompt/node_modules/read/test/many.js | 83 +
.../prompt/node_modules/revalidator/.npmignore | 2 +
.../prompt/node_modules/revalidator/.travis.yml | 11 +
.../node_modules/revalidator/CHANGELOG.md | 25 +
.../prompt/node_modules/revalidator/LICENSE | 179 +
.../prompt/node_modules/revalidator/README.md | 287 +
.../node_modules/revalidator/lib/revalidator.js | 409 +
.../node_modules/revalidator/package.json | 40 +
.../revalidator/test/validator-test.js | 399 +
.../prompt/node_modules/utile/.npmignore | 4 +
.../prompt/node_modules/utile/.travis.yml | 10 +
.../prompt/node_modules/utile/CHANGELOG.md | 16 +
.../prompt/node_modules/utile/LICENSE | 19 +
.../prompt/node_modules/utile/README.md | 87 +
.../prompt/node_modules/utile/lib/args.js | 46 +
.../prompt/node_modules/utile/lib/base64.js | 44 +
.../prompt/node_modules/utile/lib/file.js | 33 +
.../prompt/node_modules/utile/lib/format.js | 25 +
.../prompt/node_modules/utile/lib/index.js | 467 +
.../node_modules/utile/node_modules/.bin/ncp | 1 +
.../node_modules/utile/node_modules/.bin/rimraf | 1 +
.../utile/node_modules/async/.gitmodules | 9 +
.../utile/node_modules/async/.npmignore | 4 +
.../utile/node_modules/async/LICENSE | 19 +
.../utile/node_modules/async/Makefile | 25 +
.../utile/node_modules/async/README.md | 1021 +
.../utile/node_modules/async/index.js | 3 +
.../utile/node_modules/async/lib/async.js | 692 +
.../utile/node_modules/async/package.json | 31 +
.../utile/node_modules/deep-equal/.travis.yml | 4 +
.../node_modules/deep-equal/README.markdown | 61 +
.../utile/node_modules/deep-equal/index.js | 86 +
.../utile/node_modules/deep-equal/package.json | 66 +
.../utile/node_modules/deep-equal/test/cmp.js | 32 +
.../utile/node_modules/i/.npmignore | 3 +
.../utile/node_modules/i/.travis.yml | 9 +
.../node_modules/utile/node_modules/i/LICENSE | 18 +
.../node_modules/utile/node_modules/i/README.md | 174 +
.../utile/node_modules/i/lib/defaults.js | 63 +
.../utile/node_modules/i/lib/inflect.js | 11 +
.../utile/node_modules/i/lib/inflections.js | 116 +
.../utile/node_modules/i/lib/methods.js | 233 +
.../utile/node_modules/i/lib/native.js | 26 +
.../utile/node_modules/i/lib/util.js | 136 +
.../utile/node_modules/i/package.json | 61 +
.../node_modules/i/test/inflector/cases.js | 209 +
.../i/test/inflector/inflections-test.js | 87 +
.../i/test/inflector/methods-test.js | 342 +
.../node_modules/i/test/utils/array-test.js | 39 +
.../node_modules/i/test/utils/string-test.js | 88 +
.../utile/node_modules/mkdirp/.npmignore | 2 +
.../utile/node_modules/mkdirp/.travis.yml | 5 +
.../utile/node_modules/mkdirp/LICENSE | 21 +
.../utile/node_modules/mkdirp/examples/pow.js | 6 +
.../utile/node_modules/mkdirp/index.js | 82 +
.../utile/node_modules/mkdirp/package.json | 33 +
.../utile/node_modules/mkdirp/readme.markdown | 63 +
.../utile/node_modules/mkdirp/test/chmod.js | 38 +
.../utile/node_modules/mkdirp/test/clobber.js | 37 +
.../utile/node_modules/mkdirp/test/mkdirp.js | 28 +
.../utile/node_modules/mkdirp/test/perm.js | 32 +
.../utile/node_modules/mkdirp/test/perm_sync.js | 39 +
.../utile/node_modules/mkdirp/test/race.js | 41 +
.../utile/node_modules/mkdirp/test/rel.js | 32 +
.../utile/node_modules/mkdirp/test/return.js | 25 +
.../node_modules/mkdirp/test/return_sync.js | 24 +
.../utile/node_modules/mkdirp/test/root.js | 18 +
.../utile/node_modules/mkdirp/test/sync.js | 32 +
.../utile/node_modules/mkdirp/test/umask.js | 28 +
.../node_modules/mkdirp/test/umask_sync.js | 32 +
.../utile/node_modules/ncp/.npmignore | 4 +
.../utile/node_modules/ncp/.travis.yml | 6 +
.../utile/node_modules/ncp/LICENSE.md | 21 +
.../utile/node_modules/ncp/README.md | 46 +
.../node_modules/utile/node_modules/ncp/bin/ncp | 48 +
.../utile/node_modules/ncp/lib/ncp.js | 216 +
.../utile/node_modules/ncp/package.json | 40 +
.../utile/node_modules/ncp/test/fixtures/src/a | 1 +
.../utile/node_modules/ncp/test/fixtures/src/b | 1 +
.../utile/node_modules/ncp/test/fixtures/src/c | 0
.../utile/node_modules/ncp/test/fixtures/src/d | 0
.../utile/node_modules/ncp/test/fixtures/src/e | 0
.../utile/node_modules/ncp/test/fixtures/src/f | 0
.../node_modules/ncp/test/fixtures/src/sub/a | 1 +
.../node_modules/ncp/test/fixtures/src/sub/b | 0
.../utile/node_modules/ncp/test/ncp-test.js | 74 +
.../utile/node_modules/rimraf/AUTHORS | 6 +
.../utile/node_modules/rimraf/LICENSE | 23 +
.../utile/node_modules/rimraf/README.md | 26 +
.../utile/node_modules/rimraf/bin.js | 33 +
.../rimraf/node_modules/graceful-fs/.npmignore | 1 +
.../rimraf/node_modules/graceful-fs/LICENSE | 27 +
.../rimraf/node_modules/graceful-fs/README.md | 26 +
.../node_modules/graceful-fs/graceful-fs.js | 159 +
.../node_modules/graceful-fs/package.json | 48 +
.../node_modules/graceful-fs/polyfills.js | 228 +
.../node_modules/graceful-fs/test/open.js | 39 +
.../utile/node_modules/rimraf/package.json | 61 +
.../utile/node_modules/rimraf/rimraf.js | 184 +
.../utile/node_modules/rimraf/test/run.sh | 10 +
.../utile/node_modules/rimraf/test/setup.sh | 47 +
.../node_modules/rimraf/test/test-async.js | 5 +
.../utile/node_modules/rimraf/test/test-sync.js | 3 +
.../prompt/node_modules/utile/package.json | 44 +
.../prompt/node_modules/utile/test/file-test.js | 31 +
.../test/fixtures/read-json-file/config.json | 9 +
.../require-directory/directory/index.js | 2 +
.../fixtures/require-directory/helloWorld.js | 2 +
.../node_modules/utile/test/format-test.js | 31 +
.../utile/test/function-args-test.js | 104 +
.../node_modules/utile/test/helpers/macros.js | 37 +
.../utile/test/random-string-test.js | 39 +
.../utile/test/require-directory-test.js | 35 +
.../node_modules/utile/test/utile-test.js | 126 +
.../prompt/node_modules/winston/.npmignore | 6 +
.../prompt/node_modules/winston/.travis.yml | 12 +
.../prompt/node_modules/winston/LICENSE | 19 +
.../prompt/node_modules/winston/README.md | 790 +
.../node_modules/winston/docs/transports.md | 342 +
.../node_modules/winston/examples/couchdb.js | 18 +
.../node_modules/winston/examples/exception.js | 4 +
.../node_modules/winston/examples/raw-mode.js | 10 +
.../winston/examples/webhook-post.js | 17 +
.../prompt/node_modules/winston/lib/winston.js | 145 +
.../node_modules/winston/lib/winston/common.js | 259 +
.../node_modules/winston/lib/winston/config.js | 45 +
.../winston/lib/winston/config/cli-config.js | 35 +
.../winston/lib/winston/config/npm-config.js | 27 +
.../winston/lib/winston/config/syslog-config.js | 31 +
.../winston/lib/winston/container.js | 101 +
.../winston/lib/winston/exception.js | 56 +
.../node_modules/winston/lib/winston/logger.js | 668 +
.../winston/lib/winston/transports.js | 29 +
.../winston/lib/winston/transports/console.js | 88 +
.../winston/lib/winston/transports/file.js | 575 +
.../winston/lib/winston/transports/http.js | 200 +
.../winston/lib/winston/transports/transport.js | 120 +
.../winston/lib/winston/transports/webhook.js | 136 +
.../winston/node_modules/async/.gitmodules | 9 +
.../winston/node_modules/async/.npmignore | 4 +
.../winston/node_modules/async/LICENSE | 19 +
.../winston/node_modules/async/Makefile | 25 +
.../winston/node_modules/async/README.md | 1021 +
.../winston/node_modules/async/index.js | 3 +
.../winston/node_modules/async/lib/async.js | 692 +
.../winston/node_modules/async/package.json | 31 +
.../winston/node_modules/colors/MIT-LICENSE.txt | 22 +
.../winston/node_modules/colors/ReadMe.md | 77 +
.../winston/node_modules/colors/colors.js | 342 +
.../winston/node_modules/colors/example.html | 76 +
.../winston/node_modules/colors/example.js | 77 +
.../winston/node_modules/colors/package.json | 29 +
.../winston/node_modules/colors/test.js | 70 +
.../node_modules/colors/themes/winston-dark.js | 12 +
.../node_modules/colors/themes/winston-light.js | 12 +
.../winston/node_modules/cycle/README.md | 45 +
.../winston/node_modules/cycle/cycle.js | 164 +
.../winston/node_modules/cycle/package.json | 28 +
.../winston/node_modules/eyes/LICENSE | 20 +
.../winston/node_modules/eyes/Makefile | 4 +
.../winston/node_modules/eyes/README.md | 73 +
.../winston/node_modules/eyes/lib/eyes.js | 236 +
.../winston/node_modules/eyes/package.json | 40 +
.../winston/node_modules/eyes/test/eyes-test.js | 56 +
.../winston/node_modules/pkginfo/.npmignore | 2 +
.../winston/node_modules/pkginfo/README.md | 85 +
.../winston/node_modules/pkginfo/docs/docco.css | 194 +
.../node_modules/pkginfo/docs/pkginfo.html | 101 +
.../pkginfo/examples/all-properties.js | 19 +
.../pkginfo/examples/array-argument.js | 20 +
.../pkginfo/examples/multiple-properties.js | 19 +
.../pkginfo/examples/object-argument.js | 22 +
.../node_modules/pkginfo/examples/package.json | 10 +
.../pkginfo/examples/single-property.js | 19 +
.../winston/node_modules/pkginfo/lib/pkginfo.js | 132 +
.../winston/node_modules/pkginfo/package.json | 35 +
.../node_modules/pkginfo/test/pkginfo-test.js | 69 +
.../winston/node_modules/request/LICENSE | 55 +
.../winston/node_modules/request/README.md | 287 +
.../winston/node_modules/request/aws.js | 190 +
.../winston/node_modules/request/aws2.js | 128 +
.../winston/node_modules/request/forever.js | 103 +
.../winston/node_modules/request/main.js | 974 +
.../winston/node_modules/request/mimetypes.js | 152 +
.../winston/node_modules/request/oauth.js | 34 +
.../winston/node_modules/request/package.json | 33 +
.../node_modules/request/tests/googledoodle.png | Bin 0 -> 38510 bytes
.../winston/node_modules/request/tests/run.js | 39 +
.../node_modules/request/tests/server.js | 82 +
.../node_modules/request/tests/squid.conf | 77 +
.../node_modules/request/tests/ssl/ca/ca.cnf | 20 +
.../node_modules/request/tests/ssl/ca/ca.crl | 0
.../node_modules/request/tests/ssl/ca/ca.crt | 17 +
.../node_modules/request/tests/ssl/ca/ca.csr | 13 +
.../node_modules/request/tests/ssl/ca/ca.key | 18 +
.../node_modules/request/tests/ssl/ca/ca.srl | 1 +
.../request/tests/ssl/ca/server.cnf | 19 +
.../request/tests/ssl/ca/server.crt | 16 +
.../request/tests/ssl/ca/server.csr | 11 +
.../node_modules/request/tests/ssl/ca/server.js | 28 +
.../request/tests/ssl/ca/server.key | 9 +
.../node_modules/request/tests/ssl/npm-ca.crt | 16 +
.../node_modules/request/tests/ssl/test.crt | 15 +
.../node_modules/request/tests/ssl/test.key | 15 +
.../node_modules/request/tests/test-body.js | 80 +
.../node_modules/request/tests/test-cookie.js | 29 +
.../request/tests/test-cookiejar.js | 90 +
.../node_modules/request/tests/test-defaults.js | 68 +
.../node_modules/request/tests/test-errors.js | 37 +
.../node_modules/request/tests/test-headers.js | 52 +
.../request/tests/test-httpModule.js | 94 +
.../request/tests/test-https-strict.js | 97 +
.../node_modules/request/tests/test-https.js | 86 +
.../node_modules/request/tests/test-oauth.js | 117 +
.../node_modules/request/tests/test-params.js | 92 +
.../node_modules/request/tests/test-pipes.js | 202 +
.../node_modules/request/tests/test-pool.js | 16 +
.../node_modules/request/tests/test-proxy.js | 39 +
.../node_modules/request/tests/test-qs.js | 28 +
.../node_modules/request/tests/test-redirect.js | 154 +
.../node_modules/request/tests/test-s3.js | 13 +
.../node_modules/request/tests/test-timeout.js | 87 +
.../node_modules/request/tests/test-toJSON.js | 14 +
.../node_modules/request/tests/test-tunnel.js | 61 +
.../winston/node_modules/request/tunnel.js | 229 +
.../winston/node_modules/request/uuid.js | 19 +
.../node_modules/request/vendor/cookie/index.js | 65 +
.../node_modules/request/vendor/cookie/jar.js | 72 +
.../winston/node_modules/stack-trace/.npmignore | 1 +
.../winston/node_modules/stack-trace/License | 19 +
.../winston/node_modules/stack-trace/Makefile | 11 +
.../winston/node_modules/stack-trace/Readme.md | 98 +
.../node_modules/stack-trace/lib/stack-trace.js | 111 +
.../node_modules/stack-trace/package.json | 31 +
.../prompt/node_modules/winston/package.json | 50 +
.../node_modules/winston/test/cli-test.js | 40 +
.../node_modules/winston/test/container-test.js | 99 +
.../winston/test/custom-timestamp-test.js | 62 +
.../node_modules/winston/test/exception-test.js | 47 +
.../node_modules/winston/test/fixtures/.gitkeep | 0
.../winston/test/fixtures/keys/agent2-cert.pem | 13 +
.../winston/test/fixtures/keys/agent2-key.pem | 9 +
.../winston/test/fixtures/logs/.gitkeep | 0
.../test/fixtures/scripts/default-exceptions.js | 21 +
.../test/fixtures/scripts/exit-on-error.js | 25 +
.../test/fixtures/scripts/log-exceptions.js | 25 +
.../fixtures/scripts/unhandle-exceptions.js | 26 +
.../prompt/node_modules/winston/test/helpers.js | 173 +
.../winston/test/log-exception-test.js | 60 +
.../winston/test/log-rewriter-test.js | 98 +
.../node_modules/winston/test/logger-test.js | 200 +
.../winston/test/transports/console-test.js | 39 +
.../test/transports/file-maxfiles-test.js | 102 +
.../test/transports/file-maxsize-test.js | 82 +
.../winston/test/transports/file-test.js | 60 +
.../winston/test/transports/transport.js | 212 +
.../winston/test/transports/webhook-test.js | 125 +
.../node_modules/winston/test/winston-test.js | 98 +
blackberry10/node_modules/prompt/package.json | 48 +
.../node_modules/prompt/test/helpers.js | 156 +
.../prompt/test/interactive-prompt-test.js | 49 +
blackberry10/node_modules/prompt/test/macros.js | 82 +
.../node_modules/prompt/test/prompt-test.js | 668 +
.../node_modules/shelljs/.documentup.json | 6 +
blackberry10/node_modules/shelljs/.npmignore | 1 +
blackberry10/node_modules/shelljs/.travis.yml | 5 +
blackberry10/node_modules/shelljs/LICENSE | 26 +
blackberry10/node_modules/shelljs/README.md | 513 +
blackberry10/node_modules/shelljs/bin/shjs | 51 +
blackberry10/node_modules/shelljs/global.js | 3 +
blackberry10/node_modules/shelljs/jshint.json | 4 +
blackberry10/node_modules/shelljs/make.js | 48 +
.../shelljs/node_modules/.bin/jshint | 1 +
.../shelljs/node_modules/jshint/.npmignore | 8 +
.../shelljs/node_modules/jshint/.travis.yml | 3 +
.../shelljs/node_modules/jshint/CONTRIBUTING.md | 102 +
.../shelljs/node_modules/jshint/LICENSE | 20 +
.../shelljs/node_modules/jshint/README.md | 92 +
.../shelljs/node_modules/jshint/bin/jshint | 3 +
.../node_modules/jshint/examples/.jshintignore | 2 +
.../node_modules/jshint/examples/.jshintrc | 84 +
.../node_modules/jshint/examples/reporter.js | 21 +
.../shelljs/node_modules/jshint/jshint.json | 14 +
.../shelljs/node_modules/jshint/make.js | 129 +
.../jshint/node_modules/.bin/esparse | 1 +
.../jshint/node_modules/.bin/esvalidate | 1 +
.../jshint/node_modules/cli/README.md | 196 +
.../node_modules/jshint/node_modules/cli/cli.js | 1133 +
.../jshint/node_modules/cli/examples/cat.js | 17 +
.../jshint/node_modules/cli/examples/command.js | 16 +
.../jshint/node_modules/cli/examples/echo.js | 54 +
.../jshint/node_modules/cli/examples/glob.js | 6 +
.../node_modules/cli/examples/long_desc.js | 20 +
.../node_modules/cli/examples/progress.js | 11 +
.../jshint/node_modules/cli/examples/sort.js | 18 +
.../jshint/node_modules/cli/examples/spinner.js | 9 +
.../node_modules/cli/examples/static.coffee | 27 +
.../jshint/node_modules/cli/examples/static.js | 25 +
.../jshint/node_modules/cli/index.js | 1 +
.../cli/node_modules/glob/.npmignore | 2 +
.../cli/node_modules/glob/.travis.yml | 3 +
.../node_modules/cli/node_modules/glob/LICENSE | 27 +
.../cli/node_modules/glob/README.md | 250 +
.../cli/node_modules/glob/examples/g.js | 9 +
.../cli/node_modules/glob/examples/usr-local.js | 9 +
.../node_modules/cli/node_modules/glob/glob.js | 675 +
.../glob/node_modules/inherits/LICENSE | 14 +
.../glob/node_modules/inherits/README.md | 42 +
.../glob/node_modules/inherits/inherits.js | 1 +
.../node_modules/inherits/inherits_browser.js | 23 +
.../glob/node_modules/inherits/package.json | 39 +
.../glob/node_modules/inherits/test.js | 25 +
.../cli/node_modules/glob/package.json | 38 +
.../cli/node_modules/glob/test/00-setup.js | 176 +
.../node_modules/glob/test/bash-comparison.js | 63 +
.../node_modules/glob/test/bash-results.json | 349 +
.../cli/node_modules/glob/test/cwd-test.js | 55 +
.../node_modules/glob/test/globstar-match.js | 19 +
.../cli/node_modules/glob/test/mark.js | 74 +
.../node_modules/glob/test/nocase-nomagic.js | 113 +
.../cli/node_modules/glob/test/pause-resume.js | 73 +
.../cli/node_modules/glob/test/root-nomount.js | 39 +
.../cli/node_modules/glob/test/root.js | 46 +
.../cli/node_modules/glob/test/stat.js | 32 +
.../cli/node_modules/glob/test/zz-cleanup.js | 11 +
.../jshint/node_modules/cli/package.json | 53 +
.../jshint/node_modules/esprima/.npmignore | 8 +
.../jshint/node_modules/esprima/CONTRIBUTING.md | 20 +
.../jshint/node_modules/esprima/ChangeLog | 26 +
.../jshint/node_modules/esprima/LICENSE.BSD | 19 +
.../jshint/node_modules/esprima/README.md | 24 +
.../jshint/node_modules/esprima/bin/esparse.js | 117 +
.../node_modules/esprima/bin/esvalidate.js | 199 +
.../jshint/node_modules/esprima/component.json | 17 +
.../jshint/node_modules/esprima/doc/index.html | 481 +
.../jshint/node_modules/esprima/esprima.js | 3739 +
.../esprima/examples/detectnestedternary.js | 106 +
.../esprima/examples/findbooleantrap.js | 173 +
.../node_modules/esprima/examples/tokendist.js | 33 +
.../jshint/node_modules/esprima/index.html | 137 +
.../jshint/node_modules/esprima/package.json | 59 +
.../node_modules/esprima/test/benchmarks.html | 129 +
.../node_modules/esprima/test/benchmarks.js | 343 +
.../node_modules/esprima/test/compare.html | 139 +
.../jshint/node_modules/esprima/test/compare.js | 334 +
.../node_modules/esprima/test/compat.html | 116 +
.../jshint/node_modules/esprima/test/compat.js | 241 +
.../node_modules/esprima/test/coverage.html | 111 +
.../node_modules/esprima/test/esprima.js.html | 11752 +
.../jshint/node_modules/esprima/test/index.html | 115 +
.../node_modules/esprima/test/module.html | 112 +
.../jshint/node_modules/esprima/test/module.js | 131 +
.../node_modules/esprima/test/parselibs.js | 67 +
.../jshint/node_modules/esprima/test/reflect.js | 422 +
.../jshint/node_modules/esprima/test/run.js | 67 +
.../jshint/node_modules/esprima/test/runner.js | 437 +
.../jshint/node_modules/esprima/test/test.js | 22462 ++
.../jshint/node_modules/minimatch/LICENSE | 23 +
.../jshint/node_modules/minimatch/README.md | 218 +
.../jshint/node_modules/minimatch/minimatch.js | 1079 +
.../minimatch/node_modules/lru-cache/.npmignore | 1 +
.../minimatch/node_modules/lru-cache/AUTHORS | 8 +
.../minimatch/node_modules/lru-cache/LICENSE | 23 +
.../minimatch/node_modules/lru-cache/README.md | 97 +
.../node_modules/lru-cache/lib/lru-cache.js | 257 +
.../node_modules/lru-cache/package.json | 62 +
.../minimatch/node_modules/lru-cache/s.js | 25 +
.../node_modules/lru-cache/test/basic.js | 329 +
.../node_modules/lru-cache/test/foreach.js | 52 +
.../node_modules/lru-cache/test/memory-leak.js | 50 +
.../minimatch/node_modules/sigmund/LICENSE | 27 +
.../minimatch/node_modules/sigmund/README.md | 53 +
.../minimatch/node_modules/sigmund/bench.js | 283 +
.../minimatch/node_modules/sigmund/package.json | 41 +
.../minimatch/node_modules/sigmund/sigmund.js | 39 +
.../node_modules/sigmund/test/basic.js | 24 +
.../jshint/node_modules/minimatch/package.json | 39 +
.../jshint/node_modules/minimatch/test/basic.js | 399 +
.../node_modules/minimatch/test/brace-expand.js | 33 +
.../node_modules/minimatch/test/caching.js | 14 +
.../node_modules/minimatch/test/defaults.js | 274 +
.../jshint/node_modules/peakle/.npmignore | 1 +
.../jshint/node_modules/peakle/LICENSE | 19 +
.../jshint/node_modules/peakle/README | 40 +
.../jshint/node_modules/peakle/grunt.js | 28 +
.../jshint/node_modules/peakle/package.json | 17 +
.../jshint/node_modules/peakle/peakle.js | 59 +
.../jshint/node_modules/peakle/test.js | 49 +
.../jshint/node_modules/underscore/.npmignore | 4 +
.../jshint/node_modules/underscore/.travis.yml | 5 +
.../jshint/node_modules/underscore/CNAME | 1 +
.../node_modules/underscore/CONTRIBUTING.md | 9 +
.../jshint/node_modules/underscore/LICENSE | 22 +
.../jshint/node_modules/underscore/README.md | 19 +
.../jshint/node_modules/underscore/favicon.ico | Bin 0 -> 1406 bytes
.../jshint/node_modules/underscore/index.html | 2467 +
.../jshint/node_modules/underscore/index.js | 1 +
.../jshint/node_modules/underscore/package.json | 35 +
.../node_modules/underscore/underscore-min.js | 1 +
.../node_modules/underscore/underscore.js | 1226 +
.../shelljs/node_modules/jshint/package.json | 40 +
.../shelljs/node_modules/jshint/res/jshint.ai | 4372 +
.../shelljs/node_modules/jshint/src/cli/cli.js | 398 +
.../node_modules/jshint/src/next/constants.js | 43 +
.../node_modules/jshint/src/next/jshint.js | 194 +
.../node_modules/jshint/src/next/reason.js | 302 +
.../node_modules/jshint/src/next/regexp.js | 125 +
.../node_modules/jshint/src/next/utils.js | 359 +
.../node_modules/jshint/src/platforms/rhino.js | 86 +
.../jshint/src/reporters/checkstyle.js | 107 +
.../jshint/src/reporters/default.js | 34 +
.../jshint/src/reporters/jslint_xml.js | 56 +
.../jshint/src/reporters/non_error.js | 45 +
.../node_modules/jshint/src/shared/messages.js | 206 +
.../node_modules/jshint/src/shared/vars.js | 395 +
.../node_modules/jshint/src/stable/jshint.js | 3692 +
.../node_modules/jshint/src/stable/lex.js | 1650 +
.../node_modules/jshint/src/stable/reg.js | 34 +
.../node_modules/jshint/src/stable/state.js | 22 +
.../node_modules/jshint/src/stable/style.js | 171 +
.../shelljs/node_modules/jshint/tests/cli.js | 439 +
.../tests/next/fixtures/parser/comments.js | 13 +
.../tests/next/fixtures/parser/simple_file.js | 9 +
.../tests/next/fixtures/parser/tokens.json | 398 +
.../tests/next/fixtures/reason/arguments.js | 28 +
.../jshint/tests/next/fixtures/reason/asi.js | 46 +
.../tests/next/fixtures/reason/bitwise.js | 21 +
.../tests/next/fixtures/reason/comparison.js | 51 +
.../tests/next/fixtures/reason/debugger.js | 7 +
.../tests/next/fixtures/reason/esprima.js | 5 +
.../tests/next/fixtures/reason/expr_in_test.js | 11 +
.../jshint/tests/next/fixtures/reason/fifty.js | 58 +
.../tests/next/fixtures/reason/iterator.js | 26 +
.../jshint/tests/next/fixtures/reason/native.js | 24 +
.../jshint/tests/next/fixtures/reason/proto.js | 38 +
.../jshint/tests/next/fixtures/reason/shadow.js | 19 +
.../tests/next/fixtures/reason/trailing.js | 10 +
.../jshint/tests/next/fixtures/reason/undef.js | 42 +
.../jshint/tests/next/fixtures/regexp/dashes.js | 10 +
.../tests/next/fixtures/utils/simple_file.js | 9 +
.../jshint/tests/next/lib/helpers.js | 121 +
.../jshint/tests/next/unit/parser.js | 84 +
.../jshint/tests/next/unit/reason.js | 130 +
.../jshint/tests/next/unit/regexp.js | 39 +
.../jshint/tests/next/unit/utils.js | 128 +
.../jshint/tests/stable/helpers/coveraje.js | 82 +
.../jshint/tests/stable/helpers/fixture.js | 7 +
.../jshint/tests/stable/helpers/testhelper.js | 148 +
.../tests/stable/regression/libs/backbone.js | 1158 +
.../tests/stable/regression/libs/codemirror3.js | 4561 +
.../tests/stable/regression/libs/jquery-1.7.js | 9304 +
.../tests/stable/regression/libs/json2.js | 487 +
.../tests/stable/regression/libs/lodash.js | 4454 +
.../stable/regression/libs/prototype-17.js | 6082 +
.../jshint/tests/stable/regression/npm.js | 8 +
.../tests/stable/regression/thirdparty.js | 245 +
.../jshint/tests/stable/unit/core.js | 623 +
.../jshint/tests/stable/unit/envs.js | 653 +
.../jshint/tests/stable/unit/fixtures/asi.js | 28 +
.../jshint/tests/stable/unit/fixtures/blocks.js | 31 +
.../jshint/tests/stable/unit/fixtures/boss.js | 33 +
.../tests/stable/unit/fixtures/browser.js | 18 +
.../tests/stable/unit/fixtures/camelcase.js | 17 +
.../stable/unit/fixtures/caseExpressions.js | 11 +
.../jshint/tests/stable/unit/fixtures/comma.js | 50 +
.../jshint/tests/stable/unit/fixtures/const.js | 72 +
.../jshint/tests/stable/unit/fixtures/curly.js | 8 +
.../jshint/tests/stable/unit/fixtures/curly2.js | 11 +
.../tests/stable/unit/fixtures/emptystmt.js | 23 +
.../jshint/tests/stable/unit/fixtures/eqeqeq.js | 10 +
.../tests/stable/unit/fixtures/es5.funcexpr.js | 15 +
.../jshint/tests/stable/unit/fixtures/es5.js | 78 +
.../tests/stable/unit/fixtures/es5Reserved.js | 8 +
.../tests/stable/unit/fixtures/exported.js | 18 +
.../jshint/tests/stable/unit/fixtures/forin.js | 15 +
.../unit/fixtures/functionScopedOptions.js | 8 +
.../jshint/tests/stable/unit/fixtures/gh-226.js | 21 +
.../jshint/tests/stable/unit/fixtures/gh-334.js | 15 +
.../jshint/tests/stable/unit/fixtures/gh247.js | 23 +
.../jshint/tests/stable/unit/fixtures/gh431.js | 15 +
.../jshint/tests/stable/unit/fixtures/gh56.js | 4 +
.../jshint/tests/stable/unit/fixtures/gh618.js | 7 +
.../jshint/tests/stable/unit/fixtures/gh668.js | 6 +
.../jshint/tests/stable/unit/fixtures/gh878.js | 4 +
.../tests/stable/unit/fixtures/gruntComment.js | 20 +
.../tests/stable/unit/fixtures/identifiers.js | 7 +
.../tests/stable/unit/fixtures/ignored.js | 4 +
.../jshint/tests/stable/unit/fixtures/immed.js | 31 +
.../jshint/tests/stable/unit/fixtures/indent.js | 12 +
.../tests/stable/unit/fixtures/insideEval.js | 17 +
.../stable/unit/fixtures/jslintInverted.js | 4 +
.../tests/stable/unit/fixtures/jslintOptions.js | 9 +
.../tests/stable/unit/fixtures/jslintRenamed.js | 5 +
.../tests/stable/unit/fixtures/lastsemic.js | 6 +
.../tests/stable/unit/fixtures/latedef.js | 21 +
.../tests/stable/unit/fixtures/latedefundef.js | 46 +
.../tests/stable/unit/fixtures/laxbreak.js | 19 +
.../tests/stable/unit/fixtures/laxcomma.js | 17 +
.../tests/stable/unit/fixtures/loopfunc.js | 11 +
.../max-cyclomatic-complexity-per-function.js | 74 +
.../max-nested-block-depth-per-function.js | 18 +
.../fixtures/max-parameters-per-function.js | 5 +
.../fixtures/max-statements-per-function.js | 19 +
.../jshint/tests/stable/unit/fixtures/maxlen.js | 3 +
.../tests/stable/unit/fixtures/missingspaces.js | 8 +
.../unit/fixtures/nestedFunctions-locations.js | 1 +
.../stable/unit/fixtures/nestedFunctions.js | 35 +
.../jshint/tests/stable/unit/fixtures/newcap.js | 13 +
.../jshint/tests/stable/unit/fixtures/noarg.js | 7 +
.../jshint/tests/stable/unit/fixtures/onevar.js | 11 +
.../tests/stable/unit/fixtures/protoiterator.js | 37 +
.../jshint/tests/stable/unit/fixtures/quotes.js | 3 +
.../tests/stable/unit/fixtures/quotes2.js | 3 +
.../tests/stable/unit/fixtures/quotes3.js | 36 +
.../jshint/tests/stable/unit/fixtures/redef.js | 11 +
.../tests/stable/unit/fixtures/regex_array.js | 6 +
.../tests/stable/unit/fixtures/reserved.js | 15 +
.../jshint/tests/stable/unit/fixtures/return.js | 40 +
.../jshint/tests/stable/unit/fixtures/scope.js | 43 +
.../tests/stable/unit/fixtures/scripturl.js | 11 +
.../tests/stable/unit/fixtures/smarttabs.js | 14 +
.../stable/unit/fixtures/strict_incorrect.js | 59 +
.../tests/stable/unit/fixtures/strict_newcap.js | 21 +
.../tests/stable/unit/fixtures/strict_this.js | 17 +
.../tests/stable/unit/fixtures/strict_this2.js | 18 +
.../stable/unit/fixtures/strict_violations.js | 9 +
.../tests/stable/unit/fixtures/strings.js | 25 +
.../tests/stable/unit/fixtures/supernew.js | 11 +
.../stable/unit/fixtures/switchDefaultFirst.js | 16 +
.../stable/unit/fixtures/switchFallThrough.js | 40 +
.../tests/stable/unit/fixtures/trycatch.js | 24 +
.../jshint/tests/stable/unit/fixtures/undef.js | 24 +
.../tests/stable/unit/fixtures/undef_func.js | 8 +
.../tests/stable/unit/fixtures/undefstrict.js | 6 +
.../jshint/tests/stable/unit/fixtures/unused.js | 26 +
.../tests/stable/unit/fixtures/unusedglobals.js | 4 +
.../jshint/tests/stable/unit/fixtures/white.js | 66 +
.../jshint/tests/stable/unit/fixtures/with.js | 16 +
.../jshint/tests/stable/unit/options.js | 1472 +
.../jshint/tests/stable/unit/parser.js | 522 +
blackberry10/node_modules/shelljs/package.json | 44 +
.../node_modules/shelljs/scripts/docs.js | 15 +
.../node_modules/shelljs/scripts/run-tests.js | 50 +
blackberry10/node_modules/shelljs/shell.js | 1892 +
.../node_modules/shelljs/test/.npmignore | 2 +
blackberry10/node_modules/shelljs/test/cat.js | 57 +
blackberry10/node_modules/shelljs/test/cd.js | 64 +
blackberry10/node_modules/shelljs/test/chmod.js | 81 +
.../node_modules/shelljs/test/config.js | 50 +
blackberry10/node_modules/shelljs/test/cp.js | 143 +
blackberry10/node_modules/shelljs/test/dirs.js | 37 +
blackberry10/node_modules/shelljs/test/echo.js | 50 +
blackberry10/node_modules/shelljs/test/env.js | 19 +
blackberry10/node_modules/shelljs/test/exec.js | 109 +
blackberry10/node_modules/shelljs/test/find.js | 56 +
blackberry10/node_modules/shelljs/test/grep.js | 59 +
blackberry10/node_modules/shelljs/test/ls.js | 202 +
blackberry10/node_modules/shelljs/test/make.js | 20 +
blackberry10/node_modules/shelljs/test/mkdir.js | 79 +
blackberry10/node_modules/shelljs/test/mv.js | 130 +
blackberry10/node_modules/shelljs/test/popd.js | 118 +
blackberry10/node_modules/shelljs/test/pushd.js | 228 +
blackberry10/node_modules/shelljs/test/pwd.js | 28 +
.../node_modules/shelljs/test/resources/a.txt | 11 +
.../test/resources/chmod/a/b/c/.npmignore | 0
.../test/resources/chmod/b/a/b/.npmignore | 0
.../test/resources/chmod/c/a/b/.npmignore | 0
.../shelljs/test/resources/chmod/file1 | 2 +
.../node_modules/shelljs/test/resources/cp/a | 1 +
.../node_modules/shelljs/test/resources/cp/b | 1 +
.../shelljs/test/resources/cp/dir_a/z | 1 +
.../test/resources/cp/dir_b/dir_b_a/dir_b_a_a/z | 1 +
.../test/resources/external/node_script.js | 2 +
.../node_modules/shelljs/test/resources/file1 | 1 +
.../shelljs/test/resources/file1.js | 1 +
.../shelljs/test/resources/file1.txt | 1 +
.../node_modules/shelljs/test/resources/file2 | 1 +
.../shelljs/test/resources/file2.js | 1 +
.../shelljs/test/resources/file2.txt | 1 +
.../shelljs/test/resources/find/.hidden | 1 +
.../node_modules/shelljs/test/resources/find/a | 1 +
.../node_modules/shelljs/test/resources/find/b | 1 +
.../shelljs/test/resources/find/dir1/a_dir1 | 1 +
.../test/resources/find/dir1/dir11/a_dir11 | 1 +
.../shelljs/test/resources/find/dir2/a_dir1 | 1 +
.../shelljs/test/resources/issue44/main.js | 1 +
.../shelljs/test/resources/ls/.hidden_dir/nada | 1 +
.../shelljs/test/resources/ls/.hidden_file | 1 +
.../test/resources/ls/a_dir/.hidden_dir/nada | 1 +
.../shelljs/test/resources/ls/a_dir/b_dir/z | 1 +
.../shelljs/test/resources/ls/a_dir/nada | 1 +
.../shelljs/test/resources/ls/file1 | 1 +
.../shelljs/test/resources/ls/file1.js | 1 +
.../shelljs/test/resources/ls/file2 | 1 +
.../shelljs/test/resources/ls/file2.js | 1 +
.../filename(with)[chars$]^that.must+be-escaped | 1 +
.../shelljs/test/resources/pushd/a/dummy | 1 +
.../shelljs/test/resources/pushd/b/c/dummy | 1 +
blackberry10/node_modules/shelljs/test/rm.js | 183 +
blackberry10/node_modules/shelljs/test/sed.js | 58 +
.../node_modules/shelljs/test/tempdir.js | 27 +
blackberry10/node_modules/shelljs/test/test.js | 91 +
blackberry10/node_modules/shelljs/test/to.js | 39 +
blackberry10/node_modules/shelljs/test/which.js | 38 +
blackberry10/node_modules/validator/.npmignore | 1 +
blackberry10/node_modules/validator/LICENSE | 20 +
blackberry10/node_modules/validator/README.md | 221 +
blackberry10/node_modules/validator/index.html | 15 +
blackberry10/node_modules/validator/index.js | 1 +
.../node_modules/validator/lib/defaultError.js | 33 +
.../node_modules/validator/lib/entities.js | 291 +
.../node_modules/validator/lib/filter.js | 102 +
.../node_modules/validator/lib/index.js | 16 +
.../node_modules/validator/lib/validator.js | 42 +
.../node_modules/validator/lib/validators.js | 155 +
blackberry10/node_modules/validator/lib/xss.js | 203 +
.../node_modules/validator/package.json | 60 +
blackberry10/node_modules/validator/test.js | 4 +
.../node_modules/validator/test/filter.test.js | 145 +
blackberry10/node_modules/validator/test/run.js | 8 +
.../validator/test/validator.test.js | 604 +
.../node_modules/validator/validator-min.js | 22 +
.../node_modules/validator/validator.js | 865 +
blackberry10/node_modules/wrench/.npmignore | 2 +
blackberry10/node_modules/wrench/LICENSE | 21 +
blackberry10/node_modules/wrench/lib/wrench.js | 426 +
blackberry10/node_modules/wrench/lib/x.js | 1 +
blackberry10/node_modules/wrench/package.json | 44 +
blackberry10/node_modules/wrench/readme.md | 63 +
.../wrench/tests/copydirsync_unix.js | 210 +
blackberry10/node_modules/wrench/tests/mkdir.js | 26 +
.../node_modules/wrench/tests/readdir.js | 52 +
.../node_modules/wrench/tests/readdir/bar.txt | 0
.../wrench/tests/readdir/foo/bar/ipsum.js | 0
.../wrench/tests/readdir/foo/dolor.md | 0
.../wrench/tests/readdir/foo/lorem.txt | 0
.../node_modules/wrench/tests/runner.js | 8 +
.../node_modules/wrench/tests/shown/.hidden.txt | 1 +
.../wrench/tests/shown/.hidden/dolor.md | 0
.../node_modules/wrench/tests/shown/bar.txt | 1 +
.../wrench/tests/shown/foo/bar/ipsum.js | 0
.../wrench/tests/shown/foo/dolor.md | 0
.../wrench/tests/shown/foo/lorem.txt | 0
.../node_modules/wrench/tests/withsymlinks/test | 1 +
blackberry10/node_modules/xml2js/.npmignore | 2 +
blackberry10/node_modules/xml2js/Cakefile | 12 +
blackberry10/node_modules/xml2js/LICENSE | 19 +
blackberry10/node_modules/xml2js/README.md | 139 +
blackberry10/node_modules/xml2js/lib/xml2js.js | 152 +
.../xml2js/node_modules/sax/AUTHORS | 10 +
.../xml2js/node_modules/sax/LICENSE | 32 +
.../xml2js/node_modules/sax/LICENSE-W3C.html | 188 +
.../xml2js/node_modules/sax/README.md | 216 +
.../xml2js/node_modules/sax/component.json | 12 +
.../sax/examples/big-not-pretty.xml | 8002 +
.../xml2js/node_modules/sax/examples/example.js | 29 +
.../node_modules/sax/examples/get-products.js | 58 +
.../node_modules/sax/examples/hello-world.js | 4 +
.../node_modules/sax/examples/not-pretty.xml | 8 +
.../node_modules/sax/examples/pretty-print.js | 74 +
.../node_modules/sax/examples/shopping.xml | 2 +
.../xml2js/node_modules/sax/examples/strict.dtd | 870 +
.../xml2js/node_modules/sax/examples/test.html | 15 +
.../xml2js/node_modules/sax/examples/test.xml | 1254 +
.../xml2js/node_modules/sax/lib/sax.js | 1316 +
.../xml2js/node_modules/sax/package.json | 64 +
.../node_modules/sax/test/attribute-name.js | 33 +
.../node_modules/sax/test/buffer-overrun.js | 26 +
.../xml2js/node_modules/sax/test/case.js | 50 +
.../node_modules/sax/test/cdata-chunked.js | 11 +
.../node_modules/sax/test/cdata-end-split.js | 15 +
.../node_modules/sax/test/cdata-fake-end.js | 28 +
.../node_modules/sax/test/cdata-multiple.js | 15 +
.../xml2js/node_modules/sax/test/cdata.js | 10 +
.../xml2js/node_modules/sax/test/cyrillic.js | 8 +
.../sax/test/duplicate-attribute.js | 13 +
.../xml2js/node_modules/sax/test/entities.js | 10 +
.../xml2js/node_modules/sax/test/entity-mega.js | 16 +
.../xml2js/node_modules/sax/test/index.js | 86 +
.../xml2js/node_modules/sax/test/issue-23.js | 43 +
.../xml2js/node_modules/sax/test/issue-30.js | 24 +
.../xml2js/node_modules/sax/test/issue-35.js | 15 +
.../xml2js/node_modules/sax/test/issue-47.js | 12 +
.../xml2js/node_modules/sax/test/issue-49.js | 31 +
.../xml2js/node_modules/sax/test/issue-84.js | 13 +
.../node_modules/sax/test/parser-position.js | 28 +
.../sax/test/script-close-better.js | 12 +
.../xml2js/node_modules/sax/test/script.js | 12 +
.../sax/test/self-closing-child-strict.js | 44 +
.../node_modules/sax/test/self-closing-child.js | 44 +
.../node_modules/sax/test/self-closing-tag.js | 25 +
.../node_modules/sax/test/stray-ending.js | 17 +
.../sax/test/trailing-attribute-no-value.js | 10 +
.../sax/test/trailing-non-whitespace.js | 18 +
.../node_modules/sax/test/unclosed-root.js | 11 +
.../xml2js/node_modules/sax/test/unquoted.js | 18 +
.../node_modules/sax/test/xmlns-issue-41.js | 68 +
.../node_modules/sax/test/xmlns-rebinding.js | 63 +
.../node_modules/sax/test/xmlns-strict.js | 74 +
.../sax/test/xmlns-unbound-element.js | 33 +
.../node_modules/sax/test/xmlns-unbound.js | 15 +
.../sax/test/xmlns-xml-default-ns.js | 31 +
.../test/xmlns-xml-default-prefix-attribute.js | 36 +
.../sax/test/xmlns-xml-default-prefix.js | 21 +
.../sax/test/xmlns-xml-default-redefine.js | 41 +
blackberry10/node_modules/xml2js/package.json | 92 +
.../node_modules/xml2js/src/xml2js.coffee | 142 +
.../xml2js/test/fixtures/sample.xml | 34 +
.../node_modules/xml2js/test/xml2js.test.coffee | 154 +
blackberry10/node_modules/zip/CHANGES.md | 25 +
blackberry10/node_modules/zip/LICENSE | 19 +
blackberry10/node_modules/zip/README.md | 14 +
blackberry10/node_modules/zip/inflate.js | 754 +
.../zip/node_modules/q-io-buffer/LICENSE | 19 +
.../zip/node_modules/q-io-buffer/README | 1 +
.../zip/node_modules/q-io-buffer/package.json | 35 +
.../zip/node_modules/q-io-buffer/q-io-buffer.js | 61 +
.../node_modules/zip/node_modules/q-io/CHANGES | 26 +
.../node_modules/zip/node_modules/q-io/LICENSE | 19 +
.../node_modules/zip/node_modules/q-io/README | 4 +
.../zip/node_modules/q-io/package.json | 35 +
.../node_modules/zip/node_modules/q-io/q-io.js | 208 +
.../zip/node_modules/q-io/test/issues/1.js | 24 +
.../node_modules/zip/node_modules/q/.npmignore | 3 +
.../node_modules/zip/node_modules/q/CHANGES.md | 319 +
.../node_modules/zip/node_modules/q/LICENSE | 19 +
.../node_modules/zip/node_modules/q/README.md | 789 +
.../node_modules/zip/node_modules/q/TODO | 1 +
.../zip/node_modules/q/design/README.js | 1026 +
.../zip/node_modules/q/design/q0.js | 22 +
.../zip/node_modules/q/design/q1.js | 26 +
.../zip/node_modules/q/design/q2.js | 33 +
.../zip/node_modules/q/design/q3.js | 30 +
.../zip/node_modules/q/design/q4.js | 48 +
.../zip/node_modules/q/design/q5.js | 56 +
.../zip/node_modules/q/design/q6.js | 64 +
.../zip/node_modules/q/design/q7.js | 126 +
.../q/examples/async-generators/0.html | 43 +
.../q/examples/async-generators/1-return.html | 36 +
.../async-generators/2-error-propagation.html | 37 +
.../async-generators/3-wishful-thinking.html | 36 +
.../q/examples/async-generators/README.md | 66 +
.../zip/node_modules/q/examples/delay.js | 13 +
.../zip/node_modules/q/examples/join.js | 14 +
.../zip/node_modules/q/examples/shallow-deep.js | 43 +
.../zip/node_modules/q/examples/step1.js | 16 +
.../zip/node_modules/q/examples/step2.js | 17 +
.../zip/node_modules/q/examples/step3.js | 22 +
.../zip/node_modules/q/examples/then1.js | 11 +
.../zip/node_modules/q/examples/then2.js | 12 +
.../zip/node_modules/q/examples/then3.js | 18 +
.../zip/node_modules/q/examples/view1.js | 15 +
.../zip/node_modules/q/examples/view2.js | 17 +
.../zip/node_modules/q/examples/view3.js | 25 +
.../zip/node_modules/q/markm-mzero.js | 217 +
.../node_modules/event-queue/.event-loop.js.un~ | Bin 0 -> 9550 bytes
.../event-queue/.event-queue.js.un~ | Bin 0 -> 102648 bytes
.../node_modules/event-queue/.package.json.un~ | Bin 0 -> 87260 bytes
.../q/node_modules/event-queue/.readme.md.un~ | Bin 0 -> 25614 bytes
.../q/node_modules/event-queue/.system.js.un~ | Bin 0 -> 18136 bytes
.../q/node_modules/event-queue/event-queue.js | 97 +
.../q/node_modules/event-queue/package.json | 37 +
.../q/node_modules/event-queue/readme.md | 5 +
.../zip/node_modules/q/package.json | 66 +
.../node_modules/zip/node_modules/q/q.js | 811 +
.../node_modules/zip/node_modules/q/q.min.js | 11 +
.../node_modules/zip/node_modules/q/ref_send.md | 26 +
.../node_modules/zip/node_modules/q/test.js | 32 +
.../node_modules/zip/node_modules/q/test/all.js | 16 +
.../zip/node_modules/q/test/issue/22.js | 16 +
.../zip/node_modules/q/test/issue/9.js | 13 +
.../zip/node_modules/q/test/join.js | 10 +
.../zip/node_modules/q/test/methods.js | 155 +
.../node_modules/q/test/multiple-listeners.js | 60 +
.../zip/node_modules/q/test/promised-chains.js | 131 +
.../zip/node_modules/q/test/reject.js | 50 +
.../zip/node_modules/q/test/resolve-reject.js | 114 +
.../zip/node_modules/q/test/thenable.js | 73 +
.../zip/node_modules/q/test/value-of.js | 36 +
blackberry10/node_modules/zip/package.json | 54 +
blackberry10/node_modules/zip/test.js | 5 +
blackberry10/node_modules/zip/zip.js | 385 +
blackberry10/node_modules/zip/zip.zip | Bin 0 -> 1522 bytes
1804 files changed, 657743 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
[45/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/shopping.xml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/shopping.xml b/blackberry10/node_modules/elementtree/node_modules/sax/examples/shopping.xml
new file mode 100644
index 0000000..223c6c6
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/shopping.xml
@@ -0,0 +1,2 @@
+
+<GeneralSearchResponse xmlns="urn:types.partner.api.shopping.com"><serverDetail><apiEnv>sandbox</apiEnv><apiVersion>3.1 r31.Kadu4DC.phase3</apiVersion><buildNumber>5778</buildNumber><buildTimestamp>2011.10.06 15:37:23 PST</buildTimestamp><requestId>p2.a121bc2aaf029435dce6</requestId><timestamp>2011-10-21T18:38:45.982-04:00</timestamp><responseTime>P0Y0M0DT0H0M0.169S</responseTime></serverDetail><exceptions exceptionCount="1"><exception type="warning"><code>1112</code><message>You are currently using the SDC API sandbox environment! No clicks to merchant URLs from this response will be paid. Please change the host of your API requests to 'publisher.api.shopping.com' when you have finished development and testing</message></exception></exceptions><clientTracking height="19" type="logo" width="106"><sourceURL>http://statTest.dealtime.com/pixel/noscript?PV_EvnTyp=APPV&APPV_APITSP=10%2F21%2F11_06%3A38%3A45_PM&APPV_DSPRQSID=p2.a121bc2aaf029435dce6&APPV_IMGURL=http://img.shop
ping.com/sc/glb/sdc_logo_106x19.gif&APPV_LI_LNKINID=7000610&APPV_LI_SBMKYW=nikon&APPV_MTCTYP=1000&APPV_PRTID=2002&APPV_BrnID=14804</sourceURL><hrefURL>http://www.shopping.com/digital-cameras/products</hrefURL><titleText>Digital Cameras</titleText><altText>Digital Cameras</altText></clientTracking><searchHistory><categorySelection id="3"><name>Electronics</name><categoryURL>http://www.shopping.com/xCH-electronics-nikon~linkin_id-7000610?oq=nikon</categoryURL></categorySelection><categorySelection id="449"><name>Cameras and Photography</name><categoryURL>http://www.shopping.com/xCH-cameras_and_photography-nikon~linkin_id-7000610?oq=nikon</categoryURL></categorySelection><categorySelection id="7185"><name>Digital Cameras</name><categoryURL>http://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610</categoryURL></categorySelection><dynamicNavigationHistory><keywordSearch dropped="false" modified="false"><originalKeyword>nikon</originalKeywo
rd><resultKeyword>nikon</resultKeyword></keywordSearch></dynamicNavigationHistory></searchHistory><categories matchedCategoryCount="1" returnedCategoryCount="1"><category id="7185"><name>Digital Cameras</name><categoryURL>http://www.shopping.com/digital-cameras/nikon/products?oq=nikon&linkin_id=7000610</categoryURL><items matchedItemCount="322" pageNumber="1" returnedItemCount="5"><product id="101677489"><name>Nikon D3100 Digital Camera</name><shortDescription>14.2 Megapixel, SLR Camera, 3 in. LCD Screen, With High Definition Video, Weight: 1 lb.</shortDescription><fullDescription>The Nikon D3100 digital SLR camera speaks to the growing ranks of enthusiastic D-SLR users and aspiring photographers by providing an easy-to-use and affordable entrance to the world of Nikon D-SLR’s. The 14.2-megapixel D3100 has powerful features, such as the enhanced Guide Mode that makes it easy to unleash creative potential and capture memories with still images and full HD video. Like having a p
ersonal photo tutor at your fingertips, this unique feature provides a simple graphical interface on the camera’s LCD that guides users by suggesting and/or adjusting camera settings to achieve the desired end result images. The D3100 is also the world’s first D-SLR to introduce full time auto focus (AF) in Live View and D-Movie mode to effortlessly achieve the critical focus needed when shooting Full HD 1080p video.</fullDescription><images><image available="true" height="100" width="100"><sourceURL>http://di1.shopping.com/images/pi/93/bc/04/101677489-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di1.shopping.com/images/pi/93/bc/04/101677489-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di1.shopping.com/i
mages/pi/93/bc/04/101677489-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di1.shopping.com/images/pi/93/bc/04/101677489-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="500" width="606"><sourceURL>http://di1.shopping.com/images/pi/93/bc/04/101677489-606x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=1</sourceURL></image></images><rating><reviewCount>9</reviewCount><rating>4.56</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/pr/sdc_stars_sm_4.5.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/Nikon-D3100/reviews~linkin_id-7000610</reviewURL></rating><minPrice>429.00</minPrice><maxPrice>1360.00</maxPrice><productOffersURL>http://www.shopping.com/Nikon-D310
0/prices~linkin_id-7000610</productOffersURL><productSpecsURL>http://www.shopping.com/Nikon-D3100/info~linkin_id-7000610</productSpecsURL><offers matchedOfferCount="64" pageNumber="1" returnedOfferCount="5"><offer featured="false" id="-ZW6BMZqz6fbS-aULwga_g==" smartBuy="false" used="false"><name>Nikon D3100 Digital SLR Camera with 18-55mm NIKKOR VR Lens</name><description>The Nikon D3100 Digital SLR Camera is an affordable compact and lightweight photographic power-house. It features the all-purpose 18-55mm VR lens a high-resolution 14.2 MP CMOS sensor along with a feature set that's comprehensive yet easy to navigate - the intuitive onboard learn-as-you grow guide mode allows the photographer to understand what the 3100 can do quickly and easily. Capture beautiful pictures and amazing Full HD 1080p movies with sound and full-time autofocus. Availabilty: In Stock!</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" heigh
t="100" width="100"><sourceURL>http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" he
ight="350" width="350"><sourceURL>http://di102.shopping.com/images/di/2d/5a/57/36424d5a717a366662532d61554c7767615f67-350x350-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Free Shipping with Any Purchase!</storeNotes><basePrice currency="USD">529.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">799.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=647&BEFID=7185&aon=%5E1&MerchantID=475674&crawler_id=475674&dealId=-ZW6BMZqz6fbS-aULwga_g%3D%3D&url=http%3A%2F%2Fwww.fumfie.com%2Fproduct%2F343.5%2Fshopping-com%3F&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+Digital+SLR+Camera+with+18-55mm+NIKKOR+VR+Lens&dlprc=529.0&crn=&istrsm
rc=1&isathrsl=0&AR=1&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=1&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=658&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="475674" trusted="true"><name>FumFie</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/475674.gif</sourceURL></logo><phoneNumber>866 666 9198</phoneNumber><ratingInfo><reviewCount>560</reviewCount><rating>4.27</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_45.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_fumfie~MRD-475674~S-1~linkin_id-7000610</reviewURL></ratingInfo><
countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>F343C5</sku></offer><offer featured="false" id="md1e9lD8vdOu4FHQfJqKng==" smartBuy="false" used="false"><name>Nikon Nikon D3100 14.2MP Digital SLR Camera with 18-55mm f/3.5-5.6 AF-S DX VR, Cameras</name><description>Nikon D3100 14.2MP Digital SLR Camera with 18-55mm f/3.5-5.6 AF-S DX VR</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&am
p;l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="352" width="385"><sourceURL>http://di109.shopping.com/images/di/6d/64/31/65396c443876644f7534464851664a714b6e67-385x352-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">549.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></tot
alPrice><originalPrice currency="USD">549.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=779&BEFID=7185&aon=%5E1&MerchantID=305814&crawler_id=305814&dealId=md1e9lD8vdOu4FHQfJqKng%3D%3D&url=http%3A%2F%2Fwww.electronics-expo.com%2Findex.php%3Fpage%3Ditem%26id%3DNIKD3100%26source%3DSideCar%26scpid%3D8%26scid%3Dscsho318727%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Nikon+D3100+14.2MP+Digital+SLR+Camera+with+18-55mm+f%2F3.5-5.6+AF-S+DX+VR%2C+Cameras&dlprc=549.0&crn=&istrsmrc=1&isathrsl=0&AR=9&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=9&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=771&category=&HasLink=&frameId=&ND=
&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="305814" trusted="true"><name>Electronics Expo</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/305814.gif</sourceURL></logo><phoneNumber>1-888-707-EXPO</phoneNumber><ratingInfo><reviewCount>371</reviewCount><rating>3.90</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_4.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_electronics_expo~MRD-305814~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>NIKD3100</sku></offer><offer featured="false" id="yYuaXnDFtCY7rDUjkY2aaw==" smartBuy="false" used="false"><name>Nikon D3100 14.2-Megapixel Digital SLR Camera With 18-55mm Zoom-Nikkor Lens, Black</name><description>
Split-second shutter response captures shots other cameras may have missed Helps eliminate the frustration of shutter delay! 14.2-megapixels for enlargements worth framing and hanging. Takes breathtaking 1080p HD movies. ISO sensitivity from 100-1600 for bright or dimly lit settings. 3.0in. color LCD for beautiful, wide-angle framing and viewing. In-camera image editing lets you retouch with no PC. Automatic scene modes include Child, Sports, Night Portrait and more. Accepts SDHC memory cards. Nikon D3100 14.2-Megapixel Digital SLR Camera With 18-55mm Zoom-Nikkor Lens, Black is one of many Digital SLR Cameras available through Office Depot. Made by Nikon.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</so
urceURL></image><image available="true" height="200" width="200"><sourceURL>http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="250" width="250"><sourceURL>http://di109.shopping.com/images/di/79/59/75/61586e4446744359377244556a6b5932616177-250x250-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image></imageList><stockStatus>in-s
tock</stockStatus><basePrice currency="USD">549.99</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">699.99</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=698&BEFID=7185&aon=%5E1&MerchantID=467671&crawler_id=467671&dealId=yYuaXnDFtCY7rDUjkY2aaw%3D%3D&url=http%3A%2F%2Flink.mercent.com%2Fredirect.ashx%3Fmr%3AmerchantID%3DOfficeDepot%26mr%3AtrackingCode%3DCEC9669E-6ABC-E011-9F24-0019B9C043EB%26mr%3AtargetUrl%3Dhttp%3A%2F%2Fwww.officedepot.com%2Fa%2Fproducts%2F486292%2FNikon-D3100-142-Megapixel-Digital-SLR%2F%253fcm_mmc%253dMercent-_-Shopping-_-Cameras_and_Camcorders-_-486292&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D3100+14.2-Megapixel+Digital+SLR+Camera+With+18-55mm+Zoom-Nikkor+Lens%2C+Black&dlprc=549.99&crn=&istrsmrc=1&isathrsl=0&AR=10&N
G=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=10&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=690&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="467671" trusted="true"><name>Office Depot</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/467671.gif</sourceURL></logo><phoneNumber>1-800-GO-DEPOT</phoneNumber><ratingInfo><reviewCount>135</reviewCount><rating>2.37</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_office_depot_4158555~MRD-467671~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag
height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>486292</sku></offer><offer featured="false" id="Rl56U7CuiTYsH4MGZ02lxQ==" smartBuy="false" used="false"><name>Nikon® D3100™ 14.2MP Digital SLR with 18-55mm Lens</name><description>The Nikon D3100 DSLR will surprise you with its simplicity and impress you with superb results.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=11
1021183845&r=4</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="220" width="220"><sourceURL>http://di103.shopping.com/images/di/52/6c/35/36553743756954597348344d475a30326c7851-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">549.99</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.05</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">549.99</originalPrice><offerUR
L>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=Rl56U7CuiTYsH4MGZ02lxQ%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D903483107%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D3100%E2%84%A2+14.2MP+Digital+SLR+with+18-55mm+Lens&dlprc=549.99&crn=&istrsmrc=0&isathrsl=0&AR=11&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=11&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="332477" trusted="false"><name>RadioShack</name><lo
go available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/332477.gif</sourceURL></logo><ratingInfo><reviewCount>24</reviewCount><rating>2.25</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>9614867</sku></offer><offer featured="false" id="huS6xZKDKaKMTMP71eI6DA==" smartBuy="false" used="false"><name>Nikon D3100 SLR w/Nikon 18-55mm VR & 55-200mm VR Lenses</name><description>14.2 Megapixels3" LCDLive ViewHD 1080p Video w/ Sound & Autofocus11-point Autofocus3 Frames per Second ShootingISO 100 to 3200 (Expand to 12800-Hi2)Self Cleaning SensorEXPEED 2, Image Processing EngineScene Recognition S
ystem</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a
121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="345" width="345"><sourceURL>http://di105.shopping.com/images/di/68/75/53/36785a4b444b614b4d544d5037316549364441-345x345-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">695.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">695.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=huS6xZKDKaKMTMP71eI6DA%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D32983%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&Dea
lName=Nikon+D3100+SLR+w%2FNikon+18-55mm+VR+%26+55-200mm+VR+Lenses&dlprc=695.0&crn=&istrsmrc=0&isathrsl=0&AR=15&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=101677489&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=15&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="487342" trusted="false"><name>RytherCamera.com</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/487342.gif</sourceURL></logo><phoneNumber>1-877-644-7593</phoneNumber><ratingInfo><reviewCount>0</reviewCount></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countr
yCode></countryFlag></store><sku>32983</sku></offer></offers></product><product id="95397883"><name>Nikon COOLPIX S203 Digital Camera</name><shortDescription>10 Megapixel, Ultra-Compact Camera, 2.5 in. LCD Screen, 3x Optical Zoom, With Video Capability, Weight: 0.23 lb.</shortDescription><fullDescription>With 10.34 mega pixel, electronic VR vibration reduction, 5-level brightness adjustment, 3x optical zoom, and TFT LCD, Nikon Coolpix s203 fulfills all the demands of any photographer. The digital camera has an inbuilt memory of 44MB and an external memory slot made for all kinds of SD (Secure Digital) cards.</fullDescription><images><image available="true" height="100" width="100"><sourceURL>http://di1.shopping.com/images/pi/c4/ef/1b/95397883-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di1.shopping.com/images/pi/c4/ef/1b/95397883-200x200-0-0.jp
g?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di1.shopping.com/images/pi/c4/ef/1b/95397883-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di1.shopping.com/images/pi/c4/ef/1b/95397883-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="499" width="500"><sourceURL>http://di1.shopping.com/images/pi/c4/ef/1b/95397883-500x499-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=2</sourceURL></image></images><rating><reviewCount>0</reviewCount></rating><minPrice>139.00</minPrice><maxPrice>139.00</maxPrice><productOffersURL>http://www.shopping.com/Nikon-Coolpix-S203/prices~linkin_id-7000610</productO
ffersURL><productSpecsURL>http://www.shopping.com/Nikon-Coolpix-S203/info~linkin_id-7000610</productSpecsURL><offers matchedOfferCount="1" pageNumber="1" returnedOfferCount="1"><offer featured="false" id="sBd2JnIEPM-A_lBAM1RZgQ==" smartBuy="false" used="false"><name>Nikon Coolpix S203 Digital Camera (Red)</name><description>With 10.34 mega pixel, electronic VR vibration reduction, 5-level brightness adjustment, 3x optical zoom, and TFT LCD, Nikon Coolpix s203 fulfills all the demands of any photographer. The digital camera has an inbuilt memory of 44MB and an external memory slot made for all kinds of SD (Secure Digital) cards.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image avail
able="true" height="200" width="200"><sourceURL>http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="500" width="500"><sourceURL>http://di108.shopping.com/images/di/73/42/64/324a6e4945504d2d415f6c42414d31525a6751-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=1
11021183845&r=1</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Fantastic prices with ease & comfort of Amazon.com!</storeNotes><basePrice currency="USD">139.00</basePrice><shippingCost currency="USD">9.50</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">139.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=566&BEFID=7185&aon=%5E1&MerchantID=301531&crawler_id=1903313&dealId=sBd2JnIEPM-A_lBAM1RZgQ%3D%3D&url=http%3A%2F%2Fwww.amazon.com%2Fdp%2FB002T964IM%2Fref%3Dasc_df_B002T964IM1751618%3Fsmid%3DA22UHVNXG98FAT%26tag%3Ddealtime-ce-mp01feed-20%26linkCode%3Dasn%26creative%3D395105%26creativeASIN%3DB002T964IM&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Coolpix+S203+Digital+Camera+%28Red%29&dlprc=139.0&crn=&istrsmrc=0&isathrsl=0&AR=63&NG=20&NDP=200&PN=1&ST=7&DB=sdc
prod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=95397883&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=63&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=518&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="301531" trusted="false"><name>Amazon Marketplace</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/301531.gif</sourceURL></logo><ratingInfo><reviewCount>213</reviewCount><rating>2.73</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_amazon_marketplace_9689~MRD-301531~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif
</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>B002T964IM</sku></offer></offers></product><product id="106834268"><name>Nikon S3100 Digital Camera</name><shortDescription>14.5 Megapixel, Compact Camera, 2.7 in. LCD Screen, 5x Optical Zoom, With High Definition Video, Weight: 0.23 lb.</shortDescription><fullDescription>This digital camera features a wide-angle optical Zoom-NIKKOR glass lens that allows you to capture anything from landscapes to portraits to action shots. The high-definition movie mode with one-touch recording makes it easy to capture video clips.</fullDescription><images><image available="true" height="100" width="100"><sourceURL>http://di1.shopping.com/images/pi/66/2d/33/106834268-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di1.shopping.com/images/pi/66/2d/33/106834268-200x200-0-0.jpg?p=p2.a121bc2aaf029435d
ce6&a=2&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di1.shopping.com/images/pi/66/2d/33/106834268-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di1.shopping.com/images/pi/66/2d/33/106834268-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="387" width="507"><sourceURL>http://di1.shopping.com/images/pi/66/2d/33/106834268-507x387-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=3</sourceURL></image></images><rating><reviewCount>1</reviewCount><rating>2.00</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/pr/sdc_stars_sm_2.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/ni
kon-s3100/reviews~linkin_id-7000610</reviewURL></rating><minPrice>99.95</minPrice><maxPrice>134.95</maxPrice><productOffersURL>http://www.shopping.com/nikon-s3100/prices~linkin_id-7000610</productOffersURL><productSpecsURL>http://www.shopping.com/nikon-s3100/info~linkin_id-7000610</productSpecsURL><offers matchedOfferCount="67" pageNumber="1" returnedOfferCount="5"><offer featured="false" id="UUyGoqV8r0-xrkn-rnGNbg==" smartBuy="false" used="false"><name>CoolPix S3100 14 Megapixel Compact Digital Camera- Red</name><description>Nikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - red</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></im
age><image available="true" height="200" width="200"><sourceURL>http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di111.shopping.com/images/di/55/55/79/476f71563872302d78726b6e2d726e474e6267-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Get 30 days FREE SHIPPING w/ ShipVantage</storeNotes><basePrice currency="USD">119.95</basePrice><tax checkSite="true"></tax><shippingCost currency=
"USD">6.95</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">139.95</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=UUyGoqV8r0-xrkn-rnGNbg%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJ3Yx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmDAJeU1oyGG0GcBdhGwUGCAVqYF9SO0xSN1sZdmA7dmMdBQAJB24qX1NbQxI6AjA2ME5dVFULPDsGPFcQTTdaLTA6SR0OFlQvPAwMDxYcYlxIVkcoLTcCDA%3D%3D%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=CoolPix+S3100+14+Megapixel+Compact+Digital+Camera-+Red&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=28&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&a
mp;IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=28&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="485615" trusted="true"><name>Sears</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/485615.gif</sourceURL></logo><phoneNumber>1-800-349-4358</phoneNumber><ratingInfo><reviewCount>888</reviewCount><rating>2.85</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_3.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>00337013000</sku></offer>
<offer featured="false" id="X87AwXlW1dXoMXk4QQDToQ==" smartBuy="false" used="false"><name>COOLPIX S3100 Pink</name><description>Nikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - pink</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144
546f51-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di111.shopping.com/images/di/58/38/37/4177586c573164586f4d586b34515144546f51-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Get 30 days FREE SHIPPING w/ ShipVantage</storeNotes><basePrice currency="USD">119.95</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.95</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">139.95</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=X87AwXlW1dXoMXk4QQDToQ%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJxYx0CTAIC
I2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcUFxDEGsPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=COOLPIX+S3100+Pink&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=31&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=31&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="485615" trusted="true"><name>Sears</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/485615.gif</
sourceURL></logo><phoneNumber>1-800-349-4358</phoneNumber><ratingInfo><reviewCount>888</reviewCount><rating>2.85</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_3.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>00337015000</sku></offer><offer featured="false" id="nvFwnpfA4rlA1Dbksdsa0w==" smartBuy="false" used="false"><name>Nikon Coolpix S3100 14.0 MP Digital Camera - Silver</name><description>Nikon Coolpix S3100 14.0 MP Digital Camera - Silver</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-100x100-0-0.jpg
?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="270" width="270"><sourceURL>http://di109.shopping.com/images/di/6e/76/46/776e70664134726c413144626b736473613077-270x270-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&am
p;l=7000610&t=111021183845&r=3</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">109.97</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">109.97</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=803&BEFID=7185&aon=%5E&MerchantID=475774&crawler_id=475774&dealId=nvFwnpfA4rlA1Dbksdsa0w%3D%3D&url=http%3A%2F%2Fwww.thewiz.com%2Fcatalog%2Fproduct.jsp%3FmodelNo%3DS3100SILVER%26gdftrk%3DgdfV2677_a_7c996_a_7c4049_a_7c26262&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+Coolpix+S3100+14.0+MP+Digital+Camera+-+Silver&dlprc=109.97&crn=&istrsmrc=0&isathrsl=0&AR=33&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&Is
Ftr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=33&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=797&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="475774" trusted="false"><name>TheWiz.com</name><logo available="false" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/475774.gif</sourceURL></logo><phoneNumber>877-542-6988</phoneNumber><ratingInfo><reviewCount>0</reviewCount></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>26262</sku></offer><offer featured="false" id="5GtaN2NeryKwps-Se2l-4g==" smartBuy="false" used="false"><name>Nikon� COOLPIX� S3100 14MP Digital Camera (Silver)</name><description>The Nikon COOLPIX S3100 is the easy way to share your life and stay c
onnected.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=70
00610&t=111021183845&r=4</sourceURL></image><image available="true" height="220" width="220"><sourceURL>http://di102.shopping.com/images/di/35/47/74/614e324e6572794b7770732d5365326c2d3467-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">119.99</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.05</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">119.99</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=5GtaN2NeryKwps-Se2l-4g%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D848064082%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C3%AF%C2%BF%C2%BD+COOLPIX%C3%AF%C2%BF%C2%BD+S3100+14MP+Di
gital+Camera+%28Silver%29&dlprc=119.99&crn=&istrsmrc=0&isathrsl=0&AR=37&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=37&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=509&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="332477" trusted="false"><name>RadioShack</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/332477.gif</sourceURL></logo><ratingInfo><reviewCount>24</reviewCount><rating>2.25</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linki
n_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>10101095</sku></offer><offer featured="false" id="a43m0RXulX38zCnQjU59jw==" smartBuy="false" used="false"><name>COOLPIX S3100 Yellow</name><description>Nikon Coolpix S3100 - Digital camera - compact - 14.0 Mpix - optical zoom: 5 x - supported memory: SD, SDXC, SDHC - yellow</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-200x200-0-0.jpg?p=p2.a121bc2aaf0294
35dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di107.shopping.com/images/di/61/34/33/6d305258756c5833387a436e516a5535396a77-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Get 30 days FREE SHIPPING w/ ShipVantage</storeNotes><basePrice currency="USD">119.95</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.95</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">139.95</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?b
m=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=a43m0RXulX38zCnQjU59jw%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBJpFHJwYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcUFxDEGoPc3QDEkFZVQ0WFhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=COOLPIX+S3100+Yellow&dlprc=119.95&crn=&istrsmrc=1&isathrsl=0&AR=38&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=106834268&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=38&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=1&FS=0&code=&acode=583&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR
=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="485615" trusted="true"><name>Sears</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/485615.gif</sourceURL></logo><phoneNumber>1-800-349-4358</phoneNumber><ratingInfo><reviewCount>888</reviewCount><rating>2.85</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_3.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>00337014000</sku></offer></offers></product><product id="99671132"><name>Nikon D90 Digital Camera</name><shortDescription>12.3 Megapixel, Point and Shoot Camera, 3 in. LCD Screen, With Video Capability, Weight: 1.36 lb.</shortDescription><fullDescription>Untitle
d Document Nikon D90 SLR Digital Camera With 28-80mm 75-300mm Lens Kit The Nikon D90 SLR Digital Camera, with its 12.3-megapixel DX-format CMOS, 3" High resolution LCD display, Scene Recognition System, Picture Control, Active D-Lighting, and one-button Live View, provides photo enthusiasts with the image quality and performance they need to pursue their own vision while still being intuitive enough for use as an everyday camera.</fullDescription><images><image available="true" height="100" width="100"><sourceURL>http://di1.shopping.com/images/pi/52/fb/d3/99671132-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di1.shopping.com/images/pi/52/fb/d3/99671132-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di1.shoppin
g.com/images/pi/52/fb/d3/99671132-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di1.shopping.com/images/pi/52/fb/d3/99671132-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="255" width="499"><sourceURL>http://di1.shopping.com/images/pi/52/fb/d3/99671132-499x255-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=4</sourceURL></image></images><rating><reviewCount>7</reviewCount><rating>5.00</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/pr/sdc_stars_sm_5.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/reviews~linkin_id-7000610</reviewURL></rating><minPrice>689.00</minPrice><maxPrice>2299.00</maxPrice><productOffersURL>http://www.shop
ping.com/Nikon-D90-with-18-270mm-Lens/prices~linkin_id-7000610</productOffersURL><productSpecsURL>http://www.shopping.com/Nikon-D90-with-18-270mm-Lens/info~linkin_id-7000610</productSpecsURL><offers matchedOfferCount="43" pageNumber="1" returnedOfferCount="5"><offer featured="false" id="GU5JJkpUAxe5HujB7fkwAA==" smartBuy="false" used="false"><name>Nikon® D90 12.3MP Digital SLR Camera (Body Only)</name><description>The Nikon D90 will make you rethink what a digital SLR camera can achieve.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-200x200-0-
0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="220" width="220"><sourceURL>http://di106.shopping.com/images/di/47/55/35/4a4a6b70554178653548756a4237666b774141-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">1015.99</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.05</shippingCost><totalPrice checkSite="true"></
totalPrice><originalPrice currency="USD">1015.99</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=GU5JJkpUAxe5HujB7fkwAA%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D851830266%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D90+12.3MP+Digital+SLR+Camera+%28Body+Only%29&dlprc=1015.99&crn=&istrsmrc=0&isathrsl=0&AR=14&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=14&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedResel
ler="false" id="332477" trusted="false"><name>RadioShack</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/332477.gif</sourceURL></logo><ratingInfo><reviewCount>24</reviewCount><rating>2.25</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>10148659</sku></offer><offer featured="false" id="XhURuSC-spBbTIDfo4qfzQ==" smartBuy="false" used="false"><name>Nikon D90 SLR Digital Camera (Camera Body)</name><description>The Nikon D90 SLR Digital Camera with its 12.3-megapixel DX-format CCD 3" High resolution LCD display Scene Recognition System Picture Control Active D-Lighting and one
-button Live View provides photo enthusiasts with the image quality and performance they need to pursue their own vision while still being intuitive enough for use as an everyday camera. In addition the D90 introduces the D-Movie mode allowing for the first time an interchangeable lens SLR camera that is capable of recording 720p HD movie clips. Availabilty: In Stock</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image avai
lable="true" height="300" width="300"><sourceURL>http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="350" width="350"><sourceURL>http://di109.shopping.com/images/di/58/68/55/527553432d73704262544944666f3471667a51-350x350-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Free Shipping with Any Purchase!</storeNotes><basePrice currency="USD">689.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><ori
ginalPrice currency="USD">900.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=647&BEFID=7185&aon=%5E1&MerchantID=475674&crawler_id=475674&dealId=XhURuSC-spBbTIDfo4qfzQ%3D%3D&url=http%3A%2F%2Fwww.fumfie.com%2Fproduct%2F169.5%2Fshopping-com%3F&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+Digital+Camera+%28Camera+Body%29&dlprc=689.0&crn=&istrsmrc=1&isathrsl=0&AR=16&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=16&cid=&semid1=&semid2=&IsLps=0&CC=1&SL=1&FS=1&code=&acode=658&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="475674" trusted="true">
<name>FumFie</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/475674.gif</sourceURL></logo><phoneNumber>866 666 9198</phoneNumber><ratingInfo><reviewCount>560</reviewCount><rating>4.27</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_45.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_fumfie~MRD-475674~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>F169C5</sku></offer><offer featured="false" id="o0Px_XLWDbrxAYRy3rCmyQ==" smartBuy="false" used="false"><name>Nikon D90 SLR w/Nikon 18-105mm VR & 55-200mm VR Lenses</name><description>12.3 MegapixelDX Format CMOS Sensor3" VGA LCD DisplayLive ViewSelf Cleaning SensorD-Movie ModeHigh Sensitivity (ISO 3200)4.5 fps BurstIn-Camera Image Editing</description><c
ategoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d
7951-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="500" width="500"><sourceURL>http://di101.shopping.com/images/di/6f/30/50/785f584c5744627278415952793372436d7951-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">1189.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">1189.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=o0Px_XLWDbrxAYRy3rCmyQ%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D30619%26&linkin_id=7000610&Issdt=111021183845&searchID=p2
.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+w%2FNikon+18-105mm+VR+%26+55-200mm+VR+Lenses&dlprc=1189.0&crn=&istrsmrc=0&isathrsl=0&AR=20&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=20&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="487342" trusted="false"><name>RytherCamera.com</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/487342.gif</sourceURL></logo><phoneNumber>1-877-644-7593</phoneNumber><ratingInfo><reviewCount>0</reviewCount></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourc
eURL><countryCode>US</countryCode></countryFlag></store><sku>30619</sku></offer><offer featured="false" id="4HgbWJSJ8ssgIf8B0MXIwA==" smartBuy="false" used="false"><name>Nikon D90 12.3 Megapixel Digital SLR Camera (Body Only)</name><description>Fusing 12.3 megapixel image quality and a cinematic 24fps D-Movie Mode, the Nikon D90 exceeds the demands of passionate photographers. Coupled with Nikon's EXPEED image processing technologies and NIKKOR optics, breathtaking image fidelity is assured. Combined with fast 0.15ms power-up and split-second 65ms shooting lag, dramatic action and decisive moments are captured easily. Effective 4-frequency, ultrasonic sensor cleaning frees image degrading dust particles from the sensor's optical low pass filter.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-100x100-0-
0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di110.shopping.com/images/di/34/48/67/62574a534a3873736749663842304d58497741-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>FREE FEDEX 2-3 DAY DELIVERY</storeNotes><basePrice currency="USD">899.95</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">899.95</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/Dea
lFrame.cmp?bm=269&BEFID=7185&aon=%5E&MerchantID=9296&crawler_id=811558&dealId=4HgbWJSJ8ssgIf8B0MXIwA%3D%3D&url=http%3A%2F%2Fwww.pcnation.com%2Foptics-gallery%2Fdetails.asp%3Faffid%3D305%26item%3D2N145P&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+12.3+Megapixel+Digital+SLR+Camera+%28Body+Only%29&dlprc=899.95&crn=&istrsmrc=1&isathrsl=0&AR=21&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=21&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=257&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="9296" trusted="true"><name>PCNation</name><logo available="true" height="31" width="8
8"><sourceURL>http://img.shopping.com/cctool/merch_logos/9296.gif</sourceURL></logo><phoneNumber>800-470-7079</phoneNumber><ratingInfo><reviewCount>1622</reviewCount><rating>4.43</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_45.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_pcnation_9689~MRD-9296~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>2N145P</sku></offer><offer featured="false" id="UNDa3uMDZXOnvD_7sTILYg==" smartBuy="false" used="false"><name>Nikon D90 12.3MP Digital SLR Camera (Body Only)</name><description>Fusing 12.3-megapixel image quality inherited from the award-winning D300 with groundbreaking features, the D90's breathtaking, low-noise image quality is further advanced with EXPEED image processing. Split-second shutter response and contin
uous shooting at up to 4.5 frames-per-second provide the power to capture fast action and precise moments perfectly, while Nikon's exclusive Scene Recognition System contributes to faster 11-area autofocus performance, finer white balance detection and more. The D90 delivers the control passionate photographers demand, utilizing comprehensive exposure functions and the intelligence of 3D Color Matrix Metering II. Stunning results come to life on a 3-inch 920,000-dot color LCD monitor, providing accurate image review, Live View composition and brilliant playback of the D90's cinematic-quality 24-fps HD D-Movie mode.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" h
eight="200" width="200"><sourceURL>http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="500" width="500"><sourceURL>http://di102.shopping.com/images/di/55/4e/44/6133754d445a584f6e76445f377354494c5967-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&a
mp;r=5</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Fantastic prices with ease & comfort of Amazon.com!</storeNotes><basePrice currency="USD">780.00</basePrice><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">780.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=566&BEFID=7185&aon=%5E1&MerchantID=301531&crawler_id=1903313&dealId=UNDa3uMDZXOnvD_7sTILYg%3D%3D&url=http%3A%2F%2Fwww.amazon.com%2Fdp%2FB001ET5U92%2Fref%3Dasc_df_B001ET5U921751618%3Fsmid%3DAHF4SYKP09WBH%26tag%3Ddealtime-ce-mp01feed-20%26linkCode%3Dasn%26creative%3D395105%26creativeASIN%3DB001ET5U92&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+12.3MP+Digital+SLR+Camera+%28Body+Only%29&dlprc=780.0&crn=&istrsmrc=0&isathrsl=0&AR=29&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&a
mp;MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=99671132&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=29&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=520&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="301531" trusted="false"><name>Amazon Marketplace</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/301531.gif</sourceURL></logo><ratingInfo><reviewCount>213</reviewCount><rating>2.73</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_amazon_marketplace_9689~MRD-301531~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sour
ceURL><countryCode>US</countryCode></countryFlag></store><sku>B001ET5U92</sku></offer></offers></product><product id="70621646"><name>Nikon D90 Digital Camera with 18-105mm lens</name><shortDescription>12.9 Megapixel, SLR Camera, 3 in. LCD Screen, 5.8x Optical Zoom, With Video Capability, Weight: 2.3 lb.</shortDescription><fullDescription>Its 12.3 megapixel DX-format CMOS image sensor and EXPEED image processing system offer outstanding image quality across a wide ISO light sensitivity range. Live View mode lets you compose and shoot via the high-resolution 3-inch LCD monitor, and an advanced Scene Recognition System and autofocus performance help capture images with astounding accuracy. Movies can be shot in Motion JPEG format using the D-Movie function. The camera’s large image sensor ensures exceptional movie image quality and you can create dramatic effects by shooting with a wide range of interchangeable NIKKOR lenses, from wide-angle to macro to fisheye, or by adjusting the
lens aperture and experimenting with depth-of-field. The D90 – designed to fuel your passion for photography.</fullDescription><images><image available="true" height="100" width="100"><sourceURL>http://di1.shopping.com/images/pi/57/6a/4f/70621646-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di1.shopping.com/images/pi/57/6a/4f/70621646-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di1.shopping.com/images/pi/57/6a/4f/70621646-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di1.shopping.com/images/pi/57/6a/4f/70621646-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&
amp;l=7000610&t=111021183845&r=5</sourceURL></image><image available="true" height="489" width="490"><sourceURL>http://di1.shopping.com/images/pi/57/6a/4f/70621646-490x489-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=2&c=1&l=7000610&t=111021183845&r=5</sourceURL></image></images><rating><reviewCount>32</reviewCount><rating>4.81</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/pr/sdc_stars_sm_5.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/Nikon-D90-with-18-105mm-lens/reviews~linkin_id-7000610</reviewURL></rating><minPrice>849.95</minPrice><maxPrice>1599.95</maxPrice><productOffersURL>http://www.shopping.com/Nikon-D90-with-18-105mm-lens/prices~linkin_id-7000610</productOffersURL><productSpecsURL>http://www.shopping.com/Nikon-D90-with-18-105mm-lens/info~linkin_id-7000610</productSpecsURL><offers matchedOfferCount="25" pageNumber="1" returnedOfferCount="5"><offer featured="false" id="3o5e1VghgJPfhLvT1JFKTA==" smartBu
y="false" used="false"><name>Nikon D90 18-105mm VR Lens</name><description>The Nikon D90 SLR Digital Camera with its 12.3-megapixel DX-format CMOS 3" High resolution LCD display Scene Recognition System Picture Control Active D-Lighting and one-button Live View prov</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?
p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image><image available="true" height="260" width="260"><sourceURL>http://di111.shopping.com/images/di/33/6f/35/6531566768674a5066684c7654314a464b5441-260x260-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=1</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">849.95</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">849.95</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=419&BEFID=7185&aon=%5E1&MerchantID=9390&crawler_id=1905054&dealId=3o5e1V
ghgJPfhLvT1JFKTA%3D%3D&url=http%3A%2F%2Fwww.ajrichard.com%2FNikon-D90-18-105mm-VR-Lens%2Fp-292%3Frefid%3DShopping%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+18-105mm+VR+Lens&dlprc=849.95&crn=&istrsmrc=0&isathrsl=0&AR=2&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=2&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=425&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="9390" trusted="false"><name>AJRichard</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/9390.gif</sourceURL></logo><phoneNumber>1-888-871-1256</phoneNumber><ratingInfo><
reviewCount>3124</reviewCount><rating>4.48</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_45.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_ajrichard~MRD-9390~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>292</sku></offer><offer featured="false" id="_lYWj_jbwfsSkfcwUcDuww==" smartBuy="false" used="false"><name>Nikon D90 SLR w/Nikon 18-105mm VR Lens</name><description>12.3 MegapixelDX Format CMOS Sensor3" VGA LCD DisplayLive ViewSelf Cleaning SensorD-Movie ModeHigh Sensitivity (ISO 3200)4.5 fps BurstIn-Camera Image Editing</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-100x1
00-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di108.shopping.com/images/di/5f/6c/59/576a5f6a62776673536b666377556344757777-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image><image available="true" height="500" width="500"><sourceURL>http://di108.shopping.com/images/di/5f
/6c/59/576a5f6a62776673536b666377556344757777-500x500-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=2</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">909.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">0.00</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">909.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=371&BEFID=7185&aon=%5E1&MerchantID=487342&crawler_id=487342&dealId=_lYWj_jbwfsSkfcwUcDuww%3D%3D&url=http%3A%2F%2Fwww.rythercamera.com%2Fcatalog%2Fproduct_info.php%3Fcsv%3Dsh%26products_id%3D30971%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon+D90+SLR+w%2FNikon+18-105mm+VR+Lens&dlprc=909.0&crn=&istrsmrc=0&isathrsl=0&AR=3&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=
DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=3&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=1&code=&acode=379&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="487342" trusted="false"><name>RytherCamera.com</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/487342.gif</sourceURL></logo><phoneNumber>1-877-644-7593</phoneNumber><ratingInfo><reviewCount>0</reviewCount></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>30971</sku></offer><offer featured="false" id="1KCclCGuWvty2XKU9skadg==" smartBuy="false" used="false"><name>25448/D90 12.3 Megapixel Digital Camera 18-105mm Zoom Lens w/ 3" Screen -
Black</name><description>Nikon D90 - Digital camera - SLR - 12.3 Mpix - Nikon AF-S DX 18-105mm lens - optical zoom: 5.8 x - supported memory: SD, SDHC</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-100x100-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image><image available="true" height="300" width="300"><sourceURL>http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-300x300-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&
amp;r=3</sourceURL></image><image available="true" height="400" width="400"><sourceURL>http://di110.shopping.com/images/di/31/4b/43/636c4347755776747932584b5539736b616467-400x400-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=3</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><storeNotes>Get 30 days FREE SHIPPING w/ ShipVantage</storeNotes><basePrice currency="USD">1199.00</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">8.20</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">1199.00</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=578&BEFID=7185&aon=%5E1&MerchantID=485615&crawler_id=485615&dealId=1KCclCGuWvty2XKU9skadg%3D%3D&url=http%3A%2F%2Fsears.rdr.channelintelligence.com%2Fgo.asp%3FfVhzOGNRAAQIASNiE1NbQBRtFXpzYx0CTAICI2BbH1lEFmgKP3QvUVpEREdlfUAUHAQPLVpFTVdtJzxAHUNYW3AhQBM0QhFvEXAbYh8EAAVmb2JcVlhCGGkPc3QDEkFZVQ0W
FhdRW0MWbgYWDlxzdGMdAVQWRi0xDAwPFhw9TSobb05eWVVYKzsLTFVVQi5RICs3SA8MU1s2MQQKD1wf%26nAID%3D13736960%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=25448%2FD90+12.3+Megapixel+Digital+Camera+18-105mm+Zoom+Lens+w%2F+3%22+Screen+-+Black&dlprc=1199.0&crn=&istrsmrc=1&isathrsl=0&AR=4&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1&RR=4&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=586&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="485615" trusted="true"><name>Sears</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/485615.gif</sourceURL></logo><phoneNumber>1-
800-349-4358</phoneNumber><ratingInfo><reviewCount>888</reviewCount><rating>2.85</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_3.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_sears_4189479~MRD-485615~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>00353197000</sku></offer><offer featured="false" id="3-VOSfVV5Jo7HlA4kJtanA==" smartBuy="false" used="false"><name>Nikon® D90 12.3MP Digital SLR with 18-105mm Lens</name><description>The Nikon D90 will make you rethink what a digital SLR camera can achieve.</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="100" width="100"><sourceURL>http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-100x100-0-0.jpg?p=p2.a121b
c2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="200" width="200"><sourceURL>http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-200x200-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="false" height="300" width="300"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="false" height="400" width="400"><sourceURL>http://img.shopping.com/sc/ds/no_image_100X100.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610&t=111021183845&r=4</sourceURL></image><image available="true" height="220" width="220"><sourceURL>http://di101.shopping.com/images/di/33/2d/56/4f53665656354a6f37486c41346b4a74616e41-220x220-0-0.jpg?p=p2.a121bc2aaf029435dce6&a=1&c=1&l=7000610
&t=111021183845&r=4</sourceURL></image></imageList><stockStatus>in-stock</stockStatus><basePrice currency="USD">1350.99</basePrice><tax checkSite="true"></tax><shippingCost currency="USD">6.05</shippingCost><totalPrice checkSite="true"></totalPrice><originalPrice currency="USD">1350.99</originalPrice><offerURL>http://statTest.dealtime.com/DealFrame/DealFrame.cmp?bm=504&BEFID=7185&aon=%5E1&MerchantID=332477&crawler_id=332477&dealId=3-VOSfVV5Jo7HlA4kJtanA%3D%3D&url=http%3A%2F%2Ftracking.searchmarketing.com%2Fgsic.asp%3Faid%3D982673361%26&linkin_id=7000610&Issdt=111021183845&searchID=p2.a121bc2aaf029435dce6&DealName=Nikon%C2%AE+D90+12.3MP+Digital+SLR+with+18-105mm+Lens&dlprc=1350.99&crn=&istrsmrc=0&isathrsl=0&AR=5&NG=20&NDP=200&PN=1&ST=7&DB=sdcprod&MT=phx-pkadudc2&FPT=DSP&NDS=&NMS=&MRS=&PD=70621646&brnId=14804&IsFtr=0&IsSmart=0&DMT=&op=&CM=&DlLng=1
&RR=5&cid=&semid1=&semid2=&IsLps=0&CC=0&SL=0&FS=0&code=&acode=496&category=&HasLink=&frameId=&ND=&MN=&PT=&prjID=&GR=&lnkId=&VK=</offerURL><store authorizedReseller="false" id="332477" trusted="false"><name>RadioShack</name><logo available="true" height="31" width="88"><sourceURL>http://img.shopping.com/cctool/merch_logos/332477.gif</sourceURL></logo><ratingInfo><reviewCount>24</reviewCount><rating>2.25</rating><ratingImage height="18" width="91"><sourceURL>http://img.shopping.com/sc/mr/sdc_checks_25.gif</sourceURL></ratingImage><reviewURL>http://www.shopping.com/xMR-store_radioshack_9689~MRD-332477~S-1~linkin_id-7000610</reviewURL></ratingInfo><countryFlag height="11" width="18"><sourceURL>http://img.shopping.com/sc/glb/flag/US.gif</sourceURL><countryCode>US</countryCode></countryFlag></store><sku>11148905</sku></offer><offer featured="false" id="kQnB6rS4AjN5dx5h2_631g==" smartBuy="false" used="false"><n
ame>Nikon D90 Kit 12.3-megapixel Digital SLR with 18-105mm VR Lens</name><description>Photographers, take your passion further!Now is the time for new creativity, and to rethink what a digital SLR camera can achieve. It's time for the D90, a camera with everything you would expect from Nikon's next-generation D-SLRs, and some unexpected surprises, as well. The stunning image quality is inherited from the D300, Nikon's DX-format flagship. The D90 also has Nikon's unmatched ergonomics and high performance, and now takes high-quality movies with beautifully cinematic results. The world of photography has changed, and with the D90 in your hands, it's time to make your own rules.AF-S DX NIKKOR 18-105mm f/3.5-5.6G ED VR LensWide-ratio 5.8x zoom Compact, versatile and ideal for a broad range of shooting situations, ranging from interiors and landscapes to beautiful portraits� a perfect everyday zoom. Nikon VR (Vibration Reduction) image stabilization Vibration Reduction is engineered
specifically for each VR NIKKOR lens and enables handheld shooting at up to 3 shutter speeds slower than would</description><categoryId>7185</categoryId><manufacturer>Nikon</manufacturer><imageList><image available="true" height="
<TRUNCATED>
[47/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/big-not-pretty.xml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/big-not-pretty.xml b/blackberry10/node_modules/elementtree/node_modules/sax/examples/big-not-pretty.xml
new file mode 100644
index 0000000..fb5265d
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/big-not-pretty.xml
@@ -0,0 +1,8002 @@
+<big>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg" ></else><!-- COMMENT!
+
+--><![CDATA[processing...]]> <selfclosing tag="blr>""/> a bit down here</root>
+<root>
+ something<else> blerm <slurm
+
+
+ attrib =
+ "blorg"
<TRUNCATED>
[22/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/package.json b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/package.json
new file mode 100644
index 0000000..70bd6d5
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/package.json
@@ -0,0 +1,39 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me"
+ },
+ "name": "minimatch",
+ "description": "a glob matcher in javascript",
+ "version": "0.2.12",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "main": "minimatch.js",
+ "scripts": {
+ "test": "tap test"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "dependencies": {
+ "lru-cache": "2",
+ "sigmund": "~1.0.0"
+ },
+ "devDependencies": {
+ "tap": ""
+ },
+ "license": {
+ "type": "MIT",
+ "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
+ },
+ "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` charac
ter, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\n
then minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The opt
ions supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if
necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minim
atch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not expli
citly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/minimatch/issues"
+ },
+ "_id": "minimatch@0.2.12",
+ "_from": "minimatch@~0.2.9"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/basic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/basic.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/basic.js
new file mode 100644
index 0000000..ae7ac73
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/basic.js
@@ -0,0 +1,399 @@
+// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
+//
+// TODO: Some of these tests do very bad things with backslashes, and will
+// most likely fail badly on windows. They should probably be skipped.
+
+var tap = require("tap")
+ , globalBefore = Object.keys(global)
+ , mm = require("../")
+ , files = [ "a", "b", "c", "d", "abc"
+ , "abd", "abe", "bb", "bcd"
+ , "ca", "cb", "dd", "de"
+ , "bdir/", "bdir/cfile"]
+ , next = files.concat([ "a-b", "aXb"
+ , ".x", ".y" ])
+
+
+var patterns =
+ [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test"
+ , ["a*", ["a", "abc", "abd", "abe"]]
+ , ["X*", ["X*"], {nonull: true}]
+
+ // allow null glob expansion
+ , ["X*", []]
+
+ // isaacs: Slightly different than bash/sh/ksh
+ // \\* is not un-escaped to literal "*" in a failed match,
+ // but it does make it get treated as a literal star
+ , ["\\*", ["\\*"], {nonull: true}]
+ , ["\\**", ["\\**"], {nonull: true}]
+ , ["\\*\\*", ["\\*\\*"], {nonull: true}]
+
+ , ["b*/", ["bdir/"]]
+ , ["c*", ["c", "ca", "cb"]]
+ , ["**", files]
+
+ , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
+ , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
+
+ , "legendary larry crashes bashes"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
+
+ , "character classes"
+ , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
+ , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
+ "bdir/", "ca", "cb", "dd", "de"]]
+ , ["a*[^c]", ["abd", "abe"]]
+ , function () { files.push("a-b", "aXb") }
+ , ["a[X-]b", ["a-b", "aXb"]]
+ , function () { files.push(".x", ".y") }
+ , ["[^a-c]*", ["d", "dd", "de"]]
+ , function () { files.push("a*b/", "a*b/ooo") }
+ , ["a\\*b/*", ["a*b/ooo"]]
+ , ["a\\*?/*", ["a*b/ooo"]]
+ , ["*\\\\!*", [], {null: true}, ["echo !7"]]
+ , ["*\\!*", ["echo !7"], null, ["echo !7"]]
+ , ["*.\\*", ["r.*"], null, ["r.*"]]
+ , ["a[b]c", ["abc"]]
+ , ["a[\\b]c", ["abc"]]
+ , ["a?c", ["abc"]]
+ , ["a\\*c", [], {null: true}, ["abc"]]
+ , ["", [""], { null: true }, [""]]
+
+ , "http://www.opensource.apple.com/source/bash/bash-23/" +
+ "bash/tests/glob-test"
+ , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
+ , ["*/man*/bash.*", ["man/man1/bash.1"]]
+ , ["man/man1/bash.1", ["man/man1/bash.1"]]
+ , ["a***c", ["abc"], null, ["abc"]]
+ , ["a*****?c", ["abc"], null, ["abc"]]
+ , ["?*****??", ["abc"], null, ["abc"]]
+ , ["*****??", ["abc"], null, ["abc"]]
+ , ["?*****?c", ["abc"], null, ["abc"]]
+ , ["?***?****c", ["abc"], null, ["abc"]]
+ , ["?***?****?", ["abc"], null, ["abc"]]
+ , ["?***?****", ["abc"], null, ["abc"]]
+ , ["*******c", ["abc"], null, ["abc"]]
+ , ["*******?", ["abc"], null, ["abc"]]
+ , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["[-abc]", ["-"], null, ["-"]]
+ , ["[abc-]", ["-"], null, ["-"]]
+ , ["\\", ["\\"], null, ["\\"]]
+ , ["[\\\\]", ["\\"], null, ["\\"]]
+ , ["[[]", ["["], null, ["["]]
+ , ["[", ["["], null, ["["]]
+ , ["[*", ["[abc"], null, ["[abc"]]
+ , "a right bracket shall lose its special meaning and\n" +
+ "represent itself in a bracket expression if it occurs\n" +
+ "first in the list. -- POSIX.2 2.8.3.2"
+ , ["[]]", ["]"], null, ["]"]]
+ , ["[]-]", ["]"], null, ["]"]]
+ , ["[a-\z]", ["p"], null, ["p"]]
+ , ["??**********?****?", [], { null: true }, ["abc"]]
+ , ["??**********?****c", [], { null: true }, ["abc"]]
+ , ["?************c****?****", [], { null: true }, ["abc"]]
+ , ["*c*?**", [], { null: true }, ["abc"]]
+ , ["a*****c*?**", [], { null: true }, ["abc"]]
+ , ["a********???*******", [], { null: true }, ["abc"]]
+ , ["[]", [], { null: true }, ["a"]]
+ , ["[abc", [], { null: true }, ["["]]
+
+ , "nocase tests"
+ , ["XYZ", ["xYz"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["ab*", ["ABC"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ , "onestar/twostar"
+ , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
+ , ["{/?,*}", ["/a", "bb"], {null: true}
+ , ["/a", "/b/b", "/a/b/c", "bb"]]
+
+ , "dots should not match unless requested"
+ , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
+
+ // .. and . can only match patterns starting with .,
+ // even when options.dot is set.
+ , function () {
+ files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
+ }
+ , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
+ , ["a/*/b", ["a/c/b"], {dot:false}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
+
+
+ // this also tests that changing the options needs
+ // to change the cache key, even if the pattern is
+ // the same!
+ , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
+ , [ ".a/.d", "a/.d", "a/b"]]
+
+ , "paren sets cannot contain slashes"
+ , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
+
+ // brace sets trump all else.
+ //
+ // invalid glob pattern. fails on bash4 and bsdglob.
+ // however, in this implementation, it's easier just
+ // to do the intuitive thing, and let brace-expansion
+ // actually come before parsing any extglob patterns,
+ // like the documentation seems to say.
+ //
+ // XXX: if anyone complains about this, either fix it
+ // or tell them to grow up and stop complaining.
+ //
+ // bash/bsdglob says this:
+ // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
+ // but we do this instead:
+ , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
+
+ // test partial parsing in the presence of comment/negation chars
+ , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
+ , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
+
+ // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
+ , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
+ , {}
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
+
+
+ // crazy nested {,,} and *(||) tests.
+ , function () {
+ files = [ "a", "b", "c", "d"
+ , "ab", "ac", "ad"
+ , "bc", "cb"
+ , "bc,d", "c,db", "c,d"
+ , "d)", "(b|c", "*(b|c"
+ , "b|c", "b|cc", "cb|c"
+ , "x(a|b|c)", "x(a|c)"
+ , "(a|b|c)", "(a|c)"]
+ }
+ , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
+ , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
+ // a
+ // *(b|c)
+ // *(b|d)
+ , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
+ , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
+
+
+ // test various flag settings.
+ , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
+ , { noext: true } ]
+ , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
+ , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
+ , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
+
+
+ // begin channelling Boole and deMorgan...
+ , "negation tests"
+ , function () {
+ files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
+ }
+
+ // anything that is NOT a* matches.
+ , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
+
+ // anything that IS !a* matches.
+ , ["!a*", ["!ab", "!abc"], {nonegate: true}]
+
+ // anything that IS a* matches
+ , ["!!a*", ["a!b"]]
+
+ // anything that is NOT !a* matches
+ , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
+
+ // negation nestled within a pattern
+ , function () {
+ files = [ "foo.js"
+ , "foo.bar"
+ // can't match this one without negative lookbehind.
+ , "foo.js.js"
+ , "blar.js"
+ , "foo."
+ , "boo.js.boo" ]
+ }
+ , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
+
+ // https://github.com/isaacs/minimatch/issues/5
+ , function () {
+ files = [ 'a/b/.x/c'
+ , 'a/b/.x/c/d'
+ , 'a/b/.x/c/d/e'
+ , 'a/b/.x'
+ , 'a/b/.x/'
+ , 'a/.x/b'
+ , '.x'
+ , '.x/'
+ , '.x/a'
+ , '.x/a/b'
+ , 'a/.x/b/.x/c'
+ , '.x/.x' ]
+ }
+ , ["**/.x/**", [ '.x/'
+ , '.x/a'
+ , '.x/a/b'
+ , 'a/.x/b'
+ , 'a/b/.x/'
+ , 'a/b/.x/c'
+ , 'a/b/.x/c/d'
+ , 'a/b/.x/c/d/e' ] ]
+
+ ]
+
+var regexps =
+ [ '/^(?:(?=.)a[^/]*?)$/',
+ '/^(?:(?=.)X[^/]*?)$/',
+ '/^(?:(?=.)X[^/]*?)$/',
+ '/^(?:\\*)$/',
+ '/^(?:(?=.)\\*[^/]*?)$/',
+ '/^(?:\\*\\*)$/',
+ '/^(?:(?=.)b[^/]*?\\/)$/',
+ '/^(?:(?=.)c[^/]*?)$/',
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/',
+ '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/',
+ '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/',
+ '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/',
+ '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/',
+ '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/',
+ '/^(?:(?=.)a[^/]*?[^c])$/',
+ '/^(?:(?=.)a[X-]b)$/',
+ '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/',
+ '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/',
+ '/^(?:(?=.)a[b]c)$/',
+ '/^(?:(?=.)a[b]c)$/',
+ '/^(?:(?=.)a[^/]c)$/',
+ '/^(?:a\\*c)$/',
+ 'false',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/',
+ '/^(?:man\\/man1\\/bash\\.1)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
+ '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[-abc])$/',
+ '/^(?:(?!\\.)(?=.)[abc-])$/',
+ '/^(?:\\\\)$/',
+ '/^(?:(?!\\.)(?=.)[\\\\])$/',
+ '/^(?:(?!\\.)(?=.)[\\[])$/',
+ '/^(?:\\[)$/',
+ '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[\\]])$/',
+ '/^(?:(?!\\.)(?=.)[\\]-])$/',
+ '/^(?:(?!\\.)(?=.)[a-z])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:\\[\\])$/',
+ '/^(?:\\[abc)$/',
+ '/^(?:(?=.)XYZ)$/i',
+ '/^(?:(?=.)ab[^/]*?)$/i',
+ '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i',
+ '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/',
+ '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/',
+ '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/',
+ '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/',
+ '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/',
+ '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/',
+ '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/',
+ '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/',
+ '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/',
+ '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/',
+ '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/',
+ '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/',
+ '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/',
+ '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/',
+ '/^(?:(?=.)a[^/]b)$/',
+ '/^(?:(?=.)#[^/]*?)$/',
+ '/^(?!^(?:(?=.)a[^/]*?)$).*$/',
+ '/^(?:(?=.)\\!a[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?)$/',
+ '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/',
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ]
+var re = 0;
+
+tap.test("basic tests", function (t) {
+ var start = Date.now()
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ patterns.forEach(function (c) {
+ if (typeof c === "function") return c()
+ if (typeof c === "string") return t.comment(c)
+
+ var pattern = c[0]
+ , expect = c[1].sort(alpha)
+ , options = c[2] || {}
+ , f = c[3] || files
+ , tapOpts = c[4] || {}
+
+ // options.debug = true
+ var m = new mm.Minimatch(pattern, options)
+ var r = m.makeRe()
+ var expectRe = regexps[re++]
+ tapOpts.re = String(r) || JSON.stringify(r)
+ tapOpts.files = JSON.stringify(f)
+ tapOpts.pattern = pattern
+ tapOpts.set = m.set
+ tapOpts.negated = m.negate
+
+ var actual = mm.match(f, pattern, options)
+ actual.sort(alpha)
+
+ t.equivalent( actual, expect
+ , JSON.stringify(pattern) + " " + JSON.stringify(expect)
+ , tapOpts )
+
+ t.equal(tapOpts.re, expectRe, tapOpts)
+ })
+
+ t.comment("time=" + (Date.now() - start) + "ms")
+ t.end()
+})
+
+tap.test("global leak test", function (t) {
+ var globalAfter = Object.keys(global)
+ t.equivalent(globalAfter, globalBefore, "no new globals, please")
+ t.end()
+})
+
+function alpha (a, b) {
+ return a > b ? 1 : -1
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/brace-expand.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/brace-expand.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/brace-expand.js
new file mode 100644
index 0000000..7ee278a
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/brace-expand.js
@@ -0,0 +1,33 @@
+var tap = require("tap")
+ , minimatch = require("../")
+
+tap.test("brace expansion", function (t) {
+ // [ pattern, [expanded] ]
+ ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}"
+ , [ "abxy"
+ , "abxz"
+ , "acdxy"
+ , "acdxz"
+ , "acexy"
+ , "acexz"
+ , "afhxy"
+ , "afhxz"
+ , "aghxy"
+ , "aghxz" ] ]
+ , [ "a{1..5}b"
+ , [ "a1b"
+ , "a2b"
+ , "a3b"
+ , "a4b"
+ , "a5b" ] ]
+ , [ "a{b}c", ["a{b}c"] ]
+ ].forEach(function (tc) {
+ var p = tc[0]
+ , expect = tc[1]
+ t.equivalent(minimatch.braceExpand(p), expect, p)
+ })
+ console.error("ending")
+ t.end()
+})
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/caching.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/caching.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/caching.js
new file mode 100644
index 0000000..0fec4b0
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/caching.js
@@ -0,0 +1,14 @@
+var Minimatch = require("../minimatch.js").Minimatch
+var tap = require("tap")
+tap.test("cache test", function (t) {
+ var mm1 = new Minimatch("a?b")
+ var mm2 = new Minimatch("a?b")
+ t.equal(mm1, mm2, "should get the same object")
+ // the lru should drop it after 100 entries
+ for (var i = 0; i < 100; i ++) {
+ new Minimatch("a"+i)
+ }
+ mm2 = new Minimatch("a?b")
+ t.notEqual(mm1, mm2, "cache should have dropped")
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/defaults.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/defaults.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/defaults.js
new file mode 100644
index 0000000..25f1f60
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/test/defaults.js
@@ -0,0 +1,274 @@
+// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
+//
+// TODO: Some of these tests do very bad things with backslashes, and will
+// most likely fail badly on windows. They should probably be skipped.
+
+var tap = require("tap")
+ , globalBefore = Object.keys(global)
+ , mm = require("../")
+ , files = [ "a", "b", "c", "d", "abc"
+ , "abd", "abe", "bb", "bcd"
+ , "ca", "cb", "dd", "de"
+ , "bdir/", "bdir/cfile"]
+ , next = files.concat([ "a-b", "aXb"
+ , ".x", ".y" ])
+
+tap.test("basic tests", function (t) {
+ var start = Date.now()
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ ; [ "http://www.bashcookbook.com/bashinfo" +
+ "/source/bash-1.14.7/tests/glob-test"
+ , ["a*", ["a", "abc", "abd", "abe"]]
+ , ["X*", ["X*"], {nonull: true}]
+
+ // allow null glob expansion
+ , ["X*", []]
+
+ // isaacs: Slightly different than bash/sh/ksh
+ // \\* is not un-escaped to literal "*" in a failed match,
+ // but it does make it get treated as a literal star
+ , ["\\*", ["\\*"], {nonull: true}]
+ , ["\\**", ["\\**"], {nonull: true}]
+ , ["\\*\\*", ["\\*\\*"], {nonull: true}]
+
+ , ["b*/", ["bdir/"]]
+ , ["c*", ["c", "ca", "cb"]]
+ , ["**", files]
+
+ , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
+ , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
+
+ , "legendary larry crashes bashes"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
+
+ , "character classes"
+ , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
+ , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
+ "bdir/", "ca", "cb", "dd", "de"]]
+ , ["a*[^c]", ["abd", "abe"]]
+ , function () { files.push("a-b", "aXb") }
+ , ["a[X-]b", ["a-b", "aXb"]]
+ , function () { files.push(".x", ".y") }
+ , ["[^a-c]*", ["d", "dd", "de"]]
+ , function () { files.push("a*b/", "a*b/ooo") }
+ , ["a\\*b/*", ["a*b/ooo"]]
+ , ["a\\*?/*", ["a*b/ooo"]]
+ , ["*\\\\!*", [], {null: true}, ["echo !7"]]
+ , ["*\\!*", ["echo !7"], null, ["echo !7"]]
+ , ["*.\\*", ["r.*"], null, ["r.*"]]
+ , ["a[b]c", ["abc"]]
+ , ["a[\\b]c", ["abc"]]
+ , ["a?c", ["abc"]]
+ , ["a\\*c", [], {null: true}, ["abc"]]
+ , ["", [""], { null: true }, [""]]
+
+ , "http://www.opensource.apple.com/source/bash/bash-23/" +
+ "bash/tests/glob-test"
+ , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
+ , ["*/man*/bash.*", ["man/man1/bash.1"]]
+ , ["man/man1/bash.1", ["man/man1/bash.1"]]
+ , ["a***c", ["abc"], null, ["abc"]]
+ , ["a*****?c", ["abc"], null, ["abc"]]
+ , ["?*****??", ["abc"], null, ["abc"]]
+ , ["*****??", ["abc"], null, ["abc"]]
+ , ["?*****?c", ["abc"], null, ["abc"]]
+ , ["?***?****c", ["abc"], null, ["abc"]]
+ , ["?***?****?", ["abc"], null, ["abc"]]
+ , ["?***?****", ["abc"], null, ["abc"]]
+ , ["*******c", ["abc"], null, ["abc"]]
+ , ["*******?", ["abc"], null, ["abc"]]
+ , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["[-abc]", ["-"], null, ["-"]]
+ , ["[abc-]", ["-"], null, ["-"]]
+ , ["\\", ["\\"], null, ["\\"]]
+ , ["[\\\\]", ["\\"], null, ["\\"]]
+ , ["[[]", ["["], null, ["["]]
+ , ["[", ["["], null, ["["]]
+ , ["[*", ["[abc"], null, ["[abc"]]
+ , "a right bracket shall lose its special meaning and\n" +
+ "represent itself in a bracket expression if it occurs\n" +
+ "first in the list. -- POSIX.2 2.8.3.2"
+ , ["[]]", ["]"], null, ["]"]]
+ , ["[]-]", ["]"], null, ["]"]]
+ , ["[a-\z]", ["p"], null, ["p"]]
+ , ["??**********?****?", [], { null: true }, ["abc"]]
+ , ["??**********?****c", [], { null: true }, ["abc"]]
+ , ["?************c****?****", [], { null: true }, ["abc"]]
+ , ["*c*?**", [], { null: true }, ["abc"]]
+ , ["a*****c*?**", [], { null: true }, ["abc"]]
+ , ["a********???*******", [], { null: true }, ["abc"]]
+ , ["[]", [], { null: true }, ["a"]]
+ , ["[abc", [], { null: true }, ["["]]
+
+ , "nocase tests"
+ , ["XYZ", ["xYz"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["ab*", ["ABC"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ , "onestar/twostar"
+ , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
+ , ["{/?,*}", ["/a", "bb"], {null: true}
+ , ["/a", "/b/b", "/a/b/c", "bb"]]
+
+ , "dots should not match unless requested"
+ , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
+
+ // .. and . can only match patterns starting with .,
+ // even when options.dot is set.
+ , function () {
+ files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
+ }
+ , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
+ , ["a/*/b", ["a/c/b"], {dot:false}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
+
+
+ // this also tests that changing the options needs
+ // to change the cache key, even if the pattern is
+ // the same!
+ , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
+ , [ ".a/.d", "a/.d", "a/b"]]
+
+ , "paren sets cannot contain slashes"
+ , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
+
+ // brace sets trump all else.
+ //
+ // invalid glob pattern. fails on bash4 and bsdglob.
+ // however, in this implementation, it's easier just
+ // to do the intuitive thing, and let brace-expansion
+ // actually come before parsing any extglob patterns,
+ // like the documentation seems to say.
+ //
+ // XXX: if anyone complains about this, either fix it
+ // or tell them to grow up and stop complaining.
+ //
+ // bash/bsdglob says this:
+ // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
+ // but we do this instead:
+ , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
+
+ // test partial parsing in the presence of comment/negation chars
+ , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
+ , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
+
+ // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
+ , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
+ , {}
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
+
+
+ // crazy nested {,,} and *(||) tests.
+ , function () {
+ files = [ "a", "b", "c", "d"
+ , "ab", "ac", "ad"
+ , "bc", "cb"
+ , "bc,d", "c,db", "c,d"
+ , "d)", "(b|c", "*(b|c"
+ , "b|c", "b|cc", "cb|c"
+ , "x(a|b|c)", "x(a|c)"
+ , "(a|b|c)", "(a|c)"]
+ }
+ , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
+ , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
+ // a
+ // *(b|c)
+ // *(b|d)
+ , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
+ , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
+
+
+ // test various flag settings.
+ , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
+ , { noext: true } ]
+ , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
+ , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
+ , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
+
+
+ // begin channelling Boole and deMorgan...
+ , "negation tests"
+ , function () {
+ files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
+ }
+
+ // anything that is NOT a* matches.
+ , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
+
+ // anything that IS !a* matches.
+ , ["!a*", ["!ab", "!abc"], {nonegate: true}]
+
+ // anything that IS a* matches
+ , ["!!a*", ["a!b"]]
+
+ // anything that is NOT !a* matches
+ , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
+
+ // negation nestled within a pattern
+ , function () {
+ files = [ "foo.js"
+ , "foo.bar"
+ // can't match this one without negative lookbehind.
+ , "foo.js.js"
+ , "blar.js"
+ , "foo."
+ , "boo.js.boo" ]
+ }
+ , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
+
+ ].forEach(function (c) {
+ if (typeof c === "function") return c()
+ if (typeof c === "string") return t.comment(c)
+
+ var pattern = c[0]
+ , expect = c[1].sort(alpha)
+ , options = c[2] || {}
+ , f = c[3] || files
+ , tapOpts = c[4] || {}
+
+ // options.debug = true
+ var Class = mm.defaults(options).Minimatch
+ var m = new Class(pattern, {})
+ var r = m.makeRe()
+ tapOpts.re = String(r) || JSON.stringify(r)
+ tapOpts.files = JSON.stringify(f)
+ tapOpts.pattern = pattern
+ tapOpts.set = m.set
+ tapOpts.negated = m.negate
+
+ var actual = mm.match(f, pattern, options)
+ actual.sort(alpha)
+
+ t.equivalent( actual, expect
+ , JSON.stringify(pattern) + " " + JSON.stringify(expect)
+ , tapOpts )
+ })
+
+ t.comment("time=" + (Date.now() - start) + "ms")
+ t.end()
+})
+
+tap.test("global leak test", function (t) {
+ var globalAfter = Object.keys(global)
+ t.equivalent(globalAfter, globalBefore, "no new globals, please")
+ t.end()
+})
+
+function alpha (a, b) {
+ return a > b ? 1 : -1
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/package.json b/blackberry10/node_modules/jasmine-node/node_modules/gaze/package.json
new file mode 100644
index 0000000..e1c309c
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "gaze",
+ "description": "A globbing fs.watch wrapper built from the best parts of other fine watch libs.",
+ "version": "0.3.4",
+ "homepage": "https://github.com/shama/gaze",
+ "author": {
+ "name": "Kyle Robinson Young",
+ "email": "kyle@dontkry.com"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/shama/gaze.git"
+ },
+ "bugs": {
+ "url": "https://github.com/shama/gaze/issues"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/shama/gaze/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "lib/gaze",
+ "engines": {
+ "node": ">= 0.6.0"
+ },
+ "scripts": {
+ "test": "grunt nodeunit -v"
+ },
+ "dependencies": {
+ "minimatch": "~0.2.9",
+ "fileset": "~0.1.5"
+ },
+ "devDependencies": {
+ "grunt": "~0.4.0rc7",
+ "grunt-contrib-nodeunit": "~0.1.2rc6",
+ "grunt-contrib-jshint": "~0.1.1rc6",
+ "grunt-benchmark": "~0.1.1"
+ },
+ "keywords": [
+ "watch",
+ "glob"
+ ],
+ "contributors": [
+ {
+ "name": "Kyle Robinson Young",
+ "url": "http://dontkry.com"
+ },
+ {
+ "name": "Sam Day",
+ "url": "http://sam.is-super-awesome.com"
+ },
+ {
+ "name": "Roarke Gaskill",
+ "url": "http://starkinvestments.com"
+ },
+ {
+ "name": "Lance Pollard",
+ "url": "http://lancepollard.com/"
+ },
+ {
+ "name": "Daniel Fagnan",
+ "url": "http://hydrocodedesign.com/"
+ }
+ ],
+ "readme": "# gaze [](http://travis-ci.org/shama/gaze)\n\nA globbing fs.watch wrapper built from the best parts of other fine watch libs.\n\nCompatible with NodeJS v0.8/0.6, Windows, OSX and Linux.\n\n## Usage\nInstall the module with: `npm install gaze` or place into your `package.json`\nand run `npm install`.\n\n```javascript\nvar gaze = require('gaze');\n\n// Watch all .js files/dirs in process.cwd()\ngaze('**/*.js', function(err, watcher) {\n // Files have all started watching\n // watcher === this\n\n // Get all watched files\n console.log(this.watched());\n\n // On file changed\n this.on('changed', function(filepath) {\n console.log(filepath + ' was changed');\n });\n\n // On file added\n this.on('added', function(filepath) {\n console.log(filepath + ' was added');\n });\n\n // On file deleted\n this.on('deleted', function(filepath) {\n console.log(filepath + ' was deleted');\n });
\n\n // On changed/added/deleted\n this.on('all', function(event, filepath) {\n console.log(filepath + ' was ' + event);\n });\n\n // Get watched files with relative paths\n console.log(this.relative());\n});\n\n// Also accepts an array of patterns\ngaze(['stylesheets/*.css', 'images/**/*.png'], function() {\n // Add more patterns later to be watched\n this.add(['js/*.js']);\n});\n```\n\n### Alternate Interface\n\n```javascript\nvar Gaze = require('gaze').Gaze;\n\nvar gaze = new Gaze('**/*');\n\n// Files have all started watching\ngaze.on('ready', function(watcher) { });\n\n// A file has been added/changed/deleted has occurred\ngaze.on('all', function(event, filepath) { });\n```\n\n### Errors\n\n```javascript\ngaze('**/*', function() {\n this.on('error', function(err) {\n // Handle error here\n });\n});\n```\n\n### Minimatch / Glob\n\nSee [isaacs's minimatch](https://github.com/isaacs/minimatch) for more\ninformation on glob patterns.\n\n## Documentation\n\n### gaze(p
atterns, [options], callback)\n\n* `patterns` {String|Array} File patterns to be matched\n* `options` {Object}\n* `callback` {Function}\n * `err` {Error | null}\n * `watcher` {Object} Instance of the Gaze watcher\n\n### Class: gaze.Gaze\n\nCreate a Gaze object by instanting the `gaze.Gaze` class.\n\n```javascript\nvar Gaze = require('gaze').Gaze;\nvar gaze = new Gaze(pattern, options, callback);\n```\n\n#### Properties\n\n* `options` The options object passed in.\n * `interval` {integer} Interval to pass to fs.watchFile\n * `debounceDelay` {integer} Delay for events called in succession for the same\n file/event\n\n#### Events\n\n* `ready(watcher)` When files have been globbed and watching has begun.\n* `all(event, filepath)` When an `added`, `changed` or `deleted` event occurs.\n* `added(filepath)` When a file has been added to a watch directory.\n* `changed(filepath)` When a file has been changed.\n* `deleted(filepath)` When a file has been deleted.\n* `renamed(newPath, old
Path)` When a file has been renamed.\n* `end()` When the watcher is closed and watches have been removed.\n* `error(err)` When an error occurs.\n\n#### Methods\n\n* `emit(event, [...])` Wrapper for the EventEmitter.emit.\n `added`|`changed`|`deleted` events will also trigger the `all` event.\n* `close()` Unwatch all files and reset the watch instance.\n* `add(patterns, callback)` Adds file(s) patterns to be watched.\n* `remove(filepath)` removes a file or directory from being watched. Does not\n recurse directories.\n* `watched()` Returns the currently watched files.\n* `relative([dir, unixify])` Returns the currently watched files with relative paths.\n * `dir` {string} Only return relative files for this directory.\n * `unixify` {boolean} Return paths with `/` instead of `\\\\` if on Windows.\n\n## FAQs\n\n### Why Another `fs.watch` Wrapper?\nI liked parts of other `fs.watch` wrappers but none had all the features I\nneeded. This lib combines the features I needed from other f
ine watch libs:\nSpeedy data behavior from\n[paulmillr's chokidar](https://github.com/paulmillr/chokidar), API interface\nfrom [mikeal's watch](https://github.com/mikeal/watch) and file globbing using\n[isaacs's glob](https://github.com/isaacs/node-glob) which is also used by\n[cowboy's Grunt](https://github.com/gruntjs/grunt).\n\n### How do I fix the error `EMFILE: Too many opened files.`?\nThis is because of your system's max opened file limit. For OSX the default is\nvery low (256). Increase your limit temporarily with `ulimit -n 10480`, the\nnumber being the new max limit.\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style.\nAdd unit tests for any new or changed functionality. Lint and test your code\nusing [grunt](http://gruntjs.com/).\n\n## Release History\n* 0.3.4 - Code clean up. Fix path must be strings errors (@groner). Fix incorrect added events (@groner).\n* 0.3.3 - Fix for multiple patterns with negate.\n* 0.3.2 - Emit `e
nd` before removeAllListeners.\n* 0.3.1 - Fix added events within subfolder patterns.\n* 0.3.0 - Handle safewrite events, `forceWatchMethod` option removed, bug fixes and watch optimizations (@rgaskill).\n* 0.2.2 - Fix issue where subsequent add calls dont get watched (@samcday). removeAllListeners on close.\n* 0.2.1 - Fix issue with invalid `added` events in current working dir.\n* 0.2.0 - Support and mark folders with `path.sep`. Add `forceWatchMethod` option. Support `renamed` events.\n* 0.1.6 - Recognize the `cwd` option properly\n* 0.1.5 - Catch too many open file errors\n* 0.1.4 - Really fix the race condition with 2 watches\n* 0.1.3 - Fix race condition with 2 watches\n* 0.1.2 - Read triggering changed event fix\n* 0.1.1 - Minor fixes\n* 0.1.0 - Initial release\n\n## License\nCopyright (c) 2013 Kyle Robinson Young\nLicensed under the MIT license.\n",
+ "readmeFilename": "README.md",
+ "_id": "gaze@0.3.4",
+ "_from": "gaze@~0.3.2"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/add_test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/add_test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/add_test.js
new file mode 100644
index 0000000..6949ac9
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/add_test.js
@@ -0,0 +1,50 @@
+'use strict';
+
+var Gaze = require('../lib/gaze.js').Gaze;
+var path = require('path');
+var fs = require('fs');
+
+exports.add = {
+ setUp: function(done) {
+ process.chdir(path.resolve(__dirname, 'fixtures'));
+ done();
+ },
+ addToWatched: function(test) {
+ test.expect(1);
+ var files = [
+ 'Project (LO)/',
+ 'Project (LO)/one.js',
+ 'nested/',
+ 'nested/one.js',
+ 'nested/three.js',
+ 'nested/sub/',
+ 'nested/sub/two.js',
+ 'one.js'
+ ];
+ var expected = {
+ 'Project (LO)/': ['one.js'],
+ '.': ['Project (LO)/', 'nested/', 'one.js'],
+ 'nested/': ['one.js', 'three.js', 'sub/'],
+ 'nested/sub/': ['two.js']
+ };
+ var gaze = new Gaze('addnothingtowatch');
+ gaze._addToWatched(files);
+ test.deepEqual(gaze.relative(null, true), expected);
+ test.done();
+ },
+ addLater: function(test) {
+ test.expect(3);
+ new Gaze('sub/one.js', function(err, watcher) {
+ test.deepEqual(watcher.relative('sub'), ['one.js']);
+ watcher.add('sub/*.js', function() {
+ test.deepEqual(watcher.relative('sub'), ['one.js', 'two.js']);
+ watcher.on('changed', function(filepath) {
+ test.equal('two.js', path.basename(filepath));
+ watcher.close();
+ test.done();
+ });
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'sub', 'two.js'), 'var two = true;');
+ });
+ });
+ }
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/api_test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/api_test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/api_test.js
new file mode 100644
index 0000000..42d258e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/api_test.js
@@ -0,0 +1,38 @@
+'use strict';
+
+var gaze = require('../lib/gaze.js');
+var path = require('path');
+
+exports.api = {
+ setUp: function(done) {
+ process.chdir(path.resolve(__dirname, 'fixtures'));
+ done();
+ },
+ newGaze: function(test) {
+ test.expect(2);
+ new gaze.Gaze('**/*', {}, function() {
+ var result = this.relative(null, true);
+ test.deepEqual(result['.'], ['Project (LO)/', 'nested/', 'one.js', 'sub/']);
+ test.deepEqual(result['sub/'], ['one.js', 'two.js']);
+ this.close();
+ test.done();
+ });
+ },
+ func: function(test) {
+ test.expect(1);
+ var g = gaze('**/*', function(err, watcher) {
+ test.deepEqual(watcher.relative('sub', true), ['one.js', 'two.js']);
+ g.close();
+ test.done();
+ });
+ },
+ ready: function(test) {
+ test.expect(1);
+ var g = new gaze.Gaze('**/*');
+ g.on('ready', function(watcher) {
+ test.deepEqual(watcher.relative('sub', true), ['one.js', 'two.js']);
+ this.close();
+ test.done();
+ });
+ }
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/Project (LO)/one.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/Project (LO)/one.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/Project (LO)/one.js
new file mode 100644
index 0000000..fefeeea
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/Project (LO)/one.js
@@ -0,0 +1 @@
+var one = true;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/one.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/one.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/one.js
new file mode 100644
index 0000000..fefeeea
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/one.js
@@ -0,0 +1 @@
+var one = true;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/sub/two.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/sub/two.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/sub/two.js
new file mode 100644
index 0000000..24ad8a3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/sub/two.js
@@ -0,0 +1 @@
+var two = true;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/sub2/two.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/sub2/two.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/sub2/two.js
new file mode 100644
index 0000000..24ad8a3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/sub2/two.js
@@ -0,0 +1 @@
+var two = true;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/three.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/three.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/three.js
new file mode 100644
index 0000000..3392956
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/nested/three.js
@@ -0,0 +1 @@
+var three = true;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/one.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/one.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/one.js
new file mode 100644
index 0000000..517f09f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/one.js
@@ -0,0 +1 @@
+var test = true;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/sub/one.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/sub/one.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/sub/one.js
new file mode 100644
index 0000000..fefeeea
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/sub/one.js
@@ -0,0 +1 @@
+var one = true;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/sub/two.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/sub/two.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/sub/two.js
new file mode 100644
index 0000000..24ad8a3
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/fixtures/sub/two.js
@@ -0,0 +1 @@
+var two = true;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/matching_test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/matching_test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/matching_test.js
new file mode 100644
index 0000000..9e01cd2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/matching_test.js
@@ -0,0 +1,57 @@
+'use strict';
+
+var gaze = require('../lib/gaze.js');
+var path = require('path');
+
+exports.matching = {
+ setUp: function(done) {
+ process.chdir(path.resolve(__dirname, 'fixtures'));
+ done();
+ },
+ globAll: function(test) {
+ test.expect(2);
+ gaze('**/*', function() {
+ var result = this.relative(null, true);
+ test.deepEqual(result['.'], ['Project (LO)/', 'nested/', 'one.js', 'sub/']);
+ test.deepEqual(result['sub/'], ['one.js', 'two.js']);
+ this.close();
+ test.done();
+ });
+ },
+ relativeDir: function(test) {
+ test.expect(1);
+ gaze('**/*', function() {
+ test.deepEqual(this.relative('sub', true), ['one.js', 'two.js']);
+ this.close();
+ test.done();
+ });
+ },
+ globArray: function(test) {
+ test.expect(2);
+ gaze(['*.js', 'sub/*.js'], function() {
+ var result = this.relative(null, true);
+ test.deepEqual(result['.'], ['one.js']);
+ test.deepEqual(result['sub/'], ['one.js', 'two.js']);
+ this.close();
+ test.done();
+ });
+ },
+ globArrayDot: function(test) {
+ test.expect(1);
+ gaze(['./sub/*.js'], function() {
+ var result = this.relative(null, true);
+ test.deepEqual(result['sub/'], ['one.js', 'two.js']);
+ this.close();
+ test.done();
+ });
+ },
+ oddName: function(test) {
+ test.expect(1);
+ gaze(['Project (LO)/*.js'], function() {
+ var result = this.relative(null, true);
+ test.deepEqual(result['Project (LO)/'], ['one.js']);
+ this.close();
+ test.done();
+ });
+ }
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/patterns_test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/patterns_test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/patterns_test.js
new file mode 100644
index 0000000..46b94e4
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/patterns_test.js
@@ -0,0 +1,42 @@
+'use strict';
+
+var gaze = require('../lib/gaze.js');
+var path = require('path');
+var fs = require('fs');
+
+// Clean up helper to call in setUp and tearDown
+function cleanUp(done) {
+ [
+ 'added.js',
+ 'nested/added.js',
+ ].forEach(function(d) {
+ var p = path.resolve(__dirname, 'fixtures', d);
+ if (fs.existsSync(p)) { fs.unlinkSync(p); }
+ });
+ done();
+}
+
+exports.patterns = {
+ setUp: function(done) {
+ process.chdir(path.resolve(__dirname, 'fixtures'));
+ cleanUp(done);
+ },
+ tearDown: cleanUp,
+ negate: function(test) {
+ test.expect(1);
+ gaze(['**/*.js', '!nested/**/*.js'], function(err, watcher) {
+ watcher.on('added', function(filepath) {
+ var expected = path.relative(process.cwd(), filepath);
+ test.equal(path.join('added.js'), expected);
+ watcher.close();
+ });
+ // dont add
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'nested', 'added.js'), 'var added = true;');
+ setTimeout(function() {
+ // should add
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'added.js'), 'var added = true;');
+ }, 1000);
+ watcher.on('end', test.done);
+ });
+ }
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/relative_test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/relative_test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/relative_test.js
new file mode 100644
index 0000000..52e5a57
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/relative_test.js
@@ -0,0 +1,28 @@
+'use strict';
+
+var Gaze = require('../lib/gaze.js').Gaze;
+var path = require('path');
+
+exports.relative = {
+ setUp: function(done) {
+ process.chdir(path.resolve(__dirname, 'fixtures'));
+ done();
+ },
+ relative: function(test) {
+ test.expect(1);
+ var files = [
+ 'Project (LO)/',
+ 'Project (LO)/one.js',
+ 'nested/',
+ 'nested/one.js',
+ 'nested/three.js',
+ 'nested/sub/',
+ 'nested/sub/two.js',
+ 'one.js'
+ ];
+ var gaze = new Gaze('addnothingtowatch');
+ gaze._addToWatched(files);
+ test.deepEqual(gaze.relative('.', true), ['Project (LO)/', 'nested/', 'one.js']);
+ test.done();
+ }
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/rename_test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/rename_test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/rename_test.js
new file mode 100644
index 0000000..028b344
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/rename_test.js
@@ -0,0 +1,43 @@
+'use strict';
+
+var gaze = require('../lib/gaze.js');
+var path = require('path');
+var fs = require('fs');
+
+// Node v0.6 compat
+fs.existsSync = fs.existsSync || path.existsSync;
+
+// Clean up helper to call in setUp and tearDown
+function cleanUp(done) {
+ [
+ 'sub/rename.js',
+ 'sub/renamed.js'
+ ].forEach(function(d) {
+ var p = path.resolve(__dirname, 'fixtures', d);
+ if (fs.existsSync(p)) { fs.unlinkSync(p); }
+ });
+ done();
+}
+
+exports.watch = {
+ setUp: function(done) {
+ process.chdir(path.resolve(__dirname, 'fixtures'));
+ cleanUp(done);
+ },
+ tearDown: cleanUp,
+ rename: function(test) {
+ test.expect(2);
+ var oldPath = path.join(__dirname, 'fixtures', 'sub', 'rename.js');
+ var newPath = path.join(__dirname, 'fixtures', 'sub', 'renamed.js');
+ fs.writeFileSync(oldPath, 'var rename = true;');
+ gaze('**/*', function(err, watcher) {
+ watcher.on('renamed', function(newFile, oldFile) {
+ test.equal(newFile, newPath);
+ test.equal(oldFile, oldPath);
+ watcher.close();
+ test.done();
+ });
+ fs.renameSync(oldPath, newPath);
+ });
+ }
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/safewrite_test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/safewrite_test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/safewrite_test.js
new file mode 100644
index 0000000..9200f11
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/safewrite_test.js
@@ -0,0 +1,61 @@
+'use strict';
+
+var gaze = require('../lib/gaze.js');
+var path = require('path');
+var fs = require('fs');
+
+// Node v0.6 compat
+fs.existsSync = fs.existsSync || path.existsSync;
+
+// Clean up helper to call in setUp and tearDown
+function cleanUp(done) {
+ [
+ 'safewrite.js'
+ ].forEach(function(d) {
+ var p = path.resolve(__dirname, 'fixtures', d);
+ if (fs.existsSync(p)) { fs.unlinkSync(p); }
+ });
+ done();
+}
+
+exports.safewrite = {
+ setUp: function(done) {
+ process.chdir(path.resolve(__dirname, 'fixtures'));
+ cleanUp(done);
+ },
+ tearDown: cleanUp,
+ safewrite: function(test) {
+ test.expect(4);
+
+ var times = 0;
+ var file = path.resolve(__dirname, 'fixtures', 'safewrite.js');
+ var backup = path.resolve(__dirname, 'fixtures', 'safewrite.ext~');
+ fs.writeFileSync(file, 'var safe = true;');
+
+ function simSafewrite() {
+ fs.writeFileSync(backup, fs.readFileSync(file));
+ fs.unlinkSync(file);
+ fs.renameSync(backup, file);
+ times++;
+ }
+
+ gaze('**/*', function() {
+ this.on('all', function(action, filepath) {
+ test.equal(action, 'changed');
+ test.equal(path.basename(filepath), 'safewrite.js');
+
+ if (times < 2) {
+ setTimeout(simSafewrite, 1000);
+ } else {
+ this.close();
+ test.done();
+ }
+ });
+
+ setTimeout(function() {
+ simSafewrite();
+ }, 1000);
+
+ });
+ }
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/watch_test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/watch_test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/watch_test.js
new file mode 100644
index 0000000..9d58521
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/test/watch_test.js
@@ -0,0 +1,207 @@
+'use strict';
+
+var gaze = require('../lib/gaze.js');
+var grunt = require('grunt');
+var path = require('path');
+var fs = require('fs');
+
+// Node v0.6 compat
+fs.existsSync = fs.existsSync || path.existsSync;
+
+// Clean up helper to call in setUp and tearDown
+function cleanUp(done) {
+ [
+ 'sub/tmp.js',
+ 'sub/tmp',
+ 'sub/renamed.js',
+ 'added.js',
+ 'nested/added.js',
+ 'nested/.tmp',
+ 'nested/sub/added.js'
+ ].forEach(function(d) {
+ var p = path.resolve(__dirname, 'fixtures', d);
+ if (fs.existsSync(p)) { fs.unlinkSync(p); }
+ });
+ done();
+}
+
+exports.watch = {
+ setUp: function(done) {
+ process.chdir(path.resolve(__dirname, 'fixtures'));
+ cleanUp(done);
+ },
+ tearDown: cleanUp,
+ remove: function(test) {
+ test.expect(2);
+ gaze('**/*', function() {
+ this.remove(path.resolve(__dirname, 'fixtures', 'sub', 'two.js'));
+ this.remove(path.resolve(__dirname, 'fixtures'));
+ var result = this.relative(null, true);
+ test.deepEqual(result['sub/'], ['one.js']);
+ test.notDeepEqual(result['.'], ['one.js']);
+ this.close();
+ test.done();
+ });
+ },
+ changed: function(test) {
+ test.expect(1);
+ gaze('**/*', function(err, watcher) {
+ watcher.on('changed', function(filepath) {
+ var expected = path.relative(process.cwd(), filepath);
+ test.equal(path.join('sub', 'one.js'), expected);
+ watcher.close();
+ });
+ this.on('added', function() { test.ok(false, 'added event should not have emitted.'); });
+ this.on('deleted', function() { test.ok(false, 'deleted event should not have emitted.'); });
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'sub', 'one.js'), 'var one = true;');
+ watcher.on('end', test.done);
+ });
+ },
+ added: function(test) {
+ test.expect(1);
+ gaze('**/*', function(err, watcher) {
+ watcher.on('added', function(filepath) {
+ var expected = path.relative(process.cwd(), filepath);
+ test.equal(path.join('sub', 'tmp.js'), expected);
+ watcher.close();
+ });
+ this.on('changed', function() { test.ok(false, 'changed event should not have emitted.'); });
+ this.on('deleted', function() { test.ok(false, 'deleted event should not have emitted.'); });
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'sub', 'tmp.js'), 'var tmp = true;');
+ watcher.on('end', test.done);
+ });
+ },
+ dontAddUnmatchedFiles: function(test) {
+ test.expect(2);
+ gaze('**/*.js', function(err, watcher) {
+ setTimeout(function() {
+ test.ok(true, 'Ended without adding a file.');
+ watcher.close();
+ }, 1000);
+ this.on('added', function(filepath) {
+ test.equal(path.relative(process.cwd(), filepath), path.join('sub', 'tmp.js'));
+ });
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'sub', 'tmp'), 'Dont add me!');
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'sub', 'tmp.js'), 'add me!');
+ watcher.on('end', test.done);
+ });
+ },
+ dontAddMatchedDirectoriesThatArentReallyAdded: function(test) {
+ // This is a regression test for a bug I ran into where a matching directory would be reported
+ // added when a non-matching file was created along side it. This only happens if the
+ // directory name doesn't occur in $PWD.
+ test.expect(1);
+ gaze('**/*', function(err, watcher) {
+ setTimeout(function() {
+ test.ok(true, 'Ended without adding a file.');
+ watcher.close();
+ }, 1000);
+ this.on('added', function(filepath) {
+ test.notEqual(path.relative(process.cwd(), filepath), path.join('nested', 'sub2'));
+ });
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'nested', '.tmp'), 'Wake up!');
+ watcher.on('end', test.done);
+ });
+ },
+ deleted: function(test) {
+ test.expect(1);
+ var tmpfile = path.resolve(__dirname, 'fixtures', 'sub', 'deleted.js');
+ fs.writeFileSync(tmpfile, 'var tmp = true;');
+ gaze('**/*', function(err, watcher) {
+ watcher.on('deleted', function(filepath) {
+ test.equal(path.join('sub', 'deleted.js'), path.relative(process.cwd(), filepath));
+ watcher.close();
+ });
+ this.on('changed', function() { test.ok(false, 'changed event should not have emitted.'); });
+ this.on('added', function() { test.ok(false, 'added event should not have emitted.'); });
+ fs.unlinkSync(tmpfile);
+ watcher.on('end', test.done);
+ });
+ },
+ dontEmitTwice: function(test) {
+ test.expect(2);
+ gaze('**/*', function(err, watcher) {
+ watcher.on('all', function(status, filepath) {
+ var expected = path.relative(process.cwd(), filepath);
+ test.equal(path.join('sub', 'one.js'), expected);
+ test.equal(status, 'changed');
+ fs.readFileSync(path.resolve(__dirname, 'fixtures', 'sub', 'one.js'));
+ setTimeout(function() {
+ fs.readFileSync(path.resolve(__dirname, 'fixtures', 'sub', 'one.js'));
+ }, 1000);
+ // Give some time to accidentally emit before we close
+ setTimeout(function() { watcher.close(); }, 5000);
+ });
+ setTimeout(function() {
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'sub', 'one.js'), 'var one = true;');
+ }, 1000);
+ watcher.on('end', test.done);
+ });
+ },
+ emitTwice: function(test) {
+ test.expect(2);
+ var times = 0;
+ gaze('**/*', function(err, watcher) {
+ watcher.on('all', function(status, filepath) {
+ test.equal(status, 'changed');
+ times++;
+ setTimeout(function() {
+ if (times < 2) {
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'sub', 'one.js'), 'var one = true;');
+ } else {
+ watcher.close();
+ }
+ }, 1000);
+ });
+ setTimeout(function() {
+ fs.writeFileSync(path.resolve(__dirname, 'fixtures', 'sub', 'one.js'), 'var one = true;');
+ }, 1000);
+ watcher.on('end', test.done);
+ });
+ },
+ nonExistent: function(test) {
+ test.expect(1);
+ gaze('non/existent/**/*', function(err, watcher) {
+ test.ok(true);
+ test.done();
+ });
+ },
+ differentCWD: function(test) {
+ test.expect(1);
+ var cwd = path.resolve(__dirname, 'fixtures', 'sub');
+ gaze('two.js', {
+ cwd: cwd
+ }, function(err, watcher) {
+ watcher.on('changed', function(filepath) {
+ test.deepEqual(this.relative(), {'.':['two.js']});
+ watcher.close();
+ });
+ fs.writeFileSync(path.resolve(cwd, 'two.js'), 'var two = true;');
+ watcher.on('end', test.done);
+ });
+ },
+ addedEmitInSubFolders: function(test) {
+ test.expect(4);
+ var adds = [
+ { pattern: '**/*', file: path.resolve(__dirname, 'fixtures', 'nested', 'sub', 'added.js') },
+ { pattern: '**/*', file: path.resolve(__dirname, 'fixtures', 'added.js') },
+ { pattern: 'nested/**/*', file: path.resolve(__dirname, 'fixtures', 'nested', 'added.js') },
+ { pattern: 'nested/sub/*.js', file: path.resolve(__dirname, 'fixtures', 'nested', 'sub', 'added.js') },
+ ];
+ grunt.util.async.forEachSeries(adds, function(add, next) {
+ new gaze.Gaze(add.pattern, function(err, watcher) {
+ watcher.on('added', function(filepath) {
+ test.equal('added.js', path.basename(filepath));
+ fs.unlinkSync(filepath);
+ watcher.close();
+ next();
+ });
+ watcher.on('changed', function() { test.ok(false, 'changed event should not have emitted.'); });
+ watcher.on('deleted', function() { test.ok(false, 'deleted event should not have emitted.'); });
+ fs.writeFileSync(add.file, 'var added = true;');
+ });
+ }, function() {
+ test.done();
+ });
+ },
+};
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/.npmignore b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/.npmignore
new file mode 100644
index 0000000..c9b568f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/.npmignore
@@ -0,0 +1,2 @@
+*.pyc
+*.swp
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/LICENSE b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/LICENSE
new file mode 100644
index 0000000..fcc702f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/LICENSE
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2010 Larry Myers
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/README.markdown
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/README.markdown b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/README.markdown
new file mode 100644
index 0000000..0c1f285
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/jasmine-reporters/README.markdown
@@ -0,0 +1,52 @@
+# Jasmine Reporters
+
+Jasmine Reporters is a collection of javascript jasmine.Reporter classes that can be used with
+the [JasmineBDD testing framework](http://pivotal.github.com/jasmine/).
+
+Right now the project is focused on two new reporters:
+
+* ConsoleReporter - Report test results to the browser console.
+* JUnitXmlReporter - Report test results to a file (using Rhino or PyPhantomJS) in JUnit XML Report format.
+
+## Usage
+
+Examples are included in the test directory that show how to use the reporters,
+as well a basic runner scripts for Rhino + envjs, and a basic runner for
+[PhantomJS](https://github.com/ariya/phantomjs) (using PyPhantomJS and the
+saveToFile plugin). Either of these methods could be used in a Continuous
+Integration project for running headless tests and generating JUnit XML output.
+
+### Rhino + EnvJS
+
+Everything needed to run the tests in Rhino + EnvJS is included in this
+repository inside the `ext` directory, specifically Rhino 1.7r2 and envjs 1.2
+for Rhino.
+
+### PhantomJS, PyPhantomJS
+
+PhantomJS is included as a submodule inside the `ext` directory. The included
+example runner makes use of PyPhantomJS to execute the headless tests and
+save XML output to the filesystem.
+
+While PhantomJS and PyPhantomJS both run on MacOS / Linux / Windows, there are
+specific dependencies for each platform. Specifics on installing these are not
+included here, but is left as an exercise for the reader. The [PhantomJS](https://github.com/ariya/phantomjs)
+project contains links to various documentation, including installation notes.
+
+Here is how I got it working in MacOSX 10.6 (YMMV):
+
+* ensure you are using Python 2.6+
+* install Xcode (this gives you make, et al)
+* install qt (this gives you qmake, et al)
+ * this may be easiest via [homebrew](https://github.com/mxcl/homebrew)
+ * `brew install qt`
+* install the python sip module
+ * `pip install sip # this will fail to fully install sip, keep going`
+ * `cd build/sip`
+ * `python configure.py`
+ * `make && sudo make install`
+* install the python pyqt module
+ * `pip install pyqt # this will fail to fully install pyqt, keep going`
+ * `cd build/pyqt`
+ * `python configure.py`
+ * `make && sudo make install`
[41/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/1000-stderr.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/1000-stderr.txt b/blackberry10/node_modules/exit/test/fixtures/1000-stderr.txt
new file mode 100644
index 0000000..d637510
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/1000-stderr.txt
@@ -0,0 +1,1000 @@
+stderr 0
+stderr 1
+stderr 2
+stderr 3
+stderr 4
+stderr 5
+stderr 6
+stderr 7
+stderr 8
+stderr 9
+stderr 10
+stderr 11
+stderr 12
+stderr 13
+stderr 14
+stderr 15
+stderr 16
+stderr 17
+stderr 18
+stderr 19
+stderr 20
+stderr 21
+stderr 22
+stderr 23
+stderr 24
+stderr 25
+stderr 26
+stderr 27
+stderr 28
+stderr 29
+stderr 30
+stderr 31
+stderr 32
+stderr 33
+stderr 34
+stderr 35
+stderr 36
+stderr 37
+stderr 38
+stderr 39
+stderr 40
+stderr 41
+stderr 42
+stderr 43
+stderr 44
+stderr 45
+stderr 46
+stderr 47
+stderr 48
+stderr 49
+stderr 50
+stderr 51
+stderr 52
+stderr 53
+stderr 54
+stderr 55
+stderr 56
+stderr 57
+stderr 58
+stderr 59
+stderr 60
+stderr 61
+stderr 62
+stderr 63
+stderr 64
+stderr 65
+stderr 66
+stderr 67
+stderr 68
+stderr 69
+stderr 70
+stderr 71
+stderr 72
+stderr 73
+stderr 74
+stderr 75
+stderr 76
+stderr 77
+stderr 78
+stderr 79
+stderr 80
+stderr 81
+stderr 82
+stderr 83
+stderr 84
+stderr 85
+stderr 86
+stderr 87
+stderr 88
+stderr 89
+stderr 90
+stderr 91
+stderr 92
+stderr 93
+stderr 94
+stderr 95
+stderr 96
+stderr 97
+stderr 98
+stderr 99
+stderr 100
+stderr 101
+stderr 102
+stderr 103
+stderr 104
+stderr 105
+stderr 106
+stderr 107
+stderr 108
+stderr 109
+stderr 110
+stderr 111
+stderr 112
+stderr 113
+stderr 114
+stderr 115
+stderr 116
+stderr 117
+stderr 118
+stderr 119
+stderr 120
+stderr 121
+stderr 122
+stderr 123
+stderr 124
+stderr 125
+stderr 126
+stderr 127
+stderr 128
+stderr 129
+stderr 130
+stderr 131
+stderr 132
+stderr 133
+stderr 134
+stderr 135
+stderr 136
+stderr 137
+stderr 138
+stderr 139
+stderr 140
+stderr 141
+stderr 142
+stderr 143
+stderr 144
+stderr 145
+stderr 146
+stderr 147
+stderr 148
+stderr 149
+stderr 150
+stderr 151
+stderr 152
+stderr 153
+stderr 154
+stderr 155
+stderr 156
+stderr 157
+stderr 158
+stderr 159
+stderr 160
+stderr 161
+stderr 162
+stderr 163
+stderr 164
+stderr 165
+stderr 166
+stderr 167
+stderr 168
+stderr 169
+stderr 170
+stderr 171
+stderr 172
+stderr 173
+stderr 174
+stderr 175
+stderr 176
+stderr 177
+stderr 178
+stderr 179
+stderr 180
+stderr 181
+stderr 182
+stderr 183
+stderr 184
+stderr 185
+stderr 186
+stderr 187
+stderr 188
+stderr 189
+stderr 190
+stderr 191
+stderr 192
+stderr 193
+stderr 194
+stderr 195
+stderr 196
+stderr 197
+stderr 198
+stderr 199
+stderr 200
+stderr 201
+stderr 202
+stderr 203
+stderr 204
+stderr 205
+stderr 206
+stderr 207
+stderr 208
+stderr 209
+stderr 210
+stderr 211
+stderr 212
+stderr 213
+stderr 214
+stderr 215
+stderr 216
+stderr 217
+stderr 218
+stderr 219
+stderr 220
+stderr 221
+stderr 222
+stderr 223
+stderr 224
+stderr 225
+stderr 226
+stderr 227
+stderr 228
+stderr 229
+stderr 230
+stderr 231
+stderr 232
+stderr 233
+stderr 234
+stderr 235
+stderr 236
+stderr 237
+stderr 238
+stderr 239
+stderr 240
+stderr 241
+stderr 242
+stderr 243
+stderr 244
+stderr 245
+stderr 246
+stderr 247
+stderr 248
+stderr 249
+stderr 250
+stderr 251
+stderr 252
+stderr 253
+stderr 254
+stderr 255
+stderr 256
+stderr 257
+stderr 258
+stderr 259
+stderr 260
+stderr 261
+stderr 262
+stderr 263
+stderr 264
+stderr 265
+stderr 266
+stderr 267
+stderr 268
+stderr 269
+stderr 270
+stderr 271
+stderr 272
+stderr 273
+stderr 274
+stderr 275
+stderr 276
+stderr 277
+stderr 278
+stderr 279
+stderr 280
+stderr 281
+stderr 282
+stderr 283
+stderr 284
+stderr 285
+stderr 286
+stderr 287
+stderr 288
+stderr 289
+stderr 290
+stderr 291
+stderr 292
+stderr 293
+stderr 294
+stderr 295
+stderr 296
+stderr 297
+stderr 298
+stderr 299
+stderr 300
+stderr 301
+stderr 302
+stderr 303
+stderr 304
+stderr 305
+stderr 306
+stderr 307
+stderr 308
+stderr 309
+stderr 310
+stderr 311
+stderr 312
+stderr 313
+stderr 314
+stderr 315
+stderr 316
+stderr 317
+stderr 318
+stderr 319
+stderr 320
+stderr 321
+stderr 322
+stderr 323
+stderr 324
+stderr 325
+stderr 326
+stderr 327
+stderr 328
+stderr 329
+stderr 330
+stderr 331
+stderr 332
+stderr 333
+stderr 334
+stderr 335
+stderr 336
+stderr 337
+stderr 338
+stderr 339
+stderr 340
+stderr 341
+stderr 342
+stderr 343
+stderr 344
+stderr 345
+stderr 346
+stderr 347
+stderr 348
+stderr 349
+stderr 350
+stderr 351
+stderr 352
+stderr 353
+stderr 354
+stderr 355
+stderr 356
+stderr 357
+stderr 358
+stderr 359
+stderr 360
+stderr 361
+stderr 362
+stderr 363
+stderr 364
+stderr 365
+stderr 366
+stderr 367
+stderr 368
+stderr 369
+stderr 370
+stderr 371
+stderr 372
+stderr 373
+stderr 374
+stderr 375
+stderr 376
+stderr 377
+stderr 378
+stderr 379
+stderr 380
+stderr 381
+stderr 382
+stderr 383
+stderr 384
+stderr 385
+stderr 386
+stderr 387
+stderr 388
+stderr 389
+stderr 390
+stderr 391
+stderr 392
+stderr 393
+stderr 394
+stderr 395
+stderr 396
+stderr 397
+stderr 398
+stderr 399
+stderr 400
+stderr 401
+stderr 402
+stderr 403
+stderr 404
+stderr 405
+stderr 406
+stderr 407
+stderr 408
+stderr 409
+stderr 410
+stderr 411
+stderr 412
+stderr 413
+stderr 414
+stderr 415
+stderr 416
+stderr 417
+stderr 418
+stderr 419
+stderr 420
+stderr 421
+stderr 422
+stderr 423
+stderr 424
+stderr 425
+stderr 426
+stderr 427
+stderr 428
+stderr 429
+stderr 430
+stderr 431
+stderr 432
+stderr 433
+stderr 434
+stderr 435
+stderr 436
+stderr 437
+stderr 438
+stderr 439
+stderr 440
+stderr 441
+stderr 442
+stderr 443
+stderr 444
+stderr 445
+stderr 446
+stderr 447
+stderr 448
+stderr 449
+stderr 450
+stderr 451
+stderr 452
+stderr 453
+stderr 454
+stderr 455
+stderr 456
+stderr 457
+stderr 458
+stderr 459
+stderr 460
+stderr 461
+stderr 462
+stderr 463
+stderr 464
+stderr 465
+stderr 466
+stderr 467
+stderr 468
+stderr 469
+stderr 470
+stderr 471
+stderr 472
+stderr 473
+stderr 474
+stderr 475
+stderr 476
+stderr 477
+stderr 478
+stderr 479
+stderr 480
+stderr 481
+stderr 482
+stderr 483
+stderr 484
+stderr 485
+stderr 486
+stderr 487
+stderr 488
+stderr 489
+stderr 490
+stderr 491
+stderr 492
+stderr 493
+stderr 494
+stderr 495
+stderr 496
+stderr 497
+stderr 498
+stderr 499
+stderr 500
+stderr 501
+stderr 502
+stderr 503
+stderr 504
+stderr 505
+stderr 506
+stderr 507
+stderr 508
+stderr 509
+stderr 510
+stderr 511
+stderr 512
+stderr 513
+stderr 514
+stderr 515
+stderr 516
+stderr 517
+stderr 518
+stderr 519
+stderr 520
+stderr 521
+stderr 522
+stderr 523
+stderr 524
+stderr 525
+stderr 526
+stderr 527
+stderr 528
+stderr 529
+stderr 530
+stderr 531
+stderr 532
+stderr 533
+stderr 534
+stderr 535
+stderr 536
+stderr 537
+stderr 538
+stderr 539
+stderr 540
+stderr 541
+stderr 542
+stderr 543
+stderr 544
+stderr 545
+stderr 546
+stderr 547
+stderr 548
+stderr 549
+stderr 550
+stderr 551
+stderr 552
+stderr 553
+stderr 554
+stderr 555
+stderr 556
+stderr 557
+stderr 558
+stderr 559
+stderr 560
+stderr 561
+stderr 562
+stderr 563
+stderr 564
+stderr 565
+stderr 566
+stderr 567
+stderr 568
+stderr 569
+stderr 570
+stderr 571
+stderr 572
+stderr 573
+stderr 574
+stderr 575
+stderr 576
+stderr 577
+stderr 578
+stderr 579
+stderr 580
+stderr 581
+stderr 582
+stderr 583
+stderr 584
+stderr 585
+stderr 586
+stderr 587
+stderr 588
+stderr 589
+stderr 590
+stderr 591
+stderr 592
+stderr 593
+stderr 594
+stderr 595
+stderr 596
+stderr 597
+stderr 598
+stderr 599
+stderr 600
+stderr 601
+stderr 602
+stderr 603
+stderr 604
+stderr 605
+stderr 606
+stderr 607
+stderr 608
+stderr 609
+stderr 610
+stderr 611
+stderr 612
+stderr 613
+stderr 614
+stderr 615
+stderr 616
+stderr 617
+stderr 618
+stderr 619
+stderr 620
+stderr 621
+stderr 622
+stderr 623
+stderr 624
+stderr 625
+stderr 626
+stderr 627
+stderr 628
+stderr 629
+stderr 630
+stderr 631
+stderr 632
+stderr 633
+stderr 634
+stderr 635
+stderr 636
+stderr 637
+stderr 638
+stderr 639
+stderr 640
+stderr 641
+stderr 642
+stderr 643
+stderr 644
+stderr 645
+stderr 646
+stderr 647
+stderr 648
+stderr 649
+stderr 650
+stderr 651
+stderr 652
+stderr 653
+stderr 654
+stderr 655
+stderr 656
+stderr 657
+stderr 658
+stderr 659
+stderr 660
+stderr 661
+stderr 662
+stderr 663
+stderr 664
+stderr 665
+stderr 666
+stderr 667
+stderr 668
+stderr 669
+stderr 670
+stderr 671
+stderr 672
+stderr 673
+stderr 674
+stderr 675
+stderr 676
+stderr 677
+stderr 678
+stderr 679
+stderr 680
+stderr 681
+stderr 682
+stderr 683
+stderr 684
+stderr 685
+stderr 686
+stderr 687
+stderr 688
+stderr 689
+stderr 690
+stderr 691
+stderr 692
+stderr 693
+stderr 694
+stderr 695
+stderr 696
+stderr 697
+stderr 698
+stderr 699
+stderr 700
+stderr 701
+stderr 702
+stderr 703
+stderr 704
+stderr 705
+stderr 706
+stderr 707
+stderr 708
+stderr 709
+stderr 710
+stderr 711
+stderr 712
+stderr 713
+stderr 714
+stderr 715
+stderr 716
+stderr 717
+stderr 718
+stderr 719
+stderr 720
+stderr 721
+stderr 722
+stderr 723
+stderr 724
+stderr 725
+stderr 726
+stderr 727
+stderr 728
+stderr 729
+stderr 730
+stderr 731
+stderr 732
+stderr 733
+stderr 734
+stderr 735
+stderr 736
+stderr 737
+stderr 738
+stderr 739
+stderr 740
+stderr 741
+stderr 742
+stderr 743
+stderr 744
+stderr 745
+stderr 746
+stderr 747
+stderr 748
+stderr 749
+stderr 750
+stderr 751
+stderr 752
+stderr 753
+stderr 754
+stderr 755
+stderr 756
+stderr 757
+stderr 758
+stderr 759
+stderr 760
+stderr 761
+stderr 762
+stderr 763
+stderr 764
+stderr 765
+stderr 766
+stderr 767
+stderr 768
+stderr 769
+stderr 770
+stderr 771
+stderr 772
+stderr 773
+stderr 774
+stderr 775
+stderr 776
+stderr 777
+stderr 778
+stderr 779
+stderr 780
+stderr 781
+stderr 782
+stderr 783
+stderr 784
+stderr 785
+stderr 786
+stderr 787
+stderr 788
+stderr 789
+stderr 790
+stderr 791
+stderr 792
+stderr 793
+stderr 794
+stderr 795
+stderr 796
+stderr 797
+stderr 798
+stderr 799
+stderr 800
+stderr 801
+stderr 802
+stderr 803
+stderr 804
+stderr 805
+stderr 806
+stderr 807
+stderr 808
+stderr 809
+stderr 810
+stderr 811
+stderr 812
+stderr 813
+stderr 814
+stderr 815
+stderr 816
+stderr 817
+stderr 818
+stderr 819
+stderr 820
+stderr 821
+stderr 822
+stderr 823
+stderr 824
+stderr 825
+stderr 826
+stderr 827
+stderr 828
+stderr 829
+stderr 830
+stderr 831
+stderr 832
+stderr 833
+stderr 834
+stderr 835
+stderr 836
+stderr 837
+stderr 838
+stderr 839
+stderr 840
+stderr 841
+stderr 842
+stderr 843
+stderr 844
+stderr 845
+stderr 846
+stderr 847
+stderr 848
+stderr 849
+stderr 850
+stderr 851
+stderr 852
+stderr 853
+stderr 854
+stderr 855
+stderr 856
+stderr 857
+stderr 858
+stderr 859
+stderr 860
+stderr 861
+stderr 862
+stderr 863
+stderr 864
+stderr 865
+stderr 866
+stderr 867
+stderr 868
+stderr 869
+stderr 870
+stderr 871
+stderr 872
+stderr 873
+stderr 874
+stderr 875
+stderr 876
+stderr 877
+stderr 878
+stderr 879
+stderr 880
+stderr 881
+stderr 882
+stderr 883
+stderr 884
+stderr 885
+stderr 886
+stderr 887
+stderr 888
+stderr 889
+stderr 890
+stderr 891
+stderr 892
+stderr 893
+stderr 894
+stderr 895
+stderr 896
+stderr 897
+stderr 898
+stderr 899
+stderr 900
+stderr 901
+stderr 902
+stderr 903
+stderr 904
+stderr 905
+stderr 906
+stderr 907
+stderr 908
+stderr 909
+stderr 910
+stderr 911
+stderr 912
+stderr 913
+stderr 914
+stderr 915
+stderr 916
+stderr 917
+stderr 918
+stderr 919
+stderr 920
+stderr 921
+stderr 922
+stderr 923
+stderr 924
+stderr 925
+stderr 926
+stderr 927
+stderr 928
+stderr 929
+stderr 930
+stderr 931
+stderr 932
+stderr 933
+stderr 934
+stderr 935
+stderr 936
+stderr 937
+stderr 938
+stderr 939
+stderr 940
+stderr 941
+stderr 942
+stderr 943
+stderr 944
+stderr 945
+stderr 946
+stderr 947
+stderr 948
+stderr 949
+stderr 950
+stderr 951
+stderr 952
+stderr 953
+stderr 954
+stderr 955
+stderr 956
+stderr 957
+stderr 958
+stderr 959
+stderr 960
+stderr 961
+stderr 962
+stderr 963
+stderr 964
+stderr 965
+stderr 966
+stderr 967
+stderr 968
+stderr 969
+stderr 970
+stderr 971
+stderr 972
+stderr 973
+stderr 974
+stderr 975
+stderr 976
+stderr 977
+stderr 978
+stderr 979
+stderr 980
+stderr 981
+stderr 982
+stderr 983
+stderr 984
+stderr 985
+stderr 986
+stderr 987
+stderr 988
+stderr 989
+stderr 990
+stderr 991
+stderr 992
+stderr 993
+stderr 994
+stderr 995
+stderr 996
+stderr 997
+stderr 998
+stderr 999
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/1000-stdout-stderr.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/1000-stdout-stderr.txt b/blackberry10/node_modules/exit/test/fixtures/1000-stdout-stderr.txt
new file mode 100644
index 0000000..4fde2b4
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/1000-stdout-stderr.txt
@@ -0,0 +1,2000 @@
+stdout 0
+stderr 0
+stdout 1
+stderr 1
+stdout 2
+stderr 2
+stdout 3
+stderr 3
+stdout 4
+stderr 4
+stdout 5
+stderr 5
+stdout 6
+stderr 6
+stdout 7
+stderr 7
+stdout 8
+stderr 8
+stdout 9
+stderr 9
+stdout 10
+stderr 10
+stdout 11
+stderr 11
+stdout 12
+stderr 12
+stdout 13
+stderr 13
+stdout 14
+stderr 14
+stdout 15
+stderr 15
+stdout 16
+stderr 16
+stdout 17
+stderr 17
+stdout 18
+stderr 18
+stdout 19
+stderr 19
+stdout 20
+stderr 20
+stdout 21
+stderr 21
+stdout 22
+stderr 22
+stdout 23
+stderr 23
+stdout 24
+stderr 24
+stdout 25
+stderr 25
+stdout 26
+stderr 26
+stdout 27
+stderr 27
+stdout 28
+stderr 28
+stdout 29
+stderr 29
+stdout 30
+stderr 30
+stdout 31
+stderr 31
+stdout 32
+stderr 32
+stdout 33
+stderr 33
+stdout 34
+stderr 34
+stdout 35
+stderr 35
+stdout 36
+stderr 36
+stdout 37
+stderr 37
+stdout 38
+stderr 38
+stdout 39
+stderr 39
+stdout 40
+stderr 40
+stdout 41
+stderr 41
+stdout 42
+stderr 42
+stdout 43
+stderr 43
+stdout 44
+stderr 44
+stdout 45
+stderr 45
+stdout 46
+stderr 46
+stdout 47
+stderr 47
+stdout 48
+stderr 48
+stdout 49
+stderr 49
+stdout 50
+stderr 50
+stdout 51
+stderr 51
+stdout 52
+stderr 52
+stdout 53
+stderr 53
+stdout 54
+stderr 54
+stdout 55
+stderr 55
+stdout 56
+stderr 56
+stdout 57
+stderr 57
+stdout 58
+stderr 58
+stdout 59
+stderr 59
+stdout 60
+stderr 60
+stdout 61
+stderr 61
+stdout 62
+stderr 62
+stdout 63
+stderr 63
+stdout 64
+stderr 64
+stdout 65
+stderr 65
+stdout 66
+stderr 66
+stdout 67
+stderr 67
+stdout 68
+stderr 68
+stdout 69
+stderr 69
+stdout 70
+stderr 70
+stdout 71
+stderr 71
+stdout 72
+stderr 72
+stdout 73
+stderr 73
+stdout 74
+stderr 74
+stdout 75
+stderr 75
+stdout 76
+stderr 76
+stdout 77
+stderr 77
+stdout 78
+stderr 78
+stdout 79
+stderr 79
+stdout 80
+stderr 80
+stdout 81
+stderr 81
+stdout 82
+stderr 82
+stdout 83
+stderr 83
+stdout 84
+stderr 84
+stdout 85
+stderr 85
+stdout 86
+stderr 86
+stdout 87
+stderr 87
+stdout 88
+stderr 88
+stdout 89
+stderr 89
+stdout 90
+stderr 90
+stdout 91
+stderr 91
+stdout 92
+stderr 92
+stdout 93
+stderr 93
+stdout 94
+stderr 94
+stdout 95
+stderr 95
+stdout 96
+stderr 96
+stdout 97
+stderr 97
+stdout 98
+stderr 98
+stdout 99
+stderr 99
+stdout 100
+stderr 100
+stdout 101
+stderr 101
+stdout 102
+stderr 102
+stdout 103
+stderr 103
+stdout 104
+stderr 104
+stdout 105
+stderr 105
+stdout 106
+stderr 106
+stdout 107
+stderr 107
+stdout 108
+stderr 108
+stdout 109
+stderr 109
+stdout 110
+stderr 110
+stdout 111
+stderr 111
+stdout 112
+stderr 112
+stdout 113
+stderr 113
+stdout 114
+stderr 114
+stdout 115
+stderr 115
+stdout 116
+stderr 116
+stdout 117
+stderr 117
+stdout 118
+stderr 118
+stdout 119
+stderr 119
+stdout 120
+stderr 120
+stdout 121
+stderr 121
+stdout 122
+stderr 122
+stdout 123
+stderr 123
+stdout 124
+stderr 124
+stdout 125
+stderr 125
+stdout 126
+stderr 126
+stdout 127
+stderr 127
+stdout 128
+stderr 128
+stdout 129
+stderr 129
+stdout 130
+stderr 130
+stdout 131
+stderr 131
+stdout 132
+stderr 132
+stdout 133
+stderr 133
+stdout 134
+stderr 134
+stdout 135
+stderr 135
+stdout 136
+stderr 136
+stdout 137
+stderr 137
+stdout 138
+stderr 138
+stdout 139
+stderr 139
+stdout 140
+stderr 140
+stdout 141
+stderr 141
+stdout 142
+stderr 142
+stdout 143
+stderr 143
+stdout 144
+stderr 144
+stdout 145
+stderr 145
+stdout 146
+stderr 146
+stdout 147
+stderr 147
+stdout 148
+stderr 148
+stdout 149
+stderr 149
+stdout 150
+stderr 150
+stdout 151
+stderr 151
+stdout 152
+stderr 152
+stdout 153
+stderr 153
+stdout 154
+stderr 154
+stdout 155
+stderr 155
+stdout 156
+stderr 156
+stdout 157
+stderr 157
+stdout 158
+stderr 158
+stdout 159
+stderr 159
+stdout 160
+stderr 160
+stdout 161
+stderr 161
+stdout 162
+stderr 162
+stdout 163
+stderr 163
+stdout 164
+stderr 164
+stdout 165
+stderr 165
+stdout 166
+stderr 166
+stdout 167
+stderr 167
+stdout 168
+stderr 168
+stdout 169
+stderr 169
+stdout 170
+stderr 170
+stdout 171
+stderr 171
+stdout 172
+stderr 172
+stdout 173
+stderr 173
+stdout 174
+stderr 174
+stdout 175
+stderr 175
+stdout 176
+stderr 176
+stdout 177
+stderr 177
+stdout 178
+stderr 178
+stdout 179
+stderr 179
+stdout 180
+stderr 180
+stdout 181
+stderr 181
+stdout 182
+stderr 182
+stdout 183
+stderr 183
+stdout 184
+stderr 184
+stdout 185
+stderr 185
+stdout 186
+stderr 186
+stdout 187
+stderr 187
+stdout 188
+stderr 188
+stdout 189
+stderr 189
+stdout 190
+stderr 190
+stdout 191
+stderr 191
+stdout 192
+stderr 192
+stdout 193
+stderr 193
+stdout 194
+stderr 194
+stdout 195
+stderr 195
+stdout 196
+stderr 196
+stdout 197
+stderr 197
+stdout 198
+stderr 198
+stdout 199
+stderr 199
+stdout 200
+stderr 200
+stdout 201
+stderr 201
+stdout 202
+stderr 202
+stdout 203
+stderr 203
+stdout 204
+stderr 204
+stdout 205
+stderr 205
+stdout 206
+stderr 206
+stdout 207
+stderr 207
+stdout 208
+stderr 208
+stdout 209
+stderr 209
+stdout 210
+stderr 210
+stdout 211
+stderr 211
+stdout 212
+stderr 212
+stdout 213
+stderr 213
+stdout 214
+stderr 214
+stdout 215
+stderr 215
+stdout 216
+stderr 216
+stdout 217
+stderr 217
+stdout 218
+stderr 218
+stdout 219
+stderr 219
+stdout 220
+stderr 220
+stdout 221
+stderr 221
+stdout 222
+stderr 222
+stdout 223
+stderr 223
+stdout 224
+stderr 224
+stdout 225
+stderr 225
+stdout 226
+stderr 226
+stdout 227
+stderr 227
+stdout 228
+stderr 228
+stdout 229
+stderr 229
+stdout 230
+stderr 230
+stdout 231
+stderr 231
+stdout 232
+stderr 232
+stdout 233
+stderr 233
+stdout 234
+stderr 234
+stdout 235
+stderr 235
+stdout 236
+stderr 236
+stdout 237
+stderr 237
+stdout 238
+stderr 238
+stdout 239
+stderr 239
+stdout 240
+stderr 240
+stdout 241
+stderr 241
+stdout 242
+stderr 242
+stdout 243
+stderr 243
+stdout 244
+stderr 244
+stdout 245
+stderr 245
+stdout 246
+stderr 246
+stdout 247
+stderr 247
+stdout 248
+stderr 248
+stdout 249
+stderr 249
+stdout 250
+stderr 250
+stdout 251
+stderr 251
+stdout 252
+stderr 252
+stdout 253
+stderr 253
+stdout 254
+stderr 254
+stdout 255
+stderr 255
+stdout 256
+stderr 256
+stdout 257
+stderr 257
+stdout 258
+stderr 258
+stdout 259
+stderr 259
+stdout 260
+stderr 260
+stdout 261
+stderr 261
+stdout 262
+stderr 262
+stdout 263
+stderr 263
+stdout 264
+stderr 264
+stdout 265
+stderr 265
+stdout 266
+stderr 266
+stdout 267
+stderr 267
+stdout 268
+stderr 268
+stdout 269
+stderr 269
+stdout 270
+stderr 270
+stdout 271
+stderr 271
+stdout 272
+stderr 272
+stdout 273
+stderr 273
+stdout 274
+stderr 274
+stdout 275
+stderr 275
+stdout 276
+stderr 276
+stdout 277
+stderr 277
+stdout 278
+stderr 278
+stdout 279
+stderr 279
+stdout 280
+stderr 280
+stdout 281
+stderr 281
+stdout 282
+stderr 282
+stdout 283
+stderr 283
+stdout 284
+stderr 284
+stdout 285
+stderr 285
+stdout 286
+stderr 286
+stdout 287
+stderr 287
+stdout 288
+stderr 288
+stdout 289
+stderr 289
+stdout 290
+stderr 290
+stdout 291
+stderr 291
+stdout 292
+stderr 292
+stdout 293
+stderr 293
+stdout 294
+stderr 294
+stdout 295
+stderr 295
+stdout 296
+stderr 296
+stdout 297
+stderr 297
+stdout 298
+stderr 298
+stdout 299
+stderr 299
+stdout 300
+stderr 300
+stdout 301
+stderr 301
+stdout 302
+stderr 302
+stdout 303
+stderr 303
+stdout 304
+stderr 304
+stdout 305
+stderr 305
+stdout 306
+stderr 306
+stdout 307
+stderr 307
+stdout 308
+stderr 308
+stdout 309
+stderr 309
+stdout 310
+stderr 310
+stdout 311
+stderr 311
+stdout 312
+stderr 312
+stdout 313
+stderr 313
+stdout 314
+stderr 314
+stdout 315
+stderr 315
+stdout 316
+stderr 316
+stdout 317
+stderr 317
+stdout 318
+stderr 318
+stdout 319
+stderr 319
+stdout 320
+stderr 320
+stdout 321
+stderr 321
+stdout 322
+stderr 322
+stdout 323
+stderr 323
+stdout 324
+stderr 324
+stdout 325
+stderr 325
+stdout 326
+stderr 326
+stdout 327
+stderr 327
+stdout 328
+stderr 328
+stdout 329
+stderr 329
+stdout 330
+stderr 330
+stdout 331
+stderr 331
+stdout 332
+stderr 332
+stdout 333
+stderr 333
+stdout 334
+stderr 334
+stdout 335
+stderr 335
+stdout 336
+stderr 336
+stdout 337
+stderr 337
+stdout 338
+stderr 338
+stdout 339
+stderr 339
+stdout 340
+stderr 340
+stdout 341
+stderr 341
+stdout 342
+stderr 342
+stdout 343
+stderr 343
+stdout 344
+stderr 344
+stdout 345
+stderr 345
+stdout 346
+stderr 346
+stdout 347
+stderr 347
+stdout 348
+stderr 348
+stdout 349
+stderr 349
+stdout 350
+stderr 350
+stdout 351
+stderr 351
+stdout 352
+stderr 352
+stdout 353
+stderr 353
+stdout 354
+stderr 354
+stdout 355
+stderr 355
+stdout 356
+stderr 356
+stdout 357
+stderr 357
+stdout 358
+stderr 358
+stdout 359
+stderr 359
+stdout 360
+stderr 360
+stdout 361
+stderr 361
+stdout 362
+stderr 362
+stdout 363
+stderr 363
+stdout 364
+stderr 364
+stdout 365
+stderr 365
+stdout 366
+stderr 366
+stdout 367
+stderr 367
+stdout 368
+stderr 368
+stdout 369
+stderr 369
+stdout 370
+stderr 370
+stdout 371
+stderr 371
+stdout 372
+stderr 372
+stdout 373
+stderr 373
+stdout 374
+stderr 374
+stdout 375
+stderr 375
+stdout 376
+stderr 376
+stdout 377
+stderr 377
+stdout 378
+stderr 378
+stdout 379
+stderr 379
+stdout 380
+stderr 380
+stdout 381
+stderr 381
+stdout 382
+stderr 382
+stdout 383
+stderr 383
+stdout 384
+stderr 384
+stdout 385
+stderr 385
+stdout 386
+stderr 386
+stdout 387
+stderr 387
+stdout 388
+stderr 388
+stdout 389
+stderr 389
+stdout 390
+stderr 390
+stdout 391
+stderr 391
+stdout 392
+stderr 392
+stdout 393
+stderr 393
+stdout 394
+stderr 394
+stdout 395
+stderr 395
+stdout 396
+stderr 396
+stdout 397
+stderr 397
+stdout 398
+stderr 398
+stdout 399
+stderr 399
+stdout 400
+stderr 400
+stdout 401
+stderr 401
+stdout 402
+stderr 402
+stdout 403
+stderr 403
+stdout 404
+stderr 404
+stdout 405
+stderr 405
+stdout 406
+stderr 406
+stdout 407
+stderr 407
+stdout 408
+stderr 408
+stdout 409
+stderr 409
+stdout 410
+stderr 410
+stdout 411
+stderr 411
+stdout 412
+stderr 412
+stdout 413
+stderr 413
+stdout 414
+stderr 414
+stdout 415
+stderr 415
+stdout 416
+stderr 416
+stdout 417
+stderr 417
+stdout 418
+stderr 418
+stdout 419
+stderr 419
+stdout 420
+stderr 420
+stdout 421
+stderr 421
+stdout 422
+stderr 422
+stdout 423
+stderr 423
+stdout 424
+stderr 424
+stdout 425
+stderr 425
+stdout 426
+stderr 426
+stdout 427
+stderr 427
+stdout 428
+stderr 428
+stdout 429
+stderr 429
+stdout 430
+stderr 430
+stdout 431
+stderr 431
+stdout 432
+stderr 432
+stdout 433
+stderr 433
+stdout 434
+stderr 434
+stdout 435
+stderr 435
+stdout 436
+stderr 436
+stdout 437
+stderr 437
+stdout 438
+stderr 438
+stdout 439
+stderr 439
+stdout 440
+stderr 440
+stdout 441
+stderr 441
+stdout 442
+stderr 442
+stdout 443
+stderr 443
+stdout 444
+stderr 444
+stdout 445
+stderr 445
+stdout 446
+stderr 446
+stdout 447
+stderr 447
+stdout 448
+stderr 448
+stdout 449
+stderr 449
+stdout 450
+stderr 450
+stdout 451
+stderr 451
+stdout 452
+stderr 452
+stdout 453
+stderr 453
+stdout 454
+stderr 454
+stdout 455
+stderr 455
+stdout 456
+stderr 456
+stdout 457
+stderr 457
+stdout 458
+stderr 458
+stdout 459
+stderr 459
+stdout 460
+stderr 460
+stdout 461
+stderr 461
+stdout 462
+stderr 462
+stdout 463
+stderr 463
+stdout 464
+stderr 464
+stdout 465
+stderr 465
+stdout 466
+stderr 466
+stdout 467
+stderr 467
+stdout 468
+stderr 468
+stdout 469
+stderr 469
+stdout 470
+stderr 470
+stdout 471
+stderr 471
+stdout 472
+stderr 472
+stdout 473
+stderr 473
+stdout 474
+stderr 474
+stdout 475
+stderr 475
+stdout 476
+stderr 476
+stdout 477
+stderr 477
+stdout 478
+stderr 478
+stdout 479
+stderr 479
+stdout 480
+stderr 480
+stdout 481
+stderr 481
+stdout 482
+stderr 482
+stdout 483
+stderr 483
+stdout 484
+stderr 484
+stdout 485
+stderr 485
+stdout 486
+stderr 486
+stdout 487
+stderr 487
+stdout 488
+stderr 488
+stdout 489
+stderr 489
+stdout 490
+stderr 490
+stdout 491
+stderr 491
+stdout 492
+stderr 492
+stdout 493
+stderr 493
+stdout 494
+stderr 494
+stdout 495
+stderr 495
+stdout 496
+stderr 496
+stdout 497
+stderr 497
+stdout 498
+stderr 498
+stdout 499
+stderr 499
+stdout 500
+stderr 500
+stdout 501
+stderr 501
+stdout 502
+stderr 502
+stdout 503
+stderr 503
+stdout 504
+stderr 504
+stdout 505
+stderr 505
+stdout 506
+stderr 506
+stdout 507
+stderr 507
+stdout 508
+stderr 508
+stdout 509
+stderr 509
+stdout 510
+stderr 510
+stdout 511
+stderr 511
+stdout 512
+stderr 512
+stdout 513
+stderr 513
+stdout 514
+stderr 514
+stdout 515
+stderr 515
+stdout 516
+stderr 516
+stdout 517
+stderr 517
+stdout 518
+stderr 518
+stdout 519
+stderr 519
+stdout 520
+stderr 520
+stdout 521
+stderr 521
+stdout 522
+stderr 522
+stdout 523
+stderr 523
+stdout 524
+stderr 524
+stdout 525
+stderr 525
+stdout 526
+stderr 526
+stdout 527
+stderr 527
+stdout 528
+stderr 528
+stdout 529
+stderr 529
+stdout 530
+stderr 530
+stdout 531
+stderr 531
+stdout 532
+stderr 532
+stdout 533
+stderr 533
+stdout 534
+stderr 534
+stdout 535
+stderr 535
+stdout 536
+stderr 536
+stdout 537
+stderr 537
+stdout 538
+stderr 538
+stdout 539
+stderr 539
+stdout 540
+stderr 540
+stdout 541
+stderr 541
+stdout 542
+stderr 542
+stdout 543
+stderr 543
+stdout 544
+stderr 544
+stdout 545
+stderr 545
+stdout 546
+stderr 546
+stdout 547
+stderr 547
+stdout 548
+stderr 548
+stdout 549
+stderr 549
+stdout 550
+stderr 550
+stdout 551
+stderr 551
+stdout 552
+stderr 552
+stdout 553
+stderr 553
+stdout 554
+stderr 554
+stdout 555
+stderr 555
+stdout 556
+stderr 556
+stdout 557
+stderr 557
+stdout 558
+stderr 558
+stdout 559
+stderr 559
+stdout 560
+stderr 560
+stdout 561
+stderr 561
+stdout 562
+stderr 562
+stdout 563
+stderr 563
+stdout 564
+stderr 564
+stdout 565
+stderr 565
+stdout 566
+stderr 566
+stdout 567
+stderr 567
+stdout 568
+stderr 568
+stdout 569
+stderr 569
+stdout 570
+stderr 570
+stdout 571
+stderr 571
+stdout 572
+stderr 572
+stdout 573
+stderr 573
+stdout 574
+stderr 574
+stdout 575
+stderr 575
+stdout 576
+stderr 576
+stdout 577
+stderr 577
+stdout 578
+stderr 578
+stdout 579
+stderr 579
+stdout 580
+stderr 580
+stdout 581
+stderr 581
+stdout 582
+stderr 582
+stdout 583
+stderr 583
+stdout 584
+stderr 584
+stdout 585
+stderr 585
+stdout 586
+stderr 586
+stdout 587
+stderr 587
+stdout 588
+stderr 588
+stdout 589
+stderr 589
+stdout 590
+stderr 590
+stdout 591
+stderr 591
+stdout 592
+stderr 592
+stdout 593
+stderr 593
+stdout 594
+stderr 594
+stdout 595
+stderr 595
+stdout 596
+stderr 596
+stdout 597
+stderr 597
+stdout 598
+stderr 598
+stdout 599
+stderr 599
+stdout 600
+stderr 600
+stdout 601
+stderr 601
+stdout 602
+stderr 602
+stdout 603
+stderr 603
+stdout 604
+stderr 604
+stdout 605
+stderr 605
+stdout 606
+stderr 606
+stdout 607
+stderr 607
+stdout 608
+stderr 608
+stdout 609
+stderr 609
+stdout 610
+stderr 610
+stdout 611
+stderr 611
+stdout 612
+stderr 612
+stdout 613
+stderr 613
+stdout 614
+stderr 614
+stdout 615
+stderr 615
+stdout 616
+stderr 616
+stdout 617
+stderr 617
+stdout 618
+stderr 618
+stdout 619
+stderr 619
+stdout 620
+stderr 620
+stdout 621
+stderr 621
+stdout 622
+stderr 622
+stdout 623
+stderr 623
+stdout 624
+stderr 624
+stdout 625
+stderr 625
+stdout 626
+stderr 626
+stdout 627
+stderr 627
+stdout 628
+stderr 628
+stdout 629
+stderr 629
+stdout 630
+stderr 630
+stdout 631
+stderr 631
+stdout 632
+stderr 632
+stdout 633
+stderr 633
+stdout 634
+stderr 634
+stdout 635
+stderr 635
+stdout 636
+stderr 636
+stdout 637
+stderr 637
+stdout 638
+stderr 638
+stdout 639
+stderr 639
+stdout 640
+stderr 640
+stdout 641
+stderr 641
+stdout 642
+stderr 642
+stdout 643
+stderr 643
+stdout 644
+stderr 644
+stdout 645
+stderr 645
+stdout 646
+stderr 646
+stdout 647
+stderr 647
+stdout 648
+stderr 648
+stdout 649
+stderr 649
+stdout 650
+stderr 650
+stdout 651
+stderr 651
+stdout 652
+stderr 652
+stdout 653
+stderr 653
+stdout 654
+stderr 654
+stdout 655
+stderr 655
+stdout 656
+stderr 656
+stdout 657
+stderr 657
+stdout 658
+stderr 658
+stdout 659
+stderr 659
+stdout 660
+stderr 660
+stdout 661
+stderr 661
+stdout 662
+stderr 662
+stdout 663
+stderr 663
+stdout 664
+stderr 664
+stdout 665
+stderr 665
+stdout 666
+stderr 666
+stdout 667
+stderr 667
+stdout 668
+stderr 668
+stdout 669
+stderr 669
+stdout 670
+stderr 670
+stdout 671
+stderr 671
+stdout 672
+stderr 672
+stdout 673
+stderr 673
+stdout 674
+stderr 674
+stdout 675
+stderr 675
+stdout 676
+stderr 676
+stdout 677
+stderr 677
+stdout 678
+stderr 678
+stdout 679
+stderr 679
+stdout 680
+stderr 680
+stdout 681
+stderr 681
+stdout 682
+stderr 682
+stdout 683
+stderr 683
+stdout 684
+stderr 684
+stdout 685
+stderr 685
+stdout 686
+stderr 686
+stdout 687
+stderr 687
+stdout 688
+stderr 688
+stdout 689
+stderr 689
+stdout 690
+stderr 690
+stdout 691
+stderr 691
+stdout 692
+stderr 692
+stdout 693
+stderr 693
+stdout 694
+stderr 694
+stdout 695
+stderr 695
+stdout 696
+stderr 696
+stdout 697
+stderr 697
+stdout 698
+stderr 698
+stdout 699
+stderr 699
+stdout 700
+stderr 700
+stdout 701
+stderr 701
+stdout 702
+stderr 702
+stdout 703
+stderr 703
+stdout 704
+stderr 704
+stdout 705
+stderr 705
+stdout 706
+stderr 706
+stdout 707
+stderr 707
+stdout 708
+stderr 708
+stdout 709
+stderr 709
+stdout 710
+stderr 710
+stdout 711
+stderr 711
+stdout 712
+stderr 712
+stdout 713
+stderr 713
+stdout 714
+stderr 714
+stdout 715
+stderr 715
+stdout 716
+stderr 716
+stdout 717
+stderr 717
+stdout 718
+stderr 718
+stdout 719
+stderr 719
+stdout 720
+stderr 720
+stdout 721
+stderr 721
+stdout 722
+stderr 722
+stdout 723
+stderr 723
+stdout 724
+stderr 724
+stdout 725
+stderr 725
+stdout 726
+stderr 726
+stdout 727
+stderr 727
+stdout 728
+stderr 728
+stdout 729
+stderr 729
+stdout 730
+stderr 730
+stdout 731
+stderr 731
+stdout 732
+stderr 732
+stdout 733
+stderr 733
+stdout 734
+stderr 734
+stdout 735
+stderr 735
+stdout 736
+stderr 736
+stdout 737
+stderr 737
+stdout 738
+stderr 738
+stdout 739
+stderr 739
+stdout 740
+stderr 740
+stdout 741
+stderr 741
+stdout 742
+stderr 742
+stdout 743
+stderr 743
+stdout 744
+stderr 744
+stdout 745
+stderr 745
+stdout 746
+stderr 746
+stdout 747
+stderr 747
+stdout 748
+stderr 748
+stdout 749
+stderr 749
+stdout 750
+stderr 750
+stdout 751
+stderr 751
+stdout 752
+stderr 752
+stdout 753
+stderr 753
+stdout 754
+stderr 754
+stdout 755
+stderr 755
+stdout 756
+stderr 756
+stdout 757
+stderr 757
+stdout 758
+stderr 758
+stdout 759
+stderr 759
+stdout 760
+stderr 760
+stdout 761
+stderr 761
+stdout 762
+stderr 762
+stdout 763
+stderr 763
+stdout 764
+stderr 764
+stdout 765
+stderr 765
+stdout 766
+stderr 766
+stdout 767
+stderr 767
+stdout 768
+stderr 768
+stdout 769
+stderr 769
+stdout 770
+stderr 770
+stdout 771
+stderr 771
+stdout 772
+stderr 772
+stdout 773
+stderr 773
+stdout 774
+stderr 774
+stdout 775
+stderr 775
+stdout 776
+stderr 776
+stdout 777
+stderr 777
+stdout 778
+stderr 778
+stdout 779
+stderr 779
+stdout 780
+stderr 780
+stdout 781
+stderr 781
+stdout 782
+stderr 782
+stdout 783
+stderr 783
+stdout 784
+stderr 784
+stdout 785
+stderr 785
+stdout 786
+stderr 786
+stdout 787
+stderr 787
+stdout 788
+stderr 788
+stdout 789
+stderr 789
+stdout 790
+stderr 790
+stdout 791
+stderr 791
+stdout 792
+stderr 792
+stdout 793
+stderr 793
+stdout 794
+stderr 794
+stdout 795
+stderr 795
+stdout 796
+stderr 796
+stdout 797
+stderr 797
+stdout 798
+stderr 798
+stdout 799
+stderr 799
+stdout 800
+stderr 800
+stdout 801
+stderr 801
+stdout 802
+stderr 802
+stdout 803
+stderr 803
+stdout 804
+stderr 804
+stdout 805
+stderr 805
+stdout 806
+stderr 806
+stdout 807
+stderr 807
+stdout 808
+stderr 808
+stdout 809
+stderr 809
+stdout 810
+stderr 810
+stdout 811
+stderr 811
+stdout 812
+stderr 812
+stdout 813
+stderr 813
+stdout 814
+stderr 814
+stdout 815
+stderr 815
+stdout 816
+stderr 816
+stdout 817
+stderr 817
+stdout 818
+stderr 818
+stdout 819
+stderr 819
+stdout 820
+stderr 820
+stdout 821
+stderr 821
+stdout 822
+stderr 822
+stdout 823
+stderr 823
+stdout 824
+stderr 824
+stdout 825
+stderr 825
+stdout 826
+stderr 826
+stdout 827
+stderr 827
+stdout 828
+stderr 828
+stdout 829
+stderr 829
+stdout 830
+stderr 830
+stdout 831
+stderr 831
+stdout 832
+stderr 832
+stdout 833
+stderr 833
+stdout 834
+stderr 834
+stdout 835
+stderr 835
+stdout 836
+stderr 836
+stdout 837
+stderr 837
+stdout 838
+stderr 838
+stdout 839
+stderr 839
+stdout 840
+stderr 840
+stdout 841
+stderr 841
+stdout 842
+stderr 842
+stdout 843
+stderr 843
+stdout 844
+stderr 844
+stdout 845
+stderr 845
+stdout 846
+stderr 846
+stdout 847
+stderr 847
+stdout 848
+stderr 848
+stdout 849
+stderr 849
+stdout 850
+stderr 850
+stdout 851
+stderr 851
+stdout 852
+stderr 852
+stdout 853
+stderr 853
+stdout 854
+stderr 854
+stdout 855
+stderr 855
+stdout 856
+stderr 856
+stdout 857
+stderr 857
+stdout 858
+stderr 858
+stdout 859
+stderr 859
+stdout 860
+stderr 860
+stdout 861
+stderr 861
+stdout 862
+stderr 862
+stdout 863
+stderr 863
+stdout 864
+stderr 864
+stdout 865
+stderr 865
+stdout 866
+stderr 866
+stdout 867
+stderr 867
+stdout 868
+stderr 868
+stdout 869
+stderr 869
+stdout 870
+stderr 870
+stdout 871
+stderr 871
+stdout 872
+stderr 872
+stdout 873
+stderr 873
+stdout 874
+stderr 874
+stdout 875
+stderr 875
+stdout 876
+stderr 876
+stdout 877
+stderr 877
+stdout 878
+stderr 878
+stdout 879
+stderr 879
+stdout 880
+stderr 880
+stdout 881
+stderr 881
+stdout 882
+stderr 882
+stdout 883
+stderr 883
+stdout 884
+stderr 884
+stdout 885
+stderr 885
+stdout 886
+stderr 886
+stdout 887
+stderr 887
+stdout 888
+stderr 888
+stdout 889
+stderr 889
+stdout 890
+stderr 890
+stdout 891
+stderr 891
+stdout 892
+stderr 892
+stdout 893
+stderr 893
+stdout 894
+stderr 894
+stdout 895
+stderr 895
+stdout 896
+stderr 896
+stdout 897
+stderr 897
+stdout 898
+stderr 898
+stdout 899
+stderr 899
+stdout 900
+stderr 900
+stdout 901
+stderr 901
+stdout 902
+stderr 902
+stdout 903
+stderr 903
+stdout 904
+stderr 904
+stdout 905
+stderr 905
+stdout 906
+stderr 906
+stdout 907
+stderr 907
+stdout 908
+stderr 908
+stdout 909
+stderr 909
+stdout 910
+stderr 910
+stdout 911
+stderr 911
+stdout 912
+stderr 912
+stdout 913
+stderr 913
+stdout 914
+stderr 914
+stdout 915
+stderr 915
+stdout 916
+stderr 916
+stdout 917
+stderr 917
+stdout 918
+stderr 918
+stdout 919
+stderr 919
+stdout 920
+stderr 920
+stdout 921
+stderr 921
+stdout 922
+stderr 922
+stdout 923
+stderr 923
+stdout 924
+stderr 924
+stdout 925
+stderr 925
+stdout 926
+stderr 926
+stdout 927
+stderr 927
+stdout 928
+stderr 928
+stdout 929
+stderr 929
+stdout 930
+stderr 930
+stdout 931
+stderr 931
+stdout 932
+stderr 932
+stdout 933
+stderr 933
+stdout 934
+stderr 934
+stdout 935
+stderr 935
+stdout 936
+stderr 936
+stdout 937
+stderr 937
+stdout 938
+stderr 938
+stdout 939
+stderr 939
+stdout 940
+stderr 940
+stdout 941
+stderr 941
+stdout 942
+stderr 942
+stdout 943
+stderr 943
+stdout 944
+stderr 944
+stdout 945
+stderr 945
+stdout 946
+stderr 946
+stdout 947
+stderr 947
+stdout 948
+stderr 948
+stdout 949
+stderr 949
+stdout 950
+stderr 950
+stdout 951
+stderr 951
+stdout 952
+stderr 952
+stdout 953
+stderr 953
+stdout 954
+stderr 954
+stdout 955
+stderr 955
+stdout 956
+stderr 956
+stdout 957
+stderr 957
+stdout 958
+stderr 958
+stdout 959
+stderr 959
+stdout 960
+stderr 960
+stdout 961
+stderr 961
+stdout 962
+stderr 962
+stdout 963
+stderr 963
+stdout 964
+stderr 964
+stdout 965
+stderr 965
+stdout 966
+stderr 966
+stdout 967
+stderr 967
+stdout 968
+stderr 968
+stdout 969
+stderr 969
+stdout 970
+stderr 970
+stdout 971
+stderr 971
+stdout 972
+stderr 972
+stdout 973
+stderr 973
+stdout 974
+stderr 974
+stdout 975
+stderr 975
+stdout 976
+stderr 976
+stdout 977
+stderr 977
+stdout 978
+stderr 978
+stdout 979
+stderr 979
+stdout 980
+stderr 980
+stdout 981
+stderr 981
+stdout 982
+stderr 982
+stdout 983
+stderr 983
+stdout 984
+stderr 984
+stdout 985
+stderr 985
+stdout 986
+stderr 986
+stdout 987
+stderr 987
+stdout 988
+stderr 988
+stdout 989
+stderr 989
+stdout 990
+stderr 990
+stdout 991
+stderr 991
+stdout 992
+stderr 992
+stdout 993
+stderr 993
+stdout 994
+stderr 994
+stdout 995
+stderr 995
+stdout 996
+stderr 996
+stdout 997
+stderr 997
+stdout 998
+stderr 998
+stdout 999
+stderr 999
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/1000-stdout.txt
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/1000-stdout.txt b/blackberry10/node_modules/exit/test/fixtures/1000-stdout.txt
new file mode 100644
index 0000000..d3649d0
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/1000-stdout.txt
@@ -0,0 +1,1000 @@
+stdout 0
+stdout 1
+stdout 2
+stdout 3
+stdout 4
+stdout 5
+stdout 6
+stdout 7
+stdout 8
+stdout 9
+stdout 10
+stdout 11
+stdout 12
+stdout 13
+stdout 14
+stdout 15
+stdout 16
+stdout 17
+stdout 18
+stdout 19
+stdout 20
+stdout 21
+stdout 22
+stdout 23
+stdout 24
+stdout 25
+stdout 26
+stdout 27
+stdout 28
+stdout 29
+stdout 30
+stdout 31
+stdout 32
+stdout 33
+stdout 34
+stdout 35
+stdout 36
+stdout 37
+stdout 38
+stdout 39
+stdout 40
+stdout 41
+stdout 42
+stdout 43
+stdout 44
+stdout 45
+stdout 46
+stdout 47
+stdout 48
+stdout 49
+stdout 50
+stdout 51
+stdout 52
+stdout 53
+stdout 54
+stdout 55
+stdout 56
+stdout 57
+stdout 58
+stdout 59
+stdout 60
+stdout 61
+stdout 62
+stdout 63
+stdout 64
+stdout 65
+stdout 66
+stdout 67
+stdout 68
+stdout 69
+stdout 70
+stdout 71
+stdout 72
+stdout 73
+stdout 74
+stdout 75
+stdout 76
+stdout 77
+stdout 78
+stdout 79
+stdout 80
+stdout 81
+stdout 82
+stdout 83
+stdout 84
+stdout 85
+stdout 86
+stdout 87
+stdout 88
+stdout 89
+stdout 90
+stdout 91
+stdout 92
+stdout 93
+stdout 94
+stdout 95
+stdout 96
+stdout 97
+stdout 98
+stdout 99
+stdout 100
+stdout 101
+stdout 102
+stdout 103
+stdout 104
+stdout 105
+stdout 106
+stdout 107
+stdout 108
+stdout 109
+stdout 110
+stdout 111
+stdout 112
+stdout 113
+stdout 114
+stdout 115
+stdout 116
+stdout 117
+stdout 118
+stdout 119
+stdout 120
+stdout 121
+stdout 122
+stdout 123
+stdout 124
+stdout 125
+stdout 126
+stdout 127
+stdout 128
+stdout 129
+stdout 130
+stdout 131
+stdout 132
+stdout 133
+stdout 134
+stdout 135
+stdout 136
+stdout 137
+stdout 138
+stdout 139
+stdout 140
+stdout 141
+stdout 142
+stdout 143
+stdout 144
+stdout 145
+stdout 146
+stdout 147
+stdout 148
+stdout 149
+stdout 150
+stdout 151
+stdout 152
+stdout 153
+stdout 154
+stdout 155
+stdout 156
+stdout 157
+stdout 158
+stdout 159
+stdout 160
+stdout 161
+stdout 162
+stdout 163
+stdout 164
+stdout 165
+stdout 166
+stdout 167
+stdout 168
+stdout 169
+stdout 170
+stdout 171
+stdout 172
+stdout 173
+stdout 174
+stdout 175
+stdout 176
+stdout 177
+stdout 178
+stdout 179
+stdout 180
+stdout 181
+stdout 182
+stdout 183
+stdout 184
+stdout 185
+stdout 186
+stdout 187
+stdout 188
+stdout 189
+stdout 190
+stdout 191
+stdout 192
+stdout 193
+stdout 194
+stdout 195
+stdout 196
+stdout 197
+stdout 198
+stdout 199
+stdout 200
+stdout 201
+stdout 202
+stdout 203
+stdout 204
+stdout 205
+stdout 206
+stdout 207
+stdout 208
+stdout 209
+stdout 210
+stdout 211
+stdout 212
+stdout 213
+stdout 214
+stdout 215
+stdout 216
+stdout 217
+stdout 218
+stdout 219
+stdout 220
+stdout 221
+stdout 222
+stdout 223
+stdout 224
+stdout 225
+stdout 226
+stdout 227
+stdout 228
+stdout 229
+stdout 230
+stdout 231
+stdout 232
+stdout 233
+stdout 234
+stdout 235
+stdout 236
+stdout 237
+stdout 238
+stdout 239
+stdout 240
+stdout 241
+stdout 242
+stdout 243
+stdout 244
+stdout 245
+stdout 246
+stdout 247
+stdout 248
+stdout 249
+stdout 250
+stdout 251
+stdout 252
+stdout 253
+stdout 254
+stdout 255
+stdout 256
+stdout 257
+stdout 258
+stdout 259
+stdout 260
+stdout 261
+stdout 262
+stdout 263
+stdout 264
+stdout 265
+stdout 266
+stdout 267
+stdout 268
+stdout 269
+stdout 270
+stdout 271
+stdout 272
+stdout 273
+stdout 274
+stdout 275
+stdout 276
+stdout 277
+stdout 278
+stdout 279
+stdout 280
+stdout 281
+stdout 282
+stdout 283
+stdout 284
+stdout 285
+stdout 286
+stdout 287
+stdout 288
+stdout 289
+stdout 290
+stdout 291
+stdout 292
+stdout 293
+stdout 294
+stdout 295
+stdout 296
+stdout 297
+stdout 298
+stdout 299
+stdout 300
+stdout 301
+stdout 302
+stdout 303
+stdout 304
+stdout 305
+stdout 306
+stdout 307
+stdout 308
+stdout 309
+stdout 310
+stdout 311
+stdout 312
+stdout 313
+stdout 314
+stdout 315
+stdout 316
+stdout 317
+stdout 318
+stdout 319
+stdout 320
+stdout 321
+stdout 322
+stdout 323
+stdout 324
+stdout 325
+stdout 326
+stdout 327
+stdout 328
+stdout 329
+stdout 330
+stdout 331
+stdout 332
+stdout 333
+stdout 334
+stdout 335
+stdout 336
+stdout 337
+stdout 338
+stdout 339
+stdout 340
+stdout 341
+stdout 342
+stdout 343
+stdout 344
+stdout 345
+stdout 346
+stdout 347
+stdout 348
+stdout 349
+stdout 350
+stdout 351
+stdout 352
+stdout 353
+stdout 354
+stdout 355
+stdout 356
+stdout 357
+stdout 358
+stdout 359
+stdout 360
+stdout 361
+stdout 362
+stdout 363
+stdout 364
+stdout 365
+stdout 366
+stdout 367
+stdout 368
+stdout 369
+stdout 370
+stdout 371
+stdout 372
+stdout 373
+stdout 374
+stdout 375
+stdout 376
+stdout 377
+stdout 378
+stdout 379
+stdout 380
+stdout 381
+stdout 382
+stdout 383
+stdout 384
+stdout 385
+stdout 386
+stdout 387
+stdout 388
+stdout 389
+stdout 390
+stdout 391
+stdout 392
+stdout 393
+stdout 394
+stdout 395
+stdout 396
+stdout 397
+stdout 398
+stdout 399
+stdout 400
+stdout 401
+stdout 402
+stdout 403
+stdout 404
+stdout 405
+stdout 406
+stdout 407
+stdout 408
+stdout 409
+stdout 410
+stdout 411
+stdout 412
+stdout 413
+stdout 414
+stdout 415
+stdout 416
+stdout 417
+stdout 418
+stdout 419
+stdout 420
+stdout 421
+stdout 422
+stdout 423
+stdout 424
+stdout 425
+stdout 426
+stdout 427
+stdout 428
+stdout 429
+stdout 430
+stdout 431
+stdout 432
+stdout 433
+stdout 434
+stdout 435
+stdout 436
+stdout 437
+stdout 438
+stdout 439
+stdout 440
+stdout 441
+stdout 442
+stdout 443
+stdout 444
+stdout 445
+stdout 446
+stdout 447
+stdout 448
+stdout 449
+stdout 450
+stdout 451
+stdout 452
+stdout 453
+stdout 454
+stdout 455
+stdout 456
+stdout 457
+stdout 458
+stdout 459
+stdout 460
+stdout 461
+stdout 462
+stdout 463
+stdout 464
+stdout 465
+stdout 466
+stdout 467
+stdout 468
+stdout 469
+stdout 470
+stdout 471
+stdout 472
+stdout 473
+stdout 474
+stdout 475
+stdout 476
+stdout 477
+stdout 478
+stdout 479
+stdout 480
+stdout 481
+stdout 482
+stdout 483
+stdout 484
+stdout 485
+stdout 486
+stdout 487
+stdout 488
+stdout 489
+stdout 490
+stdout 491
+stdout 492
+stdout 493
+stdout 494
+stdout 495
+stdout 496
+stdout 497
+stdout 498
+stdout 499
+stdout 500
+stdout 501
+stdout 502
+stdout 503
+stdout 504
+stdout 505
+stdout 506
+stdout 507
+stdout 508
+stdout 509
+stdout 510
+stdout 511
+stdout 512
+stdout 513
+stdout 514
+stdout 515
+stdout 516
+stdout 517
+stdout 518
+stdout 519
+stdout 520
+stdout 521
+stdout 522
+stdout 523
+stdout 524
+stdout 525
+stdout 526
+stdout 527
+stdout 528
+stdout 529
+stdout 530
+stdout 531
+stdout 532
+stdout 533
+stdout 534
+stdout 535
+stdout 536
+stdout 537
+stdout 538
+stdout 539
+stdout 540
+stdout 541
+stdout 542
+stdout 543
+stdout 544
+stdout 545
+stdout 546
+stdout 547
+stdout 548
+stdout 549
+stdout 550
+stdout 551
+stdout 552
+stdout 553
+stdout 554
+stdout 555
+stdout 556
+stdout 557
+stdout 558
+stdout 559
+stdout 560
+stdout 561
+stdout 562
+stdout 563
+stdout 564
+stdout 565
+stdout 566
+stdout 567
+stdout 568
+stdout 569
+stdout 570
+stdout 571
+stdout 572
+stdout 573
+stdout 574
+stdout 575
+stdout 576
+stdout 577
+stdout 578
+stdout 579
+stdout 580
+stdout 581
+stdout 582
+stdout 583
+stdout 584
+stdout 585
+stdout 586
+stdout 587
+stdout 588
+stdout 589
+stdout 590
+stdout 591
+stdout 592
+stdout 593
+stdout 594
+stdout 595
+stdout 596
+stdout 597
+stdout 598
+stdout 599
+stdout 600
+stdout 601
+stdout 602
+stdout 603
+stdout 604
+stdout 605
+stdout 606
+stdout 607
+stdout 608
+stdout 609
+stdout 610
+stdout 611
+stdout 612
+stdout 613
+stdout 614
+stdout 615
+stdout 616
+stdout 617
+stdout 618
+stdout 619
+stdout 620
+stdout 621
+stdout 622
+stdout 623
+stdout 624
+stdout 625
+stdout 626
+stdout 627
+stdout 628
+stdout 629
+stdout 630
+stdout 631
+stdout 632
+stdout 633
+stdout 634
+stdout 635
+stdout 636
+stdout 637
+stdout 638
+stdout 639
+stdout 640
+stdout 641
+stdout 642
+stdout 643
+stdout 644
+stdout 645
+stdout 646
+stdout 647
+stdout 648
+stdout 649
+stdout 650
+stdout 651
+stdout 652
+stdout 653
+stdout 654
+stdout 655
+stdout 656
+stdout 657
+stdout 658
+stdout 659
+stdout 660
+stdout 661
+stdout 662
+stdout 663
+stdout 664
+stdout 665
+stdout 666
+stdout 667
+stdout 668
+stdout 669
+stdout 670
+stdout 671
+stdout 672
+stdout 673
+stdout 674
+stdout 675
+stdout 676
+stdout 677
+stdout 678
+stdout 679
+stdout 680
+stdout 681
+stdout 682
+stdout 683
+stdout 684
+stdout 685
+stdout 686
+stdout 687
+stdout 688
+stdout 689
+stdout 690
+stdout 691
+stdout 692
+stdout 693
+stdout 694
+stdout 695
+stdout 696
+stdout 697
+stdout 698
+stdout 699
+stdout 700
+stdout 701
+stdout 702
+stdout 703
+stdout 704
+stdout 705
+stdout 706
+stdout 707
+stdout 708
+stdout 709
+stdout 710
+stdout 711
+stdout 712
+stdout 713
+stdout 714
+stdout 715
+stdout 716
+stdout 717
+stdout 718
+stdout 719
+stdout 720
+stdout 721
+stdout 722
+stdout 723
+stdout 724
+stdout 725
+stdout 726
+stdout 727
+stdout 728
+stdout 729
+stdout 730
+stdout 731
+stdout 732
+stdout 733
+stdout 734
+stdout 735
+stdout 736
+stdout 737
+stdout 738
+stdout 739
+stdout 740
+stdout 741
+stdout 742
+stdout 743
+stdout 744
+stdout 745
+stdout 746
+stdout 747
+stdout 748
+stdout 749
+stdout 750
+stdout 751
+stdout 752
+stdout 753
+stdout 754
+stdout 755
+stdout 756
+stdout 757
+stdout 758
+stdout 759
+stdout 760
+stdout 761
+stdout 762
+stdout 763
+stdout 764
+stdout 765
+stdout 766
+stdout 767
+stdout 768
+stdout 769
+stdout 770
+stdout 771
+stdout 772
+stdout 773
+stdout 774
+stdout 775
+stdout 776
+stdout 777
+stdout 778
+stdout 779
+stdout 780
+stdout 781
+stdout 782
+stdout 783
+stdout 784
+stdout 785
+stdout 786
+stdout 787
+stdout 788
+stdout 789
+stdout 790
+stdout 791
+stdout 792
+stdout 793
+stdout 794
+stdout 795
+stdout 796
+stdout 797
+stdout 798
+stdout 799
+stdout 800
+stdout 801
+stdout 802
+stdout 803
+stdout 804
+stdout 805
+stdout 806
+stdout 807
+stdout 808
+stdout 809
+stdout 810
+stdout 811
+stdout 812
+stdout 813
+stdout 814
+stdout 815
+stdout 816
+stdout 817
+stdout 818
+stdout 819
+stdout 820
+stdout 821
+stdout 822
+stdout 823
+stdout 824
+stdout 825
+stdout 826
+stdout 827
+stdout 828
+stdout 829
+stdout 830
+stdout 831
+stdout 832
+stdout 833
+stdout 834
+stdout 835
+stdout 836
+stdout 837
+stdout 838
+stdout 839
+stdout 840
+stdout 841
+stdout 842
+stdout 843
+stdout 844
+stdout 845
+stdout 846
+stdout 847
+stdout 848
+stdout 849
+stdout 850
+stdout 851
+stdout 852
+stdout 853
+stdout 854
+stdout 855
+stdout 856
+stdout 857
+stdout 858
+stdout 859
+stdout 860
+stdout 861
+stdout 862
+stdout 863
+stdout 864
+stdout 865
+stdout 866
+stdout 867
+stdout 868
+stdout 869
+stdout 870
+stdout 871
+stdout 872
+stdout 873
+stdout 874
+stdout 875
+stdout 876
+stdout 877
+stdout 878
+stdout 879
+stdout 880
+stdout 881
+stdout 882
+stdout 883
+stdout 884
+stdout 885
+stdout 886
+stdout 887
+stdout 888
+stdout 889
+stdout 890
+stdout 891
+stdout 892
+stdout 893
+stdout 894
+stdout 895
+stdout 896
+stdout 897
+stdout 898
+stdout 899
+stdout 900
+stdout 901
+stdout 902
+stdout 903
+stdout 904
+stdout 905
+stdout 906
+stdout 907
+stdout 908
+stdout 909
+stdout 910
+stdout 911
+stdout 912
+stdout 913
+stdout 914
+stdout 915
+stdout 916
+stdout 917
+stdout 918
+stdout 919
+stdout 920
+stdout 921
+stdout 922
+stdout 923
+stdout 924
+stdout 925
+stdout 926
+stdout 927
+stdout 928
+stdout 929
+stdout 930
+stdout 931
+stdout 932
+stdout 933
+stdout 934
+stdout 935
+stdout 936
+stdout 937
+stdout 938
+stdout 939
+stdout 940
+stdout 941
+stdout 942
+stdout 943
+stdout 944
+stdout 945
+stdout 946
+stdout 947
+stdout 948
+stdout 949
+stdout 950
+stdout 951
+stdout 952
+stdout 953
+stdout 954
+stdout 955
+stdout 956
+stdout 957
+stdout 958
+stdout 959
+stdout 960
+stdout 961
+stdout 962
+stdout 963
+stdout 964
+stdout 965
+stdout 966
+stdout 967
+stdout 968
+stdout 969
+stdout 970
+stdout 971
+stdout 972
+stdout 973
+stdout 974
+stdout 975
+stdout 976
+stdout 977
+stdout 978
+stdout 979
+stdout 980
+stdout 981
+stdout 982
+stdout 983
+stdout 984
+stdout 985
+stdout 986
+stdout 987
+stdout 988
+stdout 989
+stdout 990
+stdout 991
+stdout 992
+stdout 993
+stdout 994
+stdout 995
+stdout 996
+stdout 997
+stdout 998
+stdout 999
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/create-files.sh
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/create-files.sh b/blackberry10/node_modules/exit/test/fixtures/create-files.sh
new file mode 100755
index 0000000..6a526de
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/create-files.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+rm 10*.txt
+for n in 10 100 1000; do
+ node log.js 0 $n stdout stderr &> $n-stdout-stderr.txt
+ node log.js 0 $n stdout &> $n-stdout.txt
+ node log.js 0 $n stderr &> $n-stderr.txt
+done
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/log-broken.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/log-broken.js b/blackberry10/node_modules/exit/test/fixtures/log-broken.js
new file mode 100644
index 0000000..74c8f12
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/log-broken.js
@@ -0,0 +1,23 @@
+var errorCode = process.argv[2];
+var max = process.argv[3];
+var modes = process.argv.slice(4);
+
+function stdout(message) {
+ if (modes.indexOf('stdout') === -1) { return; }
+ process.stdout.write('stdout ' + message + '\n');
+}
+
+function stderr(message) {
+ if (modes.indexOf('stderr') === -1) { return; }
+ process.stderr.write('stderr ' + message + '\n');
+}
+
+for (var i = 0; i < max; i++) {
+ stdout(i);
+ stderr(i);
+}
+
+process.exit(errorCode);
+
+stdout('fail');
+stderr('fail');
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/exit/test/fixtures/log.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/exit/test/fixtures/log.js b/blackberry10/node_modules/exit/test/fixtures/log.js
new file mode 100644
index 0000000..8a9ed9a
--- /dev/null
+++ b/blackberry10/node_modules/exit/test/fixtures/log.js
@@ -0,0 +1,25 @@
+var exit = require('../../lib/exit');
+
+var errorCode = process.argv[2];
+var max = process.argv[3];
+var modes = process.argv.slice(4);
+
+function stdout(message) {
+ if (modes.indexOf('stdout') === -1) { return; }
+ process.stdout.write('stdout ' + message + '\n');
+}
+
+function stderr(message) {
+ if (modes.indexOf('stderr') === -1) { return; }
+ process.stderr.write('stderr ' + message + '\n');
+}
+
+for (var i = 0; i < max; i++) {
+ stdout(i);
+ stderr(i);
+}
+
+exit(errorCode);
+
+stdout('fail');
+stderr('fail');
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/.npmignore b/blackberry10/node_modules/jWorkflow/.npmignore
new file mode 100644
index 0000000..b4a9d1d
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/.npmignore
@@ -0,0 +1 @@
+.redcar
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/LICENSE b/blackberry10/node_modules/jWorkflow/LICENSE
new file mode 100644
index 0000000..b6cd384
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/LICENSE
@@ -0,0 +1,9 @@
+** Licensed Under **
+
+The MIT License
+http://www.opensource.org/licenses/mit-license.php
+
+Copyright (c) 2010 all contributors:
+
+Gord Tanner
+tinyHippos Inc.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/README.md b/blackberry10/node_modules/jWorkflow/README.md
new file mode 100644
index 0000000..8f420b1
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/README.md
@@ -0,0 +1,170 @@
+# jWorkflow
+Dude, where is my workflow?
+
+jWorkflow is a workflow engine for JavaScript that provides the ability to
+create workflows to chain methods together in an easy to understand syntax:
+
+ var fooodOrder = jWorkflow.order(garlicChicken)
+ .andThen(whiteRice)
+ .andThen(wontonSoup)
+ .andThen(cookiesFortune)
+ .andThen(noAndThen)
+ .andThen(noAndThen)
+ .andThen(noAndThen)
+ .andThen(noAndThen);
+
+ fooodOrder.start();
+
+# Install
+
+jWorkflow can be used in node or included in the browser. It can be installed with npm
+
+ npm install jWorkflow
+
+and used
+
+ var jWorkflow = require("jWorkflow");
+
+or just include jWorkflow.js in your webpage and use window.jWorkflow.
+
+# Usage
+
+jWorkflow orders are started with a call to jWorkflow.order:
+
+ function dude() {
+ // some of the best code in the world will live here
+ }
+
+ var order = jWorkflow.order(dude);
+
+ // orders can also be started with no initial function
+ var pizzacoli = jWorkflow.order();
+
+jWorkflow tasks at the root are just functions that will be invoked in the order they are built.
+Any number of tasks can be then appended to the order:
+
+ order.andThen(sweet).andThen(dude).andThen(sweet);
+
+The functions passed into the order will not be invoked until you call:
+
+ order.start();
+
+The context to be used when invoking the functions can be passed in while creating the order:
+
+ order.andThen(transfunctioner.photonAcceleratorAnnihilationBeam, transfunctioner);
+
+An initial value can be passed into the start method to seed the first function:
+
+ order.start({
+ initialValue: 10
+ });
+
+# Passing Values between tasks
+
+jWorkflow tasks can access the return value of the previous task with the previous parameter:
+
+ function meaningOfLife() {
+ //find the meaning of life
+ return 42;
+ }
+
+ function writeBook(previous) {
+ console.log("the meaning of life is " + previous);
+ }
+
+ var guide = jWorkflow.order(meaningOfLife).andThen(writeBook);
+ guide.start();
+
+# Handling Async calls
+
+Sometimes(probably all the time) you will need to do something async when working with
+tasks, jWorkflow provides the ability to control the execution of the workflow via a
+baton that is passed to the task
+
+ function procrastinate(previous, baton) {
+ //take the baton, this means the next task will not run until you pass the baton
+ baton.take();
+
+ window.setTimeout(function() {
+ //do some stuff
+
+ //please be nice and always remember to pass the baton!
+ baton.pass();
+ }, 1000);
+ }
+
+If you want to pass a return value to the next task you can pass it along with the
+baton.
+
+NOTE: if you did take the baton, the return value from your function will NOT be passed to
+the next task:
+
+ function awesometown(previous, baton) {
+ baton.take();
+
+ window.setTimeout(function() {
+
+ //do stuff
+
+ baton.pass(420); //This value will be passed to the next task
+ }, 100);
+
+ return 50; // this will NOT be passed to the next function since you took the baton.
+ }
+
+
+the start method provides a callback to execute when the workflow is finished. The final
+return value is also passed to the callback:
+
+ order.start({
+ callback: function(review) {
+ console.log("dude!, your car is behind that mail truck!");
+ expect(review).toBe("two thumbs up");
+ }
+ });
+
+you can also pass context to use for the callback:
+
+ order.start({
+ callback: function() {
+ //do stuff
+ },
+ context: transfunctioner
+ });
+
+# Waiting between tasks
+
+If you ever need to take a break and reflect on the moment you can add some time(in ms) to chill between tasks:
+
+ jWorkflow.order(seeDoubleRainbow)
+ .chill(1000)
+ .andThen(omg)
+ .andThen(omg)
+ .andThen(omg)
+ .chill(1000)
+ .andThen(freakOut);
+
+# Handling Parallel tasks
+
+If you need to handle some tasks and don't care about when they are done you can pass in an array of functions and / or other workflows to execute
+at the same time.
+
+ jWorkflow.order([man, man, halfMan])
+ .andThen([jWorkflow.order([guy, guy]).andThen(girl), pizzaPlace]);
+
+# Canceling Workflows
+
+To cancel the execution of the workflow you can call the drop method on the baton:
+
+ function (previous, baton) {
+ //the value passed to drop will be passed onto the final callback if it exists
+ baton.drop("I dropped the soap");
+ //this value will NOT be passed to the next workflow step
+ return 10;
+ }
+
+NOTE: This will force the workflow into async mode.
+
+# Contributers:
+
+ Gord Tanner <gt...@gmail.com>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/Rakefile
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/Rakefile b/blackberry10/node_modules/jWorkflow/Rakefile
new file mode 100644
index 0000000..eb6b859
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/Rakefile
@@ -0,0 +1,12 @@
+require 'rubygems'
+require 'closure-compiler'
+
+task :default => [:build]
+
+desc "Use the Closure Compiler to compress jWorkflow.js"
+task :build do
+ js = File.open('lib/jWorkflow.js', 'r')
+ min = Closure::Compiler.new.compile(js)
+ File.open('jworkflow-min-0.7.0.js', 'w') {|f| f.write(min) }
+end
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/jworkflow-min-0.8.0.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/jworkflow-min-0.8.0.js b/blackberry10/node_modules/jWorkflow/jworkflow-min-0.8.0.js
new file mode 100644
index 0000000..a448d51
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/jworkflow-min-0.8.0.js
@@ -0,0 +1,3 @@
+var jWorkflow=function(){return{order:function(j,k){var f=[],g,h=null,i=function(){var a=false;return{take:function(){a=true},pass:function(b){var c;a=false;g.length?(c=g.shift(),b=c.func.apply(c.context,[b,i]),a||i.pass(b)):h.func&&h.func.apply(h.context,[b])},drop:function(b){a=true;g=[];setTimeout(function(){i.pass(b)},1)}}}(),e={andThen:function(a,b){if(typeof a.andThen==="function"&&typeof a.start==="function"&&typeof a.chill==="function")f.push({func:function(c,d){d.take();a.start({callback:function(a){d.pass(a)},
+context:b,initialValue:c})},context:b});else if(a.map&&a.reduce)f.push({func:function(b,d){d.take();var f=a.length,g=function(){return--f||d.pass()};a.forEach(function(a){jWorkflow.order(a).start(g)})},context:b});else{if(typeof a!=="function")throw"expected function but was "+typeof a;f.push({func:a,context:b})}return e},chill:function(a){return e.andThen(function(b,c){c.take();setTimeout(function(){c.pass(b)},a)})},start:function(a,b){var c,d,e;a&&typeof a==="object"?(c=a.callback,d=a.context,e=
+a.initialValue):(c=a,d=b);h={func:c,context:d};g=f.slice();i.pass(e)}};return j?e.andThen(j,k):e}}}();if(typeof module==="object"&&typeof require==="function")module.exports=jWorkflow;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/lib/jWorkflow.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/lib/jWorkflow.js b/blackberry10/node_modules/jWorkflow/lib/jWorkflow.js
new file mode 100644
index 0000000..36380d5
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/lib/jWorkflow.js
@@ -0,0 +1,140 @@
+// jWorkflow.js
+// (c) 2010 tinyHippos inc.
+// jWorkflow is freely distributable under the terms of the MIT license.
+// Portions of jWorkflow are inspired by Underscore.js
+var jWorkflow = (function () {
+ function _valid(func) {
+ if (typeof(func) !== 'function') {
+ throw "expected function but was " + typeof(func);
+ }
+ }
+
+ function _isWorkflow(func) {
+ return typeof func.andThen === 'function' &&
+ typeof func.start === 'function' &&
+ typeof func.chill === 'function';
+ }
+
+ function _isArray(func) {
+ return !!func.map && !!func.reduce;
+ }
+
+ var transfunctioner = {
+ order: function (func, context) {
+ var _workflow = [],
+ _tasks,
+ _callback = null,
+ _baton = (function () {
+ var _taken = false;
+ return {
+
+ take: function () {
+ _taken = true;
+ },
+
+ pass: function (result) {
+ var task;
+ _taken = false;
+
+ if (_tasks.length) {
+ task = _tasks.shift();
+ result = task.func.apply(task.context, [result, _baton]);
+
+ if (!_taken) {
+ _baton.pass(result);
+ }
+ }
+ else {
+ if (_callback.func) {
+ _callback.func.apply(_callback.context, [result]);
+ }
+ }
+ },
+
+ drop: function (result) {
+ _taken = true;
+ _tasks = [];
+ setTimeout(function () {
+ _baton.pass(result);
+ }, 1);
+ }
+ };
+ }()),
+ _self = {
+
+ andThen: function (func, context) {
+ if (_isWorkflow(func)) {
+ var f = function (prev, baton) {
+ baton.take();
+ func.start({
+ callback: function (result) {
+ baton.pass(result);
+ },
+ context: context,
+ initialValue: prev
+ });
+ };
+ _workflow.push({func: f, context: context});
+ }
+ else if (_isArray(func)) {
+ var orch = function (prev, baton) {
+ baton.take();
+
+ var l = func.length,
+ join = function () {
+ return --l || baton.pass();
+ };
+
+ func.forEach(function (f) {
+ jWorkflow.order(f).start(join);
+ });
+ };
+ _workflow.push({func: orch, context: context});
+ }
+ else {
+ _valid(func);
+ _workflow.push({func: func, context: context});
+ }
+ return _self;
+ },
+
+ chill: function (time) {
+ return _self.andThen(function (prev, baton) {
+ baton.take();
+ setTimeout(function () {
+ baton.pass(prev);
+ }, time);
+ });
+ },
+
+ start: function () {
+ var callback,
+ context,
+ initialValue;
+
+ if (arguments[0] && typeof arguments[0] === 'object') {
+ callback = arguments[0].callback;
+ context = arguments[0].context;
+ initialValue = arguments[0].initialValue;
+ }
+ else {
+ callback = arguments[0];
+ context = arguments[1];
+ }
+
+ _callback = {func: callback, context: context};
+ _tasks = _workflow.slice();
+ _baton.pass(initialValue);
+ }
+ };
+
+ return func ? _self.andThen(func, context) : _self;
+ }
+ };
+
+ return transfunctioner;
+}());
+
+if (typeof module === "object" && typeof require === "function") {
+ module.exports = jWorkflow;
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/package.json b/blackberry10/node_modules/jWorkflow/package.json
new file mode 100644
index 0000000..817ec46
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "jWorkflow",
+ "version": "0.8.0",
+ "description": "dude, wheres my workflow?",
+ "homepage": "https://github.com/tinyhippos/jWorkflow",
+ "author": {
+ "name": "gtanner"
+ },
+ "contributors": [
+ {
+ "name": "Gord Tanner",
+ "email": "gtanner@gmail.com",
+ "url": "http://github.com/gtanner"
+ }
+ ],
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": ""
+ }
+ ],
+ "main": "./lib/jWorkflow",
+ "readme": "# jWorkflow\nDude, where is my workflow?\n\njWorkflow is a workflow engine for JavaScript that provides the ability to\ncreate workflows to chain methods together in an easy to understand syntax:\n\n var fooodOrder = jWorkflow.order(garlicChicken)\n .andThen(whiteRice)\n .andThen(wontonSoup)\n .andThen(cookiesFortune)\n .andThen(noAndThen)\n .andThen(noAndThen)\n .andThen(noAndThen)\n .andThen(noAndThen);\n\n fooodOrder.start();\n\n# Install\n\njWorkflow can be used in node or included in the browser. It can be installed with npm\n\n npm install jWorkflow\n\nand used\n\n var jWorkflow = require(\"jWorkflow\");\n\nor just include jWorkflow.js in your webpage and use window.jWorkflow.\n\n# Usage\n\njWorkflow orders are started with a call to jWorkflow.order:\n
\n function dude() {\n // some of the best code in the world will live here\n }\n\n var order = jWorkflow.order(dude);\n\n // orders can also be started with no initial function\n var pizzacoli = jWorkflow.order();\n\njWorkflow tasks at the root are just functions that will be invoked in the order they are built.\nAny number of tasks can be then appended to the order:\n\n order.andThen(sweet).andThen(dude).andThen(sweet);\n\nThe functions passed into the order will not be invoked until you call:\n\n order.start();\n\nThe context to be used when invoking the functions can be passed in while creating the order:\n\n order.andThen(transfunctioner.photonAcceleratorAnnihilationBeam, transfunctioner);\n\nAn initial value can be passed into the start method to seed the first function:\n\n order.start({\n initialValue: 10\n });\n\n# Passing Values between tasks\n\njWorkflow tasks can access the return value of the previous task with the previous pa
rameter:\n\n function meaningOfLife() {\n //find the meaning of life\n return 42; \n }\n \n function writeBook(previous) {\n console.log(\"the meaning of life is \" + previous);\n }\n\n var guide = jWorkflow.order(meaningOfLife).andThen(writeBook);\n guide.start();\n\n# Handling Async calls\n\nSometimes(probably all the time) you will need to do something async when working with\ntasks, jWorkflow provides the ability to control the execution of the workflow via a\nbaton that is passed to the task\n\n function procrastinate(previous, baton) {\n //take the baton, this means the next task will not run until you pass the baton\n baton.take();\n\n window.setTimeout(function() {\n //do some stuff\n\n //please be nice and always remember to pass the baton!\n baton.pass();\n }, 1000);\n }\n\nIf you want to pass a return value to the next task you can pass it along with the\nbaton.\n\nNO
TE: if you did take the baton, the return value from your function will NOT be passed to \nthe next task:\n\n function awesometown(previous, baton) {\n baton.take();\n\n window.setTimeout(function() {\n \n //do stuff\n \n baton.pass(420); //This value will be passed to the next task\n }, 100);\n\n return 50; // this will NOT be passed to the next function since you took the baton.\n }\n\n\nthe start method provides a callback to execute when the workflow is finished. The final\nreturn value is also passed to the callback:\n\n order.start({\n callback: function(review) {\n console.log(\"dude!, your car is behind that mail truck!\");\n expect(review).toBe(\"two thumbs up\");\n }\n });\n\nyou can also pass context to use for the callback:\n\n order.start({\n callback: function() {\n //do stuff\n }, \n context: transfunctioner\n })
;\n \n# Waiting between tasks\n\nIf you ever need to take a break and reflect on the moment you can add some time(in ms) to chill between tasks:\n\n jWorkflow.order(seeDoubleRainbow)\n .chill(1000)\n .andThen(omg)\n .andThen(omg)\n .andThen(omg)\n .chill(1000)\n .andThen(freakOut);\n\n# Handling Parallel tasks\n\nIf you need to handle some tasks and don't care about when they are done you can pass in an array of functions and / or other workflows to execute\nat the same time.\n\n jWorkflow.order([man, man, halfMan])\n .andThen([jWorkflow.order([guy, guy]).andThen(girl), pizzaPlace]);\n\n# Canceling Workflows\n\nTo cancel the execution of the workflow you can call the drop method on the baton:\n\n function (previous, baton) {\n //the value passed to drop will be passed onto the final callback if it exists\n baton.drop(\"I dropped the soap\");\n //this value will NOT be
passed to the next workflow step\n return 10;\n }\n\nNOTE: This will force the workflow into async mode.\n\n# Contributers:\n\n Gord Tanner <gt...@gmail.com>\n",
+ "readmeFilename": "README.md",
+ "_id": "jWorkflow@0.8.0",
+ "_from": "jWorkflow@0.8.0"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jWorkflow/test/test.html
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jWorkflow/test/test.html b/blackberry10/node_modules/jWorkflow/test/test.html
new file mode 100644
index 0000000..75e581b
--- /dev/null
+++ b/blackberry10/node_modules/jWorkflow/test/test.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <title>jWorkflow Test Suite</title>
+ <link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" />
+ <script type="text/javascript" src="vendor/jquery.js"></script>
+ <script type="text/javascript" src="vendor/qunit.js"></script>
+ <script type="text/javascript" src="../lib/jWorkflow.js"></script>
+ <script type="text/javascript" src="test_jworkflow.js"></script>
+</head>
+ <body>
+ <h1 id="qunit-header">jWorkflow Test Suite</h1>
+ <h2 id="qunit-banner"></h2>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+ </body>
+</html>
[28/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/optparse.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/optparse.js b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/optparse.js
new file mode 100644
index 0000000..0f19ae7
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/coffee-script/lib/coffee-script/optparse.js
@@ -0,0 +1,139 @@
+// Generated by CoffeeScript 1.6.3
+(function() {
+ var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat;
+
+ repeat = require('./helpers').repeat;
+
+ exports.OptionParser = OptionParser = (function() {
+ function OptionParser(rules, banner) {
+ this.banner = banner;
+ this.rules = buildRules(rules);
+ }
+
+ OptionParser.prototype.parse = function(args) {
+ var arg, i, isOption, matchedRule, options, originalArgs, pos, rule, seenNonOptionArg, skippingArgument, value, _i, _j, _len, _len1, _ref;
+ options = {
+ "arguments": []
+ };
+ skippingArgument = false;
+ originalArgs = args;
+ args = normalizeArguments(args);
+ for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) {
+ arg = args[i];
+ if (skippingArgument) {
+ skippingArgument = false;
+ continue;
+ }
+ if (arg === '--') {
+ pos = originalArgs.indexOf('--');
+ options["arguments"] = options["arguments"].concat(originalArgs.slice(pos + 1));
+ break;
+ }
+ isOption = !!(arg.match(LONG_FLAG) || arg.match(SHORT_FLAG));
+ seenNonOptionArg = options["arguments"].length > 0;
+ if (!seenNonOptionArg) {
+ matchedRule = false;
+ _ref = this.rules;
+ for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
+ rule = _ref[_j];
+ if (rule.shortFlag === arg || rule.longFlag === arg) {
+ value = true;
+ if (rule.hasArgument) {
+ skippingArgument = true;
+ value = args[i + 1];
+ }
+ options[rule.name] = rule.isList ? (options[rule.name] || []).concat(value) : value;
+ matchedRule = true;
+ break;
+ }
+ }
+ if (isOption && !matchedRule) {
+ throw new Error("unrecognized option: " + arg);
+ }
+ }
+ if (seenNonOptionArg || !isOption) {
+ options["arguments"].push(arg);
+ }
+ }
+ return options;
+ };
+
+ OptionParser.prototype.help = function() {
+ var letPart, lines, rule, spaces, _i, _len, _ref;
+ lines = [];
+ if (this.banner) {
+ lines.unshift("" + this.banner + "\n");
+ }
+ _ref = this.rules;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ rule = _ref[_i];
+ spaces = 15 - rule.longFlag.length;
+ spaces = spaces > 0 ? repeat(' ', spaces) : '';
+ letPart = rule.shortFlag ? rule.shortFlag + ', ' : ' ';
+ lines.push(' ' + letPart + rule.longFlag + spaces + rule.description);
+ }
+ return "\n" + (lines.join('\n')) + "\n";
+ };
+
+ return OptionParser;
+
+ })();
+
+ LONG_FLAG = /^(--\w[\w\-]*)/;
+
+ SHORT_FLAG = /^(-\w)$/;
+
+ MULTI_FLAG = /^-(\w{2,})/;
+
+ OPTIONAL = /\[(\w+(\*?))\]/;
+
+ buildRules = function(rules) {
+ var tuple, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = rules.length; _i < _len; _i++) {
+ tuple = rules[_i];
+ if (tuple.length < 3) {
+ tuple.unshift(null);
+ }
+ _results.push(buildRule.apply(null, tuple));
+ }
+ return _results;
+ };
+
+ buildRule = function(shortFlag, longFlag, description, options) {
+ var match;
+ if (options == null) {
+ options = {};
+ }
+ match = longFlag.match(OPTIONAL);
+ longFlag = longFlag.match(LONG_FLAG)[1];
+ return {
+ name: longFlag.substr(2),
+ shortFlag: shortFlag,
+ longFlag: longFlag,
+ description: description,
+ hasArgument: !!(match && match[1]),
+ isList: !!(match && match[2])
+ };
+ };
+
+ normalizeArguments = function(args) {
+ var arg, l, match, result, _i, _j, _len, _len1, _ref;
+ args = args.slice(0);
+ result = [];
+ for (_i = 0, _len = args.length; _i < _len; _i++) {
+ arg = args[_i];
+ if (match = arg.match(MULTI_FLAG)) {
+ _ref = match[1].split('');
+ for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) {
+ l = _ref[_j];
+ result.push('-' + l);
+ }
+ } else {
+ result.push(arg);
+ }
+ }
+ return result;
+ };
+
+}).call(this);
[37/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/minimatch.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/minimatch.js b/blackberry10/node_modules/jake/node_modules/minimatch/minimatch.js
new file mode 100644
index 0000000..405746b
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/minimatch.js
@@ -0,0 +1,1079 @@
+;(function (require, exports, module, platform) {
+
+if (module) module.exports = minimatch
+else exports.minimatch = minimatch
+
+if (!require) {
+ require = function (id) {
+ switch (id) {
+ case "sigmund": return function sigmund (obj) {
+ return JSON.stringify(obj)
+ }
+ case "path": return { basename: function (f) {
+ f = f.split(/[\/\\]/)
+ var e = f.pop()
+ if (!e) e = f.pop()
+ return e
+ }}
+ case "lru-cache": return function LRUCache () {
+ // not quite an LRU, but still space-limited.
+ var cache = {}
+ var cnt = 0
+ this.set = function (k, v) {
+ cnt ++
+ if (cnt >= 100) cache = {}
+ cache[k] = v
+ }
+ this.get = function (k) { return cache[k] }
+ }
+ }
+ }
+}
+
+minimatch.Minimatch = Minimatch
+
+var LRU = require("lru-cache")
+ , cache = minimatch.cache = new LRU({max: 100})
+ , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+ , sigmund = require("sigmund")
+
+var path = require("path")
+ // any single thing other than /
+ // don't need to escape / when using new RegExp()
+ , qmark = "[^/]"
+
+ // * => any number of characters
+ , star = qmark + "*?"
+
+ // ** when dots are allowed. Anything goes, except .. and .
+ // not (^ or / followed by one or two dots followed by $ or /),
+ // followed by anything, any number of times.
+ , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
+
+ // not a ^ or / followed by a dot,
+ // followed by anything, any number of times.
+ , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?"
+
+ // characters that need to be escaped in RegExp.
+ , reSpecials = charSet("().*{}+?[]^$\\!")
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split("").reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.monkeyPatch = monkeyPatch
+function monkeyPatch () {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")
+ var orig = desc.value
+ desc.value = function (p) {
+ if (p instanceof Minimatch) return p.match(this)
+ return orig.call(this, p)
+ }
+ Object.defineProperty(String.prototype, desc)
+}
+
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
+
+function ext (a, b) {
+ a = a || {}
+ b = b || {}
+ var t = {}
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ return t
+}
+
+minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return minimatch
+
+ var orig = minimatch
+
+ var m = function minimatch (p, pattern, options) {
+ return orig.minimatch(p, pattern, ext(def, options))
+ }
+
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+
+ return m
+}
+
+Minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return Minimatch
+ return minimatch.defaults(def).Minimatch
+}
+
+
+function minimatch (p, pattern, options) {
+ if (typeof pattern !== "string") {
+ throw new TypeError("glob pattern string required")
+ }
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === "#") {
+ return false
+ }
+
+ // "" only matches ""
+ if (pattern.trim() === "") return p === ""
+
+ return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options, cache)
+ }
+
+ if (typeof pattern !== "string") {
+ throw new TypeError("glob pattern string required")
+ }
+
+ if (!options) options = {}
+ pattern = pattern.trim()
+
+ // windows: need to use /, not \
+ // On other platforms, \ is a valid (albeit bad) filename char.
+ if (platform === "win32") {
+ pattern = pattern.split("\\").join("/")
+ }
+
+ // lru storage.
+ // these things aren't particularly big, but walking down the string
+ // and turning it into a regexp can get pretty costly.
+ var cacheKey = pattern + "\n" + sigmund(options)
+ var cached = minimatch.cache.get(cacheKey)
+ if (cached) return cached
+ minimatch.cache.set(cacheKey, this)
+
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+
+ // make the set of regexps etc.
+ this.make()
+}
+
+Minimatch.prototype.make = make
+function make () {
+ // don't do it more than once.
+ if (this._made) return
+
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === "#") {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) console.error(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ if (options.debug) console.error(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ if (options.debug) console.error(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return -1 === s.indexOf(false)
+ })
+
+ if (options.debug) console.error(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ , negate = false
+ , options = this.options
+ , negateOffset = 0
+
+ if (options.nonegate) return
+
+ for ( var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === "!"
+ ; i ++) {
+ negate = !negate
+ negateOffset ++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return new Minimatch(pattern, options).braceExpand()
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+function braceExpand (pattern, options) {
+ options = options || this.options
+ pattern = typeof pattern === "undefined"
+ ? this.pattern : pattern
+
+ if (typeof pattern === "undefined") {
+ throw new Error("undefined pattern")
+ }
+
+ if (options.nobrace ||
+ !pattern.match(/\{.*\}/)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ var escaping = false
+
+ // examples and comments refer to this crazy pattern:
+ // a{b,c{d,e},{f,g}h}x{y,z}
+ // expected:
+ // abxy
+ // abxz
+ // acdxy
+ // acdxz
+ // acexy
+ // acexz
+ // afhxy
+ // afhxz
+ // aghxy
+ // aghxz
+
+ // everything before the first \{ is just a prefix.
+ // So, we pluck that off, and work with the rest,
+ // and then prepend it to everything we find.
+ if (pattern.charAt(0) !== "{") {
+ // console.error(pattern)
+ var prefix = null
+ for (var i = 0, l = pattern.length; i < l; i ++) {
+ var c = pattern.charAt(i)
+ // console.error(i, c)
+ if (c === "\\") {
+ escaping = !escaping
+ } else if (c === "{" && !escaping) {
+ prefix = pattern.substr(0, i)
+ break
+ }
+ }
+
+ // actually no sets, all { were escaped.
+ if (prefix === null) {
+ // console.error("no sets")
+ return [pattern]
+ }
+
+ var tail = braceExpand(pattern.substr(i), options)
+ return tail.map(function (t) {
+ return prefix + t
+ })
+ }
+
+ // now we have something like:
+ // {b,c{d,e},{f,g}h}x{y,z}
+ // walk through the set, expanding each part, until
+ // the set ends. then, we'll expand the suffix.
+ // If the set only has a single member, then'll put the {} back
+
+ // first, handle numeric sets, since they're easier
+ var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
+ if (numset) {
+ // console.error("numset", numset[1], numset[2])
+ var suf = braceExpand(pattern.substr(numset[0].length), options)
+ , start = +numset[1]
+ , end = +numset[2]
+ , inc = start > end ? -1 : 1
+ , set = []
+ for (var i = start; i != (end + inc); i += inc) {
+ // append all the suffixes
+ for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+ set.push(i + suf[ii])
+ }
+ }
+ return set
+ }
+
+ // ok, walk through the set
+ // We hope, somewhat optimistically, that there
+ // will be a } at the end.
+ // If the closing brace isn't found, then the pattern is
+ // interpreted as braceExpand("\\" + pattern) so that
+ // the leading \{ will be interpreted literally.
+ var i = 1 // skip the \{
+ , depth = 1
+ , set = []
+ , member = ""
+ , sawEnd = false
+ , escaping = false
+
+ function addMember () {
+ set.push(member)
+ member = ""
+ }
+
+ // console.error("Entering for")
+ FOR: for (i = 1, l = pattern.length; i < l; i ++) {
+ var c = pattern.charAt(i)
+ // console.error("", i, c)
+
+ if (escaping) {
+ escaping = false
+ member += "\\" + c
+ } else {
+ switch (c) {
+ case "\\":
+ escaping = true
+ continue
+
+ case "{":
+ depth ++
+ member += "{"
+ continue
+
+ case "}":
+ depth --
+ // if this closes the actual set, then we're done
+ if (depth === 0) {
+ addMember()
+ // pluck off the close-brace
+ i ++
+ break FOR
+ } else {
+ member += c
+ continue
+ }
+
+ case ",":
+ if (depth === 1) {
+ addMember()
+ } else {
+ member += c
+ }
+ continue
+
+ default:
+ member += c
+ continue
+ } // switch
+ } // else
+ } // for
+
+ // now we've either finished the set, and the suffix is
+ // pattern.substr(i), or we have *not* closed the set,
+ // and need to escape the leading brace
+ if (depth !== 0) {
+ // console.error("didn't close", pattern)
+ return braceExpand("\\" + pattern, options)
+ }
+
+ // x{y,z} -> ["xy", "xz"]
+ // console.error("set", set)
+ // console.error("suffix", pattern.substr(i))
+ var suf = braceExpand(pattern.substr(i), options)
+ // ["b", "c{d,e}","{f,g}h"] ->
+ // [["b"], ["cd", "ce"], ["fh", "gh"]]
+ var addBraces = set.length === 1
+ // console.error("set pre-expanded", set)
+ set = set.map(function (p) {
+ return braceExpand(p, options)
+ })
+ // console.error("set expanded", set)
+
+
+ // [["b"], ["cd", "ce"], ["fh", "gh"]] ->
+ // ["b", "cd", "ce", "fh", "gh"]
+ set = set.reduce(function (l, r) {
+ return l.concat(r)
+ })
+
+ if (addBraces) {
+ set = set.map(function (s) {
+ return "{" + s + "}"
+ })
+ }
+
+ // now attach the suffixes.
+ var ret = []
+ for (var i = 0, l = set.length; i < l; i ++) {
+ for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+ ret.push(set[i] + suf[ii])
+ }
+ }
+ return ret
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ var options = this.options
+
+ // shortcuts
+ if (!options.noglobstar && pattern === "**") return GLOBSTAR
+ if (pattern === "") return ""
+
+ var re = ""
+ , hasMagic = !!options.nocase
+ , escaping = false
+ // ? => one single character
+ , patternListStack = []
+ , plType
+ , stateChar
+ , inClass = false
+ , reClassStart = -1
+ , classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ , patternStart = pattern.charAt(0) === "." ? "" // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
+ : "(?!\\.)"
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case "*":
+ re += star
+ hasMagic = true
+ break
+ case "?":
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += "\\"+stateChar
+ break
+ }
+ stateChar = false
+ }
+ }
+
+ for ( var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i ++ ) {
+
+ if (options.debug) {
+ console.error("%s\t%s %s %j", pattern, i, re, c)
+ }
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += "\\" + c
+ escaping = false
+ continue
+ }
+
+ SWITCH: switch (c) {
+ case "/":
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+
+ case "\\":
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case "?":
+ case "*":
+ case "+":
+ case "@":
+ case "!":
+ if (options.debug) {
+ console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
+ }
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ if (c === "!" && i === classStart + 1) c = "^"
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case "(":
+ if (inClass) {
+ re += "("
+ continue
+ }
+
+ if (!stateChar) {
+ re += "\\("
+ continue
+ }
+
+ plType = stateChar
+ patternListStack.push({ type: plType
+ , start: i - 1
+ , reStart: re.length })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === "!" ? "(?:(?!" : "(?:"
+ stateChar = false
+ continue
+
+ case ")":
+ if (inClass || !patternListStack.length) {
+ re += "\\)"
+ continue
+ }
+
+ hasMagic = true
+ re += ")"
+ plType = patternListStack.pop().type
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:<pattern>)<type>
+ switch (plType) {
+ case "!":
+ re += "[^/]*?)"
+ break
+ case "?":
+ case "+":
+ case "*": re += plType
+ case "@": break // the default anyway
+ }
+ continue
+
+ case "|":
+ if (inClass || !patternListStack.length || escaping) {
+ re += "\\|"
+ escaping = false
+ continue
+ }
+
+ re += "|"
+ continue
+
+ // these are mostly the same in regexp and glob
+ case "[":
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += "\\" + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case "]":
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += "\\" + c
+ escaping = false
+ continue
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === "^" && inClass)) {
+ re += "\\"
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ var cs = pattern.substr(classStart + 1)
+ , sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + "\\[" + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ var pl
+ while (pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + 3)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = "\\"
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + "|"
+ })
+
+ // console.error("tail=%j\n %s", tail, tail)
+ var t = pl.type === "*" ? star
+ : pl.type === "?" ? qmark
+ : "\\" + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart)
+ + t + "\\("
+ + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += "\\\\"
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case ".":
+ case "[":
+ case "(": addPatternStart = true
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== "" && hasMagic) re = "(?=.)" + re
+
+ if (addPatternStart) re = patternStart + re
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [ re, hasMagic ]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? "i" : ""
+ , regExp = new RegExp("^" + re + "$", flags)
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) return this.regexp = false
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ , flags = options.nocase ? "i" : ""
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === "string") ? regExpEscape(p)
+ : p._src
+ }).join("\\\/")
+ }).join("|")
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = "^(?:" + re + ")$"
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = "^(?!" + re + ").*$"
+
+ try {
+ return this.regexp = new RegExp(re, flags)
+ } catch (ex) {
+ return this.regexp = false
+ }
+}
+
+minimatch.match = function (list, pattern, options) {
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+ // console.error("match", f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ""
+
+ if (f === "/" && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ // On other platforms, \ is a valid (albeit bad) filename char.
+ if (platform === "win32") {
+ f = f.split("\\").join("/")
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ if (options.debug) {
+ console.error(this.pattern, "split", f)
+ }
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ // console.error(this.pattern, "set", set)
+
+ for (var i = 0, l = set.length; i < l; i ++) {
+ var pattern = set[i]
+ var hit = this.matchOne(f, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ if (options.debug) {
+ console.error("matchOne",
+ { "this": this
+ , file: file
+ , pattern: pattern })
+ }
+
+ if (options.matchBase && pattern.length === 1) {
+ file = path.basename(file.join("/")).split("/")
+ }
+
+ if (options.debug) {
+ console.error("matchOne", file.length, pattern.length)
+ }
+
+ for ( var fi = 0
+ , pi = 0
+ , fl = file.length
+ , pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi ++, pi ++ ) {
+
+ if (options.debug) {
+ console.error("matchOne loop")
+ }
+ var p = pattern[pi]
+ , f = file[fi]
+
+ if (options.debug) {
+ console.error(pattern, p, f)
+ }
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ if (options.debug)
+ console.error('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ , pr = pi + 1
+ if (pr === pl) {
+ if (options.debug)
+ console.error('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for ( ; fi < fl; fi ++) {
+ if (file[fi] === "." || file[fi] === ".." ||
+ (!options.dot && file[fi].charAt(0) === ".")) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ WHILE: while (fr < fl) {
+ var swallowee = file[fr]
+
+ if (options.debug) {
+ console.error('\nglobstar while',
+ file, fr, pattern, pr, swallowee)
+ }
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ if (options.debug)
+ console.error('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === "." || swallowee === ".." ||
+ (!options.dot && swallowee.charAt(0) === ".")) {
+ if (options.debug)
+ console.error("dot detected!", file, fr, pattern, pr)
+ break WHILE
+ }
+
+ // ** swallows a segment, and continue.
+ if (options.debug)
+ console.error('globstar swallow a segment, and continue')
+ fr ++
+ }
+ }
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ if (partial) {
+ // ran out of file
+ // console.error("\n>>> no match, partial?", file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === "string") {
+ if (options.nocase) {
+ hit = f.toLowerCase() === p.toLowerCase()
+ } else {
+ hit = f === p
+ }
+ if (options.debug) {
+ console.error("string match", p, f, hit)
+ }
+ } else {
+ hit = f.match(p)
+ if (options.debug) {
+ console.error("pattern match", p, f, hit)
+ }
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ var emptyFileEnd = (fi === fl - 1) && (file[fi] === "")
+ return emptyFileEnd
+ }
+
+ // should be unreachable.
+ throw new Error("wtf?")
+}
+
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, "$1")
+}
+
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
+}
+
+})( typeof require === "function" ? require : null,
+ this,
+ typeof module === "object" ? module : null,
+ typeof process === "object" ? process.platform : "win32"
+ )
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/.npmignore b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/.npmignore
new file mode 100644
index 0000000..07e6e47
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/.npmignore
@@ -0,0 +1 @@
+/node_modules
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/AUTHORS
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/AUTHORS b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/AUTHORS
new file mode 100644
index 0000000..016d7fb
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/AUTHORS
@@ -0,0 +1,8 @@
+# Authors, sorted by whether or not they are me
+Isaac Z. Schlueter <i...@izs.me>
+Carlos Brito Lage <ca...@carloslage.net>
+Marko Mikulicic <ma...@isti.cnr.it>
+Trent Mick <tr...@gmail.com>
+Kevin O'Hara <ke...@gmail.com>
+Marco Rogers <ma...@gmail.com>
+Jesse Dailey <je...@gmail.com>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/LICENSE b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/README.md b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/README.md
new file mode 100644
index 0000000..03ee0f9
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/README.md
@@ -0,0 +1,97 @@
+# lru cache
+
+A cache object that deletes the least-recently-used items.
+
+## Usage:
+
+```javascript
+var LRU = require("lru-cache")
+ , options = { max: 500
+ , length: function (n) { return n * 2 }
+ , dispose: function (key, n) { n.close() }
+ , maxAge: 1000 * 60 * 60 }
+ , cache = LRU(options)
+ , otherCache = LRU(50) // sets just the max size
+
+cache.set("key", "value")
+cache.get("key") // "value"
+
+cache.reset() // empty the cache
+```
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
+## Options
+
+* `max` The maximum size of the cache, checked by applying the length
+ function to all values in the cache. Not setting this is kind of
+ silly, since that's the whole purpose of this lib, but it defaults
+ to `Infinity`.
+* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
+ as they age, but if you try to get an item that is too old, it'll
+ drop it and return undefined instead of giving it to you.
+* `length` Function that is used to calculate the length of stored
+ items. If you're storing strings or buffers, then you probably want
+ to do something like `function(n){return n.length}`. The default is
+ `function(n){return 1}`, which is fine if you want to store `n`
+ like-sized things.
+* `dispose` Function that is called on items when they are dropped
+ from the cache. This can be handy if you want to close file
+ descriptors or do other cleanup tasks when items are no longer
+ accessible. Called with `key, value`. It's called *before*
+ actually removing the item from the internal cache, so if you want
+ to immediately put it back in, you'll have to do that in a
+ `nextTick` or `setTimeout` callback or it won't do anything.
+* `stale` By default, if you set a `maxAge`, it'll only actually pull
+ stale items out of the cache when you `get(key)`. (That is, it's
+ not pre-emptively doing a `setTimeout` or anything.) If you set
+ `stale:true`, it'll return the stale value before deleting it. If
+ you don't set this, then it'll return `undefined` when you try to
+ get a stale entry, as if it had already been deleted.
+
+## API
+
+* `set(key, value)`
+* `get(key) => value`
+
+ Both of these will update the "recently used"-ness of the key.
+ They do what you think.
+
+* `peek(key)`
+
+ Returns the key value (or `undefined` if not found) without
+ updating the "recently used"-ness of the key.
+
+ (If you find yourself using this a lot, you *might* be using the
+ wrong sort of data structure, but there are some use cases where
+ it's handy.)
+
+* `del(key)`
+
+ Deletes a key out of the cache.
+
+* `reset()`
+
+ Clear the cache entirely, throwing away all values.
+
+* `has(key)`
+
+ Check if a key is in the cache, without updating the recent-ness
+ or deleting it for being stale.
+
+* `forEach(function(value,key,cache), [thisp])`
+
+ Just like `Array.prototype.forEach`. Iterates over all the keys
+ in the cache, in order of recent-ness. (Ie, more recently used
+ items are iterated over first.)
+
+* `keys()`
+
+ Return an array of the keys in the cache.
+
+* `values()`
+
+ Return an array of the values in the cache.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
new file mode 100644
index 0000000..8c80853
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
@@ -0,0 +1,257 @@
+;(function () { // closure for web browsers
+
+if (typeof module === 'object' && module.exports) {
+ module.exports = LRUCache
+} else {
+ // just set the global for non-node platforms.
+ this.LRUCache = LRUCache
+}
+
+function hOP (obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key)
+}
+
+function naiveLength () { return 1 }
+
+function LRUCache (options) {
+ if (!(this instanceof LRUCache)) {
+ return new LRUCache(options)
+ }
+
+ var max
+ if (typeof options === 'number') {
+ max = options
+ options = { max: max }
+ }
+
+ if (!options) options = {}
+
+ max = options.max
+
+ var lengthCalculator = options.length || naiveLength
+
+ if (typeof lengthCalculator !== "function") {
+ lengthCalculator = naiveLength
+ }
+
+ if (!max || !(typeof max === "number") || max <= 0 ) {
+ // a little bit silly. maybe this should throw?
+ max = Infinity
+ }
+
+ var allowStale = options.stale || false
+
+ var maxAge = options.maxAge || null
+
+ var dispose = options.dispose
+
+ var cache = Object.create(null) // hash of items by key
+ , lruList = Object.create(null) // list of items in order of use recency
+ , mru = 0 // most recently used
+ , lru = 0 // least recently used
+ , length = 0 // number of items in the list
+ , itemCount = 0
+
+
+ // resize the cache when the max changes.
+ Object.defineProperty(this, "max",
+ { set : function (mL) {
+ if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity
+ max = mL
+ // if it gets above double max, trim right away.
+ // otherwise, do it whenever it's convenient.
+ if (length > max) trim()
+ }
+ , get : function () { return max }
+ , enumerable : true
+ })
+
+ // resize the cache when the lengthCalculator changes.
+ Object.defineProperty(this, "lengthCalculator",
+ { set : function (lC) {
+ if (typeof lC !== "function") {
+ lengthCalculator = naiveLength
+ length = itemCount
+ for (var key in cache) {
+ cache[key].length = 1
+ }
+ } else {
+ lengthCalculator = lC
+ length = 0
+ for (var key in cache) {
+ cache[key].length = lengthCalculator(cache[key].value)
+ length += cache[key].length
+ }
+ }
+
+ if (length > max) trim()
+ }
+ , get : function () { return lengthCalculator }
+ , enumerable : true
+ })
+
+ Object.defineProperty(this, "length",
+ { get : function () { return length }
+ , enumerable : true
+ })
+
+
+ Object.defineProperty(this, "itemCount",
+ { get : function () { return itemCount }
+ , enumerable : true
+ })
+
+ this.forEach = function (fn, thisp) {
+ thisp = thisp || this
+ var i = 0;
+ for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) {
+ i++
+ var hit = lruList[k]
+ fn.call(thisp, hit.value, hit.key, this)
+ }
+ }
+
+ this.keys = function () {
+ var keys = new Array(itemCount)
+ var i = 0
+ for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) {
+ var hit = lruList[k]
+ keys[i++] = hit.key
+ }
+ return keys
+ }
+
+ this.values = function () {
+ var values = new Array(itemCount)
+ var i = 0
+ for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) {
+ var hit = lruList[k]
+ values[i++] = hit.value
+ }
+ return values
+ }
+
+ this.reset = function () {
+ if (dispose) {
+ for (var k in cache) {
+ dispose(k, cache[k].value)
+ }
+ }
+ cache = {}
+ lruList = {}
+ lru = 0
+ mru = 0
+ length = 0
+ itemCount = 0
+ }
+
+ // Provided for debugging/dev purposes only. No promises whatsoever that
+ // this API stays stable.
+ this.dump = function () {
+ return cache
+ }
+
+ this.dumpLru = function () {
+ return lruList
+ }
+
+ this.set = function (key, value) {
+ if (hOP(cache, key)) {
+ // dispose of the old one before overwriting
+ if (dispose) dispose(key, cache[key].value)
+ if (maxAge) cache[key].now = Date.now()
+ cache[key].value = value
+ this.get(key)
+ return true
+ }
+
+ var len = lengthCalculator(value)
+ var age = maxAge ? Date.now() : 0
+ var hit = new Entry(key, value, mru++, len, age)
+
+ // oversized objects fall out of cache automatically.
+ if (hit.length > max) {
+ if (dispose) dispose(key, value)
+ return false
+ }
+
+ length += hit.length
+ lruList[hit.lu] = cache[key] = hit
+ itemCount ++
+
+ if (length > max) trim()
+ return true
+ }
+
+ this.has = function (key) {
+ if (!hOP(cache, key)) return false
+ var hit = cache[key]
+ if (maxAge && (Date.now() - hit.now > maxAge)) {
+ return false
+ }
+ return true
+ }
+
+ this.get = function (key) {
+ return get(key, true)
+ }
+
+ this.peek = function (key) {
+ return get(key, false)
+ }
+
+ function get (key, doUse) {
+ var hit = cache[key]
+ if (hit) {
+ if (maxAge && (Date.now() - hit.now > maxAge)) {
+ del(hit)
+ if (!allowStale) hit = undefined
+ } else {
+ if (doUse) use(hit)
+ }
+ if (hit) hit = hit.value
+ }
+ return hit
+ }
+
+ function use (hit) {
+ shiftLU(hit)
+ hit.lu = mru ++
+ lruList[hit.lu] = hit
+ }
+
+ this.del = function (key) {
+ del(cache[key])
+ }
+
+ function trim () {
+ while (lru < mru && length > max)
+ del(lruList[lru])
+ }
+
+ function shiftLU(hit) {
+ delete lruList[ hit.lu ]
+ while (lru < mru && !lruList[lru]) lru ++
+ }
+
+ function del(hit) {
+ if (hit) {
+ if (dispose) dispose(hit.key, hit.value)
+ length -= hit.length
+ itemCount --
+ delete cache[ hit.key ]
+ shiftLU(hit)
+ }
+ }
+}
+
+// classy, since V8 prefers predictable objects.
+function Entry (key, value, mru, len, age) {
+ this.key = key
+ this.value = value
+ this.lu = mru
+ this.length = len
+ this.now = age
+}
+
+})()
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/package.json b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/package.json
new file mode 100644
index 0000000..73920bf
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "lru-cache",
+ "description": "A cache object that deletes the least-recently-used items.",
+ "version": "2.3.0",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ "scripts": {
+ "test": "tap test --gc"
+ },
+ "main": "lib/lru-cache.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-lru-cache.git"
+ },
+ "devDependencies": {
+ "tap": "",
+ "weak": ""
+ },
+ "license": {
+ "type": "MIT",
+ "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
+ },
+ "contributors": [
+ {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "Carlos Brito Lage",
+ "email": "carlos@carloslage.net"
+ },
+ {
+ "name": "Marko Mikulicic",
+ "email": "marko.mikulicic@isti.cnr.it"
+ },
+ {
+ "name": "Trent Mick",
+ "email": "trentm@gmail.com"
+ },
+ {
+ "name": "Kevin O'Hara",
+ "email": "kevinohara80@gmail.com"
+ },
+ {
+ "name": "Marco Rogers",
+ "email": "marco.rogers@gmail.com"
+ },
+ {
+ "name": "Jesse Dailey",
+ "email": "jesse.dailey@gmail.com"
+ }
+ ],
+ "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if yo
u try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is
, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(func
tion(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-lru-cache/issues"
+ },
+ "_id": "lru-cache@2.3.0",
+ "_from": "lru-cache@2"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/s.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/s.js b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/s.js
new file mode 100644
index 0000000..c2a9e54
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/s.js
@@ -0,0 +1,25 @@
+var LRU = require('lru-cache');
+
+var max = +process.argv[2] || 10240;
+var more = 1024;
+
+var cache = LRU({
+ max: max, maxAge: 86400e3
+});
+
+// fill cache
+for (var i = 0; i < max; ++i) {
+ cache.set(i, {});
+}
+
+var start = process.hrtime();
+
+// adding more items
+for ( ; i < max+more; ++i) {
+ cache.set(i, {});
+}
+
+var end = process.hrtime(start);
+var msecs = end[0] * 1E3 + end[1] / 1E6;
+
+console.log('adding %d items took %d ms', more, msecs.toPrecision(5));
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/basic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/basic.js
new file mode 100644
index 0000000..70f3f8b
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/basic.js
@@ -0,0 +1,329 @@
+var test = require("tap").test
+ , LRU = require("../")
+
+test("basic", function (t) {
+ var cache = new LRU({max: 10})
+ cache.set("key", "value")
+ t.equal(cache.get("key"), "value")
+ t.equal(cache.get("nada"), undefined)
+ t.equal(cache.length, 1)
+ t.equal(cache.max, 10)
+ t.end()
+})
+
+test("least recently set", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("lru recently gotten", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.get("a")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("a"), "A")
+ t.end()
+})
+
+test("del", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.del("a")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("max", function (t) {
+ var cache = new LRU(3)
+
+ // test changing the max, verify that the LRU items get dropped.
+ cache.max = 100
+ for (var i = 0; i < 100; i ++) cache.set(i, i)
+ t.equal(cache.length, 100)
+ for (var i = 0; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ cache.max = 3
+ t.equal(cache.length, 3)
+ for (var i = 0; i < 97; i ++) {
+ t.equal(cache.get(i), undefined)
+ }
+ for (var i = 98; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+
+ // now remove the max restriction, and try again.
+ cache.max = "hello"
+ for (var i = 0; i < 100; i ++) cache.set(i, i)
+ t.equal(cache.length, 100)
+ for (var i = 0; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ // should trigger an immediate resize
+ cache.max = 3
+ t.equal(cache.length, 3)
+ for (var i = 0; i < 97; i ++) {
+ t.equal(cache.get(i), undefined)
+ }
+ for (var i = 98; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ t.end()
+})
+
+test("reset", function (t) {
+ var cache = new LRU(10)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.reset()
+ t.equal(cache.length, 0)
+ t.equal(cache.max, 10)
+ t.equal(cache.get("a"), undefined)
+ t.equal(cache.get("b"), undefined)
+ t.end()
+})
+
+
+// Note: `<cache>.dump()` is a debugging tool only. No guarantees are made
+// about the format/layout of the response.
+test("dump", function (t) {
+ var cache = new LRU(10)
+ var d = cache.dump();
+ t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache")
+ cache.set("a", "A")
+ var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } }
+ t.ok(d.a)
+ t.equal(d.a.key, "a")
+ t.equal(d.a.value, "A")
+ t.equal(d.a.lu, 0)
+
+ cache.set("b", "B")
+ cache.get("b")
+ d = cache.dump()
+ t.ok(d.b)
+ t.equal(d.b.key, "b")
+ t.equal(d.b.value, "B")
+ t.equal(d.b.lu, 2)
+
+ t.end()
+})
+
+
+test("basic with weighed length", function (t) {
+ var cache = new LRU({
+ max: 100,
+ length: function (item) { return item.size }
+ })
+ cache.set("key", {val: "value", size: 50})
+ t.equal(cache.get("key").val, "value")
+ t.equal(cache.get("nada"), undefined)
+ t.equal(cache.lengthCalculator(cache.get("key")), 50)
+ t.equal(cache.length, 50)
+ t.equal(cache.max, 100)
+ t.end()
+})
+
+
+test("weighed length item too large", function (t) {
+ var cache = new LRU({
+ max: 10,
+ length: function (item) { return item.size }
+ })
+ t.equal(cache.max, 10)
+
+ // should fall out immediately
+ cache.set("key", {val: "value", size: 50})
+
+ t.equal(cache.length, 0)
+ t.equal(cache.get("key"), undefined)
+ t.end()
+})
+
+test("least recently set with weighed length", function (t) {
+ var cache = new LRU({
+ max:8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ cache.set("d", "DDDD")
+ t.equal(cache.get("d"), "DDDD")
+ t.equal(cache.get("c"), "CCC")
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("lru recently gotten with weighed length", function (t) {
+ var cache = new LRU({
+ max: 8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ cache.get("a")
+ cache.get("b")
+ cache.set("d", "DDDD")
+ t.equal(cache.get("c"), undefined)
+ t.equal(cache.get("d"), "DDDD")
+ t.equal(cache.get("b"), "BB")
+ t.equal(cache.get("a"), "A")
+ t.end()
+})
+
+test("set returns proper booleans", function(t) {
+ var cache = new LRU({
+ max: 5,
+ length: function (item) { return item.length }
+ })
+
+ t.equal(cache.set("a", "A"), true)
+
+ // should return false for max exceeded
+ t.equal(cache.set("b", "donuts"), false)
+
+ t.equal(cache.set("b", "B"), true)
+ t.equal(cache.set("c", "CCCC"), true)
+ t.end()
+})
+
+test("drop the old items", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 50
+ })
+
+ cache.set("a", "A")
+
+ setTimeout(function () {
+ cache.set("b", "b")
+ t.equal(cache.get("a"), "A")
+ }, 25)
+
+ setTimeout(function () {
+ cache.set("c", "C")
+ // timed out
+ t.notOk(cache.get("a"))
+ }, 60)
+
+ setTimeout(function () {
+ t.notOk(cache.get("b"))
+ t.equal(cache.get("c"), "C")
+ }, 90)
+
+ setTimeout(function () {
+ t.notOk(cache.get("c"))
+ t.end()
+ }, 155)
+})
+
+test("disposal function", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+
+ cache.set(1, 1)
+ cache.set(2, 2)
+ t.equal(disposed, 1)
+ cache.set(3, 3)
+ t.equal(disposed, 2)
+ cache.reset()
+ t.equal(disposed, 3)
+ t.end()
+})
+
+test("disposal function on too big of item", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ length: function (k) {
+ return k.length
+ },
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+ var obj = [ 1, 2 ]
+
+ t.equal(disposed, false)
+ cache.set("obj", obj)
+ t.equal(disposed, obj)
+ t.end()
+})
+
+test("has()", function(t) {
+ var cache = new LRU({
+ max: 1,
+ maxAge: 10
+ })
+
+ cache.set('foo', 'bar')
+ t.equal(cache.has('foo'), true)
+ cache.set('blu', 'baz')
+ t.equal(cache.has('foo'), false)
+ t.equal(cache.has('blu'), true)
+ setTimeout(function() {
+ t.equal(cache.has('blu'), false)
+ t.end()
+ }, 15)
+})
+
+test("stale", function(t) {
+ var cache = new LRU({
+ maxAge: 10,
+ stale: true
+ })
+
+ cache.set('foo', 'bar')
+ t.equal(cache.get('foo'), 'bar')
+ t.equal(cache.has('foo'), true)
+ setTimeout(function() {
+ t.equal(cache.has('foo'), false)
+ t.equal(cache.get('foo'), 'bar')
+ t.equal(cache.get('foo'), undefined)
+ t.end()
+ }, 15)
+})
+
+test("lru update via set", function(t) {
+ var cache = LRU({ max: 2 });
+
+ cache.set('foo', 1);
+ cache.set('bar', 2);
+ cache.del('bar');
+ cache.set('baz', 3);
+ cache.set('qux', 4);
+
+ t.equal(cache.get('foo'), undefined)
+ t.equal(cache.get('bar'), undefined)
+ t.equal(cache.get('baz'), 3)
+ t.equal(cache.get('qux'), 4)
+ t.end()
+})
+
+test("least recently set w/ peek", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ t.equal(cache.peek("a"), "A")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
new file mode 100644
index 0000000..eefb80d
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
@@ -0,0 +1,52 @@
+var test = require('tap').test
+var LRU = require('../')
+
+test('forEach', function (t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 9
+ l.forEach(function (val, key, cache) {
+ t.equal(cache, l)
+ t.equal(key, i.toString())
+ t.equal(val, i.toString(2))
+ i -= 1
+ })
+
+ // get in order of most recently used
+ l.get(6)
+ l.get(8)
+
+ var order = [ 8, 6, 9, 7, 5 ]
+ var i = 0
+
+ l.forEach(function (val, key, cache) {
+ var j = order[i ++]
+ t.equal(cache, l)
+ t.equal(key, j.toString())
+ t.equal(val, j.toString(2))
+ })
+
+ t.end()
+})
+
+test('keys() and values()', function (t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ t.similar(l.keys(), ['9', '8', '7', '6', '5'])
+ t.similar(l.values(), ['1001', '1000', '111', '110', '101'])
+
+ // get in order of most recently used
+ l.get(6)
+ l.get(8)
+
+ t.similar(l.keys(), ['8', '6', '9', '7', '5'])
+ t.similar(l.values(), ['1000', '110', '1001', '111', '101'])
+
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
new file mode 100644
index 0000000..7af45b0
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
@@ -0,0 +1,50 @@
+#!/usr/bin/env node --expose_gc
+
+var weak = require('weak');
+var test = require('tap').test
+var LRU = require('../')
+var l = new LRU({ max: 10 })
+var refs = 0
+function X() {
+ refs ++
+ weak(this, deref)
+}
+
+function deref() {
+ refs --
+}
+
+test('no leaks', function (t) {
+ // fill up the cache
+ for (var i = 0; i < 100; i++) {
+ l.set(i, new X);
+ // throw some gets in there, too.
+ if (i % 2 === 0)
+ l.get(i / 2)
+ }
+
+ gc()
+
+ var start = process.memoryUsage()
+
+ // capture the memory
+ var startRefs = refs
+
+ // do it again, but more
+ for (var i = 0; i < 10000; i++) {
+ l.set(i, new X);
+ // throw some gets in there, too.
+ if (i % 2 === 0)
+ l.get(i / 2)
+ }
+
+ gc()
+
+ var end = process.memoryUsage()
+ t.equal(refs, startRefs, 'no leaky refs')
+
+ console.error('start: %j\n' +
+ 'end: %j', start, end);
+ t.pass();
+ t.end();
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/LICENSE b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/LICENSE
new file mode 100644
index 0000000..0c44ae7
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. 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.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR CONTRIBUTORS
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/README.md b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/README.md
new file mode 100644
index 0000000..7e36512
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/README.md
@@ -0,0 +1,53 @@
+# sigmund
+
+Quick and dirty signatures for Objects.
+
+This is like a much faster `deepEquals` comparison, which returns a
+string key suitable for caches and the like.
+
+## Usage
+
+```javascript
+function doSomething (someObj) {
+ var key = sigmund(someObj, maxDepth) // max depth defaults to 10
+ var cached = cache.get(key)
+ if (cached) return cached)
+
+ var result = expensiveCalculation(someObj)
+ cache.set(key, result)
+ return result
+}
+```
+
+The resulting key will be as unique and reproducible as calling
+`JSON.stringify` or `util.inspect` on the object, but is much faster.
+In order to achieve this speed, some differences are glossed over.
+For example, the object `{0:'foo'}` will be treated identically to the
+array `['foo']`.
+
+Also, just as there is no way to summon the soul from the scribblings
+of a cocain-addled psychoanalyst, there is no way to revive the object
+from the signature string that sigmund gives you. In fact, it's
+barely even readable.
+
+As with `sys.inspect` and `JSON.stringify`, larger objects will
+produce larger signature strings.
+
+Because sigmund is a bit less strict than the more thorough
+alternatives, the strings will be shorter, and also there is a
+slightly higher chance for collisions. For example, these objects
+have the same signature:
+
+ var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
+ var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
+
+Like a good Freudian, sigmund is most effective when you already have
+some understanding of what you're looking for. It can help you help
+yourself, but you must be willing to do some work as well.
+
+Cycles are handled, and cyclical objects are silently omitted (though
+the key is included in the signature output.)
+
+The second argument is the maximum depth, which defaults to 10,
+because that is the maximum object traversal depth covered by most
+insurance carriers.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/bench.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/bench.js b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/bench.js
new file mode 100644
index 0000000..5acfd6d
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/bench.js
@@ -0,0 +1,283 @@
+// different ways to id objects
+// use a req/res pair, since it's crazy deep and cyclical
+
+// sparseFE10 and sigmund are usually pretty close, which is to be expected,
+// since they are essentially the same algorithm, except that sigmund handles
+// regular expression objects properly.
+
+
+var http = require('http')
+var util = require('util')
+var sigmund = require('./sigmund.js')
+var sreq, sres, creq, cres, test
+
+http.createServer(function (q, s) {
+ sreq = q
+ sres = s
+ sres.end('ok')
+ this.close(function () { setTimeout(function () {
+ start()
+ }, 200) })
+}).listen(1337, function () {
+ creq = http.get({ port: 1337 })
+ creq.on('response', function (s) { cres = s })
+})
+
+function start () {
+ test = [sreq, sres, creq, cres]
+ // test = sreq
+ // sreq.sres = sres
+ // sreq.creq = creq
+ // sreq.cres = cres
+
+ for (var i in exports.compare) {
+ console.log(i)
+ var hash = exports.compare[i]()
+ console.log(hash)
+ console.log(hash.length)
+ console.log('')
+ }
+
+ require('bench').runMain()
+}
+
+function customWs (obj, md, d) {
+ d = d || 0
+ var to = typeof obj
+ if (to === 'undefined' || to === 'function' || to === null) return ''
+ if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '')
+
+ if (Array.isArray(obj)) {
+ return obj.map(function (i, _, __) {
+ return customWs(i, md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+ }
+
+ var keys = Object.keys(obj)
+ return keys.map(function (k, _, __) {
+ return k + ':' + customWs(obj[k], md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+}
+
+function custom (obj, md, d) {
+ d = d || 0
+ var to = typeof obj
+ if (to === 'undefined' || to === 'function' || to === null) return ''
+ if (d > md || !obj || to !== 'object') return '' + obj
+
+ if (Array.isArray(obj)) {
+ return obj.map(function (i, _, __) {
+ return custom(i, md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+ }
+
+ var keys = Object.keys(obj)
+ return keys.map(function (k, _, __) {
+ return k + ':' + custom(obj[k], md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+}
+
+function sparseFE2 (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ Object.keys(v).forEach(function (k, _, __) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') return
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') return
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ })
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function sparseFE (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ Object.keys(v).forEach(function (k, _, __) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') return
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') return
+ soFar += k
+ ch(v[k], depth + 1)
+ })
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function sparse (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k
+ ch(v[k], depth + 1)
+ }
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function noCommas (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ }
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+
+function flatten (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ soFar += ','
+ }
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+exports.compare =
+{
+ // 'custom 2': function () {
+ // return custom(test, 2, 0)
+ // },
+ // 'customWs 2': function () {
+ // return customWs(test, 2, 0)
+ // },
+ 'JSON.stringify (guarded)': function () {
+ var seen = []
+ return JSON.stringify(test, function (k, v) {
+ if (typeof v !== 'object' || !v) return v
+ if (seen.indexOf(v) !== -1) return undefined
+ seen.push(v)
+ return v
+ })
+ },
+
+ 'flatten 10': function () {
+ return flatten(test, 10)
+ },
+
+ // 'flattenFE 10': function () {
+ // return flattenFE(test, 10)
+ // },
+
+ 'noCommas 10': function () {
+ return noCommas(test, 10)
+ },
+
+ 'sparse 10': function () {
+ return sparse(test, 10)
+ },
+
+ 'sparseFE 10': function () {
+ return sparseFE(test, 10)
+ },
+
+ 'sparseFE2 10': function () {
+ return sparseFE2(test, 10)
+ },
+
+ sigmund: function() {
+ return sigmund(test, 10)
+ },
+
+
+ // 'util.inspect 1': function () {
+ // return util.inspect(test, false, 1, false)
+ // },
+ // 'util.inspect undefined': function () {
+ // util.inspect(test)
+ // },
+ // 'util.inspect 2': function () {
+ // util.inspect(test, false, 2, false)
+ // },
+ // 'util.inspect 3': function () {
+ // util.inspect(test, false, 3, false)
+ // },
+ // 'util.inspect 4': function () {
+ // util.inspect(test, false, 4, false)
+ // },
+ // 'util.inspect Infinity': function () {
+ // util.inspect(test, false, Infinity, false)
+ // }
+}
+
+/** results
+**/
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/package.json b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/package.json
new file mode 100644
index 0000000..ec8e2eb
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "sigmund",
+ "version": "1.0.0",
+ "description": "Quick and dirty signatures for Objects.",
+ "main": "sigmund.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.3.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js",
+ "bench": "node bench.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/sigmund"
+ },
+ "keywords": [
+ "object",
+ "signature",
+ "key",
+ "data",
+ "psychoanalysis"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "BSD",
+ "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even rea
dable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/sigmund/issues"
+ },
+ "_id": "sigmund@1.0.0",
+ "_from": "sigmund@~1.0.0"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/sigmund.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/sigmund.js b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/sigmund.js
new file mode 100644
index 0000000..82c7ab8
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/sigmund.js
@@ -0,0 +1,39 @@
+module.exports = sigmund
+function sigmund (subject, maxSessions) {
+ maxSessions = maxSessions || 10;
+ var notes = [];
+ var analysis = '';
+ var RE = RegExp;
+
+ function psychoAnalyze (subject, session) {
+ if (session > maxSessions) return;
+
+ if (typeof subject === 'function' ||
+ typeof subject === 'undefined') {
+ return;
+ }
+
+ if (typeof subject !== 'object' || !subject ||
+ (subject instanceof RE)) {
+ analysis += subject;
+ return;
+ }
+
+ if (notes.indexOf(subject) !== -1 || session === maxSessions) return;
+
+ notes.push(subject);
+ analysis += '{';
+ Object.keys(subject).forEach(function (issue, _, __) {
+ // pseudo-private values. skip those.
+ if (issue.charAt(0) === '_') return;
+ var to = typeof subject[issue];
+ if (to === 'function' || to === 'undefined') return;
+ analysis += issue;
+ psychoAnalyze(subject[issue], session + 1);
+ });
+ }
+ psychoAnalyze(subject, 0);
+ return analysis;
+}
+
+// vim: set softtabstop=4 shiftwidth=4:
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/test/basic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/test/basic.js b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/test/basic.js
new file mode 100644
index 0000000..50c53a1
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/node_modules/sigmund/test/basic.js
@@ -0,0 +1,24 @@
+var test = require('tap').test
+var sigmund = require('../sigmund.js')
+
+
+// occasionally there are duplicates
+// that's an acceptable edge-case. JSON.stringify and util.inspect
+// have some collision potential as well, though less, and collision
+// detection is expensive.
+var hash = '{abc/def/g{0h1i2{jkl'
+var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
+var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
+
+var obj3 = JSON.parse(JSON.stringify(obj1))
+obj3.c = /def/
+obj3.g[2].cycle = obj3
+var cycleHash = '{abc/def/g{0h1i2{jklcycle'
+
+test('basic', function (t) {
+ t.equal(sigmund(obj1), hash)
+ t.equal(sigmund(obj2), hash)
+ t.equal(sigmund(obj3), cycleHash)
+ t.end()
+})
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/package.json b/blackberry10/node_modules/jake/node_modules/minimatch/package.json
new file mode 100644
index 0000000..8ec9c62
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/package.json
@@ -0,0 +1,39 @@
+{
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me"
+ },
+ "name": "minimatch",
+ "description": "a glob matcher in javascript",
+ "version": "0.2.12",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/minimatch.git"
+ },
+ "main": "minimatch.js",
+ "scripts": {
+ "test": "tap test"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "dependencies": {
+ "lru-cache": "2",
+ "sigmund": "~1.0.0"
+ },
+ "devDependencies": {
+ "tap": ""
+ },
+ "license": {
+ "type": "MIT",
+ "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE"
+ },
+ "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` charac
ter, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\n
then minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The opt
ions supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if
necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minim
atch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not expli
citly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/minimatch/issues"
+ },
+ "_id": "minimatch@0.2.12",
+ "_from": "minimatch@0.2.x"
+}
[06/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/mark.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/mark.js b/blackberry10/node_modules/plugman/node_modules/glob/test/mark.js
new file mode 100644
index 0000000..ed68a33
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/mark.js
@@ -0,0 +1,74 @@
+var test = require("tap").test
+var glob = require('../')
+process.chdir(__dirname)
+
+test("mark, no / on pattern", function (t) {
+ glob("a/*", {mark: true}, function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=false, no / on pattern", function (t) {
+ glob("a/*", function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef',
+ 'a/abcfed',
+ 'a/b',
+ 'a/bc',
+ 'a/c',
+ 'a/cb' ]
+
+ if (process.platform !== "win32")
+ expect.push('a/symlink')
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=true, / on pattern", function (t) {
+ glob("a/*/", {mark: true}, function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=false, / on pattern", function (t) {
+ glob("a/*/", function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+ t.same(results, expect)
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/nocase-nomagic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/nocase-nomagic.js b/blackberry10/node_modules/plugman/node_modules/glob/test/nocase-nomagic.js
new file mode 100644
index 0000000..2503f23
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/nocase-nomagic.js
@@ -0,0 +1,113 @@
+var fs = require('fs');
+var test = require('tap').test;
+var glob = require('../');
+
+test('mock fs', function(t) {
+ var stat = fs.stat
+ var statSync = fs.statSync
+ var readdir = fs.readdir
+ var readdirSync = fs.readdirSync
+
+ function fakeStat(path) {
+ var ret
+ switch (path.toLowerCase()) {
+ case '/tmp': case '/tmp/':
+ ret = { isDirectory: function() { return true } }
+ break
+ case '/tmp/a':
+ ret = { isDirectory: function() { return false } }
+ break
+ }
+ return ret
+ }
+
+ fs.stat = function(path, cb) {
+ var f = fakeStat(path);
+ if (f) {
+ process.nextTick(function() {
+ cb(null, f)
+ })
+ } else {
+ stat.call(fs, path, cb)
+ }
+ }
+
+ fs.statSync = function(path) {
+ return fakeStat(path) || statSync.call(fs, path)
+ }
+
+ function fakeReaddir(path) {
+ var ret
+ switch (path.toLowerCase()) {
+ case '/tmp': case '/tmp/':
+ ret = [ 'a', 'A' ]
+ break
+ case '/':
+ ret = ['tmp', 'tMp', 'tMP', 'TMP']
+ }
+ return ret
+ }
+
+ fs.readdir = function(path, cb) {
+ var f = fakeReaddir(path)
+ if (f)
+ process.nextTick(function() {
+ cb(null, f)
+ })
+ else
+ readdir.call(fs, path, cb)
+ }
+
+ fs.readdirSync = function(path) {
+ return fakeReaddir(path) || readdirSync.call(fs, path)
+ }
+
+ t.pass('mocked')
+ t.end()
+})
+
+test('nocase, nomagic', function(t) {
+ var n = 2
+ var want = [ '/TMP/A',
+ '/TMP/a',
+ '/tMP/A',
+ '/tMP/a',
+ '/tMp/A',
+ '/tMp/a',
+ '/tmp/A',
+ '/tmp/a' ]
+ glob('/tmp/a', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ if (--n === 0) t.end()
+ })
+ glob('/tmp/A', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ if (--n === 0) t.end()
+ })
+})
+
+test('nocase, with some magic', function(t) {
+ t.plan(2)
+ var want = [ '/TMP/A',
+ '/TMP/a',
+ '/tMP/A',
+ '/tMP/a',
+ '/tMp/A',
+ '/tMp/a',
+ '/tmp/A',
+ '/tmp/a' ]
+ glob('/tmp/*', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ })
+ glob('/tmp/*', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/pause-resume.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/pause-resume.js b/blackberry10/node_modules/plugman/node_modules/glob/test/pause-resume.js
new file mode 100644
index 0000000..e1ffbab
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/pause-resume.js
@@ -0,0 +1,73 @@
+// show that no match events happen while paused.
+var tap = require("tap")
+, child_process = require("child_process")
+// just some gnarly pattern with lots of matches
+, pattern = "test/a/!(symlink)/**"
+, bashResults = require("./bash-results.json")
+, patterns = Object.keys(bashResults)
+, glob = require("../")
+, Glob = glob.Glob
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
+ })
+}
+
+var globResults = []
+tap.test("use a Glob object, and pause/resume it", function (t) {
+ var g = new Glob(pattern)
+ , paused = false
+ , res = []
+ , expect = bashResults[pattern]
+
+ g.on("pause", function () {
+ console.error("pause")
+ })
+
+ g.on("resume", function () {
+ console.error("resume")
+ })
+
+ g.on("match", function (m) {
+ t.notOk(g.paused, "must not be paused")
+ globResults.push(m)
+ g.pause()
+ t.ok(g.paused, "must be paused")
+ setTimeout(g.resume.bind(g), 10)
+ })
+
+ g.on("end", function (matches) {
+ t.pass("reached glob end")
+ globResults = cleanResults(globResults)
+ matches = cleanResults(matches)
+ t.deepEqual(matches, globResults,
+ "end event matches should be the same as match events")
+
+ t.deepEqual(matches, expect,
+ "glob matches should be the same as bash results")
+
+ t.end()
+ })
+})
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/root-nomount.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/root-nomount.js b/blackberry10/node_modules/plugman/node_modules/glob/test/root-nomount.js
new file mode 100644
index 0000000..3ac5979
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/root-nomount.js
@@ -0,0 +1,39 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing root and searching for /b*/**", function (t) {
+ var glob = require('../')
+ var path = require('path')
+ t.test('.', function (t) {
+ glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [])
+ t.end()
+ })
+ })
+
+ t.test('a', function (t) {
+ glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+ t.end()
+ })
+ })
+
+ t.test('root=a, cwd=a/b', function (t) {
+ glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+ t.end()
+ })
+ })
+
+ t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+ })
+
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/root.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/root.js b/blackberry10/node_modules/plugman/node_modules/glob/test/root.js
new file mode 100644
index 0000000..95c23f9
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/root.js
@@ -0,0 +1,46 @@
+var t = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+var glob = require('../')
+var path = require('path')
+
+t.test('.', function (t) {
+ glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [])
+ t.end()
+ })
+})
+
+
+t.test('a', function (t) {
+ console.error("root=" + path.resolve('a'))
+ glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) {
+ t.ifError(er)
+ var wanted = [
+ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f'
+ ].map(function (m) {
+ return path.join(path.resolve('a'), m).replace(/\\/g, '/')
+ })
+
+ t.like(matches, wanted)
+ t.end()
+ })
+})
+
+t.test('root=a, cwd=a/b', function (t) {
+ glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
+ return path.join(path.resolve('a'), m).replace(/\\/g, '/')
+ }))
+ t.end()
+ })
+})
+
+t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/stat.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/stat.js b/blackberry10/node_modules/plugman/node_modules/glob/test/stat.js
new file mode 100644
index 0000000..6291711
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/stat.js
@@ -0,0 +1,32 @@
+var glob = require('../')
+var test = require('tap').test
+var path = require('path')
+
+test('stat all the things', function(t) {
+ var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname })
+ var matches = []
+ g.on('match', function(m) {
+ matches.push(m)
+ })
+ var stats = []
+ g.on('stat', function(m) {
+ stats.push(m)
+ })
+ g.on('end', function(eof) {
+ stats = stats.sort()
+ matches = matches.sort()
+ eof = eof.sort()
+ t.same(stats, matches)
+ t.same(eof, matches)
+ var cache = Object.keys(this.statCache)
+ t.same(cache.map(function (f) {
+ return path.relative(__dirname, f)
+ }).sort(), matches)
+
+ cache.forEach(function(c) {
+ t.equal(typeof this.statCache[c], 'object')
+ }, this)
+
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/zz-cleanup.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/zz-cleanup.js b/blackberry10/node_modules/plugman/node_modules/glob/test/zz-cleanup.js
new file mode 100644
index 0000000..e085f0f
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/zz-cleanup.js
@@ -0,0 +1,11 @@
+// remove the fixtures
+var tap = require("tap")
+, rimraf = require("rimraf")
+, path = require("path")
+
+tap.test("cleanup fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "a"), function (er) {
+ t.ifError(er, "removed")
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/ncallbacks/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/ncallbacks/README.md b/blackberry10/node_modules/plugman/node_modules/ncallbacks/README.md
new file mode 100644
index 0000000..f8284f6
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/ncallbacks/README.md
@@ -0,0 +1,17 @@
+# nCallbacks
+
+> function that executes n times
+
+This is a stupid flow control library. Here's how you can use it.
+
+ var end = nCallbacks(3, function (err, whatever) {
+ console.log('done now');
+ });
+
+ firstAsynchronousThing(end);
+ secondAsynchronousThing(end);
+ thirdAsynchronousThing(end);
+
+## LICENSE
+
+I don't care
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/ncallbacks/ncallbacks.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/ncallbacks/ncallbacks.js b/blackberry10/node_modules/plugman/node_modules/ncallbacks/ncallbacks.js
new file mode 100644
index 0000000..cd13ef4
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/ncallbacks/ncallbacks.js
@@ -0,0 +1,16 @@
+/*
+ * stupid-simple "flow control"
+ */
+
+module.exports = function nCallbacks(count, callback) {
+ var n = count;
+ return function (err) {
+ if (err) callback(err)
+
+ if (n < 0) callback('called too many times')
+
+ --n
+
+ if (n == 0) callback(null)
+ }
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/ncallbacks/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/ncallbacks/package.json b/blackberry10/node_modules/plugman/node_modules/ncallbacks/package.json
new file mode 100644
index 0000000..2afdfd6
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/ncallbacks/package.json
@@ -0,0 +1,23 @@
+{
+ "author": {
+ "name": "Andrew Lunny",
+ "email": "alunny@gmail.com"
+ },
+ "name": "ncallbacks",
+ "description": "function that expires after n calls",
+ "version": "1.1.0",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/alunny/ncallbacks.git"
+ },
+ "main": "ncallbacks.js",
+ "dependencies": {},
+ "devDependencies": {},
+ "readme": "# nCallbacks\n\n> function that executes n times\n\nThis is a stupid flow control library. Here's how you can use it.\n\n var end = nCallbacks(3, function (err, whatever) {\n console.log('done now');\n });\n\n firstAsynchronousThing(end);\n secondAsynchronousThing(end);\n thirdAsynchronousThing(end);\n\n## LICENSE\n\nI don't care\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/alunny/ncallbacks/issues"
+ },
+ "_id": "ncallbacks@1.1.0",
+ "_from": "ncallbacks@1.1.0"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/.npmignore b/blackberry10/node_modules/plugman/node_modules/nopt/.npmignore
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/LICENSE b/blackberry10/node_modules/plugman/node_modules/nopt/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/README.md b/blackberry10/node_modules/plugman/node_modules/nopt/README.md
new file mode 100644
index 0000000..eeddfd4
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/README.md
@@ -0,0 +1,208 @@
+If you want to write an option parser, and have it be good, there are
+two ways to do it. The Right Way, and the Wrong Way.
+
+The Wrong Way is to sit down and write an option parser. We've all done
+that.
+
+The Right Way is to write some complex configurable program with so many
+options that you go half-insane just trying to manage them all, and put
+it off with duct-tape solutions until you see exactly to the core of the
+problem, and finally snap and write an awesome option parser.
+
+If you want to write an option parser, don't write an option parser.
+Write a package manager, or a source control system, or a service
+restarter, or an operating system. You probably won't end up with a
+good one of those, but if you don't give up, and you are relentless and
+diligent enough in your procrastination, you may just end up with a very
+nice option parser.
+
+## USAGE
+
+ // my-program.js
+ var nopt = require("nopt")
+ , Stream = require("stream").Stream
+ , path = require("path")
+ , knownOpts = { "foo" : [String, null]
+ , "bar" : [Stream, Number]
+ , "baz" : path
+ , "bloo" : [ "big", "medium", "small" ]
+ , "flag" : Boolean
+ , "pick" : Boolean
+ , "many" : [String, Array]
+ }
+ , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
+ , "b7" : ["--bar", "7"]
+ , "m" : ["--bloo", "medium"]
+ , "p" : ["--pick"]
+ , "f" : ["--flag"]
+ }
+ // everything is optional.
+ // knownOpts and shorthands default to {}
+ // arg list defaults to process.argv
+ // slice defaults to 2
+ , parsed = nopt(knownOpts, shortHands, process.argv, 2)
+ console.log(parsed)
+
+This would give you support for any of the following:
+
+```bash
+$ node my-program.js --foo "blerp" --no-flag
+{ "foo" : "blerp", "flag" : false }
+
+$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag
+{ bar: 7, foo: "Mr. Hand", flag: true }
+
+$ node my-program.js --foo "blerp" -f -----p
+{ foo: "blerp", flag: true, pick: true }
+
+$ node my-program.js -fp --foofoo
+{ foo: "Mr. Foo", flag: true, pick: true }
+
+$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.
+{ foo: "Mr. Foo", argv: { remain: ["-fp"] } }
+
+$ node my-program.js --blatzk 1000 -fp # unknown opts are ok.
+{ blatzk: 1000, flag: true, pick: true }
+
+$ node my-program.js --blatzk true -fp # but they need a value
+{ blatzk: true, flag: true, pick: true }
+
+$ node my-program.js --no-blatzk -fp # unless they start with "no-"
+{ blatzk: false, flag: true, pick: true }
+
+$ node my-program.js --baz b/a/z # known paths are resolved.
+{ baz: "/Users/isaacs/b/a/z" }
+
+# if Array is one of the types, then it can take many
+# values, and will always be an array. The other types provided
+# specify what types are allowed in the list.
+
+$ node my-program.js --many 1 --many null --many foo
+{ many: ["1", "null", "foo"] }
+
+$ node my-program.js --many foo
+{ many: ["foo"] }
+```
+
+Read the tests at the bottom of `lib/nopt.js` for more examples of
+what this puppy can do.
+
+## Types
+
+The following types are supported, and defined on `nopt.typeDefs`
+
+* String: A normal string. No parsing is done.
+* path: A file system path. Gets resolved against cwd if not absolute.
+* url: A url. If it doesn't parse, it isn't accepted.
+* Number: Must be numeric.
+* Date: Must parse as a date. If it does, and `Date` is one of the options,
+ then it will return a Date object, not a string.
+* Boolean: Must be either `true` or `false`. If an option is a boolean,
+ then it does not need a value, and its presence will imply `true` as
+ the value. To negate boolean flags, do `--no-whatever` or `--whatever
+ false`
+* NaN: Means that the option is strictly not allowed. Any value will
+ fail.
+* Stream: An object matching the "Stream" class in node. Valuable
+ for use when validating programmatically. (npm uses this to let you
+ supply any WriteStream on the `outfd` and `logfd` config options.)
+* Array: If `Array` is specified as one of the types, then the value
+ will be parsed as a list of options. This means that multiple values
+ can be specified, and that the value will always be an array.
+
+If a type is an array of values not on this list, then those are
+considered valid values. For instance, in the example above, the
+`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`,
+and any other value will be rejected.
+
+When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be
+interpreted as their JavaScript equivalents, and numeric values will be
+interpreted as a number.
+
+You can also mix types and values, or multiple types, in a list. For
+instance `{ blah: [Number, null] }` would allow a value to be set to
+either a Number or null.
+
+To define a new type, add it to `nopt.typeDefs`. Each item in that
+hash is an object with a `type` member and a `validate` method. The
+`type` member is an object that matches what goes in the type list. The
+`validate` method is a function that gets called with `validate(data,
+key, val)`. Validate methods should assign `data[key]` to the valid
+value of `val` if it can be handled properly, or return boolean
+`false` if it cannot.
+
+You can also call `nopt.clean(data, types, typeDefs)` to clean up a
+config object and remove its invalid properties.
+
+## Error Handling
+
+By default, nopt outputs a warning to standard error when invalid
+options are found. You can change this behavior by assigning a method
+to `nopt.invalidHandler`. This method will be called with
+the offending `nopt.invalidHandler(key, val, types)`.
+
+If no `nopt.invalidHandler` is assigned, then it will console.error
+its whining. If it is assigned to boolean `false` then the warning is
+suppressed.
+
+## Abbreviations
+
+Yes, they are supported. If you define options like this:
+
+```javascript
+{ "foolhardyelephants" : Boolean
+, "pileofmonkeys" : Boolean }
+```
+
+Then this will work:
+
+```bash
+node program.js --foolhar --pil
+node program.js --no-f --pileofmon
+# etc.
+```
+
+## Shorthands
+
+Shorthands are a hash of shorter option names to a snippet of args that
+they expand to.
+
+If multiple one-character shorthands are all combined, and the
+combination does not unambiguously match any other option or shorthand,
+then they will be broken up into their constituent parts. For example:
+
+```json
+{ "s" : ["--loglevel", "silent"]
+, "g" : "--global"
+, "f" : "--force"
+, "p" : "--parseable"
+, "l" : "--long"
+}
+```
+
+```bash
+npm ls -sgflp
+# just like doing this:
+npm ls --loglevel silent --global --force --long --parseable
+```
+
+## The Rest of the args
+
+The config object returned by nopt is given a special member called
+`argv`, which is an object with the following fields:
+
+* `remain`: The remaining args after all the parsing has occurred.
+* `original`: The args as they originally appeared.
+* `cooked`: The args after flags and shorthands are expanded.
+
+## Slicing
+
+Node programs are called with more or less the exact argv as it appears
+in C land, after the v8 and node-specific options have been plucked off.
+As such, `argv[0]` is always `node` and `argv[1]` is always the
+JavaScript program being run.
+
+That's usually not very useful to you. So they're sliced off by
+default. If you want them, then you can pass in `0` as the last
+argument, or any other number that you'd like to slice off the start of
+the list.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/bin/nopt.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/bin/nopt.js b/blackberry10/node_modules/plugman/node_modules/nopt/bin/nopt.js
new file mode 100755
index 0000000..df90c72
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/bin/nopt.js
@@ -0,0 +1,44 @@
+#!/usr/bin/env node
+var nopt = require("../lib/nopt")
+ , types = { num: Number
+ , bool: Boolean
+ , help: Boolean
+ , list: Array
+ , "num-list": [Number, Array]
+ , "str-list": [String, Array]
+ , "bool-list": [Boolean, Array]
+ , str: String }
+ , shorthands = { s: [ "--str", "astring" ]
+ , b: [ "--bool" ]
+ , nb: [ "--no-bool" ]
+ , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ]
+ , "?": ["--help"]
+ , h: ["--help"]
+ , H: ["--help"]
+ , n: [ "--num", "125" ] }
+ , parsed = nopt( types
+ , shorthands
+ , process.argv
+ , 2 )
+
+console.log("parsed", parsed)
+
+if (parsed.help) {
+ console.log("")
+ console.log("nopt cli tester")
+ console.log("")
+ console.log("types")
+ console.log(Object.keys(types).map(function M (t) {
+ var type = types[t]
+ if (Array.isArray(type)) {
+ return [t, type.map(function (type) { return type.name })]
+ }
+ return [t, type && type.name]
+ }).reduce(function (s, i) {
+ s[i[0]] = i[1]
+ return s
+ }, {}))
+ console.log("")
+ console.log("shorthands")
+ console.log(shorthands)
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/examples/my-program.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/examples/my-program.js b/blackberry10/node_modules/plugman/node_modules/nopt/examples/my-program.js
new file mode 100755
index 0000000..142447e
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/examples/my-program.js
@@ -0,0 +1,30 @@
+#!/usr/bin/env node
+
+//process.env.DEBUG_NOPT = 1
+
+// my-program.js
+var nopt = require("../lib/nopt")
+ , Stream = require("stream").Stream
+ , path = require("path")
+ , knownOpts = { "foo" : [String, null]
+ , "bar" : [Stream, Number]
+ , "baz" : path
+ , "bloo" : [ "big", "medium", "small" ]
+ , "flag" : Boolean
+ , "pick" : Boolean
+ }
+ , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
+ , "b7" : ["--bar", "7"]
+ , "m" : ["--bloo", "medium"]
+ , "p" : ["--pick"]
+ , "f" : ["--flag", "true"]
+ , "g" : ["--flag"]
+ , "s" : "--flag"
+ }
+ // everything is optional.
+ // knownOpts and shorthands default to {}
+ // arg list defaults to process.argv
+ // slice defaults to 2
+ , parsed = nopt(knownOpts, shortHands, process.argv, 2)
+
+console.log("parsed =\n"+ require("util").inspect(parsed))
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/lib/nopt.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/lib/nopt.js b/blackberry10/node_modules/plugman/node_modules/nopt/lib/nopt.js
new file mode 100644
index 0000000..ff802da
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/lib/nopt.js
@@ -0,0 +1,552 @@
+// info about each config option.
+
+var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG
+ ? function () { console.error.apply(console, arguments) }
+ : function () {}
+
+var url = require("url")
+ , path = require("path")
+ , Stream = require("stream").Stream
+ , abbrev = require("abbrev")
+
+module.exports = exports = nopt
+exports.clean = clean
+
+exports.typeDefs =
+ { String : { type: String, validate: validateString }
+ , Boolean : { type: Boolean, validate: validateBoolean }
+ , url : { type: url, validate: validateUrl }
+ , Number : { type: Number, validate: validateNumber }
+ , path : { type: path, validate: validatePath }
+ , Stream : { type: Stream, validate: validateStream }
+ , Date : { type: Date, validate: validateDate }
+ }
+
+function nopt (types, shorthands, args, slice) {
+ args = args || process.argv
+ types = types || {}
+ shorthands = shorthands || {}
+ if (typeof slice !== "number") slice = 2
+
+ debug(types, shorthands, args, slice)
+
+ args = args.slice(slice)
+ var data = {}
+ , key
+ , remain = []
+ , cooked = args
+ , original = args.slice(0)
+
+ parse(args, data, remain, types, shorthands)
+ // now data is full
+ clean(data, types, exports.typeDefs)
+ data.argv = {remain:remain,cooked:cooked,original:original}
+ data.argv.toString = function () {
+ return this.original.map(JSON.stringify).join(" ")
+ }
+ return data
+}
+
+function clean (data, types, typeDefs) {
+ typeDefs = typeDefs || exports.typeDefs
+ var remove = {}
+ , typeDefault = [false, true, null, String, Number]
+
+ Object.keys(data).forEach(function (k) {
+ if (k === "argv") return
+ var val = data[k]
+ , isArray = Array.isArray(val)
+ , type = types[k]
+ if (!isArray) val = [val]
+ if (!type) type = typeDefault
+ if (type === Array) type = typeDefault.concat(Array)
+ if (!Array.isArray(type)) type = [type]
+
+ debug("val=%j", val)
+ debug("types=", type)
+ val = val.map(function (val) {
+ // if it's an unknown value, then parse false/true/null/numbers/dates
+ if (typeof val === "string") {
+ debug("string %j", val)
+ val = val.trim()
+ if ((val === "null" && ~type.indexOf(null))
+ || (val === "true" &&
+ (~type.indexOf(true) || ~type.indexOf(Boolean)))
+ || (val === "false" &&
+ (~type.indexOf(false) || ~type.indexOf(Boolean)))) {
+ val = JSON.parse(val)
+ debug("jsonable %j", val)
+ } else if (~type.indexOf(Number) && !isNaN(val)) {
+ debug("convert to number", val)
+ val = +val
+ } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) {
+ debug("convert to date", val)
+ val = new Date(val)
+ }
+ }
+
+ if (!types.hasOwnProperty(k)) {
+ return val
+ }
+
+ // allow `--no-blah` to set 'blah' to null if null is allowed
+ if (val === false && ~type.indexOf(null) &&
+ !(~type.indexOf(false) || ~type.indexOf(Boolean))) {
+ val = null
+ }
+
+ var d = {}
+ d[k] = val
+ debug("prevalidated val", d, val, types[k])
+ if (!validate(d, k, val, types[k], typeDefs)) {
+ if (exports.invalidHandler) {
+ exports.invalidHandler(k, val, types[k], data)
+ } else if (exports.invalidHandler !== false) {
+ debug("invalid: "+k+"="+val, types[k])
+ }
+ return remove
+ }
+ debug("validated val", d, val, types[k])
+ return d[k]
+ }).filter(function (val) { return val !== remove })
+
+ if (!val.length) delete data[k]
+ else if (isArray) {
+ debug(isArray, data[k], val)
+ data[k] = val
+ } else data[k] = val[0]
+
+ debug("k=%s val=%j", k, val, data[k])
+ })
+}
+
+function validateString (data, k, val) {
+ data[k] = String(val)
+}
+
+function validatePath (data, k, val) {
+ data[k] = path.resolve(String(val))
+ return true
+}
+
+function validateNumber (data, k, val) {
+ debug("validate Number %j %j %j", k, val, isNaN(val))
+ if (isNaN(val)) return false
+ data[k] = +val
+}
+
+function validateDate (data, k, val) {
+ debug("validate Date %j %j %j", k, val, Date.parse(val))
+ var s = Date.parse(val)
+ if (isNaN(s)) return false
+ data[k] = new Date(val)
+}
+
+function validateBoolean (data, k, val) {
+ if (val instanceof Boolean) val = val.valueOf()
+ else if (typeof val === "string") {
+ if (!isNaN(val)) val = !!(+val)
+ else if (val === "null" || val === "false") val = false
+ else val = true
+ } else val = !!val
+ data[k] = val
+}
+
+function validateUrl (data, k, val) {
+ val = url.parse(String(val))
+ if (!val.host) return false
+ data[k] = val.href
+}
+
+function validateStream (data, k, val) {
+ if (!(val instanceof Stream)) return false
+ data[k] = val
+}
+
+function validate (data, k, val, type, typeDefs) {
+ // arrays are lists of types.
+ if (Array.isArray(type)) {
+ for (var i = 0, l = type.length; i < l; i ++) {
+ if (type[i] === Array) continue
+ if (validate(data, k, val, type[i], typeDefs)) return true
+ }
+ delete data[k]
+ return false
+ }
+
+ // an array of anything?
+ if (type === Array) return true
+
+ // NaN is poisonous. Means that something is not allowed.
+ if (type !== type) {
+ debug("Poison NaN", k, val, type)
+ delete data[k]
+ return false
+ }
+
+ // explicit list of values
+ if (val === type) {
+ debug("Explicitly allowed %j", val)
+ // if (isArray) (data[k] = data[k] || []).push(val)
+ // else data[k] = val
+ data[k] = val
+ return true
+ }
+
+ // now go through the list of typeDefs, validate against each one.
+ var ok = false
+ , types = Object.keys(typeDefs)
+ for (var i = 0, l = types.length; i < l; i ++) {
+ debug("test type %j %j %j", k, val, types[i])
+ var t = typeDefs[types[i]]
+ if (t && type === t.type) {
+ var d = {}
+ ok = false !== t.validate(d, k, val)
+ val = d[k]
+ if (ok) {
+ // if (isArray) (data[k] = data[k] || []).push(val)
+ // else data[k] = val
+ data[k] = val
+ break
+ }
+ }
+ }
+ debug("OK? %j (%j %j %j)", ok, k, val, types[i])
+
+ if (!ok) delete data[k]
+ return ok
+}
+
+function parse (args, data, remain, types, shorthands) {
+ debug("parse", args, data, remain)
+
+ var key = null
+ , abbrevs = abbrev(Object.keys(types))
+ , shortAbbr = abbrev(Object.keys(shorthands))
+
+ for (var i = 0; i < args.length; i ++) {
+ var arg = args[i]
+ debug("arg", arg)
+
+ if (arg.match(/^-{2,}$/)) {
+ // done with keys.
+ // the rest are args.
+ remain.push.apply(remain, args.slice(i + 1))
+ args[i] = "--"
+ break
+ }
+ if (arg.charAt(0) === "-") {
+ if (arg.indexOf("=") !== -1) {
+ var v = arg.split("=")
+ arg = v.shift()
+ v = v.join("=")
+ args.splice.apply(args, [i, 1].concat([arg, v]))
+ }
+ // see if it's a shorthand
+ // if so, splice and back up to re-parse it.
+ var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs)
+ debug("arg=%j shRes=%j", arg, shRes)
+ if (shRes) {
+ debug(arg, shRes)
+ args.splice.apply(args, [i, 1].concat(shRes))
+ if (arg !== shRes[0]) {
+ i --
+ continue
+ }
+ }
+ arg = arg.replace(/^-+/, "")
+ var no = false
+ while (arg.toLowerCase().indexOf("no-") === 0) {
+ no = !no
+ arg = arg.substr(3)
+ }
+
+ if (abbrevs[arg]) arg = abbrevs[arg]
+
+ var isArray = types[arg] === Array ||
+ Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1
+
+ var val
+ , la = args[i + 1]
+
+ var isBool = no ||
+ types[arg] === Boolean ||
+ Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 ||
+ (la === "false" &&
+ (types[arg] === null ||
+ Array.isArray(types[arg]) && ~types[arg].indexOf(null)))
+
+ if (isBool) {
+ // just set and move along
+ val = !no
+ // however, also support --bool true or --bool false
+ if (la === "true" || la === "false") {
+ val = JSON.parse(la)
+ la = null
+ if (no) val = !val
+ i ++
+ }
+
+ // also support "foo":[Boolean, "bar"] and "--foo bar"
+ if (Array.isArray(types[arg]) && la) {
+ if (~types[arg].indexOf(la)) {
+ // an explicit type
+ val = la
+ i ++
+ } else if ( la === "null" && ~types[arg].indexOf(null) ) {
+ // null allowed
+ val = null
+ i ++
+ } else if ( !la.match(/^-{2,}[^-]/) &&
+ !isNaN(la) &&
+ ~types[arg].indexOf(Number) ) {
+ // number
+ val = +la
+ i ++
+ } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) {
+ // string
+ val = la
+ i ++
+ }
+ }
+
+ if (isArray) (data[arg] = data[arg] || []).push(val)
+ else data[arg] = val
+
+ continue
+ }
+
+ if (la && la.match(/^-{2,}$/)) {
+ la = undefined
+ i --
+ }
+
+ val = la === undefined ? true : la
+ if (isArray) (data[arg] = data[arg] || []).push(val)
+ else data[arg] = val
+
+ i ++
+ continue
+ }
+ remain.push(arg)
+ }
+}
+
+function resolveShort (arg, shorthands, shortAbbr, abbrevs) {
+ // handle single-char shorthands glommed together, like
+ // npm ls -glp, but only if there is one dash, and only if
+ // all of the chars are single-char shorthands, and it's
+ // not a match to some other abbrev.
+ arg = arg.replace(/^-+/, '')
+ if (abbrevs[arg] && !shorthands[arg]) {
+ return null
+ }
+ if (shortAbbr[arg]) {
+ arg = shortAbbr[arg]
+ } else {
+ var singles = shorthands.___singles
+ if (!singles) {
+ singles = Object.keys(shorthands).filter(function (s) {
+ return s.length === 1
+ }).reduce(function (l,r) { l[r] = true ; return l }, {})
+ shorthands.___singles = singles
+ }
+ var chrs = arg.split("").filter(function (c) {
+ return singles[c]
+ })
+ if (chrs.join("") === arg) return chrs.map(function (c) {
+ return shorthands[c]
+ }).reduce(function (l, r) {
+ return l.concat(r)
+ }, [])
+ }
+
+ if (shorthands[arg] && !Array.isArray(shorthands[arg])) {
+ shorthands[arg] = shorthands[arg].split(/\s+/)
+ }
+ return shorthands[arg]
+}
+
+if (module === require.main) {
+var assert = require("assert")
+ , util = require("util")
+
+ , shorthands =
+ { s : ["--loglevel", "silent"]
+ , d : ["--loglevel", "info"]
+ , dd : ["--loglevel", "verbose"]
+ , ddd : ["--loglevel", "silly"]
+ , noreg : ["--no-registry"]
+ , reg : ["--registry"]
+ , "no-reg" : ["--no-registry"]
+ , silent : ["--loglevel", "silent"]
+ , verbose : ["--loglevel", "verbose"]
+ , h : ["--usage"]
+ , H : ["--usage"]
+ , "?" : ["--usage"]
+ , help : ["--usage"]
+ , v : ["--version"]
+ , f : ["--force"]
+ , desc : ["--description"]
+ , "no-desc" : ["--no-description"]
+ , "local" : ["--no-global"]
+ , l : ["--long"]
+ , p : ["--parseable"]
+ , porcelain : ["--parseable"]
+ , g : ["--global"]
+ }
+
+ , types =
+ { aoa: Array
+ , nullstream: [null, Stream]
+ , date: Date
+ , str: String
+ , browser : String
+ , cache : path
+ , color : ["always", Boolean]
+ , depth : Number
+ , description : Boolean
+ , dev : Boolean
+ , editor : path
+ , force : Boolean
+ , global : Boolean
+ , globalconfig : path
+ , group : [String, Number]
+ , gzipbin : String
+ , logfd : [Number, Stream]
+ , loglevel : ["silent","win","error","warn","info","verbose","silly"]
+ , long : Boolean
+ , "node-version" : [false, String]
+ , npaturl : url
+ , npat : Boolean
+ , "onload-script" : [false, String]
+ , outfd : [Number, Stream]
+ , parseable : Boolean
+ , pre: Boolean
+ , prefix: path
+ , proxy : url
+ , "rebuild-bundle" : Boolean
+ , registry : url
+ , searchopts : String
+ , searchexclude: [null, String]
+ , shell : path
+ , t: [Array, String]
+ , tag : String
+ , tar : String
+ , tmp : path
+ , "unsafe-perm" : Boolean
+ , usage : Boolean
+ , user : String
+ , username : String
+ , userconfig : path
+ , version : Boolean
+ , viewer: path
+ , _exit : Boolean
+ }
+
+; [["-v", {version:true}, []]
+ ,["---v", {version:true}, []]
+ ,["ls -s --no-reg connect -d",
+ {loglevel:"info",registry:null},["ls","connect"]]
+ ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]]
+ ,["ls --registry blargle", {}, ["ls"]]
+ ,["--no-registry", {registry:null}, []]
+ ,["--no-color true", {color:false}, []]
+ ,["--no-color false", {color:true}, []]
+ ,["--no-color", {color:false}, []]
+ ,["--color false", {color:false}, []]
+ ,["--color --logfd 7", {logfd:7,color:true}, []]
+ ,["--color=true", {color:true}, []]
+ ,["--logfd=10", {logfd:10}, []]
+ ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]]
+ ,["--tmp=tmp -tar=gtar",
+ {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]]
+ ,["--logfd x", {}, []]
+ ,["a -true -- -no-false", {true:true},["a","-no-false"]]
+ ,["a -no-false", {false:false},["a"]]
+ ,["a -no-no-true", {true:true}, ["a"]]
+ ,["a -no-no-no-false", {false:false}, ["a"]]
+ ,["---NO-no-No-no-no-no-nO-no-no"+
+ "-No-no-no-no-no-no-no-no-no"+
+ "-no-no-no-no-NO-NO-no-no-no-no-no-no"+
+ "-no-body-can-do-the-boogaloo-like-I-do"
+ ,{"body-can-do-the-boogaloo-like-I-do":false}, []]
+ ,["we are -no-strangers-to-love "+
+ "--you-know the-rules --and so-do-i "+
+ "---im-thinking-of=a-full-commitment "+
+ "--no-you-would-get-this-from-any-other-guy "+
+ "--no-gonna-give-you-up "+
+ "-no-gonna-let-you-down=true "+
+ "--no-no-gonna-run-around false "+
+ "--desert-you=false "+
+ "--make-you-cry false "+
+ "--no-tell-a-lie "+
+ "--no-no-and-hurt-you false"
+ ,{"strangers-to-love":false
+ ,"you-know":"the-rules"
+ ,"and":"so-do-i"
+ ,"you-would-get-this-from-any-other-guy":false
+ ,"gonna-give-you-up":false
+ ,"gonna-let-you-down":false
+ ,"gonna-run-around":false
+ ,"desert-you":false
+ ,"make-you-cry":false
+ ,"tell-a-lie":false
+ ,"and-hurt-you":false
+ },["we", "are"]]
+ ,["-t one -t two -t three"
+ ,{t: ["one", "two", "three"]}
+ ,[]]
+ ,["-t one -t null -t three four five null"
+ ,{t: ["one", "null", "three"]}
+ ,["four", "five", "null"]]
+ ,["-t foo"
+ ,{t:["foo"]}
+ ,[]]
+ ,["--no-t"
+ ,{t:["false"]}
+ ,[]]
+ ,["-no-no-t"
+ ,{t:["true"]}
+ ,[]]
+ ,["-aoa one -aoa null -aoa 100"
+ ,{aoa:["one", null, 100]}
+ ,[]]
+ ,["-str 100"
+ ,{str:"100"}
+ ,[]]
+ ,["--color always"
+ ,{color:"always"}
+ ,[]]
+ ,["--no-nullstream"
+ ,{nullstream:null}
+ ,[]]
+ ,["--nullstream false"
+ ,{nullstream:null}
+ ,[]]
+ ,["--notadate 2011-01-25"
+ ,{notadate: "2011-01-25"}
+ ,[]]
+ ,["--date 2011-01-25"
+ ,{date: new Date("2011-01-25")}
+ ,[]]
+ ].forEach(function (test) {
+ var argv = test[0].split(/\s+/)
+ , opts = test[1]
+ , rem = test[2]
+ , actual = nopt(types, shorthands, argv, 0)
+ , parsed = actual.argv
+ delete actual.argv
+ console.log(util.inspect(actual, false, 2, true), parsed.remain)
+ for (var i in opts) {
+ var e = JSON.stringify(opts[i])
+ , a = JSON.stringify(actual[i] === undefined ? null : actual[i])
+ if (e && typeof e === "object") {
+ assert.deepEqual(e, a)
+ } else {
+ assert.equal(e, a)
+ }
+ }
+ assert.deepEqual(rem, parsed.remain)
+ })
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/LICENSE b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/README.md b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/README.md
new file mode 100644
index 0000000..99746fe
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/README.md
@@ -0,0 +1,23 @@
+# abbrev-js
+
+Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).
+
+Usage:
+
+ var abbrev = require("abbrev");
+ abbrev("foo", "fool", "folding", "flop");
+
+ // returns:
+ { fl: 'flop'
+ , flo: 'flop'
+ , flop: 'flop'
+ , fol: 'folding'
+ , fold: 'folding'
+ , foldi: 'folding'
+ , foldin: 'folding'
+ , folding: 'folding'
+ , foo: 'foo'
+ , fool: 'fool'
+ }
+
+This is handy for command-line scripts, or other cases where you want to be able to accept shorthands.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/lib/abbrev.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/lib/abbrev.js b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/lib/abbrev.js
new file mode 100644
index 0000000..bee4132
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/lib/abbrev.js
@@ -0,0 +1,111 @@
+
+module.exports = exports = abbrev.abbrev = abbrev
+
+abbrev.monkeyPatch = monkeyPatch
+
+function monkeyPatch () {
+ Object.defineProperty(Array.prototype, 'abbrev', {
+ value: function () { return abbrev(this) },
+ enumerable: false, configurable: true, writable: true
+ })
+
+ Object.defineProperty(Object.prototype, 'abbrev', {
+ value: function () { return abbrev(Object.keys(this)) },
+ enumerable: false, configurable: true, writable: true
+ })
+}
+
+function abbrev (list) {
+ if (arguments.length !== 1 || !Array.isArray(list)) {
+ list = Array.prototype.slice.call(arguments, 0)
+ }
+ for (var i = 0, l = list.length, args = [] ; i < l ; i ++) {
+ args[i] = typeof list[i] === "string" ? list[i] : String(list[i])
+ }
+
+ // sort them lexicographically, so that they're next to their nearest kin
+ args = args.sort(lexSort)
+
+ // walk through each, seeing how much it has in common with the next and previous
+ var abbrevs = {}
+ , prev = ""
+ for (var i = 0, l = args.length ; i < l ; i ++) {
+ var current = args[i]
+ , next = args[i + 1] || ""
+ , nextMatches = true
+ , prevMatches = true
+ if (current === next) continue
+ for (var j = 0, cl = current.length ; j < cl ; j ++) {
+ var curChar = current.charAt(j)
+ nextMatches = nextMatches && curChar === next.charAt(j)
+ prevMatches = prevMatches && curChar === prev.charAt(j)
+ if (!nextMatches && !prevMatches) {
+ j ++
+ break
+ }
+ }
+ prev = current
+ if (j === cl) {
+ abbrevs[current] = current
+ continue
+ }
+ for (var a = current.substr(0, j) ; j <= cl ; j ++) {
+ abbrevs[a] = current
+ a += current.charAt(j)
+ }
+ }
+ return abbrevs
+}
+
+function lexSort (a, b) {
+ return a === b ? 0 : a > b ? 1 : -1
+}
+
+
+// tests
+if (module === require.main) {
+
+var assert = require("assert")
+var util = require("util")
+
+console.log("running tests")
+function test (list, expect) {
+ var actual = abbrev(list)
+ assert.deepEqual(actual, expect,
+ "abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+
+ "actual: "+util.inspect(actual))
+ actual = abbrev.apply(exports, list)
+ assert.deepEqual(abbrev.apply(exports, list), expect,
+ "abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+
+ "actual: "+util.inspect(actual))
+}
+
+test([ "ruby", "ruby", "rules", "rules", "rules" ],
+{ rub: 'ruby'
+, ruby: 'ruby'
+, rul: 'rules'
+, rule: 'rules'
+, rules: 'rules'
+})
+test(["fool", "foom", "pool", "pope"],
+{ fool: 'fool'
+, foom: 'foom'
+, poo: 'pool'
+, pool: 'pool'
+, pop: 'pope'
+, pope: 'pope'
+})
+test(["a", "ab", "abc", "abcd", "abcde", "acde"],
+{ a: 'a'
+, ab: 'ab'
+, abc: 'abc'
+, abcd: 'abcd'
+, abcde: 'abcde'
+, ac: 'acde'
+, acd: 'acde'
+, acde: 'acde'
+})
+
+console.log("pass")
+
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/package.json b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/package.json
new file mode 100644
index 0000000..55ed011
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "abbrev",
+ "version": "1.0.4",
+ "description": "Like ruby's abbrev module, but in js",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ "main": "./lib/abbrev.js",
+ "scripts": {
+ "test": "node lib/abbrev.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/isaacs/abbrev-js"
+ },
+ "license": {
+ "type": "MIT",
+ "url": "https://github.com/isaacs/abbrev-js/raw/master/LICENSE"
+ },
+ "readme": "# abbrev-js\n\nJust like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).\n\nUsage:\n\n var abbrev = require(\"abbrev\");\n abbrev(\"foo\", \"fool\", \"folding\", \"flop\");\n \n // returns:\n { fl: 'flop'\n , flo: 'flop'\n , flop: 'flop'\n , fol: 'folding'\n , fold: 'folding'\n , foldi: 'folding'\n , foldin: 'folding'\n , folding: 'folding'\n , foo: 'foo'\n , fool: 'fool'\n }\n\nThis is handy for command-line scripts, or other cases where you want to be able to accept shorthands.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/abbrev-js/issues"
+ },
+ "_id": "abbrev@1.0.4",
+ "_from": "abbrev@1"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/package.json b/blackberry10/node_modules/plugman/node_modules/nopt/package.json
new file mode 100644
index 0000000..078f928
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/package.json
@@ -0,0 +1,35 @@
+{
+ "name": "nopt",
+ "version": "1.0.10",
+ "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "main": "lib/nopt.js",
+ "scripts": {
+ "test": "node lib/nopt.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/isaacs/nopt"
+ },
+ "bin": {
+ "nopt": "./bin/nopt.js"
+ },
+ "license": {
+ "type": "MIT",
+ "url": "https://github.com/isaacs/nopt/raw/master/LICENSE"
+ },
+ "dependencies": {
+ "abbrev": "1"
+ },
+ "readme": "If you want to write an option parser, and have it be good, there are\ntwo ways to do it. The Right Way, and the Wrong Way.\n\nThe Wrong Way is to sit down and write an option parser. We've all done\nthat.\n\nThe Right Way is to write some complex configurable program with so many\noptions that you go half-insane just trying to manage them all, and put\nit off with duct-tape solutions until you see exactly to the core of the\nproblem, and finally snap and write an awesome option parser.\n\nIf you want to write an option parser, don't write an option parser.\nWrite a package manager, or a source control system, or a service\nrestarter, or an operating system. You probably won't end up with a\ngood one of those, but if you don't give up, and you are relentless and\ndiligent enough in your procrastination, you may just end up with a very\nnice option parser.\n\n## USAGE\n\n // my-program.js\n var nopt = require(\"nopt\")\n , Stream = require(\"stream\").Strea
m\n , path = require(\"path\")\n , knownOpts = { \"foo\" : [String, null]\n , \"bar\" : [Stream, Number]\n , \"baz\" : path\n , \"bloo\" : [ \"big\", \"medium\", \"small\" ]\n , \"flag\" : Boolean\n , \"pick\" : Boolean\n , \"many\" : [String, Array]\n }\n , shortHands = { \"foofoo\" : [\"--foo\", \"Mr. Foo\"]\n , \"b7\" : [\"--bar\", \"7\"]\n , \"m\" : [\"--bloo\", \"medium\"]\n , \"p\" : [\"--pick\"]\n , \"f\" : [\"--flag\"]\n }\n // everything is optional.\n // knownOpts and shorthands default to {}\n // arg list defaults to process.argv\n // slice defaults to 2\n , parsed = nopt(knownOpts, shortHands, process.argv, 2)\n console.log(parsed)\n\nThis would give you su
pport for any of the following:\n\n```bash\n$ node my-program.js --foo \"blerp\" --no-flag\n{ \"foo\" : \"blerp\", \"flag\" : false }\n\n$ node my-program.js ---bar 7 --foo \"Mr. Hand\" --flag\n{ bar: 7, foo: \"Mr. Hand\", flag: true }\n\n$ node my-program.js --foo \"blerp\" -f -----p\n{ foo: \"blerp\", flag: true, pick: true }\n\n$ node my-program.js -fp --foofoo\n{ foo: \"Mr. Foo\", flag: true, pick: true }\n\n$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.\n{ foo: \"Mr. Foo\", argv: { remain: [\"-fp\"] } }\n\n$ node my-program.js --blatzk 1000 -fp # unknown opts are ok.\n{ blatzk: 1000, flag: true, pick: true }\n\n$ node my-program.js --blatzk true -fp # but they need a value\n{ blatzk: true, flag: true, pick: true }\n\n$ node my-program.js --no-blatzk -fp # unless they start with \"no-\"\n{ blatzk: false, flag: true, pick: true }\n\n$ node my-program.js --baz b/a/z # known paths are resolved.\n{ baz: \"/Users/isaacs/b/a/z\" }\n\n# if Array is one of the types,
then it can take many\n# values, and will always be an array. The other types provided\n# specify what types are allowed in the list.\n\n$ node my-program.js --many 1 --many null --many foo\n{ many: [\"1\", \"null\", \"foo\"] }\n\n$ node my-program.js --many foo\n{ many: [\"foo\"] }\n```\n\nRead the tests at the bottom of `lib/nopt.js` for more examples of\nwhat this puppy can do.\n\n## Types\n\nThe following types are supported, and defined on `nopt.typeDefs`\n\n* String: A normal string. No parsing is done.\n* path: A file system path. Gets resolved against cwd if not absolute.\n* url: A url. If it doesn't parse, it isn't accepted.\n* Number: Must be numeric.\n* Date: Must parse as a date. If it does, and `Date` is one of the options,\n then it will return a Date object, not a string.\n* Boolean: Must be either `true` or `false`. If an option is a boolean,\n then it does not need a value, and its presence will imply `true` as\n the value. To negate boolean flags, do `--n
o-whatever` or `--whatever\n false`\n* NaN: Means that the option is strictly not allowed. Any value will\n fail.\n* Stream: An object matching the \"Stream\" class in node. Valuable\n for use when validating programmatically. (npm uses this to let you\n supply any WriteStream on the `outfd` and `logfd` config options.)\n* Array: If `Array` is specified as one of the types, then the value\n will be parsed as a list of options. This means that multiple values\n can be specified, and that the value will always be an array.\n\nIf a type is an array of values not on this list, then those are\nconsidered valid values. For instance, in the example above, the\n`--bloo` option can only be one of `\"big\"`, `\"medium\"`, or `\"small\"`,\nand any other value will be rejected.\n\nWhen parsing unknown fields, `\"true\"`, `\"false\"`, and `\"null\"` will be\ninterpreted as their JavaScript equivalents, and numeric values will be\ninterpreted as a number.\n\nYou can also mix types and
values, or multiple types, in a list. For\ninstance `{ blah: [Number, null] }` would allow a value to be set to\neither a Number or null.\n\nTo define a new type, add it to `nopt.typeDefs`. Each item in that\nhash is an object with a `type` member and a `validate` method. The\n`type` member is an object that matches what goes in the type list. The\n`validate` method is a function that gets called with `validate(data,\nkey, val)`. Validate methods should assign `data[key]` to the valid\nvalue of `val` if it can be handled properly, or return boolean\n`false` if it cannot.\n\nYou can also call `nopt.clean(data, types, typeDefs)` to clean up a\nconfig object and remove its invalid properties.\n\n## Error Handling\n\nBy default, nopt outputs a warning to standard error when invalid\noptions are found. You can change this behavior by assigning a method\nto `nopt.invalidHandler`. This method will be called with\nthe offending `nopt.invalidHandler(key, val, types)`.\n\nIf no `nopt.i
nvalidHandler` is assigned, then it will console.error\nits whining. If it is assigned to boolean `false` then the warning is\nsuppressed.\n\n## Abbreviations\n\nYes, they are supported. If you define options like this:\n\n```javascript\n{ \"foolhardyelephants\" : Boolean\n, \"pileofmonkeys\" : Boolean }\n```\n\nThen this will work:\n\n```bash\nnode program.js --foolhar --pil\nnode program.js --no-f --pileofmon\n# etc.\n```\n\n## Shorthands\n\nShorthands are a hash of shorter option names to a snippet of args that\nthey expand to.\n\nIf multiple one-character shorthands are all combined, and the\ncombination does not unambiguously match any other option or shorthand,\nthen they will be broken up into their constituent parts. For example:\n\n```json\n{ \"s\" : [\"--loglevel\", \"silent\"]\n, \"g\" : \"--global\"\n, \"f\" : \"--force\"\n, \"p\" : \"--parseable\"\n, \"l\" : \"--long\"\n}\n```\n\n```bash\nnpm ls -sgflp\n# just like doing this:\nnpm ls --loglevel silent --global --for
ce --long --parseable\n```\n\n## The Rest of the args\n\nThe config object returned by nopt is given a special member called\n`argv`, which is an object with the following fields:\n\n* `remain`: The remaining args after all the parsing has occurred.\n* `original`: The args as they originally appeared.\n* `cooked`: The args after flags and shorthands are expanded.\n\n## Slicing\n\nNode programs are called with more or less the exact argv as it appears\nin C land, after the v8 and node-specific options have been plucked off.\nAs such, `argv[0]` is always `node` and `argv[1]` is always the\nJavaScript program being run.\n\nThat's usually not very useful to you. So they're sliced off by\ndefault. If you want them, then you can pass in `0` as the last\nargument, or any other number that you'd like to slice off the start of\nthe list.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/nopt/issues"
+ },
+ "_id": "nopt@1.0.10",
+ "_from": "nopt@1.0.x"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/LICENSE b/blackberry10/node_modules/plugman/node_modules/osenv/LICENSE
new file mode 100644
index 0000000..74489e2
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/LICENSE
@@ -0,0 +1,25 @@
+Copyright (c) Isaac Z. Schlueter
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. 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.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 THE FOUNDATION OR CONTRIBUTORS
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/README.md b/blackberry10/node_modules/plugman/node_modules/osenv/README.md
new file mode 100644
index 0000000..08fd900
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/README.md
@@ -0,0 +1,63 @@
+# osenv
+
+Look up environment settings specific to different operating systems.
+
+## Usage
+
+```javascript
+var osenv = require('osenv')
+var path = osenv.path()
+var user = osenv.user()
+// etc.
+
+// Some things are not reliably in the env, and have a fallback command:
+var h = osenv.hostname(function (er, hostname) {
+ h = hostname
+})
+// This will still cause it to be memoized, so calling osenv.hostname()
+// is now an immediate operation.
+
+// You can always send a cb, which will get called in the nextTick
+// if it's been memoized, or wait for the fallback data if it wasn't
+// found in the environment.
+osenv.hostname(function (er, hostname) {
+ if (er) console.error('error looking up hostname')
+ else console.log('this machine calls itself %s', hostname)
+})
+```
+
+## osenv.hostname()
+
+The machine name. Calls `hostname` if not found.
+
+## osenv.user()
+
+The currently logged-in user. Calls `whoami` if not found.
+
+## osenv.prompt()
+
+Either PS1 on unix, or PROMPT on Windows.
+
+## osenv.tmpdir()
+
+The place where temporary files should be created.
+
+## osenv.home()
+
+No place like it.
+
+## osenv.path()
+
+An array of the places that the operating system will search for
+executables.
+
+## osenv.editor()
+
+Return the executable name of the editor program. This uses the EDITOR
+and VISUAL environment variables, and falls back to `vi` on Unix, or
+`notepad.exe` on Windows.
+
+## osenv.shell()
+
+The SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash'
+or 'cmd'.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/osenv.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/osenv.js b/blackberry10/node_modules/plugman/node_modules/osenv/osenv.js
new file mode 100644
index 0000000..e3367a7
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/osenv.js
@@ -0,0 +1,80 @@
+var isWindows = process.platform === 'win32'
+var windir = isWindows ? process.env.windir || 'C:\\Windows' : null
+var path = require('path')
+var exec = require('child_process').exec
+
+// looking up envs is a bit costly.
+// Also, sometimes we want to have a fallback
+// Pass in a callback to wait for the fallback on failures
+// After the first lookup, always returns the same thing.
+function memo (key, lookup, fallback) {
+ var fell = false
+ var falling = false
+ exports[key] = function (cb) {
+ var val = lookup()
+ if (!val && !fell && !falling && fallback) {
+ fell = true
+ falling = true
+ exec(fallback, function (er, output, stderr) {
+ falling = false
+ if (er) return // oh well, we tried
+ val = output.trim()
+ })
+ }
+ exports[key] = function (cb) {
+ if (cb) process.nextTick(cb.bind(null, null, val))
+ return val
+ }
+ if (cb && !falling) process.nextTick(cb.bind(null, null, val))
+ return val
+ }
+}
+
+memo('user', function () {
+ return ( isWindows
+ ? process.env.USERDOMAIN + '\\' + process.env.USERNAME
+ : process.env.USER
+ )
+}, 'whoami')
+
+memo('prompt', function () {
+ return isWindows ? process.env.PROMPT : process.env.PS1
+})
+
+memo('hostname', function () {
+ return isWindows ? process.env.COMPUTERNAME : process.env.HOSTNAME
+}, 'hostname')
+
+memo('tmpdir', function () {
+ var t = isWindows ? 'temp' : 'tmp'
+ return process.env.TMPDIR ||
+ process.env.TMP ||
+ process.env.TEMP ||
+ ( exports.home() ? path.resolve(exports.home(), t)
+ : isWindows ? path.resolve(windir, t)
+ : '/tmp'
+ )
+})
+
+memo('home', function () {
+ return ( isWindows ? process.env.USERPROFILE
+ : process.env.HOME
+ )
+})
+
+memo('path', function () {
+ return (process.env.PATH ||
+ process.env.Path ||
+ process.env.path).split(isWindows ? ';' : ':')
+})
+
+memo('editor', function () {
+ return process.env.EDITOR ||
+ process.env.VISUAL ||
+ (isWindows ? 'notepad.exe' : 'vi')
+})
+
+memo('shell', function () {
+ return isWindows ? process.env.ComSpec || 'cmd'
+ : process.env.SHELL || 'bash'
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/package.json b/blackberry10/node_modules/plugman/node_modules/osenv/package.json
new file mode 100644
index 0000000..cf442b1
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "osenv",
+ "version": "0.0.3",
+ "main": "osenv.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.2.5"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/osenv"
+ },
+ "keywords": [
+ "environment",
+ "variable",
+ "home",
+ "tmpdir",
+ "path",
+ "prompt",
+ "ps1"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "BSD",
+ "description": "Look up environment settings specific to different operating systems",
+ "readme": "# osenv\n\nLook up environment settings specific to different operating systems.\n\n## Usage\n\n```javascript\nvar osenv = require('osenv')\nvar path = osenv.path()\nvar user = osenv.user()\n// etc.\n\n// Some things are not reliably in the env, and have a fallback command:\nvar h = osenv.hostname(function (er, hostname) {\n h = hostname\n})\n// This will still cause it to be memoized, so calling osenv.hostname()\n// is now an immediate operation.\n\n// You can always send a cb, which will get called in the nextTick\n// if it's been memoized, or wait for the fallback data if it wasn't\n// found in the environment.\nosenv.hostname(function (er, hostname) {\n if (er) console.error('error looking up hostname')\n else console.log('this machine calls itself %s', hostname)\n})\n```\n\n## osenv.hostname()\n\nThe machine name. Calls `hostname` if not found.\n\n## osenv.user()\n\nThe currently logged-in user. Calls `whoami` if not found.\n\n## osenv.prompt()\n\nEither PS1 o
n unix, or PROMPT on Windows.\n\n## osenv.tmpdir()\n\nThe place where temporary files should be created.\n\n## osenv.home()\n\nNo place like it.\n\n## osenv.path()\n\nAn array of the places that the operating system will search for\nexecutables.\n\n## osenv.editor() \n\nReturn the executable name of the editor program. This uses the EDITOR\nand VISUAL environment variables, and falls back to `vi` on Unix, or\n`notepad.exe` on Windows.\n\n## osenv.shell()\n\nThe SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash'\nor 'cmd'.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/osenv/issues"
+ },
+ "_id": "osenv@0.0.3",
+ "_from": "osenv@0.0.x"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/test/unix.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/test/unix.js b/blackberry10/node_modules/plugman/node_modules/osenv/test/unix.js
new file mode 100644
index 0000000..b72eb0b
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/test/unix.js
@@ -0,0 +1,76 @@
+// only run this test on windows
+// pretending to be another platform is too hacky, since it breaks
+// how the underlying system looks up module paths and runs
+// child processes, and all that stuff is cached.
+if (process.platform === 'win32') {
+ console.log('TAP Version 13\n' +
+ '1..0\n' +
+ '# Skip unix tests, this is not unix\n')
+ return
+}
+var tap = require('tap')
+
+// like unix, but funny
+process.env.USER = 'sirUser'
+process.env.HOME = '/home/sirUser'
+process.env.HOSTNAME = 'my-machine'
+process.env.TMPDIR = '/tmpdir'
+process.env.TMP = '/tmp'
+process.env.TEMP = '/temp'
+process.env.PATH = '/opt/local/bin:/usr/local/bin:/usr/bin/:bin'
+process.env.PS1 = '(o_o) $ '
+process.env.EDITOR = 'edit'
+process.env.VISUAL = 'visualedit'
+process.env.SHELL = 'zsh'
+
+
+tap.test('basic unix sanity test', function (t) {
+ var osenv = require('../osenv.js')
+
+ t.equal(osenv.user(), process.env.USER)
+ t.equal(osenv.home(), process.env.HOME)
+ t.equal(osenv.hostname(), process.env.HOSTNAME)
+ t.same(osenv.path(), process.env.PATH.split(':'))
+ t.equal(osenv.prompt(), process.env.PS1)
+ t.equal(osenv.tmpdir(), process.env.TMPDIR)
+
+ // mildly evil, but it's for a test.
+ process.env.TMPDIR = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.tmpdir(), process.env.TMP)
+
+ process.env.TMP = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.tmpdir(), process.env.TEMP)
+
+ process.env.TEMP = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.tmpdir(), '/home/sirUser/tmp')
+
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ osenv.home = function () { return null }
+ t.equal(osenv.tmpdir(), '/tmp')
+
+ t.equal(osenv.editor(), 'edit')
+ process.env.EDITOR = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.editor(), 'visualedit')
+
+ process.env.VISUAL = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.editor(), 'vi')
+
+ t.equal(osenv.shell(), 'zsh')
+ process.env.SHELL = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.shell(), 'bash')
+
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/test/windows.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/test/windows.js b/blackberry10/node_modules/plugman/node_modules/osenv/test/windows.js
new file mode 100644
index 0000000..dd3fe80
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/test/windows.js
@@ -0,0 +1,82 @@
+// only run this test on windows
+// pretending to be another platform is too hacky, since it breaks
+// how the underlying system looks up module paths and runs
+// child processes, and all that stuff is cached.
+if (process.platform !== 'win32') {
+ console.log('TAP Version 13\n' +
+ '1..0\n' +
+ '# Skip windows tests, this is not windows\n')
+ return
+}
+
+// load this before clubbing the platform name.
+var tap = require('tap')
+
+process.env.windir = 'C:\\windows'
+process.env.USERDOMAIN = 'some-domain'
+process.env.USERNAME = 'sirUser'
+process.env.USERPROFILE = 'C:\\Users\\sirUser'
+process.env.COMPUTERNAME = 'my-machine'
+process.env.TMPDIR = 'C:\\tmpdir'
+process.env.TMP = 'C:\\tmp'
+process.env.TEMP = 'C:\\temp'
+process.env.Path = 'C:\\Program Files\\;C:\\Binary Stuff\\bin'
+process.env.PROMPT = '(o_o) $ '
+process.env.EDITOR = 'edit'
+process.env.VISUAL = 'visualedit'
+process.env.ComSpec = 'some-com'
+
+tap.test('basic windows sanity test', function (t) {
+ var osenv = require('../osenv.js')
+
+ var osenv = require('../osenv.js')
+
+ t.equal(osenv.user(),
+ process.env.USERDOMAIN + '\\' + process.env.USERNAME)
+ t.equal(osenv.home(), process.env.USERPROFILE)
+ t.equal(osenv.hostname(), process.env.COMPUTERNAME)
+ t.same(osenv.path(), process.env.Path.split(';'))
+ t.equal(osenv.prompt(), process.env.PROMPT)
+ t.equal(osenv.tmpdir(), process.env.TMPDIR)
+
+ // mildly evil, but it's for a test.
+ process.env.TMPDIR = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.tmpdir(), process.env.TMP)
+
+ process.env.TMP = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.tmpdir(), process.env.TEMP)
+
+ process.env.TEMP = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.tmpdir(), 'C:\\Users\\sirUser\\temp')
+
+ process.env.TEMP = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ osenv.home = function () { return null }
+ t.equal(osenv.tmpdir(), 'C:\\windows\\temp')
+
+ t.equal(osenv.editor(), 'edit')
+ process.env.EDITOR = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.editor(), 'visualedit')
+
+ process.env.VISUAL = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.editor(), 'notepad.exe')
+
+ t.equal(osenv.shell(), 'some-com')
+ process.env.ComSpec = ''
+ delete require.cache[require.resolve('../osenv.js')]
+ var osenv = require('../osenv.js')
+ t.equal(osenv.shell(), 'cmd')
+
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/.npmignore b/blackberry10/node_modules/plugman/node_modules/plist/.npmignore
new file mode 100644
index 0000000..9daa824
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/.npmignore
@@ -0,0 +1,2 @@
+.DS_Store
+node_modules
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/LICENSE b/blackberry10/node_modules/plugman/node_modules/plist/LICENSE
new file mode 100644
index 0000000..eae87d0
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2010-2011- Nathan Rajlich
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/README.md b/blackberry10/node_modules/plugman/node_modules/plist/README.md
new file mode 100644
index 0000000..c329174
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/README.md
@@ -0,0 +1,62 @@
+# node-plist
+
+Provides facilities for reading and writing Mac OS X Plist (property list) files. These are often used in programming OS X and iOS applications, as well as the iTunes
+configuration XML file.
+
+Plist files represent stored programming "object"s. They are very similar
+to JSON. A valid Plist file is representable as a native JavaScript Object and vice-versa.
+
+## Tests
+`npm test`
+
+## Usage
+Parsing a plist from filename
+``` javascript
+var plist = require('plist');
+
+var obj = plist.parseFileSync('myPlist.plist');
+console.log(JSON.stringify(obj));
+```
+
+Parsing a plist from string payload
+``` javascript
+var plist = require('plist');
+
+var obj = plist.parseStringSync('<plist><string>Hello World!</string></plist>');
+console.log(obj); // Hello World!
+```
+
+Given an existing JavaScript Object, you can turn it into an XML document that complies with the plist DTD
+
+``` javascript
+var plist = require('plist');
+
+console.log(plist.build({'foo' : 'bar'}).toString());
+```
+
+
+
+### Deprecated methods
+These functions work, but may be removed in a future release. version 0.4.x added Sync versions of these functions.
+
+Parsing a plist from filename
+``` javascript
+var plist = require('plist');
+
+plist.parseFile('myPlist.plist', function(err, obj) {
+ if (err) throw err;
+
+ console.log(JSON.stringify(obj));
+});
+```
+
+Parsing a plist from string payload
+``` javascript
+var plist = require('plist');
+
+plist.parseString('<plist><string>Hello World!</string></plist>', function(err, obj) {
+ if (err) throw err;
+
+ console.log(obj[0]); // Hello World!
+});
+```
[02/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/package.json b/blackberry10/node_modules/plugman/node_modules/plist/package.json
new file mode 100644
index 0000000..ea095c9
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/package.json
@@ -0,0 +1,58 @@
+{
+ "name": "plist",
+ "description": "Mac OS X Plist parser/builder for NodeJS. Convert a Plist file or string into a native JS object and native JS object into a Plist file.",
+ "version": "0.4.3",
+ "author": {
+ "name": "Nathan Rajlich",
+ "email": "nathan@tootallnate.net"
+ },
+ "contributors": [
+ {
+ "name": "Hans Huebner",
+ "email": "hans.huebner@gmail.com"
+ },
+ {
+ "name": "Pierre Metrailler"
+ },
+ {
+ "name": "Mike Reinstein",
+ "email": "reinstein.mike@gmail.com"
+ },
+ {
+ "name": "Vladimir Tsvang"
+ },
+ {
+ "name": "Mathieu D'Amours"
+ }
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/TooTallNate/node-plist.git"
+ },
+ "keywords": [
+ "apple",
+ "mac",
+ "plist",
+ "parser",
+ "xml"
+ ],
+ "main": "./lib/plist",
+ "dependencies": {
+ "xmlbuilder": "0.4.x",
+ "xmldom": "0.1.x"
+ },
+ "devDependencies": {},
+ "scripts": {
+ "test": "nodeunit tests"
+ },
+ "engines": {
+ "node": ">= 0.1.100"
+ },
+ "readme": "# node-plist\n\nProvides facilities for reading and writing Mac OS X Plist (property list) files. These are often used in programming OS X and iOS applications, as well as the iTunes\nconfiguration XML file.\n\nPlist files represent stored programming \"object\"s. They are very similar\nto JSON. A valid Plist file is representable as a native JavaScript Object and vice-versa.\n\n## Tests\n`npm test`\n\n## Usage\nParsing a plist from filename\n``` javascript\nvar plist = require('plist');\n\nvar obj = plist.parseFileSync('myPlist.plist');\nconsole.log(JSON.stringify(obj));\n```\n\nParsing a plist from string payload\n``` javascript\nvar plist = require('plist');\n\nvar obj = plist.parseStringSync('<plist><string>Hello World!</string></plist>');\nconsole.log(obj); // Hello World!\n```\n\nGiven an existing JavaScript Object, you can turn it into an XML document that complies with the plist DTD\n\n``` javascript\nvar plist = require('plist');\n\nconsole.log(plist.build({'f
oo' : 'bar'}).toString());\n```\n\n\n\n### Deprecated methods\nThese functions work, but may be removed in a future release. version 0.4.x added Sync versions of these functions.\n\nParsing a plist from filename\n``` javascript\nvar plist = require('plist');\n\nplist.parseFile('myPlist.plist', function(err, obj) {\n if (err) throw err;\n\n console.log(JSON.stringify(obj));\n});\n```\n\nParsing a plist from string payload\n``` javascript\nvar plist = require('plist');\n\nplist.parseString('<plist><string>Hello World!</string></plist>', function(err, obj) {\n if (err) throw err;\n\n console.log(obj[0]); // Hello World!\n});\n```\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/TooTallNate/node-plist/issues"
+ },
+ "_id": "plist@0.4.3",
+ "_from": "plist@0.4.x"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/tests/Cordova.plist
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/tests/Cordova.plist b/blackberry10/node_modules/plugman/node_modules/plist/tests/Cordova.plist
new file mode 100644
index 0000000..362b754
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/tests/Cordova.plist
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+#
+-->
+<plist version="1.0">
+<dict>
+ <key>UIWebViewBounce</key>
+ <true/>
+ <key>TopActivityIndicator</key>
+ <string>gray</string>
+ <key>EnableLocation</key>
+ <false/>
+ <key>EnableViewportScale</key>
+ <false/>
+ <key>AutoHideSplashScreen</key>
+ <true/>
+ <key>ShowSplashScreenSpinner</key>
+ <true/>
+ <key>MediaPlaybackRequiresUserAction</key>
+ <false/>
+ <key>AllowInlineMediaPlayback</key>
+ <false/>
+ <key>OpenAllWhitelistURLsInWebView</key>
+ <false/>
+ <key>BackupWebStorage</key>
+ <true/>
+ <key>ExternalHosts</key>
+ <array>
+ <string>*</string>
+ </array>
+ <key>Plugins</key>
+ <dict>
+ <key>Device</key>
+ <string>CDVDevice</string>
+ <key>Logger</key>
+ <string>CDVLogger</string>
+ <key>Compass</key>
+ <string>CDVLocation</string>
+ <key>Accelerometer</key>
+ <string>CDVAccelerometer</string>
+ <key>Camera</key>
+ <string>CDVCamera</string>
+ <key>NetworkStatus</key>
+ <string>CDVConnection</string>
+ <key>Contacts</key>
+ <string>CDVContacts</string>
+ <key>Debug Console</key>
+ <string>CDVDebugConsole</string>
+ <key>Echo</key>
+ <string>CDVEcho</string>
+ <key>File</key>
+ <string>CDVFile</string>
+ <key>FileTransfer</key>
+ <string>CDVFileTransfer</string>
+ <key>Geolocation</key>
+ <string>CDVLocation</string>
+ <key>Notification</key>
+ <string>CDVNotification</string>
+ <key>Media</key>
+ <string>CDVSound</string>
+ <key>Capture</key>
+ <string>CDVCapture</string>
+ <key>SplashScreen</key>
+ <string>CDVSplashScreen</string>
+ <key>Battery</key>
+ <string>CDVBattery</string>
+ </dict>
+</dict>
+</plist>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/tests/Xcode-Info.plist
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/tests/Xcode-Info.plist b/blackberry10/node_modules/plugman/node_modules/plist/tests/Xcode-Info.plist
new file mode 100644
index 0000000..4c4f934
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/tests/Xcode-Info.plist
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFiles</key>
+ <array/>
+ <key>CFBundleIdentifier</key>
+ <string>com.joshfire.ads</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>CFBundleAllowMixedLocalizations</key>
+ <true/>
+</dict>
+</plist>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/tests/Xcode-PhoneGap.plist
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/tests/Xcode-PhoneGap.plist b/blackberry10/node_modules/plugman/node_modules/plist/tests/Xcode-PhoneGap.plist
new file mode 100644
index 0000000..35c426d
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/tests/Xcode-PhoneGap.plist
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>TopActivityIndicator</key>
+ <string>gray</string>
+ <key>EnableLocation</key>
+ <false/>
+ <key>EnableViewportScale</key>
+ <false/>
+ <key>AutoHideSplashScreen</key>
+ <true/>
+ <key>ShowSplashScreenSpinner</key>
+ <true/>
+ <key>MediaPlaybackRequiresUserAction</key>
+ <false/>
+ <key>AllowInlineMediaPlayback</key>
+ <false/>
+ <key>OpenAllWhitelistURLsInWebView</key>
+ <false/>
+ <key>ExternalHosts</key>
+ <array>
+ <string>*</string>
+ </array>
+ <key>Plugins</key>
+ <dict>
+ <key>com.phonegap.accelerometer</key>
+ <string>PGAccelerometer</string>
+ <key>com.phonegap.camera</key>
+ <string>PGCamera</string>
+ <key>com.phonegap.connection</key>
+ <string>PGConnection</string>
+ <key>com.phonegap.contacts</key>
+ <string>PGContacts</string>
+ <key>com.phonegap.debugconsole</key>
+ <string>PGDebugConsole</string>
+ <key>com.phonegap.file</key>
+ <string>PGFile</string>
+ <key>com.phonegap.filetransfer</key>
+ <string>PGFileTransfer</string>
+ <key>com.phonegap.geolocation</key>
+ <string>PGLocation</string>
+ <key>com.phonegap.notification</key>
+ <string>PGNotification</string>
+ <key>com.phonegap.media</key>
+ <string>PGSound</string>
+ <key>com.phonegap.mediacapture</key>
+ <string>PGCapture</string>
+ <key>com.phonegap.splashscreen</key>
+ <string>PGSplashScreen</string>
+ <key>com.joshfire.sas</key>
+ <string>PGSmartAdServer</string>
+ </dict>
+</dict>
+</plist>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/tests/airplay.xml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/tests/airplay.xml b/blackberry10/node_modules/plugman/node_modules/plist/tests/airplay.xml
new file mode 100644
index 0000000..0fe6411
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/tests/airplay.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>duration</key>
+ <real>5555.0495000000001</real>
+ <key>loadedTimeRanges</key>
+ <array>
+ <dict>
+ <key>duration</key>
+ <real>5555.0495000000001</real>
+ <key>start</key>
+ <real>0.0</real>
+ </dict>
+ </array>
+ <key>playbackBufferEmpty</key>
+ <true/>
+ <key>playbackBufferFull</key>
+ <false/>
+ <key>playbackLikelyToKeepUp</key>
+ <true/>
+ <key>position</key>
+ <real>4.6269989039999997</real>
+ <key>rate</key>
+ <real>1</real>
+ <key>readyToPlay</key>
+ <true/>
+ <key>seekableTimeRanges</key>
+ <array>
+ <dict>
+ <key>duration</key>
+ <real>5555.0495000000001</real>
+ <key>start</key>
+ <real>0.0</real>
+ </dict>
+ </array>
+</dict>
+</plist>
[10/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/index.html
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/index.html b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/index.html
new file mode 100644
index 0000000..8c8e7c9
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/index.html
@@ -0,0 +1,1726 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <title>Underscore.js</title>
+ <style>
+ body {
+ font-size: 16px;
+ line-height: 24px;
+ background: #f0f0e5;
+ color: #252519;
+ font-family: "Palatino Linotype", "Book Antiqua", Palatino, FreeSerif, serif;
+ }
+ div.container {
+ width: 720px;
+ margin: 50px 0 50px 50px;
+ }
+ p {
+ width: 550px;
+ }
+ #documentation p {
+ margin-bottom: 4px;
+ }
+ a, a:visited {
+ padding: 0 2px;
+ text-decoration: none;
+ background: #dadaba;
+ color: #252519;
+ }
+ a:active, a:hover {
+ color: #000;
+ background: #f0c095;
+ }
+ h1, h2, h3, h4, h5, h6 {
+ margin-top: 40px;
+ }
+ b.header {
+ font-size: 18px;
+ }
+ span.alias {
+ font-size: 14px;
+ font-style: italic;
+ margin-left: 20px;
+ }
+ table, tr, td {
+ margin: 0; padding: 0;
+ }
+ td {
+ padding: 2px 12px 2px 0;
+ }
+ ul {
+ list-style-type: circle;
+ padding: 0 0 0 20px;
+ }
+ li {
+ width: 500px;
+ margin-bottom: 10px;
+ }
+ code, pre, tt {
+ font-family: Monaco, Consolas, "Lucida Console", monospace;
+ font-size: 12px;
+ line-height: 18px;
+ color: #555529;
+ }
+ code {
+ margin-left: 20px;
+ }
+ pre {
+ font-size: 12px;
+ padding: 2px 0 2px 12px;
+ border-left: 6px solid #aaaa99;
+ margin: 0px 0 30px;
+ }
+ </style>
+</head>
+<body>
+
+ <div class="container">
+
+ <h1>Underscore.js</h1>
+
+ <p>
+ <a href="http://github.com/documentcloud/underscore/">Underscore</a> is a
+ utility-belt library for JavaScript that provides a lot of the
+ functional programming support that you would expect in
+ <a href="http://prototypejs.org/api">Prototype.js</a>
+ (or <a href="http://www.ruby-doc.org/core/classes/Enumerable.html">Ruby</a>),
+ but without extending any of the built-in JavaScript objects. It's the
+ tie to go along with <a href="http://docs.jquery.com">jQuery</a>'s tux.
+ </p>
+
+ <p>
+ Underscore provides 60-odd functions that support both the usual
+ functional suspects: <b>map</b>, <b>select</b>, <b>invoke</b> —
+ as well as more specialized helpers: function binding, javascript
+ templating, deep equality testing, and so on. It delegates to built-in
+ functions, if present, so modern browsers will use the
+ native implementations of <b>forEach</b>, <b>map</b>, <b>reduce</b>,
+ <b>filter</b>, <b>every</b>, <b>some</b> and <b>indexOf</b>.
+ </p>
+
+ <p>
+ A complete <a href="test/test.html">Test & Benchmark Suite</a>
+ is included for your perusal.
+ </p>
+
+ <p>
+ You may also read through the <a href="docs/underscore.html">annotated source code</a>.
+ </p>
+
+ <p>
+ The project is
+ <a href="http://github.com/documentcloud/underscore/">hosted on GitHub</a>.
+ You can report bugs and discuss features on the
+ <a href="http://github.com/documentcloud/underscore/issues">issues page</a>,
+ on Freenode in the <tt>#documentcloud</tt> channel,
+ or send tweets to <a href="http://twitter.com/documentcloud">@documentcloud</a>.
+ </p>
+
+ <p>
+ <i>Underscore is an open-source component of <a href="http://documentcloud.org/">DocumentCloud</a>.</i>
+ </p>
+
+ <h2>Downloads <i style="padding-left: 12px; font-size:12px;">(Right-click, and use "Save As")</i></h2>
+
+ <table>
+ <tr>
+ <td><a href="underscore.js">Development Version (1.2.1)</a></td>
+ <td><i>33kb, Uncompressed with Comments</i></td>
+ </tr>
+ <tr>
+ <td><a href="underscore-min.js">Production Version (1.2.1)</a></td>
+ <td><i>< 4kb, Minified and Gzipped</i></td>
+ </tr>
+ </table>
+
+ <h2>Table of Contents</h2>
+
+ <a href="#styles">Object-Oriented and Functional Styles</a>
+
+ <p>
+ <b>Collections</b>
+ <br />
+ <span class="methods"><a href="#each">each</a>, <a href="#map">map</a>,
+ <a href="#reduce">reduce</a>, <a href="#reduceRight">reduceRight</a>,
+ <a href="#find">find</a>, <a href="#filter">filter</a>,
+ <a href="#reject">reject</a>, <a href="#all">all</a>,
+ <a href="#any">any</a>, <a href="#include">include</a>,
+ <a href="#invoke">invoke</a>, <a href="#pluck">pluck</a>,
+ <a href="#max">max</a>, <a href="#min">min</a>,
+ <a href="#sortBy">sortBy</a>, <a href="#groupBy">groupBy</a>,
+ <a href="#sortedIndex">sortedIndex</a>, <a href="#shuffle">shuffle</a>,
+ <a href="#toArray">toArray</a>, <a href="#size">size</a></span>
+ </p>
+
+ <p>
+ <b>Arrays</b>
+ <br />
+ <span class="methods"><a href="#first">first</a>, <a href="#initial">initial</a>, <a href="#last">last</a>, <a href="#rest">rest</a>,
+ <a href="#compact">compact</a>, <a href="#flatten">flatten</a>, <a href="#without">without</a>,
+ <a href="#union">union</a>, <a href="#intersection">intersection</a>, <a href="#difference">difference</a>,
+ <a href="#uniq">uniq</a>, <a href="#zip">zip</a>, <a href="#indexOf">indexOf</a>,
+ <a href="#lastIndexOf">lastIndexOf</a>, <a href="#range">range</a></span>
+ </p>
+
+ <p>
+ <b>Functions</b>
+ <br />
+ <span class="methods"><a href="#bind">bind</a>, <a href="#bindAll">bindAll</a>,
+ <a href="#memoize">memoize</a>, <a href="#delay">delay</a>, <a href="#defer">defer</a>,
+ <a href="#throttle">throttle</a>, <a href="#debounce">debounce</a>,
+ <a href="#once">once</a>, <a href="#after">after</a>, <a href="#wrap">wrap</a>, <a href="#compose">compose</a></span>
+ </p>
+
+ <p>
+ <b>Objects</b>
+ <br />
+ <span class="methods"><a href="#keys">keys</a>, <a href="#values">values</a>,
+ <a href="#functions">functions</a>, <a href="#extend">extend</a>, <a href="#defaults">defaults</a>, <a href="#clone">clone</a>, <a href="#tap">tap</a>,
+ <a href="#isEqual">isEqual</a>, <a href="#isEmpty">isEmpty</a>, <a href="#isElement">isElement</a>,
+ <a href="#isArray">isArray</a>, <a href="#isArguments">isArguments</a>, <a href="#isFunction">isFunction</a>, <a href="#isString">isString</a>,
+ <a href="#isNumber">isNumber</a>, <a href="#isBoolean">isBoolean</a>, <a href="#isDate">isDate</a>, <a href="#isRegExp">isRegExp</a>
+ <a href="#isNaN">isNaN</a>, <a href="#isNull">isNull</a>,
+ <a href="#isUndefined">isUndefined</a>
+ </span>
+ </p>
+
+ <p>
+ <b>Utility</b>
+ <br />
+ <span class="methods"><a href="#noConflict">noConflict</a>,
+ <a href="#identity">identity</a>, <a href="#times">times</a>,
+ <a href="#mixin">mixin</a>, <a href="#uniqueId">uniqueId</a>,
+ <a href="#template">template</a></span>
+ </p>
+
+ <p>
+ <b>Chaining</b>
+ <br />
+ <span class="methods"><a href="#chain">chain</a>, <a href="#value">value</a>
+ </p>
+
+ <div id="documentation">
+
+ <h2 id="styles">Object-Oriented and Functional Styles</h2>
+
+ <p>
+ You can use Underscore in either an object-oriented or a functional style,
+ depending on your preference. The following two lines of code are
+ identical ways to double a list of numbers.
+ </p>
+
+ <pre>
+_.map([1, 2, 3], function(n){ return n * 2; });
+_([1, 2, 3]).map(function(n){ return n * 2; });</pre>
+
+ <p>
+ Using the object-oriented style allows you to chain together methods. Calling
+ <tt>chain</tt> on a wrapped object will cause all future method calls to
+ return wrapped objects as well. When you've finished the computation,
+ use <tt>value</tt> to retrieve the final value. Here's an example of chaining
+ together a <b>map/flatten/reduce</b>, in order to get the word count of
+ every word in a song.
+ </p>
+
+<pre>
+var lyrics = [
+ {line : 1, words : "I'm a lumberjack and I'm okay"},
+ {line : 2, words : "I sleep all night and I work all day"},
+ {line : 3, words : "He's a lumberjack and he's okay"},
+ {line : 4, words : "He sleeps all night and he works all day"}
+];
+
+_(lyrics).chain()
+ .map(function(line) { return line.words.split(' '); })
+ .flatten()
+ .reduce(function(counts, word) {
+ counts[word] = (counts[word] || 0) + 1;
+ return counts;
+}, {}).value();
+
+=> {lumberjack : 2, all : 4, night : 2 ... }</pre>
+
+ <p>
+ In addition, the
+ <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/prototype">Array prototype's methods</a>
+ are proxied through the chained Underscore object, so you can slip a
+ <tt>reverse</tt> or a <tt>push</tt> into your chain, and continue to
+ modify the array.
+ </p>
+
+ <h2>Collection Functions (Arrays or Objects)</h2>
+
+ <p id="each">
+ <b class="header">each</b><code>_.each(list, iterator, [context])</code>
+ <span class="alias">Alias: <b>forEach</b></span>
+ <br />
+ Iterates over a <b>list</b> of elements, yielding each in turn to an <b>iterator</b>
+ function. The <b>iterator</b> is bound to the <b>context</b> object, if one is
+ passed. Each invocation of <b>iterator</b> is called with three arguments:
+ <tt>(element, index, list)</tt>. If <b>list</b> is a JavaScript object, <b>iterator</b>'s
+ arguments will be <tt>(value, key, list)</tt>. Delegates to the native
+ <b>forEach</b> function if it exists.
+ </p>
+ <pre>
+_.each([1, 2, 3], function(num){ alert(num); });
+=> alerts each number in turn...
+_.each({one : 1, two : 2, three : 3}, function(num, key){ alert(num); });
+=> alerts each number in turn...</pre>
+
+ <p id="map">
+ <b class="header">map</b><code>_.map(list, iterator, [context])</code>
+ <br />
+ Produces a new array of values by mapping each value in <b>list</b>
+ through a transformation function (<b>iterator</b>). If the native <b>map</b> method
+ exists, it will be used instead. If <b>list</b> is a JavaScript object,
+ <b>iterator</b>'s arguments will be <tt>(value, key, list)</tt>.
+ </p>
+ <pre>
+_.map([1, 2, 3], function(num){ return num * 3; });
+=> [3, 6, 9]
+_.map({one : 1, two : 2, three : 3}, function(num, key){ return num * 3; });
+=> [3, 6, 9]</pre>
+
+ <p id="reduce">
+ <b class="header">reduce</b><code>_.reduce(list, iterator, memo, [context])</code>
+ <span class="alias">Aliases: <b>inject, foldl</b></span>
+ <br />
+ Also known as <b>inject</b> and <b>foldl</b>, <b>reduce</b> boils down a
+ <b>list</b> of values into a single value. <b>Memo</b> is the initial state
+ of the reduction, and each successive step of it should be returned by
+ <b>iterator</b>.
+ </p>
+ <pre>
+var sum = _.reduce([1, 2, 3], function(memo, num){ return memo + num; }, 0);
+=> 6
+</pre>
+
+ <p id="reduceRight">
+ <b class="header">reduceRight</b><code>_.reduceRight(list, iterator, memo, [context])</code>
+ <span class="alias">Alias: <b>foldr</b></span>
+ <br />
+ The right-associative version of <b>reduce</b>. Delegates to the
+ JavaScript 1.8 version of <b>reduceRight</b>, if it exists. <b>Foldr</b>
+ is not as useful in JavaScript as it would be in a language with lazy
+ evaluation.
+ </p>
+ <pre>
+var list = [[0, 1], [2, 3], [4, 5]];
+var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
+=> [4, 5, 2, 3, 0, 1]
+</pre>
+
+ <p id="find">
+ <b class="header">find</b><code>_.find(list, iterator, [context])</code>
+ <span class="alias">Alias: <b>detect</b></span>
+ <br />
+ Looks through each value in the <b>list</b>, returning the first one that
+ passes a truth test (<b>iterator</b>). The function returns as
+ soon as it finds an acceptable element, and doesn't traverse the
+ entire list.
+ </p>
+ <pre>
+var even = _.find([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; });
+=> 2
+</pre>
+
+ <p id="filter">
+ <b class="header">filter</b><code>_.filter(list, iterator, [context])</code>
+ <span class="alias">Alias: <b>select</b></span>
+ <br />
+ Looks through each value in the <b>list</b>, returning an array of all
+ the values that pass a truth test (<b>iterator</b>). Delegates to the
+ native <b>filter</b> method, if it exists.
+ </p>
+ <pre>
+var evens = _.filter([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; });
+=> [2, 4, 6]
+</pre>
+
+ <p id="reject">
+ <b class="header">reject</b><code>_.reject(list, iterator, [context])</code>
+ <br />
+ Returns the values in <b>list</b> without the elements that the truth
+ test (<b>iterator</b>) passes. The opposite of <b>filter</b>.
+ </p>
+ <pre>
+var odds = _.reject([1, 2, 3, 4, 5, 6], function(num){ return num % 2 == 0; });
+=> [1, 3, 5]
+</pre>
+
+ <p id="all">
+ <b class="header">all</b><code>_.all(list, iterator, [context])</code>
+ <span class="alias">Alias: <b>every</b></span>
+ <br />
+ Returns <i>true</i> if all of the values in the <b>list</b> pass the <b>iterator</b>
+ truth test. Delegates to the native method <b>every</b>, if present.
+ </p>
+ <pre>
+_.all([true, 1, null, 'yes'], _.identity);
+=> false
+</pre>
+
+ <p id="any">
+ <b class="header">any</b><code>_.any(list, [iterator], [context])</code>
+ <span class="alias">Alias: <b>some</b></span>
+ <br />
+ Returns <i>true</i> if any of the values in the <b>list</b> pass the
+ <b>iterator</b> truth test. Short-circuits and stops traversing the list
+ if a true element is found. Delegates to the native method <b>some</b>,
+ if present.
+ </p>
+ <pre>
+_.any([null, 0, 'yes', false]);
+=> true
+</pre>
+
+ <p id="include">
+ <b class="header">include</b><code>_.include(list, value)</code>
+ <span class="alias">Alias: <b>contains</b></span>
+ <br />
+ Returns <i>true</i> if the <b>value</b> is present in the <b>list</b>, using
+ <i>===</i> to test equality. Uses <b>indexOf</b> internally, if <b>list</b>
+ is an Array.
+ </p>
+ <pre>
+_.include([1, 2, 3], 3);
+=> true
+</pre>
+
+ <p id="invoke">
+ <b class="header">invoke</b><code>_.invoke(list, methodName, [*arguments])</code>
+ <br />
+ Calls the method named by <b>methodName</b> on each value in the <b>list</b>.
+ Any extra arguments passed to <b>invoke</b> will be forwarded on to the
+ method invocation.
+ </p>
+ <pre>
+_.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
+=> [[1, 5, 7], [1, 2, 3]]
+</pre>
+
+ <p id="pluck">
+ <b class="header">pluck</b><code>_.pluck(list, propertyName)</code>
+ <br />
+ A convenient version of what is perhaps the most common use-case for
+ <b>map</b>: extracting a list of property values.
+ </p>
+ <pre>
+var stooges = [{name : 'moe', age : 40}, {name : 'larry', age : 50}, {name : 'curly', age : 60}];
+_.pluck(stooges, 'name');
+=> ["moe", "larry", "curly"]
+</pre>
+
+ <p id="max">
+ <b class="header">max</b><code>_.max(list, [iterator], [context])</code>
+ <br />
+ Returns the maximum value in <b>list</b>. If <b>iterator</b> is passed,
+ it will be used on each value to generate the criterion by which the
+ value is ranked.
+ </p>
+ <pre>
+var stooges = [{name : 'moe', age : 40}, {name : 'larry', age : 50}, {name : 'curly', age : 60}];
+_.max(stooges, function(stooge){ return stooge.age; });
+=> {name : 'curly', age : 60};
+</pre>
+
+ <p id="min">
+ <b class="header">min</b><code>_.min(list, [iterator], [context])</code>
+ <br />
+ Returns the minimum value in <b>list</b>. If <b>iterator</b> is passed,
+ it will be used on each value to generate the criterion by which the
+ value is ranked.
+ </p>
+ <pre>
+var numbers = [10, 5, 100, 2, 1000];
+_.min(numbers);
+=> 2
+</pre>
+
+ <p id="sortBy">
+ <b class="header">sortBy</b><code>_.sortBy(list, iterator, [context])</code>
+ <br />
+ Returns a sorted copy of <b>list</b>, ranked by the results of running
+ each value through <b>iterator</b>.
+ </p>
+ <pre>
+_.sortBy([1, 2, 3, 4, 5, 6], function(num){ return Math.sin(num); });
+=> [5, 4, 6, 3, 1, 2]
+</pre>
+
+ <p id="groupBy">
+ <b class="header">groupBy</b><code>_.groupBy(list, iterator)</code>
+ <br />
+ Splits a collection into sets, grouped by the result of running each
+ value through <b>iterator</b>. If <b>iterator</b> is a string instead of
+ a function, groups by the property named by <b>iterator</b> on each of
+ the values.
+ </p>
+ <pre>
+_.groupBy([1.3, 2.1, 2.4], function(num){ return Math.floor(num); });
+=> {1: [1.3], 2: [2.1, 2.4]}
+
+_.groupBy(['one', 'two', 'three'], 'length');
+=> {3: ["one", "two"], 5: ["three"]}
+</pre>
+
+ <p id="sortedIndex">
+ <b class="header">sortedIndex</b><code>_.sortedIndex(list, value, [iterator])</code>
+ <br />
+ Uses a binary search to determine the index at which the <b>value</b>
+ <i>should</i> be inserted into the <b>list</b> in order to maintain the <b>list</b>'s
+ sorted order. If an <b>iterator</b> is passed, it will be used to compute
+ the sort ranking of each value.
+ </p>
+ <pre>
+_.sortedIndex([10, 20, 30, 40, 50], 35);
+=> 3
+</pre>
+
+ <p id="shuffle">
+ <b class="header">shuffle</b><code>_.shuffle(list)</code>
+ <br />
+ Returns a shuffled copy of the <b>list</b>, using a version of the
+ <a href="http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle">Fisher-Yates shuffle</a>.
+ </p>
+ <pre>
+_.shuffle([1, 2, 3, 4, 5, 6]);
+=> [4, 1, 6, 3, 5, 2]
+</pre>
+
+ <p id="toArray">
+ <b class="header">toArray</b><code>_.toArray(list)</code>
+ <br />
+ Converts the <b>list</b> (anything that can be iterated over), into a
+ real Array. Useful for transmuting the <b>arguments</b> object.
+ </p>
+ <pre>
+(function(){ return _.toArray(arguments).slice(0); })(1, 2, 3);
+=> [1, 2, 3]
+</pre>
+
+ <p id="size">
+ <b class="header">size</b><code>_.size(list)</code>
+ <br />
+ Return the number of values in the <b>list</b>.
+ </p>
+ <pre>
+_.size({one : 1, two : 2, three : 3});
+=> 3
+</pre>
+
+ <h2>Array Functions</h2>
+
+ <p>
+ <i>Note: All array functions will also work on the <b>arguments</b> object.</i>
+ </p>
+
+ <p id="first">
+ <b class="header">first</b><code>_.first(array, [n])</code>
+ <span class="alias">Alias: <b>head</b></span>
+ <br />
+ Returns the first element of an <b>array</b>. Passing <b>n</b> will
+ return the first <b>n</b> elements of the array.
+ </p>
+ <pre>
+_.first([5, 4, 3, 2, 1]);
+=> 5
+</pre>
+
+ <p id="initial">
+ <b class="header">initial</b><code>_.initial(array, [n])</code>
+ <br />
+ Returns everything but the last entry of the array. Especially useful on
+ the arguments object. Pass <b>n</b> to exclude the last <b>n</b> elements
+ from the result.
+ </p>
+ <pre>
+_.initial([5, 4, 3, 2, 1]);
+=> [5, 4, 3, 2]
+</pre>
+
+ <p id="last">
+ <b class="header">last</b><code>_.last(array, [n])</code>
+ <br />
+ Returns the last element of an <b>array</b>. Passing <b>n</b> will return
+ the last <b>n</b> elements of the array.
+ </p>
+ <pre>
+_.last([5, 4, 3, 2, 1]);
+=> 1
+</pre>
+
+ <p id="rest">
+ <b class="header">rest</b><code>_.rest(array, [index])</code>
+ <span class="alias">Alias: <b>tail</b></span>
+ <br />
+ Returns the <b>rest</b> of the elements in an array. Pass an <b>index</b>
+ to return the values of the array from that index onward.
+ </p>
+ <pre>
+_.rest([5, 4, 3, 2, 1]);
+=> [4, 3, 2, 1]
+</pre>
+
+ <p id="compact">
+ <b class="header">compact</b><code>_.compact(array)</code>
+ <br />
+ Returns a copy of the <b>array</b> with all falsy values removed.
+ In JavaScript, <i>false</i>, <i>null</i>, <i>0</i>, <i>""</i>,
+ <i>undefined</i> and <i>NaN</i> are all falsy.
+ </p>
+ <pre>
+_.compact([0, 1, false, 2, '', 3]);
+=> [1, 2, 3]
+</pre>
+
+ <p id="flatten">
+ <b class="header">flatten</b><code>_.flatten(array)</code>
+ <br />
+ Flattens a nested <b>array</b> (the nesting can be to any depth).
+ </p>
+ <pre>
+_.flatten([1, [2], [3, [[[4]]]]]);
+=> [1, 2, 3, 4];
+</pre>
+
+ <p id="without">
+ <b class="header">without</b><code>_.without(array, [*values])</code>
+ <br />
+ Returns a copy of the <b>array</b> with all instances of the <b>values</b>
+ removed. <i>===</i> is used for the equality test.
+ </p>
+ <pre>
+_.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
+=> [2, 3, 4]
+</pre>
+
+ <p id="union">
+ <b class="header">union</b><code>_.union(*arrays)</code>
+ <br />
+ Computes the union of the passed-in <b>arrays</b>: the list of unique items,
+ in order, that are present in one or more of the <b>arrays</b>.
+ </p>
+ <pre>
+_.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
+=> [1, 2, 3, 101, 10]
+</pre>
+
+ <p id="intersection">
+ <b class="header">intersection</b><code>_.intersection(*arrays)</code>
+ <br />
+ Computes the list of values that are the intersection of all the <b>arrays</b>.
+ Each value in the result is present in each of the <b>arrays</b>.
+ </p>
+ <pre>
+_.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
+=> [1, 2]
+</pre>
+
+ <p id="difference">
+ <b class="header">difference</b><code>_.difference(array, other)</code>
+ <br />
+ Similar to <b>without</b>, but returns the values from <b>array</b> that
+ are not present in <b>other</b>.
+ </p>
+ <pre>
+_.difference([1, 2, 3, 4, 5], [5, 2, 10]);
+=> [1, 3, 4]
+</pre>
+
+ <p id="uniq">
+ <b class="header">uniq</b><code>_.uniq(array, [isSorted], [iterator])</code>
+ <span class="alias">Alias: <b>unique</b></span>
+ <br />
+ Produces a duplicate-free version of the <b>array</b>, using <i>===</i> to test
+ object equality. If you know in advance that the <b>array</b> is sorted,
+ passing <i>true</i> for <b>isSorted</b> will run a much faster algorithm.
+ If you want to compute unique items based on a transformation, pass an
+ <b>iterator</b> function.
+ </p>
+ <pre>
+_.uniq([1, 2, 1, 3, 1, 4]);
+=> [1, 2, 3, 4]
+</pre>
+
+ <p id="zip">
+ <b class="header">zip</b><code>_.zip(*arrays)</code>
+ <br />
+ Merges together the values of each of the <b>arrays</b> with the
+ values at the corresponding position. Useful when you have separate
+ data sources that are coordinated through matching array indexes.
+ If you're working with a matrix of nested arrays, <b>zip.apply</b>
+ can transpose the matrix in a similar fashion.
+ </p>
+ <pre>
+_.zip(['moe', 'larry', 'curly'], [30, 40, 50], [true, false, false]);
+=> [["moe", 30, true], ["larry", 40, false], ["curly", 50, false]]
+</pre>
+
+ <p id="indexOf">
+ <b class="header">indexOf</b><code>_.indexOf(array, value, [isSorted])</code>
+ <br />
+ Returns the index at which <b>value</b> can be found in the <b>array</b>,
+ or <i>-1</i> if value is not present in the <b>array</b>. Uses the native
+ <b>indexOf</b> function unless it's missing. If you're working with a
+ large array, and you know that the array is already sorted, pass <tt>true</tt>
+ for <b>isSorted</b> to use a faster binary search.
+ </p>
+ <pre>
+_.indexOf([1, 2, 3], 2);
+=> 1
+</pre>
+
+ <p id="lastIndexOf">
+ <b class="header">lastIndexOf</b><code>_.lastIndexOf(array, value)</code>
+ <br />
+ Returns the index of the last occurrence of <b>value</b> in the <b>array</b>,
+ or <i>-1</i> if value is not present. Uses the native <b>lastIndexOf</b>
+ function if possible.
+ </p>
+ <pre>
+_.lastIndexOf([1, 2, 3, 1, 2, 3], 2);
+=> 4
+</pre>
+
+ <p id="range">
+ <b class="header">range</b><code>_.range([start], stop, [step])</code>
+ <br />
+ A function to create flexibly-numbered lists of integers, handy for
+ <tt>each</tt> and <tt>map</tt> loops. <b>start</b>, if omitted, defaults
+ to <i>0</i>; <b>step</b> defaults to <i>1</i>. Returns a list of integers
+ from <b>start</b> to <b>stop</b>, incremented (or decremented) by <b>step</b>,
+ exclusive.
+ </p>
+ <pre>
+_.range(10);
+=> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+_.range(1, 11);
+=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+_.range(0, 30, 5);
+=> [0, 5, 10, 15, 20, 25]
+_.range(0, -10, -1);
+=> [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]
+_.range(0);
+=> []
+</pre>
+
+ <h2>Function (uh, ahem) Functions</h2>
+
+ <p id="bind">
+ <b class="header">bind</b><code>_.bind(function, object, [*arguments])</code>
+ <br />
+ Bind a <b>function</b> to an <b>object</b>, meaning that whenever
+ the function is called, the value of <i>this</i> will be the <b>object</b>.
+ Optionally, bind <b>arguments</b> to the <b>function</b> to pre-fill them,
+ also known as <b>currying</b>.
+ </p>
+ <pre>
+var func = function(greeting){ return greeting + ': ' + this.name };
+func = _.bind(func, {name : 'moe'}, 'hi');
+func();
+=> 'hi: moe'
+</pre>
+
+ <p id="bindAll">
+ <b class="header">bindAll</b><code>_.bindAll(object, [*methodNames])</code>
+ <br />
+ Binds a number of methods on the <b>object</b>, specified by
+ <b>methodNames</b>, to be run in the context of that object whenever they
+ are invoked. Very handy for binding functions that are going to be used
+ as event handlers, which would otherwise be invoked with a fairly useless
+ <i>this</i>. If no <b>methodNames</b> are provided, all of the object's
+ function properties will be bound to it.
+ </p>
+ <pre>
+var buttonView = {
+ label : 'underscore',
+ onClick : function(){ alert('clicked: ' + this.label); },
+ onHover : function(){ console.log('hovering: ' + this.label); }
+};
+_.bindAll(buttonView);
+jQuery('#underscore_button').bind('click', buttonView.onClick);
+=> When the button is clicked, this.label will have the correct value...
+</pre>
+
+ <p id="memoize">
+ <b class="header">memoize</b><code>_.memoize(function, [hashFunction])</code>
+ <br />
+ Memoizes a given <b>function</b> by caching the computed result. Useful
+ for speeding up slow-running computations. If passed an optional
+ <b>hashFunction</b>, it will be used to compute the hash key for storing
+ the result, based on the arguments to the original function. The default
+ <b>hashFunction</b> just uses the first argument to the memoized function
+ as the key.
+ </p>
+ <pre>
+var fibonacci = _.memoize(function(n) {
+ return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);
+});
+</pre>
+
+ <p id="delay">
+ <b class="header">delay</b><code>_.delay(function, wait, [*arguments])</code>
+ <br />
+ Much like <b>setTimeout</b>, invokes <b>function</b> after <b>wait</b>
+ milliseconds. If you pass the optional <b>arguments</b>, they will be
+ forwarded on to the <b>function</b> when it is invoked.
+ </p>
+ <pre>
+var log = _.bind(console.log, console);
+_.delay(log, 1000, 'logged later');
+=> 'logged later' // Appears after one second.
+</pre>
+
+ <p id="defer">
+ <b class="header">defer</b><code>_.defer(function)</code>
+ <br />
+ Defers invoking the <b>function</b> until the current call stack has cleared,
+ similar to using <b>setTimeout</b> with a delay of 0. Useful for performing
+ expensive computations or HTML rendering in chunks without blocking the UI thread
+ from updating.
+ </p>
+ <pre>
+_.defer(function(){ alert('deferred'); });
+// Returns from the function before the alert runs.
+</pre>
+
+ <p id="throttle">
+ <b class="header">throttle</b><code>_.throttle(function, wait)</code>
+ <br />
+ Returns a throttled version of the function, that, when invoked repeatedly,
+ will only actually call the wrapped function at most once per every <b>wait</b>
+ milliseconds. Useful for rate-limiting events that occur faster than you
+ can keep up with.
+ </p>
+ <pre>
+var throttled = _.throttle(updatePosition, 100);
+$(window).scroll(throttled);
+</pre>
+
+ <p id="debounce">
+ <b class="header">debounce</b><code>_.debounce(function, wait)</code>
+ <br />
+ Calling a debounced function will postpone its execution until after
+ <b>wait</b> milliseconds have elapsed since the last time the function
+ was invoked. Useful for implementing behavior that should only happen
+ <i>after</i> the input has stopped arriving. For example: rendering a
+ preview of a Markdown comment, recalculating a layout after the window
+ has stopped being resized...
+ </p>
+ <pre>
+var lazyLayout = _.debounce(calculateLayout, 300);
+$(window).resize(lazyLayout);
+</pre>
+
+ <p id="once">
+ <b class="header">once</b><code>_.once(function)</code>
+ <br />
+ Creates a version of the function that can only be called one time.
+ Repeated calls to the modified function will have no effect, returning
+ the value from the original call. Useful for initialization functions,
+ instead of having to set a boolean flag and then check it later.
+ </p>
+ <pre>
+var initialize = _.once(createApplication);
+initialize();
+initialize();
+// Application is only created once.
+</pre>
+
+ <p id="after">
+ <b class="header">after</b><code>_.after(count, function)</code>
+ <br />
+ Creates a version of the function that will only be run after first
+ being called <b>count</b> times. Useful for grouping asynchronous responses,
+ where you want to be sure that all the async calls have finished, before
+ proceeding.
+ </p>
+ <pre>
+var renderNotes = _.after(notes.length, render);
+_.each(notes, function(note) {
+ note.asyncSave({success: renderNotes});
+});
+// renderNotes is run once, after all notes have saved.
+</pre>
+
+ <p id="wrap">
+ <b class="header">wrap</b><code>_.wrap(function, wrapper)</code>
+ <br />
+ Wraps the first <b>function</b> inside of the <b>wrapper</b> function,
+ passing it as the first argument. This allows the <b>wrapper</b> to
+ execute code before and after the <b>function</b> runs, adjust the arguments,
+ and execute it conditionally.
+ </p>
+ <pre>
+var hello = function(name) { return "hello: " + name; };
+hello = _.wrap(hello, function(func) {
+ return "before, " + func("moe") + ", after";
+});
+hello();
+=> 'before, hello: moe, after'
+</pre>
+
+ <p id="compose">
+ <b class="header">compose</b><code>_.compose(*functions)</code>
+ <br />
+ Returns the composition of a list of <b>functions</b>, where each function
+ consumes the return value of the function that follows. In math terms,
+ composing the functions <i>f()</i>, <i>g()</i>, and <i>h()</i> produces
+ <i>f(g(h()))</i>.
+ </p>
+ <pre>
+var greet = function(name){ return "hi: " + name; };
+var exclaim = function(statement){ return statement + "!"; };
+var welcome = _.compose(exclaim, greet);
+welcome('moe');
+=> 'hi: moe!'
+</pre>
+
+ <h2>Object Functions</h2>
+
+ <p id="keys">
+ <b class="header">keys</b><code>_.keys(object)</code>
+ <br />
+ Retrieve all the names of the <b>object</b>'s properties.
+ </p>
+ <pre>
+_.keys({one : 1, two : 2, three : 3});
+=> ["one", "two", "three"]
+</pre>
+
+ <p id="values">
+ <b class="header">values</b><code>_.values(object)</code>
+ <br />
+ Return all of the values of the <b>object</b>'s properties.
+ </p>
+ <pre>
+_.values({one : 1, two : 2, three : 3});
+=> [1, 2, 3]
+</pre>
+
+ <p id="functions">
+ <b class="header">functions</b><code>_.functions(object)</code>
+ <span class="alias">Alias: <b>methods</b></span>
+ <br />
+ Returns a sorted list of the names of every method in an object —
+ that is to say, the name of every function property of the object.
+ </p>
+ <pre>
+_.functions(_);
+=> ["all", "any", "bind", "bindAll", "clone", "compact", "compose" ...
+</pre>
+
+ <p id="extend">
+ <b class="header">extend</b><code>_.extend(destination, *sources)</code>
+ <br />
+ Copy all of the properties in the <b>source</b> objects over to the
+ <b>destination</b> object. It's in-order, so the last source will override
+ properties of the same name in previous arguments.
+ </p>
+ <pre>
+_.extend({name : 'moe'}, {age : 50});
+=> {name : 'moe', age : 50}
+</pre>
+
+ <p id="defaults">
+ <b class="header">defaults</b><code>_.defaults(object, *defaults)</code>
+ <br />
+ Fill in missing properties in <b>object</b> with default values from the
+ <b>defaults</b> objects. As soon as the property is filled, further defaults
+ will have no effect.
+ </p>
+ <pre>
+var iceCream = {flavor : "chocolate"};
+_.defaults(iceCream, {flavor : "vanilla", sprinkles : "lots"});
+=> {flavor : "chocolate", sprinkles : "lots"}
+</pre>
+
+ <p id="clone">
+ <b class="header">clone</b><code>_.clone(object)</code>
+ <br />
+ Create a shallow-copied clone of the <b>object</b>. Any nested objects
+ or arrays will be copied by reference, not duplicated.
+ </p>
+ <pre>
+_.clone({name : 'moe'});
+=> {name : 'moe'};
+</pre>
+
+ <p id="tap">
+ <b class="header">tap</b><code>_.tap(object, interceptor)</code>
+ <br />
+ Invokes <b>interceptor</b> with the <b>object</b>, and then returns <b>object</b>.
+ The primary purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
+ </p>
+ <pre>
+_([1,2,3,200]).chain().
+ filter(function(num) { return num % 2 == 0; }).
+ tap(console.log).
+ map(function(num) { return num * num }).
+ value();
+=> [2, 200]
+=> [4, 40000]
+</pre>
+
+ <p id="isEqual">
+ <b class="header">isEqual</b><code>_.isEqual(object, other)</code>
+ <br />
+ Performs an optimized deep comparison between the two objects, to determine
+ if they should be considered equal.
+ </p>
+ <pre>
+var moe = {name : 'moe', luckyNumbers : [13, 27, 34]};
+var clone = {name : 'moe', luckyNumbers : [13, 27, 34]};
+moe == clone;
+=> false
+_.isEqual(moe, clone);
+=> true
+</pre>
+
+ <p id="isEmpty">
+ <b class="header">isEmpty</b><code>_.isEmpty(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> contains no values.
+ </p>
+ <pre>
+_.isEmpty([1, 2, 3]);
+=> false
+_.isEmpty({});
+=> true
+</pre>
+
+ <p id="isElement">
+ <b class="header">isElement</b><code>_.isElement(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> is a DOM element.
+ </p>
+ <pre>
+_.isElement(jQuery('body')[0]);
+=> true
+</pre>
+
+ <p id="isArray">
+ <b class="header">isArray</b><code>_.isArray(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> is an Array.
+ </p>
+ <pre>
+(function(){ return _.isArray(arguments); })();
+=> false
+_.isArray([1,2,3]);
+=> true
+</pre>
+
+ <p id="isArguments">
+ <b class="header">isArguments</b><code>_.isArguments(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> is an Arguments object.
+ </p>
+ <pre>
+(function(){ return _.isArguments(arguments); })(1, 2, 3);
+=> true
+_.isArguments([1,2,3]);
+=> false
+</pre>
+
+ <p id="isFunction">
+ <b class="header">isFunction</b><code>_.isFunction(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> is a Function.
+ </p>
+ <pre>
+_.isFunction(alert);
+=> true
+</pre>
+
+ <p id="isString">
+ <b class="header">isString</b><code>_.isString(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> is a String.
+ </p>
+ <pre>
+_.isString("moe");
+=> true
+</pre>
+
+ <p id="isNumber">
+ <b class="header">isNumber</b><code>_.isNumber(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> is a Number.
+ </p>
+ <pre>
+_.isNumber(8.4 * 5);
+=> true
+</pre>
+
+ <p id="isBoolean">
+ <b class="header">isBoolean</b><code>_.isBoolean(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> is either <i>true</i> or <i>false</i>.
+ </p>
+ <pre>
+_.isBoolean(null);
+=> false
+</pre>
+
+ <p id="isDate">
+ <b class="header">isDate</b><code>_.isDate(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> is a Date.
+ </p>
+ <pre>
+_.isDate(new Date());
+=> true
+</pre>
+
+ <p id="isRegExp">
+ <b class="header">isRegExp</b><code>_.isRegExp(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> is a RegExp.
+ </p>
+ <pre>
+_.isRegExp(/moe/);
+=> true
+</pre>
+
+ <p id="isNaN">
+ <b class="header">isNaN</b><code>_.isNaN(object)</code>
+ <br />
+ Returns <i>true</i> if <b>object</b> is <i>NaN</i>.<br /> Note: this is not
+ the same as the native <b>isNaN</b> function, which will also return
+ true if the variable is <i>undefined</i>.
+ </p>
+ <pre>
+_.isNaN(NaN);
+=> true
+isNaN(undefined);
+=> true
+_.isNaN(undefined);
+=> false
+</pre>
+
+ <p id="isNull">
+ <b class="header">isNull</b><code>_.isNull(object)</code>
+ <br />
+ Returns <i>true</i> if the value of <b>object</b> is <i>null</i>.
+ </p>
+ <pre>
+_.isNull(null);
+=> true
+_.isNull(undefined);
+=> false
+</pre>
+
+ <p id="isUndefined">
+ <b class="header">isUndefined</b><code>_.isUndefined(variable)</code>
+ <br />
+ Returns <i>true</i> if <b>variable</b> is <i>undefined</i>.
+ </p>
+ <pre>
+_.isUndefined(window.missingVariable);
+=> true
+</pre>
+
+ <h2>Utility Functions</h2>
+
+ <p id="noConflict">
+ <b class="header">noConflict</b><code>_.noConflict()</code>
+ <br />
+ Give control of the "_" variable back to its previous owner. Returns
+ a reference to the <b>Underscore</b> object.
+ </p>
+ <pre>
+var underscore = _.noConflict();</pre>
+
+ <p id="identity">
+ <b class="header">identity</b><code>_.identity(value)</code>
+ <br />
+ Returns the same value that is used as the argument. In math:
+ <tt>f(x) = x</tt><br />
+ This function looks useless, but is used throughout Underscore as
+ a default iterator.
+ </p>
+ <pre>
+var moe = {name : 'moe'};
+moe === _.identity(moe);
+=> true</pre>
+
+ <p id="times">
+ <b class="header">times</b><code>_.times(n, iterator)</code>
+ <br />
+ Invokes the given iterator function <b>n</b> times.
+ </p>
+ <pre>
+_(3).times(function(){ genie.grantWish(); });</pre>
+
+ <p id="mixin">
+ <b class="header">mixin</b><code>_.mixin(object)</code>
+ <br />
+ Allows you to extend Underscore with your own utility functions. Pass
+ a hash of <tt>{name: function}</tt> definitions to have your functions
+ added to the Underscore object, as well as the OOP wrapper.
+ </p>
+ <pre>
+_.mixin({
+ capitalize : function(string) {
+ return string.charAt(0).toUpperCase() + string.substring(1).toLowerCase();
+ }
+});
+_("fabio").capitalize();
+=> "Fabio"
+</pre>
+
+ <p id="uniqueId">
+ <b class="header">uniqueId</b><code>_.uniqueId([prefix])</code>
+ <br />
+ Generate a globally-unique id for client-side models or DOM elements
+ that need one. If <b>prefix</b> is passed, the id will be appended to it.
+ </p>
+ <pre>
+_.uniqueId('contact_');
+=> 'contact_104'</pre>
+
+ <p id="template">
+ <b class="header">template</b><code>_.template(templateString, [context])</code>
+ <br />
+ Compiles JavaScript templates into functions that can be evaluated
+ for rendering. Useful for rendering complicated bits of HTML from JSON
+ data sources. Template functions can both interpolate variables, using<br />
+ <tt><%= … %></tt>, as well as execute arbitrary JavaScript code, with
+ <tt><% … %></tt>. If you wish to interpolate a value, and have
+ it be HTML-escaped, use <tt><%- … %></tt> When you evaluate a template function, pass in a
+ <b>context</b> object that has properties corresponding to the template's free
+ variables. If you're writing a one-off, you can pass the <b>context</b>
+ object as the second parameter to <b>template</b> in order to render
+ immediately instead of returning a template function.
+ </p>
+ <pre>
+var compiled = _.template("hello: <%= name %>");
+compiled({name : 'moe'});
+=> "hello: moe"
+
+var list = "<% _.each(people, function(name) { %> <li><%= name %></li> <% }); %>";
+_.template(list, {people : ['moe', 'curly', 'larry']});
+=> "<li>moe</li><li>curly</li><li>larry</li>"
+
+var template = _.template("<b><%- value %></b>");
+template({value : '<script>'});
+=> "<b>&lt;script&gt;</b>"</pre>
+
+ <p>
+ You can also use <tt>print</tt> from within JavaScript code. This is
+ sometimes more convenient than using <tt><%= ... %></tt>.
+ </p>
+
+ <pre>
+var compiled = _.template("<% print('Hello ' + epithet); %>");
+compiled({epithet: "stooge"});
+=> "Hello stooge."</pre>
+
+ <p>
+ If ERB-style delimiters aren't your cup of tea, you can change Underscore's
+ template settings to use different symbols to set off interpolated code.
+ Define an <b>interpolate</b> regex, and an (optional) <b>evaluate</b> regex
+ to match expressions that should be inserted and evaluated, respectively.
+ If no <b>evaluate</b> regex is provided, your templates will only be
+ capable of interpolating values.
+ For example, to perform
+ <a href="http://github.com/janl/mustache.js#readme">Mustache.js</a>
+ style templating:
+ </p>
+
+ <pre>
+_.templateSettings = {
+ interpolate : /\{\{(.+?)\}\}/g
+};
+
+var template = _.template("Hello {{ name }}!");
+template({name : "Mustache"});
+=> "Hello Mustache!"</pre>
+
+ <h2>Chaining</h2>
+
+ <p id="chain">
+ <b class="header">chain</b><code>_(obj).chain()</code>
+ <br />
+ Returns a wrapped object. Calling methods on this object will continue
+ to return wrapped objects until <tt>value</tt> is used. (
+ <a href="#styles">A more realistic example.</a>)
+ </p>
+ <pre>
+var stooges = [{name : 'curly', age : 25}, {name : 'moe', age : 21}, {name : 'larry', age : 23}];
+var youngest = _(stooges).chain()
+ .sortBy(function(stooge){ return stooge.age; })
+ .map(function(stooge){ return stooge.name + ' is ' + stooge.age; })
+ .first()
+ .value();
+=> "moe is 21"
+</pre>
+
+ <p id="value">
+ <b class="header">value</b><code>_(obj).value()</code>
+ <br />
+ Extracts the value of a wrapped object.
+ </p>
+ <pre>
+_([1, 2, 3]).value();
+=> [1, 2, 3]
+</pre>
+
+ <h2>Links & Suggested Reading</h2>
+
+ <p>
+ <a href="http://mirven.github.com/underscore.lua/">Underscore.lua</a>,
+ a Lua port of the functions that are applicable in both languages.
+ Includes OOP-wrapping and chaining.
+ The <a href="http://github.com/mirven/underscore.lua">source</a> is
+ available on GitHub.
+ </p>
+
+ <p>
+ <a href="http://brianhaveri.github.com/Underscore.php/">Underscore.php</a>,
+ a PHP port of the functions that are applicable in both languages.
+ Includes OOP-wrapping and chaining.
+ The <a href="http://github.com/brianhaveri/Underscore.php">source</a> is
+ available on GitHub.
+ </p>
+
+ <p>
+ <a href="http://vti.github.com/underscore-perl/">Underscore-perl</a>,
+ a Perl port of many of the Underscore.js functions,
+ aimed at on Perl hashes and arrays, also
+ <a href="https://github.com/vti/underscore-perl/">available on GitHub</a>.
+ </p>
+
+ <p>
+ <a href="https://github.com/edtsech/underscore.string">Underscore.string</a>,
+ an Underscore extension that adds functions for string-manipulation:
+ <tt>trim</tt>, <tt>startsWith</tt>, <tt>contains</tt>, <tt>capitalize</tt>,
+ <tt>reverse</tt>, <tt>sprintf</tt>, and more.
+ </p>
+
+ <p>
+ Ruby's <a href="http://ruby-doc.org/core/classes/Enumerable.html">Enumerable</a> module.
+ </p>
+
+ <p>
+ <a href="http://www.prototypejs.org/">Prototype.js</a>, which provides
+ JavaScript with collection functions in the manner closest to Ruby's Enumerable.
+ </p>
+
+ <p>
+ Oliver Steele's
+ <a href="http://osteele.com/sources/javascript/functional/">Functional JavaScript</a>,
+ which includes comprehensive higher-order function support as well as string lambdas.
+ </p>
+
+ <p>
+ Michael Aufreiter's <a href="http://substance.io/#michael/data-js">Data.js</a>,
+ a data manipulation + persistence library for JavaScript.
+ </p>
+
+ <p>
+ Python's <a href="http://docs.python.org/library/itertools.html">itertools</a>.
+ </p>
+
+ <h2 id="changelog">Change Log</h2>
+
+ <p>
+ <b class="header">1.2.1</b> — <small><i>Oct. 24, 2011</i></small><br />
+ <ul>
+ <li>
+ Several important bug fixes for <tt>_.isEqual</tt>, which should now
+ do better on mutated Arrays, and on non-Array objects with
+ <tt>length</tt> properties. <small>(#329)</small>
+ </li>
+ <li>
+ <b>jrburke</b> contributed Underscore exporting for AMD module loaders,
+ and <b>tonylukasavage</b> for Appcelerator Titanium.
+ <small>(#335, #338)</small>
+ </li>
+ <li>
+ You can now <tt>_.groupBy(list, 'property')</tt> as a shortcut for
+ grouping values by a particular common property.
+ </li>
+ <li>
+ <tt>_.throttle</tt>'d functions now fire immediately upon invocation,
+ and are rate-limited thereafter <small>(#170, #266)</small>.
+ </li>
+ <li>
+ Most of the <tt>_.is[Type]</tt> checks no longer ducktype.
+ </li>
+ <li>
+ The <tt>_.bind</tt> function now also works on constructors, a-la
+ ES5 ... but you would never want to use <tt>_.bind</tt> on a
+ constructor function.
+ </li>
+ <li>
+ <tt>_.clone</tt> no longer wraps non-object types in Objects.
+ </li>
+ <li>
+ <tt>_.find</tt> and <tt>_.filter</tt> are now the preferred names for
+ <tt>_.detect</tt> and <tt>_.select</tt>.
+ </li>
+ </ul>
+ </p>
+
+ <p>
+ <b class="header">1.2.0</b> — <small><i>Oct. 5, 2011</i></small><br />
+ <ul>
+ <li>
+ The <tt>_.isEqual</tt> function now
+ supports true deep equality comparisons, with checks for cyclic structures,
+ thanks to Kit Cambridge.
+ </li>
+ <li>
+ Underscore templates now support HTML escaping interpolations, using
+ <tt><%- ... %></tt> syntax.
+ </li>
+ <li>
+ Ryan Tenney contributed <tt>_.shuffle</tt>, which uses a modified
+ Fisher-Yates to give you a shuffled copy of an array.
+ </li>
+ <li>
+ <tt>_.uniq</tt> can now be passed an optional iterator, to determine by
+ what criteria an object should be considered unique.
+ </li>
+ <li>
+ <tt>_.last</tt> now takes an optional argument which will return the last
+ N elements of the list.
+ </li>
+ <li>
+ A new <tt>_.initial</tt> function was added, as a mirror of <tt>_.rest</tt>,
+ which returns all the initial values of a list (except the last N).
+ </li>
+ </ul>
+ </p>
+
+ <p>
+ <b class="header">1.1.7</b> — <small><i>July 13, 2011</i></small><br />
+ Added <tt>_.groupBy</tt>, which aggregates a collection into groups of like items.
+ Added <tt>_.union</tt> and <tt>_.difference</tt>, to complement the
+ (re-named) <tt>_.intersection</tt>.
+ Various improvements for support of sparse arrays.
+ <tt>_.toArray</tt> now returns a clone, if directly passed an array.
+ <tt>_.functions</tt> now also returns the names of functions that are present
+ in the prototype chain.
+ </p>
+
+ <p>
+ <b class="header">1.1.6</b> — <small><i>April 18, 2011</i></small><br />
+ Added <tt>_.after</tt>, which will return a function that only runs after
+ first being called a specified number of times.
+ <tt>_.invoke</tt> can now take a direct function reference.
+ <tt>_.every</tt> now requires an iterator function to be passed, which
+ mirrors the ECMA5 API.
+ <tt>_.extend</tt> no longer copies keys when the value is undefined.
+ <tt>_.bind</tt> now errors when trying to bind an undefined value.
+ </p>
+
+ <p>
+ <b class="header">1.1.5</b> — <small><i>Mar 20, 2011</i></small><br />
+ Added an <tt>_.defaults</tt> function, for use merging together JS objects
+ representing default options.
+ Added an <tt>_.once</tt> function, for manufacturing functions that should
+ only ever execute a single time.
+ <tt>_.bind</tt> now delegates to the native ECMAScript 5 version,
+ where available.
+ <tt>_.keys</tt> now throws an error when used on non-Object values, as in
+ ECMAScript 5.
+ Fixed a bug with <tt>_.keys</tt> when used over sparse arrays.
+ </p>
+
+ <p>
+ <b class="header">1.1.4</b> — <small><i>Jan 9, 2011</i></small><br />
+ Improved compliance with ES5's Array methods when passing <tt>null</tt>
+ as a value. <tt>_.wrap</tt> now correctly sets <tt>this</tt> for the
+ wrapped function. <tt>_.indexOf</tt> now takes an optional flag for
+ finding the insertion index in an array that is guaranteed to already
+ be sorted. Avoiding the use of <tt>.callee</tt>, to allow <tt>_.isArray</tt>
+ to work properly in ES5's strict mode.
+ </p>
+
+ <p>
+ <b class="header">1.1.3</b> — <small><i>Dec 1, 2010</i></small><br />
+ In CommonJS, Underscore may now be required with just: <br />
+ <tt>var _ = require("underscore")</tt>.
+ Added <tt>_.throttle</tt> and <tt>_.debounce</tt> functions.
+ Removed <tt>_.breakLoop</tt>, in favor of an ECMA5-style un-<i>break</i>-able
+ each implementation — this removes the try/catch, and you'll now have
+ better stack traces for exceptions that are thrown within an Underscore iterator.
+ Improved the <b>isType</b> family of functions for better interoperability
+ with Internet Explorer host objects.
+ <tt>_.template</tt> now correctly escapes backslashes in templates.
+ Improved <tt>_.reduce</tt> compatibility with the ECMA5 version:
+ if you don't pass an initial value, the first item in the collection is used.
+ <tt>_.each</tt> no longer returns the iterated collection, for improved
+ consistency with ES5's <tt>forEach</tt>.
+ </p>
+
+ <p>
+ <b class="header">1.1.2</b><br />
+ Fixed <tt>_.contains</tt>, which was mistakenly pointing at
+ <tt>_.intersect</tt> instead of <tt>_.include</tt>, like it should
+ have been. Added <tt>_.unique</tt> as an alias for <tt>_.uniq</tt>.
+ </p>
+
+ <p>
+ <b class="header">1.1.1</b><br />
+ Improved the speed of <tt>_.template</tt>, and its handling of multiline
+ interpolations. Ryan Tenney contributed optimizations to many Underscore
+ functions. An annotated version of the source code is now available.
+ </p>
+
+ <p>
+ <b class="header">1.1.0</b><br />
+ The method signature of <tt>_.reduce</tt> has been changed to match
+ the ECMAScript 5 signature, instead of the Ruby/Prototype.js version.
+ This is a backwards-incompatible change. <tt>_.template</tt> may now be
+ called with no arguments, and preserves whitespace. <tt>_.contains</tt>
+ is a new alias for <tt>_.include</tt>.
+ </p>
+
+ <p>
+ <b class="header">1.0.4</b><br />
+ <a href="http://themoell.com/">Andri Möll</a> contributed the <tt>_.memoize</tt>
+ function, which can be used to speed up expensive repeated computations
+ by caching the results.
+ </p>
+
+ <p>
+ <b class="header">1.0.3</b><br />
+ Patch that makes <tt>_.isEqual</tt> return <tt>false</tt> if any property
+ of the compared object has a <tt>NaN</tt> value. Technically the correct
+ thing to do, but of questionable semantics. Watch out for NaN comparisons.
+ </p>
+
+ <p>
+ <b class="header">1.0.2</b><br />
+ Fixes <tt>_.isArguments</tt> in recent versions of Opera, which have
+ arguments objects as real Arrays.
+ </p>
+
+ <p>
+ <b class="header">1.0.1</b><br />
+ Bugfix for <tt>_.isEqual</tt>, when comparing two objects with the same
+ number of undefined keys, but with different names.
+ </p>
+
+ <p>
+ <b class="header">1.0.0</b><br />
+ Things have been stable for many months now, so Underscore is now
+ considered to be out of beta, at <b>1.0</b>. Improvements since <b>0.6</b>
+ include <tt>_.isBoolean</tt>, and the ability to have <tt>_.extend</tt>
+ take multiple source objects.
+ </p>
+
+ <p>
+ <b class="header">0.6.0</b><br />
+ Major release. Incorporates a number of
+ <a href="http://github.com/ratbeard">Mile Frawley's</a> refactors for
+ safer duck-typing on collection functions, and cleaner internals. A new
+ <tt>_.mixin</tt> method that allows you to extend Underscore with utility
+ functions of your own. Added <tt>_.times</tt>, which works the same as in
+ Ruby or Prototype.js. Native support for ECMAScript 5's <tt>Array.isArray</tt>,
+ and <tt>Object.keys</tt>.
+ </p>
+
+ <p>
+ <b class="header">0.5.8</b><br />
+ Fixed Underscore's collection functions to work on
+ <a href="https://developer.mozilla.org/En/DOM/NodeList">NodeLists</a> and
+ <a href="https://developer.mozilla.org/En/DOM/HTMLCollection">HTMLCollections</a>
+ once more, thanks to
+ <a href="http://github.com/jmtulloss">Justin Tulloss</a>.
+ </p>
+
+ <p>
+ <b class="header">0.5.7</b><br />
+ A safer implementation of <tt>_.isArguments</tt>, and a
+ faster <tt>_.isNumber</tt>,<br />thanks to
+ <a href="http://jedschmidt.com/">Jed Schmidt</a>.
+ </p>
+
+ <p>
+ <b class="header">0.5.6</b><br />
+ Customizable delimiters for <tt>_.template</tt>, contributed by
+ <a href="http://github.com/iamnoah">Noah Sloan</a>.
+ </p>
+
+ <p>
+ <b class="header">0.5.5</b><br />
+ Fix for a bug in MobileSafari's OOP-wrapper, with the arguments object.
+ </p>
+
+ <p>
+ <b class="header">0.5.4</b><br />
+ Fix for multiple single quotes within a template string for
+ <tt>_.template</tt>. See:
+ <a href="http://www.west-wind.com/Weblog/posts/509108.aspx">Rick Strahl's blog post</a>.
+ </p>
+
+ <p>
+ <b class="header">0.5.2</b><br />
+ New implementations of <tt>isArray</tt>, <tt>isDate</tt>, <tt>isFunction</tt>,
+ <tt>isNumber</tt>, <tt>isRegExp</tt>, and <tt>isString</tt>, thanks to
+ a suggestion from
+ <a href="http://www.broofa.com/">Robert Kieffer</a>.
+ Instead of doing <tt>Object#toString</tt>
+ comparisons, they now check for expected properties, which is less safe,
+ but more than an order of magnitude faster. Most other Underscore
+ functions saw minor speed improvements as a result.
+ <a href="http://dolzhenko.org/">Evgeniy Dolzhenko</a>
+ contributed <tt>_.tap</tt>,
+ <a href="http://ruby-doc.org/core-1.9/classes/Object.html#M000191">similar to Ruby 1.9's</a>,
+ which is handy for injecting side effects (like logging) into chained calls.
+ </p>
+
+ <p>
+ <b class="header">0.5.1</b><br />
+ Added an <tt>_.isArguments</tt> function. Lots of little safety checks
+ and optimizations contributed by
+ <a href="http://github.com/iamnoah/">Noah Sloan</a> and
+ <a href="http://themoell.com/">Andri Möll</a>.
+ </p>
+
+ <p>
+ <b class="header">0.5.0</b><br />
+ <b>[API Changes]</b> <tt>_.bindAll</tt> now takes the context object as
+ its first parameter. If no method names are passed, all of the context
+ object's methods are bound to it, enabling chaining and easier binding.
+ <tt>_.functions</tt> now takes a single argument and returns the names
+ of its Function properties. Calling <tt>_.functions(_)</tt> will get you
+ the previous behavior.
+ Added <tt>_.isRegExp</tt> so that <tt>isEqual</tt> can now test for RegExp equality.
+ All of the "is" functions have been shrunk down into a single definition.
+ <a href="http://github.com/grayrest/">Karl Guertin</a> contributed patches.
+ </p>
+
+ <p>
+ <b class="header">0.4.7</b><br />
+ Added <tt>isDate</tt>, <tt>isNaN</tt>, and <tt>isNull</tt>, for completeness.
+ Optimizations for <tt>isEqual</tt> when checking equality between Arrays
+ or Dates. <tt>_.keys</tt> is now <small><i><b>25%–2X</b></i></small> faster (depending on your
+ browser) which speeds up the functions that rely on it, such as <tt>_.each</tt>.
+ </p>
+
+ <p>
+ <b class="header">0.4.6</b><br />
+ Added the <tt>range</tt> function, a port of the
+ <a href="http://docs.python.org/library/functions.html#range">Python
+ function of the same name</a>, for generating flexibly-numbered lists
+ of integers. Original patch contributed by
+ <a href="http://github.com/kylichuku">Kirill Ishanov</a>.
+ </p>
+
+ <p>
+ <b class="header">0.4.5</b><br />
+ Added <tt>rest</tt> for Arrays and arguments objects, and aliased
+ <tt>first</tt> as <tt>head</tt>, and <tt>rest</tt> as <tt>tail</tt>,
+ thanks to <a href="http://github.com/lukesutton/">Luke Sutton</a>'s patches.
+ Added tests ensuring that all Underscore Array functions also work on
+ <i>arguments</i> objects.
+ </p>
+
+ <p>
+ <b class="header">0.4.4</b><br />
+ Added <tt>isString</tt>, and <tt>isNumber</tt>, for consistency. Fixed
+ <tt>_.isEqual(NaN, NaN)</tt> to return <i>true</i> (which is debatable).
+ </p>
+
+ <p>
+ <b class="header">0.4.3</b><br />
+ Started using the native <tt>StopIteration</tt> object in browsers that support it.
+ Fixed Underscore setup for CommonJS environments.
+ </p>
+
+ <p>
+ <b class="header">0.4.2</b><br />
+ Renamed the unwrapping function to <tt>value</tt>, for clarity.
+ </p>
+
+ <p>
+ <b class="header">0.4.1</b><br />
+ Chained Underscore objects now support the Array prototype methods, so
+ that you can perform the full range of operations on a wrapped array
+ without having to break your chain. Added a <tt>breakLoop</tt> method
+ to <b>break</b> in the middle of any Underscore iteration. Added an
+ <tt>isEmpty</tt> function that works on arrays and objects.
+ </p>
+
+ <p>
+ <b class="header">0.4.0</b><br />
+ All Underscore functions can now be called in an object-oriented style,
+ like so: <tt>_([1, 2, 3]).map(...);</tt>. Original patch provided by
+ <a href="http://macournoyer.com/">Marc-André Cournoyer</a>.
+ Wrapped objects can be chained through multiple
+ method invocations. A <a href="#functions"><tt>functions</tt></a> method
+ was added, providing a sorted list of all the functions in Underscore.
+ </p>
+
+ <p>
+ <b class="header">0.3.3</b><br />
+ Added the JavaScript 1.8 function <tt>reduceRight</tt>. Aliased it
+ as <tt>foldr</tt>, and aliased <tt>reduce</tt> as <tt>foldl</tt>.
+ </p>
+
+ <p>
+ <b class="header">0.3.2</b><br />
+ Now runs on stock <a href="http://www.mozilla.org/rhino/">Rhino</a>
+ interpreters with: <tt>load("underscore.js")</tt>.
+ Added <a href="#identity"><tt>identity</tt></a> as a utility function.
+ </p>
+
+ <p>
+ <b class="header">0.3.1</b><br />
+ All iterators are now passed in the original collection as their third
+ argument, the same as JavaScript 1.6's <b>forEach</b>. Iterating over
+ objects is now called with <tt>(value, key, collection)</tt>, for details
+ see <a href="#each"><tt>_.each</tt></a>.
+ </p>
+
+ <p>
+ <b class="header">0.3.0</b><br />
+ Added <a href="http://github.com/dmitryBaranovskiy">Dmitry Baranovskiy</a>'s
+ comprehensive optimizations, merged in
+ <a href="http://github.com/kriskowal/">Kris Kowal</a>'s patches to make Underscore
+ <a href="http://wiki.commonjs.org/wiki/CommonJS">CommonJS</a> and
+ <a href="http://narwhaljs.org/">Narwhal</a> compliant.
+ </p>
+
+ <p>
+ <b class="header">0.2.0</b><br />
+ Added <tt>compose</tt> and <tt>lastIndexOf</tt>, renamed <tt>inject</tt> to
+ <tt>reduce</tt>, added aliases for <tt>inject</tt>, <tt>filter</tt>,
+ <tt>every</tt>, <tt>some</tt>, and <tt>forEach</tt>.
+ </p>
+
+ <p>
+ <b class="header">0.1.1</b><br />
+ Added <tt>noConflict</tt>, so that the "Underscore" object can be assigned to
+ other variables.
+ </p>
+
+ <p>
+ <b class="header">0.1.0</b><br />
+ Initial release of Underscore.js.
+ </p>
+
+ <p>
+ <a href="http://documentcloud.org/" title="A DocumentCloud Project" style="background:none;">
+ <img src="http://jashkenas.s3.amazonaws.com/images/a_documentcloud_project.png" alt="A DocumentCloud Project" />
+ </a>
+ </p>
+
+ </div>
+
+ </div>
+
+ <!-- Include Underscore, so you can play with it in the console. -->
+ <script type="text/javascript" src="underscore.js"></script>
+
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/index.js b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/index.js
new file mode 100644
index 0000000..2cf0ca5
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/index.js
@@ -0,0 +1 @@
+module.exports = require('./underscore');
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/package.json b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/package.json
new file mode 100644
index 0000000..1b8f583
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "underscore",
+ "description": "JavaScript's functional programming helper library.",
+ "homepage": "http://documentcloud.github.com/underscore/",
+ "keywords": [
+ "util",
+ "functional",
+ "server",
+ "client",
+ "browser"
+ ],
+ "author": {
+ "name": "Jeremy Ashkenas",
+ "email": "jeremy@documentcloud.org"
+ },
+ "contributors": [],
+ "dependencies": {},
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/documentcloud/underscore.git"
+ },
+ "main": "underscore.js",
+ "version": "1.2.1",
+ "readme": " __ \n /\\ \\ __ \n __ __ ___ \\_\\ \\ __ _ __ ____ ___ ___ _ __ __ /\\_\\ ____ \n/\\ \\/\\ \\ /' _ `\\ /'_ \\ /'__`\\/\\ __\\/ ,__\\ / ___\\ / __`\\/\\ __\\/'__`\\ \\/\\ \\ /',__\\ \n\\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\/\\ __/\\ \\ \\//\\__, `\\/\\ \\__//\\ \\ \\ \\ \\ \\//\\ __/ __ \\ \\ \\/\\__, `\\\n \\ \\____/\\ \\_\\ \\_\\ \\___,_\\ \\____\\\\ \\_\\\\/\\____/\\ \\____\\ \\____/\\ \\_\\\\ \\____\\/\\_\\ _\\ \\ \\/\\____/\n \\/___/ \\/_/\\/_/\\/__,_ /\\/____/ \\/_/ \\/___/ \\/____/\\/___/ \\/_/ \\/____/\\/_//\\ \\_\\ \\/___/ \n \\ \\____/ \n \\/___/\n\nUnderscore is a utility-belt library for JavaSc
ript that provides \nsupport for the usual functional suspects (each, map, reduce, filter...) \nwithout extending any core JavaScript objects.\n\nFor Docs, License, Tests, and pre-packed downloads, see:\nhttp://documentcloud.github.com/underscore/\n\nMany thanks to our contributors:\nhttps://github.com/documentcloud/underscore/contributors\n",
+ "readmeFilename": "README",
+ "bugs": {
+ "url": "https://github.com/documentcloud/underscore/issues"
+ },
+ "_id": "underscore@1.2.1",
+ "_from": "underscore@1.2.1"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/underscore-min.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/underscore-min.js b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/underscore-min.js
new file mode 100644
index 0000000..ad37560
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/underscore-min.js
@@ -0,0 +1,30 @@
+// Underscore.js 1.2.1
+// (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.
+// Underscore is freely distributable under the MIT license.
+// Portions of Underscore are inspired or borrowed from Prototype,
+// Oliver Steele's Functional, and John Resig's Micro-Templating.
+// For all details and documentation:
+// http://documentcloud.github.com/underscore
+(function(){function u(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(b.isFunction(a.isEqual))return a.isEqual(c);if(b.isFunction(c.isEqual))return c.isEqual(a);var e=typeof a;if(e!=typeof c)return false;if(!a!=!c)return false;if(b.isNaN(a))return b.isNaN(c);var g=b.isString(a),f=b.isString(c);if(g||f)return g&&f&&String(a)==String(c);g=b.isNumber(a);f=b.isNumber(c);if(g||f)return g&&f&&+a==+c;g=b.isBoolean(a);f=b.isBoolean(c);
+if(g||f)return g&&f&&+a==+c;g=b.isDate(a);f=b.isDate(c);if(g||f)return g&&f&&a.getTime()==c.getTime();g=b.isRegExp(a);f=b.isRegExp(c);if(g||f)return g&&f&&a.source==c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase;if(e!="object")return false;if(a.length!==c.length)return false;if(a.constructor!==c.constructor)return false;for(e=d.length;e--;)if(d[e]==a)return true;d.push(a);var e=0,g=true,h;for(h in a)if(m.call(a,h)&&(e++,!(g=m.call(c,h)&&u(a[h],c[h],d))))break;if(g){for(h in c)if(m.call(c,
+h)&&!e--)break;g=!e}d.pop();return g}var r=this,F=r._,o={},k=Array.prototype,p=Object.prototype,i=k.slice,G=k.unshift,l=p.toString,m=p.hasOwnProperty,v=k.forEach,w=k.map,x=k.reduce,y=k.reduceRight,z=k.filter,A=k.every,B=k.some,q=k.indexOf,C=k.lastIndexOf,p=Array.isArray,H=Object.keys,s=Function.prototype.bind,b=function(a){return new n(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else typeof define==="function"&&define.amd?
+define("underscore",function(){return b}):r._=b;b.VERSION="1.2.1";var j=b.each=b.forEach=function(a,c,b){if(a!=null)if(v&&a.forEach===v)a.forEach(c,b);else if(a.length===+a.length)for(var e=0,g=a.length;e<g;e++){if(e in a&&c.call(b,a[e],e,a)===o)break}else for(e in a)if(m.call(a,e)&&c.call(b,a[e],e,a)===o)break};b.map=function(a,c,b){var e=[];if(a==null)return e;if(w&&a.map===w)return a.map(c,b);j(a,function(a,f,h){e[e.length]=c.call(b,a,f,h)});return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var g=
+d!==void 0;a==null&&(a=[]);if(x&&a.reduce===x)return e&&(c=b.bind(c,e)),g?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){g?d=c.call(e,d,a,b,i):(d=a,g=true)});if(!g)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){a==null&&(a=[]);if(y&&a.reduceRight===y)return e&&(c=b.bind(c,e)),d!==void 0?a.reduceRight(c,d):a.reduceRight(c);a=(b.isArray(a)?a.slice():b.toArray(a)).reverse();return b.reduce(a,c,d,e)};b.find=b.detect=function(a,c,b){var e;
+D(a,function(a,f,h){if(c.call(b,a,f,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(z&&a.filter===z)return a.filter(c,b);j(a,function(a,f,h){c.call(b,a,f,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,f,h){c.call(b,a,f,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(A&&a.every===A)return a.every(c,b);j(a,function(a,f,h){if(!(e=e&&c.call(b,a,f,h)))return o});
+return e};var D=b.some=b.any=function(a,c,d){var c=c||b.identity,e=false;if(a==null)return e;if(B&&a.some===B)return a.some(c,d);j(a,function(a,b,h){if(e|=c.call(d,a,b,h))return o});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return q&&a.indexOf===q?a.indexOf(c)!=-1:b=D(a,function(a){if(a===c)return true})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(c.call?c||a:a[c]).apply(a,d)})};b.pluck=function(a,c){return b.map(a,function(a){return a[c]})};
+b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});return e.value};b.shuffle=function(a){var b=[],d;
+j(a,function(a,g){g==0?b[0]=a:(d=Math.floor(Math.random()*(g+1)),b[g]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,f){return{value:a,criteria:c.call(d,a,b,f)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var e=0,g=a.length;e<
+g;){var f=e+g>>1;d(a[f])<d(c)?e=f+1:g=f}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,a.length-b):a[a.length-1]};b.rest=b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=
+function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,f,h){if(0==h||(c===true?b.last(d)!=f:!b.include(d,f)))d[d.length]=f,e[e.length]=a[h];return d},[]);return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};
+b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a,c){return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(q&&a.indexOf===q)return a.indexOf(c);
+for(d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(C&&a.lastIndexOf===C)return a.lastIndexOf(b);for(var d=a.length;d--;)if(a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),g=0,f=Array(e);g<e;)f[g++]=a,a+=d;return f};var E=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;
+e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));E.prototype=a.prototype;var b=new E,f=a.apply(b,e.concat(i.call(arguments)));return Object(f)===f?f:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,c){var d={};c||(c=b.identity);return function(){var b=c.apply(this,arguments);return m.call(d,b)?d[b]:d[b]=a.apply(this,arguments)}};b.delay=
+function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,g,f,h;h=b.debounce(function(){f=false},c);return function(){e=this;g=arguments;var b;d||(d=setTimeout(function(){d=null;a.apply(e,g);h()},c));f||a.apply(e,g);h&&h();f=true}};b.debounce=function(a,b){var d;return function(){var e=this,g=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,
+g)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments));return b.apply(this,d)}};b.compose=function(){var a=i.call(arguments);return function(){for(var b=i.call(arguments),d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}};b.keys=H||function(a){if(a!==Object(a))throw new TypeError("Invalid object");
+var b=[],d;for(d in a)m.call(a,d)&&(b[b.length]=d);return b};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)b[d]!==void 0&&(a[d]=b[d])});return a};b.defaults=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},
+a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return u(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(m.call(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=p||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};b.isArguments=l.call(arguments)=="[object Arguments]"?function(a){return l.call(a)=="[object Arguments]"}:function(a){return!(!a||!m.call(a,
+"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===
+void 0};b.noConflict=function(){r._=F;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&(?!\w+;|#\d+;|#x[\da-f]+;)/gi,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")};b.mixin=function(a){j(b.functions(a),function(c){I(c,b[c]=a[c])})};var J=0;b.uniqueId=function(a){var b=J++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,
+interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape,function(a,b){return"',_.escape("+b.replace(/\\'/g,"'")+"),'"}).replace(d.interpolate,function(a,b){return"',"+b.replace(/\\'/g,"'")+",'"}).replace(d.evaluate||null,function(a,b){return"');"+b.replace(/\\'/g,"'").replace(/[\r\n\t]/g," ")+"__p.push('"}).replace(/\r/g,
+"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",d=new Function("obj",d);return c?d(c):d};var n=function(a){this._wrapped=a};b.prototype=n.prototype;var t=function(a,c){return c?b(a).chain():a},I=function(a,c){n.prototype[a]=function(){var a=i.call(arguments);G.call(a,this._wrapped);return t(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];n.prototype[a]=function(){b.apply(this._wrapped,arguments);return t(this._wrapped,
+this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];n.prototype[a]=function(){return t(b.apply(this._wrapped,arguments),this._chain)}});n.prototype.chain=function(){this._chain=true;return this};n.prototype.value=function(){return this._wrapped}})();
[44/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/strict.dtd
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/strict.dtd b/blackberry10/node_modules/elementtree/node_modules/sax/examples/strict.dtd
new file mode 100644
index 0000000..b274559
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/strict.dtd
@@ -0,0 +1,870 @@
+<!--
+ This is HTML 4.01 Strict DTD, which excludes the presentation
+ attributes and elements that W3C expects to phase out as
+ support for style sheets matures. Authors should use the Strict
+ DTD when possible, but may use the Transitional DTD when support
+ for presentation attribute and elements is required.
+
+ HTML 4 includes mechanisms for style sheets, scripting,
+ embedding objects, improved support for right to left and mixed
+ direction text, and enhancements to forms for improved
+ accessibility for people with disabilities.
+
+ Draft: $Date: 1999/12/24 23:37:48 $
+
+ Authors:
+ Dave Raggett <ds...@w3.org>
+ Arnaud Le Hors <le...@w3.org>
+ Ian Jacobs <ij...@w3.org>
+
+ Further information about HTML 4.01 is available at:
+
+ http://www.w3.org/TR/1999/REC-html401-19991224
+
+
+ The HTML 4.01 specification includes additional
+ syntactic constraints that cannot be expressed within
+ the DTDs.
+
+-->
+<!--
+ Typical usage:
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+ <html>
+ <head>
+ ...
+ </head>
+ <body>
+ ...
+ </body>
+ </html>
+
+ The URI used as a system identifier with the public identifier allows
+ the user agent to download the DTD and entity sets as needed.
+
+ The FPI for the Transitional HTML 4.01 DTD is:
+
+ "-//W3C//DTD HTML 4.01 Transitional//EN"
+
+ This version of the transitional DTD is:
+
+ http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd
+
+ If you are writing a document that includes frames, use
+ the following FPI:
+
+ "-//W3C//DTD HTML 4.01 Frameset//EN"
+
+ This version of the frameset DTD is:
+
+ http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd
+
+ Use the following (relative) URIs to refer to
+ the DTDs and entity definitions of this specification:
+
+ "strict.dtd"
+ "loose.dtd"
+ "frameset.dtd"
+ "HTMLlat1.ent"
+ "HTMLsymbol.ent"
+ "HTMLspecial.ent"
+
+-->
+
+<!--================== Imported Names ====================================-->
+<!-- Feature Switch for frameset documents -->
+<!ENTITY % HTML.Frameset "IGNORE">
+
+<!ENTITY % ContentType "CDATA"
+ -- media type, as per [RFC2045]
+ -->
+
+<!ENTITY % ContentTypes "CDATA"
+ -- comma-separated list of media types, as per [RFC2045]
+ -->
+
+<!ENTITY % Charset "CDATA"
+ -- a character encoding, as per [RFC2045]
+ -->
+
+<!ENTITY % Charsets "CDATA"
+ -- a space-separated list of character encodings, as per [RFC2045]
+ -->
+
+<!ENTITY % LanguageCode "NAME"
+ -- a language code, as per [RFC1766]
+ -->
+
+<!ENTITY % Character "CDATA"
+ -- a single character from [ISO10646]
+ -->
+
+<!ENTITY % LinkTypes "CDATA"
+ -- space-separated list of link types
+ -->
+
+<!ENTITY % MediaDesc "CDATA"
+ -- single or comma-separated list of media descriptors
+ -->
+
+<!ENTITY % URI "CDATA"
+ -- a Uniform Resource Identifier,
+ see [URI]
+ -->
+
+<!ENTITY % Datetime "CDATA" -- date and time information. ISO date format -->
+
+
+<!ENTITY % Script "CDATA" -- script expression -->
+
+<!ENTITY % StyleSheet "CDATA" -- style sheet data -->
+
+
+
+<!ENTITY % Text "CDATA">
+
+
+<!-- Parameter Entities -->
+
+<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements -->
+
+<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
+
+<!ENTITY % list "UL | OL">
+
+<!ENTITY % preformatted "PRE">
+
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin1//EN//HTML"
+ "HTMLlat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols//EN//HTML"
+ "HTMLsymbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special//EN//HTML"
+ "HTMLspecial.ent">
+%HTMLspecial;
+<!--=================== Generic Attributes ===============================-->
+
+<!ENTITY % coreattrs
+ "id ID #IMPLIED -- document-wide unique id --
+ class CDATA #IMPLIED -- space-separated list of classes --
+ style %StyleSheet; #IMPLIED -- associated style info --
+ title %Text; #IMPLIED -- advisory title --"
+ >
+
+<!ENTITY % i18n
+ "lang %LanguageCode; #IMPLIED -- language code --
+ dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --"
+ >
+
+<!ENTITY % events
+ "onclick %Script; #IMPLIED -- a pointer button was clicked --
+ ondblclick %Script; #IMPLIED -- a pointer button was double clicked--
+ onmousedown %Script; #IMPLIED -- a pointer button was pressed down --
+ onmouseup %Script; #IMPLIED -- a pointer button was released --
+ onmouseover %Script; #IMPLIED -- a pointer was moved onto --
+ onmousemove %Script; #IMPLIED -- a pointer was moved within --
+ onmouseout %Script; #IMPLIED -- a pointer was moved away --
+ onkeypress %Script; #IMPLIED -- a key was pressed and released --
+ onkeydown %Script; #IMPLIED -- a key was pressed down --
+ onkeyup %Script; #IMPLIED -- a key was released --"
+ >
+
+<!-- Reserved Feature Switch -->
+<!ENTITY % HTML.Reserved "IGNORE">
+
+<!-- The following attributes are reserved for possible future use -->
+<![ %HTML.Reserved; [
+<!ENTITY % reserved
+ "datasrc %URI; #IMPLIED -- a single or tabular Data Source --
+ datafld CDATA #IMPLIED -- the property or column name --
+ dataformatas (plaintext|html) plaintext -- text or html --"
+ >
+]]>
+
+<!ENTITY % reserved "">
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+
+<!--=================== Text Markup ======================================-->
+
+<!ENTITY % fontstyle
+ "TT | I | B | BIG | SMALL">
+
+<!ENTITY % phrase "EM | STRONG | DFN | CODE |
+ SAMP | KBD | VAR | CITE | ABBR | ACRONYM" >
+
+<!ENTITY % special
+ "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO">
+
+<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">
+
+<!-- %inline; covers inline or "text-level" elements -->
+<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
+
+<!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*>
+<!ATTLIST (%fontstyle;|%phrase;)
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript -->
+<!ATTLIST (SUB|SUP)
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!ELEMENT SPAN - - (%inline;)* -- generic language/style container -->
+<!ATTLIST SPAN
+ %attrs; -- %coreattrs, %i18n, %events --
+ %reserved; -- reserved for possible future use --
+ >
+
+<!ELEMENT BDO - - (%inline;)* -- I18N BiDi over-ride -->
+<!ATTLIST BDO
+ %coreattrs; -- id, class, style, title --
+ lang %LanguageCode; #IMPLIED -- language code --
+ dir (ltr|rtl) #REQUIRED -- directionality --
+ >
+
+
+<!ELEMENT BR - O EMPTY -- forced line break -->
+<!ATTLIST BR
+ %coreattrs; -- id, class, style, title --
+ >
+
+<!--================== HTML content models ===============================-->
+
+<!--
+ HTML has two basic content models:
+
+ %inline; character level elements and text strings
+ %block; block-like elements e.g. paragraphs and lists
+-->
+
+<!ENTITY % block
+ "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
+ BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
+
+<!ENTITY % flow "%block; | %inline;">
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body -->
+<!ATTLIST BODY
+ %attrs; -- %coreattrs, %i18n, %events --
+ onload %Script; #IMPLIED -- the document has been loaded --
+ onunload %Script; #IMPLIED -- the document has been removed --
+ >
+
+<!ELEMENT ADDRESS - - (%inline;)* -- information on author -->
+<!ATTLIST ADDRESS
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!ELEMENT DIV - - (%flow;)* -- generic language/style container -->
+<!ATTLIST DIV
+ %attrs; -- %coreattrs, %i18n, %events --
+ %reserved; -- reserved for possible future use --
+ >
+
+
+<!--================== The Anchor Element ================================-->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+<!ENTITY % Coords "CDATA" -- comma-separated list of lengths -->
+
+<!ELEMENT A - - (%inline;)* -(A) -- anchor -->
+<!ATTLIST A
+ %attrs; -- %coreattrs, %i18n, %events --
+ charset %Charset; #IMPLIED -- char encoding of linked resource --
+ type %ContentType; #IMPLIED -- advisory content type --
+ name CDATA #IMPLIED -- named link end --
+ href %URI; #IMPLIED -- URI for linked resource --
+ hreflang %LanguageCode; #IMPLIED -- language code --
+ rel %LinkTypes; #IMPLIED -- forward link types --
+ rev %LinkTypes; #IMPLIED -- reverse link types --
+ accesskey %Character; #IMPLIED -- accessibility key character --
+ shape %Shape; rect -- for use with client-side image maps --
+ coords %Coords; #IMPLIED -- for use with client-side image maps --
+ tabindex NUMBER #IMPLIED -- position in tabbing order --
+ onfocus %Script; #IMPLIED -- the element got the focus --
+ onblur %Script; #IMPLIED -- the element lost the focus --
+ >
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+ separate document although this isn't yet widely supported -->
+
+<!ELEMENT MAP - - ((%block;) | AREA)+ -- client-side image map -->
+<!ATTLIST MAP
+ %attrs; -- %coreattrs, %i18n, %events --
+ name CDATA #REQUIRED -- for reference by usemap --
+ >
+
+<!ELEMENT AREA - O EMPTY -- client-side image map area -->
+<!ATTLIST AREA
+ %attrs; -- %coreattrs, %i18n, %events --
+ shape %Shape; rect -- controls interpretation of coords --
+ coords %Coords; #IMPLIED -- comma-separated list of lengths --
+ href %URI; #IMPLIED -- URI for linked resource --
+ nohref (nohref) #IMPLIED -- this region has no action --
+ alt %Text; #REQUIRED -- short description --
+ tabindex NUMBER #IMPLIED -- position in tabbing order --
+ accesskey %Character; #IMPLIED -- accessibility key character --
+ onfocus %Script; #IMPLIED -- the element got the focus --
+ onblur %Script; #IMPLIED -- the element lost the focus --
+ >
+
+<!--================== The LINK Element ==================================-->
+
+<!--
+ Relationship values can be used in principle:
+
+ a) for document specific toolbars/menus when used
+ with the LINK element in document head e.g.
+ start, contents, previous, next, index, end, help
+ b) to link to a separate style sheet (rel=stylesheet)
+ c) to make a link to a script (rel=script)
+ d) by stylesheets to control how collections of
+ html nodes are rendered into printed documents
+ e) to make a link to a printable version of this document
+ e.g. a postscript or pdf version (rel=alternate media=print)
+-->
+
+<!ELEMENT LINK - O EMPTY -- a media-independent link -->
+<!ATTLIST LINK
+ %attrs; -- %coreattrs, %i18n, %events --
+ charset %Charset; #IMPLIED -- char encoding of linked resource --
+ href %URI; #IMPLIED -- URI for linked resource --
+ hreflang %LanguageCode; #IMPLIED -- language code --
+ type %ContentType; #IMPLIED -- advisory content type --
+ rel %LinkTypes; #IMPLIED -- forward link types --
+ rev %LinkTypes; #IMPLIED -- reverse link types --
+ media %MediaDesc; #IMPLIED -- for rendering on these media --
+ >
+
+<!--=================== Images ===========================================-->
+
+<!-- Length defined in strict DTD for cellpadding/cellspacing -->
+<!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
+<!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative -->
+
+<![ %HTML.Frameset; [
+<!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength -->
+]]>
+
+<!ENTITY % Pixels "CDATA" -- integer representing length in pixels -->
+
+
+<!-- To avoid problems with text-only UAs as well as
+ to make image content understandable and navigable
+ to users of non-visual UAs, you need to provide
+ a description with ALT, and avoid server-side image maps -->
+<!ELEMENT IMG - O EMPTY -- Embedded image -->
+<!ATTLIST IMG
+ %attrs; -- %coreattrs, %i18n, %events --
+ src %URI; #REQUIRED -- URI of image to embed --
+ alt %Text; #REQUIRED -- short description --
+ longdesc %URI; #IMPLIED -- link to long description
+ (complements alt) --
+ name CDATA #IMPLIED -- name of image for scripting --
+ height %Length; #IMPLIED -- override height --
+ width %Length; #IMPLIED -- override width --
+ usemap %URI; #IMPLIED -- use client-side image map --
+ ismap (ismap) #IMPLIED -- use server-side image map --
+ >
+
+<!-- USEMAP points to a MAP element which may be in this document
+ or an external document, although the latter is not widely supported -->
+
+<!--==================== OBJECT ======================================-->
+<!--
+ OBJECT is used to embed objects as part of HTML pages
+ PARAM elements should precede other content. SGML mixed content
+ model technicality precludes specifying this formally ...
+-->
+
+<!ELEMENT OBJECT - - (PARAM | %flow;)*
+ -- generic embedded object -->
+<!ATTLIST OBJECT
+ %attrs; -- %coreattrs, %i18n, %events --
+ declare (declare) #IMPLIED -- declare but don't instantiate flag --
+ classid %URI; #IMPLIED -- identifies an implementation --
+ codebase %URI; #IMPLIED -- base URI for classid, data, archive--
+ data %URI; #IMPLIED -- reference to object's data --
+ type %ContentType; #IMPLIED -- content type for data --
+ codetype %ContentType; #IMPLIED -- content type for code --
+ archive CDATA #IMPLIED -- space-separated list of URIs --
+ standby %Text; #IMPLIED -- message to show while loading --
+ height %Length; #IMPLIED -- override height --
+ width %Length; #IMPLIED -- override width --
+ usemap %URI; #IMPLIED -- use client-side image map --
+ name CDATA #IMPLIED -- submit as part of form --
+ tabindex NUMBER #IMPLIED -- position in tabbing order --
+ %reserved; -- reserved for possible future use --
+ >
+
+<!ELEMENT PARAM - O EMPTY -- named property value -->
+<!ATTLIST PARAM
+ id ID #IMPLIED -- document-wide unique id --
+ name CDATA #REQUIRED -- property name --
+ value CDATA #IMPLIED -- property value --
+ valuetype (DATA|REF|OBJECT) DATA -- How to interpret value --
+ type %ContentType; #IMPLIED -- content type for value
+ when valuetype=ref --
+ >
+
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT HR - O EMPTY -- horizontal rule -->
+<!ATTLIST HR
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT P - O (%inline;)* -- paragraph -->
+<!ATTLIST P
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!--=================== Headings =========================================-->
+
+<!--
+ There are six levels of headings from H1 (the most important)
+ to H6 (the least important).
+-->
+
+<!ELEMENT (%heading;) - - (%inline;)* -- heading -->
+<!ATTLIST (%heading;)
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- excludes markup for images and changes in font size -->
+<!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP">
+
+<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
+<!ATTLIST PRE
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!--===================== Inline Quotes ==================================-->
+
+<!ELEMENT Q - - (%inline;)* -- short inline quotation -->
+<!ATTLIST Q
+ %attrs; -- %coreattrs, %i18n, %events --
+ cite %URI; #IMPLIED -- URI for source document or msg --
+ >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT BLOCKQUOTE - - (%block;|SCRIPT)+ -- long quotation -->
+<!ATTLIST BLOCKQUOTE
+ %attrs; -- %coreattrs, %i18n, %events --
+ cite %URI; #IMPLIED -- URI for source document or msg --
+ >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+
+<!-- INS/DEL are handled by inclusion on BODY -->
+<!ELEMENT (INS|DEL) - - (%flow;)* -- inserted text, deleted text -->
+<!ATTLIST (INS|DEL)
+ %attrs; -- %coreattrs, %i18n, %events --
+ cite %URI; #IMPLIED -- info on reason for change --
+ datetime %Datetime; #IMPLIED -- date and time of change --
+ >
+
+<!--=================== Lists ============================================-->
+
+<!-- definition lists - DT for term, DD for its definition -->
+
+<!ELEMENT DL - - (DT|DD)+ -- definition list -->
+<!ATTLIST DL
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!ELEMENT DT - O (%inline;)* -- definition term -->
+<!ELEMENT DD - O (%flow;)* -- definition description -->
+<!ATTLIST (DT|DD)
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+
+<!ELEMENT OL - - (LI)+ -- ordered list -->
+<!ATTLIST OL
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!-- Unordered Lists (UL) bullet styles -->
+<!ELEMENT UL - - (LI)+ -- unordered list -->
+<!ATTLIST UL
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+
+
+<!ELEMENT LI - O (%flow;)* -- list item -->
+<!ATTLIST LI
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!--================ Forms ===============================================-->
+<!ELEMENT FORM - - (%block;|SCRIPT)+ -(FORM) -- interactive form -->
+<!ATTLIST FORM
+ %attrs; -- %coreattrs, %i18n, %events --
+ action %URI; #REQUIRED -- server-side form handler --
+ method (GET|POST) GET -- HTTP method used to submit the form--
+ enctype %ContentType; "application/x-www-form-urlencoded"
+ accept %ContentTypes; #IMPLIED -- list of MIME types for file upload --
+ name CDATA #IMPLIED -- name of form for scripting --
+ onsubmit %Script; #IMPLIED -- the form was submitted --
+ onreset %Script; #IMPLIED -- the form was reset --
+ accept-charset %Charsets; #IMPLIED -- list of supported charsets --
+ >
+
+<!-- Each label must not contain more than ONE field -->
+<!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text -->
+<!ATTLIST LABEL
+ %attrs; -- %coreattrs, %i18n, %events --
+ for IDREF #IMPLIED -- matches field ID value --
+ accesskey %Character; #IMPLIED -- accessibility key character --
+ onfocus %Script; #IMPLIED -- the element got the focus --
+ onblur %Script; #IMPLIED -- the element lost the focus --
+ >
+
+<!ENTITY % InputType
+ "(TEXT | PASSWORD | CHECKBOX |
+ RADIO | SUBMIT | RESET |
+ FILE | HIDDEN | IMAGE | BUTTON)"
+ >
+
+<!-- attribute name required for all but submit and reset -->
+<!ELEMENT INPUT - O EMPTY -- form control -->
+<!ATTLIST INPUT
+ %attrs; -- %coreattrs, %i18n, %events --
+ type %InputType; TEXT -- what kind of widget is needed --
+ name CDATA #IMPLIED -- submit as part of form --
+ value CDATA #IMPLIED -- Specify for radio buttons and checkboxes --
+ checked (checked) #IMPLIED -- for radio buttons and check boxes --
+ disabled (disabled) #IMPLIED -- unavailable in this context --
+ readonly (readonly) #IMPLIED -- for text and passwd --
+ size CDATA #IMPLIED -- specific to each type of field --
+ maxlength NUMBER #IMPLIED -- max chars for text fields --
+ src %URI; #IMPLIED -- for fields with images --
+ alt CDATA #IMPLIED -- short description --
+ usemap %URI; #IMPLIED -- use client-side image map --
+ ismap (ismap) #IMPLIED -- use server-side image map --
+ tabindex NUMBER #IMPLIED -- position in tabbing order --
+ accesskey %Character; #IMPLIED -- accessibility key character --
+ onfocus %Script; #IMPLIED -- the element got the focus --
+ onblur %Script; #IMPLIED -- the element lost the focus --
+ onselect %Script; #IMPLIED -- some text was selected --
+ onchange %Script; #IMPLIED -- the element value was changed --
+ accept %ContentTypes; #IMPLIED -- list of MIME types for file upload --
+ %reserved; -- reserved for possible future use --
+ >
+
+<!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector -->
+<!ATTLIST SELECT
+ %attrs; -- %coreattrs, %i18n, %events --
+ name CDATA #IMPLIED -- field name --
+ size NUMBER #IMPLIED -- rows visible --
+ multiple (multiple) #IMPLIED -- default is single selection --
+ disabled (disabled) #IMPLIED -- unavailable in this context --
+ tabindex NUMBER #IMPLIED -- position in tabbing order --
+ onfocus %Script; #IMPLIED -- the element got the focus --
+ onblur %Script; #IMPLIED -- the element lost the focus --
+ onchange %Script; #IMPLIED -- the element value was changed --
+ %reserved; -- reserved for possible future use --
+ >
+
+<!ELEMENT OPTGROUP - - (OPTION)+ -- option group -->
+<!ATTLIST OPTGROUP
+ %attrs; -- %coreattrs, %i18n, %events --
+ disabled (disabled) #IMPLIED -- unavailable in this context --
+ label %Text; #REQUIRED -- for use in hierarchical menus --
+ >
+
+<!ELEMENT OPTION - O (#PCDATA) -- selectable choice -->
+<!ATTLIST OPTION
+ %attrs; -- %coreattrs, %i18n, %events --
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED -- unavailable in this context --
+ label %Text; #IMPLIED -- for use in hierarchical menus --
+ value CDATA #IMPLIED -- defaults to element content --
+ >
+
+<!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field -->
+<!ATTLIST TEXTAREA
+ %attrs; -- %coreattrs, %i18n, %events --
+ name CDATA #IMPLIED
+ rows NUMBER #REQUIRED
+ cols NUMBER #REQUIRED
+ disabled (disabled) #IMPLIED -- unavailable in this context --
+ readonly (readonly) #IMPLIED
+ tabindex NUMBER #IMPLIED -- position in tabbing order --
+ accesskey %Character; #IMPLIED -- accessibility key character --
+ onfocus %Script; #IMPLIED -- the element got the focus --
+ onblur %Script; #IMPLIED -- the element lost the focus --
+ onselect %Script; #IMPLIED -- some text was selected --
+ onchange %Script; #IMPLIED -- the element value was changed --
+ %reserved; -- reserved for possible future use --
+ >
+
+<!--
+ #PCDATA is to solve the mixed content problem,
+ per specification only whitespace is allowed there!
+ -->
+<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
+<!ATTLIST FIELDSET
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!ELEMENT LEGEND - - (%inline;)* -- fieldset legend -->
+
+<!ATTLIST LEGEND
+ %attrs; -- %coreattrs, %i18n, %events --
+ accesskey %Character; #IMPLIED -- accessibility key character --
+ >
+
+<!ELEMENT BUTTON - -
+ (%flow;)* -(A|%formctrl;|FORM|FIELDSET)
+ -- push button -->
+<!ATTLIST BUTTON
+ %attrs; -- %coreattrs, %i18n, %events --
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED -- sent to server when submitted --
+ type (button|submit|reset) submit -- for use as form button --
+ disabled (disabled) #IMPLIED -- unavailable in this context --
+ tabindex NUMBER #IMPLIED -- position in tabbing order --
+ accesskey %Character; #IMPLIED -- accessibility key character --
+ onfocus %Script; #IMPLIED -- the element got the focus --
+ onblur %Script; #IMPLIED -- the element lost the focus --
+ %reserved; -- reserved for possible future use --
+ >
+
+<!--======================= Tables =======================================-->
+
+<!-- IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The BORDER attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The FRAME attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the VALIGN attribute.
+
+ The value "border" is included for backwards compatibility with
+ <TABLE BORDER> which yields frame=border and border=implied
+ For <TABLE BORDER=1> you get border=1 and frame=implied. In this
+ case, it is appropriate to treat this as frame=border for backwards
+ compatibility with deployed browsers.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The RULES attribute defines which rules to draw between cells:
+
+ If RULES is absent then assume:
+ "none" if BORDER is absent or BORDER=0 otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents -->
+<!ENTITY % cellhalign
+ "align (left|center|right|justify|char) #IMPLIED
+ char %Character; #IMPLIED -- alignment char, e.g. char=':' --
+ charoff %Length; #IMPLIED -- offset for alignment char --"
+ >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+ "valign (top|middle|bottom|baseline) #IMPLIED"
+ >
+
+<!ELEMENT TABLE - -
+ (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
+<!ELEMENT CAPTION - - (%inline;)* -- table caption -->
+<!ELEMENT THEAD - O (TR)+ -- table header -->
+<!ELEMENT TFOOT - O (TR)+ -- table footer -->
+<!ELEMENT TBODY O O (TR)+ -- table body -->
+<!ELEMENT COLGROUP - O (COL)* -- table column group -->
+<!ELEMENT COL - O EMPTY -- table column -->
+<!ELEMENT TR - O (TH|TD)+ -- table row -->
+<!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell-->
+
+<!ATTLIST TABLE -- table element --
+ %attrs; -- %coreattrs, %i18n, %events --
+ summary %Text; #IMPLIED -- purpose/structure for speech output--
+ width %Length; #IMPLIED -- table width --
+ border %Pixels; #IMPLIED -- controls frame width around table --
+ frame %TFrame; #IMPLIED -- which parts of frame to render --
+ rules %TRules; #IMPLIED -- rulings between rows and cols --
+ cellspacing %Length; #IMPLIED -- spacing between cells --
+ cellpadding %Length; #IMPLIED -- spacing within cells --
+ %reserved; -- reserved for possible future use --
+ datapagesize CDATA #IMPLIED -- reserved for possible future use --
+ >
+
+
+<!ATTLIST CAPTION
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!--
+COLGROUP groups a set of COL elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST COLGROUP
+ %attrs; -- %coreattrs, %i18n, %events --
+ span NUMBER 1 -- default number of columns in group --
+ width %MultiLength; #IMPLIED -- default width for enclosed COLs --
+ %cellhalign; -- horizontal alignment in cells --
+ %cellvalign; -- vertical alignment in cells --
+ >
+
+<!--
+ COL elements define the alignment properties for cells in
+ one or more columns.
+
+ The WIDTH attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The SPAN attribute causes the attributes of one
+ COL element to apply to more than one column.
+-->
+<!ATTLIST COL -- column groups and properties --
+ %attrs; -- %coreattrs, %i18n, %events --
+ span NUMBER 1 -- COL attributes affect N columns --
+ width %MultiLength; #IMPLIED -- column width specification --
+ %cellhalign; -- horizontal alignment in cells --
+ %cellvalign; -- vertical alignment in cells --
+ >
+
+<!--
+ Use THEAD to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ TBODY sections are rendered in scrolling panel.
+
+ Use TFOOT to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ TBODY sections are rendered in scrolling panel.
+
+ Use multiple TBODY sections when rules are needed
+ between groups of table rows.
+-->
+<!ATTLIST (THEAD|TBODY|TFOOT) -- table section --
+ %attrs; -- %coreattrs, %i18n, %events --
+ %cellhalign; -- horizontal alignment in cells --
+ %cellvalign; -- vertical alignment in cells --
+ >
+
+<!ATTLIST TR -- table row --
+ %attrs; -- %coreattrs, %i18n, %events --
+ %cellhalign; -- horizontal alignment in cells --
+ %cellvalign; -- vertical alignment in cells --
+ >
+
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- TH is for headers, TD for data, but for cells acting as both use TD -->
+<!ATTLIST (TH|TD) -- header or data cell --
+ %attrs; -- %coreattrs, %i18n, %events --
+ abbr %Text; #IMPLIED -- abbreviation for header cell --
+ axis CDATA #IMPLIED -- comma-separated list of related headers--
+ headers IDREFS #IMPLIED -- list of id's for header cells --
+ scope %Scope; #IMPLIED -- scope covered by header cells --
+ rowspan NUMBER 1 -- number of rows spanned by cell --
+ colspan NUMBER 1 -- number of cols spanned by cell --
+ %cellhalign; -- horizontal alignment in cells --
+ %cellvalign; -- vertical alignment in cells --
+ >
+
+
+<!--================ Document Head =======================================-->
+<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
+<!ENTITY % head.content "TITLE & BASE?">
+
+<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->
+<!ATTLIST HEAD
+ %i18n; -- lang, dir --
+ profile %URI; #IMPLIED -- named dictionary of meta info --
+ >
+
+<!-- The TITLE element is not considered part of the flow of text.
+ It should be displayed, for example as the page header or
+ window title. Exactly one title is required per document.
+ -->
+<!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -->
+<!ATTLIST TITLE %i18n>
+
+
+<!ELEMENT BASE - O EMPTY -- document base URI -->
+<!ATTLIST BASE
+ href %URI; #REQUIRED -- URI that acts as base URI --
+ >
+
+<!ELEMENT META - O EMPTY -- generic metainformation -->
+<!ATTLIST META
+ %i18n; -- lang, dir, for use with content --
+ http-equiv NAME #IMPLIED -- HTTP response header name --
+ name NAME #IMPLIED -- metainformation name --
+ content CDATA #REQUIRED -- associated information --
+ scheme CDATA #IMPLIED -- select form of content --
+ >
+
+<!ELEMENT STYLE - - %StyleSheet -- style info -->
+<!ATTLIST STYLE
+ %i18n; -- lang, dir, for use with title --
+ type %ContentType; #REQUIRED -- content type of style language --
+ media %MediaDesc; #IMPLIED -- designed for use with these media --
+ title %Text; #IMPLIED -- advisory title --
+ >
+
+<!ELEMENT SCRIPT - - %Script; -- script statements -->
+<!ATTLIST SCRIPT
+ charset %Charset; #IMPLIED -- char encoding of linked resource --
+ type %ContentType; #REQUIRED -- content type of script language --
+ src %URI; #IMPLIED -- URI for an external script --
+ defer (defer) #IMPLIED -- UA may defer execution of script --
+ event CDATA #IMPLIED -- reserved for possible future use --
+ for %URI; #IMPLIED -- reserved for possible future use --
+ >
+
+<!ELEMENT NOSCRIPT - - (%block;)+
+ -- alternate content container for non script-based rendering -->
+<!ATTLIST NOSCRIPT
+ %attrs; -- %coreattrs, %i18n, %events --
+ >
+
+<!--================ Document Structure ==================================-->
+<!ENTITY % html.content "HEAD, BODY">
+
+<!ELEMENT HTML O O (%html.content;) -- document root element -->
+<!ATTLIST HTML
+ %i18n; -- lang, dir --
+ >
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/switch-bench.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/switch-bench.js b/blackberry10/node_modules/elementtree/node_modules/sax/examples/switch-bench.js
new file mode 100755
index 0000000..4d3cf14
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/switch-bench.js
@@ -0,0 +1,45 @@
+#!/usr/local/bin/node-bench
+
+var Promise = require("events").Promise;
+
+var xml = require("posix").cat("test.xml").wait(),
+ path = require("path"),
+ sax = require("../lib/sax"),
+ saxT = require("../lib/sax-trampoline"),
+
+ parser = sax.parser(false, {trim:true}),
+ parserT = saxT.parser(false, {trim:true}),
+
+ sys = require("sys");
+
+
+var count = exports.stepsPerLap = 500,
+ l = xml.length,
+ runs = 0;
+exports.countPerLap = 1000;
+exports.compare = {
+ "switch" : function () {
+ // sys.debug("switch runs: "+runs++);
+ // for (var x = 0; x < l; x += 1000) {
+ // parser.write(xml.substr(x, 1000))
+ // }
+ // for (var i = 0; i < count; i ++) {
+ parser.write(xml);
+ parser.close();
+ // }
+ // done();
+ },
+ trampoline : function () {
+ // sys.debug("trampoline runs: "+runs++);
+ // for (var x = 0; x < l; x += 1000) {
+ // parserT.write(xml.substr(x, 1000))
+ // }
+ // for (var i = 0; i < count; i ++) {
+ parserT.write(xml);
+ parserT.close();
+ // }
+ // done();
+ },
+};
+
+sys.debug("rock and roll...");
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/test.html
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/test.html b/blackberry10/node_modules/elementtree/node_modules/sax/examples/test.html
new file mode 100644
index 0000000..61f8f1a
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/test.html
@@ -0,0 +1,15 @@
+<!doctype html>
+
+<html lang="en">
+<head>
+ <title>testing the parser</title>
+</head>
+<body>
+
+<p>hello
+
+<script>
+
+</script>
+</body>
+</html>
[43/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/examples/test.xml
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/examples/test.xml b/blackberry10/node_modules/elementtree/node_modules/sax/examples/test.xml
new file mode 100644
index 0000000..801292d
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/examples/test.xml
@@ -0,0 +1,1254 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE RootElement [
+ <!ENTITY e SYSTEM "001.ent">
+]>
+<RootElement param="value">
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+ <FirstElement>
+ Some Text
+ </FirstElement>
+ <?some_pi some_attr="some_value"?>
+ <!-- this is a comment -- but this isnt part of the comment -->
+ <!-- this is a comment == and this is a part of the comment -->
+ <!-- this is a comment > and this is also part of the thing -->
+ <!invalid comment>
+ <![CDATA[ this is random stuff. & and < and > are ok in here. ]]>
+ <SecondElement param2="something">
+ Pre-Text & <Inline>Inlined text</Inline> Post-text.
+ 
+ </SecondElement>
+</RootElement>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/elementtree/node_modules/sax/lib/sax.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/elementtree/node_modules/sax/lib/sax.js b/blackberry10/node_modules/elementtree/node_modules/sax/lib/sax.js
new file mode 100644
index 0000000..17fb08e
--- /dev/null
+++ b/blackberry10/node_modules/elementtree/node_modules/sax/lib/sax.js
@@ -0,0 +1,1006 @@
+// wrapper for non-node envs
+;(function (sax) {
+
+sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }
+sax.SAXParser = SAXParser
+sax.SAXStream = SAXStream
+sax.createStream = createStream
+
+// When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
+// When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
+// since that's the earliest that a buffer overrun could occur. This way, checks are
+// as rare as required, but as often as necessary to ensure never crossing this bound.
+// Furthermore, buffers are only tested at most once per write(), so passing a very
+// large string into write() might have undesirable effects, but this is manageable by
+// the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme
+// edge case, result in creating at most one complete copy of the string passed in.
+// Set to Infinity to have unlimited buffers.
+sax.MAX_BUFFER_LENGTH = 64 * 1024
+
+var buffers = [
+ "comment", "sgmlDecl", "textNode", "tagName", "doctype",
+ "procInstName", "procInstBody", "entity", "attribName",
+ "attribValue", "cdata", "script"
+]
+
+sax.EVENTS = // for discoverability.
+ [ "text"
+ , "processinginstruction"
+ , "sgmldeclaration"
+ , "doctype"
+ , "comment"
+ , "attribute"
+ , "opentag"
+ , "closetag"
+ , "opencdata"
+ , "cdata"
+ , "closecdata"
+ , "error"
+ , "end"
+ , "ready"
+ , "script"
+ , "opennamespace"
+ , "closenamespace"
+ ]
+
+function SAXParser (strict, opt) {
+ if (!(this instanceof SAXParser)) return new SAXParser(strict, opt)
+
+ var parser = this
+ clearBuffers(parser)
+ parser.q = parser.c = ""
+ parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH
+ parser.opt = opt || {}
+ parser.tagCase = parser.opt.lowercasetags ? "toLowerCase" : "toUpperCase"
+ parser.tags = []
+ parser.closed = parser.closedRoot = parser.sawRoot = false
+ parser.tag = parser.error = null
+ parser.strict = !!strict
+ parser.noscript = !!(strict || parser.opt.noscript)
+ parser.state = S.BEGIN
+ parser.ENTITIES = Object.create(sax.ENTITIES)
+ parser.attribList = []
+
+ // namespaces form a prototype chain.
+ // it always points at the current tag,
+ // which protos to its parent tag.
+ if (parser.opt.xmlns) parser.ns = Object.create(rootNS)
+
+ // mostly just for error reporting
+ parser.position = parser.line = parser.column = 0
+ emit(parser, "onready")
+}
+
+if (!Object.create) Object.create = function (o) {
+ function f () { this.__proto__ = o }
+ f.prototype = o
+ return new f
+}
+
+if (!Object.getPrototypeOf) Object.getPrototypeOf = function (o) {
+ return o.__proto__
+}
+
+if (!Object.keys) Object.keys = function (o) {
+ var a = []
+ for (var i in o) if (o.hasOwnProperty(i)) a.push(i)
+ return a
+}
+
+function checkBufferLength (parser) {
+ var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)
+ , maxActual = 0
+ for (var i = 0, l = buffers.length; i < l; i ++) {
+ var len = parser[buffers[i]].length
+ if (len > maxAllowed) {
+ // Text/cdata nodes can get big, and since they're buffered,
+ // we can get here under normal conditions.
+ // Avoid issues by emitting the text node now,
+ // so at least it won't get any bigger.
+ switch (buffers[i]) {
+ case "textNode":
+ closeText(parser)
+ break
+
+ case "cdata":
+ emitNode(parser, "oncdata", parser.cdata)
+ parser.cdata = ""
+ break
+
+ case "script":
+ emitNode(parser, "onscript", parser.script)
+ parser.script = ""
+ break
+
+ default:
+ error(parser, "Max buffer length exceeded: "+buffers[i])
+ }
+ }
+ maxActual = Math.max(maxActual, len)
+ }
+ // schedule the next check for the earliest possible buffer overrun.
+ parser.bufferCheckPosition = (sax.MAX_BUFFER_LENGTH - maxActual)
+ + parser.position
+}
+
+function clearBuffers (parser) {
+ for (var i = 0, l = buffers.length; i < l; i ++) {
+ parser[buffers[i]] = ""
+ }
+}
+
+SAXParser.prototype =
+ { end: function () { end(this) }
+ , write: write
+ , resume: function () { this.error = null; return this }
+ , close: function () { return this.write(null) }
+ , end: function () { return this.write(null) }
+ }
+
+try {
+ var Stream = require("stream").Stream
+} catch (ex) {
+ var Stream = function () {}
+}
+
+
+var streamWraps = sax.EVENTS.filter(function (ev) {
+ return ev !== "error" && ev !== "end"
+})
+
+function createStream (strict, opt) {
+ return new SAXStream(strict, opt)
+}
+
+function SAXStream (strict, opt) {
+ if (!(this instanceof SAXStream)) return new SAXStream(strict, opt)
+
+ Stream.apply(me)
+
+ this._parser = new SAXParser(strict, opt)
+ this.writable = true
+ this.readable = true
+
+
+ var me = this
+
+ this._parser.onend = function () {
+ me.emit("end")
+ }
+
+ this._parser.onerror = function (er) {
+ me.emit("error", er)
+
+ // if didn't throw, then means error was handled.
+ // go ahead and clear error, so we can write again.
+ me._parser.error = null
+ }
+
+ streamWraps.forEach(function (ev) {
+ Object.defineProperty(me, "on" + ev, {
+ get: function () { return me._parser["on" + ev] },
+ set: function (h) {
+ if (!h) {
+ me.removeAllListeners(ev)
+ return me._parser["on"+ev] = h
+ }
+ me.on(ev, h)
+ },
+ enumerable: true,
+ configurable: false
+ })
+ })
+}
+
+SAXStream.prototype = Object.create(Stream.prototype,
+ { constructor: { value: SAXStream } })
+
+SAXStream.prototype.write = function (data) {
+ this._parser.write(data.toString())
+ this.emit("data", data)
+ return true
+}
+
+SAXStream.prototype.end = function (chunk) {
+ if (chunk && chunk.length) this._parser.write(chunk.toString())
+ this._parser.end()
+ return true
+}
+
+SAXStream.prototype.on = function (ev, handler) {
+ var me = this
+ if (!me._parser["on"+ev] && streamWraps.indexOf(ev) !== -1) {
+ me._parser["on"+ev] = function () {
+ var args = arguments.length === 1 ? [arguments[0]]
+ : Array.apply(null, arguments)
+ args.splice(0, 0, ev)
+ me.emit.apply(me, args)
+ }
+ }
+
+ return Stream.prototype.on.call(me, ev, handler)
+}
+
+
+
+// character classes and tokens
+var whitespace = "\r\n\t "
+ // this really needs to be replaced with character classes.
+ // XML allows all manner of ridiculous numbers and digits.
+ , number = "0124356789"
+ , letter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ // (Letter | "_" | ":")
+ , nameStart = letter+"_:"
+ , nameBody = nameStart+number+"-."
+ , quote = "'\""
+ , entity = number+letter+"#"
+ , attribEnd = whitespace + ">"
+ , CDATA = "[CDATA["
+ , DOCTYPE = "DOCTYPE"
+ , XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"
+ , XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"
+ , rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }
+
+// turn all the string character sets into character class objects.
+whitespace = charClass(whitespace)
+number = charClass(number)
+letter = charClass(letter)
+nameStart = charClass(nameStart)
+nameBody = charClass(nameBody)
+quote = charClass(quote)
+entity = charClass(entity)
+attribEnd = charClass(attribEnd)
+
+function charClass (str) {
+ return str.split("").reduce(function (s, c) {
+ s[c] = true
+ return s
+ }, {})
+}
+
+function is (charclass, c) {
+ return charclass[c]
+}
+
+function not (charclass, c) {
+ return !charclass[c]
+}
+
+var S = 0
+sax.STATE =
+{ BEGIN : S++
+, TEXT : S++ // general stuff
+, TEXT_ENTITY : S++ // & and such.
+, OPEN_WAKA : S++ // <
+, SGML_DECL : S++ // <!BLARG
+, SGML_DECL_QUOTED : S++ // <!BLARG foo "bar
+, DOCTYPE : S++ // <!DOCTYPE
+, DOCTYPE_QUOTED : S++ // <!DOCTYPE "//blah
+, DOCTYPE_DTD : S++ // <!DOCTYPE "//blah" [ ...
+, DOCTYPE_DTD_QUOTED : S++ // <!DOCTYPE "//blah" [ "foo
+, COMMENT_STARTING : S++ // <!-
+, COMMENT : S++ // <!--
+, COMMENT_ENDING : S++ // <!-- blah -
+, COMMENT_ENDED : S++ // <!-- blah --
+, CDATA : S++ // <![CDATA[ something
+, CDATA_ENDING : S++ // ]
+, CDATA_ENDING_2 : S++ // ]]
+, PROC_INST : S++ // <?hi
+, PROC_INST_BODY : S++ // <?hi there
+, PROC_INST_QUOTED : S++ // <?hi "there
+, PROC_INST_ENDING : S++ // <?hi "there" ?
+, OPEN_TAG : S++ // <strong
+, OPEN_TAG_SLASH : S++ // <strong /
+, ATTRIB : S++ // <a
+, ATTRIB_NAME : S++ // <a foo
+, ATTRIB_NAME_SAW_WHITE : S++ // <a foo _
+, ATTRIB_VALUE : S++ // <a foo=
+, ATTRIB_VALUE_QUOTED : S++ // <a foo="bar
+, ATTRIB_VALUE_UNQUOTED : S++ // <a foo=bar
+, ATTRIB_VALUE_ENTITY_Q : S++ // <foo bar="""
+, ATTRIB_VALUE_ENTITY_U : S++ // <foo bar="
+, CLOSE_TAG : S++ // </a
+, CLOSE_TAG_SAW_WHITE : S++ // </a >
+, SCRIPT : S++ // <script> ...
+, SCRIPT_ENDING : S++ // <script> ... <
+}
+
+sax.ENTITIES =
+{ "apos" : "'"
+, "quot" : "\""
+, "amp" : "&"
+, "gt" : ">"
+, "lt" : "<"
+}
+
+for (var S in sax.STATE) sax.STATE[sax.STATE[S]] = S
+
+// shorthand
+S = sax.STATE
+
+function emit (parser, event, data) {
+ parser[event] && parser[event](data)
+}
+
+function emitNode (parser, nodeType, data) {
+ if (parser.textNode) closeText(parser)
+ emit(parser, nodeType, data)
+}
+
+function closeText (parser) {
+ parser.textNode = textopts(parser.opt, parser.textNode)
+ if (parser.textNode) emit(parser, "ontext", parser.textNode)
+ parser.textNode = ""
+}
+
+function textopts (opt, text) {
+ if (opt.trim) text = text.trim()
+ if (opt.normalize) text = text.replace(/\s+/g, " ")
+ return text
+}
+
+function error (parser, er) {
+ closeText(parser)
+ er += "\nLine: "+parser.line+
+ "\nColumn: "+parser.column+
+ "\nChar: "+parser.c
+ er = new Error(er)
+ parser.error = er
+ emit(parser, "onerror", er)
+ return parser
+}
+
+function end (parser) {
+ if (parser.state !== S.TEXT) error(parser, "Unexpected end")
+ closeText(parser)
+ parser.c = ""
+ parser.closed = true
+ emit(parser, "onend")
+ SAXParser.call(parser, parser.strict, parser.opt)
+ return parser
+}
+
+function strictFail (parser, message) {
+ if (parser.strict) error(parser, message)
+}
+
+function newTag (parser) {
+ if (!parser.strict) parser.tagName = parser.tagName[parser.tagCase]()
+ var parent = parser.tags[parser.tags.length - 1] || parser
+ , tag = parser.tag = { name : parser.tagName, attributes : {} }
+
+ // will be overridden if tag contails an xmlns="foo" or xmlns:foo="bar"
+ if (parser.opt.xmlns) tag.ns = parent.ns
+ parser.attribList.length = 0
+}
+
+function qname (name) {
+ var i = name.indexOf(":")
+ , qualName = i < 0 ? [ "", name ] : name.split(":")
+ , prefix = qualName[0]
+ , local = qualName[1]
+
+ // <x "xmlns"="http://foo">
+ if (name === "xmlns") {
+ prefix = "xmlns"
+ local = ""
+ }
+
+ return { prefix: prefix, local: local }
+}
+
+function attrib (parser) {
+ if (parser.opt.xmlns) {
+ var qn = qname(parser.attribName)
+ , prefix = qn.prefix
+ , local = qn.local
+
+ if (prefix === "xmlns") {
+ // namespace binding attribute; push the binding into scope
+ if (local === "xml" && parser.attribValue !== XML_NAMESPACE) {
+ strictFail( parser
+ , "xml: prefix must be bound to " + XML_NAMESPACE + "\n"
+ + "Actual: " + parser.attribValue )
+ } else if (local === "xmlns" && parser.attribValue !== XMLNS_NAMESPACE) {
+ strictFail( parser
+ , "xmlns: prefix must be bound to " + XMLNS_NAMESPACE + "\n"
+ + "Actual: " + parser.attribValue )
+ } else {
+ var tag = parser.tag
+ , parent = parser.tags[parser.tags.length - 1] || parser
+ if (tag.ns === parent.ns) {
+ tag.ns = Object.create(parent.ns)
+ }
+ tag.ns[local] = parser.attribValue
+ }
+ }
+
+ // defer onattribute events until all attributes have been seen
+ // so any new bindings can take effect; preserve attribute order
+ // so deferred events can be emitted in document order
+ parser.attribList.push([parser.attribName, parser.attribValue])
+ } else {
+ // in non-xmlns mode, we can emit the event right away
+ parser.tag.attributes[parser.attribName] = parser.attribValue
+ emitNode( parser
+ , "onattribute"
+ , { name: parser.attribName
+ , value: parser.attribValue } )
+ }
+
+ parser.attribName = parser.attribValue = ""
+}
+
+function openTag (parser, selfClosing) {
+ if (parser.opt.xmlns) {
+ // emit namespace binding events
+ var tag = parser.tag
+
+ // add namespace info to tag
+ var qn = qname(parser.tagName)
+ tag.prefix = qn.prefix
+ tag.local = qn.local
+ tag.uri = tag.ns[qn.prefix] || qn.prefix
+
+ if (tag.prefix && !tag.uri) {
+ strictFail(parser, "Unbound namespace prefix: "
+ + JSON.stringify(parser.tagName))
+ }
+
+ var parent = parser.tags[parser.tags.length - 1] || parser
+ if (tag.ns && parent.ns !== tag.ns) {
+ Object.keys(tag.ns).forEach(function (p) {
+ emitNode( parser
+ , "onopennamespace"
+ , { prefix: p , uri: tag.ns[p] } )
+ })
+ }
+
+ // handle deferred onattribute events
+ for (var i = 0, l = parser.attribList.length; i < l; i ++) {
+ var nv = parser.attribList[i]
+ var name = nv[0]
+ , value = nv[1]
+ , qualName = qname(name)
+ , prefix = qualName.prefix
+ , local = qualName.local
+ , uri = tag.ns[prefix] || ""
+ , a = { name: name
+ , value: value
+ , prefix: prefix
+ , local: local
+ , uri: uri
+ }
+
+ // if there's any attributes with an undefined namespace,
+ // then fail on them now.
+ if (prefix && prefix != "xmlns" && !uri) {
+ strictFail(parser, "Unbound namespace prefix: "
+ + JSON.stringify(prefix))
+ a.uri = prefix
+ }
+ parser.tag.attributes[name] = a
+ emitNode(parser, "onattribute", a)
+ }
+ parser.attribList.length = 0
+ }
+
+ // process the tag
+ parser.sawRoot = true
+ parser.tags.push(parser.tag)
+ emitNode(parser, "onopentag", parser.tag)
+ if (!selfClosing) {
+ // special case for <script> in non-strict mode.
+ if (!parser.noscript && parser.tagName.toLowerCase() === "script") {
+ parser.state = S.SCRIPT
+ } else {
+ parser.state = S.TEXT
+ }
+ parser.tag = null
+ parser.tagName = ""
+ }
+ parser.attribName = parser.attribValue = ""
+ parser.attribList.length = 0
+}
+
+function closeTag (parser) {
+ if (!parser.tagName) {
+ strictFail(parser, "Weird empty close tag.")
+ parser.textNode += "</>"
+ parser.state = S.TEXT
+ return
+ }
+ // first make sure that the closing tag actually exists.
+ // <a><b></c></b></a> will close everything, otherwise.
+ var t = parser.tags.length
+ var tagName = parser.tagName
+ if (!parser.strict) tagName = tagName[parser.tagCase]()
+ var closeTo = tagName
+ while (t --) {
+ var close = parser.tags[t]
+ if (close.name !== closeTo) {
+ // fail the first time in strict mode
+ strictFail(parser, "Unexpected close tag")
+ } else break
+ }
+
+ // didn't find it. we already failed for strict, so just abort.
+ if (t < 0) {
+ strictFail(parser, "Unmatched closing tag: "+parser.tagName)
+ parser.textNode += "</" + parser.tagName + ">"
+ parser.state = S.TEXT
+ return
+ }
+ parser.tagName = tagName
+ var s = parser.tags.length
+ while (s --> t) {
+ var tag = parser.tag = parser.tags.pop()
+ parser.tagName = parser.tag.name
+ emitNode(parser, "onclosetag", parser.tagName)
+
+ var x = {}
+ for (var i in tag.ns) x[i] = tag.ns[i]
+
+ var parent = parser.tags[parser.tags.length - 1] || parser
+ if (parser.opt.xmlns && tag.ns !== parent.ns) {
+ // remove namespace bindings introduced by tag
+ Object.keys(tag.ns).forEach(function (p) {
+ var n = tag.ns[p]
+ emitNode(parser, "onclosenamespace", { prefix: p, uri: n })
+ })
+ }
+ }
+ if (t === 0) parser.closedRoot = true
+ parser.tagName = parser.attribValue = parser.attribName = ""
+ parser.attribList.length = 0
+ parser.state = S.TEXT
+}
+
+function parseEntity (parser) {
+ var entity = parser.entity.toLowerCase()
+ , num
+ , numStr = ""
+ if (parser.ENTITIES[entity]) return parser.ENTITIES[entity]
+ if (entity.charAt(0) === "#") {
+ if (entity.charAt(1) === "x") {
+ entity = entity.slice(2)
+ num = parseInt(entity, 16)
+ numStr = num.toString(16)
+ } else {
+ entity = entity.slice(1)
+ num = parseInt(entity, 10)
+ numStr = num.toString(10)
+ }
+ }
+ entity = entity.replace(/^0+/, "")
+ if (numStr.toLowerCase() !== entity) {
+ strictFail(parser, "Invalid character entity")
+ return "&"+parser.entity + ";"
+ }
+ return String.fromCharCode(num)
+}
+
+function write (chunk) {
+ var parser = this
+ if (this.error) throw this.error
+ if (parser.closed) return error(parser,
+ "Cannot write after close. Assign an onready handler.")
+ if (chunk === null) return end(parser)
+ var i = 0, c = ""
+ while (parser.c = c = chunk.charAt(i++)) {
+ parser.position ++
+ if (c === "\n") {
+ parser.line ++
+ parser.column = 0
+ } else parser.column ++
+ switch (parser.state) {
+
+ case S.BEGIN:
+ if (c === "<") parser.state = S.OPEN_WAKA
+ else if (not(whitespace,c)) {
+ // have to process this as a text node.
+ // weird, but happens.
+ strictFail(parser, "Non-whitespace before first tag.")
+ parser.textNode = c
+ parser.state = S.TEXT
+ }
+ continue
+
+ case S.TEXT:
+ if (parser.sawRoot && !parser.closedRoot) {
+ var starti = i-1
+ while (c && c!=="<" && c!=="&") {
+ c = chunk.charAt(i++)
+ if (c) {
+ parser.position ++
+ if (c === "\n") {
+ parser.line ++
+ parser.column = 0
+ } else parser.column ++
+ }
+ }
+ parser.textNode += chunk.substring(starti, i-1)
+ }
+ if (c === "<") parser.state = S.OPEN_WAKA
+ else {
+ if (not(whitespace, c) && (!parser.sawRoot || parser.closedRoot))
+ strictFail("Text data outside of root node.")
+ if (c === "&") parser.state = S.TEXT_ENTITY
+ else parser.textNode += c
+ }
+ continue
+
+ case S.SCRIPT:
+ // only non-strict
+ if (c === "<") {
+ parser.state = S.SCRIPT_ENDING
+ } else parser.script += c
+ continue
+
+ case S.SCRIPT_ENDING:
+ if (c === "/") {
+ emitNode(parser, "onscript", parser.script)
+ parser.state = S.CLOSE_TAG
+ parser.script = ""
+ parser.tagName = ""
+ } else {
+ parser.script += "<" + c
+ parser.state = S.SCRIPT
+ }
+ continue
+
+ case S.OPEN_WAKA:
+ // either a /, ?, !, or text is coming next.
+ if (c === "!") {
+ parser.state = S.SGML_DECL
+ parser.sgmlDecl = ""
+ } else if (is(whitespace, c)) {
+ // wait for it...
+ } else if (is(nameStart,c)) {
+ parser.startTagPosition = parser.position - 1
+ parser.state = S.OPEN_TAG
+ parser.tagName = c
+ } else if (c === "/") {
+ parser.startTagPosition = parser.position - 1
+ parser.state = S.CLOSE_TAG
+ parser.tagName = ""
+ } else if (c === "?") {
+ parser.state = S.PROC_INST
+ parser.procInstName = parser.procInstBody = ""
+ } else {
+ strictFail(parser, "Unencoded <")
+ parser.textNode += "<" + c
+ parser.state = S.TEXT
+ }
+ continue
+
+ case S.SGML_DECL:
+ if ((parser.sgmlDecl+c).toUpperCase() === CDATA) {
+ emitNode(parser, "onopencdata")
+ parser.state = S.CDATA
+ parser.sgmlDecl = ""
+ parser.cdata = ""
+ } else if (parser.sgmlDecl+c === "--") {
+ parser.state = S.COMMENT
+ parser.comment = ""
+ parser.sgmlDecl = ""
+ } else if ((parser.sgmlDecl+c).toUpperCase() === DOCTYPE) {
+ parser.state = S.DOCTYPE
+ if (parser.doctype || parser.sawRoot) strictFail(parser,
+ "Inappropriately located doctype declaration")
+ parser.doctype = ""
+ parser.sgmlDecl = ""
+ } else if (c === ">") {
+ emitNode(parser, "onsgmldeclaration", parser.sgmlDecl)
+ parser.sgmlDecl = ""
+ parser.state = S.TEXT
+ } else if (is(quote, c)) {
+ parser.state = S.SGML_DECL_QUOTED
+ parser.sgmlDecl += c
+ } else parser.sgmlDecl += c
+ continue
+
+ case S.SGML_DECL_QUOTED:
+ if (c === parser.q) {
+ parser.state = S.SGML_DECL
+ parser.q = ""
+ }
+ parser.sgmlDecl += c
+ continue
+
+ case S.DOCTYPE:
+ if (c === ">") {
+ parser.state = S.TEXT
+ emitNode(parser, "ondoctype", parser.doctype)
+ parser.doctype = true // just remember that we saw it.
+ } else {
+ parser.doctype += c
+ if (c === "[") parser.state = S.DOCTYPE_DTD
+ else if (is(quote, c)) {
+ parser.state = S.DOCTYPE_QUOTED
+ parser.q = c
+ }
+ }
+ continue
+
+ case S.DOCTYPE_QUOTED:
+ parser.doctype += c
+ if (c === parser.q) {
+ parser.q = ""
+ parser.state = S.DOCTYPE
+ }
+ continue
+
+ case S.DOCTYPE_DTD:
+ parser.doctype += c
+ if (c === "]") parser.state = S.DOCTYPE
+ else if (is(quote,c)) {
+ parser.state = S.DOCTYPE_DTD_QUOTED
+ parser.q = c
+ }
+ continue
+
+ case S.DOCTYPE_DTD_QUOTED:
+ parser.doctype += c
+ if (c === parser.q) {
+ parser.state = S.DOCTYPE_DTD
+ parser.q = ""
+ }
+ continue
+
+ case S.COMMENT:
+ if (c === "-") parser.state = S.COMMENT_ENDING
+ else parser.comment += c
+ continue
+
+ case S.COMMENT_ENDING:
+ if (c === "-") {
+ parser.state = S.COMMENT_ENDED
+ parser.comment = textopts(parser.opt, parser.comment)
+ if (parser.comment) emitNode(parser, "oncomment", parser.comment)
+ parser.comment = ""
+ } else {
+ parser.comment += "-" + c
+ parser.state = S.COMMENT
+ }
+ continue
+
+ case S.COMMENT_ENDED:
+ if (c !== ">") {
+ strictFail(parser, "Malformed comment")
+ // allow <!-- blah -- bloo --> in non-strict mode,
+ // which is a comment of " blah -- bloo "
+ parser.comment += "--" + c
+ parser.state = S.COMMENT
+ } else parser.state = S.TEXT
+ continue
+
+ case S.CDATA:
+ if (c === "]") parser.state = S.CDATA_ENDING
+ else parser.cdata += c
+ continue
+
+ case S.CDATA_ENDING:
+ if (c === "]") parser.state = S.CDATA_ENDING_2
+ else {
+ parser.cdata += "]" + c
+ parser.state = S.CDATA
+ }
+ continue
+
+ case S.CDATA_ENDING_2:
+ if (c === ">") {
+ if (parser.cdata) emitNode(parser, "oncdata", parser.cdata)
+ emitNode(parser, "onclosecdata")
+ parser.cdata = ""
+ parser.state = S.TEXT
+ } else if (c === "]") {
+ parser.cdata += "]"
+ } else {
+ parser.cdata += "]]" + c
+ parser.state = S.CDATA
+ }
+ continue
+
+ case S.PROC_INST:
+ if (c === "?") parser.state = S.PROC_INST_ENDING
+ else if (is(whitespace, c)) parser.state = S.PROC_INST_BODY
+ else parser.procInstName += c
+ continue
+
+ case S.PROC_INST_BODY:
+ if (!parser.procInstBody && is(whitespace, c)) continue
+ else if (c === "?") parser.state = S.PROC_INST_ENDING
+ else if (is(quote, c)) {
+ parser.state = S.PROC_INST_QUOTED
+ parser.q = c
+ parser.procInstBody += c
+ } else parser.procInstBody += c
+ continue
+
+ case S.PROC_INST_ENDING:
+ if (c === ">") {
+ emitNode(parser, "onprocessinginstruction", {
+ name : parser.procInstName,
+ body : parser.procInstBody
+ })
+ parser.procInstName = parser.procInstBody = ""
+ parser.state = S.TEXT
+ } else {
+ parser.procInstBody += "?" + c
+ parser.state = S.PROC_INST_BODY
+ }
+ continue
+
+ case S.PROC_INST_QUOTED:
+ parser.procInstBody += c
+ if (c === parser.q) {
+ parser.state = S.PROC_INST_BODY
+ parser.q = ""
+ }
+ continue
+
+ case S.OPEN_TAG:
+ if (is(nameBody, c)) parser.tagName += c
+ else {
+ newTag(parser)
+ if (c === ">") openTag(parser)
+ else if (c === "/") parser.state = S.OPEN_TAG_SLASH
+ else {
+ if (not(whitespace, c)) strictFail(
+ parser, "Invalid character in tag name")
+ parser.state = S.ATTRIB
+ }
+ }
+ continue
+
+ case S.OPEN_TAG_SLASH:
+ if (c === ">") {
+ openTag(parser, true)
+ closeTag(parser)
+ } else {
+ strictFail(parser, "Forward-slash in opening tag not followed by >")
+ parser.state = S.ATTRIB
+ }
+ continue
+
+ case S.ATTRIB:
+ // haven't read the attribute name yet.
+ if (is(whitespace, c)) continue
+ else if (c === ">") openTag(parser)
+ else if (c === "/") parser.state = S.OPEN_TAG_SLASH
+ else if (is(nameStart, c)) {
+ parser.attribName = c
+ parser.attribValue = ""
+ parser.state = S.ATTRIB_NAME
+ } else strictFail(parser, "Invalid attribute name")
+ continue
+
+ case S.ATTRIB_NAME:
+ if (c === "=") parser.state = S.ATTRIB_VALUE
+ else if (is(whitespace, c)) parser.state = S.ATTRIB_NAME_SAW_WHITE
+ else if (is(nameBody, c)) parser.attribName += c
+ else strictFail(parser, "Invalid attribute name")
+ continue
+
+ case S.ATTRIB_NAME_SAW_WHITE:
+ if (c === "=") parser.state = S.ATTRIB_VALUE
+ else if (is(whitespace, c)) continue
+ else {
+ strictFail(parser, "Attribute without value")
+ parser.tag.attributes[parser.attribName] = ""
+ parser.attribValue = ""
+ emitNode(parser, "onattribute",
+ { name : parser.attribName, value : "" })
+ parser.attribName = ""
+ if (c === ">") openTag(parser)
+ else if (is(nameStart, c)) {
+ parser.attribName = c
+ parser.state = S.ATTRIB_NAME
+ } else {
+ strictFail(parser, "Invalid attribute name")
+ parser.state = S.ATTRIB
+ }
+ }
+ continue
+
+ case S.ATTRIB_VALUE:
+ if (is(whitespace, c)) continue
+ else if (is(quote, c)) {
+ parser.q = c
+ parser.state = S.ATTRIB_VALUE_QUOTED
+ } else {
+ strictFail(parser, "Unquoted attribute value")
+ parser.state = S.ATTRIB_VALUE_UNQUOTED
+ parser.attribValue = c
+ }
+ continue
+
+ case S.ATTRIB_VALUE_QUOTED:
+ if (c !== parser.q) {
+ if (c === "&") parser.state = S.ATTRIB_VALUE_ENTITY_Q
+ else parser.attribValue += c
+ continue
+ }
+ attrib(parser)
+ parser.q = ""
+ parser.state = S.ATTRIB
+ continue
+
+ case S.ATTRIB_VALUE_UNQUOTED:
+ if (not(attribEnd,c)) {
+ if (c === "&") parser.state = S.ATTRIB_VALUE_ENTITY_U
+ else parser.attribValue += c
+ continue
+ }
+ attrib(parser)
+ if (c === ">") openTag(parser)
+ else parser.state = S.ATTRIB
+ continue
+
+ case S.CLOSE_TAG:
+ if (!parser.tagName) {
+ if (is(whitespace, c)) continue
+ else if (not(nameStart, c)) strictFail(parser,
+ "Invalid tagname in closing tag.")
+ else parser.tagName = c
+ }
+ else if (c === ">") closeTag(parser)
+ else if (is(nameBody, c)) parser.tagName += c
+ else {
+ if (not(whitespace, c)) strictFail(parser,
+ "Invalid tagname in closing tag")
+ parser.state = S.CLOSE_TAG_SAW_WHITE
+ }
+ continue
+
+ case S.CLOSE_TAG_SAW_WHITE:
+ if (is(whitespace, c)) continue
+ if (c === ">") closeTag(parser)
+ else strictFail("Invalid characters in closing tag")
+ continue
+
+ case S.TEXT_ENTITY:
+ case S.ATTRIB_VALUE_ENTITY_Q:
+ case S.ATTRIB_VALUE_ENTITY_U:
+ switch(parser.state) {
+ case S.TEXT_ENTITY:
+ var returnState = S.TEXT, buffer = "textNode"
+ break
+
+ case S.ATTRIB_VALUE_ENTITY_Q:
+ var returnState = S.ATTRIB_VALUE_QUOTED, buffer = "attribValue"
+ break
+
+ case S.ATTRIB_VALUE_ENTITY_U:
+ var returnState = S.ATTRIB_VALUE_UNQUOTED, buffer = "attribValue"
+ break
+ }
+ if (c === ";") {
+ parser[buffer] += parseEntity(parser)
+ parser.entity = ""
+ parser.state = returnState
+ }
+ else if (is(entity, c)) parser.entity += c
+ else {
+ strictFail("Invalid character entity")
+ parser[buffer] += "&" + parser.entity + c
+ parser.entity = ""
+ parser.state = returnState
+ }
+ continue
+
+ default:
+ throw new Error(parser, "Unknown state: " + parser.state)
+ }
+ } // while
+ // cdata blocks can get very big under normal conditions. emit and move on.
+ // if (parser.state === S.CDATA && parser.cdata) {
+ // emitNode(parser, "oncdata", parser.cdata)
+ // parser.cdata = ""
+ // }
+ if (parser.position >= parser.bufferCheckPosition) checkBufferLength(parser)
+ return parser
+}
+
+})(typeof exports === "undefined" ? sax = {} : exports)
[38/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/loader.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/loader.js b/blackberry10/node_modules/jake/lib/loader.js
new file mode 100644
index 0000000..58c7080
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/loader.js
@@ -0,0 +1,94 @@
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 path = require('path')
+ , fs = require('fs')
+ , existsSync = typeof fs.existsSync == 'function' ?
+ fs.existsSync : path.existsSync
+ , utils = require('utilities')
+ , Loader;
+
+
+Loader = function () {
+
+ var JAKEFILE_PAT = /\.jake(\.js|\.coffee)?$/;
+
+ var _requireCoffee = function () {
+ try {
+ return require('coffee-script');
+ }
+ catch (e) {
+ fail('CoffeeScript is missing! Try `npm install coffee-script`');
+ }
+ };
+
+ this.loadFile = function (file) {
+ var jakefile = file ?
+ file.replace(/\.js$/, '').replace(/\.coffee$/, '') : 'Jakefile'
+ , fileSpecified = !!file
+ // Dear God, why?
+ , isCoffee = false
+ // Warning, recursive
+ , exists;
+
+ exists = function () {
+ var cwd = process.cwd();
+ if (existsSync(jakefile) || existsSync(jakefile + '.js') ||
+ existsSync(jakefile + '.coffee')) {
+ return true;
+ }
+ if (!fileSpecified) {
+ process.chdir("..");
+ if (cwd === process.cwd()) {
+ return false;
+ }
+ return exists();
+ }
+ };
+
+ if (!exists()) {
+ fail('No Jakefile. Specify a valid path with -f/--jakefile, ' +
+ 'or place one in the current directory.');
+ }
+
+ isCoffee = existsSync(jakefile + '.coffee');
+ if (isCoffee) {
+ CoffeeScript = _requireCoffee();
+ }
+ require(utils.file.absolutize(jakefile));
+ };
+
+ this.loadDirectory = function (d) {
+ var dirname = d || 'jakelib'
+ , dirlist;
+ dirname = utils.file.absolutize(dirname);
+ if (existsSync(dirname)) {
+ dirlist = fs.readdirSync(dirname);
+ dirlist.forEach(function (filePath) {
+ if (JAKEFILE_PAT.test(filePath)) {
+ if (/\.coffee$/.test(filePath)) {
+ CoffeeScript = _requireCoffee();
+ }
+ require(path.join(dirname, filePath));
+ }
+ });
+ }
+ };
+};
+
+module.exports.Loader = Loader;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/npm_publish_task.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/npm_publish_task.js b/blackberry10/node_modules/jake/lib/npm_publish_task.js
new file mode 100644
index 0000000..d4f029b
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/npm_publish_task.js
@@ -0,0 +1,193 @@
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 fs = require('fs')
+ , exec = require('child_process').exec
+ , utils = require('utilities')
+ , currDir = process.cwd();
+
+var NpmPublishTask = function (name, packageFiles) {
+ this.name = name;
+ this.packageFiles = packageFiles;
+ this.define();
+};
+
+
+NpmPublishTask.prototype = new (function () {
+
+ var _currentBranch = null;
+
+ var getPackage = function () {
+ var pkg = JSON.parse(fs.readFileSync(process.cwd() + '/package.json').toString());
+ return pkg;
+ }
+ , getPackageVersionNumber = function () {
+ return getPackage().version;
+ };
+
+ this.define = function () {
+ var self = this;
+
+ namespace('npm', function () {
+ task('fetchTags', {async: true}, function () {
+ // Make sure local tags are up to date
+ cmds = [
+ 'git fetch --tags'
+ ];
+ jake.exec(cmds, function () {
+ console.log('Fetched remote tags.');
+ complete();
+ });
+ });
+
+ task('getCurrentBranch', {async: true}, function () {
+ // Figure out what branch to push to
+ exec('git symbolic-ref --short HEAD',
+ function (err, stdout, stderr) {
+ if (err) {
+ fail(err);
+ }
+ if (stderr) {
+ fail(new Error(stderr));
+ }
+ if (!stdout) {
+ fail(new Error('No current Git branch found'));
+ }
+ _currentBranch = utils.string.trim(stdout);
+ console.log('On branch ' + _currentBranch);
+ complete();
+ });
+ });
+
+ task('version', {async: true}, function () {
+ // Only bump, push, and tag if the Git repo is clean
+ exec('git status --porcelain --untracked-files=no',
+ function (err, stdout, stderr) {
+ var cmds
+ , path
+ , pkg
+ , version
+ , arr
+ , patch
+ , message;
+
+ if (err) {
+ fail(err);
+ }
+ if (stderr) {
+ fail(new Error(stderr));
+ }
+ if (stdout.length) {
+ fail(new Error('Git repository is not clean.'));
+ }
+
+ // Grab the current version-string
+ path = process.cwd() + '/package.json';
+ pkg = getPackage();
+ version = pkg.version;
+ // Increment the patch-number for the version
+ arr = version.split('.');
+ patch = parseInt(arr.pop(), 10) + 1;
+ arr.push(patch);
+ version = arr.join('.');
+ // New package-version
+ pkg.version = version;
+ // Commit-message
+ message = 'Version ' + version
+
+ // Update package.json with the new version-info
+ fs.writeFileSync(path, JSON.stringify(pkg, true, 2));
+
+ cmds = [
+ 'git commit package.json -m "' + message + '"'
+ , 'git push origin ' + _currentBranch
+ , 'git tag -a v' + version + ' -m "' + message + '"'
+ , 'git push --tags'
+ ];
+
+ jake.exec(cmds, function () {
+ var version = getPackageVersionNumber();
+ console.log('Bumped version number to v' + version + '.');
+ complete();
+ });
+ });
+ });
+
+ task('definePackage', function () {
+ var version = getPackageVersionNumber()
+ , t;
+ t = new jake.PackageTask(self.name, 'v' + version, function () {
+ this.packageFiles.include(self.packageFiles);
+ this.needTarGz = true;
+ });
+ });
+
+ task('package', {async: true}, function () {
+ var definePack = jake.Task['npm:definePackage']
+ , pack = jake.Task['package']
+ , version = getPackageVersionNumber();
+ // May have already been run
+ definePack.reenable(true);
+ definePack.addListener('complete', function () {
+ pack.addListener('complete', function () {
+ console.log('Created package for ' + self.name + ' v' + version);
+ complete();
+ });
+ pack.invoke();
+ });
+ definePack.invoke();
+ });
+
+ task('publish', {async: true}, function () {
+ var version = getPackageVersionNumber();
+ console.log('Publishing ' + self.name + ' v' + version);
+ cmds = [
+ 'npm publish pkg/' + self.name + '-v' + version + '.tar.gz'
+ ];
+ // Hackity hack -- NPM publish sometimes returns errror like:
+ // Error sending version data\nnpm ERR!
+ // Error: forbidden 0.2.4 is modified, should match modified time
+ setTimeout(function () {
+ jake.exec(cmds, function () {
+ console.log('Published to NPM');
+ complete();
+ }, {stdout: true});
+ }, 5000);
+ });
+
+ task('cleanup', function () {
+ var clobber = jake.Task['clobber'];
+ clobber.reenable(true);
+ clobber.invoke();
+ console.log('Cleaned up package');
+ });
+
+ });
+
+ desc('Bump version-number, package, and publish to NPM.');
+ task('publish', ['npm:fetchTags', 'npm:getCurrentBranch', 'npm:version',
+ 'npm:package', 'npm:publish', 'npm:cleanup'], function () {});
+
+ jake.Task['npm:definePackage'].invoke();
+ };
+
+})();
+
+jake.NpmPublishTask = NpmPublishTask;
+exports.NpmPublishTask = NpmPublishTask;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/package_task.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/package_task.js b/blackberry10/node_modules/jake/lib/package_task.js
new file mode 100644
index 0000000..6d972ef
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/package_task.js
@@ -0,0 +1,365 @@
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 path = require('path')
+ , fs = require('fs')
+ , exec = require('child_process').exec
+ , FileList = require('./file_list').FileList;
+
+/**
+ @name jake
+ @namespace jake
+*/
+/**
+ @name jake.PackageTask
+ @constructor
+ @description Instantiating a PackageTask creates a number of Jake
+ Tasks that make packaging and distributing your software easy.
+
+ @param {String} name The name of the project
+ @param {String} version The current project version (will be
+ appended to the project-name in the package-archive
+ @param {Function} definition Defines the contents of the package,
+ and format of the package-archive. Will be executed on the instantiated
+ PackageTask (i.e., 'this', will be the PackageTask instance),
+ to set the various instance-propertiess.
+
+ @example
+ var t = new jake.PackageTask('rous', 'v' + version, function () {
+ var files = [
+ 'Capfile'
+ , 'Jakefile'
+ , 'README.md'
+ , 'package.json'
+ , 'app/*'
+ , 'bin/*'
+ , 'config/*'
+ , 'lib/*'
+ , 'node_modules/*'
+ ];
+ this.packageFiles.include(files);
+ this.packageFiles.exclude('node_modules/foobar');
+ this.needTarGz = true;
+ });
+
+ */
+var PackageTask = function (name, version, definition) {
+ /**
+ @name jake.PackageTask#name
+ @public
+ @type {String}
+ @description The name of the project
+ */
+ this.name = name;
+ /**
+ @name jake.PackageTask#version
+ @public
+ @type {String}
+ @description The project version-string
+ */
+ this.version = version;
+ /**
+ @name jake.PackageTask#version
+ @public
+ @type {String='pkg'}
+ @description The directory-name to use for packaging the software
+ */
+ this.packageDir = 'pkg';
+ /**
+ @name jake.PackageTask#packageFiles
+ @public
+ @type {jake.FileList}
+ @description The list of files and directories to include in the
+ package-archive
+ */
+ this.packageFiles = new FileList();
+ /**
+ @name jake.PackageTask#needTar
+ @public
+ @type {Boolean=false}
+ @description If set to true, uses the `tar` utility to create
+ a gzip .tgz archive of the pagckage
+ */
+ this.needTar = false;
+ /**
+ @name jake.PackageTask#needTar
+ @public
+ @type {Boolean=false}
+ @description If set to true, uses the `tar` utility to create
+ a gzip .tar.gz archive of the pagckage
+ */
+ this.needTarGz = false;
+ /**
+ @name jake.PackageTask#needTarBz2
+ @public
+ @type {Boolean=false}
+ @description If set to true, uses the `tar` utility to create
+ a bzip2 .bz2 archive of the pagckage
+ */
+ this.needTarBz2 = false;
+ /**
+ @name jake.PackageTask#needJar
+ @public
+ @type {Boolean=false}
+ @description If set to true, uses the `jar` utility to create
+ a .jar archive of the pagckage
+ */
+ this.needJar = false;
+ /**
+ @name jake.PackageTask#needZip
+ @public
+ @type {Boolean=false}
+ @description If set to true, uses the `zip` utility to create
+ a .zip archive of the pagckage
+ */
+ this.needZip = false;
+ /**
+ @name jake.PackageTask#manifestFile
+ @public
+ @type {String=null}
+ @description Can be set to point the `jar` utility at a manifest
+ file to use in a .jar archive. If unset, one will be automatically
+ created by the `jar` utility. This path should be relative to the
+ root of the package directory (this.packageDir above, likely 'pkg')
+ */
+ this.manifestFile = null;
+ /**
+ @name jake.PackageTask#tarCommand
+ @public
+ @type {String='tar'}
+ @description The shell-command to use for creating tar archives.
+ */
+ this.tarCommand = 'tar';
+ /**
+ @name jake.PackageTask#jarCommand
+ @public
+ @type {String='jar'}
+ @description The shell-command to use for creating jar archives.
+ */
+ this.jarCommand = 'jar';
+ /**
+ @name jake.PackageTask#zipCommand
+ @public
+ @type {String='zip'}
+ @description The shell-command to use for creating zip archives.
+ */
+ this.zipCommand = 'zip';
+ /**
+ @name jake.PackageTask#archiveChangeDir
+ @public
+ @type {String=null}
+ @description Equivalent to the '-C' command for the `tar` and `jar`
+ commands. ("Change to this directory before adding files.")
+ */
+ this.archiveChangeDir = null;
+ /**
+ @name jake.PackageTask#archiveContentDir
+ @public
+ @type {String=null}
+ @description Specifies the files and directories to include in the
+ package-archive. If unset, this will default to the main package
+ directory -- i.e., name + version.
+ */
+ this.archiveContentDir = null;
+
+ if (typeof definition == 'function') {
+ definition.call(this);
+ }
+ this.define();
+};
+
+PackageTask.prototype = new (function () {
+
+ var _compressOpts = {
+ Tar: {
+ ext: '.tgz'
+ , flags: 'cvzf'
+ , cmd: 'tar'
+ }
+ , TarGz: {
+ ext: '.tar.gz'
+ , flags: 'cvzf'
+ , cmd: 'tar'
+ }
+ , TarBz2: {
+ ext: '.tar.bz2'
+ , flags: 'cvjf'
+ , cmd: 'tar'
+ }
+ , Jar: {
+ ext: '.jar'
+ , flags: 'cf'
+ , cmd: 'jar'
+ }
+ , Zip: {
+ ext: '.zip'
+ , flags: 'r'
+ , cmd: 'zip'
+ }
+ };
+
+ this.define = function () {
+ var self = this
+ , packageDirPath = this.packageDirPath()
+ , compressTaskArr = [];
+
+ desc('Build the package for distribution');
+ task('package', ['clobberPackage', 'buildPackage']);
+ // Backward-compat alias
+ task('repackage', ['package']);
+
+ task('clobberPackage', function () {
+ jake.rmRf(self.packageDir, {silent: true});
+ });
+
+ desc('Remove the package');
+ task('clobber', ['clobberPackage']);
+
+ for (var p in _compressOpts) {
+ if (this['need' + p]) {
+ (function (p) {
+ var filename = path.resolve(self.packageDir + '/' + self.packageName() +
+ _compressOpts[p].ext);
+ compressTaskArr.push(filename);
+
+ file(filename, [packageDirPath], function () {
+ var cmd
+ , opts = _compressOpts[p]
+ // Directory to move to when doing the compression-task
+ // Changes in the case of zip for emulating -C option
+ , chdir = self.packageDir
+ // Save the current dir so it's possible to pop back up
+ // after compressing
+ , currDir = process.cwd();
+
+ cmd = self[opts.cmd + 'Command'];
+ cmd += ' -' + opts.flags;
+ if (opts.cmd == 'jar' && self.manifestFile) {
+ cmd += 'm';
+ }
+
+ // The name of the archive to create -- use full path
+ // so compression can be performed from a different dir
+ // if needed
+ cmd += ' ' + filename;
+
+ if (opts.cmd == 'jar' && self.manifestFile) {
+ cmd += ' ' + self.manifestFile;
+ }
+
+ // Where to perform the compression -- -C option isn't
+ // supported in zip, so actually do process.chdir for this
+ if (self.archiveChangeDir) {
+ if (opts.cmd == 'zip') {
+ chdir = path.join(chdir, self.archiveChangeDir);
+ }
+ else {
+ cmd += ' -C ' + self.archiveChangeDir;
+ }
+ }
+
+ // Where to stick the archive
+ if (self.archiveContentDir) {
+ cmd += ' ' + self.archiveContentDir;
+ }
+ else {
+ cmd += ' ' + self.packageName();
+ }
+
+ // Move into the desired dir (usually packageDir) to compress
+ // Return back up to the current dir after the exec
+ process.chdir(chdir);
+
+ exec(cmd, function (err, stdout, stderr) {
+ if (err) { throw err; }
+
+ // Return back up to the starting directory (see above,
+ // before exec)
+ process.chdir(currDir);
+
+ complete();
+ });
+ }, {async: true});
+ })(p);
+ }
+ }
+
+ task('buildPackage', compressTaskArr, function () {});
+
+ directory(this.packageDir);
+
+ file(packageDirPath,
+ FileList.clone(this.packageFiles).include(this.packageDir), function () {
+ var fileList = [];
+ self.packageFiles.forEach(function (name) {
+ var f = path.join(self.packageDirPath(), name)
+ , fDir = path.dirname(f)
+ , stats;
+ jake.mkdirP(fDir, {silent: true});
+
+ // Add both files and directories
+ fileList.push({
+ from: name
+ , to: f
+ });
+ });
+ var _copyFile = function () {
+ var cmd
+ , file = fileList.pop()
+ , stat;
+ if (file) {
+ stat = fs.statSync(file.from);
+ // Target is a directory, just create it
+ if (stat.isDirectory()) {
+ jake.mkdirP(file.to, {silent: true});
+ _copyFile();
+ }
+ // Otherwise copy the file
+ else {
+ jake.cpR(file.from, file.to, {silent: true});
+ _copyFile();
+ }
+ }
+ else {
+ complete();
+ }
+ };
+ _copyFile();
+ }, {async: true});
+
+
+ };
+
+ this.packageName = function () {
+ if (this.version) {
+ return this.name + '-' + this.version;
+ }
+ else {
+ return this.name;
+ }
+ };
+
+ this.packageDirPath = function () {
+ return this.packageDir + '/' + this.packageName();
+ };
+
+})();
+
+jake.PackageTask = PackageTask;
+exports.PackageTask = PackageTask;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/parseargs.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/parseargs.js b/blackberry10/node_modules/jake/lib/parseargs.js
new file mode 100644
index 0000000..dd2495b
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/parseargs.js
@@ -0,0 +1,134 @@
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 parseargs = {};
+
+/**
+ * @constructor
+ * Parses a list of command-line args into a key/value object of
+ * options and an array of positional commands.
+ * @ param {Array} opts A list of options in the following format:
+ * [{full: 'foo', abbr: 'f'}, {full: 'bar', abbr: 'b'}]]
+ */
+parseargs.Parser = function (opts) {
+ // A key/value object of matching options parsed out of the args
+ this.opts = {};
+ this.taskNames = null;
+ this.envVars = null;
+
+ // Data structures used for parsing
+ this.reg = [];
+ this.shortOpts = {};
+ this.longOpts = {};
+
+ var item;
+ for (var i = 0, ii = opts.length; i < ii; i++) {
+ item = opts[i];
+ this.shortOpts[item.abbr] = item;
+ this.longOpts[item.full] = item;
+ }
+ this.reg = opts;
+};
+
+parseargs.Parser.prototype = new function () {
+
+ var _trueOrNextVal = function (argParts, args) {
+ if (argParts[1]) {
+ return argParts[1];
+ }
+ else {
+ return (!args[0] || (args[0].indexOf('-') == 0)) ?
+ true : args.shift();
+ }
+ };
+
+ /**
+ * Parses an array of arguments into options and positional commands
+ * @param {Array} args The command-line args to parse
+ */
+ this.parse = function (args) {
+ var cmds = []
+ , cmd
+ , envVars = {}
+ , opts = {}
+ , arg
+ , argItem
+ , argParts
+ , cmdItems
+ , taskNames = []
+ , preempt;
+
+ while (args.length) {
+ arg = args.shift();
+
+ if (arg.indexOf('-') == 0) {
+ arg = arg.replace(/^--/, '').replace(/^-/, '');
+ argParts = arg.split('=');
+ argItem = this.longOpts[argParts[0]] || this.shortOpts[argParts[0]];
+ if (argItem) {
+ // First-encountered preemptive opt takes precedence -- no further opts
+ // or possibility of ambiguity, so just look for a value, or set to
+ // true and then bail
+ if (argItem.preempts) {
+ opts[argItem.full] = _trueOrNextVal(argParts, args);
+ preempt = true;
+ break;
+ }
+ // If the opt requires a value, see if we can get a value from the
+ // next arg, or infer true from no-arg -- if it's followed by another
+ // opt, throw an error
+ if (argItem.expectValue) {
+ opts[argItem.full] = _trueOrNextVal(argParts, args);
+ if (!opts[argItem.full]) {
+ throw new Error(argItem.full + ' option expects a value.');
+ }
+ }
+ else {
+ opts[argItem.full] = true;
+ }
+ }
+ }
+ else {
+ cmds.unshift(arg);
+ }
+ }
+
+ if (!preempt) {
+ // Parse out any env-vars and task-name
+ while (!!(cmd = cmds.pop())) {
+ cmdItems = cmd.split('=');
+ if (cmdItems.length > 1) {
+ envVars[cmdItems[0]] = cmdItems[1];
+ }
+ else {
+ taskNames.push(cmd);
+ }
+ }
+
+ }
+
+ return {
+ opts: opts
+ , envVars: envVars
+ , taskNames: taskNames
+ };
+ };
+
+};
+
+module.exports = parseargs;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/program.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/program.js b/blackberry10/node_modules/jake/lib/program.js
new file mode 100644
index 0000000..c6c00ea
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/program.js
@@ -0,0 +1,236 @@
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 fs = require('fs')
+ , parseargs = require('./parseargs')
+ , utils = require('./utils')
+ , Program
+ , optsReg
+ , preempts
+ , usage
+ , die;
+
+optsReg = [
+ { full: 'jakefile'
+ , abbr: 'f'
+ , preempts: false
+ , expectValue: true
+ }
+, { full: 'quiet'
+ , abbr: 'q'
+ , preempts: false
+ , expectValue: false
+ }
+, { full: 'directory'
+ , abbr: 'C'
+ , preempts: false
+ , expectValue: true
+ }
+, { full: 'always-make'
+ , abbr: 'B'
+ , preempts: false
+ , expectValue: false
+ }
+, { full: 'tasks'
+ , abbr: 'T'
+ , preempts: true
+ }
+// Alias ls
+, { full: 'tasks'
+ , abbr: 'ls'
+ , preempts: true
+ }
+, { full: 'trace'
+ , abbr: 't'
+ , preempts: false
+ , expectValue: false
+ }
+, { full: 'help'
+ , abbr: 'h'
+ , preempts: true
+ }
+, { full: 'version'
+ , abbr: 'V'
+ , preempts: true
+ }
+ // Alias lowercase v
+, { full: 'version'
+ , abbr: 'v'
+ , preempts: true
+ }
+, { full: 'jakelibdir'
+ , abbr: 'J'
+ , preempts: false
+ , expectValue: true
+ }
+];
+
+preempts = {
+ version: function () {
+ die(jake.version);
+ }
+, help: function () {
+ die(usage);
+ }
+};
+
+usage = ''
+ + 'Jake JavaScript build tool\n'
+ + '********************************************************************************\n'
+ + 'If no flags are given, Jake looks for a Jakefile or Jakefile.js in the current directory.\n'
+ + '********************************************************************************\n'
+ + '{Usage}: jake [options ...] [env variables ...] target\n'
+ + '\n'
+ + '{Options}:\n'
+ + ' -f, --jakefile FILE Use FILE as the Jakefile.\n'
+ + ' -C, --directory DIRECTORY Change to DIRECTORY before running tasks.\n'
+ + ' -q, --quiet Do not log messages to standard output.\n'
+ + ' -B, --always-make Unconditionally make all targets.\n'
+ + ' -T/ls, --tasks Display the tasks (matching optional PATTERN) with descriptions, then exit.\n'
+ + ' -J, --jakelibdir JAKELIBDIR Auto-import any .jake files in JAKELIBDIR. (default is \'jakelib\')\n'
+ + ' -t, --trace Enable full backtrace.\n'
+ + ' -h, --help Display this help message.\n'
+ + ' -V/v, --version Display the Jake version.\n'
+ + '';
+
+Program = function () {
+ this.opts = {};
+ this.taskNames = null;
+ this.taskArgs = null;
+ this.envVars = null;
+};
+
+Program.prototype = new (function () {
+
+ this.handleErr = function (err) {
+ var msg;
+ utils.logger.error('jake aborted.');
+ if (this.opts.trace && err.stack) {
+ utils.logger.error(err.stack);
+ }
+ else {
+ if (err.stack) {
+ msg = err.stack.split('\n').slice(0, 2).join('\n');
+ utils.logger.error(msg);
+ utils.logger.error('(See full trace by running task with --trace)');
+ }
+ else {
+ utils.logger.error(err.message);
+ }
+ }
+ process.exit(jake.errorCode || 1);
+ };
+
+ this.parseArgs = function (args) {
+ var result = (new parseargs.Parser(optsReg)).parse(args);
+ this.setOpts(result.opts);
+ this.setTaskNames(result.taskNames);
+ this.setEnvVars(result.envVars);
+ };
+
+ this.setOpts = function (options) {
+ var opts = options || {};
+ utils.mixin(this.opts, opts);
+ };
+
+ this.setTaskNames = function (names) {
+ if (names && !Array.isArray(names)) {
+ throw new Error('Task names must be an array');
+ }
+ this.taskNames = (names && names.length) ? names : ['default'];
+ };
+
+ this.setEnvVars = function (vars) {
+ this.envVars = vars || null;
+ };
+
+ this.firstPreemptiveOption = function () {
+ var opts = this.opts;
+ for (var p in opts) {
+ if (preempts[p]) {
+ return preempts[p];
+ }
+ }
+ return false;
+ };
+
+ this.init = function (configuration) {
+ var self = this
+ , config = configuration || {};
+ if (config.options) {
+ this.setOpts(config.options);
+ }
+ if (config.taskNames) {
+ this.setTaskNames(config.taskNames);
+ }
+ if (config.envVars) {
+ this.setEnvVars(config.envVars);
+ }
+ process.addListener('uncaughtException', function (err) {
+ self.handleErr(err);
+ });
+ if (this.envVars) {
+ utils.mixin(process.env, this.envVars);
+ }
+ };
+
+ this.run = function () {
+ var taskNames
+ , dirname
+ , opts = this.opts;
+
+ // Run with `jake -T`, just show descriptions
+ if (opts.tasks) {
+ return jake.showAllTaskDescriptions(opts.tasks);
+ }
+
+ taskNames = this.taskNames;
+ if (!(Array.isArray(taskNames) && taskNames.length)) {
+ throw new Error('Please pass jake.runTasks an array of task-names');
+ }
+
+ // Set working dir
+ dirname = opts.directory;
+ if (dirname) {
+ if (utils.file.existsSync(dirname) &&
+ fs.statSync(dirname).isDirectory()) {
+ process.chdir(dirname);
+ }
+ else {
+ throw new Error(dirname + ' is not a valid directory path');
+ }
+ }
+
+ task('__root__', taskNames, function () {});
+
+ rootTask = jake.Task['__root__'];
+ rootTask.once('complete', function () {
+ jake.emit('complete');
+ });
+ jake.emit('start');
+ rootTask.invoke();
+ };
+
+})();
+
+die = function (msg) {
+ console.log(msg);
+ process.exit();
+};
+
+module.exports.Program = Program;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/task/directory_task.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/task/directory_task.js b/blackberry10/node_modules/jake/lib/task/directory_task.js
new file mode 100644
index 0000000..39c1b68
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/task/directory_task.js
@@ -0,0 +1,29 @@
+var DirectoryTask
+ , FileTask = require('./file_task').FileTask;
+
+/**
+ @name jake
+ @namespace jake
+*/
+/**
+ @name jake.DirectoryTask
+ @constructor
+ @augments EventEmitter
+ @augments jake.Task
+ @augments jake.FileTask
+ @description A Jake DirectoryTask
+
+ @param {String} name The name of the directory to create.
+ */
+DirectoryTask = function (name) {
+ this.modTime = null;
+ // Do constructor-work only on actual instances, not when used
+ // for inheritance
+ if (arguments.length) {
+ this.init.apply(this, arguments);
+ }
+};
+DirectoryTask.prototype = new FileTask();
+DirectoryTask.prototype.constructor = DirectoryTask;
+
+exports.DirectoryTask = DirectoryTask;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/task/file_task.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/task/file_task.js b/blackberry10/node_modules/jake/lib/task/file_task.js
new file mode 100644
index 0000000..4525f01
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/task/file_task.js
@@ -0,0 +1,134 @@
+var fs = require('fs')
+ , Task = require('./task').Task
+ , FileTask
+ , FileBase
+ , DirectoryTask
+ , utils = require('../utils');
+
+FileBase = new (function () {
+ var isFileOrDirectory = function (t) {
+ return (t instanceof FileTask ||
+ t instanceof DirectoryTask);
+ }
+ , isFile = function (t) {
+ return (t instanceof FileTask && !(t instanceof DirectoryTask));
+ };
+
+ this.shouldRunAction = function () {
+ var runAction = false
+ , prereqs = this.prereqs
+ , prereqName
+ , prereqTask;
+
+ // No repeatsies
+ if (this.done) {
+ return false;
+ }
+ // The always-make override
+ else if (jake.program.opts['always-make']) {
+ // Run if there actually is an action
+ if (typeof this.action == 'function') {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+ // Default case
+ else {
+ // We need either an existing file, or an action to create one.
+ // First try grabbing the actual mod-time of the file
+ try {
+ this.updateModTime();
+ }
+ // Then fall back to looking for an action
+ catch(e) {
+ if (typeof this.action == 'function') {
+ return true;
+ }
+ else {
+ throw new Error('File-task ' + this.fullName + ' has no ' +
+ 'existing file, and no action to create one.');
+ }
+ }
+
+ // Compare mod-time of all the prereqs with its mod-time
+ // If any prereqs are newer, need to run the action to update
+ if (prereqs && prereqs.length) {
+ for (var i = 0, ii = prereqs.length; i < ii; i++) {
+ prereqName = prereqs[i];
+ prereqTask = jake.Task[prereqName];
+ // Run the action if:
+ // 1. The prereq is a normal task (not file/dir)
+ // 2. The prereq is a file-task with a mod-date more recent than
+ // the one for this file/dir
+ if (prereqTask) {
+ if (!isFileOrDirectory(prereqTask) ||
+ (isFile(prereqTask) && prereqTask.modTime > this.modTime)) {
+ return true;
+ }
+ }
+ }
+ }
+ // File/dir has no prereqs, and exists -- no need to run
+ else {
+ return false;
+ }
+ }
+ };
+
+ this.updateModTime = function () {
+ var stats = fs.statSync(this.name);
+ this.modTime = stats.mtime;
+ };
+
+ this.complete = function () {
+ if (!this.dummy) {
+ this.updateModTime();
+ }
+ this._currentPrereqIndex = 0;
+ this.done = true;
+ this.emit('complete');
+ };
+
+})();
+
+/**
+ @name jake
+ @namespace jake
+*/
+/**
+ @name jake.FileTask
+ @constructor
+ @augments EventEmitter
+ @augments jake.Task
+ @description A Jake FileTask
+
+ @param {String} name The name of the Task
+ @param {Array} [prereqs] Prerequisites to be run before this task
+ @param {Function} [action] The action to perform to create this file
+ @param {Object} [opts]
+ @param {Array} [opts.asyc=false] Perform this task asynchronously.
+ If you flag a task with this option, you must call the global
+ `complete` method inside the task's action, for execution to proceed
+ to the next task.
+ */
+FileTask = function (name, prereqs, action, opts) {
+ this.modTime = null;
+ this.dummy = false;
+ // Do constructor-work only on actual instances, not when used
+ // for inheritance
+ if (arguments.length) {
+ this.init.apply(this, arguments);
+ }
+};
+FileTask.prototype = new Task();
+FileTask.prototype.constructor = FileTask;
+utils.mixin(FileTask.prototype, FileBase);
+
+exports.FileTask = FileTask;
+
+// DirectoryTask is a subclass of FileTask, depends on it
+// being defined
+DirectoryTask = require('./directory_task').DirectoryTask;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/task/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/task/index.js b/blackberry10/node_modules/jake/lib/task/index.js
new file mode 100644
index 0000000..e9bef5e
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/task/index.js
@@ -0,0 +1,9 @@
+
+var Task = require('./task').Task
+ , FileTask = require('./file_task').FileTask
+ , DirectoryTask = require('./directory_task').DirectoryTask;
+
+exports.Task = Task;
+exports.FileTask = FileTask;
+exports.DirectoryTask = DirectoryTask;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/task/task.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/task/task.js b/blackberry10/node_modules/jake/lib/task/task.js
new file mode 100644
index 0000000..034a6fd
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/task/task.js
@@ -0,0 +1,241 @@
+var util = require('util') // Native Node util module
+ , fs = require('fs')
+ , path = require('path')
+ , existsSync = typeof fs.existsSync == 'function' ?
+ fs.existsSync : path.existsSync
+ , EventEmitter = require('events').EventEmitter
+ , Task
+ , TaskBase
+ , utils = require('../utils');
+
+/**
+ @name jake
+ @namespace jake
+*/
+/**
+ @name jake.Task
+ @constructor
+ @augments EventEmitter
+ @description A Jake Task
+
+ @param {String} name The name of the Task
+ @param {Array} [prereqs] Prerequisites to be run before this task
+ @param {Function} [action] The action to perform for this task
+ @param {Object} [opts]
+ @param {Array} [opts.asyc=false] Perform this task asynchronously.
+ If you flag a task with this option, you must call the global
+ `complete` method inside the task's action, for execution to proceed
+ to the next task.
+ */
+Task = function () {
+ // Do constructor-work only on actual instances, not when used
+ // for inheritance
+ if (arguments.length) {
+ this.init.apply(this, arguments);
+ }
+};
+
+util.inherits(Task, EventEmitter);
+
+TaskBase = new (function () {
+
+ // Parse any positional args attached to the task-name
+ var parsePrereqName = function (name) {
+ var taskArr = name.split('[')
+ , taskName = taskArr[0]
+ , taskArgs = [];
+ if (taskArr[1]) {
+ taskArgs = taskArr[1].replace(/\]$/, '');
+ taskArgs = taskArgs.split(',');
+ }
+ return {
+ name: taskName
+ , args: taskArgs
+ };
+ };
+
+ /**
+ @name jake.Task#event:complete
+ @event
+ */
+
+ this.init = function (name, prereqs, action, options) {
+ var opts = options || {};
+
+ this._currentPrereqIndex = 0;
+
+ this.name = name;
+ this.prereqs = prereqs;
+ this.action = action;
+ this.async = false;
+ this.done = false;
+ this.fullName = null;
+ this.description = null;
+ this.args = [];
+ this.namespace = null;
+
+ // Support legacy async-flag -- if not explicitly passed or falsy, will
+ // be set to empty-object
+ if (typeof opts == 'boolean' && opts === true) {
+ this.async = true;
+ }
+ else {
+ if (opts.async) {
+ this.async = true;
+ }
+ }
+ };
+
+ /**
+ @name jake.Task#invoke
+ @function
+ @description Runs prerequisites, then this task. If the task has already
+ been run, will not run the task again.
+ */
+ this.invoke = function () {
+ jake._invocationChain.push(this);
+ this.args = Array.prototype.slice.call(arguments);
+ this.runPrereqs();
+ };
+
+ /**
+ @name jake.Task#reenable
+ @function
+ @description Runs this task, without running any prerequisites. If the task
+ has already been run, it will still run it again.
+ */
+ this.execute = function () {
+ jake._invocationChain.push(this);
+ this.reenable();
+ this.run();
+ };
+
+ this.runPrereqs = function () {
+ if (this.prereqs && this.prereqs.length) {
+ this.nextPrereq();
+ }
+ else {
+ this.run();
+ }
+ };
+
+ this.nextPrereq = function () {
+ var self = this
+ , index = this._currentPrereqIndex
+ , name = this.prereqs[index]
+ , absolute
+ , prereq
+ , parsed
+ , filePath
+ , stats;
+
+ if (name) {
+ parsed = parsePrereqName(name);
+ absolute = parsed.name[0] === '^';
+
+ if (absolute) {
+ parsed.name = parsed.name.slice(1);
+ prereq = jake.Task[parsed.name];
+ } else {
+ prereq = this.namespace.resolve(parsed.name);
+ }
+
+ // Task doesn't exist, may be a static file
+ if (!prereq) {
+ // May be namespaced
+ filePath = name.split(':').pop();
+ // Create a dummy FileTask if file actually exists
+ if (existsSync(filePath)) {
+ // If there's not already an existing dummy FileTask for it,
+ // create one
+ prereq = jake.Task[filePath];
+ if (!prereq) {
+ stats = fs.statSync(filePath);
+ prereq = new jake.FileTask(filePath);
+ prereq.modTime = stats.mtime;
+ prereq.dummy = true;
+ // Put this dummy Task in the global Tasks list so
+ // modTime will be eval'd correctly
+ jake.Task[filePath] = prereq;
+ }
+ }
+ // Otherwise it's not a valid task
+ else {
+ throw new Error('Unknown task "' + name + '"');
+ }
+ }
+
+ // Do when done
+ if (prereq.done) {
+ self.handlePrereqComplete(prereq);
+ } else {
+ prereq.once('complete', function () {
+ self.handlePrereqComplete(prereq);
+ });
+ prereq.invoke.apply(prereq, parsed.args);
+ }
+ }
+ };
+
+ this.reenable = function (deep) {
+ var prereqs
+ , prereq;
+ this.done = false;
+ if (deep && this.prereqs) {
+ prereqs = this.prereqs;
+ for (var i = 0, ii = prereqs.length; i < ii; i++) {
+ prereq = jake.Task[prereqs[i]];
+ if (prereq) {
+ prereq.reenable(deep);
+ }
+ }
+ }
+ };
+
+ this.handlePrereqComplete = function (prereq) {
+ var self = this;
+ this._currentPrereqIndex++;
+ if (this._currentPrereqIndex < this.prereqs.length) {
+ setTimeout(function () {
+ self.nextPrereq();
+ }, 0);
+ }
+ else {
+ this.run();
+ }
+ };
+
+ this.shouldRunAction = function () {
+ if (this.done || typeof this.action != 'function') {
+ return false
+ }
+ return true;
+ };
+
+ this.run = function () {
+ var runAction = this.shouldRunAction();
+ if (runAction) {
+ this.emit('start');
+ try {
+ this.action.apply(this, this.args);
+ }
+ catch (e) {
+ this.emit('error', e);
+ return; // Bail out, not complete
+ }
+ }
+ if (!(runAction && this.async)) {
+ complete();
+ }
+ };
+
+ this.complete = function () {
+ this._currentPrereqIndex = 0;
+ this.done = true;
+ this.emit('complete');
+ };
+
+})();
+utils.mixin(Task.prototype, TaskBase);
+
+exports.Task = Task;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/test_task.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/test_task.js b/blackberry10/node_modules/jake/lib/test_task.js
new file mode 100644
index 0000000..24e1ccf
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/test_task.js
@@ -0,0 +1,216 @@
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 path = require('path')
+ , fs = require('fs')
+ , exec = require('child_process').exec
+ , currDir = process.cwd();
+
+/**
+ @name jake
+ @namespace jake
+*/
+/**
+ @name jake.TestTask
+ @constructor
+ @description Instantiating a TestTask creates a number of Jake
+ Tasks that make running tests for your software easy.
+
+ @param {String} name The name of the project
+ @param {Function} definition Defines the list of files containing the tests,
+ and the name of the namespace/task for running them. Will be executed on the
+ instantiated TestTask (i.e., 'this', will be the TestTask instance), to set
+ the various instance-propertiess.
+
+ @example
+ var t = new jake.TestTask('bij-js', function () {
+ this.testName = 'testSpecial';
+ this.testFiles.include('test/**');
+ });
+
+ */
+var TestTask = function (name, definition) {
+ var self = this;
+
+ /**
+ @name jake.TestTask#testNam
+ @public
+ @type {String}
+ @description The name of the namespace to place the tests in, and
+ the top-level task for running tests. Defaults to "test"
+ */
+ this.testName = 'test';
+
+ /**
+ @name jake.TestTask#testFiles
+ @public
+ @type {jake.FileList}
+ @description The list of files containing tests to load
+ */
+ this.testFiles = new jake.FileList();
+
+ /**
+ @name jake.TestTask#showDescription
+ @public
+ @type {Boolean}
+ @description Show the created task when doing Jake -T
+ */
+ this.showDescription = true;
+
+ if (typeof definition == 'function') {
+ definition.call(this);
+ }
+
+ if (this.showDescription) {
+ desc('Run the tests for ' + name);
+ }
+ task(this.testName, function () {
+ var t = jake.Task[self.testName + ':run'];
+ t.invoke.apply(t, arguments);
+ }, {async: true});
+
+ namespace(self.testName, function () {
+
+ task('run', function (pat) {
+ var p = pat || '.*'
+ , re
+ , testFiles;
+
+ // Don't nest; make a top-level namespace. Don't want
+ // re-calling from inside to nest infinitely
+ jake.currentNamespace = jake.defaultNamespace;
+
+ re = new RegExp(pat);
+ testFiles = self.testFiles.toArray().filter(function (f) {
+ return (re).test(f);
+ });
+
+ // Create a namespace for all the testing tasks to live in
+ namespace(self.testName + 'Exec', function () {
+ // Each test will be a prereq for the dummy top-level task
+ var prereqs = []
+ // Continuation to pass to the async tests, wrapping `continune`
+ , next = function () {
+ complete();
+ }
+ // Create the task for this test-function
+ , createTask = function (name, action) {
+ // If the test-function is defined with a continuation
+ // param, flag the task as async
+ isAsync = !!action.length;
+
+ // Define the actual namespaced task with the name, the
+ // wrapped action, and the correc async-flag
+ task(name, createAction(name, action), {
+ async: isAsync
+ });
+ }
+ // Used as the action for the defined task for each test.
+ , createAction = function (n, a) {
+ // A wrapped function that passes in the `next` function
+ // for any tasks that run asynchronously
+ return function () {
+ var cb
+ , msg;
+ if (a.length) {
+ cb = next;
+ }
+ if (!(n == 'before' || n == 'after')) {
+ if (n.toLowerCase().indexOf('test') === 0) {
+ msg = n;
+ }
+ else {
+ msg = 'test ' + n;
+ }
+ jake.logger.log(n);
+ }
+ // 'this' will be the task when action is run
+ return a.call(this, cb);
+ };
+ }
+ // Dummy top-level task for everything to be prereqs for
+ , topLevel;
+
+ // Pull in each test-file, and iterate over any exported
+ // test-functions. Register each test-function as a prereq task
+ testFiles.forEach(function (file) {
+ var exp = require(path.join(currDir, file))
+ , name
+ , action
+ , banner
+ , isAsync;
+
+ // Create a namespace for each filename, so test-name collisions
+ // won't be a problem
+ namespace(file, function () {
+
+ // For displaying file banner
+ banner = '*** Running ' + file + ' ***';
+ prereqs.push(self.testName + 'Exec:' + file + ':' + banner);
+ // Create the task
+ createTask(banner, function () {});
+
+ if (typeof exp.before == 'function') {
+ prereqs.push(self.testName + 'Exec:' + file + ':before');
+ // Create the task
+ createTask('before', exp.before);
+ }
+
+ // Walk each exported function, and create a task for each
+ for (var p in exp) {
+ if (p == 'before' || p == 'after') {
+ continue;
+ }
+ // Add the namespace:name of this test to the list of prereqs
+ // for the dummy top-level task
+ prereqs.push(self.testName + 'Exec:' + file + ':' + p);
+ // Create the task
+ createTask(p, exp[p]);
+ }
+
+ if (typeof exp.after == 'function') {
+ prereqs.push(self.testName + 'Exec:' + file + ':after');
+ // Create the task
+ createTask('after', exp.after);
+ }
+
+ });
+ });
+
+ // Create the dummy top-level task. When calling a task internally
+ // with `invoke` that is async (or has async prereqs), have to listen
+ // for the 'complete' event to know when it's done
+ topLevel = task('__top__', prereqs);
+ topLevel.addListener('complete', function () {
+ jake.logger.log('All tests ran successfully');
+ complete();
+ });
+
+ topLevel.invoke(); // Do the thing!
+ });
+
+
+ }, {async: true});
+ });
+
+
+};
+
+jake.TestTask = TestTask;
+exports.TestTask = TestTask;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/utils/index.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/utils/index.js b/blackberry10/node_modules/jake/lib/utils/index.js
new file mode 100644
index 0000000..389e9c3
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/utils/index.js
@@ -0,0 +1,242 @@
+/*
+ * Jake JavaScript build tool
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 util = require('util') // Native Node util module
+ , exec = require('child_process').exec
+ , spawn = require('child_process').spawn
+ , EventEmitter = require('events').EventEmitter
+ , utils = require('utilities')
+ , logger = require('./logger')
+ , Exec;
+
+var parseArgs = function (argumentsObj) {
+ var args
+ , arg
+ , cmds
+ , callback
+ , opts = {
+ interactive: false
+ , printStdout: false
+ , printStderr: false
+ , breakOnError: true
+ };
+
+ args = Array.prototype.slice.call(argumentsObj);
+
+ cmds = args.shift();
+ // Arrayize if passed a single string command
+ if (typeof cmds == 'string') {
+ cmds = [cmds];
+ }
+ // Make a copy if it's an actual list
+ else {
+ cmds = cmds.slice();
+ }
+
+ // Get optional callback or opts
+ while((arg = args.shift())) {
+ if (typeof arg == 'function') {
+ callback = arg;
+ }
+ else if (typeof arg == 'object') {
+ utils.mixin(opts, arg);
+ }
+ }
+
+ // Backward-compat shim
+ if (typeof opts.stdout != 'undefined') {
+ opts.printStdout = opts.stdout;
+ delete opts.stdout;
+ }
+ if (typeof opts.stderr != 'undefined') {
+ opts.printStderr = opts.stderr;
+ delete opts.stderr;
+ }
+
+ return {
+ cmds: cmds
+ , opts: opts
+ , callback: callback
+ }
+};
+
+/**
+ @name jake
+ @namespace jake
+*/
+utils.mixin(utils, new (function () {
+ /**
+ @name jake.exec
+ @static
+ @function
+ @description Executes shell-commands asynchronously with an optional
+ final callback.
+ `
+ @param {String[]} cmds The list of shell-commands to execute
+ @param {Object} [opts]
+ @param {Boolean} [opts.printStdout=false] Print stdout from each command
+ @param {Boolean} [opts.printStderr=false] Print stderr from each command
+ @param {Boolean} [opts.breakOnError=true] Stop further execution on
+ the first error.
+ @param {Function} [callback] Callback to run after executing the
+ commands
+
+ @example
+ var cmds = [
+ 'echo "showing directories"'
+ , 'ls -al | grep ^d'
+ , 'echo "moving up a directory"'
+ , 'cd ../'
+ ]
+ , callback = function () {
+ console.log('Finished running commands.');
+ }
+ jake.exec(cmds, {stdout: true}, callback);
+ */
+ this.exec = function (a, b, c) {
+ var parsed = parseArgs(arguments)
+ , cmds = parsed.cmds
+ , opts = parsed.opts
+ , callback = parsed.callback;
+
+ var ex = new Exec(cmds, opts, callback);
+
+ if (!opts.interactive) {
+ if (opts.printStdout) {
+ ex.addListener('stdout', function (data) {
+ console.log(utils.string.rtrim(data.toString()));
+ });
+ }
+ if (opts.printStderr) {
+ ex.addListener('stderr', function (data) {
+ console.log(utils.string.rtrim(data.toString()));
+ });
+ }
+ }
+ ex.addListener('error', function (msg, code) {
+ if (opts.breakOnError) {
+ fail(msg, code);
+ }
+ });
+ ex.run();
+
+ return ex;
+ };
+
+ this.createExec = function (a, b, c) {
+ return new Exec(a, b, c);
+ };
+
+})());
+
+Exec = function () {
+ var parsed = parseArgs(arguments)
+ , cmds = parsed.cmds
+ , opts = parsed.opts
+ , callback = parsed.callback;
+
+ this._cmds = cmds;
+ this._callback = callback;
+ this._config = opts;
+};
+
+util.inherits(Exec, EventEmitter);
+
+utils.mixin(Exec.prototype, new (function () {
+
+ var _run = function () {
+ var self = this
+ , sh
+ , cmd
+ , args
+ , next = this._cmds.shift()
+ , config = this._config
+ , errData = '';
+
+ // Keep running as long as there are commands in the array
+ if (next) {
+ this.emit('cmdStart', next);
+
+ // Ganking part of Node's child_process.exec to get cmdline args parsed
+ cmd = '/bin/sh';
+ args = ['-c', next];
+
+ if (process.platform == 'win32') {
+ cmd = 'cmd';
+ args = ['/c', next];
+ }
+
+ if (config.interactive) {
+ sh = spawn(cmd, args, { stdio: [process.stdin, process.stdout, 'pipe']});
+ }
+ else {
+ sh = spawn(cmd, args, { stdio: [process.stdin, 'pipe', 'pipe'] });
+ // Out
+ sh.stdout.on('data', function (data) {
+ self.emit('stdout', data);
+ });
+ }
+
+ // Err
+ sh.stderr.on('data', function (data) {
+ var d = data.toString();
+ self.emit('stderr', data);
+ // Accumulate the error-data so we can use it as the
+ // stack if the process exits with an error
+ errData += d;
+ });
+
+ // Exit, handle err or run next
+ sh.on('exit', function (code) {
+ var msg;
+ if (code != 0) {
+ msg = errData || 'Process exited with error.';
+ msg = utils.string.trim(msg);
+ self.emit('error', msg, code);
+ }
+ if (code == 0 || !config.breakOnError) {
+ self.emit('cmdEnd', next);
+ _run.call(self);
+ }
+ });
+
+ }
+ else {
+ self.emit('end');
+ if (typeof self._callback == 'function') {
+ self._callback();
+ }
+ }
+ };
+
+ this.append = function (cmd) {
+ this._cmds.push(cmd);
+ };
+
+ this.run = function () {
+ _run.call(this);
+ };
+
+})());
+
+utils.Exec = Exec;
+utils.logger = logger;
+
+module.exports = utils;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/lib/utils/logger.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/lib/utils/logger.js b/blackberry10/node_modules/jake/lib/utils/logger.js
new file mode 100644
index 0000000..71e0d13
--- /dev/null
+++ b/blackberry10/node_modules/jake/lib/utils/logger.js
@@ -0,0 +1,24 @@
+var util = require('util');
+
+var logger = new (function () {
+ var _output = function (type, out) {
+ var quiet = typeof jake != 'undefined' && jake.program &&
+ jake.program.opts && jake.program.opts.quiet
+ , msg;
+ if (!quiet) {
+ msg = typeof out == 'string' ? out : util.inspect(out);
+ console[type](msg);
+ }
+ };
+
+ this.log = function (out) {
+ _output('log', out);
+ };
+
+ this.error = function (out) {
+ _output('error', out);
+ };
+
+})();
+
+module.exports = logger;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/LICENSE b/blackberry10/node_modules/jake/node_modules/minimatch/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/README.md b/blackberry10/node_modules/jake/node_modules/minimatch/README.md
new file mode 100644
index 0000000..6fd07d2
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/README.md
@@ -0,0 +1,218 @@
+# minimatch
+
+A minimal matching utility.
+
+[](http://travis-ci.org/isaacs/minimatch)
+
+
+This is the matching library used internally by npm.
+
+Eventually, it will replace the C binding in node-glob.
+
+It works by converting glob expressions into JavaScript `RegExp`
+objects.
+
+## Usage
+
+```javascript
+var minimatch = require("minimatch")
+
+minimatch("bar.foo", "*.foo") // true!
+minimatch("bar.foo", "*.bar") // false!
+```
+
+## Features
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+
+### Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not. **Note that this is different from the way that `**` is
+handled by ruby's `Dir` class.**
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+
+## Minimatch Class
+
+Create a minimatch object by instanting the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+ Each row in the
+ array corresponds to a brace-expanded pattern. Each item in the row
+ corresponds to a single path-part. For example, the pattern
+ `{a,b/c}/d` would expand to a set of patterns like:
+
+ [ [ a, d ]
+ , [ b, c, d ] ]
+
+ If a portion of the pattern doesn't have any "magic" in it
+ (that is, it's something like `"foo"` rather than `fo*o?`), then it
+ will be left as a string rather than converted to a regular
+ expression.
+
+* `regexp` Created by the `makeRe` method. A single regular expression
+ expressing the entire pattern. This is useful in cases where you wish
+ to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+ Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+ false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+ filename, and match it against a single row in the `regExpSet`. This
+ method is mainly for internal use, but is exposed so that it can be
+ used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
+## Functions
+
+The top-level exported function has a `cache` property, which is an LRU
+cache set to store 100 items. So, calling these methods repeatedly
+with the same pattern and options will use the same Minimatch object,
+saving the cost of parsing it multiple times.
+
+### minimatch(path, pattern, options)
+
+Main export. Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
+
+### minimatch.filter(pattern, options)
+
+Returns a function that tests its
+supplied argument, suitable for use with `Array.filter`. Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
+
+### minimatch.match(list, pattern, options)
+
+Match against the list of
+files, in the style of fnmatch or glob. If nothing is matched, and
+options.nonull is set, then return a list containing the pattern itself.
+
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
+### minimatch.makeRe(pattern, options)
+
+Make a regular expression object from the pattern.
+
+## Options
+
+All options are `false` by default.
+
+### debug
+
+Dump a ton of stuff to stderr.
+
+### nobrace
+
+Do not expand `{a,b}` and `{1..3}` brace sets.
+
+### noglobstar
+
+Disable `**` matching against multiple folder names.
+
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
+
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
+
+### noext
+
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself. When set, an empty list is returned if there are
+no matches.
+
+### matchBase
+
+If set, then patterns without slashes will be matched
+against the basename of the path if it contains slashes. For example,
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+
+### nocomment
+
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
+
+### nonegate
+
+Suppress the behavior of treating a leading `!` character as negation.
+
+### flipNegate
+
+Returns from negate expressions the same as if they were not negated.
+(Ie, true on a hit, false on a miss.)
[08/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/README.md b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/README.md
new file mode 100644
index 0000000..6fd07d2
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/README.md
@@ -0,0 +1,218 @@
+# minimatch
+
+A minimal matching utility.
+
+[](http://travis-ci.org/isaacs/minimatch)
+
+
+This is the matching library used internally by npm.
+
+Eventually, it will replace the C binding in node-glob.
+
+It works by converting glob expressions into JavaScript `RegExp`
+objects.
+
+## Usage
+
+```javascript
+var minimatch = require("minimatch")
+
+minimatch("bar.foo", "*.foo") // true!
+minimatch("bar.foo", "*.bar") // false!
+```
+
+## Features
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+
+### Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not. **Note that this is different from the way that `**` is
+handled by ruby's `Dir` class.**
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+
+## Minimatch Class
+
+Create a minimatch object by instanting the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+ Each row in the
+ array corresponds to a brace-expanded pattern. Each item in the row
+ corresponds to a single path-part. For example, the pattern
+ `{a,b/c}/d` would expand to a set of patterns like:
+
+ [ [ a, d ]
+ , [ b, c, d ] ]
+
+ If a portion of the pattern doesn't have any "magic" in it
+ (that is, it's something like `"foo"` rather than `fo*o?`), then it
+ will be left as a string rather than converted to a regular
+ expression.
+
+* `regexp` Created by the `makeRe` method. A single regular expression
+ expressing the entire pattern. This is useful in cases where you wish
+ to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+ Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+ false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+ filename, and match it against a single row in the `regExpSet`. This
+ method is mainly for internal use, but is exposed so that it can be
+ used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
+## Functions
+
+The top-level exported function has a `cache` property, which is an LRU
+cache set to store 100 items. So, calling these methods repeatedly
+with the same pattern and options will use the same Minimatch object,
+saving the cost of parsing it multiple times.
+
+### minimatch(path, pattern, options)
+
+Main export. Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
+
+### minimatch.filter(pattern, options)
+
+Returns a function that tests its
+supplied argument, suitable for use with `Array.filter`. Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
+
+### minimatch.match(list, pattern, options)
+
+Match against the list of
+files, in the style of fnmatch or glob. If nothing is matched, and
+options.nonull is set, then return a list containing the pattern itself.
+
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
+### minimatch.makeRe(pattern, options)
+
+Make a regular expression object from the pattern.
+
+## Options
+
+All options are `false` by default.
+
+### debug
+
+Dump a ton of stuff to stderr.
+
+### nobrace
+
+Do not expand `{a,b}` and `{1..3}` brace sets.
+
+### noglobstar
+
+Disable `**` matching against multiple folder names.
+
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
+
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
+
+### noext
+
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself. When set, an empty list is returned if there are
+no matches.
+
+### matchBase
+
+If set, then patterns without slashes will be matched
+against the basename of the path if it contains slashes. For example,
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+
+### nocomment
+
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
+
+### nonegate
+
+Suppress the behavior of treating a leading `!` character as negation.
+
+### flipNegate
+
+Returns from negate expressions the same as if they were not negated.
+(Ie, true on a hit, false on a miss.)
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/minimatch.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/minimatch.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/minimatch.js
new file mode 100644
index 0000000..405746b
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/minimatch.js
@@ -0,0 +1,1079 @@
+;(function (require, exports, module, platform) {
+
+if (module) module.exports = minimatch
+else exports.minimatch = minimatch
+
+if (!require) {
+ require = function (id) {
+ switch (id) {
+ case "sigmund": return function sigmund (obj) {
+ return JSON.stringify(obj)
+ }
+ case "path": return { basename: function (f) {
+ f = f.split(/[\/\\]/)
+ var e = f.pop()
+ if (!e) e = f.pop()
+ return e
+ }}
+ case "lru-cache": return function LRUCache () {
+ // not quite an LRU, but still space-limited.
+ var cache = {}
+ var cnt = 0
+ this.set = function (k, v) {
+ cnt ++
+ if (cnt >= 100) cache = {}
+ cache[k] = v
+ }
+ this.get = function (k) { return cache[k] }
+ }
+ }
+ }
+}
+
+minimatch.Minimatch = Minimatch
+
+var LRU = require("lru-cache")
+ , cache = minimatch.cache = new LRU({max: 100})
+ , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
+ , sigmund = require("sigmund")
+
+var path = require("path")
+ // any single thing other than /
+ // don't need to escape / when using new RegExp()
+ , qmark = "[^/]"
+
+ // * => any number of characters
+ , star = qmark + "*?"
+
+ // ** when dots are allowed. Anything goes, except .. and .
+ // not (^ or / followed by one or two dots followed by $ or /),
+ // followed by anything, any number of times.
+ , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?"
+
+ // not a ^ or / followed by a dot,
+ // followed by anything, any number of times.
+ , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?"
+
+ // characters that need to be escaped in RegExp.
+ , reSpecials = charSet("().*{}+?[]^$\\!")
+
+// "abc" -> { a:true, b:true, c:true }
+function charSet (s) {
+ return s.split("").reduce(function (set, c) {
+ set[c] = true
+ return set
+ }, {})
+}
+
+// normalizes slashes.
+var slashSplit = /\/+/
+
+minimatch.monkeyPatch = monkeyPatch
+function monkeyPatch () {
+ var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")
+ var orig = desc.value
+ desc.value = function (p) {
+ if (p instanceof Minimatch) return p.match(this)
+ return orig.call(this, p)
+ }
+ Object.defineProperty(String.prototype, desc)
+}
+
+minimatch.filter = filter
+function filter (pattern, options) {
+ options = options || {}
+ return function (p, i, list) {
+ return minimatch(p, pattern, options)
+ }
+}
+
+function ext (a, b) {
+ a = a || {}
+ b = b || {}
+ var t = {}
+ Object.keys(b).forEach(function (k) {
+ t[k] = b[k]
+ })
+ Object.keys(a).forEach(function (k) {
+ t[k] = a[k]
+ })
+ return t
+}
+
+minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return minimatch
+
+ var orig = minimatch
+
+ var m = function minimatch (p, pattern, options) {
+ return orig.minimatch(p, pattern, ext(def, options))
+ }
+
+ m.Minimatch = function Minimatch (pattern, options) {
+ return new orig.Minimatch(pattern, ext(def, options))
+ }
+
+ return m
+}
+
+Minimatch.defaults = function (def) {
+ if (!def || !Object.keys(def).length) return Minimatch
+ return minimatch.defaults(def).Minimatch
+}
+
+
+function minimatch (p, pattern, options) {
+ if (typeof pattern !== "string") {
+ throw new TypeError("glob pattern string required")
+ }
+
+ if (!options) options = {}
+
+ // shortcut: comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === "#") {
+ return false
+ }
+
+ // "" only matches ""
+ if (pattern.trim() === "") return p === ""
+
+ return new Minimatch(pattern, options).match(p)
+}
+
+function Minimatch (pattern, options) {
+ if (!(this instanceof Minimatch)) {
+ return new Minimatch(pattern, options, cache)
+ }
+
+ if (typeof pattern !== "string") {
+ throw new TypeError("glob pattern string required")
+ }
+
+ if (!options) options = {}
+ pattern = pattern.trim()
+
+ // windows: need to use /, not \
+ // On other platforms, \ is a valid (albeit bad) filename char.
+ if (platform === "win32") {
+ pattern = pattern.split("\\").join("/")
+ }
+
+ // lru storage.
+ // these things aren't particularly big, but walking down the string
+ // and turning it into a regexp can get pretty costly.
+ var cacheKey = pattern + "\n" + sigmund(options)
+ var cached = minimatch.cache.get(cacheKey)
+ if (cached) return cached
+ minimatch.cache.set(cacheKey, this)
+
+ this.options = options
+ this.set = []
+ this.pattern = pattern
+ this.regexp = null
+ this.negate = false
+ this.comment = false
+ this.empty = false
+
+ // make the set of regexps etc.
+ this.make()
+}
+
+Minimatch.prototype.make = make
+function make () {
+ // don't do it more than once.
+ if (this._made) return
+
+ var pattern = this.pattern
+ var options = this.options
+
+ // empty patterns and comments match nothing.
+ if (!options.nocomment && pattern.charAt(0) === "#") {
+ this.comment = true
+ return
+ }
+ if (!pattern) {
+ this.empty = true
+ return
+ }
+
+ // step 1: figure out negation, etc.
+ this.parseNegate()
+
+ // step 2: expand braces
+ var set = this.globSet = this.braceExpand()
+
+ if (options.debug) console.error(this.pattern, set)
+
+ // step 3: now we have a set, so turn each one into a series of path-portion
+ // matching patterns.
+ // These will be regexps, except in the case of "**", which is
+ // set to the GLOBSTAR object for globstar behavior,
+ // and will not contain any / characters
+ set = this.globParts = set.map(function (s) {
+ return s.split(slashSplit)
+ })
+
+ if (options.debug) console.error(this.pattern, set)
+
+ // glob --> regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ if (options.debug) console.error(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return -1 === s.indexOf(false)
+ })
+
+ if (options.debug) console.error(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ , negate = false
+ , options = this.options
+ , negateOffset = 0
+
+ if (options.nonegate) return
+
+ for ( var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === "!"
+ ; i ++) {
+ negate = !negate
+ negateOffset ++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return new Minimatch(pattern, options).braceExpand()
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+function braceExpand (pattern, options) {
+ options = options || this.options
+ pattern = typeof pattern === "undefined"
+ ? this.pattern : pattern
+
+ if (typeof pattern === "undefined") {
+ throw new Error("undefined pattern")
+ }
+
+ if (options.nobrace ||
+ !pattern.match(/\{.*\}/)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ var escaping = false
+
+ // examples and comments refer to this crazy pattern:
+ // a{b,c{d,e},{f,g}h}x{y,z}
+ // expected:
+ // abxy
+ // abxz
+ // acdxy
+ // acdxz
+ // acexy
+ // acexz
+ // afhxy
+ // afhxz
+ // aghxy
+ // aghxz
+
+ // everything before the first \{ is just a prefix.
+ // So, we pluck that off, and work with the rest,
+ // and then prepend it to everything we find.
+ if (pattern.charAt(0) !== "{") {
+ // console.error(pattern)
+ var prefix = null
+ for (var i = 0, l = pattern.length; i < l; i ++) {
+ var c = pattern.charAt(i)
+ // console.error(i, c)
+ if (c === "\\") {
+ escaping = !escaping
+ } else if (c === "{" && !escaping) {
+ prefix = pattern.substr(0, i)
+ break
+ }
+ }
+
+ // actually no sets, all { were escaped.
+ if (prefix === null) {
+ // console.error("no sets")
+ return [pattern]
+ }
+
+ var tail = braceExpand(pattern.substr(i), options)
+ return tail.map(function (t) {
+ return prefix + t
+ })
+ }
+
+ // now we have something like:
+ // {b,c{d,e},{f,g}h}x{y,z}
+ // walk through the set, expanding each part, until
+ // the set ends. then, we'll expand the suffix.
+ // If the set only has a single member, then'll put the {} back
+
+ // first, handle numeric sets, since they're easier
+ var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/)
+ if (numset) {
+ // console.error("numset", numset[1], numset[2])
+ var suf = braceExpand(pattern.substr(numset[0].length), options)
+ , start = +numset[1]
+ , end = +numset[2]
+ , inc = start > end ? -1 : 1
+ , set = []
+ for (var i = start; i != (end + inc); i += inc) {
+ // append all the suffixes
+ for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+ set.push(i + suf[ii])
+ }
+ }
+ return set
+ }
+
+ // ok, walk through the set
+ // We hope, somewhat optimistically, that there
+ // will be a } at the end.
+ // If the closing brace isn't found, then the pattern is
+ // interpreted as braceExpand("\\" + pattern) so that
+ // the leading \{ will be interpreted literally.
+ var i = 1 // skip the \{
+ , depth = 1
+ , set = []
+ , member = ""
+ , sawEnd = false
+ , escaping = false
+
+ function addMember () {
+ set.push(member)
+ member = ""
+ }
+
+ // console.error("Entering for")
+ FOR: for (i = 1, l = pattern.length; i < l; i ++) {
+ var c = pattern.charAt(i)
+ // console.error("", i, c)
+
+ if (escaping) {
+ escaping = false
+ member += "\\" + c
+ } else {
+ switch (c) {
+ case "\\":
+ escaping = true
+ continue
+
+ case "{":
+ depth ++
+ member += "{"
+ continue
+
+ case "}":
+ depth --
+ // if this closes the actual set, then we're done
+ if (depth === 0) {
+ addMember()
+ // pluck off the close-brace
+ i ++
+ break FOR
+ } else {
+ member += c
+ continue
+ }
+
+ case ",":
+ if (depth === 1) {
+ addMember()
+ } else {
+ member += c
+ }
+ continue
+
+ default:
+ member += c
+ continue
+ } // switch
+ } // else
+ } // for
+
+ // now we've either finished the set, and the suffix is
+ // pattern.substr(i), or we have *not* closed the set,
+ // and need to escape the leading brace
+ if (depth !== 0) {
+ // console.error("didn't close", pattern)
+ return braceExpand("\\" + pattern, options)
+ }
+
+ // x{y,z} -> ["xy", "xz"]
+ // console.error("set", set)
+ // console.error("suffix", pattern.substr(i))
+ var suf = braceExpand(pattern.substr(i), options)
+ // ["b", "c{d,e}","{f,g}h"] ->
+ // [["b"], ["cd", "ce"], ["fh", "gh"]]
+ var addBraces = set.length === 1
+ // console.error("set pre-expanded", set)
+ set = set.map(function (p) {
+ return braceExpand(p, options)
+ })
+ // console.error("set expanded", set)
+
+
+ // [["b"], ["cd", "ce"], ["fh", "gh"]] ->
+ // ["b", "cd", "ce", "fh", "gh"]
+ set = set.reduce(function (l, r) {
+ return l.concat(r)
+ })
+
+ if (addBraces) {
+ set = set.map(function (s) {
+ return "{" + s + "}"
+ })
+ }
+
+ // now attach the suffixes.
+ var ret = []
+ for (var i = 0, l = set.length; i < l; i ++) {
+ for (var ii = 0, ll = suf.length; ii < ll; ii ++) {
+ ret.push(set[i] + suf[ii])
+ }
+ }
+ return ret
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ var options = this.options
+
+ // shortcuts
+ if (!options.noglobstar && pattern === "**") return GLOBSTAR
+ if (pattern === "") return ""
+
+ var re = ""
+ , hasMagic = !!options.nocase
+ , escaping = false
+ // ? => one single character
+ , patternListStack = []
+ , plType
+ , stateChar
+ , inClass = false
+ , reClassStart = -1
+ , classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ , patternStart = pattern.charAt(0) === "." ? "" // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))"
+ : "(?!\\.)"
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case "*":
+ re += star
+ hasMagic = true
+ break
+ case "?":
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += "\\"+stateChar
+ break
+ }
+ stateChar = false
+ }
+ }
+
+ for ( var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i ++ ) {
+
+ if (options.debug) {
+ console.error("%s\t%s %s %j", pattern, i, re, c)
+ }
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += "\\" + c
+ escaping = false
+ continue
+ }
+
+ SWITCH: switch (c) {
+ case "/":
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+
+ case "\\":
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case "?":
+ case "*":
+ case "+":
+ case "@":
+ case "!":
+ if (options.debug) {
+ console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c)
+ }
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ if (c === "!" && i === classStart + 1) c = "^"
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case "(":
+ if (inClass) {
+ re += "("
+ continue
+ }
+
+ if (!stateChar) {
+ re += "\\("
+ continue
+ }
+
+ plType = stateChar
+ patternListStack.push({ type: plType
+ , start: i - 1
+ , reStart: re.length })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === "!" ? "(?:(?!" : "(?:"
+ stateChar = false
+ continue
+
+ case ")":
+ if (inClass || !patternListStack.length) {
+ re += "\\)"
+ continue
+ }
+
+ hasMagic = true
+ re += ")"
+ plType = patternListStack.pop().type
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:<pattern>)<type>
+ switch (plType) {
+ case "!":
+ re += "[^/]*?)"
+ break
+ case "?":
+ case "+":
+ case "*": re += plType
+ case "@": break // the default anyway
+ }
+ continue
+
+ case "|":
+ if (inClass || !patternListStack.length || escaping) {
+ re += "\\|"
+ escaping = false
+ continue
+ }
+
+ re += "|"
+ continue
+
+ // these are mostly the same in regexp and glob
+ case "[":
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += "\\" + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case "]":
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += "\\" + c
+ escaping = false
+ continue
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === "^" && inClass)) {
+ re += "\\"
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ var cs = pattern.substr(classStart + 1)
+ , sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + "\\[" + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ var pl
+ while (pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + 3)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = "\\"
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + "|"
+ })
+
+ // console.error("tail=%j\n %s", tail, tail)
+ var t = pl.type === "*" ? star
+ : pl.type === "?" ? qmark
+ : "\\" + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart)
+ + t + "\\("
+ + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += "\\\\"
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case ".":
+ case "[":
+ case "(": addPatternStart = true
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== "" && hasMagic) re = "(?=.)" + re
+
+ if (addPatternStart) re = patternStart + re
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [ re, hasMagic ]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? "i" : ""
+ , regExp = new RegExp("^" + re + "$", flags)
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) return this.regexp = false
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ , flags = options.nocase ? "i" : ""
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === "string") ? regExpEscape(p)
+ : p._src
+ }).join("\\\/")
+ }).join("|")
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = "^(?:" + re + ")$"
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = "^(?!" + re + ").*$"
+
+ try {
+ return this.regexp = new RegExp(re, flags)
+ } catch (ex) {
+ return this.regexp = false
+ }
+}
+
+minimatch.match = function (list, pattern, options) {
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+ // console.error("match", f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ""
+
+ if (f === "/" && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ // On other platforms, \ is a valid (albeit bad) filename char.
+ if (platform === "win32") {
+ f = f.split("\\").join("/")
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ if (options.debug) {
+ console.error(this.pattern, "split", f)
+ }
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ // console.error(this.pattern, "set", set)
+
+ for (var i = 0, l = set.length; i < l; i ++) {
+ var pattern = set[i]
+ var hit = this.matchOne(f, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ if (options.debug) {
+ console.error("matchOne",
+ { "this": this
+ , file: file
+ , pattern: pattern })
+ }
+
+ if (options.matchBase && pattern.length === 1) {
+ file = path.basename(file.join("/")).split("/")
+ }
+
+ if (options.debug) {
+ console.error("matchOne", file.length, pattern.length)
+ }
+
+ for ( var fi = 0
+ , pi = 0
+ , fl = file.length
+ , pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi ++, pi ++ ) {
+
+ if (options.debug) {
+ console.error("matchOne loop")
+ }
+ var p = pattern[pi]
+ , f = file[fi]
+
+ if (options.debug) {
+ console.error(pattern, p, f)
+ }
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ if (options.debug)
+ console.error('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ , pr = pi + 1
+ if (pr === pl) {
+ if (options.debug)
+ console.error('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for ( ; fi < fl; fi ++) {
+ if (file[fi] === "." || file[fi] === ".." ||
+ (!options.dot && file[fi].charAt(0) === ".")) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ WHILE: while (fr < fl) {
+ var swallowee = file[fr]
+
+ if (options.debug) {
+ console.error('\nglobstar while',
+ file, fr, pattern, pr, swallowee)
+ }
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ if (options.debug)
+ console.error('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === "." || swallowee === ".." ||
+ (!options.dot && swallowee.charAt(0) === ".")) {
+ if (options.debug)
+ console.error("dot detected!", file, fr, pattern, pr)
+ break WHILE
+ }
+
+ // ** swallows a segment, and continue.
+ if (options.debug)
+ console.error('globstar swallow a segment, and continue')
+ fr ++
+ }
+ }
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ if (partial) {
+ // ran out of file
+ // console.error("\n>>> no match, partial?", file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === "string") {
+ if (options.nocase) {
+ hit = f.toLowerCase() === p.toLowerCase()
+ } else {
+ hit = f === p
+ }
+ if (options.debug) {
+ console.error("string match", p, f, hit)
+ }
+ } else {
+ hit = f.match(p)
+ if (options.debug) {
+ console.error("pattern match", p, f, hit)
+ }
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ var emptyFileEnd = (fi === fl - 1) && (file[fi] === "")
+ return emptyFileEnd
+ }
+
+ // should be unreachable.
+ throw new Error("wtf?")
+}
+
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, "$1")
+}
+
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
+}
+
+})( typeof require === "function" ? require : null,
+ this,
+ typeof module === "object" ? module : null,
+ typeof process === "object" ? process.platform : "win32"
+ )
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore
new file mode 100644
index 0000000..07e6e47
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/.npmignore
@@ -0,0 +1 @@
+/node_modules
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS
new file mode 100644
index 0000000..016d7fb
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/AUTHORS
@@ -0,0 +1,8 @@
+# Authors, sorted by whether or not they are me
+Isaac Z. Schlueter <i...@izs.me>
+Carlos Brito Lage <ca...@carloslage.net>
+Marko Mikulicic <ma...@isti.cnr.it>
+Trent Mick <tr...@gmail.com>
+Kevin O'Hara <ke...@gmail.com>
+Marco Rogers <ma...@gmail.com>
+Jesse Dailey <je...@gmail.com>
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md
new file mode 100644
index 0000000..03ee0f9
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md
@@ -0,0 +1,97 @@
+# lru cache
+
+A cache object that deletes the least-recently-used items.
+
+## Usage:
+
+```javascript
+var LRU = require("lru-cache")
+ , options = { max: 500
+ , length: function (n) { return n * 2 }
+ , dispose: function (key, n) { n.close() }
+ , maxAge: 1000 * 60 * 60 }
+ , cache = LRU(options)
+ , otherCache = LRU(50) // sets just the max size
+
+cache.set("key", "value")
+cache.get("key") // "value"
+
+cache.reset() // empty the cache
+```
+
+If you put more stuff in it, then items will fall out.
+
+If you try to put an oversized thing in it, then it'll fall out right
+away.
+
+## Options
+
+* `max` The maximum size of the cache, checked by applying the length
+ function to all values in the cache. Not setting this is kind of
+ silly, since that's the whole purpose of this lib, but it defaults
+ to `Infinity`.
+* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
+ as they age, but if you try to get an item that is too old, it'll
+ drop it and return undefined instead of giving it to you.
+* `length` Function that is used to calculate the length of stored
+ items. If you're storing strings or buffers, then you probably want
+ to do something like `function(n){return n.length}`. The default is
+ `function(n){return 1}`, which is fine if you want to store `n`
+ like-sized things.
+* `dispose` Function that is called on items when they are dropped
+ from the cache. This can be handy if you want to close file
+ descriptors or do other cleanup tasks when items are no longer
+ accessible. Called with `key, value`. It's called *before*
+ actually removing the item from the internal cache, so if you want
+ to immediately put it back in, you'll have to do that in a
+ `nextTick` or `setTimeout` callback or it won't do anything.
+* `stale` By default, if you set a `maxAge`, it'll only actually pull
+ stale items out of the cache when you `get(key)`. (That is, it's
+ not pre-emptively doing a `setTimeout` or anything.) If you set
+ `stale:true`, it'll return the stale value before deleting it. If
+ you don't set this, then it'll return `undefined` when you try to
+ get a stale entry, as if it had already been deleted.
+
+## API
+
+* `set(key, value)`
+* `get(key) => value`
+
+ Both of these will update the "recently used"-ness of the key.
+ They do what you think.
+
+* `peek(key)`
+
+ Returns the key value (or `undefined` if not found) without
+ updating the "recently used"-ness of the key.
+
+ (If you find yourself using this a lot, you *might* be using the
+ wrong sort of data structure, but there are some use cases where
+ it's handy.)
+
+* `del(key)`
+
+ Deletes a key out of the cache.
+
+* `reset()`
+
+ Clear the cache entirely, throwing away all values.
+
+* `has(key)`
+
+ Check if a key is in the cache, without updating the recent-ness
+ or deleting it for being stale.
+
+* `forEach(function(value,key,cache), [thisp])`
+
+ Just like `Array.prototype.forEach`. Iterates over all the keys
+ in the cache, in order of recent-ness. (Ie, more recently used
+ items are iterated over first.)
+
+* `keys()`
+
+ Return an array of the keys in the cache.
+
+* `values()`
+
+ Return an array of the values in the cache.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
new file mode 100644
index 0000000..8c80853
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
@@ -0,0 +1,257 @@
+;(function () { // closure for web browsers
+
+if (typeof module === 'object' && module.exports) {
+ module.exports = LRUCache
+} else {
+ // just set the global for non-node platforms.
+ this.LRUCache = LRUCache
+}
+
+function hOP (obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key)
+}
+
+function naiveLength () { return 1 }
+
+function LRUCache (options) {
+ if (!(this instanceof LRUCache)) {
+ return new LRUCache(options)
+ }
+
+ var max
+ if (typeof options === 'number') {
+ max = options
+ options = { max: max }
+ }
+
+ if (!options) options = {}
+
+ max = options.max
+
+ var lengthCalculator = options.length || naiveLength
+
+ if (typeof lengthCalculator !== "function") {
+ lengthCalculator = naiveLength
+ }
+
+ if (!max || !(typeof max === "number") || max <= 0 ) {
+ // a little bit silly. maybe this should throw?
+ max = Infinity
+ }
+
+ var allowStale = options.stale || false
+
+ var maxAge = options.maxAge || null
+
+ var dispose = options.dispose
+
+ var cache = Object.create(null) // hash of items by key
+ , lruList = Object.create(null) // list of items in order of use recency
+ , mru = 0 // most recently used
+ , lru = 0 // least recently used
+ , length = 0 // number of items in the list
+ , itemCount = 0
+
+
+ // resize the cache when the max changes.
+ Object.defineProperty(this, "max",
+ { set : function (mL) {
+ if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity
+ max = mL
+ // if it gets above double max, trim right away.
+ // otherwise, do it whenever it's convenient.
+ if (length > max) trim()
+ }
+ , get : function () { return max }
+ , enumerable : true
+ })
+
+ // resize the cache when the lengthCalculator changes.
+ Object.defineProperty(this, "lengthCalculator",
+ { set : function (lC) {
+ if (typeof lC !== "function") {
+ lengthCalculator = naiveLength
+ length = itemCount
+ for (var key in cache) {
+ cache[key].length = 1
+ }
+ } else {
+ lengthCalculator = lC
+ length = 0
+ for (var key in cache) {
+ cache[key].length = lengthCalculator(cache[key].value)
+ length += cache[key].length
+ }
+ }
+
+ if (length > max) trim()
+ }
+ , get : function () { return lengthCalculator }
+ , enumerable : true
+ })
+
+ Object.defineProperty(this, "length",
+ { get : function () { return length }
+ , enumerable : true
+ })
+
+
+ Object.defineProperty(this, "itemCount",
+ { get : function () { return itemCount }
+ , enumerable : true
+ })
+
+ this.forEach = function (fn, thisp) {
+ thisp = thisp || this
+ var i = 0;
+ for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) {
+ i++
+ var hit = lruList[k]
+ fn.call(thisp, hit.value, hit.key, this)
+ }
+ }
+
+ this.keys = function () {
+ var keys = new Array(itemCount)
+ var i = 0
+ for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) {
+ var hit = lruList[k]
+ keys[i++] = hit.key
+ }
+ return keys
+ }
+
+ this.values = function () {
+ var values = new Array(itemCount)
+ var i = 0
+ for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) {
+ var hit = lruList[k]
+ values[i++] = hit.value
+ }
+ return values
+ }
+
+ this.reset = function () {
+ if (dispose) {
+ for (var k in cache) {
+ dispose(k, cache[k].value)
+ }
+ }
+ cache = {}
+ lruList = {}
+ lru = 0
+ mru = 0
+ length = 0
+ itemCount = 0
+ }
+
+ // Provided for debugging/dev purposes only. No promises whatsoever that
+ // this API stays stable.
+ this.dump = function () {
+ return cache
+ }
+
+ this.dumpLru = function () {
+ return lruList
+ }
+
+ this.set = function (key, value) {
+ if (hOP(cache, key)) {
+ // dispose of the old one before overwriting
+ if (dispose) dispose(key, cache[key].value)
+ if (maxAge) cache[key].now = Date.now()
+ cache[key].value = value
+ this.get(key)
+ return true
+ }
+
+ var len = lengthCalculator(value)
+ var age = maxAge ? Date.now() : 0
+ var hit = new Entry(key, value, mru++, len, age)
+
+ // oversized objects fall out of cache automatically.
+ if (hit.length > max) {
+ if (dispose) dispose(key, value)
+ return false
+ }
+
+ length += hit.length
+ lruList[hit.lu] = cache[key] = hit
+ itemCount ++
+
+ if (length > max) trim()
+ return true
+ }
+
+ this.has = function (key) {
+ if (!hOP(cache, key)) return false
+ var hit = cache[key]
+ if (maxAge && (Date.now() - hit.now > maxAge)) {
+ return false
+ }
+ return true
+ }
+
+ this.get = function (key) {
+ return get(key, true)
+ }
+
+ this.peek = function (key) {
+ return get(key, false)
+ }
+
+ function get (key, doUse) {
+ var hit = cache[key]
+ if (hit) {
+ if (maxAge && (Date.now() - hit.now > maxAge)) {
+ del(hit)
+ if (!allowStale) hit = undefined
+ } else {
+ if (doUse) use(hit)
+ }
+ if (hit) hit = hit.value
+ }
+ return hit
+ }
+
+ function use (hit) {
+ shiftLU(hit)
+ hit.lu = mru ++
+ lruList[hit.lu] = hit
+ }
+
+ this.del = function (key) {
+ del(cache[key])
+ }
+
+ function trim () {
+ while (lru < mru && length > max)
+ del(lruList[lru])
+ }
+
+ function shiftLU(hit) {
+ delete lruList[ hit.lu ]
+ while (lru < mru && !lruList[lru]) lru ++
+ }
+
+ function del(hit) {
+ if (hit) {
+ if (dispose) dispose(hit.key, hit.value)
+ length -= hit.length
+ itemCount --
+ delete cache[ hit.key ]
+ shiftLU(hit)
+ }
+ }
+}
+
+// classy, since V8 prefers predictable objects.
+function Entry (key, value, mru, len, age) {
+ this.key = key
+ this.value = value
+ this.lu = mru
+ this.length = len
+ this.now = age
+}
+
+})()
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json
new file mode 100644
index 0000000..73920bf
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "lru-cache",
+ "description": "A cache object that deletes the least-recently-used items.",
+ "version": "2.3.0",
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ "scripts": {
+ "test": "tap test --gc"
+ },
+ "main": "lib/lru-cache.js",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/node-lru-cache.git"
+ },
+ "devDependencies": {
+ "tap": "",
+ "weak": ""
+ },
+ "license": {
+ "type": "MIT",
+ "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE"
+ },
+ "contributors": [
+ {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "Carlos Brito Lage",
+ "email": "carlos@carloslage.net"
+ },
+ {
+ "name": "Marko Mikulicic",
+ "email": "marko.mikulicic@isti.cnr.it"
+ },
+ {
+ "name": "Trent Mick",
+ "email": "trentm@gmail.com"
+ },
+ {
+ "name": "Kevin O'Hara",
+ "email": "kevinohara80@gmail.com"
+ },
+ {
+ "name": "Marco Rogers",
+ "email": "marco.rogers@gmail.com"
+ },
+ {
+ "name": "Jesse Dailey",
+ "email": "jesse.dailey@gmail.com"
+ }
+ ],
+ "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if yo
u try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is
, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(func
tion(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/node-lru-cache/issues"
+ },
+ "_id": "lru-cache@2.3.0",
+ "_from": "lru-cache@2"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/s.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/s.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/s.js
new file mode 100644
index 0000000..c2a9e54
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/s.js
@@ -0,0 +1,25 @@
+var LRU = require('lru-cache');
+
+var max = +process.argv[2] || 10240;
+var more = 1024;
+
+var cache = LRU({
+ max: max, maxAge: 86400e3
+});
+
+// fill cache
+for (var i = 0; i < max; ++i) {
+ cache.set(i, {});
+}
+
+var start = process.hrtime();
+
+// adding more items
+for ( ; i < max+more; ++i) {
+ cache.set(i, {});
+}
+
+var end = process.hrtime(start);
+var msecs = end[0] * 1E3 + end[1] / 1E6;
+
+console.log('adding %d items took %d ms', more, msecs.toPrecision(5));
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js
new file mode 100644
index 0000000..70f3f8b
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js
@@ -0,0 +1,329 @@
+var test = require("tap").test
+ , LRU = require("../")
+
+test("basic", function (t) {
+ var cache = new LRU({max: 10})
+ cache.set("key", "value")
+ t.equal(cache.get("key"), "value")
+ t.equal(cache.get("nada"), undefined)
+ t.equal(cache.length, 1)
+ t.equal(cache.max, 10)
+ t.end()
+})
+
+test("least recently set", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("lru recently gotten", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.get("a")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("a"), "A")
+ t.end()
+})
+
+test("del", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.del("a")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("max", function (t) {
+ var cache = new LRU(3)
+
+ // test changing the max, verify that the LRU items get dropped.
+ cache.max = 100
+ for (var i = 0; i < 100; i ++) cache.set(i, i)
+ t.equal(cache.length, 100)
+ for (var i = 0; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ cache.max = 3
+ t.equal(cache.length, 3)
+ for (var i = 0; i < 97; i ++) {
+ t.equal(cache.get(i), undefined)
+ }
+ for (var i = 98; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+
+ // now remove the max restriction, and try again.
+ cache.max = "hello"
+ for (var i = 0; i < 100; i ++) cache.set(i, i)
+ t.equal(cache.length, 100)
+ for (var i = 0; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ // should trigger an immediate resize
+ cache.max = 3
+ t.equal(cache.length, 3)
+ for (var i = 0; i < 97; i ++) {
+ t.equal(cache.get(i), undefined)
+ }
+ for (var i = 98; i < 100; i ++) {
+ t.equal(cache.get(i), i)
+ }
+ t.end()
+})
+
+test("reset", function (t) {
+ var cache = new LRU(10)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ cache.reset()
+ t.equal(cache.length, 0)
+ t.equal(cache.max, 10)
+ t.equal(cache.get("a"), undefined)
+ t.equal(cache.get("b"), undefined)
+ t.end()
+})
+
+
+// Note: `<cache>.dump()` is a debugging tool only. No guarantees are made
+// about the format/layout of the response.
+test("dump", function (t) {
+ var cache = new LRU(10)
+ var d = cache.dump();
+ t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache")
+ cache.set("a", "A")
+ var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } }
+ t.ok(d.a)
+ t.equal(d.a.key, "a")
+ t.equal(d.a.value, "A")
+ t.equal(d.a.lu, 0)
+
+ cache.set("b", "B")
+ cache.get("b")
+ d = cache.dump()
+ t.ok(d.b)
+ t.equal(d.b.key, "b")
+ t.equal(d.b.value, "B")
+ t.equal(d.b.lu, 2)
+
+ t.end()
+})
+
+
+test("basic with weighed length", function (t) {
+ var cache = new LRU({
+ max: 100,
+ length: function (item) { return item.size }
+ })
+ cache.set("key", {val: "value", size: 50})
+ t.equal(cache.get("key").val, "value")
+ t.equal(cache.get("nada"), undefined)
+ t.equal(cache.lengthCalculator(cache.get("key")), 50)
+ t.equal(cache.length, 50)
+ t.equal(cache.max, 100)
+ t.end()
+})
+
+
+test("weighed length item too large", function (t) {
+ var cache = new LRU({
+ max: 10,
+ length: function (item) { return item.size }
+ })
+ t.equal(cache.max, 10)
+
+ // should fall out immediately
+ cache.set("key", {val: "value", size: 50})
+
+ t.equal(cache.length, 0)
+ t.equal(cache.get("key"), undefined)
+ t.end()
+})
+
+test("least recently set with weighed length", function (t) {
+ var cache = new LRU({
+ max:8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ cache.set("d", "DDDD")
+ t.equal(cache.get("d"), "DDDD")
+ t.equal(cache.get("c"), "CCC")
+ t.equal(cache.get("b"), undefined)
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
+
+test("lru recently gotten with weighed length", function (t) {
+ var cache = new LRU({
+ max: 8,
+ length: function (item) { return item.length }
+ })
+ cache.set("a", "A")
+ cache.set("b", "BB")
+ cache.set("c", "CCC")
+ cache.get("a")
+ cache.get("b")
+ cache.set("d", "DDDD")
+ t.equal(cache.get("c"), undefined)
+ t.equal(cache.get("d"), "DDDD")
+ t.equal(cache.get("b"), "BB")
+ t.equal(cache.get("a"), "A")
+ t.end()
+})
+
+test("set returns proper booleans", function(t) {
+ var cache = new LRU({
+ max: 5,
+ length: function (item) { return item.length }
+ })
+
+ t.equal(cache.set("a", "A"), true)
+
+ // should return false for max exceeded
+ t.equal(cache.set("b", "donuts"), false)
+
+ t.equal(cache.set("b", "B"), true)
+ t.equal(cache.set("c", "CCCC"), true)
+ t.end()
+})
+
+test("drop the old items", function(t) {
+ var cache = new LRU({
+ max: 5,
+ maxAge: 50
+ })
+
+ cache.set("a", "A")
+
+ setTimeout(function () {
+ cache.set("b", "b")
+ t.equal(cache.get("a"), "A")
+ }, 25)
+
+ setTimeout(function () {
+ cache.set("c", "C")
+ // timed out
+ t.notOk(cache.get("a"))
+ }, 60)
+
+ setTimeout(function () {
+ t.notOk(cache.get("b"))
+ t.equal(cache.get("c"), "C")
+ }, 90)
+
+ setTimeout(function () {
+ t.notOk(cache.get("c"))
+ t.end()
+ }, 155)
+})
+
+test("disposal function", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+
+ cache.set(1, 1)
+ cache.set(2, 2)
+ t.equal(disposed, 1)
+ cache.set(3, 3)
+ t.equal(disposed, 2)
+ cache.reset()
+ t.equal(disposed, 3)
+ t.end()
+})
+
+test("disposal function on too big of item", function(t) {
+ var disposed = false
+ var cache = new LRU({
+ max: 1,
+ length: function (k) {
+ return k.length
+ },
+ dispose: function (k, n) {
+ disposed = n
+ }
+ })
+ var obj = [ 1, 2 ]
+
+ t.equal(disposed, false)
+ cache.set("obj", obj)
+ t.equal(disposed, obj)
+ t.end()
+})
+
+test("has()", function(t) {
+ var cache = new LRU({
+ max: 1,
+ maxAge: 10
+ })
+
+ cache.set('foo', 'bar')
+ t.equal(cache.has('foo'), true)
+ cache.set('blu', 'baz')
+ t.equal(cache.has('foo'), false)
+ t.equal(cache.has('blu'), true)
+ setTimeout(function() {
+ t.equal(cache.has('blu'), false)
+ t.end()
+ }, 15)
+})
+
+test("stale", function(t) {
+ var cache = new LRU({
+ maxAge: 10,
+ stale: true
+ })
+
+ cache.set('foo', 'bar')
+ t.equal(cache.get('foo'), 'bar')
+ t.equal(cache.has('foo'), true)
+ setTimeout(function() {
+ t.equal(cache.has('foo'), false)
+ t.equal(cache.get('foo'), 'bar')
+ t.equal(cache.get('foo'), undefined)
+ t.end()
+ }, 15)
+})
+
+test("lru update via set", function(t) {
+ var cache = LRU({ max: 2 });
+
+ cache.set('foo', 1);
+ cache.set('bar', 2);
+ cache.del('bar');
+ cache.set('baz', 3);
+ cache.set('qux', 4);
+
+ t.equal(cache.get('foo'), undefined)
+ t.equal(cache.get('bar'), undefined)
+ t.equal(cache.get('baz'), 3)
+ t.equal(cache.get('qux'), 4)
+ t.end()
+})
+
+test("least recently set w/ peek", function (t) {
+ var cache = new LRU(2)
+ cache.set("a", "A")
+ cache.set("b", "B")
+ t.equal(cache.peek("a"), "A")
+ cache.set("c", "C")
+ t.equal(cache.get("c"), "C")
+ t.equal(cache.get("b"), "B")
+ t.equal(cache.get("a"), undefined)
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
new file mode 100644
index 0000000..eefb80d
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/foreach.js
@@ -0,0 +1,52 @@
+var test = require('tap').test
+var LRU = require('../')
+
+test('forEach', function (t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ var i = 9
+ l.forEach(function (val, key, cache) {
+ t.equal(cache, l)
+ t.equal(key, i.toString())
+ t.equal(val, i.toString(2))
+ i -= 1
+ })
+
+ // get in order of most recently used
+ l.get(6)
+ l.get(8)
+
+ var order = [ 8, 6, 9, 7, 5 ]
+ var i = 0
+
+ l.forEach(function (val, key, cache) {
+ var j = order[i ++]
+ t.equal(cache, l)
+ t.equal(key, j.toString())
+ t.equal(val, j.toString(2))
+ })
+
+ t.end()
+})
+
+test('keys() and values()', function (t) {
+ var l = new LRU(5)
+ for (var i = 0; i < 10; i ++) {
+ l.set(i.toString(), i.toString(2))
+ }
+
+ t.similar(l.keys(), ['9', '8', '7', '6', '5'])
+ t.similar(l.values(), ['1001', '1000', '111', '110', '101'])
+
+ // get in order of most recently used
+ l.get(6)
+ l.get(8)
+
+ t.similar(l.keys(), ['8', '6', '9', '7', '5'])
+ t.similar(l.values(), ['1000', '110', '1001', '111', '101'])
+
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
new file mode 100644
index 0000000..7af45b0
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js
@@ -0,0 +1,50 @@
+#!/usr/bin/env node --expose_gc
+
+var weak = require('weak');
+var test = require('tap').test
+var LRU = require('../')
+var l = new LRU({ max: 10 })
+var refs = 0
+function X() {
+ refs ++
+ weak(this, deref)
+}
+
+function deref() {
+ refs --
+}
+
+test('no leaks', function (t) {
+ // fill up the cache
+ for (var i = 0; i < 100; i++) {
+ l.set(i, new X);
+ // throw some gets in there, too.
+ if (i % 2 === 0)
+ l.get(i / 2)
+ }
+
+ gc()
+
+ var start = process.memoryUsage()
+
+ // capture the memory
+ var startRefs = refs
+
+ // do it again, but more
+ for (var i = 0; i < 10000; i++) {
+ l.set(i, new X);
+ // throw some gets in there, too.
+ if (i % 2 === 0)
+ l.get(i / 2)
+ }
+
+ gc()
+
+ var end = process.memoryUsage()
+ t.equal(refs, startRefs, 'no leaky refs')
+
+ console.error('start: %j\n' +
+ 'end: %j', start, end);
+ t.pass();
+ t.end();
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE
new file mode 100644
index 0000000..0c44ae7
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. 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.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 THE AUTHOR OR CONTRIBUTORS
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md
new file mode 100644
index 0000000..7e36512
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/README.md
@@ -0,0 +1,53 @@
+# sigmund
+
+Quick and dirty signatures for Objects.
+
+This is like a much faster `deepEquals` comparison, which returns a
+string key suitable for caches and the like.
+
+## Usage
+
+```javascript
+function doSomething (someObj) {
+ var key = sigmund(someObj, maxDepth) // max depth defaults to 10
+ var cached = cache.get(key)
+ if (cached) return cached)
+
+ var result = expensiveCalculation(someObj)
+ cache.set(key, result)
+ return result
+}
+```
+
+The resulting key will be as unique and reproducible as calling
+`JSON.stringify` or `util.inspect` on the object, but is much faster.
+In order to achieve this speed, some differences are glossed over.
+For example, the object `{0:'foo'}` will be treated identically to the
+array `['foo']`.
+
+Also, just as there is no way to summon the soul from the scribblings
+of a cocain-addled psychoanalyst, there is no way to revive the object
+from the signature string that sigmund gives you. In fact, it's
+barely even readable.
+
+As with `sys.inspect` and `JSON.stringify`, larger objects will
+produce larger signature strings.
+
+Because sigmund is a bit less strict than the more thorough
+alternatives, the strings will be shorter, and also there is a
+slightly higher chance for collisions. For example, these objects
+have the same signature:
+
+ var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
+ var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
+
+Like a good Freudian, sigmund is most effective when you already have
+some understanding of what you're looking for. It can help you help
+yourself, but you must be willing to do some work as well.
+
+Cycles are handled, and cyclical objects are silently omitted (though
+the key is included in the signature output.)
+
+The second argument is the maximum depth, which defaults to 10,
+because that is the maximum object traversal depth covered by most
+insurance carriers.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js
new file mode 100644
index 0000000..5acfd6d
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/bench.js
@@ -0,0 +1,283 @@
+// different ways to id objects
+// use a req/res pair, since it's crazy deep and cyclical
+
+// sparseFE10 and sigmund are usually pretty close, which is to be expected,
+// since they are essentially the same algorithm, except that sigmund handles
+// regular expression objects properly.
+
+
+var http = require('http')
+var util = require('util')
+var sigmund = require('./sigmund.js')
+var sreq, sres, creq, cres, test
+
+http.createServer(function (q, s) {
+ sreq = q
+ sres = s
+ sres.end('ok')
+ this.close(function () { setTimeout(function () {
+ start()
+ }, 200) })
+}).listen(1337, function () {
+ creq = http.get({ port: 1337 })
+ creq.on('response', function (s) { cres = s })
+})
+
+function start () {
+ test = [sreq, sres, creq, cres]
+ // test = sreq
+ // sreq.sres = sres
+ // sreq.creq = creq
+ // sreq.cres = cres
+
+ for (var i in exports.compare) {
+ console.log(i)
+ var hash = exports.compare[i]()
+ console.log(hash)
+ console.log(hash.length)
+ console.log('')
+ }
+
+ require('bench').runMain()
+}
+
+function customWs (obj, md, d) {
+ d = d || 0
+ var to = typeof obj
+ if (to === 'undefined' || to === 'function' || to === null) return ''
+ if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '')
+
+ if (Array.isArray(obj)) {
+ return obj.map(function (i, _, __) {
+ return customWs(i, md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+ }
+
+ var keys = Object.keys(obj)
+ return keys.map(function (k, _, __) {
+ return k + ':' + customWs(obj[k], md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+}
+
+function custom (obj, md, d) {
+ d = d || 0
+ var to = typeof obj
+ if (to === 'undefined' || to === 'function' || to === null) return ''
+ if (d > md || !obj || to !== 'object') return '' + obj
+
+ if (Array.isArray(obj)) {
+ return obj.map(function (i, _, __) {
+ return custom(i, md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+ }
+
+ var keys = Object.keys(obj)
+ return keys.map(function (k, _, __) {
+ return k + ':' + custom(obj[k], md, d + 1)
+ }).reduce(function (a, b) { return a + b }, '')
+}
+
+function sparseFE2 (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ Object.keys(v).forEach(function (k, _, __) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') return
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') return
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ })
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function sparseFE (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ Object.keys(v).forEach(function (k, _, __) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') return
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') return
+ soFar += k
+ ch(v[k], depth + 1)
+ })
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function sparse (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k
+ ch(v[k], depth + 1)
+ }
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+function noCommas (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ }
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+
+function flatten (obj, maxDepth) {
+ var seen = []
+ var soFar = ''
+ function ch (v, depth) {
+ if (depth > maxDepth) return
+ if (typeof v === 'function' || typeof v === 'undefined') return
+ if (typeof v !== 'object' || !v) {
+ soFar += v
+ return
+ }
+ if (seen.indexOf(v) !== -1 || depth === maxDepth) return
+ seen.push(v)
+ soFar += '{'
+ for (var k in v) {
+ // pseudo-private values. skip those.
+ if (k.charAt(0) === '_') continue
+ var to = typeof v[k]
+ if (to === 'function' || to === 'undefined') continue
+ soFar += k + ':'
+ ch(v[k], depth + 1)
+ soFar += ','
+ }
+ soFar += '}'
+ }
+ ch(obj, 0)
+ return soFar
+}
+
+exports.compare =
+{
+ // 'custom 2': function () {
+ // return custom(test, 2, 0)
+ // },
+ // 'customWs 2': function () {
+ // return customWs(test, 2, 0)
+ // },
+ 'JSON.stringify (guarded)': function () {
+ var seen = []
+ return JSON.stringify(test, function (k, v) {
+ if (typeof v !== 'object' || !v) return v
+ if (seen.indexOf(v) !== -1) return undefined
+ seen.push(v)
+ return v
+ })
+ },
+
+ 'flatten 10': function () {
+ return flatten(test, 10)
+ },
+
+ // 'flattenFE 10': function () {
+ // return flattenFE(test, 10)
+ // },
+
+ 'noCommas 10': function () {
+ return noCommas(test, 10)
+ },
+
+ 'sparse 10': function () {
+ return sparse(test, 10)
+ },
+
+ 'sparseFE 10': function () {
+ return sparseFE(test, 10)
+ },
+
+ 'sparseFE2 10': function () {
+ return sparseFE2(test, 10)
+ },
+
+ sigmund: function() {
+ return sigmund(test, 10)
+ },
+
+
+ // 'util.inspect 1': function () {
+ // return util.inspect(test, false, 1, false)
+ // },
+ // 'util.inspect undefined': function () {
+ // util.inspect(test)
+ // },
+ // 'util.inspect 2': function () {
+ // util.inspect(test, false, 2, false)
+ // },
+ // 'util.inspect 3': function () {
+ // util.inspect(test, false, 3, false)
+ // },
+ // 'util.inspect 4': function () {
+ // util.inspect(test, false, 4, false)
+ // },
+ // 'util.inspect Infinity': function () {
+ // util.inspect(test, false, Infinity, false)
+ // }
+}
+
+/** results
+**/
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json
new file mode 100644
index 0000000..ec8e2eb
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "sigmund",
+ "version": "1.0.0",
+ "description": "Quick and dirty signatures for Objects.",
+ "main": "sigmund.js",
+ "directories": {
+ "test": "test"
+ },
+ "dependencies": {},
+ "devDependencies": {
+ "tap": "~0.3.0"
+ },
+ "scripts": {
+ "test": "tap test/*.js",
+ "bench": "node bench.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/sigmund"
+ },
+ "keywords": [
+ "object",
+ "signature",
+ "key",
+ "data",
+ "psychoanalysis"
+ ],
+ "author": {
+ "name": "Isaac Z. Schlueter",
+ "email": "i@izs.me",
+ "url": "http://blog.izs.me/"
+ },
+ "license": "BSD",
+ "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even rea
dable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/isaacs/sigmund/issues"
+ },
+ "_id": "sigmund@1.0.0",
+ "_from": "sigmund@~1.0.0"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js
new file mode 100644
index 0000000..82c7ab8
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/sigmund.js
@@ -0,0 +1,39 @@
+module.exports = sigmund
+function sigmund (subject, maxSessions) {
+ maxSessions = maxSessions || 10;
+ var notes = [];
+ var analysis = '';
+ var RE = RegExp;
+
+ function psychoAnalyze (subject, session) {
+ if (session > maxSessions) return;
+
+ if (typeof subject === 'function' ||
+ typeof subject === 'undefined') {
+ return;
+ }
+
+ if (typeof subject !== 'object' || !subject ||
+ (subject instanceof RE)) {
+ analysis += subject;
+ return;
+ }
+
+ if (notes.indexOf(subject) !== -1 || session === maxSessions) return;
+
+ notes.push(subject);
+ analysis += '{';
+ Object.keys(subject).forEach(function (issue, _, __) {
+ // pseudo-private values. skip those.
+ if (issue.charAt(0) === '_') return;
+ var to = typeof subject[issue];
+ if (to === 'function' || to === 'undefined') return;
+ analysis += issue;
+ psychoAnalyze(subject[issue], session + 1);
+ });
+ }
+ psychoAnalyze(subject, 0);
+ return analysis;
+}
+
+// vim: set softtabstop=4 shiftwidth=4:
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js
new file mode 100644
index 0000000..50c53a1
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/node_modules/minimatch/node_modules/sigmund/test/basic.js
@@ -0,0 +1,24 @@
+var test = require('tap').test
+var sigmund = require('../sigmund.js')
+
+
+// occasionally there are duplicates
+// that's an acceptable edge-case. JSON.stringify and util.inspect
+// have some collision potential as well, though less, and collision
+// detection is expensive.
+var hash = '{abc/def/g{0h1i2{jkl'
+var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}
+var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}
+
+var obj3 = JSON.parse(JSON.stringify(obj1))
+obj3.c = /def/
+obj3.g[2].cycle = obj3
+var cycleHash = '{abc/def/g{0h1i2{jklcycle'
+
+test('basic', function (t) {
+ t.equal(sigmund(obj1), hash)
+ t.equal(sigmund(obj2), hash)
+ t.equal(sigmund(obj3), cycleHash)
+ t.end()
+})
+
[24/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/bash-results.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/bash-results.json b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/bash-results.json
new file mode 100644
index 0000000..a9bc347
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/bash-results.json
@@ -0,0 +1,350 @@
+{
+ "test/a/*/+(c|g)/./d": [
+ "test/a/b/c/./d"
+ ],
+ "test/a/**/[cg]/../[cg]": [
+ "test/a/abcdef/g/../g",
+ "test/a/abcfed/g/../g",
+ "test/a/b/c/../c",
+ "test/a/c/../c",
+ "test/a/c/d/c/../c",
+ "test/a/symlink/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c"
+ ],
+ "test/a/{b,c,d,e,f}/**/g": [],
+ "test/a/b/**": [
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/b/c/d"
+ ],
+ "test/**/g": [
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/a/abc{fed,def}/g/h": [
+ "test/a/abcdef/g/h",
+ "test/a/abcfed/g/h"
+ ],
+ "test/a/abc{fed/g,def}/**/": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/a/abc{fed/g,def}/**///**/": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed/g"
+ ],
+ "test/**/a/**/": [
+ "test/a",
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/bc",
+ "test/a/bc/e",
+ "test/a/c",
+ "test/a/c/d",
+ "test/a/c/d/c",
+ "test/a/cb",
+ "test/a/cb/e",
+ "test/a/symlink",
+ "test/a/symlink/a",
+ "test/a/symlink/a/b",
+ "test/a/symlink/a/b/c",
+ "test/a/symlink/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b"
+ ],
+ "test/+(a|b|c)/a{/,bc*}/**": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcdef/g/h",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/abcfed/g/h"
+ ],
+ "test/*/*/*/f": [
+ "test/a/bc/e/f",
+ "test/a/cb/e/f"
+ ],
+ "test/**/f": [
+ "test/a/bc/e/f",
+ "test/a/cb/e/f"
+ ],
+ "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b",
+ "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c"
+ ],
+ "{./*/*,/tmp/glob-test/*}": [
+ "./examples/g.js",
+ "./examples/usr-local.js",
+ "./node_modules/graceful-fs",
+ "./node_modules/inherits",
+ "./node_modules/minimatch",
+ "./node_modules/mkdirp",
+ "./node_modules/rimraf",
+ "./node_modules/tap",
+ "./test/00-setup.js",
+ "./test/a",
+ "./test/bash-comparison.js",
+ "./test/bash-results.json",
+ "./test/cwd-test.js",
+ "./test/globstar-match.js",
+ "./test/mark.js",
+ "./test/nocase-nomagic.js",
+ "./test/pause-resume.js",
+ "./test/root-nomount.js",
+ "./test/root.js",
+ "./test/stat.js",
+ "./test/zz-cleanup.js",
+ "/tmp/glob-test/asdf",
+ "/tmp/glob-test/bar",
+ "/tmp/glob-test/baz",
+ "/tmp/glob-test/foo",
+ "/tmp/glob-test/quux",
+ "/tmp/glob-test/qwer",
+ "/tmp/glob-test/rewq"
+ ],
+ "{/tmp/glob-test/*,*}": [
+ "/tmp/glob-test/asdf",
+ "/tmp/glob-test/bar",
+ "/tmp/glob-test/baz",
+ "/tmp/glob-test/foo",
+ "/tmp/glob-test/quux",
+ "/tmp/glob-test/qwer",
+ "/tmp/glob-test/rewq",
+ "examples",
+ "glob.js",
+ "LICENSE",
+ "node_modules",
+ "package.json",
+ "README.md",
+ "test"
+ ],
+ "test/a/!(symlink)/**": [
+ "test/a/abcdef",
+ "test/a/abcdef/g",
+ "test/a/abcdef/g/h",
+ "test/a/abcfed",
+ "test/a/abcfed/g",
+ "test/a/abcfed/g/h",
+ "test/a/b",
+ "test/a/b/c",
+ "test/a/b/c/d",
+ "test/a/bc",
+ "test/a/bc/e",
+ "test/a/bc/e/f",
+ "test/a/c",
+ "test/a/c/d",
+ "test/a/c/d/c",
+ "test/a/c/d/c/b",
+ "test/a/cb",
+ "test/a/cb/e",
+ "test/a/cb/e/f"
+ ]
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/cwd-test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/cwd-test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/cwd-test.js
new file mode 100644
index 0000000..352c27e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/cwd-test.js
@@ -0,0 +1,55 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing cwd and searching for **/d", function (t) {
+ var glob = require('../')
+ var path = require('path')
+ t.test('.', function (t) {
+ glob('**/d', function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a', function (t) {
+ glob('**/d', {cwd:path.resolve('a')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'b/c/d', 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a/b', function (t) {
+ glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('a/b/', function (t) {
+ glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('.', function (t) {
+ glob('**/d', {cwd: process.cwd()}, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ 'a/b/c/d', 'a/c/d' ])
+ t.end()
+ })
+ })
+
+ t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+ })
+
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/globstar-match.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/globstar-match.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/globstar-match.js
new file mode 100644
index 0000000..9b234fa
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/globstar-match.js
@@ -0,0 +1,19 @@
+var Glob = require("../glob.js").Glob
+var test = require('tap').test
+
+test('globstar should not have dupe matches', function(t) {
+ var pattern = 'a/**/[gh]'
+ var g = new Glob(pattern, { cwd: __dirname })
+ var matches = []
+ g.on('match', function(m) {
+ console.error('match %j', m)
+ matches.push(m)
+ })
+ g.on('end', function(set) {
+ console.error('set', set)
+ matches = matches.sort()
+ set = set.sort()
+ t.same(matches, set, 'should have same set of matches')
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/mark.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/mark.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/mark.js
new file mode 100644
index 0000000..ed68a33
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/mark.js
@@ -0,0 +1,74 @@
+var test = require("tap").test
+var glob = require('../')
+process.chdir(__dirname)
+
+test("mark, no / on pattern", function (t) {
+ glob("a/*", {mark: true}, function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=false, no / on pattern", function (t) {
+ glob("a/*", function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef',
+ 'a/abcfed',
+ 'a/b',
+ 'a/bc',
+ 'a/c',
+ 'a/cb' ]
+
+ if (process.platform !== "win32")
+ expect.push('a/symlink')
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=true, / on pattern", function (t) {
+ glob("a/*/", {mark: true}, function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+ t.same(results, expect)
+ t.end()
+ })
+})
+
+test("mark=false, / on pattern", function (t) {
+ glob("a/*/", function (er, results) {
+ if (er)
+ throw er
+ var expect = [ 'a/abcdef/',
+ 'a/abcfed/',
+ 'a/b/',
+ 'a/bc/',
+ 'a/c/',
+ 'a/cb/' ]
+ if (process.platform !== "win32")
+ expect.push('a/symlink/')
+ t.same(results, expect)
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/nocase-nomagic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/nocase-nomagic.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/nocase-nomagic.js
new file mode 100644
index 0000000..d862970
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/nocase-nomagic.js
@@ -0,0 +1,113 @@
+var fs = require('graceful-fs');
+var test = require('tap').test;
+var glob = require('../');
+
+test('mock fs', function(t) {
+ var stat = fs.stat
+ var statSync = fs.statSync
+ var readdir = fs.readdir
+ var readdirSync = fs.readdirSync
+
+ function fakeStat(path) {
+ var ret
+ switch (path.toLowerCase()) {
+ case '/tmp': case '/tmp/':
+ ret = { isDirectory: function() { return true } }
+ break
+ case '/tmp/a':
+ ret = { isDirectory: function() { return false } }
+ break
+ }
+ return ret
+ }
+
+ fs.stat = function(path, cb) {
+ var f = fakeStat(path);
+ if (f) {
+ process.nextTick(function() {
+ cb(null, f)
+ })
+ } else {
+ stat.call(fs, path, cb)
+ }
+ }
+
+ fs.statSync = function(path) {
+ return fakeStat(path) || statSync.call(fs, path)
+ }
+
+ function fakeReaddir(path) {
+ var ret
+ switch (path.toLowerCase()) {
+ case '/tmp': case '/tmp/':
+ ret = [ 'a', 'A' ]
+ break
+ case '/':
+ ret = ['tmp', 'tMp', 'tMP', 'TMP']
+ }
+ return ret
+ }
+
+ fs.readdir = function(path, cb) {
+ var f = fakeReaddir(path)
+ if (f)
+ process.nextTick(function() {
+ cb(null, f)
+ })
+ else
+ readdir.call(fs, path, cb)
+ }
+
+ fs.readdirSync = function(path) {
+ return fakeReaddir(path) || readdirSync.call(fs, path)
+ }
+
+ t.pass('mocked')
+ t.end()
+})
+
+test('nocase, nomagic', function(t) {
+ var n = 2
+ var want = [ '/TMP/A',
+ '/TMP/a',
+ '/tMP/A',
+ '/tMP/a',
+ '/tMp/A',
+ '/tMp/a',
+ '/tmp/A',
+ '/tmp/a' ]
+ glob('/tmp/a', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ if (--n === 0) t.end()
+ })
+ glob('/tmp/A', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ if (--n === 0) t.end()
+ })
+})
+
+test('nocase, with some magic', function(t) {
+ t.plan(2)
+ var want = [ '/TMP/A',
+ '/TMP/a',
+ '/tMP/A',
+ '/tMP/a',
+ '/tMp/A',
+ '/tMp/a',
+ '/tmp/A',
+ '/tmp/a' ]
+ glob('/tmp/*', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ })
+ glob('/tmp/*', { nocase: true }, function(er, res) {
+ if (er)
+ throw er
+ t.same(res.sort(), want)
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/pause-resume.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/pause-resume.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/pause-resume.js
new file mode 100644
index 0000000..e1ffbab
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/pause-resume.js
@@ -0,0 +1,73 @@
+// show that no match events happen while paused.
+var tap = require("tap")
+, child_process = require("child_process")
+// just some gnarly pattern with lots of matches
+, pattern = "test/a/!(symlink)/**"
+, bashResults = require("./bash-results.json")
+, patterns = Object.keys(bashResults)
+, glob = require("../")
+, Glob = glob.Glob
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+ a = a.toLowerCase()
+ b = b.toLowerCase()
+ return a > b ? 1 : a < b ? -1 : 0
+}
+
+function cleanResults (m) {
+ // normalize discrepancies in ordering, duplication,
+ // and ending slashes.
+ return m.map(function (m) {
+ return m.replace(/\/+/g, "/").replace(/\/$/, "")
+ }).sort(alphasort).reduce(function (set, f) {
+ if (f !== set[set.length - 1]) set.push(f)
+ return set
+ }, []).sort(alphasort).map(function (f) {
+ // de-windows
+ return (process.platform !== 'win32') ? f
+ : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
+ })
+}
+
+var globResults = []
+tap.test("use a Glob object, and pause/resume it", function (t) {
+ var g = new Glob(pattern)
+ , paused = false
+ , res = []
+ , expect = bashResults[pattern]
+
+ g.on("pause", function () {
+ console.error("pause")
+ })
+
+ g.on("resume", function () {
+ console.error("resume")
+ })
+
+ g.on("match", function (m) {
+ t.notOk(g.paused, "must not be paused")
+ globResults.push(m)
+ g.pause()
+ t.ok(g.paused, "must be paused")
+ setTimeout(g.resume.bind(g), 10)
+ })
+
+ g.on("end", function (matches) {
+ t.pass("reached glob end")
+ globResults = cleanResults(globResults)
+ matches = cleanResults(matches)
+ t.deepEqual(matches, globResults,
+ "end event matches should be the same as match events")
+
+ t.deepEqual(matches, expect,
+ "glob matches should be the same as bash results")
+
+ t.end()
+ })
+})
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/root-nomount.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/root-nomount.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/root-nomount.js
new file mode 100644
index 0000000..3ac5979
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/root-nomount.js
@@ -0,0 +1,39 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing root and searching for /b*/**", function (t) {
+ var glob = require('../')
+ var path = require('path')
+ t.test('.', function (t) {
+ glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [])
+ t.end()
+ })
+ })
+
+ t.test('a', function (t) {
+ glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+ t.end()
+ })
+ })
+
+ t.test('root=a, cwd=a/b', function (t) {
+ glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+ t.end()
+ })
+ })
+
+ t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+ })
+
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/root.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/root.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/root.js
new file mode 100644
index 0000000..95c23f9
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/root.js
@@ -0,0 +1,46 @@
+var t = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+var glob = require('../')
+var path = require('path')
+
+t.test('.', function (t) {
+ glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [])
+ t.end()
+ })
+})
+
+
+t.test('a', function (t) {
+ console.error("root=" + path.resolve('a'))
+ glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) {
+ t.ifError(er)
+ var wanted = [
+ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f'
+ ].map(function (m) {
+ return path.join(path.resolve('a'), m).replace(/\\/g, '/')
+ })
+
+ t.like(matches, wanted)
+ t.end()
+ })
+})
+
+t.test('root=a, cwd=a/b', function (t) {
+ glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
+ t.ifError(er)
+ t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
+ return path.join(path.resolve('a'), m).replace(/\\/g, '/')
+ }))
+ t.end()
+ })
+})
+
+t.test('cd -', function (t) {
+ process.chdir(origCwd)
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/stat.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/stat.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/stat.js
new file mode 100644
index 0000000..6291711
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/stat.js
@@ -0,0 +1,32 @@
+var glob = require('../')
+var test = require('tap').test
+var path = require('path')
+
+test('stat all the things', function(t) {
+ var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname })
+ var matches = []
+ g.on('match', function(m) {
+ matches.push(m)
+ })
+ var stats = []
+ g.on('stat', function(m) {
+ stats.push(m)
+ })
+ g.on('end', function(eof) {
+ stats = stats.sort()
+ matches = matches.sort()
+ eof = eof.sort()
+ t.same(stats, matches)
+ t.same(eof, matches)
+ var cache = Object.keys(this.statCache)
+ t.same(cache.map(function (f) {
+ return path.relative(__dirname, f)
+ }).sort(), matches)
+
+ cache.forEach(function(c) {
+ t.equal(typeof this.statCache[c], 'object')
+ }, this)
+
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/zz-cleanup.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/zz-cleanup.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/zz-cleanup.js
new file mode 100644
index 0000000..e085f0f
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/node_modules/glob/test/zz-cleanup.js
@@ -0,0 +1,11 @@
+// remove the fixtures
+var tap = require("tap")
+, rimraf = require("rimraf")
+, path = require("path")
+
+tap.test("cleanup fixtures", function (t) {
+ rimraf(path.resolve(__dirname, "a"), function (er) {
+ t.ifError(er, "removed")
+ t.end()
+ })
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/package.json b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/package.json
new file mode 100644
index 0000000..31092ef
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/package.json
@@ -0,0 +1,34 @@
+{
+ "author": {
+ "name": "mklabs"
+ },
+ "name": "fileset",
+ "description": "Wrapper around miniglob / minimatch combo to allow multiple patterns matching and include-exclude ability",
+ "version": "0.1.5",
+ "homepage": "https://github.com/mklabs/node-fileset",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/mklabs/node-fileset.git"
+ },
+ "main": "./lib/fileset",
+ "scripts": {
+ "test": "node tests/test.js"
+ },
+ "dependencies": {
+ "minimatch": "0.x",
+ "glob": "3.x"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/mklabs/node-fileset/blob/master/LICENSE-MIT"
+ }
+ ],
+ "readme": "# node-fileset\n\nExposes a basic wrapper on top of\n[Glob](https://github.com/isaacs/node-glob) /\n[minimatch](https://github.com/isaacs/minimatch) combo both written by\n@isaacs. Glob now uses JavaScript instead of C++ bindings which makes it\nusable in Node.js 0.6.x and Windows platforms.\n\n[](http://travis-ci.org/mklabs/node-fileset)\n\nAdds multiples patterns matching and exlude ability. This is\nbasically just a sugar API syntax where you can specify a list of includes\nand optional exclude patterns. It works by setting up the necessary\nminiglob \"fileset\" and filtering out the results using minimatch.\n\n## Install\n\n npm install fileset\n\n## Usage\n\nCan be used with callback or emitter style.\n\n* **include**: list of glob patterns `foo/**/*.js *.md src/lib/**/*`\n* **exclude**: *optional* list of glob patterns to filter include\n results `foo/**/*.js *.md`\n* **callback**: *optional*
function that gets called with an error if\n something wrong happend, otherwise null with an array of results\n\nThe callback is optional since the fileset method return an instance of\nEventEmitter which emit different events you might use:\n\n* *match*: Every time a match is found, miniglob emits this event with\n the pattern.\n* *include*: Emitted each time an include match is found.\n* *exclude*: Emitted each time an exclude match is found and filtered\n out from the fileset.\n* *end*: Emitted when the matching is finished with all the matches\n found, optionally filtered by the exclude patterns.\n\n#### Callback\n\n```js\nvar fileset = require('fileset');\n\nfileset('**/*.js', '**.min.js', function(err, files) {\n if (err) return console.error(err);\n\n console.log('Files: ', files.length);\n console.log(files);\n});\n```\n\n#### Event emitter\n\n```js\nvar fileset = require('fileset');\n\nfileset('**.coffee README.md *.json Cakefile **.js', 'node_modules/**')\n .on(
'match', console.log.bind(console, 'error'))\n .on('include', console.log.bind(console, 'includes'))\n .on('exclude', console.log.bind(console, 'excludes'))\n .on('end', console.log.bind(console, 'end'));\n```\n\n`fileset` returns an instance of EventEmitter, with an `includes` property\nwhich is the array of Fileset objects (inheriting from\n`miniglob.Miniglob`) that were used during the mathing process, should\nyou want to use them individually.\n\nCheck out the\n[tests](https://github.com/mklabs/node-fileset/tree/master/tests) for\nmore examples.\n\n## Tests\n\nRun `npm test`\n\n## Why\n\nMainly for a build tool with cake files, to provide me an easy way to get\na list of files by either using glob or path patterns, optionally\nallowing exclude patterns to filter out the results.\n\nAll the magic is happening in\n[Glob](https://github.com/isaacs/node-glob) and\n[minimatch](https://github.com/isaacs/minimatch). Check them out!\n",
+ "readmeFilename": "README.md",
+ "bugs": {
+ "url": "https://github.com/mklabs/node-fileset/issues"
+ },
+ "_id": "fileset@0.1.5",
+ "_from": "fileset@~0.1.5"
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/fixtures/an (odd) filename.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/fixtures/an (odd) filename.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/fixtures/an (odd) filename.js
new file mode 100644
index 0000000..fbf9f2b
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/fixtures/an (odd) filename.js
@@ -0,0 +1 @@
+var odd = true;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/helper.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/helper.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/helper.js
new file mode 100644
index 0000000..d76735e
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/helper.js
@@ -0,0 +1,61 @@
+
+var EventEmitter = require('events').EventEmitter,
+ assert = require('assert'),
+ tests = {};
+
+module.exports = test;
+test.run = run;
+
+// ## Test helpers
+
+function test(msg, handler) {
+ tests[msg] = handler;
+}
+
+function run() {
+ var specs = Object.keys(tests),
+ specsRemaining = specs.length;
+
+ specs.forEach(function(spec) {
+ var handler = tests[spec];
+
+ // grab the set of asserts for this spec
+ var shoulds = handler(),
+ keys = Object.keys(shoulds),
+ remaining = keys.length;
+
+ keys.forEach(function(should) {
+ var em = new EventEmitter(),
+ to = setTimeout(function() {
+ assert.fail('never ended');
+ }, 5000);
+
+ em
+ .on('error', function assertFail(err) { assert.fail(err) })
+ .on('end', function assertOk() {
+ clearTimeout(to);
+ shoulds[should].status = true;
+
+ // till we get to 0
+ if(!(--remaining)) {
+ console.log([
+ '',
+ '» ' + spec,
+ keys.map(function(k) { return ' » ' + k; }).join('\n'),
+ '',
+ ' Total: ' + keys.length,
+ ' Failed: ' + keys.map(function(item) { return shoulds[should].status; }).filter(function(status) { return !status; }).length,
+ ''
+ ].join('\n'));
+
+ if(!(--specsRemaining)) {
+ console.log('All done');
+ }
+
+ }
+ });
+
+ shoulds[should](em);
+ });
+ });
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/test.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/test.js b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/test.js
new file mode 100644
index 0000000..cb0ceb1
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/fileset/tests/test.js
@@ -0,0 +1,133 @@
+
+var EventEmitter = require('events').EventEmitter,
+ fileset = require('../'),
+ assert = require('assert'),
+ test = require('./helper');
+
+// Given a **.coffee pattern
+test('Given a **.md pattern', function() {
+
+ return {
+ 'should return the list of matching file in this repo': function(em) {
+ fileset('*.md', function(err, results) {
+ if(err) return em.emit('error', err);
+ assert.ok(Array.isArray(results), 'should be an array');
+ assert.ok(results.length, 'should return at least one element');
+ assert.equal(results.length, 1, 'actually, should return only one');
+ em.emit('end');
+ });
+ }
+ }
+});
+
+test('Say we want the **.js files, but not those in node_modules', function() {
+
+ return {
+ 'Should recursively walk the dir and return the matching list': function(em) {
+ fileset('**/*.js', 'node_modules/**', function(err, results) {
+ if(err) return em.emit('error', err);
+ assert.ok(Array.isArray(results), 'should be an array');
+ assert.equal(results.length, 4);
+ em.emit('end');
+ });
+ },
+
+ 'Should support multiple paths at once': function(em) {
+ fileset('**/*.js *.md', 'node_modules/**', function(err, results) {
+ if(err) return em.emit('error', err);
+ assert.ok(Array.isArray(results), 'should be an array');
+ assert.equal(results.length, 5);
+
+ assert.deepEqual(results, [
+ 'README.md',
+ 'lib/fileset.js',
+ 'tests/fixtures/an (odd) filename.js',
+ 'tests/helper.js',
+ 'tests/test.js'
+ ]);
+
+ em.emit('end');
+ });
+ },
+
+ 'Should support multiple paths for excludes as well': function(em) {
+ fileset('**/*.js *.md', 'node_modules/** **.md tests/*.js', function(err, results) {
+ if(err) return em.emit('error', err);
+ assert.ok(Array.isArray(results), 'should be an array');
+ assert.equal(results.length, 2);
+
+ assert.deepEqual(results, [
+ 'lib/fileset.js',
+ 'tests/fixtures/an (odd) filename.js',
+ ]);
+
+ em.emit('end');
+ });
+ }
+ }
+});
+
+
+test('Testing out emmited events', function() {
+
+ // todos: the tests for match, include, exclude events, but seems like it's ok
+ return {
+ 'Should recursively walk the dir and return the matching list': function(em) {
+ fileset('**/*.js', 'node_modules/**')
+ .on('error', em.emit.bind(em, 'error'))
+ .on('end', function(results) {
+ assert.ok(Array.isArray(results), 'should be an array');
+ assert.equal(results.length, 4);
+ em.emit('end');
+ });
+ },
+
+ 'Should support multiple paths at once': function(em) {
+ fileset('**/*.js *.md', 'node_modules/**')
+ .on('error', em.emit.bind(em, 'error'))
+ .on('end', function(results) {
+ assert.ok(Array.isArray(results), 'should be an array');
+ assert.equal(results.length, 5);
+
+ assert.deepEqual(results, [
+ 'README.md',
+ 'lib/fileset.js',
+ 'tests/fixtures/an (odd) filename.js',
+ 'tests/helper.js',
+ 'tests/test.js'
+ ]);
+
+ em.emit('end');
+ });
+ }
+ }
+});
+
+
+test('Testing patterns passed as arrays', function() {
+
+ return {
+ 'Should match files passed as an array with odd filenames': function(em) {
+ fileset(['lib/*.js', 'tests/fixtures/an (odd) filename.js'], ['node_modules/**'])
+ .on('error', em.emit.bind(em, 'error'))
+ .on('end', function(results) {
+ assert.ok(Array.isArray(results), 'should be an array');
+ assert.equal(results.length, 2);
+
+ assert.deepEqual(results, [
+ 'lib/fileset.js',
+ 'tests/fixtures/an (odd) filename.js',
+ ]);
+
+ em.emit('end');
+ });
+ }
+ }
+
+});
+
+
+
+test.run();
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/LICENSE b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+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.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/README.md b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/README.md
new file mode 100644
index 0000000..6fd07d2
--- /dev/null
+++ b/blackberry10/node_modules/jasmine-node/node_modules/gaze/node_modules/minimatch/README.md
@@ -0,0 +1,218 @@
+# minimatch
+
+A minimal matching utility.
+
+[](http://travis-ci.org/isaacs/minimatch)
+
+
+This is the matching library used internally by npm.
+
+Eventually, it will replace the C binding in node-glob.
+
+It works by converting glob expressions into JavaScript `RegExp`
+objects.
+
+## Usage
+
+```javascript
+var minimatch = require("minimatch")
+
+minimatch("bar.foo", "*.foo") // true!
+minimatch("bar.foo", "*.bar") // false!
+```
+
+## Features
+
+Supports these glob features:
+
+* Brace Expansion
+* Extended glob matching
+* "Globstar" `**` matching
+
+See:
+
+* `man sh`
+* `man bash`
+* `man 3 fnmatch`
+* `man 5 gitignore`
+
+### Comparisons to other fnmatch/glob implementations
+
+While strict compliance with the existing standards is a worthwhile
+goal, some discrepancies exist between minimatch and other
+implementations, and are intentional.
+
+If the pattern starts with a `!` character, then it is negated. Set the
+`nonegate` flag to suppress this behavior, and treat leading `!`
+characters normally. This is perhaps relevant if you wish to start the
+pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`
+characters at the start of a pattern will negate the pattern multiple
+times.
+
+If a pattern starts with `#`, then it is treated as a comment, and
+will not match anything. Use `\#` to match a literal `#` at the
+start of a line, or set the `nocomment` flag to suppress this behavior.
+
+The double-star character `**` is supported by default, unless the
+`noglobstar` flag is set. This is supported in the manner of bsdglob
+and bash 4.1, where `**` only has special significance if it is the only
+thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
+`a/**b` will not. **Note that this is different from the way that `**` is
+handled by ruby's `Dir` class.**
+
+If an escaped pattern has no matches, and the `nonull` flag is set,
+then minimatch.match returns the pattern as-provided, rather than
+interpreting the character escapes. For example,
+`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
+`"*a?"`. This is akin to setting the `nullglob` option in bash, except
+that it does not resolve escaped pattern characters.
+
+If brace expansion is not disabled, then it is performed before any
+other interpretation of the glob pattern. Thus, a pattern like
+`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
+**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
+checked for validity. Since those two are valid, matching proceeds.
+
+
+## Minimatch Class
+
+Create a minimatch object by instanting the `minimatch.Minimatch` class.
+
+```javascript
+var Minimatch = require("minimatch").Minimatch
+var mm = new Minimatch(pattern, options)
+```
+
+### Properties
+
+* `pattern` The original pattern the minimatch object represents.
+* `options` The options supplied to the constructor.
+* `set` A 2-dimensional array of regexp or string expressions.
+ Each row in the
+ array corresponds to a brace-expanded pattern. Each item in the row
+ corresponds to a single path-part. For example, the pattern
+ `{a,b/c}/d` would expand to a set of patterns like:
+
+ [ [ a, d ]
+ , [ b, c, d ] ]
+
+ If a portion of the pattern doesn't have any "magic" in it
+ (that is, it's something like `"foo"` rather than `fo*o?`), then it
+ will be left as a string rather than converted to a regular
+ expression.
+
+* `regexp` Created by the `makeRe` method. A single regular expression
+ expressing the entire pattern. This is useful in cases where you wish
+ to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.
+* `negate` True if the pattern is negated.
+* `comment` True if the pattern is a comment.
+* `empty` True if the pattern is `""`.
+
+### Methods
+
+* `makeRe` Generate the `regexp` member if necessary, and return it.
+ Will return `false` if the pattern is invalid.
+* `match(fname)` Return true if the filename matches the pattern, or
+ false otherwise.
+* `matchOne(fileArray, patternArray, partial)` Take a `/`-split
+ filename, and match it against a single row in the `regExpSet`. This
+ method is mainly for internal use, but is exposed so that it can be
+ used by a glob-walker that needs to avoid excessive filesystem calls.
+
+All other methods are internal, and will be called as necessary.
+
+## Functions
+
+The top-level exported function has a `cache` property, which is an LRU
+cache set to store 100 items. So, calling these methods repeatedly
+with the same pattern and options will use the same Minimatch object,
+saving the cost of parsing it multiple times.
+
+### minimatch(path, pattern, options)
+
+Main export. Tests a path against the pattern using the options.
+
+```javascript
+var isJS = minimatch(file, "*.js", { matchBase: true })
+```
+
+### minimatch.filter(pattern, options)
+
+Returns a function that tests its
+supplied argument, suitable for use with `Array.filter`. Example:
+
+```javascript
+var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true}))
+```
+
+### minimatch.match(list, pattern, options)
+
+Match against the list of
+files, in the style of fnmatch or glob. If nothing is matched, and
+options.nonull is set, then return a list containing the pattern itself.
+
+```javascript
+var javascripts = minimatch.match(fileList, "*.js", {matchBase: true}))
+```
+
+### minimatch.makeRe(pattern, options)
+
+Make a regular expression object from the pattern.
+
+## Options
+
+All options are `false` by default.
+
+### debug
+
+Dump a ton of stuff to stderr.
+
+### nobrace
+
+Do not expand `{a,b}` and `{1..3}` brace sets.
+
+### noglobstar
+
+Disable `**` matching against multiple folder names.
+
+### dot
+
+Allow patterns to match filenames starting with a period, even if
+the pattern does not explicitly have a period in that spot.
+
+Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`
+is set.
+
+### noext
+
+Disable "extglob" style patterns like `+(a|b)`.
+
+### nocase
+
+Perform a case-insensitive match.
+
+### nonull
+
+When a match is not found by `minimatch.match`, return a list containing
+the pattern itself. When set, an empty list is returned if there are
+no matches.
+
+### matchBase
+
+If set, then patterns without slashes will be matched
+against the basename of the path if it contains slashes. For example,
+`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.
+
+### nocomment
+
+Suppress the behavior of treating `#` at the start of a pattern as a
+comment.
+
+### nonegate
+
+Suppress the behavior of treating a leading `!` character as negation.
+
+### flipNegate
+
+Returns from negate expressions the same as if they were not negated.
+(Ie, true on a hit, false on a miss.)
[36/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/test/basic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/test/basic.js b/blackberry10/node_modules/jake/node_modules/minimatch/test/basic.js
new file mode 100644
index 0000000..ae7ac73
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/test/basic.js
@@ -0,0 +1,399 @@
+// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
+//
+// TODO: Some of these tests do very bad things with backslashes, and will
+// most likely fail badly on windows. They should probably be skipped.
+
+var tap = require("tap")
+ , globalBefore = Object.keys(global)
+ , mm = require("../")
+ , files = [ "a", "b", "c", "d", "abc"
+ , "abd", "abe", "bb", "bcd"
+ , "ca", "cb", "dd", "de"
+ , "bdir/", "bdir/cfile"]
+ , next = files.concat([ "a-b", "aXb"
+ , ".x", ".y" ])
+
+
+var patterns =
+ [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test"
+ , ["a*", ["a", "abc", "abd", "abe"]]
+ , ["X*", ["X*"], {nonull: true}]
+
+ // allow null glob expansion
+ , ["X*", []]
+
+ // isaacs: Slightly different than bash/sh/ksh
+ // \\* is not un-escaped to literal "*" in a failed match,
+ // but it does make it get treated as a literal star
+ , ["\\*", ["\\*"], {nonull: true}]
+ , ["\\**", ["\\**"], {nonull: true}]
+ , ["\\*\\*", ["\\*\\*"], {nonull: true}]
+
+ , ["b*/", ["bdir/"]]
+ , ["c*", ["c", "ca", "cb"]]
+ , ["**", files]
+
+ , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
+ , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
+
+ , "legendary larry crashes bashes"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
+
+ , "character classes"
+ , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
+ , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
+ "bdir/", "ca", "cb", "dd", "de"]]
+ , ["a*[^c]", ["abd", "abe"]]
+ , function () { files.push("a-b", "aXb") }
+ , ["a[X-]b", ["a-b", "aXb"]]
+ , function () { files.push(".x", ".y") }
+ , ["[^a-c]*", ["d", "dd", "de"]]
+ , function () { files.push("a*b/", "a*b/ooo") }
+ , ["a\\*b/*", ["a*b/ooo"]]
+ , ["a\\*?/*", ["a*b/ooo"]]
+ , ["*\\\\!*", [], {null: true}, ["echo !7"]]
+ , ["*\\!*", ["echo !7"], null, ["echo !7"]]
+ , ["*.\\*", ["r.*"], null, ["r.*"]]
+ , ["a[b]c", ["abc"]]
+ , ["a[\\b]c", ["abc"]]
+ , ["a?c", ["abc"]]
+ , ["a\\*c", [], {null: true}, ["abc"]]
+ , ["", [""], { null: true }, [""]]
+
+ , "http://www.opensource.apple.com/source/bash/bash-23/" +
+ "bash/tests/glob-test"
+ , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
+ , ["*/man*/bash.*", ["man/man1/bash.1"]]
+ , ["man/man1/bash.1", ["man/man1/bash.1"]]
+ , ["a***c", ["abc"], null, ["abc"]]
+ , ["a*****?c", ["abc"], null, ["abc"]]
+ , ["?*****??", ["abc"], null, ["abc"]]
+ , ["*****??", ["abc"], null, ["abc"]]
+ , ["?*****?c", ["abc"], null, ["abc"]]
+ , ["?***?****c", ["abc"], null, ["abc"]]
+ , ["?***?****?", ["abc"], null, ["abc"]]
+ , ["?***?****", ["abc"], null, ["abc"]]
+ , ["*******c", ["abc"], null, ["abc"]]
+ , ["*******?", ["abc"], null, ["abc"]]
+ , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["[-abc]", ["-"], null, ["-"]]
+ , ["[abc-]", ["-"], null, ["-"]]
+ , ["\\", ["\\"], null, ["\\"]]
+ , ["[\\\\]", ["\\"], null, ["\\"]]
+ , ["[[]", ["["], null, ["["]]
+ , ["[", ["["], null, ["["]]
+ , ["[*", ["[abc"], null, ["[abc"]]
+ , "a right bracket shall lose its special meaning and\n" +
+ "represent itself in a bracket expression if it occurs\n" +
+ "first in the list. -- POSIX.2 2.8.3.2"
+ , ["[]]", ["]"], null, ["]"]]
+ , ["[]-]", ["]"], null, ["]"]]
+ , ["[a-\z]", ["p"], null, ["p"]]
+ , ["??**********?****?", [], { null: true }, ["abc"]]
+ , ["??**********?****c", [], { null: true }, ["abc"]]
+ , ["?************c****?****", [], { null: true }, ["abc"]]
+ , ["*c*?**", [], { null: true }, ["abc"]]
+ , ["a*****c*?**", [], { null: true }, ["abc"]]
+ , ["a********???*******", [], { null: true }, ["abc"]]
+ , ["[]", [], { null: true }, ["a"]]
+ , ["[abc", [], { null: true }, ["["]]
+
+ , "nocase tests"
+ , ["XYZ", ["xYz"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["ab*", ["ABC"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ , "onestar/twostar"
+ , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
+ , ["{/?,*}", ["/a", "bb"], {null: true}
+ , ["/a", "/b/b", "/a/b/c", "bb"]]
+
+ , "dots should not match unless requested"
+ , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
+
+ // .. and . can only match patterns starting with .,
+ // even when options.dot is set.
+ , function () {
+ files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
+ }
+ , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
+ , ["a/*/b", ["a/c/b"], {dot:false}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
+
+
+ // this also tests that changing the options needs
+ // to change the cache key, even if the pattern is
+ // the same!
+ , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
+ , [ ".a/.d", "a/.d", "a/b"]]
+
+ , "paren sets cannot contain slashes"
+ , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
+
+ // brace sets trump all else.
+ //
+ // invalid glob pattern. fails on bash4 and bsdglob.
+ // however, in this implementation, it's easier just
+ // to do the intuitive thing, and let brace-expansion
+ // actually come before parsing any extglob patterns,
+ // like the documentation seems to say.
+ //
+ // XXX: if anyone complains about this, either fix it
+ // or tell them to grow up and stop complaining.
+ //
+ // bash/bsdglob says this:
+ // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
+ // but we do this instead:
+ , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
+
+ // test partial parsing in the presence of comment/negation chars
+ , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
+ , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
+
+ // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
+ , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
+ , {}
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
+
+
+ // crazy nested {,,} and *(||) tests.
+ , function () {
+ files = [ "a", "b", "c", "d"
+ , "ab", "ac", "ad"
+ , "bc", "cb"
+ , "bc,d", "c,db", "c,d"
+ , "d)", "(b|c", "*(b|c"
+ , "b|c", "b|cc", "cb|c"
+ , "x(a|b|c)", "x(a|c)"
+ , "(a|b|c)", "(a|c)"]
+ }
+ , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
+ , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
+ // a
+ // *(b|c)
+ // *(b|d)
+ , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
+ , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
+
+
+ // test various flag settings.
+ , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
+ , { noext: true } ]
+ , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
+ , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
+ , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
+
+
+ // begin channelling Boole and deMorgan...
+ , "negation tests"
+ , function () {
+ files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
+ }
+
+ // anything that is NOT a* matches.
+ , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
+
+ // anything that IS !a* matches.
+ , ["!a*", ["!ab", "!abc"], {nonegate: true}]
+
+ // anything that IS a* matches
+ , ["!!a*", ["a!b"]]
+
+ // anything that is NOT !a* matches
+ , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
+
+ // negation nestled within a pattern
+ , function () {
+ files = [ "foo.js"
+ , "foo.bar"
+ // can't match this one without negative lookbehind.
+ , "foo.js.js"
+ , "blar.js"
+ , "foo."
+ , "boo.js.boo" ]
+ }
+ , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
+
+ // https://github.com/isaacs/minimatch/issues/5
+ , function () {
+ files = [ 'a/b/.x/c'
+ , 'a/b/.x/c/d'
+ , 'a/b/.x/c/d/e'
+ , 'a/b/.x'
+ , 'a/b/.x/'
+ , 'a/.x/b'
+ , '.x'
+ , '.x/'
+ , '.x/a'
+ , '.x/a/b'
+ , 'a/.x/b/.x/c'
+ , '.x/.x' ]
+ }
+ , ["**/.x/**", [ '.x/'
+ , '.x/a'
+ , '.x/a/b'
+ , 'a/.x/b'
+ , 'a/b/.x/'
+ , 'a/b/.x/c'
+ , 'a/b/.x/c/d'
+ , 'a/b/.x/c/d/e' ] ]
+
+ ]
+
+var regexps =
+ [ '/^(?:(?=.)a[^/]*?)$/',
+ '/^(?:(?=.)X[^/]*?)$/',
+ '/^(?:(?=.)X[^/]*?)$/',
+ '/^(?:\\*)$/',
+ '/^(?:(?=.)\\*[^/]*?)$/',
+ '/^(?:\\*\\*)$/',
+ '/^(?:(?=.)b[^/]*?\\/)$/',
+ '/^(?:(?=.)c[^/]*?)$/',
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/',
+ '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/',
+ '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/',
+ '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/',
+ '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/',
+ '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/',
+ '/^(?:(?=.)a[^/]*?[^c])$/',
+ '/^(?:(?=.)a[X-]b)$/',
+ '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/',
+ '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/',
+ '/^(?:(?=.)a[b]c)$/',
+ '/^(?:(?=.)a[b]c)$/',
+ '/^(?:(?=.)a[^/]c)$/',
+ '/^(?:a\\*c)$/',
+ 'false',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/',
+ '/^(?:man\\/man1\\/bash\\.1)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
+ '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[-abc])$/',
+ '/^(?:(?!\\.)(?=.)[abc-])$/',
+ '/^(?:\\\\)$/',
+ '/^(?:(?!\\.)(?=.)[\\\\])$/',
+ '/^(?:(?!\\.)(?=.)[\\[])$/',
+ '/^(?:\\[)$/',
+ '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[\\]])$/',
+ '/^(?:(?!\\.)(?=.)[\\]-])$/',
+ '/^(?:(?!\\.)(?=.)[a-z])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/',
+ '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/',
+ '/^(?:\\[\\])$/',
+ '/^(?:\\[abc)$/',
+ '/^(?:(?=.)XYZ)$/i',
+ '/^(?:(?=.)ab[^/]*?)$/i',
+ '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i',
+ '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/',
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/',
+ '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/',
+ '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/',
+ '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/',
+ '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/',
+ '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/',
+ '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/',
+ '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/',
+ '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/',
+ '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/',
+ '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/',
+ '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/',
+ '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/',
+ '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/',
+ '/^(?:(?=.)a[^/]b)$/',
+ '/^(?:(?=.)#[^/]*?)$/',
+ '/^(?!^(?:(?=.)a[^/]*?)$).*$/',
+ '/^(?:(?=.)\\!a[^/]*?)$/',
+ '/^(?:(?=.)a[^/]*?)$/',
+ '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/',
+ '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/',
+ '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ]
+var re = 0;
+
+tap.test("basic tests", function (t) {
+ var start = Date.now()
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ patterns.forEach(function (c) {
+ if (typeof c === "function") return c()
+ if (typeof c === "string") return t.comment(c)
+
+ var pattern = c[0]
+ , expect = c[1].sort(alpha)
+ , options = c[2] || {}
+ , f = c[3] || files
+ , tapOpts = c[4] || {}
+
+ // options.debug = true
+ var m = new mm.Minimatch(pattern, options)
+ var r = m.makeRe()
+ var expectRe = regexps[re++]
+ tapOpts.re = String(r) || JSON.stringify(r)
+ tapOpts.files = JSON.stringify(f)
+ tapOpts.pattern = pattern
+ tapOpts.set = m.set
+ tapOpts.negated = m.negate
+
+ var actual = mm.match(f, pattern, options)
+ actual.sort(alpha)
+
+ t.equivalent( actual, expect
+ , JSON.stringify(pattern) + " " + JSON.stringify(expect)
+ , tapOpts )
+
+ t.equal(tapOpts.re, expectRe, tapOpts)
+ })
+
+ t.comment("time=" + (Date.now() - start) + "ms")
+ t.end()
+})
+
+tap.test("global leak test", function (t) {
+ var globalAfter = Object.keys(global)
+ t.equivalent(globalAfter, globalBefore, "no new globals, please")
+ t.end()
+})
+
+function alpha (a, b) {
+ return a > b ? 1 : -1
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/test/brace-expand.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/test/brace-expand.js b/blackberry10/node_modules/jake/node_modules/minimatch/test/brace-expand.js
new file mode 100644
index 0000000..7ee278a
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/test/brace-expand.js
@@ -0,0 +1,33 @@
+var tap = require("tap")
+ , minimatch = require("../")
+
+tap.test("brace expansion", function (t) {
+ // [ pattern, [expanded] ]
+ ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}"
+ , [ "abxy"
+ , "abxz"
+ , "acdxy"
+ , "acdxz"
+ , "acexy"
+ , "acexz"
+ , "afhxy"
+ , "afhxz"
+ , "aghxy"
+ , "aghxz" ] ]
+ , [ "a{1..5}b"
+ , [ "a1b"
+ , "a2b"
+ , "a3b"
+ , "a4b"
+ , "a5b" ] ]
+ , [ "a{b}c", ["a{b}c"] ]
+ ].forEach(function (tc) {
+ var p = tc[0]
+ , expect = tc[1]
+ t.equivalent(minimatch.braceExpand(p), expect, p)
+ })
+ console.error("ending")
+ t.end()
+})
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/test/caching.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/test/caching.js b/blackberry10/node_modules/jake/node_modules/minimatch/test/caching.js
new file mode 100644
index 0000000..0fec4b0
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/test/caching.js
@@ -0,0 +1,14 @@
+var Minimatch = require("../minimatch.js").Minimatch
+var tap = require("tap")
+tap.test("cache test", function (t) {
+ var mm1 = new Minimatch("a?b")
+ var mm2 = new Minimatch("a?b")
+ t.equal(mm1, mm2, "should get the same object")
+ // the lru should drop it after 100 entries
+ for (var i = 0; i < 100; i ++) {
+ new Minimatch("a"+i)
+ }
+ mm2 = new Minimatch("a?b")
+ t.notEqual(mm1, mm2, "cache should have dropped")
+ t.end()
+})
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/minimatch/test/defaults.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/minimatch/test/defaults.js b/blackberry10/node_modules/jake/node_modules/minimatch/test/defaults.js
new file mode 100644
index 0000000..25f1f60
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/minimatch/test/defaults.js
@@ -0,0 +1,274 @@
+// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test
+//
+// TODO: Some of these tests do very bad things with backslashes, and will
+// most likely fail badly on windows. They should probably be skipped.
+
+var tap = require("tap")
+ , globalBefore = Object.keys(global)
+ , mm = require("../")
+ , files = [ "a", "b", "c", "d", "abc"
+ , "abd", "abe", "bb", "bcd"
+ , "ca", "cb", "dd", "de"
+ , "bdir/", "bdir/cfile"]
+ , next = files.concat([ "a-b", "aXb"
+ , ".x", ".y" ])
+
+tap.test("basic tests", function (t) {
+ var start = Date.now()
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ ; [ "http://www.bashcookbook.com/bashinfo" +
+ "/source/bash-1.14.7/tests/glob-test"
+ , ["a*", ["a", "abc", "abd", "abe"]]
+ , ["X*", ["X*"], {nonull: true}]
+
+ // allow null glob expansion
+ , ["X*", []]
+
+ // isaacs: Slightly different than bash/sh/ksh
+ // \\* is not un-escaped to literal "*" in a failed match,
+ // but it does make it get treated as a literal star
+ , ["\\*", ["\\*"], {nonull: true}]
+ , ["\\**", ["\\**"], {nonull: true}]
+ , ["\\*\\*", ["\\*\\*"], {nonull: true}]
+
+ , ["b*/", ["bdir/"]]
+ , ["c*", ["c", "ca", "cb"]]
+ , ["**", files]
+
+ , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}]
+ , ["s/\\..*//", ["s/\\..*//"], {nonull: true}]
+
+ , "legendary larry crashes bashes"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}]
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"
+ , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}]
+
+ , "character classes"
+ , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]]
+ , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd",
+ "bdir/", "ca", "cb", "dd", "de"]]
+ , ["a*[^c]", ["abd", "abe"]]
+ , function () { files.push("a-b", "aXb") }
+ , ["a[X-]b", ["a-b", "aXb"]]
+ , function () { files.push(".x", ".y") }
+ , ["[^a-c]*", ["d", "dd", "de"]]
+ , function () { files.push("a*b/", "a*b/ooo") }
+ , ["a\\*b/*", ["a*b/ooo"]]
+ , ["a\\*?/*", ["a*b/ooo"]]
+ , ["*\\\\!*", [], {null: true}, ["echo !7"]]
+ , ["*\\!*", ["echo !7"], null, ["echo !7"]]
+ , ["*.\\*", ["r.*"], null, ["r.*"]]
+ , ["a[b]c", ["abc"]]
+ , ["a[\\b]c", ["abc"]]
+ , ["a?c", ["abc"]]
+ , ["a\\*c", [], {null: true}, ["abc"]]
+ , ["", [""], { null: true }, [""]]
+
+ , "http://www.opensource.apple.com/source/bash/bash-23/" +
+ "bash/tests/glob-test"
+ , function () { files.push("man/", "man/man1/", "man/man1/bash.1") }
+ , ["*/man*/bash.*", ["man/man1/bash.1"]]
+ , ["man/man1/bash.1", ["man/man1/bash.1"]]
+ , ["a***c", ["abc"], null, ["abc"]]
+ , ["a*****?c", ["abc"], null, ["abc"]]
+ , ["?*****??", ["abc"], null, ["abc"]]
+ , ["*****??", ["abc"], null, ["abc"]]
+ , ["?*****?c", ["abc"], null, ["abc"]]
+ , ["?***?****c", ["abc"], null, ["abc"]]
+ , ["?***?****?", ["abc"], null, ["abc"]]
+ , ["?***?****", ["abc"], null, ["abc"]]
+ , ["*******c", ["abc"], null, ["abc"]]
+ , ["*******?", ["abc"], null, ["abc"]]
+ , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]]
+ , ["[-abc]", ["-"], null, ["-"]]
+ , ["[abc-]", ["-"], null, ["-"]]
+ , ["\\", ["\\"], null, ["\\"]]
+ , ["[\\\\]", ["\\"], null, ["\\"]]
+ , ["[[]", ["["], null, ["["]]
+ , ["[", ["["], null, ["["]]
+ , ["[*", ["[abc"], null, ["[abc"]]
+ , "a right bracket shall lose its special meaning and\n" +
+ "represent itself in a bracket expression if it occurs\n" +
+ "first in the list. -- POSIX.2 2.8.3.2"
+ , ["[]]", ["]"], null, ["]"]]
+ , ["[]-]", ["]"], null, ["]"]]
+ , ["[a-\z]", ["p"], null, ["p"]]
+ , ["??**********?****?", [], { null: true }, ["abc"]]
+ , ["??**********?****c", [], { null: true }, ["abc"]]
+ , ["?************c****?****", [], { null: true }, ["abc"]]
+ , ["*c*?**", [], { null: true }, ["abc"]]
+ , ["a*****c*?**", [], { null: true }, ["abc"]]
+ , ["a********???*******", [], { null: true }, ["abc"]]
+ , ["[]", [], { null: true }, ["a"]]
+ , ["[abc", [], { null: true }, ["["]]
+
+ , "nocase tests"
+ , ["XYZ", ["xYz"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["ab*", ["ABC"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+ , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true }
+ , ["xYz", "ABC", "IjK"]]
+
+ // [ pattern, [matches], MM opts, files, TAP opts]
+ , "onestar/twostar"
+ , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]]
+ , ["{/?,*}", ["/a", "bb"], {null: true}
+ , ["/a", "/b/b", "/a/b/c", "bb"]]
+
+ , "dots should not match unless requested"
+ , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]]
+
+ // .. and . can only match patterns starting with .,
+ // even when options.dot is set.
+ , function () {
+ files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"]
+ }
+ , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}]
+ , ["a/*/b", ["a/c/b"], {dot:false}]
+ , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}]
+
+
+ // this also tests that changing the options needs
+ // to change the cache key, even if the pattern is
+ // the same!
+ , ["**", ["a/b","a/.d",".a/.d"], { dot: true }
+ , [ ".a/.d", "a/.d", "a/b"]]
+
+ , "paren sets cannot contain slashes"
+ , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]]
+
+ // brace sets trump all else.
+ //
+ // invalid glob pattern. fails on bash4 and bsdglob.
+ // however, in this implementation, it's easier just
+ // to do the intuitive thing, and let brace-expansion
+ // actually come before parsing any extglob patterns,
+ // like the documentation seems to say.
+ //
+ // XXX: if anyone complains about this, either fix it
+ // or tell them to grow up and stop complaining.
+ //
+ // bash/bsdglob says this:
+ // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]]
+ // but we do this instead:
+ , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]]
+
+ // test partial parsing in the presence of comment/negation chars
+ , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]]
+ , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]]
+
+ // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped.
+ , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g"
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"]
+ , {}
+ , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]]
+
+
+ // crazy nested {,,} and *(||) tests.
+ , function () {
+ files = [ "a", "b", "c", "d"
+ , "ab", "ac", "ad"
+ , "bc", "cb"
+ , "bc,d", "c,db", "c,d"
+ , "d)", "(b|c", "*(b|c"
+ , "b|c", "b|cc", "cb|c"
+ , "x(a|b|c)", "x(a|c)"
+ , "(a|b|c)", "(a|c)"]
+ }
+ , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]]
+ , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]]
+ // a
+ // *(b|c)
+ // *(b|d)
+ , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]]
+ , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]]
+
+
+ // test various flag settings.
+ , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"]
+ , { noext: true } ]
+ , ["a?b", ["x/y/acb", "acb/"], {matchBase: true}
+ , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ]
+ , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]]
+
+
+ // begin channelling Boole and deMorgan...
+ , "negation tests"
+ , function () {
+ files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"]
+ }
+
+ // anything that is NOT a* matches.
+ , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]]
+
+ // anything that IS !a* matches.
+ , ["!a*", ["!ab", "!abc"], {nonegate: true}]
+
+ // anything that IS a* matches
+ , ["!!a*", ["a!b"]]
+
+ // anything that is NOT !a* matches
+ , ["!\\!a*", ["a!b", "d", "e", "\\!a"]]
+
+ // negation nestled within a pattern
+ , function () {
+ files = [ "foo.js"
+ , "foo.bar"
+ // can't match this one without negative lookbehind.
+ , "foo.js.js"
+ , "blar.js"
+ , "foo."
+ , "boo.js.boo" ]
+ }
+ , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ]
+
+ ].forEach(function (c) {
+ if (typeof c === "function") return c()
+ if (typeof c === "string") return t.comment(c)
+
+ var pattern = c[0]
+ , expect = c[1].sort(alpha)
+ , options = c[2] || {}
+ , f = c[3] || files
+ , tapOpts = c[4] || {}
+
+ // options.debug = true
+ var Class = mm.defaults(options).Minimatch
+ var m = new Class(pattern, {})
+ var r = m.makeRe()
+ tapOpts.re = String(r) || JSON.stringify(r)
+ tapOpts.files = JSON.stringify(f)
+ tapOpts.pattern = pattern
+ tapOpts.set = m.set
+ tapOpts.negated = m.negate
+
+ var actual = mm.match(f, pattern, options)
+ actual.sort(alpha)
+
+ t.equivalent( actual, expect
+ , JSON.stringify(pattern) + " " + JSON.stringify(expect)
+ , tapOpts )
+ })
+
+ t.comment("time=" + (Date.now() - start) + "ms")
+ t.end()
+})
+
+tap.test("global leak test", function (t) {
+ var globalAfter = Object.keys(global)
+ t.equivalent(globalAfter, globalBefore, "no new globals, please")
+ t.end()
+})
+
+function alpha (a, b) {
+ return a > b ? 1 : -1
+}
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/Jakefile
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/Jakefile b/blackberry10/node_modules/jake/node_modules/utilities/Jakefile
new file mode 100644
index 0000000..1523f05
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/Jakefile
@@ -0,0 +1,37 @@
+
+var t = new jake.TestTask('Utilities', function () {
+ this.testFiles.include('test/*.js');
+});
+
+namespace('doc', function () {
+ task('generate', ['doc:clobber'], function () {
+ var cmd = '../node-jsdoc-toolkit/app/run.js -n -r=100 ' +
+ '-t=../node-jsdoc-toolkit/templates/codeview -d=./doc/ ./lib';
+ console.log('Generating docs ...');
+ jake.exec([cmd], function () {
+ console.log('Done.');
+ complete();
+ });
+ }, {async: true});
+
+ task('clobber', function () {
+ var cmd = 'rm -fr ./doc/**';
+ jake.exec([cmd], function () {
+ console.log('Clobbered old docs.');
+ complete();
+ });
+ }, {async: true});
+
+});
+
+desc('Generate docs for Utilities');
+task('doc', ['doc:generate']);
+
+var p = new jake.NpmPublishTask('utilities', [
+ 'Jakefile'
+, 'README.md'
+, 'package.json'
+, 'lib/**'
+, 'test/**'
+]);
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/README.md b/blackberry10/node_modules/jake/node_modules/utilities/README.md
new file mode 100644
index 0000000..fbbdf59
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/README.md
@@ -0,0 +1,6 @@
+utilities
+=========
+
+[](http://travis-ci.org/mde/utilities)
+
+A classic collection of JavaScript utilities
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/array.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/array.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/array.js
new file mode 100644
index 0000000..836de2c
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/array.js
@@ -0,0 +1,93 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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.
+ *
+*/
+
+/**
+ @name array
+ @namespace array
+*/
+
+var array = new (function () {
+
+ /**
+ @name array#humanize
+ @public
+ @function
+ @return {String} A string containing the array elements in a readable format
+ @description Creates a string containing the array elements in a readable format
+ @param {Array} array The array to humanize
+ */
+ this.humanize = function (array) {
+ // If array only has one item then just return it
+ if (array.length <= 1) {
+ return String(array);
+ }
+
+ var last = array.pop()
+ , items = array.join(', ');
+
+ return items + ' and ' + last;
+ };
+
+ /**
+ @name array#included
+ @public
+ @function
+ @return {Array/Boolean} If `item` is included the `array` is
+ returned otherwise false
+ @description Checks if an `item` is included in an `array`
+ @param {Any} item The item to look for
+ @param {Array} array The array to check
+ */
+ this.included = function (item, array) {
+ var result = array.indexOf(item);
+
+ if (result === -1) {
+ return false;
+ } else {
+ return array;
+ }
+ };
+
+ /**
+ @name array#include
+ @public
+ @function
+ @return {Boolean} Return true if the item is included in the array
+ @description Checks if an `item` is included in an `array`
+ @param {Array} array The array to check
+ @param {Any} item The item to look for
+ */
+ this.include = function (array, item) {
+ var res = -1;
+ if (typeof array.indexOf == 'function') {
+ res = array.indexOf(item);
+ }
+ else {
+ for (var i = 0, ii = array.length; i < ii; i++) {
+ if (array[i] == item) {
+ res = i;
+ break;
+ }
+ }
+ }
+ return res > -1;
+ };
+
+})();
+
+module.exports = array;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/async.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/async.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/async.js
new file mode 100644
index 0000000..06a7429
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/async.js
@@ -0,0 +1,291 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 async = {};
+
+/*
+AsyncChain -- performs a list of asynchronous calls in a desired order.
+Optional "last" method can be set to run after all the items in the
+chain have completed.
+
+ // Example usage
+ var asyncChain = new async.AsyncChain([
+ {
+ func: app.trainToBangkok,
+ args: [geddy, neil, alex],
+ callback: null, // No callback for this action
+ },
+ {
+ func: fs.readdir,
+ args: [geddy.config.dirname + '/thailand/express'],
+ callback: function (err, result) {
+ if (err) {
+ // Bail out completely
+ arguments.callee.chain.abort();
+ }
+ else if (result.theBest) {
+ // Don't run the next item in the chain; go directly
+ // to the 'last' method.
+ arguments.callee.chain.shortCircuit();
+ }
+ else {
+ // Otherwise do some other stuff and
+ // then go to the next link
+ }
+ }
+ },
+ {
+ func: child_process.exec,
+ args: ['ls ./'],
+ callback: this.hitTheStops
+ }
+ ]);
+
+ // Function to exec after all the links in the chain finish
+ asyncChain.last = function () { // Do some final stuff };
+
+ // Start the async-chain
+ asyncChain.run();
+
+*/
+async.execNonBlocking = function (func) {
+ if (typeof process != 'undefined' && typeof process.nextTick == 'function') {
+ process.nextTick(func);
+ }
+ else {
+ setTimeout(func, 0);
+ }
+};
+
+async.AsyncBase = new (function () {
+
+ this.init = function (chain) {
+ var item;
+ this.chain = [];
+ this.currentItem = null;
+ this.shortCircuited = false;
+ this.shortCircuitedArgs = undefined;
+ this.aborted = false;
+
+ for (var i = 0; i < chain.length; i++) {
+ item = chain[i];
+ this.chain.push(new async.AsyncCall(
+ item.func, item.args, item.callback, item.context));
+ }
+ };
+
+ this.runItem = function (item) {
+ // Reference to the current item in the chain -- used
+ // to look up the callback to execute with execCallback
+ this.currentItem = item;
+ // Scopage
+ var _this = this;
+ // Pass the arguments passed to the current async call
+ // to the callback executor, execute it in the correct scope
+ var executor = function () {
+ _this.execCallback.apply(_this, arguments);
+ };
+ // Append the callback executor to the end of the arguments
+ // Node helpfully always has the callback func last
+ var args = item.args.concat(executor);
+ var func = item.func;
+ // Run the async call
+ func.apply(item.context, args);
+ };
+
+ this.next = function () {
+ if (this.chain.length) {
+ this.runItem(this.chain.shift());
+ }
+ else {
+ this.last();
+ }
+ };
+
+ this.execCallback = function () {
+ // Look up the callback, if any, specified for this async call
+ var callback = this.currentItem.callback;
+ // If there's a callback, do it
+ if (callback && typeof callback == 'function') {
+ // Allow access to the chain from inside the callback by setting
+ // callback.chain = this, and then using arguments.callee.chain
+ callback.chain = this;
+ callback.apply(this.currentItem.context, arguments);
+ }
+
+ this.currentItem.finished = true;
+
+ // If one of the async callbacks called chain.shortCircuit,
+ // skip to the 'last' function for the chain
+ if (this.shortCircuited) {
+ this.last.apply(null, this.shortCircuitedArgs);
+ }
+ // If one of the async callbacks called chain.abort,
+ // bail completely out
+ else if (this.aborted) {
+ return;
+ }
+ // Otherwise run the next item, if any, in the chain
+ // Let's try not to block if we don't have to
+ else {
+ // Scopage
+ var _this = this;
+ async.execNonBlocking(function () { _this.next.call(_this); });
+ }
+ }
+
+ // Short-circuit the chain, jump straight to the 'last' function
+ this.shortCircuit = function () {
+ this.shortCircuitedArgs = arguments;
+ this.shortCircuited = true;
+ }
+
+ // Stop execution of the chain, bail completely out
+ this.abort = function () {
+ this.aborted = true;
+ }
+
+ // Kick off the chain by grabbing the first item and running it
+ this.run = this.next;
+
+ // Function to run when the chain is done -- default is a no-op
+ this.last = function () {};
+
+})();
+
+async.AsyncChain = function (chain) {
+ this.init(chain);
+};
+
+async.AsyncChain.prototype = async.AsyncBase;
+
+async.AsyncGroup = function (group) {
+ var item;
+ var callback;
+ var args;
+
+ this.group = [];
+ this.outstandingCount = 0;
+
+ for (var i = 0; i < group.length; i++) {
+ item = group[i];
+ this.group.push(new async.AsyncCall(
+ item.func, item.args, item.callback, item.context));
+ this.outstandingCount++;
+ }
+
+};
+
+/*
+Simpler way to group async calls -- doesn't ensure completion order,
+but still has a "last" method called when the entire group of calls
+have completed.
+*/
+async.AsyncGroup.prototype = new function () {
+ this.run = function () {
+ var _this = this
+ , group = this.group
+ , item
+ , createItem = function (item, args) {
+ return function () {
+ item.func.apply(item.context, args);
+ };
+ }
+ , createCallback = function (item) {
+ return function () {
+ if (item.callback) {
+ item.callback.apply(null, arguments);
+ }
+ _this.finish.call(_this);
+ }
+ };
+
+ for (var i = 0; i < group.length; i++) {
+ item = group[i];
+ callback = createCallback(item);
+ args = item.args.concat(callback);
+ // Run the async call
+ async.execNonBlocking(createItem(item, args));
+ }
+ };
+
+ this.finish = function () {
+ this.outstandingCount--;
+ if (!this.outstandingCount) {
+ this.last();
+ };
+ };
+
+ this.last = function () {};
+
+};
+
+var _createSimpleAsyncCall = function (func, context) {
+ return {
+ func: func
+ , args: []
+ , callback: function () {}
+ , context: context
+ };
+};
+
+async.SimpleAsyncChain = function (funcs, context) {
+ chain = [];
+ for (var i = 0, ii = funcs.length; i < ii; i++) {
+ chain.push(_createSimpleAsyncCall(funcs[i], context));
+ }
+ this.init(chain);
+};
+
+async.SimpleAsyncChain.prototype = async.AsyncBase;
+
+async.AsyncCall = function (func, args, callback, context) {
+ this.func = func;
+ this.args = args;
+ this.callback = callback || null;
+ this.context = context || null;
+};
+
+async.Initializer = function (steps, callback) {
+ var self = this;
+ this.steps = {};
+ this.callback = callback;
+ // Create an object-literal of the steps to tick off
+ steps.forEach(function (step) {
+ self.steps[step] = false;
+ });
+};
+
+async.Initializer.prototype = new (function () {
+ this.complete = function (step) {
+ var steps = this.steps;
+ // Tick this step off
+ steps[step] = true;
+ // Iterate the steps -- if any are not done, bail out
+ for (var p in steps) {
+ if (!steps[p]) {
+ return false;
+ }
+ }
+ // If all steps are done, run the callback
+ this.callback();
+ };
+})();
+
+module.exports = async;
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/core.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/core.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/core.js
new file mode 100644
index 0000000..6b41ce7
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/core.js
@@ -0,0 +1,106 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 core = new (function () {
+
+ var _mix = function (targ, src, merge, includeProto) {
+ for (var p in src) {
+ // Don't copy stuff from the prototype
+ if (src.hasOwnProperty(p) || includeProto) {
+ if (merge &&
+ // Assumes the source property is an Object you can
+ // actually recurse down into
+ (typeof src[p] == 'object') &&
+ (src[p] !== null) &&
+ !(src[p] instanceof Array)) {
+ // Create the source property if it doesn't exist
+ // Double-equal to undefined includes both null and undefined
+ if (targ[p] == undefined) {
+ targ[p] = {};
+ }
+ _mix(targ[p], src[p], merge, includeProto); // Recurse
+ }
+ // If it's not a merge-copy, just set and forget
+ else {
+ targ[p] = src[p];
+ }
+ }
+ }
+ };
+
+ /*
+ * Mix in the properties on an object to another object
+ * yam.mixin(target, source, [source,] [source, etc.] [merge-flag]);
+ * 'merge' recurses, to merge object sub-properties together instead
+ * of just overwriting with the source object.
+ */
+ this.mixin = function () {
+ var args = Array.prototype.slice.apply(arguments),
+ merge = false,
+ targ, sources;
+ if (args.length > 2) {
+ if (typeof args[args.length - 1] == 'boolean') {
+ merge = args.pop();
+ }
+ }
+ targ = args.shift();
+ sources = args;
+ for (var i = 0, ii = sources.length; i < ii; i++) {
+ _mix(targ, sources[i], merge);
+ }
+ return targ;
+ };
+
+ this.enhance = function () {
+ var args = Array.prototype.slice.apply(arguments),
+ merge = false,
+ targ, sources;
+ if (args.length > 2) {
+ if (typeof args[args.length - 1] == 'boolean') {
+ merge = args.pop();
+ }
+ }
+ targ = args.shift();
+ sources = args;
+ for (var i = 0, ii = sources.length; i < ii; i++) {
+ _mix(targ, sources[i], merge, true);
+ }
+ return targ;
+ };
+
+ // Idea to add invalid number & Date from Michael J. Ryan,
+ // http://frugalcoder.us/post/2010/02/15/js-is-empty.aspx
+ this.isEmpty = function (val) {
+ // Empty string, null or undefined (these two are double-equal)
+ if (val === '' || val == undefined) {
+ return true;
+ }
+ // Invalid numerics
+ if (typeof val == 'number' && isNaN(val)) {
+ return true;
+ }
+ // Invalid Dates
+ if (val instanceof Date && isNaN(val.getTime())) {
+ return true;
+ }
+ return false;
+ };
+
+})();
+
+module.exports = core;
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/date.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/date.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/date.js
new file mode 100644
index 0000000..7232ce0
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/date.js
@@ -0,0 +1,903 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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 string = require('./string')
+ , date
+ , log = require('./log');
+
+/**
+ @name date
+ @namespace date
+*/
+
+date = new (function () {
+ var _this = this
+ , _date = new Date();
+
+ var _US_DATE_PAT = /^(\d{1,2})(?:\-|\/|\.)(\d{1,2})(?:\-|\/|\.)(\d{4})/;
+ var _DATETIME_PAT = /^(\d{4})(?:\-|\/|\.)(\d{1,2})(?:\-|\/|\.)(\d{1,2})(?:T| )?(\d{2})?(?::)?(\d{2})?(?::)?(\d{2})?(?:\.)?(\d+)?(?: *)?(Z|[+-]\d{4}|[+-]\d{2}:\d{2}|[+-]\d{2})?/;
+ // TODO Add am/pm parsing instead of dumb, 24-hour clock.
+ var _TIME_PAT = /^(\d{1,2})?(?::)?(\d{2})?(?::)?(\d{2})?(?:\.)?(\d+)?$/;
+
+ var _dateMethods = [
+ 'FullYear'
+ , 'Month'
+ , 'Date'
+ , 'Hours'
+ , 'Minutes'
+ , 'Seconds'
+ , 'Milliseconds'
+ ];
+
+ var _isArray = function (obj) {
+ return obj &&
+ typeof obj === 'object' &&
+ typeof obj.length === 'number' &&
+ typeof obj.splice === 'function' &&
+ !(obj.propertyIsEnumerable('length'));
+ };
+
+ this.weekdayLong = ['Sunday', 'Monday', 'Tuesday',
+ 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
+ this.weekdayShort = ['Sun', 'Mon', 'Tue', 'Wed',
+ 'Thu', 'Fri', 'Sat'];
+ this.monthLong = ['January', 'February', 'March',
+ 'April', 'May', 'June', 'July', 'August', 'September',
+ 'October', 'November', 'December'];
+ this.monthShort = ['Jan', 'Feb', 'Mar', 'Apr',
+ 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
+ this.meridiem = {
+ 'AM': 'AM',
+ 'PM': 'PM'
+ }
+ // compat
+ this.meridian = this.meridiem
+
+ /**
+ @name date#supportedFormats
+ @public
+ @object
+ @description List of supported strftime formats
+ */
+ this.supportedFormats = {
+ // abbreviated weekday name according to the current locale
+ 'a': function (dt) { return _this.weekdayShort[dt.getDay()]; },
+ // full weekday name according to the current locale
+ 'A': function (dt) { return _this.weekdayLong[dt.getDay()]; },
+ // abbreviated month name according to the current locale
+ 'b': function (dt) { return _this.monthShort[dt.getMonth()]; },
+ 'h': function (dt) { return _this.strftime(dt, '%b'); },
+ // full month name according to the current locale
+ 'B': function (dt) { return _this.monthLong[dt.getMonth()]; },
+ // preferred date and time representation for the current locale
+ 'c': function (dt) { return _this.strftime(dt, '%a %b %d %T %Y'); },
+ // century number (the year divided by 100 and truncated
+ // to an integer, range 00 to 99)
+ 'C': function (dt) { return _this.calcCentury(dt.getFullYear());; },
+ // day of the month as a decimal number (range 01 to 31)
+ 'd': function (dt) { return string.lpad(dt.getDate(), '0', 2); },
+ // same as %m/%d/%y
+ 'D': function (dt) { return _this.strftime(dt, '%m/%d/%y') },
+ // day of the month as a decimal number, a single digit is
+ // preceded by a space (range ' 1' to '31')
+ 'e': function (dt) { return string.lpad(dt.getDate(), ' ', 2); },
+ // month as a decimal number, a single digit is
+ // preceded by a space (range ' 1' to '12')
+ 'f': function () { return _this.strftimeNotImplemented('f'); },
+ // same as %Y-%m-%d
+ 'F': function (dt) { return _this.strftime(dt, '%Y-%m-%d'); },
+ // like %G, but without the century.
+ 'g': function () { return _this.strftimeNotImplemented('g'); },
+ // The 4-digit year corresponding to the ISO week number
+ // (see %V). This has the same format and value as %Y,
+ // except that if the ISO week number belongs to the
+ // previous or next year, that year is used instead.
+ 'G': function () { return _this.strftimeNotImplemented('G'); },
+ // hour as a decimal number using a 24-hour clock (range
+ // 00 to 23)
+ 'H': function (dt) { return string.lpad(dt.getHours(), '0', 2); },
+ // hour as a decimal number using a 12-hour clock (range
+ // 01 to 12)
+ 'I': function (dt) { return string.lpad(
+ _this.hrMil2Std(dt.getHours()), '0', 2); },
+ // day of the year as a decimal number (range 001 to 366)
+ 'j': function (dt) { return string.lpad(
+ _this.calcDays(dt), '0', 3); },
+ // Hour as a decimal number using a 24-hour clock (range
+ // 0 to 23 (space-padded))
+ 'k': function (dt) { return string.lpad(dt.getHours(), ' ', 2); },
+ // Hour as a decimal number using a 12-hour clock (range
+ // 1 to 12 (space-padded))
+ 'l': function (dt) { return string.lpad(
+ _this.hrMil2Std(dt.getHours()), ' ', 2); },
+ // month as a decimal number (range 01 to 12)
+ 'm': function (dt) { return string.lpad((dt.getMonth()+1), '0', 2); },
+ // minute as a decimal number
+ 'M': function (dt) { return string.lpad(dt.getMinutes(), '0', 2); },
+ // Linebreak
+ 'n': function () { return '\n'; },
+ // either `am' or `pm' according to the given time value,
+ // or the corresponding strings for the current locale
+ 'p': function (dt) { return _this.getMeridian(dt.getHours()); },
+ // time in a.m. and p.m. notation
+ 'r': function (dt) { return _this.strftime(dt, '%I:%M:%S %p'); },
+ // time in 24 hour notation
+ 'R': function (dt) { return _this.strftime(dt, '%H:%M'); },
+ // second as a decimal number
+ 'S': function (dt) { return string.lpad(dt.getSeconds(), '0', 2); },
+ // Tab char
+ 't': function () { return '\t'; },
+ // current time, equal to %H:%M:%S
+ 'T': function (dt) { return _this.strftime(dt, '%H:%M:%S'); },
+ // weekday as a decimal number [1,7], with 1 representing
+ // Monday
+ 'u': function (dt) { return _this.convertOneBase(dt.getDay()); },
+ // week number of the current year as a decimal number,
+ // starting with the first Sunday as the first day of the
+ // first week
+ 'U': function () { return _this.strftimeNotImplemented('U'); },
+ // week number of the year (Monday as the first day of the
+ // week) as a decimal number [01,53]. If the week containing
+ // 1 January has four or more days in the new year, then it
+ // is considered week 1. Otherwise, it is the last week of
+ // the previous year, and the next week is week 1.
+ 'V': function () { return _this.strftimeNotImplemented('V'); },
+ // week number of the current year as a decimal number,
+ // starting with the first Monday as the first day of the
+ // first week
+ 'W': function () { return _this.strftimeNotImplemented('W'); },
+ // day of the week as a decimal, Sunday being 0
+ 'w': function (dt) { return dt.getDay(); },
+ // preferred date representation for the current locale
+ // without the time
+ 'x': function (dt) { return _this.strftime(dt, '%D'); },
+ // preferred time representation for the current locale
+ // without the date
+ 'X': function (dt) { return _this.strftime(dt, '%T'); },
+ // year as a decimal number without a century (range 00 to
+ // 99)
+ 'y': function (dt) { return _this.getTwoDigitYear(dt.getFullYear()); },
+ // year as a decimal number including the century
+ 'Y': function (dt) { return string.lpad(dt.getFullYear(), '0', 4); },
+ // time zone or name or abbreviation
+ 'z': function () { return _this.strftimeNotImplemented('z'); },
+ 'Z': function () { return _this.strftimeNotImplemented('Z'); },
+ // Literal percent char
+ '%': function (dt) { return '%'; }
+ };
+
+ /**
+ @name date#getSupportedFormats
+ @public
+ @function
+ @description return the list of formats in a string
+ @return {String} The list of supported formats
+ */
+ this.getSupportedFormats = function () {
+ var str = '';
+ for (var i in this.supportedFormats) { str += i; }
+ return str;
+ }
+
+ this.supportedFormatsPat = new RegExp('%[' +
+ this.getSupportedFormats() + ']{1}', 'g');
+
+ /**
+ @name date#strftime
+ @public
+ @function
+ @return {String} The `dt` formated with the given `format`
+ @description Formats the given date with the strftime formated
+ @param {Date} dt the date object to format
+ @param {String} format the format to convert the date to
+ */
+ this.strftime = function (dt, format) {
+ if (!dt) { return '' }
+
+ var d = dt;
+ var pats = [];
+ var dts = [];
+ var str = format;
+
+ // Allow either Date obj or UTC stamp
+ d = typeof dt == 'number' ? new Date(dt) : dt;
+
+ // Grab all instances of expected formats into array
+ while (pats = this.supportedFormatsPat.exec(format)) {
+ dts.push(pats[0]);
+ }
+
+ // Process any hits
+ for (var i = 0; i < dts.length; i++) {
+ key = dts[i].replace(/%/, '');
+ str = str.replace('%' + key,
+ this.supportedFormats[key](d));
+ }
+ return str;
+
+ };
+
+ this.strftimeNotImplemented = function (s) {
+ throw('this.strftime format "' + s + '" not implemented.');
+ };
+
+ /**
+ @name date#calcCentury
+ @public
+ @function
+ @return {String} The century for the given date
+ @description Find the century for the given `year`
+ @param {Number} year The year to find the century for
+ */
+ this.calcCentury = function (year) {
+ if(!year) {
+ year = _date.getFullYear();
+ }
+
+ var ret = parseInt((year / 100) + 1);
+ year = year.toString();
+
+ // If year ends in 00 subtract one, because it's still the century before the one
+ // it divides to
+ if (year.substring(year.length - 2) === '00') {
+ ret--;
+ }
+
+ return ret.toString();
+ };
+
+ /**
+ @name date#calcDays
+ @public
+ @function
+ @return {Number} The number of days so far for the given date
+ @description Calculate the day number in the year a particular date is on
+ @param {Date} dt The date to use
+ */
+ this.calcDays = function (dt) {
+ var first = new Date(dt.getFullYear(), 0, 1);
+ var diff = 0;
+ var ret = 0;
+ first = first.getTime();
+ diff = (dt.getTime() - first);
+ ret = parseInt(((((diff/1000)/60)/60)/24))+1;
+ return ret;
+ };
+
+ /**
+ * Adjust from 0-6 base week to 1-7 base week
+ * @param d integer for day of week
+ * @return Integer day number for 1-7 base week
+ */
+ this.convertOneBase = function (d) {
+ return d == 0 ? 7 : d;
+ };
+
+ this.getTwoDigitYear = function (yr) {
+ // Add a millenium to take care of years before the year 1000,
+ // (e.g, the year 7) since we're only taking the last two digits
+ // If we overshoot, it doesn't matter
+ var millenYear = yr + 1000;
+ var str = millenYear.toString();
+ str = str.substr(2); // Get the last two digits
+ return str
+ };
+
+ /**
+ @name date#getMeridiem
+ @public
+ @function
+ @return {String} Return 'AM' or 'PM' based on hour in 24-hour format
+ @description Return 'AM' or 'PM' based on hour in 24-hour format
+ @param {Number} h The hour to check
+ */
+ this.getMeridiem = function (h) {
+ return h > 11 ? this.meridiem.PM :
+ this.meridiem.AM;
+ };
+ // Compat
+ this.getMeridian = this.getMeridiem;
+
+ /**
+ @name date#hrMil2Std
+ @public
+ @function
+ @return {String} Return a 12 hour version of the given time
+ @description Convert a 24-hour formatted hour to 12-hour format
+ @param {String} hour The hour to convert
+ */
+ this.hrMil2Std = function (hour) {
+ var h = typeof hour == 'number' ? hour : parseInt(hour);
+ var str = h > 12 ? h - 12 : h;
+ str = str == 0 ? 12 : str;
+ return str;
+ };
+
+ /**
+ @name date#hrStd2Mil
+ @public
+ @function
+ @return {String} Return a 24 hour version of the given time
+ @description Convert a 12-hour formatted hour with meridian flag to 24-hour format
+ @param {String} hour The hour to convert
+ @param {Boolean} pm hour is PM then this should be true
+ */
+ this.hrStd2Mil = function (hour, pm) {
+ var h = typeof hour == 'number' ? hour : parseInt(hour);
+ var str = '';
+ // PM
+ if (pm) {
+ str = h < 12 ? (h+12) : h;
+ }
+ // AM
+ else {
+ str = h == 12 ? 0 : h;
+ }
+ return str;
+ };
+
+ // Constants for use in this.add
+ var dateParts = {
+ YEAR: 'year'
+ , MONTH: 'month'
+ , DAY: 'day'
+ , HOUR: 'hour'
+ , MINUTE: 'minute'
+ , SECOND: 'second'
+ , MILLISECOND: 'millisecond'
+ , QUARTER: 'quarter'
+ , WEEK: 'week'
+ , WEEKDAY: 'weekday'
+ };
+ // Create a map for singular/plural lookup, e.g., day/days
+ var datePartsMap = {};
+ for (var p in dateParts) {
+ datePartsMap[dateParts[p]] = dateParts[p];
+ datePartsMap[dateParts[p] + 's'] = dateParts[p];
+ }
+ this.dateParts = dateParts;
+
+ /**
+ @name date#add
+ @public
+ @function
+ @return {Date} Incremented date
+ @description Add to a Date in intervals of different size, from
+ milliseconds to years
+ @param {Date} dt Date (or timestamp Number), date to increment
+ @param {String} interv a constant representing the interval,
+ e.g. YEAR, MONTH, DAY. See this.dateParts
+ @param {Number} incr how much to add to the date
+ */
+ this.add = function (dt, interv, incr) {
+ if (typeof dt == 'number') { dt = new Date(dt); }
+ function fixOvershoot() {
+ if (sum.getDate() < dt.getDate()) {
+ sum.setDate(0);
+ }
+ }
+ var key = datePartsMap[interv];
+ var sum = new Date(dt);
+ switch (key) {
+ case dateParts.YEAR:
+ sum.setFullYear(dt.getFullYear()+incr);
+ // Keep increment/decrement from 2/29 out of March
+ fixOvershoot();
+ break;
+ case dateParts.QUARTER:
+ // Naive quarter is just three months
+ incr*=3;
+ // fallthrough...
+ case dateParts.MONTH:
+ sum.setMonth(dt.getMonth()+incr);
+ // Reset to last day of month if you overshoot
+ fixOvershoot();
+ break;
+ case dateParts.WEEK:
+ incr*=7;
+ // fallthrough...
+ case dateParts.DAY:
+ sum.setDate(dt.getDate() + incr);
+ break;
+ case dateParts.WEEKDAY:
+ //FIXME: assumes Saturday/Sunday weekend, but even this is not fixed.
+ // There are CLDR entries to localize this.
+ var dat = dt.getDate();
+ var weeks = 0;
+ var days = 0;
+ var strt = 0;
+ var trgt = 0;
+ var adj = 0;
+ // Divide the increment time span into weekspans plus leftover days
+ // e.g., 8 days is one 5-day weekspan / and two leftover days
+ // Can't have zero leftover days, so numbers divisible by 5 get
+ // a days value of 5, and the remaining days make up the number of weeks
+ var mod = incr % 5;
+ if (mod == 0) {
+ days = (incr > 0) ? 5 : -5;
+ weeks = (incr > 0) ? ((incr-5)/5) : ((incr+5)/5);
+ }
+ else {
+ days = mod;
+ weeks = parseInt(incr/5);
+ }
+ // Get weekday value for orig date param
+ strt = dt.getDay();
+ // Orig date is Sat / positive incrementer
+ // Jump over Sun
+ if (strt == 6 && incr > 0) {
+ adj = 1;
+ }
+ // Orig date is Sun / negative incrementer
+ // Jump back over Sat
+ else if (strt == 0 && incr < 0) {
+ adj = -1;
+ }
+ // Get weekday val for the new date
+ trgt = strt + days;
+ // New date is on Sat or Sun
+ if (trgt == 0 || trgt == 6) {
+ adj = (incr > 0) ? 2 : -2;
+ }
+ // Increment by number of weeks plus leftover days plus
+ // weekend adjustments
+ sum.setDate(dat + (7*weeks) + days + adj);
+ break;
+ case dateParts.HOUR:
+ sum.setHours(sum.getHours()+incr);
+ break;
+ case dateParts.MINUTE:
+ sum.setMinutes(sum.getMinutes()+incr);
+ break;
+ case dateParts.SECOND:
+ sum.setSeconds(sum.getSeconds()+incr);
+ break;
+ case dateParts.MILLISECOND:
+ sum.setMilliseconds(sum.getMilliseconds()+incr);
+ break;
+ default:
+ // Do nothing
+ break;
+ }
+ return sum; // Date
+ };
+
+ /**
+ @name date#diff
+ @public
+ @function
+ @return {Number} number of (interv) units apart that
+ the two dates are
+ @description Get the difference in a specific unit of time (e.g., number
+ of months, weeks, days, etc.) between two dates.
+ @param {Date} date1 First date to check
+ @param {Date} date2 Date to compate `date1` with
+ @param {String} interv a constant representing the interval,
+ e.g. YEAR, MONTH, DAY. See this.dateParts
+ */
+ this.diff = function (date1, date2, interv) {
+ // date1
+ // Date object or Number equivalent
+ //
+ // date2
+ // Date object or Number equivalent
+ //
+ // interval
+ // A constant representing the interval, e.g. YEAR, MONTH, DAY. See this.dateParts.
+
+ // Accept timestamp input
+ if (typeof date1 == 'number') { date1 = new Date(date1); }
+ if (typeof date2 == 'number') { date2 = new Date(date2); }
+ var yeaDiff = date2.getFullYear() - date1.getFullYear();
+ var monDiff = (date2.getMonth() - date1.getMonth()) + (yeaDiff * 12);
+ var msDiff = date2.getTime() - date1.getTime(); // Millisecs
+ var secDiff = msDiff/1000;
+ var minDiff = secDiff/60;
+ var houDiff = minDiff/60;
+ var dayDiff = houDiff/24;
+ var weeDiff = dayDiff/7;
+ var delta = 0; // Integer return value
+
+ var key = datePartsMap[interv];
+ switch (key) {
+ case dateParts.YEAR:
+ delta = yeaDiff;
+ break;
+ case dateParts.QUARTER:
+ var m1 = date1.getMonth();
+ var m2 = date2.getMonth();
+ // Figure out which quarter the months are in
+ var q1 = Math.floor(m1/3) + 1;
+ var q2 = Math.floor(m2/3) + 1;
+ // Add quarters for any year difference between the dates
+ q2 += (yeaDiff * 4);
+ delta = q2 - q1;
+ break;
+ case dateParts.MONTH:
+ delta = monDiff;
+ break;
+ case dateParts.WEEK:
+ // Truncate instead of rounding
+ // Don't use Math.floor -- value may be negative
+ delta = parseInt(weeDiff);
+ break;
+ case dateParts.DAY:
+ delta = dayDiff;
+ break;
+ case dateParts.WEEKDAY:
+ var days = Math.round(dayDiff);
+ var weeks = parseInt(days/7);
+ var mod = days % 7;
+
+ // Even number of weeks
+ if (mod == 0) {
+ days = weeks*5;
+ }
+ else {
+ // Weeks plus spare change (< 7 days)
+ var adj = 0;
+ var aDay = date1.getDay();
+ var bDay = date2.getDay();
+
+ weeks = parseInt(days/7);
+ mod = days % 7;
+ // Mark the date advanced by the number of
+ // round weeks (may be zero)
+ var dtMark = new Date(date1);
+ dtMark.setDate(dtMark.getDate()+(weeks*7));
+ var dayMark = dtMark.getDay();
+
+ // Spare change days -- 6 or less
+ if (dayDiff > 0) {
+ switch (true) {
+ // Range starts on Sat
+ case aDay == 6:
+ adj = -1;
+ break;
+ // Range starts on Sun
+ case aDay == 0:
+ adj = 0;
+ break;
+ // Range ends on Sat
+ case bDay == 6:
+ adj = -1;
+ break;
+ // Range ends on Sun
+ case bDay == 0:
+ adj = -2;
+ break;
+ // Range contains weekend
+ case (dayMark + mod) > 5:
+ adj = -2;
+ break;
+ default:
+ // Do nothing
+ break;
+ }
+ }
+ else if (dayDiff < 0) {
+ switch (true) {
+ // Range starts on Sat
+ case aDay == 6:
+ adj = 0;
+ break;
+ // Range starts on Sun
+ case aDay == 0:
+ adj = 1;
+ break;
+ // Range ends on Sat
+ case bDay == 6:
+ adj = 2;
+ break;
+ // Range ends on Sun
+ case bDay == 0:
+ adj = 1;
+ break;
+ // Range contains weekend
+ case (dayMark + mod) < 0:
+ adj = 2;
+ break;
+ default:
+ // Do nothing
+ break;
+ }
+ }
+ days += adj;
+ days -= (weeks*2);
+ }
+ delta = days;
+
+ break;
+ case dateParts.HOUR:
+ delta = houDiff;
+ break;
+ case dateParts.MINUTE:
+ delta = minDiff;
+ break;
+ case dateParts.SECOND:
+ delta = secDiff;
+ break;
+ case dateParts.MILLISECOND:
+ delta = msDiff;
+ break;
+ default:
+ // Do nothing
+ break;
+ }
+ // Round for fractional values and DST leaps
+ return Math.round(delta); // Number (integer)
+ };
+
+ /**
+ @name date#parse
+ @public
+ @function
+ @return {Date} a JavaScript Date object
+ @description Convert various sorts of strings to JavaScript
+ Date objects
+ @param {String} val The string to convert to a Date
+ */
+ this.parse = function (val) {
+ var dt
+ , matches
+ , reordered
+ , off
+ , posOff
+ , offHours
+ , offMinutes
+ , curr
+ , stamp
+ , utc;
+
+ // Yay, we have a date, use it as-is
+ if (val instanceof Date || typeof val.getFullYear == 'function') {
+ dt = val;
+ }
+
+ // Timestamp?
+ else if (typeof val == 'number') {
+ dt = new Date(val);
+ }
+
+ // String or Array
+ else {
+ // Value preparsed, looks like [yyyy, mo, dd, hh, mi, ss, ms, (offset?)]
+ if (_isArray(val)) {
+ matches = val;
+ matches.unshift(null);
+ matches[8] = null;
+ }
+
+ // Oh, crap, it's a string -- parse this bitch
+ else if (typeof val == 'string') {
+ matches = val.match(_DATETIME_PAT);
+
+ // Stupid US-only format?
+ if (!matches) {
+ matches = val.match(_US_DATE_PAT);
+ if (matches) {
+ reordered = [matches[0], matches[3], matches[1], matches[2]];
+ // Pad the results to the same length as ISO8601
+ reordered[8] = null;
+ matches = reordered;
+ }
+ }
+
+ // Time-stored-in-Date hack?
+ if (!matches) {
+ matches = val.match(_TIME_PAT);
+ if (matches) {
+ reordered = [matches[0], 0, 1, 0, matches[1],
+ matches[2], matches[3], matches[4], null];
+ matches = reordered;
+ }
+ }
+
+ }
+
+ // Sweet, the regex actually parsed it into something useful
+ if (matches) {
+ matches.shift(); // First match is entire match, DO NOT WANT
+
+ off = matches.pop();
+ // If there's an offset (or the 'Z' non-offset offset), use UTC
+ // methods to set everything
+ if (off) {
+ if (off == 'Z') {
+ utc = true;
+ offMinutes = 0;
+ }
+ else {
+ utc = false;
+ off = off.replace(/\+|-|:/g, '');
+ if (parseInt(off, 10) === 0) {
+ utc = true;
+ }
+ else {
+ posOff = off.indexOf('+') === 0;
+ off = off.substr(1);
+ off = off.split(':');
+ offHours = parseInt(off[0], 10);
+ offMinutes = parseInt(off[1], 10) || 0;
+ offMinutes += (offHours * 60);
+ if (!posOff) {
+ offMinutes = 0 - offMinutes;
+ }
+ }
+ }
+ }
+
+ dt = new Date(0);
+
+ // Stupid zero-based months
+ matches[1] = parseInt(matches[1], 10) - 1;
+
+ // Specific offset, iterate the array and set each date property
+ // using UTC setters, then adjust time using offset
+ if (off) {
+ for (var i = matches.length - 1; i > -1; i--) {
+ curr = parseInt(matches[i], 10) || 0;
+ dt['setUTC' + _dateMethods[i]](curr);
+ }
+ // Add any offset
+ dt.setMinutes(dt.getMinutes() - offMinutes);
+ }
+ // Otherwise we know nothing about the offset, just iterate the
+ // array and set each date property using regular setters
+ else {
+ for (var i = matches.length - 1; i > -1; i--) {
+ curr = parseInt(matches[i], 10) || 0;
+ dt['set' + _dateMethods[i]](curr);
+ }
+ }
+ }
+
+ // Shit, last-ditch effort using Date.parse
+ else {
+ stamp = Date.parse(val);
+ // Failures to parse yield NaN
+ if (!isNaN(stamp)) {
+ dt = new Date(stamp);
+ }
+ }
+
+ }
+
+ return dt || null;
+ };
+
+ /**
+ @name date#relativeTime
+ @public
+ @function
+ @return {String} A string describing the amount of time ago
+ the passed-in Date is
+ @description Convert a Date to an English sentence representing
+ how long ago the Date was
+ @param {Date} dt The Date to to convert to a relative time string
+ @param {Object} [opts]
+ @param {Boolean} [opts.abbreviated=false] Use short strings
+ (e.g., '<1m') for the relative-time string
+ */
+ this.relativeTime = function (dt, options) {
+ var opts = options || {}
+ , now = opts.now || new Date()
+ , abbr = opts.abbreviated || false
+ , format = opts.format || '%F %T'
+ // Diff in seconds
+ , diff = (now.getTime() - dt.getTime()) / 1000
+ , ret
+ , num
+ , hour = 60*60
+ , day = 24*hour
+ , week = 7*day
+ , month = 30*day;
+ switch (true) {
+ case diff < 60:
+ ret = abbr ? '<1m' : 'less than a minute ago';
+ break;
+ case diff < 120:
+ ret = abbr ? '1m' : 'about a minute ago';
+ break;
+ case diff < (45*60):
+ num = parseInt((diff / 60), 10);
+ ret = abbr ? num + 'm' : num + ' minutes ago';
+ break;
+ case diff < (2*hour):
+ ret = abbr ? '1h' : 'about an hour ago';
+ break;
+ case diff < (1*day):
+ num = parseInt((diff / hour), 10);
+ ret = abbr ? num + 'h' : 'about ' + num + ' hours ago';
+ break;
+ case diff < (2*day):
+ ret = abbr ? '1d' : 'one day ago';
+ break;
+ case diff < (7*day):
+ num = parseInt((diff / day), 10);
+ ret = abbr ? num + 'd' : 'about ' + num + ' days ago';
+ break;
+ case diff < (11*day):
+ ret = abbr ? '1w': 'one week ago';
+ break;
+ case diff < (1*month):
+ num = Math.round(diff / week);
+ ret = abbr ? num + 'w' : 'about ' + num + ' weeks ago';
+ break;
+ default:
+ ret = date.strftime(dt, format);
+ break;
+ }
+ return ret;
+ };
+
+ /**
+ @name date#toISO8601
+ @public
+ @function
+ @return {String} A string describing the amount of time ago
+ @description Convert a Date to an ISO8601-formatted string
+ @param {Date} dt The Date to to convert to an ISO8601 string
+ */
+ var _pad = function (n) {
+ return n < 10 ? '0' + n : n;
+ };
+ this.toISO8601 = function (dt, options) {
+ var opts = options || {}
+ , off = dt.getTimezoneOffset()
+ , offHours
+ , offMinutes
+ , str = this.strftime(dt, '%F') + 'T'
+ + this.strftime(dt, '%T') + '.'
+ + string.lpad(dt.getMilliseconds(), '0', 3);
+ // Pos and neg numbers are both truthy; only
+ // zero is falsy
+ if (off && !opts.utc) {
+ str += off > 0 ? '-' : '+';
+ offHours = parseInt(off / 60, 10);
+ str += string.lpad(offHours, '0', 2);
+ offMinutes = off % 60;
+ if (offMinutes) {
+ str += string.lpad(offMinutes, '0', 2);
+ }
+ }
+ else {
+ str += 'Z';
+ }
+ return str;
+ };
+
+ // Alias
+ this.toIso8601 = this.toISO8601;
+
+ this.toUTC = function (dt) {
+ return new Date(
+ dt.getUTCFullYear()
+ , dt.getUTCMonth()
+ , dt.getUTCDate()
+ , dt.getUTCHours()
+ , dt.getUTCMinutes()
+ , dt.getUTCSeconds()
+ , dt.getUTCMilliseconds());
+ };
+
+})();
+
+module.exports = date;
+
+
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/jake/node_modules/utilities/lib/event_buffer.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/jake/node_modules/utilities/lib/event_buffer.js b/blackberry10/node_modules/jake/node_modules/utilities/lib/event_buffer.js
new file mode 100644
index 0000000..3e224c8
--- /dev/null
+++ b/blackberry10/node_modules/jake/node_modules/utilities/lib/event_buffer.js
@@ -0,0 +1,109 @@
+/*
+ * Utilities: A classic collection of JavaScript utilities
+ * Copyright 2112 Matthew Eernisse (mde@fleegix.org)
+ *
+ * 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.
+ *
+*/
+
+/*
+This is a very simple buffer for a predetermined set of events. It is unbounded.
+It forwards all arguments to any outlet emitter attached with sync().
+
+Example:
+ var source = new Stream()
+ , dest = new EventEmitter()
+ , buff = new EventBuffer(source)
+ , data = '';
+ dest.on('data', function (d) { data += d; });
+ source.writeable = true;
+ source.readable = true;
+ source.emit('data', 'abcdef');
+ source.emit('data', '123456');
+ buff.sync(dest);
+*/
+
+/**
+ @name EventBuffer
+ @namespace EventBuffer
+ @constructor
+*/
+
+var EventBuffer = function (src, events) {
+ // By default, we service the default stream events
+ var self = this
+ , streamEvents = ['data', 'end', 'error', 'close', 'fd', 'drain', 'pipe'];
+ this.events = events || streamEvents;
+ this.emitter = src;
+ this.eventBuffer = [];
+ this.outlet = null;
+ this.events.forEach(function (name) {
+ self.emitter.addListener(name, function () {
+ self.proxyEmit(name, arguments);
+ });
+ });
+};
+
+EventBuffer.prototype = new (function () {
+ /**
+ @name EventBuffer#proxyEmit
+ @public
+ @function
+ @description Emit an event by name and arguments or add it to the buffer if
+ no outlet is set
+ @param {String} name The name to use for the event
+ @param {Array} args An array of arguments to emit
+ */
+ this.proxyEmit = function (name, args) {
+ if (this.outlet) {
+ this.emit(name, args);
+ }
+ else {
+ this.eventBuffer.push({name: name, args: args});
+ }
+ };
+
+ /**
+ @name EventBuffer#emit
+ @public
+ @function
+ @description Emit an event by name and arguments
+ @param {String} name The name to use for the event
+ @param {Array} args An array of arguments to emit
+ */
+ this.emit = function (name, args) {
+ // Prepend name to args
+ var outlet = this.outlet;
+ Array.prototype.splice.call(args, 0, 0, name);
+ outlet.emit.apply(outlet, args);
+ };
+
+ /**
+ @name EventBuffer#sync
+ @public
+ @function
+ @description Flush the buffer and continue piping new events to the outlet
+ @param {Object} outlet The emitter to send events to
+ */
+ this.sync = function (outlet) {
+ var buffer = this.eventBuffer
+ , bufferItem;
+ this.outlet = outlet;
+ while ((bufferItem = buffer.shift())) {
+ this.emit(bufferItem.name, bufferItem.args);
+ }
+ };
+})();
+EventBuffer.prototype.constructor = EventBuffer;
+
+module.exports.EventBuffer = EventBuffer;
[11/51] [partial] CB-6346 - Add node_modules to source control
Posted by bh...@apache.org.
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/Cakefile
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/Cakefile b/blackberry10/node_modules/plugman/node_modules/dep-graph/Cakefile
new file mode 100644
index 0000000..8d01ac0
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/Cakefile
@@ -0,0 +1,51 @@
+fs = require 'fs'
+{print} = require 'util'
+{spawn, exec} = require 'child_process'
+watchit = require 'watchit'
+
+build = (watch, callback) ->
+ if typeof watch is 'function'
+ callback = watch
+ watch = false
+ options = ['-c', '-o', 'lib', 'src']
+ options.unshift '-w' if watch
+
+ coffee = spawn 'coffee', options
+ coffee.stdout.on 'data', (data) -> print data.toString()
+ coffee.stderr.on 'data', (data) -> print data.toString()
+ coffee.on 'exit', (status) -> callback?() if status is 0
+
+task 'docs', 'Generate annotated source code with Docco', ->
+ fs.readdir 'src', (err, contents) ->
+ files = ("src/#{file}" for file in contents when /\.coffee$/.test file)
+ docco = spawn 'docco', files
+ docco.stdout.on 'data', (data) -> print data.toString()
+ docco.stderr.on 'data', (data) -> print data.toString()
+ docco.on 'exit', (status) -> callback?() if status is 0
+
+task 'build', 'Compile CoffeeScript source files', ->
+ build()
+
+task 'watch', 'Recompile CoffeeScript source files when modified', ->
+ build true
+
+task 'test', 'Run the test suite (and re-run if anything changes)', ->
+ suite = null
+ build ->
+ do runTests = ->
+ suite?.kill()
+ suiteNames = ['test']
+ suiteIndex = 0
+ do runNextTestSuite = ->
+ return unless suiteName = suiteNames[suiteIndex]
+ suite = spawn "coffee", ["-e", "{reporters} = require 'nodeunit'; reporters.default.run ['#{suiteName}.coffee']"], cwd: 'test'
+ suite.stdout.on 'data', (data) -> print data.toString()
+ suite.stderr.on 'data', (data) -> print data.toString()
+ suite.on 'exit', -> suiteIndex++; runNextTestSuite()
+ invoke 'docs' # lest I forget
+ watchTargets = (targets..., callback) ->
+ for target in targets
+ watchit target, include: true, (event) ->
+ callback() unless event is 'success'
+ watchTargets 'src', -> build runTests
+ watchTargets 'test', 'Cakefile', runTests
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/README.mdown
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/README.mdown b/blackberry10/node_modules/plugman/node_modules/dep-graph/README.mdown
new file mode 100644
index 0000000..8f1a023
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/README.mdown
@@ -0,0 +1,40 @@
+# dep-graph.js
+
+This is a small project spun off from [connect-assets](http://github.com/TrevorBurnham/connect-assets). Written in [CoffeeScript](coffeescript.org) by the author of [CoffeeScript: Accelerated JavaScript Development](http://pragprog.com/book/tbcoffee/coffeescript).
+
+## What's it for?
+
+Say you have a set of resources that depend on each other in some way. These resources can be anything—files, chains of command, plot twists on *Lost*—whatever. All that matters is that each one has a unique string identifier, and a list of direct dependencies.
+
+`dep-graph` makes it easy to compute "chains" of dependencies, with guaranteed logical ordering and no duplicates. That's trivial in most cases, but if `A` depends on `B` and `B` depends on `A`, a naïve dependency graph would get trapped in an infinite loop. `dep-graph` throws an error if any such "cycles" are detected.
+
+## How to use it?
+
+### In the browser
+
+ deps = new DepGraph
+ deps.add 'A', 'B' # A requires B
+ deps.add 'B', 'C' # B requires C
+ deps.getChain 'A' # ['C', 'B', 'A']
+
+### In Node.js
+
+Same as above, but first run
+
+ npm install dep-graph
+
+from your project's directory, and put
+
+ DepGraph = require 'dep-graph'
+
+at the top of your file.
+
+## License
+
+©2011 Trevor Burnham and available under the [MIT license](http://www.opensource.org/licenses/mit-license.php):
+
+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
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/docs/dep-graph.html
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/docs/dep-graph.html b/blackberry10/node_modules/plugman/node_modules/dep-graph/docs/dep-graph.html
new file mode 100644
index 0000000..bccdc35
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/docs/dep-graph.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html> <html> <head> <title>dep-graph.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> dep-graph.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">¶</a> </div> <p><a href="http://github.com/TrevorBurnham/dep-graph">dep-graph</a></p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">_ = </span><span class="nx">require</span> <span class="s1">'un
derscore'</span>
+
+<span class="k">class</span> <span class="nx">DepGraph</span>
+ <span class="nv">constructor: </span><span class="o">-></span></pre></div> </td> </tr> <tr id="section-2"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-2">¶</a> </div> <p>The internal representation of the dependency graph in the format
+<code>id: [ids]</code>, indicating only <em>direct</em> dependencies.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="vi">@map = </span><span class="p">{}</span></pre></div> </td> </tr> <tr id="section-3"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-3">¶</a> </div> <p>Add a direct dependency. Returns <code>false</code> if that dependency is a duplicate.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">add: </span><span class="nf">(id, depId) -></span>
+ <span class="nx">@map</span><span class="p">[</span><span class="nx">id</span><span class="p">]</span> <span class="o">?=</span> <span class="p">[]</span>
+ <span class="k">return</span> <span class="kc">false</span> <span class="k">if</span> <span class="nx">depId</span> <span class="k">in</span> <span class="nx">@map</span><span class="p">[</span><span class="nx">id</span><span class="p">]</span>
+ <span class="nx">@map</span><span class="p">[</span><span class="nx">id</span><span class="p">].</span><span class="nx">push</span> <span class="nx">depId</span>
+ <span class="nx">@map</span><span class="p">[</span><span class="nx">id</span><span class="p">]</span></pre></div> </td> </tr> <tr id="section-4"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-4">¶</a> </div> <p>Generate a list of all dependencies (direct and indirect) for the given id,
+in logical order with no duplicates.</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">getChain: </span><span class="nf">(id) -></span></pre></div> </td> </tr> <tr id="section-5"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-5">¶</a> </div> <p>First, get a list of all dependencies (unordered)</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">deps = </span><span class="nx">@descendantsOf</span> <span class="nx">id</span></pre></div> </td> </tr> <tr id="section-6"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-6">¶</a> </div> <p>Second, order them (us
ing the Tarjan algorithm)</p> </td> <td class="code"> <div class="highlight"><pre> <span class="nv">chain = </span><span class="p">[]</span>
+ <span class="nv">visited = </span><span class="p">{}</span>
+ <span class="nv">visit = </span><span class="p">(</span><span class="nx">node</span><span class="p">)</span> <span class="o">=></span>
+ <span class="k">return</span> <span class="k">if</span> <span class="nx">visited</span><span class="p">[</span><span class="nx">node</span><span class="p">]</span> <span class="o">or</span> <span class="nx">node</span> <span class="o">is</span> <span class="nx">id</span>
+ <span class="nx">visited</span><span class="p">[</span><span class="nx">node</span><span class="p">]</span> <span class="o">=</span> <span class="kc">true</span>
+ <span class="k">for</span> <span class="nx">parent</span> <span class="k">in</span> <span class="nx">@parentsOf</span><span class="p">(</span><span class="nx">node</span><span class="p">)</span>
+ <span class="nx">visit</span> <span class="nx">parent</span>
+ <span class="nx">chain</span><span class="p">.</span><span class="nx">unshift</span> <span class="nx">node</span>
+
+ <span class="k">for</span> <span class="nx">leafNode</span> <span class="k">in</span> <span class="nx">_</span><span class="p">.</span><span class="nx">intersection</span><span class="p">(</span><span class="nx">deps</span><span class="p">,</span> <span class="nx">@leafNodes</span><span class="p">()).</span><span class="nx">reverse</span><span class="p">()</span>
+ <span class="nx">visit</span> <span class="nx">leafNode</span>
+
+ <span class="nx">chain</span>
+
+ <span class="nv">leafNodes: </span><span class="o">-></span>
+ <span class="nv">allNodes = </span><span class="nx">_</span><span class="p">.</span><span class="nx">uniq</span> <span class="nx">_</span><span class="p">.</span><span class="nx">flatten</span> <span class="nx">_</span><span class="p">.</span><span class="nx">values</span> <span class="nx">@map</span>
+ <span class="nx">node</span> <span class="k">for</span> <span class="nx">node</span> <span class="k">in</span> <span class="nx">allNodes</span> <span class="k">when</span> <span class="o">!</span><span class="nx">@map</span><span class="p">[</span><span class="nx">node</span><span class="p">]</span><span class="o">?</span><span class="p">.</span><span class="nx">length</span>
+
+ <span class="nv">parentsOf: </span><span class="nf">(child) -></span>
+ <span class="nx">node</span> <span class="k">for</span> <span class="nx">node</span> <span class="k">in</span> <span class="nx">_</span><span class="p">.</span><span class="nx">keys</span><span class="p">(</span><span class="nx">@map</span><span class="p">)</span> <span class="k">when</span> <span class="nx">child</span> <span class="k">in</span> <span class="nx">@map</span><span class="p">[</span><span class="nx">node</span><span class="p">]</span>
+
+ <span class="nv">descendantsOf: </span><span class="nf">(parent, descendants = [], branch = []) -></span>
+ <span class="nx">descendants</span><span class="p">.</span><span class="nx">push</span> <span class="nx">parent</span>
+ <span class="nx">branch</span><span class="p">.</span><span class="nx">push</span> <span class="nx">parent</span>
+ <span class="k">for</span> <span class="nx">child</span> <span class="k">in</span> <span class="nx">@map</span><span class="p">[</span><span class="nx">parent</span><span class="p">]</span> <span class="o">?</span> <span class="p">[]</span>
+ <span class="k">if</span> <span class="nx">child</span> <span class="k">in</span> <span class="nx">branch</span> <span class="c1"># cycle</span>
+ <span class="k">throw</span> <span class="k">new</span> <span class="nb">Error</span><span class="p">(</span><span class="s2">"Cyclic dependency from #{parent} to #{child}"</span><span class="p">)</span>
+ <span class="k">continue</span> <span class="k">if</span> <span class="nx">child</span> <span class="k">in</span> <span class="nx">descendants</span> <span class="c1"># duplicate</span>
+ <span class="nx">@descendantsOf</span> <span class="nx">child</span><span class="p">,</span> <span class="nx">descendants</span><span class="p">,</span> <span class="nx">branch</span><span class="p">.</span><span class="nx">slice</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
+ <span class="nx">descendants</span><span class="p">[</span><span class="mi">1</span><span class="p">..]</span></pre></div> </td> </tr> <tr id="section-7"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-7">¶</a> </div> <p>Export the class in Node, make it global in the browser.</p> </td> <td class="code"> <div class="highlight"><pre><span class="k">if</span> <span class="nx">module</span><span class="o">?</span><span class="p">.</span><span class="nx">exports</span><span class="o">?</span>
+ <span class="nv">module.exports = </span><span class="nx">DepGraph</span>
+<span class="k">else</span>
+ <span class="vi">@DepGraph = </span><span class="nx">DepGraph</span>
+
+</pre></div> </td> </tr> </tbody> </table> </div> </body> </html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/docs/docco.css
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/docs/docco.css b/blackberry10/node_modules/plugman/node_modules/dep-graph/docs/docco.css
new file mode 100644
index 0000000..5aa0a8d
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/docs/docco.css
@@ -0,0 +1,186 @@
+/*--------------------- 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;
+}
+h1, h2, h3, h4, h5, h6 {
+ margin: 0px 0 15px 0;
+}
+ h1 {
+ margin-top: 40px;
+ }
+#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: 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
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/lib/dep-graph.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/lib/dep-graph.js b/blackberry10/node_modules/plugman/node_modules/dep-graph/lib/dep-graph.js
new file mode 100644
index 0000000..d3b2401
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/lib/dep-graph.js
@@ -0,0 +1,115 @@
+// Generated by CoffeeScript 1.3.3
+(function() {
+ var DepGraph, _,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+ _ = require('underscore');
+
+ DepGraph = (function() {
+
+ function DepGraph() {
+ this.map = {};
+ }
+
+ DepGraph.prototype.add = function(id, depId) {
+ var _base, _ref;
+ if ((_ref = (_base = this.map)[id]) == null) {
+ _base[id] = [];
+ }
+ if (__indexOf.call(this.map[id], depId) >= 0) {
+ return false;
+ }
+ this.map[id].push(depId);
+ return this.map[id];
+ };
+
+ DepGraph.prototype.getChain = function(id) {
+ var chain, deps, leafNode, visit, visited, _i, _len, _ref,
+ _this = this;
+ deps = this.descendantsOf(id);
+ chain = [];
+ visited = {};
+ visit = function(node) {
+ var parent, _i, _len, _ref;
+ if (visited[node] || node === id) {
+ return;
+ }
+ visited[node] = true;
+ _ref = _this.parentsOf(node);
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ parent = _ref[_i];
+ if (__indexOf.call(deps, parent) >= 0) {
+ visit(parent);
+ }
+ }
+ return chain.unshift(node);
+ };
+ _ref = _.intersection(deps, this.leafNodes()).reverse();
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ leafNode = _ref[_i];
+ visit(leafNode);
+ }
+ return chain;
+ };
+
+ DepGraph.prototype.leafNodes = function() {
+ var allNodes, node, _i, _len, _ref, _results;
+ allNodes = _.uniq(_.flatten(_.values(this.map)));
+ _results = [];
+ for (_i = 0, _len = allNodes.length; _i < _len; _i++) {
+ node = allNodes[_i];
+ if (!((_ref = this.map[node]) != null ? _ref.length : void 0)) {
+ _results.push(node);
+ }
+ }
+ return _results;
+ };
+
+ DepGraph.prototype.parentsOf = function(child) {
+ var node, _i, _len, _ref, _results;
+ _ref = _.keys(this.map);
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ node = _ref[_i];
+ if (__indexOf.call(this.map[node], child) >= 0) {
+ _results.push(node);
+ }
+ }
+ return _results;
+ };
+
+ DepGraph.prototype.descendantsOf = function(parent, descendants, branch) {
+ var child, _i, _len, _ref, _ref1;
+ if (descendants == null) {
+ descendants = [];
+ }
+ if (branch == null) {
+ branch = [];
+ }
+ descendants.push(parent);
+ branch.push(parent);
+ _ref1 = (_ref = this.map[parent]) != null ? _ref : [];
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ child = _ref1[_i];
+ if (__indexOf.call(branch, child) >= 0) {
+ throw new Error("Cyclic dependency from " + parent + " to " + child);
+ }
+ if (__indexOf.call(descendants, child) >= 0) {
+ continue;
+ }
+ this.descendantsOf(child, descendants, branch.slice(0));
+ }
+ return descendants.slice(1);
+ };
+
+ return DepGraph;
+
+ })();
+
+ if ((typeof module !== "undefined" && module !== null ? module.exports : void 0) != null) {
+ module.exports = DepGraph;
+ } else {
+ this.DepGraph = DepGraph;
+ }
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/.npmignore b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/.npmignore
new file mode 100644
index 0000000..2ce2684
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/.npmignore
@@ -0,0 +1,3 @@
+test/
+Rakefile
+docs/
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/LICENSE b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/LICENSE
new file mode 100644
index 0000000..58c73b9
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2011 Jeremy Ashkenas, DocumentCloud
+
+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
http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/README
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/README b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/README
new file mode 100644
index 0000000..408145a
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/dep-graph/node_modules/underscore/README
@@ -0,0 +1,19 @@
+ __
+ /\ \ __
+ __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____
+/\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\
+\ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\
+ \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/
+ \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/
+ \ \____/
+ \/___/
+
+Underscore is a utility-belt library for JavaScript that provides
+support for the usual functional suspects (each, map, reduce, filter...)
+without extending any core JavaScript objects.
+
+For Docs, License, Tests, and pre-packed downloads, see:
+http://documentcloud.github.com/underscore/
+
+Many thanks to our contributors:
+https://github.com/documentcloud/underscore/contributors