diff options
author | Bert Belder <bertbelder@gmail.com> | 2012-08-28 04:54:22 +0400 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2012-08-28 04:54:22 +0400 |
commit | bf16d9280ea7aadce5c5437184c1d80e651a997a (patch) | |
tree | 85c570a9c80181c9bd84ce8bcc726d644daa36db | |
parent | 4822d780bb913c9ef7c2301a181a5834887cddb4 (diff) | |
parent | 24184345688e1f545ffc87e5742de06ed9855007 (diff) |
Merge branch 'v0.8'
Conflicts:
ChangeLog
deps/openssl/openssl.gyp
src/node_version.h
231 files changed, 6590 insertions, 2029 deletions
@@ -356,3 +356,4 @@ Eugen Dueck <eugen@dueck.org> Gil Pedersen <git@gpost.dk> Tyler Neylon <tylerneylon@gmail.com> Golo Roden <webmaster@goloroden.de> +Ron Korving <rkorving@wizcorp.jp> diff --git a/ChangeLog b/ChangeLog index d2ea9ef0338..e2deb035304 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,7 +21,32 @@ * Fix #3521 Make process.env more like a regular Object (isaacs) -2012.08.15, Version 0.8.7 (Stable) +2012.08.22, Version 0.8.8 (Stable) + +* V8: upgrade to 3.11.10.19 + +* npm: upgrade to 1.1.59 + +* windows: fix uninitialized memory access in uv_update_time() (Bert Belder) + +* unix, windows: fix memory corruption in fs-poll.c (Ben Noordhuis) + +* unix: fix integer overflow in uv_hrtime (Tim Holy) + +* sunos: fix uv_cpu_info() on x86_64 (Ben Noordhuis) + +* tls: update default cipher list (Ben Noordhuis) + +* unix: Fix llvm and older gcc duplicate symbol warnings (Bert Belder) + +* fs: fix use after free in stat watcher (Ben Noordhuis) + +* build: Fix using manually compiled gcc on OS X (Nathan Rajlich) + +* windows: make junctions work again (Bert Belder) + + +2012.08.15, Version 0.8.7 (Stable), f640c5d35cba96634cd8176a525a1d876e361a61 * npm: Upgrade to 1.1.49 diff --git a/common.gypi b/common.gypi index 40d0b4562d6..f198d331296 100644 --- a/common.gypi +++ b/common.gypi @@ -66,9 +66,12 @@ }, { 'cflags!': [ '-ffunction-sections', '-fdata-sections' ], }], - ['clang==1 or gcc_version >= 40', { + ['clang == 0 and gcc_version >= 40', { 'cflags': [ '-fno-tree-vrp' ], }], + ['clang == 0 and gcc_version <= 44', { + 'cflags': [ '-fno-tree-sink' ], + }], ], }], ['OS=="solaris"', { @@ -190,7 +193,6 @@ 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics 'GCC_VERSION': '4.2', - 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof 'PREBINDING': 'NO', # No -Wl,-prebind 'MACOSX_DEPLOYMENT_TARGET': '10.5', # -mmacosx-version-min=10.5 'USE_HEADERMAP': 'NO', diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml deleted file mode 100644 index a385519bd15..00000000000 --- a/deps/npm/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -before_install: "make &>out || cat out; rm out" -node_js: - - 0.8 diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 57fdf6afa89..d1306adb7da 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -75,3 +75,5 @@ Don Park <donpark@docuverse.com> Kei Son <heyacct@gmail.com> Nicolas Morel <marsup@gmail.com> Mark Dube <markisdee@gmail.com> +Maxim Bogushevich <boga1@mail.ru> +Justin Beckwith <justbe@microsoft.com> diff --git a/deps/npm/doc/cli/config.md b/deps/npm/doc/cli/config.md index feac9b35b5d..cdfc61e2d00 100644 --- a/deps/npm/doc/cli/config.md +++ b/deps/npm/doc/cli/config.md @@ -550,6 +550,15 @@ The url to report npat test results. A node module to `require()` when npm loads. Useful for programmatic usage. +### optional + +* Default: true +* Type: Boolean + +Attempt to install packages in the `optionalDependencies` hash. Note +that if these packages fail to install, the overall installation +process is not aborted. + ### parseable * Default: false diff --git a/deps/npm/doc/cli/dedupe.md b/deps/npm/doc/cli/dedupe.md new file mode 100644 index 00000000000..220329acb8c --- /dev/null +++ b/deps/npm/doc/cli/dedupe.md @@ -0,0 +1,53 @@ +npm-dedupe(1) -- Reduce duplication +=================================== + +## SYNOPSIS + + npm dedupe [package names...] + +## DESCRIPTION + +Searches the local package tree and attempts to simplify the overall +structure by moving dependencies further up the tree, where they can +be more effectively shared by multiple dependent packages. + +For example, consider this dependency graph: + + a + +-- b <-- depends on c@1.0.x + | `-- c@1.0.3 + `-- d <-- depends on c@~1.0.9 + `-- c@1.0.10 + +In this case, `npm-dedupe(1)` will transform the tree to: + + a + +-- b + +-- d + `-- c@1.0.10 + +Because of the hierarchical nature of node's module lookup, b and d +will both get their dependency met by the single c package at the root +level of the tree. + +If a suitable version exists at the target location in the tree +already, then it will be left untouched, but the other duplicates will +be deleted. + +If no suitable version can be found, then a warning is printed, and +nothing is done. + +If any arguments are supplied, then they are filters, and only the +named packages will be touched. + +Note that this operation transforms the dependency tree, and may +result in packages getting updated versions, perhaps from the npm +registry. + +This feature is experimental, and may change in future versions. + +## SEE ALSO + +* npm-ls(1) +* npm-update(1) +* npm-install(1) diff --git a/deps/npm/doc/cli/index.md b/deps/npm/doc/cli/index.md index ee88f3d8f37..b2ffd131797 100644 --- a/deps/npm/doc/cli/index.md +++ b/deps/npm/doc/cli/index.md @@ -46,6 +46,10 @@ npm-index(1) -- Index of all npm documentation Manage the npm configuration file +## npm-dedupe(1) + + Reduce duplication + ## npm-deprecate(1) Deprecate a version of a package diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index d3650c27777..1c24be26a4e 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -19,7 +19,7 @@ <p>This function should not be used programmatically. Instead, just refer to the <code>npm.bin</code> member.</p> </div> -<p id="footer">bin — npm@1.1.49</p> +<p id="footer">bin — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/bugs.html b/deps/npm/html/api/bugs.html index 41c5d2bfbe3..c1cee4abf34 100644 --- a/deps/npm/html/api/bugs.html +++ b/deps/npm/html/api/bugs.html @@ -25,7 +25,7 @@ optional version number.</p> <p>This command will launch a browser, so this command may not be the most friendly for programmatic use.</p> </div> -<p id="footer">bugs — npm@1.1.49</p> +<p id="footer">bugs — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/commands.html b/deps/npm/html/api/commands.html index 2003aca946a..d9a6460ea3e 100644 --- a/deps/npm/html/api/commands.html +++ b/deps/npm/html/api/commands.html @@ -28,7 +28,7 @@ usage, or <code>man 3 npm-<command></code> for programmatic usage.</p> <ul><li><a href="../doc/index.html">index(1)</a></li></ul> </div> -<p id="footer">commands — npm@1.1.49</p> +<p id="footer">commands — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/config.html b/deps/npm/html/api/config.html index 01e720390bb..6ce481e829e 100644 --- a/deps/npm/html/api/config.html +++ b/deps/npm/html/api/config.html @@ -33,7 +33,7 @@ functions instead.</p> <ul><li><a href="../api/npm.html">npm(3)</a></li></ul> </div> -<p id="footer">config — npm@1.1.49</p> +<p id="footer">config — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/deprecate.html b/deps/npm/html/api/deprecate.html index 2ba085bd2a4..3c9ed3371b0 100644 --- a/deps/npm/html/api/deprecate.html +++ b/deps/npm/html/api/deprecate.html @@ -30,7 +30,7 @@ install the package.</p></li></ul> <ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../api/unpublish.html">unpublish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul> </div> -<p id="footer">deprecate — npm@1.1.49</p> +<p id="footer">deprecate — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/docs.html b/deps/npm/html/api/docs.html index 79e6b98f395..1c2f29c4826 100644 --- a/deps/npm/html/api/docs.html +++ b/deps/npm/html/api/docs.html @@ -25,7 +25,7 @@ optional version number.</p> <p>This command will launch a browser, so this command may not be the most friendly for programmatic use.</p> </div> -<p id="footer">docs — npm@1.1.49</p> +<p id="footer">docs — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/edit.html b/deps/npm/html/api/edit.html index 576a866c0ef..e00d1f2f526 100644 --- a/deps/npm/html/api/edit.html +++ b/deps/npm/html/api/edit.html @@ -30,7 +30,7 @@ to open. The package can optionally have a version number attached.</p> <p>Since this command opens an editor in a new process, be careful about where and how this is used.</p> </div> -<p id="footer">edit — npm@1.1.49</p> +<p id="footer">edit — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/explore.html b/deps/npm/html/api/explore.html index 92dcc7d8c7d..18b86b16d15 100644 --- a/deps/npm/html/api/explore.html +++ b/deps/npm/html/api/explore.html @@ -24,7 +24,7 @@ sure to use <code>npm rebuild <pkg></code> if you make any changes.</p> <p>The first element in the 'args' parameter must be a package name. After that is the optional command, which can be any number of strings. All of the strings will be combined into one, space-delimited command.</p> </div> -<p id="footer">explore — npm@1.1.49</p> +<p id="footer">explore — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/help-search.html b/deps/npm/html/api/help-search.html index 5ca7c756816..d6fc3e5d7fa 100644 --- a/deps/npm/html/api/help-search.html +++ b/deps/npm/html/api/help-search.html @@ -32,7 +32,7 @@ Name of the file that matched</li></ul> <p>The silent parameter is not neccessary not used, but it may in the future.</p> </div> -<p id="footer">help-search — npm@1.1.49</p> +<p id="footer">help-search — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/init.html b/deps/npm/html/api/init.html index 720ef2b4632..f26eeffe686 100644 --- a/deps/npm/html/api/init.html +++ b/deps/npm/html/api/init.html @@ -35,7 +35,7 @@ then go ahead and use this programmatically.</p> <p><a href="../doc/json.html">json(1)</a></p> </div> -<p id="footer">init — npm@1.1.49</p> +<p id="footer">init — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/install.html b/deps/npm/html/api/install.html index 6faf410bf95..29179c0b3ca 100644 --- a/deps/npm/html/api/install.html +++ b/deps/npm/html/api/install.html @@ -25,7 +25,7 @@ the name of a package to be installed.</p> <p>Finally, 'callback' is a function that will be called when all packages have been installed or when an error has been encountered.</p> </div> -<p id="footer">install — npm@1.1.49</p> +<p id="footer">install — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/link.html b/deps/npm/html/api/link.html index 28334bc31ba..c992db10a89 100644 --- a/deps/npm/html/api/link.html +++ b/deps/npm/html/api/link.html @@ -39,7 +39,7 @@ npm.commands.link('redis', cb) # link-install the package</code></pre> <p>Now, any changes to the redis package will be reflected in the package in the current working directory</p> </div> -<p id="footer">link — npm@1.1.49</p> +<p id="footer">link — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/load.html b/deps/npm/html/api/load.html index 075e1aa43f1..325aa1336ac 100644 --- a/deps/npm/html/api/load.html +++ b/deps/npm/html/api/load.html @@ -32,7 +32,7 @@ config object.</p> <p>For a list of all the available command-line configs, see <code>npm help config</code></p> </div> -<p id="footer">load — npm@1.1.49</p> +<p id="footer">load — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/ls.html b/deps/npm/html/api/ls.html index 8eeb35b406f..c777eaedada 100644 --- a/deps/npm/html/api/ls.html +++ b/deps/npm/html/api/ls.html @@ -59,7 +59,7 @@ project.</p> This means that if a submodule a same dependency as a parent module, then the dependency will only be output once.</p> </div> -<p id="footer">ls — npm@1.1.49</p> +<p id="footer">ls — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/npm.html b/deps/npm/html/api/npm.html index e761aee1c53..d91485312a8 100644 --- a/deps/npm/html/api/npm.html +++ b/deps/npm/html/api/npm.html @@ -24,7 +24,7 @@ npm.load(configObject, function (er, npm) { <h2 id="VERSION">VERSION</h2> -<p>1.1.49</p> +<p>1.1.59</p> <h2 id="DESCRIPTION">DESCRIPTION</h2> @@ -91,7 +91,7 @@ method names. Use the <code>npm.deref</code> method to find the real name.</p> <pre><code>var cmd = npm.deref("unp") // cmd === "unpublish"</code></pre> </div> -<p id="footer">npm — npm@1.1.49</p> +<p id="footer">npm — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/outdated.html b/deps/npm/html/api/outdated.html index e867abf73b7..2d105e9f897 100644 --- a/deps/npm/html/api/outdated.html +++ b/deps/npm/html/api/outdated.html @@ -19,7 +19,7 @@ currently outdated.</p> <p>If the 'packages' parameter is left out, npm will check all packages.</p> </div> -<p id="footer">outdated — npm@1.1.49</p> +<p id="footer">outdated — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/owner.html b/deps/npm/html/api/owner.html index df85a9dddb4..0f488c7f244 100644 --- a/deps/npm/html/api/owner.html +++ b/deps/npm/html/api/owner.html @@ -34,7 +34,7 @@ that is not implemented at this time.</p> <ul><li><a href="../api/publish.html">publish(3)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul> </div> -<p id="footer">owner — npm@1.1.49</p> +<p id="footer">owner — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/pack.html b/deps/npm/html/api/pack.html index 0409c5c949c..62249e5ada3 100644 --- a/deps/npm/html/api/pack.html +++ b/deps/npm/html/api/pack.html @@ -25,7 +25,7 @@ overwritten the second time.</p> <p>If no arguments are supplied, then npm packs the current package folder.</p> </div> -<p id="footer">pack — npm@1.1.49</p> +<p id="footer">pack — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/prefix.html b/deps/npm/html/api/prefix.html index ecc978e7202..8f77d72bc67 100644 --- a/deps/npm/html/api/prefix.html +++ b/deps/npm/html/api/prefix.html @@ -21,7 +21,7 @@ <p>This function is not useful programmatically</p> </div> -<p id="footer">prefix — npm@1.1.49</p> +<p id="footer">prefix — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/prune.html b/deps/npm/html/api/prune.html index 6b9c3a88922..4e54f1646e3 100644 --- a/deps/npm/html/api/prune.html +++ b/deps/npm/html/api/prune.html @@ -23,7 +23,7 @@ <p>Extraneous packages are packages that are not listed on the parent package's dependencies list.</p> </div> -<p id="footer">prune — npm@1.1.49</p> +<p id="footer">prune — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/publish.html b/deps/npm/html/api/publish.html index 48dce3f7a34..d5e109a4ffe 100644 --- a/deps/npm/html/api/publish.html +++ b/deps/npm/html/api/publish.html @@ -32,7 +32,7 @@ the registry. Overwrites when the "force" environment variable is set <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../api/owner.html">owner(3)</a></li></ul> </div> -<p id="footer">publish — npm@1.1.49</p> +<p id="footer">publish — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/rebuild.html b/deps/npm/html/api/rebuild.html index dcde5ae6f7f..6c346426c0c 100644 --- a/deps/npm/html/api/rebuild.html +++ b/deps/npm/html/api/rebuild.html @@ -22,7 +22,7 @@ the new binary. If no 'packages' parameter is specify, every package wil <p>See <code>npm help build</code></p> </div> -<p id="footer">rebuild — npm@1.1.49</p> +<p id="footer">rebuild — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/restart.html b/deps/npm/html/api/restart.html index 7edf903a101..2346846feb3 100644 --- a/deps/npm/html/api/restart.html +++ b/deps/npm/html/api/restart.html @@ -27,7 +27,7 @@ in the <code>packages</code> parameter.</p> <ul><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul> </div> -<p id="footer">restart — npm@1.1.49</p> +<p id="footer">restart — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/root.html b/deps/npm/html/api/root.html index 4237ca80e1b..f57131dcee7 100644 --- a/deps/npm/html/api/root.html +++ b/deps/npm/html/api/root.html @@ -21,7 +21,7 @@ <p>This function is not useful programmatically.</p> </div> -<p id="footer">root — npm@1.1.49</p> +<p id="footer">root — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/run-script.html b/deps/npm/html/api/run-script.html index 3ee6d888953..4fb0bc7f066 100644 --- a/deps/npm/html/api/run-script.html +++ b/deps/npm/html/api/run-script.html @@ -29,7 +29,7 @@ assumed to be the command to run. All other elements are ignored.</p> <ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../api/test.html">test(3)</a></li><li><a href="../api/start.html">start(3)</a></li><li><a href="../api/restart.html">restart(3)</a></li><li><a href="../api/stop.html">stop(3)</a></li></ul> </div> -<p id="footer">run-script — npm@1.1.49</p> +<p id="footer">run-script — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/search.html b/deps/npm/html/api/search.html index 4d9ce2b1591..6db1f60d407 100644 --- a/deps/npm/html/api/search.html +++ b/deps/npm/html/api/search.html @@ -32,7 +32,7 @@ excluded term (the "searchexclude" config). The search is case insensi and doesn't try to read your mind (it doesn't do any verb tense matching or the like).</p> </div> -<p id="footer">search — npm@1.1.49</p> +<p id="footer">search — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/shrinkwrap.html b/deps/npm/html/api/shrinkwrap.html index 2667ac658bf..d1b675a2a13 100644 --- a/deps/npm/html/api/shrinkwrap.html +++ b/deps/npm/html/api/shrinkwrap.html @@ -26,7 +26,7 @@ but the shrinkwrap file will still be written.</p> <p>Finally, 'callback' is a function that will be called when the shrinkwrap has been saved.</p> </div> -<p id="footer">shrinkwrap — npm@1.1.49</p> +<p id="footer">shrinkwrap — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/start.html b/deps/npm/html/api/start.html index 8f5c26fffd2..f560b331f0a 100644 --- a/deps/npm/html/api/start.html +++ b/deps/npm/html/api/start.html @@ -19,7 +19,7 @@ <p>npm can run tests on multiple packages. Just specify multiple packages in the <code>packages</code> parameter.</p> </div> -<p id="footer">start — npm@1.1.49</p> +<p id="footer">start — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/stop.html b/deps/npm/html/api/stop.html index 8888693a3f1..91378a72c6b 100644 --- a/deps/npm/html/api/stop.html +++ b/deps/npm/html/api/stop.html @@ -19,7 +19,7 @@ <p>npm can run stop on multiple packages. Just specify multiple packages in the <code>packages</code> parameter.</p> </div> -<p id="footer">stop — npm@1.1.49</p> +<p id="footer">stop — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/submodule.html b/deps/npm/html/api/submodule.html index c9a6fc4a74a..50c07cdf8b4 100644 --- a/deps/npm/html/api/submodule.html +++ b/deps/npm/html/api/submodule.html @@ -33,7 +33,7 @@ dependencies into the submodule folder.</p> <ul><li>npm help json</li><li>git help submodule</li></ul> </div> -<p id="footer">submodule — npm@1.1.49</p> +<p id="footer">submodule — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/tag.html b/deps/npm/html/api/tag.html index dc8e9e416b9..7da49c04345 100644 --- a/deps/npm/html/api/tag.html +++ b/deps/npm/html/api/tag.html @@ -29,7 +29,7 @@ parameter is missing or falsey (empty), the default froom the config will be used. For more information about how to set this config, check <code>man 3 npm-config</code> for programmatic usage or <code>man npm-config</code> for cli usage.</p> </div> -<p id="footer">tag — npm@1.1.49</p> +<p id="footer">tag — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/test.html b/deps/npm/html/api/test.html index 9de59596dc8..1e23e2a3b63 100644 --- a/deps/npm/html/api/test.html +++ b/deps/npm/html/api/test.html @@ -22,7 +22,7 @@ true.</p> <p>npm can run tests on multiple packages. Just specify multiple packages in the <code>packages</code> parameter.</p> </div> -<p id="footer">test — npm@1.1.49</p> +<p id="footer">test — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/uninstall.html b/deps/npm/html/api/uninstall.html index dfdf1c6c94a..1bf715df086 100644 --- a/deps/npm/html/api/uninstall.html +++ b/deps/npm/html/api/uninstall.html @@ -22,7 +22,7 @@ the name of a package to be uninstalled.</p> <p>Finally, 'callback' is a function that will be called when all packages have been uninstalled or when an error has been encountered.</p> </div> -<p id="footer">uninstall — npm@1.1.49</p> +<p id="footer">uninstall — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/unpublish.html b/deps/npm/html/api/unpublish.html index ca4dd634a5e..66a9e957ae4 100644 --- a/deps/npm/html/api/unpublish.html +++ b/deps/npm/html/api/unpublish.html @@ -26,7 +26,7 @@ is what is meant.</p> <p>If no version is specified, or if all versions are removed then the root package entry is removed from the registry entirely.</p> </div> -<p id="footer">unpublish — npm@1.1.49</p> +<p id="footer">unpublish — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/update.html b/deps/npm/html/api/update.html index 5149b3555db..688414292e5 100644 --- a/deps/npm/html/api/update.html +++ b/deps/npm/html/api/update.html @@ -18,7 +18,7 @@ <p>The 'packages' argument is an array of packages to update. The 'callback' parameter will be called when done or when an error occurs.</p> </div> -<p id="footer">update — npm@1.1.49</p> +<p id="footer">update — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/version.html b/deps/npm/html/api/version.html index a4104a84de0..3c8f28f81af 100644 --- a/deps/npm/html/api/version.html +++ b/deps/npm/html/api/version.html @@ -24,7 +24,7 @@ fail if the repo is not clean.</p> parameter. The difference, however, is this function will fail if it does not have exactly one element. The only element should be a version number.</p> </div> -<p id="footer">version — npm@1.1.49</p> +<p id="footer">version — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/view.html b/deps/npm/html/api/view.html index 056b39b59bb..92da7f010c3 100644 --- a/deps/npm/html/api/view.html +++ b/deps/npm/html/api/view.html @@ -99,7 +99,7 @@ the field name.</p> <p>corresponding to the list of fields selected.</p> </div> -<p id="footer">view — npm@1.1.49</p> +<p id="footer">view — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/api/whoami.html b/deps/npm/html/api/whoami.html index 0c694baa897..4f566c169be 100644 --- a/deps/npm/html/api/whoami.html +++ b/deps/npm/html/api/whoami.html @@ -21,7 +21,7 @@ <p>This function is not useful programmatically</p> </div> -<p id="footer">whoami — npm@1.1.49</p> +<p id="footer">whoami — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index c97a90d1463..66e75af912b 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -240,7 +240,7 @@ will no doubt tell you to put the output in a gist or email.</p> <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul> </div> -<p id="footer"><a href="../doc/README.html">README</a> — npm@1.1.49</p> +<p id="footer"><a href="../doc/README.html">README</a> — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/adduser.html b/deps/npm/html/doc/adduser.html index 4eddcd1295b..19ae047f56c 100644 --- a/deps/npm/html/doc/adduser.html +++ b/deps/npm/html/doc/adduser.html @@ -39,7 +39,7 @@ authorize on a new machine.</p> <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li></ul> </div> -<p id="footer">adduser — npm@1.1.49</p> +<p id="footer">adduser — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/bin.html b/deps/npm/html/doc/bin.html index 211c2aab459..5dcf222019f 100644 --- a/deps/npm/html/doc/bin.html +++ b/deps/npm/html/doc/bin.html @@ -20,7 +20,7 @@ <ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">bin — npm@1.1.49</p> +<p id="footer">bin — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/bugs.html b/deps/npm/html/doc/bugs.html index e933cace771..5310fb2c26e 100644 --- a/deps/npm/html/doc/bugs.html +++ b/deps/npm/html/doc/bugs.html @@ -36,7 +36,7 @@ config param.</p> <ul><li><a href="../doc/docs.html">docs(1)</a></li><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul> </div> -<p id="footer">bugs — npm@1.1.49</p> +<p id="footer">bugs — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/build.html b/deps/npm/html/doc/build.html index d15f2ea2f71..bbbeffcb75f 100644 --- a/deps/npm/html/doc/build.html +++ b/deps/npm/html/doc/build.html @@ -25,7 +25,7 @@ A folder containing a <code>package.json</code> file in its root.</li></ul> <ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul> </div> -<p id="footer">build — npm@1.1.49</p> +<p id="footer">build — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/bundle.html b/deps/npm/html/doc/bundle.html index 40f049eb369..369b69c4d3b 100644 --- a/deps/npm/html/doc/bundle.html +++ b/deps/npm/html/doc/bundle.html @@ -20,7 +20,7 @@ install packages into the local space.</p> <ul><li><a href="../doc/install.html">install(1)</a></li></ul> </div> -<p id="footer">bundle — npm@1.1.49</p> +<p id="footer">bundle — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/cache.html b/deps/npm/html/doc/cache.html index f4dfc77e82a..7c593fdd97e 100644 --- a/deps/npm/html/doc/cache.html +++ b/deps/npm/html/doc/cache.html @@ -66,7 +66,7 @@ they do not make an HTTP request to the registry.</p> <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li></ul> </div> -<p id="footer">cache — npm@1.1.49</p> +<p id="footer">cache — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/changelog.html b/deps/npm/html/doc/changelog.html index 87c98d4e805..d59ccc45b87 100644 --- a/deps/npm/html/doc/changelog.html +++ b/deps/npm/html/doc/changelog.html @@ -65,7 +65,7 @@ <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li></ul> </div> -<p id="footer">changelog — npm@1.1.49</p> +<p id="footer">changelog — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/coding-style.html b/deps/npm/html/doc/coding-style.html index b13fee073d0..528d40a539a 100644 --- a/deps/npm/html/doc/coding-style.html +++ b/deps/npm/html/doc/coding-style.html @@ -180,7 +180,7 @@ set to anything."</p> <ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">coding-style — npm@1.1.49</p> +<p id="footer">coding-style — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/completion.html b/deps/npm/html/doc/completion.html index 34084fa1830..b8d8b140237 100644 --- a/deps/npm/html/doc/completion.html +++ b/deps/npm/html/doc/completion.html @@ -33,7 +33,7 @@ completions based on the arguments.</p> <ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">completion — npm@1.1.49</p> +<p id="footer">completion — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/config.html b/deps/npm/html/doc/config.html index 86dbd2b4604..dce7d7b6a40 100644 --- a/deps/npm/html/doc/config.html +++ b/deps/npm/html/doc/config.html @@ -484,6 +484,14 @@ colored output if it is a TTY.</p> <p>A node module to <code>require()</code> when npm loads. Useful for programmatic usage.</p> +<h3 id="optional">optional</h3> + +<ul><li>Default: true</li><li>Type: Boolean</li></ul> + +<p>Attempt to install packages in the <code>optionalDependencies</code> hash. Note +that if these packages fail to install, the overall installation +process is not aborted.</p> + <h3 id="parseable">parseable</h3> <ul><li>Default: false</li><li>Type: Boolean</li></ul> @@ -748,7 +756,7 @@ then answer "no" to any prompt.</p> <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul> </div> -<p id="footer">config — npm@1.1.49</p> +<p id="footer">config — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/dedupe.html b/deps/npm/html/doc/dedupe.html new file mode 100644 index 00000000000..f284c7c2ad6 --- /dev/null +++ b/deps/npm/html/doc/dedupe.html @@ -0,0 +1,92 @@ +<!doctype html> +<html> + <title>dedupe</title> + <meta http-equiv="content-type" value="text/html;utf-8"> + <link rel="stylesheet" type="text/css" href="../static/style.css"> + + <body> + <div id="wrapper"> +<h1><a href="../doc/dedupe.html">dedupe</a></h1> <p>Reduce duplication</p> + +<h2 id="SYNOPSIS">SYNOPSIS</h2> + +<pre><code>npm dedupe [package names...]</code></pre> + +<h2 id="DESCRIPTION">DESCRIPTION</h2> + +<p>Searches the local package tree and attempts to simplify the overall +structure by moving dependencies further up the tree, where they can +be more effectively shared by multiple dependent packages.</p> + +<p>For example, consider this dependency graph:</p> + +<pre><code>a ++-- b <-- depends on c@1.0.x +| `-- c@1.0.3 +`-- d <-- depends on c@~1.0.9 + `-- c@1.0.10</code></pre> + +<p>In this case, <code><a href="../doc/dedupe.html">dedupe(1)</a></code> will transform the tree to:</p> + +<pre><code>a ++-- b ++-- d +`-- c@1.0.10</code></pre> + +<p>Because of the hierarchical nature of node's module lookup, b and d +will both get their dependency met by the single c package at the root +level of the tree.</p> + +<p>If a suitable version exists at the target location in the tree +already, then it will be left untouched, but the other duplicates will +be deleted.</p> + +<p>If no suitable version can be found, then a warning is printed, and +nothing is done.</p> + +<p>If any arguments are supplied, then they are filters, and only the +named packages will be touched.</p> + +<p>Note that this operation transforms the dependency tree, and may +result in packages getting updated versions, perhaps from the npm +registry.</p> + +<p>This feature is experimental, and may change in future versions.</p> + +<h2 id="SEE-ALSO">SEE ALSO</h2> + +<ul><li><a href="../doc/ls.html">ls(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul> +</div> +<p id="footer">dedupe — npm@1.1.59</p> +<script> +;(function () { +var wrapper = document.getElementById("wrapper") +var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) + .filter(function (el) { + return el.parentNode === wrapper + && el.tagName.match(/H[1-6]/) + && el.id + }) +var l = 2 + , toc = document.createElement("ul") +toc.innerHTML = els.map(function (el) { + var i = el.tagName.charAt(1) + , out = "" + while (i > l) { + out += "<ul>" + l ++ + } + while (i < l) { + out += "</ul>" + l -- + } + out += "<li><a href='#" + el.id + "'>" + + ( el.innerText || el.text || el.innerHTML) + + "</a>" + return out +}).join("\n") +toc.id = "toc" +document.body.appendChild(toc) +})() +</script> +</body></html> diff --git a/deps/npm/html/doc/deprecate.html b/deps/npm/html/doc/deprecate.html index 68f7d3013e9..8bb1455eade 100644 --- a/deps/npm/html/doc/deprecate.html +++ b/deps/npm/html/doc/deprecate.html @@ -29,7 +29,7 @@ something like this:</p> <ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul> </div> -<p id="footer">deprecate — npm@1.1.49</p> +<p id="footer">deprecate — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/developers.html b/deps/npm/html/doc/developers.html index a6c30b01322..4f5230f1ed5 100644 --- a/deps/npm/html/doc/developers.html +++ b/deps/npm/html/doc/developers.html @@ -160,7 +160,7 @@ from a fresh checkout.</p> <ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li></ul> </div> -<p id="footer">developers — npm@1.1.49</p> +<p id="footer">developers — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/disputes.html b/deps/npm/html/doc/disputes.html index 5cda8b1af1b..fc37c753352 100644 --- a/deps/npm/html/doc/disputes.html +++ b/deps/npm/html/doc/disputes.html @@ -80,7 +80,7 @@ license statement)</li><li>Illegal content.</li></ol> <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul> </div> -<p id="footer">disputes — npm@1.1.49</p> +<p id="footer">disputes — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/docs.html b/deps/npm/html/doc/docs.html index 887cfddd81a..228155c6a11 100644 --- a/deps/npm/html/doc/docs.html +++ b/deps/npm/html/doc/docs.html @@ -37,7 +37,7 @@ config param.</p> <ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li></ul> </div> -<p id="footer">docs — npm@1.1.49</p> +<p id="footer">docs — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/edit.html b/deps/npm/html/doc/edit.html index ab81081dcdb..c1d76c8375c 100644 --- a/deps/npm/html/doc/edit.html +++ b/deps/npm/html/doc/edit.html @@ -37,7 +37,7 @@ or <code>"notepad"</code> on Windows.</li><li>Type: path</li></ul> <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/explore.html">explore(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">edit — npm@1.1.49</p> +<p id="footer">edit — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/explore.html b/deps/npm/html/doc/explore.html index 90d8d68c485..5a199d2e729 100644 --- a/deps/npm/html/doc/explore.html +++ b/deps/npm/html/doc/explore.html @@ -40,7 +40,7 @@ Windows</li><li>Type: path</li></ul> <ul><li><a href="../doc/submodule.html">submodule(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/edit.html">edit(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul> </div> -<p id="footer">explore — npm@1.1.49</p> +<p id="footer">explore — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/faq.html b/deps/npm/html/doc/faq.html index f9337fc6be1..61e676e4246 100644 --- a/deps/npm/html/doc/faq.html +++ b/deps/npm/html/doc/faq.html @@ -241,7 +241,7 @@ We'll have someone kick it or something.</p> <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul> </div> -<p id="footer">faq — npm@1.1.49</p> +<p id="footer">faq — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/folders.html b/deps/npm/html/doc/folders.html index c5ab5d42b65..f20336723bf 100644 --- a/deps/npm/html/doc/folders.html +++ b/deps/npm/html/doc/folders.html @@ -205,7 +205,7 @@ cannot be found elsewhere. See <code><a href="../doc/json.html">json(1)</a></co <ul><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/pack.html">pack(1)</a></li><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li></ul> </div> -<p id="footer">folders — npm@1.1.49</p> +<p id="footer">folders — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/help-search.html b/deps/npm/html/doc/help-search.html index c1780e75e8b..055b39b4268 100644 --- a/deps/npm/html/doc/help-search.html +++ b/deps/npm/html/doc/help-search.html @@ -38,7 +38,7 @@ where the terms were found in the documentation.</p> <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/help.html">help(1)</a></li></ul> </div> -<p id="footer">help-search — npm@1.1.49</p> +<p id="footer">help-search — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/help.html b/deps/npm/html/doc/help.html index df582efbf74..748e3f89ff5 100644 --- a/deps/npm/html/doc/help.html +++ b/deps/npm/html/doc/help.html @@ -36,7 +36,7 @@ matches are equivalent to specifying a topic name.</p> <ul><li><a href="../doc/npm.html">npm(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/help-search.html">help-search(1)</a></li><li><a href="../doc/index.html">index(1)</a></li></ul> </div> -<p id="footer">help — npm@1.1.49</p> +<p id="footer">help — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index e430b5b4dfa..0857279694d 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -54,6 +54,10 @@ <p> Manage the npm configuration file</p> +<h2 id="npm-dedupe-1"><a href="../doc/dedupe.html">dedupe(1)</a></h2> + +<p> Reduce duplication</p> + <h2 id="npm-deprecate-1"><a href="../doc/deprecate.html">deprecate(1)</a></h2> <p> Deprecate a version of a package</p> @@ -384,7 +388,7 @@ <p> Display npm username</p> </div> -<p id="footer">index — npm@1.1.49</p> +<p id="footer">index — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/init.html b/deps/npm/html/doc/init.html index 5fed6472a03..2334ce4599b 100644 --- a/deps/npm/html/doc/init.html +++ b/deps/npm/html/doc/init.html @@ -29,7 +29,7 @@ without a really good reason to do so.</p> <ul><li><a href="https://github.com/isaacs/init-package-json">https://github.com/isaacs/init-package-json</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/version.html">version(1)</a></li></ul> </div> -<p id="footer">init — npm@1.1.49</p> +<p id="footer">init — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/install.html b/deps/npm/html/doc/install.html index 257a45cc495..111fe996d67 100644 --- a/deps/npm/html/doc/install.html +++ b/deps/npm/html/doc/install.html @@ -133,7 +133,7 @@ affects a real use-case, it will be investigated.</p> <ul><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/rebuild.html">rebuild(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/shrinkwrap.html">shrinkwrap(1)</a></li></ul> </div> -<p id="footer">install — npm@1.1.49</p> +<p id="footer">install — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/json.html b/deps/npm/html/doc/json.html index cdeeaa1fcd4..fcb297bdd54 100644 --- a/deps/npm/html/doc/json.html +++ b/deps/npm/html/doc/json.html @@ -525,7 +525,7 @@ overridden.</p> <ul><li><a href="../doc/semver.html">semver(1)</a></li><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/version.html">version(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/rm.html">rm(1)</a></li></ul> </div> -<p id="footer">json — npm@1.1.49</p> +<p id="footer">json — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/link.html b/deps/npm/html/doc/link.html index fc953920e53..8d1a3c996fc 100644 --- a/deps/npm/html/doc/link.html +++ b/deps/npm/html/doc/link.html @@ -58,7 +58,7 @@ installation target into your project's <code>node_modules</code> folder.</p <ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">link — npm@1.1.49</p> +<p id="footer">link — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/list.html b/deps/npm/html/doc/list.html index b17f6fc97f8..45f4b7d1ada 100644 --- a/deps/npm/html/doc/list.html +++ b/deps/npm/html/doc/list.html @@ -25,7 +25,7 @@ limit the results to only the paths to the packages named. Note that nested packages will <em>also</em> show the paths to the specified packages. For example, running <code>npm ls promzard</code> in npm's source tree will show:</p> -<pre><code>npm@1.1.49 /path/to/npm +<pre><code>npm@1.1.59 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5</code></pre> @@ -64,7 +64,7 @@ project.</p> <ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/link.html">link(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/update.html">update(1)</a></li></ul> </div> -<p id="footer">list — npm@1.1.49</p> +<p id="footer">list — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/npm.html b/deps/npm/html/doc/npm.html index 83324b92cd4..ef163aaa6ab 100644 --- a/deps/npm/html/doc/npm.html +++ b/deps/npm/html/doc/npm.html @@ -14,7 +14,7 @@ <h2 id="VERSION">VERSION</h2> -<p>1.1.49</p> +<p>1.1.59</p> <h2 id="DESCRIPTION">DESCRIPTION</h2> @@ -135,7 +135,7 @@ will no doubt tell you to put the output in a gist or email.</p> <ul><li><a href="../doc/help.html">help(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/README.html">README</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/index.html">index(1)</a></li><li><a href="../api/npm.html">npm(3)</a></li></ul> </div> -<p id="footer">npm — npm@1.1.49</p> +<p id="footer">npm — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/outdated.html b/deps/npm/html/doc/outdated.html index 607bdd070c9..c5573f7d6fc 100644 --- a/deps/npm/html/doc/outdated.html +++ b/deps/npm/html/doc/outdated.html @@ -21,7 +21,7 @@ packages are currently outdated.</p> <ul><li><a href="../doc/update.html">update(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li></ul> </div> -<p id="footer">outdated — npm@1.1.49</p> +<p id="footer">outdated — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/owner.html b/deps/npm/html/doc/owner.html index c2991bac801..f59482cb5e1 100644 --- a/deps/npm/html/doc/owner.html +++ b/deps/npm/html/doc/owner.html @@ -34,7 +34,7 @@ that is not implemented at this time.</p> <ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul> </div> -<p id="footer">owner — npm@1.1.49</p> +<p id="footer">owner — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/pack.html b/deps/npm/html/doc/pack.html index f7223cee8df..ca2860eb942 100644 --- a/deps/npm/html/doc/pack.html +++ b/deps/npm/html/doc/pack.html @@ -29,7 +29,7 @@ overwritten the second time.</p> <ul><li><a href="../doc/cache.html">cache(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">pack — npm@1.1.49</p> +<p id="footer">pack — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/prefix.html b/deps/npm/html/doc/prefix.html index 4c74d1f37d1..1dc79e7c816 100644 --- a/deps/npm/html/doc/prefix.html +++ b/deps/npm/html/doc/prefix.html @@ -20,7 +20,7 @@ <ul><li><a href="../doc/root.html">root(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">prefix — npm@1.1.49</p> +<p id="footer">prefix — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/prune.html b/deps/npm/html/doc/prune.html index 05bd29bcbdb..63158e194bb 100644 --- a/deps/npm/html/doc/prune.html +++ b/deps/npm/html/doc/prune.html @@ -25,7 +25,7 @@ package's dependencies list.</p> <ul><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul> </div> -<p id="footer">prune — npm@1.1.49</p> +<p id="footer">prune — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/publish.html b/deps/npm/html/doc/publish.html index d028b847935..721ee145faa 100644 --- a/deps/npm/html/doc/publish.html +++ b/deps/npm/html/doc/publish.html @@ -29,7 +29,7 @@ the registry. Overwrites when the "--force" flag is set.</p> <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/tag.html">tag(1)</a></li></ul> </div> -<p id="footer">publish — npm@1.1.49</p> +<p id="footer">publish — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/rebuild.html b/deps/npm/html/doc/rebuild.html index ca1ad33ba33..1ab8db95360 100644 --- a/deps/npm/html/doc/rebuild.html +++ b/deps/npm/html/doc/rebuild.html @@ -25,7 +25,7 @@ the new binary.</p> <ul><li><a href="../doc/build.html">build(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul> </div> -<p id="footer">rebuild — npm@1.1.49</p> +<p id="footer">rebuild — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/registry.html b/deps/npm/html/doc/registry.html index 5ef97da1419..90f4d212fc7 100644 --- a/deps/npm/html/doc/registry.html +++ b/deps/npm/html/doc/registry.html @@ -97,7 +97,7 @@ ask for help on the <a href="mailto:npm-@googlegroups.com">npm-@googlegroups.com <ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/disputes.html">disputes(1)</a></li></ul> </div> -<p id="footer">registry — npm@1.1.49</p> +<p id="footer">registry — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/removing-npm.html b/deps/npm/html/doc/removing-npm.html index 024122a2c5e..c171c4c4709 100644 --- a/deps/npm/html/doc/removing-npm.html +++ b/deps/npm/html/doc/removing-npm.html @@ -58,7 +58,7 @@ modules. To track those down, you can do the following:</p> <ul><li><a href="../doc/README.html">README</a></li><li><a href="../doc/rm.html">rm(1)</a></li><li><a href="../doc/prune.html">prune(1)</a></li></ul> </div> -<p id="footer">removing-npm — npm@1.1.49</p> +<p id="footer">removing-npm — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/restart.html b/deps/npm/html/doc/restart.html index 251780cb63c..157a4df85dd 100644 --- a/deps/npm/html/doc/restart.html +++ b/deps/npm/html/doc/restart.html @@ -24,7 +24,7 @@ the "start" script.</p> <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul> </div> -<p id="footer">restart — npm@1.1.49</p> +<p id="footer">restart — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/root.html b/deps/npm/html/doc/root.html index fc8ecad30b7..f148910f8b4 100644 --- a/deps/npm/html/doc/root.html +++ b/deps/npm/html/doc/root.html @@ -20,7 +20,7 @@ <ul><li><a href="../doc/prefix.html">prefix(1)</a></li><li><a href="../doc/bin.html">bin(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">root — npm@1.1.49</p> +<p id="footer">root — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/run-script.html b/deps/npm/html/doc/run-script.html index d28e1b2db5f..7e72b83a3e9 100644 --- a/deps/npm/html/doc/run-script.html +++ b/deps/npm/html/doc/run-script.html @@ -23,7 +23,7 @@ called directly, as well.</p> <ul><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul> </div> -<p id="footer">run-script — npm@1.1.49</p> +<p id="footer">run-script — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/scripts.html b/deps/npm/html/doc/scripts.html index e71d621cc53..5ae8bc14039 100644 --- a/deps/npm/html/doc/scripts.html +++ b/deps/npm/html/doc/scripts.html @@ -177,7 +177,7 @@ will sudo the npm command in question.</li></ul> <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/install.html">install(1)</a></li></ul> </div> -<p id="footer">scripts — npm@1.1.49</p> +<p id="footer">scripts — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/search.html b/deps/npm/html/doc/search.html index e002a40f2d1..4834813070c 100644 --- a/deps/npm/html/doc/search.html +++ b/deps/npm/html/doc/search.html @@ -24,7 +24,7 @@ expression characters must be escaped or quoted in most shells.)</p> <ul><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/view.html">view(1)</a></li></ul> </div> -<p id="footer">search — npm@1.1.49</p> +<p id="footer">search — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/semver.html b/deps/npm/html/doc/semver.html index 46bce35f05c..655ba643ff0 100644 --- a/deps/npm/html/doc/semver.html +++ b/deps/npm/html/doc/semver.html @@ -104,7 +104,7 @@ that satisfies the range, or null if none of them do.</li></ul> <ul><li><a href="../doc/json.html">json(1)</a></li></ul> </div> -<p id="footer">semver — npm@1.1.49</p> +<p id="footer">semver — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/shrinkwrap.html b/deps/npm/html/doc/shrinkwrap.html index de942cc0517..6b6177bef1c 100644 --- a/deps/npm/html/doc/shrinkwrap.html +++ b/deps/npm/html/doc/shrinkwrap.html @@ -169,7 +169,7 @@ versions.</p> <ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul> </div> -<p id="footer">shrinkwrap — npm@1.1.49</p> +<p id="footer">shrinkwrap — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/star.html b/deps/npm/html/doc/star.html index b06ce6afa2e..d17fff7acd8 100644 --- a/deps/npm/html/doc/star.html +++ b/deps/npm/html/doc/star.html @@ -26,7 +26,7 @@ a vaguely positive way to show that you care.</p> <ul><li><a href="../doc/view.html">view(1)</a></li><li><a href="../doc/whoami.html">whoami(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul> </div> -<p id="footer">star — npm@1.1.49</p> +<p id="footer">star — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/start.html b/deps/npm/html/doc/start.html index 792c5ef258d..9a34e64aabe 100644 --- a/deps/npm/html/doc/start.html +++ b/deps/npm/html/doc/start.html @@ -20,7 +20,7 @@ <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul> </div> -<p id="footer">start — npm@1.1.49</p> +<p id="footer">start — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/stop.html b/deps/npm/html/doc/stop.html index a73dc1c7f57..f3dd8baa3ea 100644 --- a/deps/npm/html/doc/stop.html +++ b/deps/npm/html/doc/stop.html @@ -20,7 +20,7 @@ <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/test.html">test(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li></ul> </div> -<p id="footer">stop — npm@1.1.49</p> +<p id="footer">stop — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/submodule.html b/deps/npm/html/doc/submodule.html index 45660e8ba61..dff61451deb 100644 --- a/deps/npm/html/doc/submodule.html +++ b/deps/npm/html/doc/submodule.html @@ -33,7 +33,7 @@ dependencies into the submodule folder.</p> <ul><li><a href="../doc/json.html">json(1)</a></li><li>git help submodule</li></ul> </div> -<p id="footer">submodule — npm@1.1.49</p> +<p id="footer">submodule — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/tag.html b/deps/npm/html/doc/tag.html index b42386d01b4..d88b2bbfc21 100644 --- a/deps/npm/html/doc/tag.html +++ b/deps/npm/html/doc/tag.html @@ -21,7 +21,7 @@ <ul><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">tag — npm@1.1.49</p> +<p id="footer">tag — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/test.html b/deps/npm/html/doc/test.html index 93a49d0d3d6..4b5c207c7d1 100644 --- a/deps/npm/html/doc/test.html +++ b/deps/npm/html/doc/test.html @@ -23,7 +23,7 @@ true.</p> <ul><li><a href="../doc/run-script.html">run-script(1)</a></li><li><a href="../doc/scripts.html">scripts(1)</a></li><li><a href="../doc/start.html">start(1)</a></li><li><a href="../doc/restart.html">restart(1)</a></li><li><a href="../doc/stop.html">stop(1)</a></li></ul> </div> -<p id="footer">test — npm@1.1.49</p> +<p id="footer">test — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/uninstall.html b/deps/npm/html/doc/uninstall.html index 6b3c715f06d..2f0ab091b12 100644 --- a/deps/npm/html/doc/uninstall.html +++ b/deps/npm/html/doc/uninstall.html @@ -22,7 +22,7 @@ on its behalf.</p> <ul><li><a href="../doc/prune.html">prune(1)</a></li><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/config.html">config(1)</a></li></ul> </div> -<p id="footer">uninstall — npm@1.1.49</p> +<p id="footer">uninstall — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/unpublish.html b/deps/npm/html/doc/unpublish.html index e1a6560a05b..edd3b64102b 100644 --- a/deps/npm/html/doc/unpublish.html +++ b/deps/npm/html/doc/unpublish.html @@ -34,7 +34,7 @@ the root package entry is removed from the registry entirely.</p> <ul><li><a href="../doc/deprecate.html">deprecate(1)</a></li><li><a href="../doc/publish.html">publish(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li><li><a href="../doc/owner.html">owner(1)</a></li></ul> </div> -<p id="footer">unpublish — npm@1.1.49</p> +<p id="footer">unpublish — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/update.html b/deps/npm/html/doc/update.html index 64a0a820cf6..05837760c1d 100644 --- a/deps/npm/html/doc/update.html +++ b/deps/npm/html/doc/update.html @@ -23,7 +23,7 @@ <ul><li><a href="../doc/install.html">install(1)</a></li><li><a href="../doc/outdated.html">outdated(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/folders.html">folders(1)</a></li><li><a href="../doc/list.html">list(1)</a></li></ul> </div> -<p id="footer">update — npm@1.1.49</p> +<p id="footer">update — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/version.html b/deps/npm/html/doc/version.html index b9a0acd3bc7..b157cf3efb0 100644 --- a/deps/npm/html/doc/version.html +++ b/deps/npm/html/doc/version.html @@ -40,7 +40,7 @@ in your git config for this to work properly.</p> <ul><li><a href="../doc/init.html">init(1)</a></li><li><a href="../doc/json.html">json(1)</a></li><li><a href="../doc/semver.html">semver(1)</a></li></ul> </div> -<p id="footer">version — npm@1.1.49</p> +<p id="footer">version — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/view.html b/deps/npm/html/doc/view.html index 0742a1fb4a9..7966e4ceeda 100644 --- a/deps/npm/html/doc/view.html +++ b/deps/npm/html/doc/view.html @@ -88,7 +88,7 @@ the field name.</p> <ul><li><a href="../doc/search.html">search(1)</a></li><li><a href="../doc/registry.html">registry(1)</a></li><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/docs.html">docs(1)</a></li></ul> </div> -<p id="footer">view — npm@1.1.49</p> +<p id="footer">view — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/html/doc/whoami.html b/deps/npm/html/doc/whoami.html index 1d4ee84cfca..bfcd0d6facf 100644 --- a/deps/npm/html/doc/whoami.html +++ b/deps/npm/html/doc/whoami.html @@ -20,7 +20,7 @@ <ul><li><a href="../doc/config.html">config(1)</a></li><li><a href="../doc/adduser.html">adduser(1)</a></li></ul> </div> -<p id="footer">whoami — npm@1.1.49</p> +<p id="footer">whoami — npm@1.1.59</p> <script> ;(function () { var wrapper = document.getElementById("wrapper") diff --git a/deps/npm/lib/dedupe.js b/deps/npm/lib/dedupe.js new file mode 100644 index 00000000000..9a357908afe --- /dev/null +++ b/deps/npm/lib/dedupe.js @@ -0,0 +1,334 @@ +// traverse the node_modules/package.json tree +// looking for duplicates. If any duplicates are found, +// then move them up to the highest level necessary +// in order to make them no longer duplicated. +// +// This is kind of ugly, and really highlights the need for +// much better "put pkg X at folder Y" abstraction. Oh well, +// whatever. Perfect enemy of the good, and all that. + +var fs = require("fs") +var asyncMap = require("slide").asyncMap +var path = require("path") +var readJson = require("read-package-json") +var archy = require("archy") +var util = require("util") +var RegClient = require("npm-registry-client") +var npmconf = require("npmconf") +var npm = require("npm") +var semver = require("semver") +var npm = require("npm") +var rimraf = require("rimraf") +var log = require("npmlog") +var npm = require("./npm.js") + +module.exports = dedupe + +dedupe.usage = "npm dedupe [pkg pkg...]" + +function dedupe (args, silent, cb) { + if (typeof silent === "function") cb = silent, silent = false + var dryrun = false + if (npm.command.match(/^find/)) dryrun = true + return dedupe_(npm.prefix, args, {}, dryrun, silent, cb) +} + +function dedupe_ (dir, filter, unavoidable, dryrun, silent, cb) { + readInstalled(path.resolve(dir), {}, null, function (er, data, counter) { + // find out which things are dupes + var dupes = Object.keys(counter).filter(function (k) { + if (filter.length && -1 === filter.indexOf(k)) return false + return counter[k] > 1 && !unavoidable[k] + }).reduce(function (s, k) { + s[k] = [] + return s + }, {}) + + // any that are unavoidable need to remain as they are. don't even + // try to touch them or figure it out. Maybe some day, we can do + // something a bit more clever here, but for now, just skip over it, + // and all its children. + ;(function U (obj) { + if (unavoidable[obj.name]) { + obj.unavoidable = true + } + if (obj.parent && obj.parent.unavoidable) { + obj.unavoidable = true + } + Object.keys(obj.children).forEach(function (k) { + U(obj.children[k]) + }) + }) + + // then collect them up and figure out who needs them + ;(function C (obj) { + if (dupes[obj.name] && !obj.unavoidable) { + dupes[obj.name].push(obj) + obj.duplicate = true + } + obj.dependents = whoDepends(obj) + Object.keys(obj.children).forEach(function (k) { + C(obj.children[k]) + }) + })(data) + + if (dryrun) { + var k = Object.keys(dupes) + if (!k.length) return cb() + return npm.commands.ls(k, silent, cb) + } + + var summary = Object.keys(dupes).map(function (n) { + return [n, dupes[n].filter(function (d) { + return d && d.parent && !d.parent.duplicate && !d.unavoidable + }).map(function M (d) { + return [d.path, d.version, d.dependents.map(function (k) { + return [k.path, k.version, k.dependencies[d.name] || ""] + })] + })] + }).map(function (item) { + var name = item[0] + var set = item[1] + + var ranges = set.map(function (i) { + return i[2].map(function (d) { + return d[2] + }) + }).reduce(function (l, r) { + return l.concat(r) + }, []).map(function (v, i, set) { + if (set.indexOf(v) !== i) return false + return v + }).filter(function (v) { + return v !== false + }) + + var locs = set.map(function (i) { + return i[0] + }) + + var versions = set.map(function (i) { + return i[1] + }).filter(function (v, i, set) { + return set.indexOf(v) === i + }) + + var has = set.map(function (i) { + return [i[0], i[1]] + }).reduce(function (set, kv) { + set[kv[0]] = kv[1] + return set + }, {}) + + var loc = locs.length ? locs.reduce(function (a, b) { + // a=/path/to/node_modules/foo/node_modules/bar + // b=/path/to/node_modules/elk/node_modules/bar + // ==/path/to/node_modules/bar + a = a.split(/\/node_modules\//) + b = b.split(/\/node_modules\//) + var name = a.pop() + b.pop() + // find the longest chain that both A and B share. + // then push the name back on it, and join by /node_modules/ + var res = [] + for (var i = 0, al = a.length, bl = b.length; i < al && i < bl && a[i] === b[i]; i++); + return a.slice(0, i).concat(name).join("/node_modules/") + }) : undefined + + return [item[0], { item: item + , ranges: ranges + , locs: locs + , loc: loc + , has: has + , versions: versions + }] + }).filter(function (i) { + return i[1].loc + }) + + findVersions(npm, summary, function (er, set) { + if (er) return cb(er) + if (!set.length) return cb() + installAndRetest(set, filter, dir, unavoidable, silent, cb) + }) + }) +} + +function installAndRetest (set, filter, dir, unavoidable, silent, cb) { + //return cb(null, set) + var remove = [] + + asyncMap(set, function (item, cb) { + // [name, has, loc, locMatch, regMatch, others] + var name = item[0] + var has = item[1] + var where = item[2] + var locMatch = item[3] + var regMatch = item[4] + var others = item[5] + + // nothing to be done here. oh well. just a conflict. + if (!locMatch && !regMatch) { + log.warn("unavoidable conflict", item[0], item[1]) + log.warn("unavoidable conflict", "Not de-duplicating") + unavoidable[item[0]] = true + return cb() + } + + // nothing to do except to clean up the extraneous deps + if (locMatch && has[where] === locMatch) { + remove.push.apply(remove, others) + return cb() + } + + if (regMatch) { + var what = name + "@" + regMatch + // where is /path/to/node_modules/foo/node_modules/bar + // for package "bar", but we need it to be just + // /path/to/node_modules/foo + where = where.split(/\/node_modules\//) + where.pop() + where = where.join("/node_modules/") + remove.push.apply(remove, others) + + return npm.commands.install(where, what, cb) + } + + // hrm? + return cb(new Error("danger zone\n" + name + " " + + + regMatch + " " + locMatch)) + + }, function (er, installed) { + if (er) return cb(er) + asyncMap(remove, rimraf, function (er) { + if (er) return cb(er) + remove.forEach(function (r) { + log.info("rm", r) + }) + dedupe_(dir, filter, unavoidable, false, silent, cb) + }) + }) +} + +function findVersions (npm, summary, cb) { + // now, for each item in the summary, try to find the maximum version + // that will satisfy all the ranges. next step is to install it at + // the specified location. + asyncMap(summary, function (item, cb) { + var name = item[0] + var data = item[1] + var loc = data.loc + var locs = data.locs.filter(function (l) { + return l !== loc + }) + + // not actually a dupe, or perhaps all the other copies were + // children of a dupe, so this'll maybe be picked up later. + if (locs.length === 0) { + return cb() + } + + // { <folder>: <version> } + var has = data.has + + // the versions that we already have. + // if one of these is ok, then prefer to use that. + // otherwise, try fetching from the registry. + var versions = data.versions + + var ranges = data.ranges + npm.registry.get(name, function (er, data) { + var regVersions = er ? [] : Object.keys(data.versions) + var locMatch = bestMatch(versions, ranges) + var regMatch = bestMatch(regVersions, ranges) + + cb(null, [[name, has, loc, locMatch, regMatch, locs]]) + }) + }, cb) +} + +function bestMatch (versions, ranges) { + return versions.filter(function (v) { + return !ranges.some(function (r) { + return !semver.satisfies(v, r) + }) + }).sort(semver.compare).pop() +} + + +function readInstalled (dir, counter, parent, cb) { + var pkg, children, realpath + + fs.realpath(dir, function (er, rp) { + realpath = rp + next() + }) + + readJson(path.resolve(dir, "package.json"), function (er, data) { + if (er) return cb() // not a package, probably. + counter[data.name] = counter[data.name] || 0 + counter[data.name]++ + pkg = + { _id: data._id + , name: data.name + , version: data.version + , dependencies: data.dependencies || {} + , optionalDependencies: data.optionalDependencies || {} + , devDependencies: data.devDependencies || {} + , bundledDependencies: data.bundledDependencies || [] + , path: dir + , realPath: dir + , children: {} + , parent: parent + , family: Object.create(parent ? parent.family : null) + , unavoidable: false + , duplicate: false + } + if (parent) { + parent.children[data.name] = pkg + parent.family[data.name] = pkg + } + next() + }) + + fs.readdir(path.resolve(dir, "node_modules"), function (er, c) { + children = c || [] // error is ok, just means no children. + next() + }) + + function next () { + if (!children || !pkg || !realpath) return + + // ignore devDependencies. Just leave them where they are. + children = children.filter(function (c) { + return !pkg.devDependencies.hasOwnProperty(c) + }) + + pkg.realPath = realpath + if (pkg.realPath !== pkg.path) children = [] + var d = path.resolve(dir, "node_modules") + asyncMap(children, function (child, cb) { + readInstalled(path.resolve(d, child), counter, pkg, cb) + }, function (er) { + cb(er, pkg, counter) + }) + } +} + +function whoDepends (pkg) { + var start = pkg.parent || pkg + return whoDepends_(pkg, [], start) +} + +function whoDepends_ (pkg, who, test) { + if (test !== pkg && + test.dependencies[pkg.name] && + test.family[pkg.name] === pkg) { + who.push(test) + } + Object.keys(test.children).forEach(function (n) { + whoDepends_(pkg, who, test.children[n]) + }) + return who +} + diff --git a/deps/npm/lib/install.js b/deps/npm/lib/install.js index c58d5a1e659..ecb5d0d76d6 100644 --- a/deps/npm/lib/install.js +++ b/deps/npm/lib/install.js @@ -104,11 +104,10 @@ function install (args, cb_) { // install dependencies locally by default, // or install current folder globally if (!args.length) { + var opt = { dev: npm.config.get("dev") || !npm.config.get("production") } + if (npm.config.get("global")) args = ["."] - else return readDependencies( null - , where - , { dev: !npm.config.get("production") } - , function (er, data) { + else return readDependencies(null, where, opt, function (er, data) { if (er) { log.error("install", "Couldn't read dependencies") return cb(er) @@ -184,6 +183,12 @@ function readDependencies (context, where, opts, cb) { }) } + if (!npm.config.get("optional") && data.optionalDependencies) { + Object.keys(data.optionalDependencies).forEach(function (d) { + delete data.dependencies[d] + }) + } + if (wrap) { log.verbose("readDependencies: using existing wrap", [where, wrap]) var rv = {} @@ -456,7 +461,8 @@ function installMany (what, where, context, cb) { // dependencies we'll iterate below comes from an existing shrinkwrap from a // parent level, a new shrinkwrap at this level, or package.json at this // level, as well as which shrinkwrap (if any) our dependencies should use. - readDependencies(context, where, {}, function (er, data, wrap) { + var opt = { dev: npm.config.get("dev") } + readDependencies(context, where, opt, function (er, data, wrap) { if (er) data = {} var parent = data @@ -888,7 +894,8 @@ function write (target, targetFolder, context, cb_) { if (er) return cb(er) // before continuing to installing dependencies, check for a shrinkwrap. - readDependencies(context, targetFolder, {}, function (er, data, wrap) { + var opt = { dev: npm.config.get("dev") } + readDependencies(context, targetFolder, opt, function (er, data, wrap) { var deps = Object.keys(data.dependencies || {}) // don't install bundleDependencies, unless they're missing. diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 0a321b284a9..8f42b278400 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -101,6 +101,8 @@ var commandCache = {} , "login": "adduser" , "add-user": "adduser" , "tst": "test" + , "find-dupes": "dedupe" + , "ddp": "dedupe" } , aliasNames = Object.keys(aliases) @@ -116,6 +118,7 @@ var commandCache = {} , "prune" , "submodule" , "pack" + , "dedupe" , "rebuild" , "link" @@ -262,7 +265,8 @@ function load (npm, cli, cb) { // look up configs //console.error("about to look up configs") - npmconf.load(cli, function (er, conf) { + var builtin = path.resolve(__dirname, "..", "npmrc") + npmconf.load(cli, builtin, function (er, conf) { if (er === conf) er = null npm.config = conf @@ -308,28 +312,7 @@ function load (npm, cli, cb) { } catch (e) { token = null } } - npm.registry = new RegClient( - { registry: npm.config.get("registry") - , cache: npm.config.get("cache") - , auth: npm.config.get("_auth") - , token: token - , alwaysAuth: npm.config.get("always-auth") - , email: npm.config.get("email") - , proxy: npm.config.get("proxy") - , tag: npm.config.get("tag") - , ca: npm.config.get("ca") - , strictSSL: npm.config.get("strict-ssl") - , userAgent: npm.config.get("user-agent") - , E404: npm.E404 - , EPUBLISHCONFLICT: npm.EPUBLISHCONFLICT - , log: log - , retries: npm.config.get("fetch-retries") - , retryFactor: npm.config.get("fetch-retry-factor") - , retryMinTimeout: npm.config.get("fetch-retry-mintimeout") - , retryMaxTimeout: npm.config.get("fetch-retry-maxtimeout") - , cacheMin: npm.config.get("cache-min") - , cacheMax: npm.config.get("cache-max") - }) + npm.registry = new RegClient(npm.config) // save the token cookie in the config file if (npm.registry.couchLogin) { @@ -378,15 +361,15 @@ function loadPrefix (npm, conf, cb) { } }) - findPrefix(gp, function (er, gp) { - Object.defineProperty(npm, "globalPrefix", - { get : function () { return gp } - , set : function (r) { return gp = r } - , enumerable : true - }) - // the prefix MUST exist, or else nothing works. - mkdir(gp, next) - }) + gp = path.resolve(gp) + Object.defineProperty(npm, "globalPrefix", + { get : function () { return gp } + , set : function (r) { return gp = r } + , enumerable : true + }) + // the prefix MUST exist, or else nothing works. + mkdir(gp, next) + var i = 2 , errState = null diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js index 51a9de767b3..a84b5978604 100644 --- a/deps/npm/lib/publish.js +++ b/deps/npm/lib/publish.js @@ -2,7 +2,6 @@ module.exports = publish var npm = require("./npm.js") - , registry = npm.registry , log = require("npmlog") , tar = require("./utils/tar.js") , path = require("path") @@ -10,6 +9,8 @@ var npm = require("./npm.js") , fs = require("graceful-fs") , lifecycle = require("./utils/lifecycle.js") , chain = require("slide").chain + , Conf = require("npmconf").Conf + , RegClient = require("npm-registry-client") publish.usage = "npm publish <tarball>" + "\nnpm publish <folder>" @@ -61,11 +62,11 @@ function publish_ (arg, data, isRetry, cachedir, cb) { if (!data) return cb(new Error("no package.json file found")) // check for publishConfig hash + var registry = npm.registry if (data.publishConfig) { - Object.keys(data.publishConfig).forEach(function (k) { - log.info("publishConfig", k + "=" + data.publishConfig[k]) - npm.config.set(k, data.publishConfig[k]) - }) + var pubConf = new Conf(npm.config) + pubConf.unshift(data.publishConfig) + registry = new RegClient(pubConf) } data._npmVersion = npm.version @@ -77,10 +78,6 @@ function publish_ (arg, data, isRetry, cachedir, cb) { ("This package has been marked as private\n" +"Remove the 'private' field from the package.json to publish it.")) - regPublish(data, isRetry, arg, cachedir, cb) -} - -function regPublish (data, isRetry, arg, cachedir, cb) { var tarball = cachedir + ".tgz" registry.publish(data, tarball, function (er) { if (er && er.code === "EPUBLISHCONFLICT" diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index 68ede5f6998..7fabd699906 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -197,6 +197,12 @@ function errorHandler (er) { ,"Move it away, and try again."].join("\n")) break + case "ENEEDAUTH": + log.error("need auth", [er.message + ,"You need to authorize this machine using `npm adduser`" + ].join("\n")) + break + case "ENOTSUP": if (er.required) { log.error("notsup", [er.message diff --git a/deps/npm/lib/utils/fetch.js b/deps/npm/lib/utils/fetch.js index 6042abc5282..b9885206600 100644 --- a/deps/npm/lib/utils/fetch.js +++ b/deps/npm/lib/utils/fetch.js @@ -65,9 +65,10 @@ function makeRequest (remote, fstr, headers) { "Auth required and none provided. Please run 'npm adduser'")) } - var proxy = npm.config.get( remote.protocol === "https:" - ? "https-proxy" - : "proxy") + var proxy + if (remote.protocol !== "https:" || !(proxy = npm.config.get("https-proxy"))) { + proxy = npm.config.get("proxy") + } var opts = { url: remote , proxy: proxy diff --git a/deps/npm/lib/utils/find-prefix.js b/deps/npm/lib/utils/find-prefix.js index bc2c9598dbb..c3ff85f5930 100644 --- a/deps/npm/lib/utils/find-prefix.js +++ b/deps/npm/lib/utils/find-prefix.js @@ -14,7 +14,6 @@ function findPrefix (p, cb_) { } p = path.resolve(p) - if (npm.config.get("global")) return cb(null, p) // if there's no node_modules folder, then // walk up until we hopefully find one. // if none anywhere, then use cwd. diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js index bdfd48165b6..592d83d4cca 100644 --- a/deps/npm/lib/view.js +++ b/deps/npm/lib/view.js @@ -189,7 +189,7 @@ function printData (data, name, cb) { fields.forEach(function (f) { var d = cleanup(data[v][f]) if (showVersions || showFields || typeof d !== "string") { - d = util.inspect(cleanup(data[v][f]), false, 5, true) + d = util.inspect(cleanup(data[v][f]), false, 5, npm.color) } if (f && showFields) f += " = " if (d.indexOf("\n") !== -1) d = "\n" + d diff --git a/deps/npm/man/man1/config.1 b/deps/npm/man/man1/config.1 index f1a4ee09c53..799179b5e7f 100644 --- a/deps/npm/man/man1/config.1 +++ b/deps/npm/man/man1/config.1 @@ -947,6 +947,21 @@ Type: path A node module to \fBrequire()\fR when npm loads\. Useful for programmatic usage\. . +.SS "optional" +. +.IP "\(bu" 4 +Default: true +. +.IP "\(bu" 4 +Type: Boolean +. +.IP "" 0 +. +.P +Attempt to install packages in the \fBoptionalDependencies\fR hash\. Note +that if these packages fail to install, the overall installation +process is not aborted\. +. .SS "parseable" . .IP "\(bu" 4 diff --git a/deps/npm/man/man1/dedupe.1 b/deps/npm/man/man1/dedupe.1 new file mode 100644 index 00000000000..35b0d1de189 --- /dev/null +++ b/deps/npm/man/man1/dedupe.1 @@ -0,0 +1,90 @@ +.\" Generated with Ronnjs 0.3.8 +.\" http://github.com/kapouer/ronnjs/ +. +.TH "NPM\-DEDUPE" "1" "August 2012" "" "" +. +.SH "NAME" +\fBnpm-dedupe\fR \-\- Reduce duplication +. +.SH "SYNOPSIS" +. +.nf +npm dedupe [package names\.\.\.] +. +.fi +. +.SH "DESCRIPTION" +Searches the local package tree and attempts to simplify the overall +structure by moving dependencies further up the tree, where they can +be more effectively shared by multiple dependent packages\. +. +.P +For example, consider this dependency graph: +. +.IP "" 4 +. +.nf +a ++\-\- b <\-\- depends on c@1\.0\.x +| `\-\- c@1\.0\.3 +`\-\- d <\-\- depends on c@~1\.0\.9 + `\-\- c@1\.0\.10 +. +.fi +. +.IP "" 0 +. +.P +In this case, \fBnpm help dedupe\fR will transform the tree to: +. +.IP "" 4 +. +.nf +a ++\-\- b ++\-\- d +`\-\- c@1\.0\.10 +. +.fi +. +.IP "" 0 +. +.P +Because of the hierarchical nature of node\'s module lookup, b and d +will both get their dependency met by the single c package at the root +level of the tree\. +. +.P +If a suitable version exists at the target location in the tree +already, then it will be left untouched, but the other duplicates will +be deleted\. +. +.P +If no suitable version can be found, then a warning is printed, and +nothing is done\. +. +.P +If any arguments are supplied, then they are filters, and only the +named packages will be touched\. +. +.P +Note that this operation transforms the dependency tree, and may +result in packages getting updated versions, perhaps from the npm +registry\. +. +.P +This feature is experimental, and may change in future versions\. +. +.SH "SEE ALSO" +. +.IP "\(bu" 4 +npm help ls +. +.IP "\(bu" 4 +npm help update +. +.IP "\(bu" 4 +npm help install +. +.IP "" 0 + diff --git a/deps/npm/man/man1/index.1 b/deps/npm/man/man1/index.1 index ec2d9a9f332..2f72291f9e9 100644 --- a/deps/npm/man/man1/index.1 +++ b/deps/npm/man/man1/index.1 @@ -39,6 +39,9 @@ .SH "npm help config" Manage the npm configuration file . +.SH "npm help dedupe" + Reduce duplication +. .SH "npm help deprecate" Deprecate a version of a package . diff --git a/deps/npm/man/man1/list.1 b/deps/npm/man/man1/list.1 index 65db45c02ac..00a743ae181 100644 --- a/deps/npm/man/man1/list.1 +++ b/deps/npm/man/man1/list.1 @@ -29,7 +29,7 @@ For example, running \fBnpm ls promzard\fR in npm\'s source tree will show: .IP "" 4 . .nf -npm@1.1.49 /path/to/npm +npm@1.1.59 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 . diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 522d451aa2d..f4b65cece2e 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -14,7 +14,7 @@ npm <command> [args] .fi . .SH "VERSION" -1.1.49 +1.1.59 . .SH "DESCRIPTION" npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man3/npm.3 b/deps/npm/man/man3/npm.3 index cdbccc90cda..7c8a52870dd 100644 --- a/deps/npm/man/man3/npm.3 +++ b/deps/npm/man/man3/npm.3 @@ -21,7 +21,7 @@ npm\.load(configObject, function (er, npm) { .fi . .SH "VERSION" -1.1.49 +1.1.59 . .SH "DESCRIPTION" This is the API documentation for npm\. diff --git a/deps/npm/node_modules/couch-login/couch-login.js b/deps/npm/node_modules/couch-login/couch-login.js index cd7b12c1434..be037f0f219 100644 --- a/deps/npm/node_modules/couch-login/couch-login.js +++ b/deps/npm/node_modules/couch-login/couch-login.js @@ -283,7 +283,7 @@ function logout (cb) { , req = { uri: u, headers: h, json: true } request.del(req, function (er, res, data) { - if (er || res.statusCode !== 200) { + if (er || (res.statusCode !== 200 && res.statusCode !== 404)) { return cb(er, res, data) } diff --git a/deps/npm/node_modules/couch-login/package.json b/deps/npm/node_modules/couch-login/package.json index a485486a8f1..7d62b739f6b 100644 --- a/deps/npm/node_modules/couch-login/package.json +++ b/deps/npm/node_modules/couch-login/package.json @@ -6,7 +6,7 @@ }, "name": "couch-login", "description": "A module for doing logged-in requests to a couchdb server", - "version": "0.1.9", + "version": "0.1.10", "repository": { "type": "git", "url": "git://github.com/isaacs/couch-login.git" @@ -22,6 +22,6 @@ "tap": "~0.2.4" }, "readme": "# couch-login\n\nThis module lets you log into couchdb to get a session token, then make\nrequests using that session. It is basically just a thin wrapper around\n[@mikeal's request module](https://github.com/mikeal/request).\n\nThis is handy if you want a user to take actions in a couchdb database\non behalf of a user, without having to store their couchdb username and\npassword anywhere. (You do need to store the AuthSession token\nsomewhere, though.)\n\n## Usage\n\n```javascript\nvar CouchLogin = require('couch-login')\n\n// Nothing about this module is http-server specific of course.\n// You could also use it to do authenticated requests against\n// a couchdb using sessions and storing the token somewhere else.\n\nhttp.createServer(function (req, res) {\n var couch = new CouchLogin('http://my-couch.iriscouch.com:5984/')\n\n // .. look up the token in the user's session or whatever ..\n // Look at couch.decorate(req, res) for more on doing that\n // automatically, below.\n\n if (sessionToken) {\n // this user already logged in.\n couch.token = sessionToken\n\n // now we can do things on their behalf, like:\n // 1. View their session info.\n // like doing request.get({ uri: couch + '/_session', ... })\n // but with the cookie and whatnot\n\n couch.get('/_session', function (er, resp, data) {\n // er = some kind of communication error.\n // resp = response object from the couchdb request.\n // data = parsed JSON response body.\n if (er || resp.statusCode !== 200) {\n res.statusCode = resp.statusCode || 403\n return res.end('Invalid login or something')\n }\n\n // now we have the session info, we know who this user is.\n // hitting couchdb for this on every request is kinda costly,\n // so maybe you should store the username wherever you're storing\n // the sessionToken. RedSess is a good util for this, if you're\n // into redis. And if you're not into redis, you're crazy,\n // because it is awesome.\n\n // now let's get the user record.\n // note that this will 404 for anyone other than the user,\n // unless they're a server admin.\n couch.get('/_users/org.couchdb.user:' + data.userCtx.name, etc)\n\n // PUTs and DELETEs will also use their session, of course, so\n // your validate_doc_update's will see their info in userCtx\n })\n\n } else {\n // don't have a sessionToken.\n // get a username and password from the post body or something.\n // maybe redirect to a /login page or something to ask for that.\n var login = { name: name, password: password }\n couch.login(login, function (er, resp, data) {\n // again, er is an error, resp is the response obj, data is the json\n if (er || resp.statusCode !== 200) {\n res.statusCode = resp.statusCode || 403\n return res.end('Invalid login or something')\n }\n\n // the data is something like\n // {\"ok\":true,\"name\":\"testuser\",\"roles\":[]}\n // and couch.token is the token you'll need to save somewhere.\n\n // at this point, you can start making authenticated requests to\n // couchdb, or save data in their session, or do whatever it is\n // that you need to do.\n\n res.statusCode = 200\n res.write(\"Who's got two thumbs and just logged you into couch?\\n\")\n setTimeout(function () {\n res.end(\"THIS GUY!\")\n }, 500)\n })\n }\n})\n```\n\n## Class: CouchLogin\n### new CouchLogin(couchdbUrl, token)\n\nCreate a new CouchLogin object bound to the couchdb url.\n\nIn addition to these, the `get`, `post`, `put`, and `del` methods all\nproxy to the associated method on [request](https://github.com/mikeal/request).\n\nHowever, as you'll note in the example above, only the pathname portion\nof the url is required. Urls will be appended to the couchdb url passed\ninto the constructor.\n\nIf you have to talk to more than one couchdb, then you'll need more than\none CouchLogin object, for somewhat obvious reasons.\n\nAll callbacks get called with the following arguments, which are exactly\nidentical to the arguments passed to a `request` callback.\n\n* `er` {Error | null} Set if a communication error happens.\n* `resp` {HTTP Response} The response from the request to couchdb\n* `data` {Object} The parsed JSON data from couch\n\nIf the token is the string \"anonymous\", then it will not attempt to log\nin before making requests. If the token is not \"anonymous\", then it\nmust be an object with the appropriate fields.\n\n### couch.token\n\n* {Object}\n\nAn object representing the couchdb session token. (Basically just a\ncookie and a timeout.)\n\nIf the token has already timed out, then setting it will have no effect.\n\n### couch.tokenSet\n\nIf set, this method is called whenever the token is saved.\n\nFor example, you could assign a function to this method to save the\ntoken into a redis session, a cookie, or in some other database.\n\nTakes a callback which should be called when the token is saved.\n\n### couch.tokenGet\n\nIf set, this method is called to look up the token on demand.\n\nThe inverse of couch.tokenSet. Takes a callback which is called with\nthe `cb(er || null, token)`.\n\n### couch.tokenDel\n\nIf set, this method is called to delete the token when it should be\ndiscarded.\n\nRelated to tokenGet and tokenSet. Takes a callback which should be\ncalled when the token is deleted.\n\n### couch.anonymous()\n\nReturn a new CouchLogin object that points at the same couchdb server,\nbut doesn't try to log in before making requests.\n\nThis is handy for situations where the user is not logged in at the\nmoment, but a request needs to be made anyway, and does not require\nauthorization.\n\n### couch.login(auth, callback)\n\n* `auth` {Object} The login details\n * `name` {String}\n * `password` {String}\n* `callback` {Function}\n\nWhen the callback is called, the `couch.token` will already have been\nset (assuming it worked!), so subsequent requests will be done as that\nuser.\n\n### couch.get(path, callback)\n\nGET the supplied path from the couchdb using the credentials on the\ntoken.\n\nFails if the token is invalid or expired.\n\n### couch.del(path, callback)\n\nDELETE the supplied path from the couchdb using the credentials on the\ntoken.\n\nFails if the token is invalid or expired.\n\n### couch.post(path, data, callback)\n\nPOST the data to the supplied path in the couchdb, using the credentials\non the token.\n\nFails if the token is invalid or expired.\n\n### couch.put(path, data, callback)\n\nPUT the data to the supplied path in the couchdb, using the credentials\non the token.\n\nFails if the token is invalid or expired.\n\n### couch.changePass(newAuth, callback)\n\nMust already be logged in. Updates the `_users` document with new salt\nand hash, and re-logs in with the new credentials. Callback is called\nwith the same arguments as login, or the first step of the process that\nfailed.\n\n### couch.signup(userData, callback)\n\nCreate a new user account. The userData must contain at least a `name`\nand `password` field. Any additional data will be copied to the user\nrecord. The `_id`, `name`, `roles`, `type`, `password_sha`, `salt`, and\n`date` fields are generated.\n\nAlso signs in as the newly created user, on successful account creation.\n\n### couch.deleteAccount(name, callback)\n\nDeletes a user account. If not logged in as the user, or a server\nadmin, then the request will fail.\n\nNote that this immediately invalidates any session tokens for the\ndeleted user account. If you are deleting the user's record, then you\nought to follow this with `couch.logout(callback)` so that it won't try\nto re-use the invalid session.\n\n### couch.logout(callback)\n\nDelete the session out of couchdb. This makes the token permanently\ninvalid, and deletes it.\n\n### couch.decorate(req, res)\n\nSet up `req.couch` and `res.couch` as references to this couch login\ninstance.\n\nAdditionall, if `req.session` or `res.session` is set, then it'll call\n`session.get('couch_token', cb)` as the tokenGet method,\n`session.set('couch_token', token, cb)` as the tokenSet method, and\n`session.del('couch_token', cb)` as the tokenDel method.\n\nThis works really nice with\n[RedSess](https://github.com/isaacs/redsess).\n", - "_id": "couch-login@0.1.9", - "_from": "couch-login@latest" + "_id": "couch-login@0.1.10", + "_from": "couch-login@~0.1.9" } diff --git a/deps/npm/node_modules/mkdirp/.gitignore.orig b/deps/npm/node_modules/mkdirp/.gitignore.orig deleted file mode 100644 index 9303c347ee6..00000000000 --- a/deps/npm/node_modules/mkdirp/.gitignore.orig +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log
\ No newline at end of file diff --git a/deps/npm/node_modules/mkdirp/.gitignore.rej b/deps/npm/node_modules/mkdirp/.gitignore.rej deleted file mode 100644 index 69244ff8773..00000000000 --- a/deps/npm/node_modules/mkdirp/.gitignore.rej +++ /dev/null @@ -1,5 +0,0 @@ ---- /dev/null -+++ .gitignore -@@ -0,0 +1,2 @@ -+node_modules/ -+npm-debug.log
\ No newline at end of file diff --git a/deps/npm/node_modules/mkdirp/examples/pow.js.orig b/deps/npm/node_modules/mkdirp/examples/pow.js.orig deleted file mode 100644 index 77414622120..00000000000 --- a/deps/npm/node_modules/mkdirp/examples/pow.js.orig +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', 0755, function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/deps/npm/node_modules/mkdirp/examples/pow.js.rej b/deps/npm/node_modules/mkdirp/examples/pow.js.rej deleted file mode 100644 index 81e7f431156..00000000000 --- a/deps/npm/node_modules/mkdirp/examples/pow.js.rej +++ /dev/null @@ -1,19 +0,0 @@ ---- examples/pow.js -+++ examples/pow.js -@@ -1,6 +1,15 @@ --var mkdirp = require('mkdirp').mkdirp; -+var mkdirp = require('../').mkdirp, -+ mkdirpSync = require('../').mkdirpSync; - - mkdirp('/tmp/foo/bar/baz', 0755, function (err) { - if (err) console.error(err) - else console.log('pow!') - }); -+ -+try { -+ mkdirpSync('/tmp/bar/foo/baz', 0755); -+ console.log('double pow!'); -+} -+catch (ex) { -+ console.log(ex); -+}
\ No newline at end of file diff --git a/deps/npm/node_modules/mkdirp/index.js b/deps/npm/node_modules/mkdirp/index.js index 874b31095a8..fda6de8a2c2 100644 --- a/deps/npm/node_modules/mkdirp/index.js +++ b/deps/npm/node_modules/mkdirp/index.js @@ -27,18 +27,10 @@ function mkdirP (p, mode, f, made) { }); break; - case 'EISDIR': - case 'EPERM': - // Operation not permitted or already is a dir. - // This is the error you get when trying to mkdir('c:/') - // on windows, or mkdir('/') on unix. Make sure it's a - // dir by falling through to the EEXIST case. - case 'EROFS': - // a read-only file system. - // However, the dir could already exist, in which case - // the EROFS error will be obscuring a EEXIST! - // Fallthrough to that case. - case 'EEXIST': + // 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. @@ -46,10 +38,6 @@ function mkdirP (p, mode, f, made) { else cb(null, made); }); break; - - default: - cb(er, made); - break; } }); } @@ -74,7 +62,10 @@ mkdirP.sync = function sync (p, mode, made) { sync(p, mode, made); break; - case 'EEXIST' : + // 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); @@ -84,9 +75,6 @@ mkdirP.sync = function sync (p, mode, made) { } if (!stat.isDirectory()) throw err0; break; - default : - throw err0 - break; } } diff --git a/deps/npm/node_modules/mkdirp/package.json b/deps/npm/node_modules/mkdirp/package.json index f779658374a..0d1eb988be0 100644 --- a/deps/npm/node_modules/mkdirp/package.json +++ b/deps/npm/node_modules/mkdirp/package.json @@ -1,7 +1,7 @@ { "name": "mkdirp", "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.3", + "version": "0.3.4", "author": { "name": "James Halliday", "email": "mail@substack.net", @@ -14,7 +14,7 @@ ], "repository": { "type": "git", - "url": "git://github.com/substack/node-mkdirp.git" + "url": "http://github.com/substack/node-mkdirp.git" }, "scripts": { "test": "tap test/*.js" @@ -26,16 +26,7 @@ "engines": { "node": "*" }, - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "_id": "mkdirp@0.3.3", - "dependencies": {}, - "optionalDependencies": {}, - "_engineSupported": true, - "_npmVersion": "1.1.24", - "_nodeVersion": "v0.7.10-pre", - "_defaultsLoaded": true, - "_from": "mkdirp@0.3" + "readme": "mkdirp\n======\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\nexample\n=======\n\npow.js\n------\n var mkdirp = require('mkdirp');\n \n mkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n });\n\nOutput\n pow!\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\nmethods\n=======\n\nvar mkdirp = require('mkdirp');\n\nmkdirp(dir, mode, cb)\n---------------------\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\nmkdirp.sync(dir, mode)\n----------------------\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\ninstall\n=======\n\nWith [npm](http://npmjs.org) do:\n\n npm install mkdirp\n\nlicense\n=======\n\nMIT/X11\n", + "_id": "mkdirp@0.3.4", + "_from": "mkdirp@~0.3.3" } diff --git a/deps/npm/node_modules/node-gyp/addon.gypi b/deps/npm/node_modules/node-gyp/addon.gypi index 89e71c0c502..1573fa92b21 100644 --- a/deps/npm/node_modules/node-gyp/addon.gypi +++ b/deps/npm/node_modules/node-gyp/addon.gypi @@ -15,6 +15,9 @@ }], [ 'OS=="win"', { 'libraries': [ '-l<(node_root_dir)/$(Configuration)/node.lib' ], + # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>' + # needs to have dll-interface to be used by clients of class 'node::ObjectWrap' + 'msvs_disabled_warnings': [ 4251 ], }], [ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux" and target_arch!="ia32")', { 'cflags': [ '-fPIC' ], diff --git a/deps/npm/node_modules/node-gyp/lib/build.js b/deps/npm/node_modules/node-gyp/lib/build.js index dc0a120b98e..01abdd5a629 100644 --- a/deps/npm/node_modules/node-gyp/lib/build.js +++ b/deps/npm/node_modules/node-gyp/lib/build.js @@ -176,9 +176,13 @@ function build (gyp, argv, callback) { argv.push('/clp:Verbosity=minimal') } - // Turn off the Microsoft logo on Windows if (win) { + // Turn off the Microsoft logo on Windows argv.push('/nologo') + + // Fix "warning MSB8012: TargetExt(.dll) does not match + // the Linker's OutputFile property value (.node)" + argv.push('/property:TargetExt=.node') } // Specify the build type, Release by default diff --git a/deps/npm/node_modules/node-gyp/lib/node-gyp.js b/deps/npm/node_modules/node-gyp/lib/node-gyp.js index 26c8beb64d8..58275ee5b3f 100644 --- a/deps/npm/node_modules/node-gyp/lib/node-gyp.js +++ b/deps/npm/node_modules/node-gyp/lib/node-gyp.js @@ -83,6 +83,7 @@ proto.configDefs = { , proxy: String // 'install' , nodedir: String // 'configure' , loglevel: String // everywhere + , python: String // 'configure' } /** diff --git a/deps/npm/node_modules/node-gyp/package.json b/deps/npm/node_modules/node-gyp/package.json index 7fa75a89850..ab5194150b7 100644 --- a/deps/npm/node_modules/node-gyp/package.json +++ b/deps/npm/node_modules/node-gyp/package.json @@ -10,7 +10,7 @@ "bindings", "gyp" ], - "version": "0.6.5", + "version": "0.6.7", "installVersion": 9, "author": { "name": "Nathan Rajlich", @@ -45,6 +45,6 @@ "node": ">= 0.6.0" }, "readme": "node-gyp\n=========\n### Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js, which takes away the pain of dealing with the\nvarious differences in build platforms. It is the replacement to the `node-waf`\nprogram which is removed for node `v0.8`. If you have a native addon for node that\nstill has a `wscript` file, then you should definitely add a `binding.gyp` file\nto support the latest versions of node.\n\nMultiple target versions of node are supported (i.e. `0.6`, `0.7`,..., `1.0`,\netc.), regardless of what version of node is actually installed on your system\n(`node-gyp` downloads the necessary development files for the target version).\n\n#### Features:\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node\n\n\nInstallation\n------------\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n * On Unix:\n * `python`\n * `make`\n * A proper C/C++ compiler toolchain, like GCC\n * On Windows:\n * [Python][windows-python] ([`v2.7.2`][windows-python-v2.7.2] recommended, `v3.x.x` not yet supported)\n * Microsoft Visual C++ ([Express][msvc] version works well)\n * For 64-bit builds of node and native modules you will _also_ need the [Windows 7 64-bit SDK][win7sdk]\n\nHow to Use\n----------\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\n__Note__: The `configure` step looks for the `binding.gyp` file in the current\ndirectory to processs. See below for instructions on creating the `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point\nyou can require the `.node` file with Node and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running the either `configure` or `build` command.\n\n\nThe \"binding.gyp\" file\n----------------------\n\nPreviously when node had `node-waf` you had to write a `wscript` file. The\nreplacement for that is the `binding.gyp` file, which describes the configuration\nto build your module in a JSON-like format. This file gets placed in the root of\nyour package, alongside the `package.json` file.\n\nA barebones `gyp` file appropriate for building a node addon looks like:\n\n``` json\n{\n \"targets\": [\n {\n \"target_name\": \"binding\",\n \"sources\": [ \"src/binding.cc\" ]\n }\n ]\n}\n```\n\nSome additional resources for writing `gyp` files:\n\n * [\"Hello World\" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)\n * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)\n * [*\"binding.gyp\" files out in the wild* wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\nCommands\n--------\n\n`node-gyp` responds to the following commands:\n\n| **Command** | **Description**\n|:--------------|:---------------------------------------------------------------\n| `build` | Invokes `make`/`msbuild.exe` and builds the native addon\n| `clean` | Removes any the `build` dir if it exists\n| `configure` | Generates project build files for the current platform\n| `rebuild` | Runs \"clean\", \"configure\" and \"build\" all in a row\n| `install` | Installs node development header files for the given version\n| `list` | Lists the currently installed node development file versions\n| `remove` | Removes the node development header files for the given version\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\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.\n\n\n[windows-python]: http://www.python.org/getit/windows\n[windows-python-v2.7.2]: http://www.python.org/download/releases/2.7.2#download\n[msvc]: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express\n[win7sdk]: http://www.microsoft.com/download/en/details.aspx?displayLang=en&id=8279\n", - "_id": "node-gyp@0.6.5", + "_id": "node-gyp@0.6.7", "_from": "node-gyp@~0.6.4" } diff --git a/deps/npm/node_modules/node-uuid/.npmignore b/deps/npm/node_modules/node-uuid/.npmignore deleted file mode 100644 index fd4f2b066b3..00000000000 --- a/deps/npm/node_modules/node-uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/deps/npm/node_modules/node-uuid/LICENSE.md b/deps/npm/node_modules/node-uuid/LICENSE.md deleted file mode 100644 index bcdddf9a05f..00000000000 --- a/deps/npm/node_modules/node-uuid/LICENSE.md +++ /dev/null @@ -1,3 +0,0 @@ -Copyright (c) 2010 Robert Kieffer - -Dual licensed under the [MIT](http://en.wikipedia.org/wiki/MIT_License) and [GPL](http://en.wikipedia.org/wiki/GNU_General_Public_License) licenses. diff --git a/deps/npm/node_modules/node-uuid/README.md b/deps/npm/node_modules/node-uuid/README.md deleted file mode 100644 index a44d9a761bf..00000000000 --- a/deps/npm/node_modules/node-uuid/README.md +++ /dev/null @@ -1,199 +0,0 @@ -# node-uuid - -Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. - -Features: - -* Generate RFC4122 version 1 or version 4 UUIDs -* Runs in node.js and all browsers. -* Cryptographically strong random # generation on supporting platforms -* 1.1K minified and gzip'ed (Want something smaller? Check this [crazy shit](https://gist.github.com/982883) out! ) -* [Annotated source code](http://broofa.github.com/node-uuid/docs/uuid.html) - -## Getting Started - -Install it in your browser: - -```html -<script src="uuid.js"></script> -``` - -Or in node.js: - -``` -npm install node-uuid -``` - -```javascript -var uuid = require('node-uuid'); -``` - -Then create some ids ... - -```javascript -// Generate a v1 (time-based) id -uuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' - -// Generate a v4 (random) id -uuid.v4(); // -> '110ec58a-a0f2-4ac4-8393-c866d813b8d1' -``` - -## API - -### uuid.v1([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v1 (timestamp-based) UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomnly generated ID. See note 1. - * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. - * `msecs` - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used. - * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Notes: - -1. The randomly generated node id is only guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v1({ - node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], - clockseq: 0x1234, - msecs: new Date('2011-11-01').getTime(), - nsecs: 5678 -}); // -> "710b962e-041c-11e1-9234-0123456789ab" -``` - -Example: In-place generation of two binary IDs - -```javascript -// Generate two ids in an array -var arr = new Array(32); // -> [] -uuid.v1(null, arr, 0); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15] -uuid.v1(null, arr, 16); // -> [02 a2 ce 90 14 32 11 e1 85 58 0b 48 8e 4f c1 15 02 a3 1c b0 14 32 11 e1 85 58 0b 48 8e 4f c1 15] - -// Optionally use uuid.unparse() to get stringify the ids -uuid.unparse(buffer); // -> '02a2ce90-1432-11e1-8558-0b488e4fc115' -uuid.unparse(buffer, 16) // -> '02a31cb0-1432-11e1-8558-0b488e4fc115' -``` - -### uuid.v4([`options` [, `buffer` [, `offset`]]]) - -Generate and return a RFC4122 v4 UUID. - -* `options` - (Object) Optional uuid state to apply. Properties may include: - - * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values - * `rng` - (Function) Random # generator to use. Set to one of the built-in generators - `uuid.mathRNG` (all platforms), `uuid.nodeRNG` (node.js only), `uuid.whatwgRNG` (WebKit only) - or a custom function that returns an array[16] of byte values. - -* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. -* `offset` - (Number) Starting index in `buffer` at which to begin writing. - -Returns `buffer`, if specified, otherwise the string form of the UUID - -Example: Generate string UUID with fully-specified options - -```javascript -uuid.v4({ - random: [ - 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, - 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 - ] -}); -// -> "109156be-c4fb-41ea-b1b4-efe1671c5836" -``` - -Example: Generate two IDs in a single buffer - -```javascript -var buffer = new Array(32); // (or 'new Buffer' in node.js) -uuid.v4(null, buffer, 0); -uuid.v4(null, buffer, 16); -``` - -### uuid.parse(id[, buffer[, offset]]) -### uuid.unparse(buffer[, offset]) - -Parse and unparse UUIDs - - * `id` - (String) UUID(-like) string - * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. Default: A new Array or Buffer is used - * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default: 0 - -Example parsing and unparsing a UUID string - -```javascript -var bytes = uuid.parse('797ff043-11eb-11e1-80d6-510998755d10'); // -> <Buffer 79 7f f0 43 11 eb 11 e1 80 d6 51 09 98 75 5d 10> -var string = uuid.unparse(bytes); // -> '797ff043-11eb-11e1-80d6-510998755d10' -``` - -### uuid.noConflict() - -(Browsers only) Set `uuid` property back to it's previous value. - -Returns the node-uuid object. - -Example: - -```javascript -var myUuid = uuid.noConflict(); -myUuid.v1(); // -> '6c84fb90-12c4-11e1-840d-7b25c5ee775a' -``` - -## Deprecated APIs - -Support for the following v1.2 APIs is available in v1.3, but is deprecated and will be removed in the next major version. - -### uuid([format [, buffer [, offset]]]) - -uuid() has become uuid.v4(), and the `format` argument is now implicit in the `buffer` argument. (i.e. if you specify a buffer, the format is assumed to be binary). - -### uuid.BufferClass - -The class of container created when generating binary uuid data if no buffer argument is specified. This is expected to go away, with no replacement API. - -## Testing - -In node.js - -``` -> cd test -> node uuid.js -``` - -In Browser - -``` -open test/test.html -``` - -### Benchmarking - -Requires node.js - -``` -npm install uuid uuid-js -node test/benchmark.js -``` - -For a more complete discussion of node-uuid performance, please see the `benchmark/README.md` file, and the [benchmark wiki](https://github.com/broofa/node-uuid/wiki/Benchmark) - -For browser performance [checkout the JSPerf tests](http://jsperf.com/node-uuid-performance). - -## Release notes - -v1.3.2: -* Improve tests and handling of v1() options (Issue #24) -* Expose RNG option to allow for perf testing with different generators - -v1.3: -* Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! -* Support for node.js crypto API -* De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/deps/npm/node_modules/node-uuid/package.json b/deps/npm/node_modules/node-uuid/package.json deleted file mode 100644 index 9df0da985d0..00000000000 --- a/deps/npm/node_modules/node-uuid/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name" : "node-uuid", - "description" : "Rigorous implementation of RFC4122 (v1 and v4) UUIDs.", - "url" : "http://github.com/broofa/node-uuid", - "keywords" : ["uuid", "guid", "rfc4122"], - "author" : "Robert Kieffer <robert@broofa.com>", - "contributors" : [ - {"name": "Christoph Tavan <dev@tavan.de>", "github": "https://github.com/ctavan"} - ], - "dependencies" : {}, - "lib" : ".", - "main" : "./uuid.js", - "version" : "1.3.3" -} diff --git a/deps/npm/node_modules/node-uuid/uuid.js b/deps/npm/node_modules/node-uuid/uuid.js deleted file mode 100644 index 27f1d1272de..00000000000 --- a/deps/npm/node_modules/node-uuid/uuid.js +++ /dev/null @@ -1,249 +0,0 @@ -// node-uuid/uuid.js -// -// Copyright (c) 2010 Robert Kieffer -// Dual licensed under the MIT and GPL licenses. -// Documentation and details at https://github.com/broofa/node-uuid -(function() { - var _global = this; - - // Unique ID creation requires a high quality random # generator, but - // Math.random() does not guarantee "cryptographic quality". So we feature - // detect for more robust APIs, normalizing each method to return 128-bits - // (16 bytes) of random data. - var mathRNG, nodeRNG, whatwgRNG; - - // Math.random()-based RNG. All platforms, very fast, unknown quality - var _rndBytes = new Array(16); - mathRNG = function() { - var r, b = _rndBytes, i = 0; - - for (var i = 0, r; i < 16; i++) { - if ((i & 0x03) == 0) r = Math.random() * 0x100000000; - b[i] = r >>> ((i & 0x03) << 3) & 0xff; - } - - return b; - } - - // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto - // WebKit only (currently), moderately fast, high quality - if (_global.crypto && crypto.getRandomValues) { - var _rnds = new Uint32Array(4); - whatwgRNG = function() { - crypto.getRandomValues(_rnds); - - for (var c = 0 ; c < 16; c++) { - _rndBytes[c] = _rnds[c >> 2] >>> ((c & 0x03) * 8) & 0xff; - } - return _rndBytes; - } - } - - // Node.js crypto-based RNG - http://nodejs.org/docs/v0.6.2/api/crypto.html - // Node.js only, moderately fast, high quality - try { - var _rb = require('crypto').randomBytes; - nodeRNG = _rb && function() { - return _rb(16); - }; - } catch (e) {} - - // Select RNG with best quality - var _rng = nodeRNG || whatwgRNG || mathRNG; - - // Buffer class to use - var BufferClass = typeof(Buffer) == 'function' ? Buffer : Array; - - // Maps for number <-> hex string conversion - var _byteToHex = []; - var _hexToByte = {}; - for (var i = 0; i < 256; i++) { - _byteToHex[i] = (i + 0x100).toString(16).substr(1); - _hexToByte[_byteToHex[i]] = i; - } - - // **`parse()` - Parse a UUID into it's component bytes** - function parse(s, buf, offset) { - var i = (buf && offset) || 0, ii = 0; - - buf = buf || []; - s.toLowerCase().replace(/[0-9a-f]{2}/g, function(byte) { - if (ii < 16) { // Don't overflow! - buf[i + ii++] = _hexToByte[byte]; - } - }); - - // Zero out remaining bytes if string was short - while (ii < 16) { - buf[i + ii++] = 0; - } - - return buf; - } - - // **`unparse()` - Convert UUID byte array (ala parse()) into a string** - function unparse(buf, offset) { - var i = offset || 0, bth = _byteToHex; - return bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + '-' + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]] + - bth[buf[i++]] + bth[buf[i++]]; - } - - // **`v1()` - Generate time-based UUID** - // - // Inspired by https://github.com/LiosK/UUID.js - // and http://docs.python.org/library/uuid.html - - // random #'s we need to init node and clockseq - var _seedBytes = _rng(); - - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - var _nodeId = [ - _seedBytes[0] | 0x01, - _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5] - ]; - - // Per 4.2.2, randomize (14 bit) clockseq - var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff; - - // Previous uuid creation time - var _lastMSecs = 0, _lastNSecs = 0; - - // See https://github.com/broofa/node-uuid for API details - function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; - - options = options || {}; - - var clockseq = options.clockseq != null ? options.clockseq : _clockseq; - - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs != null ? options.msecs : new Date().getTime(); - - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs != null ? options.nsecs : _lastNSecs + 1; - - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; - - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq == null) { - clockseq = clockseq + 1 & 0x3fff; - } - - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs == null) { - nsecs = 0; - } - - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; - - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; - - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; - - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; - - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; - - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; - - // `clock_seq_low` - b[i++] = clockseq & 0xff; - - // `node` - var node = options.node || _nodeId; - for (var n = 0; n < 6; n++) { - b[i + n] = node[n]; - } - - return buf ? buf : unparse(b); - } - - // **`v4()` - Generate random UUID** - - // See https://github.com/broofa/node-uuid for API details - function v4(options, buf, offset) { - // Deprecated - 'format' argument, as supported in v1.2 - var i = buf && offset || 0; - - if (typeof(options) == 'string') { - buf = options == 'binary' ? new BufferClass(16) : null; - options = null; - } - options = options || {}; - - var rnds = options.random || (options.rng || _rng)(); - - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; - - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ii++) { - buf[i + ii] = rnds[ii]; - } - } - - return buf || unparse(rnds); - } - - // Export public API - var uuid = v4; - uuid.v1 = v1; - uuid.v4 = v4; - uuid.parse = parse; - uuid.unparse = unparse; - uuid.BufferClass = BufferClass; - - // Export RNG options - uuid.mathRNG = mathRNG; - uuid.nodeRNG = nodeRNG; - uuid.whatwgRNG = whatwgRNG; - - if (typeof(module) != 'undefined') { - // Play nice with node.js - module.exports = uuid; - } else { - // Play nice with browsers - var _previousRoot = _global.uuid; - - // **`noConflict()` - (browser only) to reset global 'uuid' var** - uuid.noConflict = function() { - _global.uuid = _previousRoot; - return uuid; - } - _global.uuid = uuid; - } -}()); diff --git a/deps/npm/node_modules/npm-registry-client/README.md b/deps/npm/node_modules/npm-registry-client/README.md index dbeb94422b4..4b180a02999 100644 --- a/deps/npm/node_modules/npm-registry-client/README.md +++ b/deps/npm/node_modules/npm-registry-client/README.md @@ -8,7 +8,7 @@ It handles all the caching and HTTP calls. ```javascript var RegClient = require('npm-registry-client') -var client = new RegClient(options) +var client = new RegClient(config) client.get("npm", "latest", 1000, function (er, data, raw, res) { // error is an error if there was a problem. @@ -18,29 +18,43 @@ client.get("npm", "latest", 1000, function (er, data, raw, res) { }) ``` -# Options +# Configuration + +This program is designed to work with +[npmconf](https://npmjs.org/package/npmconf), but you can also pass in +a plain-jane object with the appropriate configs, and it'll shim it +for you. Any configuration thingie that has get/set/del methods will +also be accepted. * `registry` **Required** {String} URL to the registry * `cache` **Required** {String} Path to the cache folder -* `alwaysAuth` {Boolean} Auth even for GET requests. +* `always-auth` {Boolean} Auth even for GET requests. * `auth` {String} A base64-encoded `username:password` * `email` {String} User's email address * `tag` {String} The default tag to use when publishing new packages. Default = `"latest"` * `ca` {String} Cerficate signing authority certificates to trust. -* `strictSSL` {Boolean} Whether or not to be strict with SSL +* `strict-ssl` {Boolean} Whether or not to be strict with SSL certificates. Default = `true` -* `userAgent` {String} User agent header to send. Default = +* `user-agent` {String} User agent header to send. Default = `"node/{process.version}"` * `log` {Object} The logger to use. Defaults to `require("npmlog")` if that works, otherwise logs are disabled. -* `retries` {Number} Number of times to retry on GET failures. +* `fetch-retries` {Number} Number of times to retry on GET failures. Default=2 -* `retryFactor` {Number} `factor` setting for `node-retry`. Default=10 -* `retryMinTimeout` {Number} `minTimeout` setting for `node-retry`. +* `fetch-retry-factor` {Number} `factor` setting for `node-retry`. Default=10 +* `fetch-retry-mintimeout` {Number} `minTimeout` setting for `node-retry`. Default=10000 (10 seconds) -* `retryMaxTimeout` {Number} `maxTimeout` setting for `node-retry`. +* `fetch-retry-maxtimeout` {Number} `maxTimeout` setting for `node-retry`. Default=60000 (60 seconds) +* `proxy` {URL} The url to proxy requests through. +* `https-proxy` {URL} The url to proxy https requests through. + Defaults to be the same as `proxy` if unset. +* `_auth` {String} The base64-encoded authorization header. +* `username` `_password` {String} Username/password to use to generate + `_auth` if not supplied. +* `_token` {Object} A token for use with + [couch-login](https://npmjs.org/package/couch-login) # client.request(method, where, [what], [etag], [nofollow], cb) diff --git a/deps/npm/node_modules/npm-registry-client/index.js b/deps/npm/node_modules/npm-registry-client/index.js index 377f787f4ea..8d321b86992 100644 --- a/deps/npm/node_modules/npm-registry-client/index.js +++ b/deps/npm/node_modules/npm-registry-client/index.js @@ -19,78 +19,48 @@ try { function noop () {} -function RegClient (options) { +function RegClient (conf) { + // accept either a plain-jane object, or a npmconf object + // with a "get" method. + if (typeof conf.get !== 'function') { + var data = conf + conf = { get: function (k) { return data[k] } + , set: function (k, v) { data[k] = v } + , del: function (k) { delete data[k] } } + } + + this.conf = conf + // if provided, then the registry needs to be a url. // if it's not provided, then we're just using the cache only. - var registry = options.registry + var registry = conf.get('registry') if (registry) { registry = url.parse(registry) if (!registry.protocol) throw new Error( 'Invalid registry: ' + registry.url) - this.registry = registry.href - if (this.registry.slice(-1) !== '/') { - this.registry += '/' + registry = registry.href + if (registry.slice(-1) !== '/') { + registry += '/' } + this.conf.set('registry', registry) } else { - this.registry = null + registry = null } - this.retries = options.retries || 2 - this.retryFactor = options.retryFactor || 10 - this.retryMinTimeout = options.retryMinTimeout || 10000 - this.retryMaxTimeout = options.retryMaxTimeout || 60000 - - this.cache = options.cache - if (!this.cache) throw new Error("Cache dir is required") - - this.alwaysAuth = options.alwaysAuth || false + if (!conf.get('cache')) throw new Error("Cache dir is required") - this.auth = options.auth || null - if (this.auth) { - var a = new Buffer(this.auth, "base64").toString() - a = a.split(":") - this.username = a.shift() - this.password = a.join(":") - } else { - this.username = options.username - this.password = options.password - - // if username and password are set, but auth isn't, use them. - if (this.username && this.password) { - var a = this.username + ":" + this.password - this.auth = new Buffer(a, "utf8").toString("base64") - } - } - - if (this.auth && !this.alwaysAuth && this.registry) { + var auth = this.conf.get('_auth') + var alwaysAuth = this.conf.get('always-auth') + if (auth && !alwaysAuth && registry) { // if we're always authing, then we just send the // user/pass on every thing. otherwise, create a // session, and use that. - this.token = options.token - this.couchLogin = new CouchLogin(this.registry, this.token) - this.couchLogin.proxy = this.proxy - } - - this.email = options.email || null - this.defaultTag = options.tag || "latest" - - this.ca = options.ca || null - - this.strictSSL = options.strictSSL - if (this.strictSSL === undefined) this.strictSSL = true - - this.userAgent = options.userAgent - if (this.userAgent === undefined) { - this.userAgent = 'node/' + process.version + var token = this.conf.get('_token') + this.couchLogin = new CouchLogin(registry, token) + this.couchLogin.proxy = this.conf.get('proxy') } - this.cacheMin = options.cacheMin || 0 - this.cacheMax = options.cacheMax || Infinity - - this.proxy = options.proxy - this.httpsProxy = options.httpsProxy || options.proxy - - this.log = options.log || npmlog + this.log = conf.log || conf.get('log') || npmlog } require('fs').readdirSync(__dirname + "/lib").forEach(function (f) { diff --git a/deps/npm/node_modules/npm-registry-client/lib/adduser.js b/deps/npm/node_modules/npm-registry-client/lib/adduser.js index f940ca1ca5e..7106e444d7e 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/adduser.js +++ b/deps/npm/node_modules/npm-registry-client/lib/adduser.js @@ -1,18 +1,12 @@ - module.exports = adduser -var uuid = require("node-uuid") - , crypto - -try { -} catch (ex) {} +var crypto = require('crypto') function sha (s) { return crypto.createHash("sha1").update(s).digest("hex") } function adduser (username, password, email, cb) { - if (!crypto) crypto = require("crypto") password = ("" + (password || "")).trim() if (!password) return cb(new Error("No password supplied.")) @@ -27,7 +21,7 @@ function adduser (username, password, email, cb) { "Sorry, ':' chars are not allowed in passwords.\n"+ "See <https://issues.apache.org/jira/browse/COUCHDB-969> for why.")) - var salt = uuid() + var salt = crypto.randomBytes(30).toString('hex') , userobj = { name : username , salt : salt @@ -41,18 +35,18 @@ function adduser (username, password, email, cb) { // pluck off any other username/password/token. it needs to be the // same as the user we're becoming now. replace them on error. - var pre = { username: this.username - , password: this.password - , auth: this.auth - , token: this.token } - - this.token = null + var pre = { username: this.conf.get('username') + , password: this.conf.get('_password') + , auth: this.conf.get('_auth') + , token: this.conf.get('_token') } + + this.conf.del('_token') + this.conf.del('username') + this.conf.del('_auth') + this.conf.del('_password') if (this.couchLogin) { this.couchLogin.token = null } - this.username = null - this.password = null - this.auth = null cb = done.call(this, cb, pre) @@ -72,13 +66,13 @@ function adduser (username, password, email, cb) { , function (error, data, json, response) { // if it worked, then we just created a new user, and all is well. // but if we're updating a current record, then it'll 409 first - if (error && !this.auth) { + if (error && !this.conf.get('_auth')) { // must be trying to re-auth on a new machine. // use this info as auth var b = new Buffer(username + ":" + password) - this.auth = b.toString("base64") - this.username = username - this.password = password + this.conf.set('_auth', b.toString("base64")) + this.conf.set('username', username) + this.conf.set('_password', password) } if (!error || !response || response.statusCode !== 409) { @@ -114,16 +108,16 @@ function done (cb, pre) { } // there was some kind of error, re-instate previous auth/token/etc. - this.token = pre.token + this.conf.set('_token', pre.token) if (this.couchLogin) { - this.couchLogin.token = this.token + this.couchLogin.token = pre.token if (this.couchLogin.tokenSet) { this.couchLogin.tokenSet(pre.token) } } - this.username = pre.username - this.password = pre.password - this.auth = pre.auth + this.conf.set('username', pre.username) + this.conf.set('_password', pre.password) + this.conf.set('_auth', pre.auth) this.log.verbose("adduser", "back", [error, data, json]) if (!error) { diff --git a/deps/npm/node_modules/npm-registry-client/lib/get.js b/deps/npm/node_modules/npm-registry-client/lib/get.js index 835eb4ce516..8d9bb1177e5 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/get.js +++ b/deps/npm/node_modules/npm-registry-client/lib/get.js @@ -12,10 +12,10 @@ function get (uri, timeout, nofollow, staleOk, cb) { if (typeof cb !== "function") cb = timeout, timeout = -1 if (typeof cb !== "function") cb = version, version = null - timeout = Math.min(timeout, this.cacheMax) - timeout = Math.max(timeout, this.cacheMin) + timeout = Math.min(timeout, this.conf.get('cache-max') || 0) + timeout = Math.max(timeout, this.conf.get('cache-min') || -Infinity) - if (!this.registry) timeout = Infinity + if (!this.conf.get('registry')) timeout = Infinity if ( process.env.COMP_CWORD !== undefined && process.env.COMP_LINE !== undefined @@ -29,7 +29,7 @@ function get (uri, timeout, nofollow, staleOk, cb) { return requestAll.call(this, cb) } - var cache = path.join(this.cache, uri, ".cache.json") + var cache = path.join(this.conf.get('cache'), uri, ".cache.json") fs.stat(cache, function (er, stat) { if (!er) fs.readFile(cache, function (er, data) { try { data = JSON.parse(data) } @@ -41,9 +41,9 @@ function get (uri, timeout, nofollow, staleOk, cb) { } function requestAll (cb) { - var cache = path.join(this.cache, "/-/all", ".cache.json") + var cache = path.join(this.conf.get('cache'), "/-/all", ".cache.json") - mkdir(path.join(this.cache, "-", "all"), function (er) { + mkdir(path.join(this.conf.get('cache'), "-", "all"), function (er) { fs.readFile(cache, function (er, data) { if (er) return requestAll_.call(this, 0, {}, cb) try { @@ -74,7 +74,7 @@ function requestAll_ (c, data, cb) { uri = "/-/all" } - var cache = path.join(this.cache, "-/all", ".cache.json") + var cache = path.join(this.conf.get('cache'), "-/all", ".cache.json") this.request('GET', uri, function (er, updates, _, res) { if (er) return cb(er, data) var headers = res.headers @@ -143,20 +143,20 @@ function get_ (uri, timeout, cache, stat, data, nofollow, staleOk, cb) { } function saveToCache (cache, data, saved) { - if (this.cacheStat) { - var cs = this.cacheStat + if (this._cacheStat) { + var cs = this._cacheStat return saveToCache_.call(this, cache, data, cs.uid, cs.gid, saved) } - fs.stat(this.cache, function (er, st) { + fs.stat(this.conf.get('cache'), function (er, st) { if (er) { return fs.stat(process.env.HOME || "", function (er, st) { // if this fails, oh well. if (er) return saved() - this.cacheStat = st + this._cacheStat = st return saveToCache.call(this, cache, data, saved) }.bind(this)) } - this.cacheStat = st || { uid: null, gid: null } + this._cacheStat = st || { uid: null, gid: null } return saveToCache.call(this, cache, data, saved) }.bind(this)) } diff --git a/deps/npm/node_modules/npm-registry-client/lib/publish.js b/deps/npm/node_modules/npm-registry-client/lib/publish.js index 11aa599e617..b44b801b3a8 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/publish.js +++ b/deps/npm/node_modules/npm-registry-client/lib/publish.js @@ -6,8 +6,14 @@ var path = require("path") function publish (data, tarball, cb) { - if (!this.email || !this.auth || !this.username) { - return cb(new Error("auth and email required for publishing")) + var email = this.conf.get('email') + var auth = this.conf.get('_auth') + var username = this.conf.get('username') + + if (!email || !auth || !username) { + var er = new Error("auth and email required for publishing") + er.code = 'ENEEDAUTH' + return cb(er) } // add the dist-url to the data, pointing at the tarball. @@ -15,7 +21,7 @@ function publish (data, tarball, cb) { // if the {version} is already there, then fail. // then: // PUT the data to {config.registry}/{data.name}/{data.version} - var registry = this.registry + var registry = this.conf.get('registry') var fullData = { _id : data.name @@ -25,8 +31,8 @@ function publish (data, tarball, cb) { , versions : {} , readme: data.readme || "" , maintainers : - [ { name : this.username - , email : this.email + [ { name : username + , email : email } ] } @@ -58,7 +64,7 @@ function publish (data, tarball, cb) { var dataURI = encodeURIComponent(data.name) + "/" + encodeURIComponent(data.version) - var tag = data.tag || this.defaultTag || "latest" + var tag = data.tag || this.conf.get('tag') || "latest" dataURI += "/-tag/" + tag // let's see what versions are already published. diff --git a/deps/npm/node_modules/npm-registry-client/lib/request.js b/deps/npm/node_modules/npm-registry-client/lib/request.js index 486226a7126..8d90572c668 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/request.js +++ b/deps/npm/node_modules/npm-registry-client/lib/request.js @@ -13,7 +13,8 @@ function regRequest (method, where, what, etag, nofollow, cb_) { if (typeof cb_ !== "function") cb_ = etag, etag = null if (typeof cb_ !== "function") cb_ = what, what = null - if (!this.registry) return cb(new Error( + var registry = this.conf.get('registry') + if (!registry) return cb(new Error( "No registry url provided: " + method + " " + where)) // Since there are multiple places where an error could occur, @@ -29,13 +30,11 @@ function regRequest (method, where, what, etag, nofollow, cb_) { return cb(new Error("favicon.ico isn't a package, it's a picture.")) } - var registry = this.registry - var adduserChange = /^\/?-\/user\/org\.couchdb\.user:([^\/]+)\/-rev/ , adduserNew = /^\/?-\/user\/org\.couchdb\.user:([^\/]+)/ , nu = where.match(adduserNew) , uc = where.match(adduserChange) - , isUpload = what || this.alwaysAuth + , isUpload = what || this.conf.get('always-auth') , isDel = method === "DELETE" , authRequired = isUpload && !nu || uc || isDel @@ -62,27 +61,30 @@ function regRequest (method, where, what, etag, nofollow, cb_) { } var remote = url.parse(where) - , auth = this.auth + , auth = this.conf.get('_auth') - if (authRequired && !this.alwaysAuth) { + if (authRequired && !this.conf.get('always-auth')) { var couch = this.couchLogin - , token = couch && (this.token || couch.token) + , token = couch && (this.conf.get('_token') || couch.token) , validToken = token && couch.valid(token) if (!validToken) token = null - else this.token = token + else this.conf.set('_token', token) if (couch && !token) { // login to get a valid token - var a = { name: this.username, password: this.password } + var a = { name: this.conf.get('username'), + password: this.conf.get('_password') } var args = arguments return this.couchLogin.login(a, function (er, cr, data) { if (er || !couch.valid(couch.token)) { er = er || new Error('login error') return cb(er, cr, data) } - this.token = this.couchLogin.token - return regRequest.call(this, method, where, what, etag, nofollow, cb_) + this.conf.set('_token', this.couchLogin.token) + return regRequest.call(this, + method, where, what, + etag, nofollow, cb_) }.bind(this)) } } @@ -101,11 +103,12 @@ function regRequest (method, where, what, etag, nofollow, cb_) { // Tuned to spread 3 attempts over about a minute. // See formula at <https://github.com/tim-kos/node-retry>. var operation = retry.operation({ - retries: this.retries, - factor: this.retryFactor, - minTimeout: this.retryMinTimeout, - maxTimeout: this.retryMaxTimeout + retries: this.conf.get('fetch-retries') || 2, + factor: this.conf.get('fetch-retry-factor'), + minTimeout: this.conf.get('fetch-retry-mintimeout') || 10000, + maxTimeout: this.conf.get('fetch-retry-maxtimeout') || 60000 }) + var self = this operation.attempt(function (currentAttempt) { self.log.info("retry", "registry request attempt " + currentAttempt @@ -118,8 +121,8 @@ function regRequest (method, where, what, etag, nofollow, cb_) { var timeout = statusCode === 408 var serverError = statusCode >= 500 var statusRetry = !statusCode || timeout || serverError - if (reauth && this.auth && this.token) { - this.token = null + if (reauth && this.conf.get('_auth') && this.conf.get('_token')) { + this.conf.del('_token') this.couchLogin.token = null return regRequest.call(this, method, where, what, etag, nofollow, cb_) } @@ -140,10 +143,12 @@ function makeRequest (method, remote, where, what, etag, nofollow, tok, cb_) { cb_.apply(null, arguments) } + var strict = this.conf.get('strict-ssl') + if (strict === undefined) strict = true var opts = { url: remote , method: method - , ca: this.ca - , strictSSL: this.strictSSL } + , ca: this.conf.get('ca') + , strictSSL: strict } , headers = opts.headers = {} if (etag) { this.log.verbose("etag", etag) @@ -156,10 +161,12 @@ function makeRequest (method, remote, where, what, etag, nofollow, tok, cb_) { headers.accept = "application/json" - headers["user-agent"] = this.userAgent + headers["user-agent"] = this.conf.get('user-agent') || + 'node/' + process.version - opts.proxy = remote.protocol === "https:" - ? this.httpsProxy : this.proxy + var p = this.conf.get('proxy') + var sp = this.conf.get('https-proxy') || p + opts.proxy = remote.protocol === "https:" ? sp : p // figure out wth 'what' is if (what) { @@ -259,7 +266,7 @@ function requestDone (method, where, cb) { , caches = p.map(function (part) { return _ = path.join(_, part) }).map(function (cache) { - return path.join(this.cache, cache, ".cache.json") + return path.join(this.conf.get('cache'), cache, ".cache.json") }, this) // if the method is DELETE, then also remove the thing itself. @@ -267,7 +274,7 @@ function requestDone (method, where, cb) { // That's what you get for deleting stuff. Don't do that. if (method === "DELETE") { p = p.slice(0, p.indexOf("-rev")) - caches.push(path.join(this.cache, p.join("/"))) + caches.push(path.join(this.conf.get('cache'), p.join("/"))) } asyncMap(caches, rm, function () {}) diff --git a/deps/npm/node_modules/npm-registry-client/lib/star.js b/deps/npm/node_modules/npm-registry-client/lib/star.js index 36a66127e50..5b7ab4afe90 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/star.js +++ b/deps/npm/node_modules/npm-registry-client/lib/star.js @@ -2,7 +2,7 @@ module.exports = star function star (package, starred, cb) { - if (!this.username) return cb(new Error( + if (!this.conf.get('username')) return cb(new Error( "Must be logged in to star/unstar packages")) var users = {} @@ -16,10 +16,10 @@ function star (package, starred, cb) { if (starred) { this.log.info("starring", fullData._id) - fullData.users[this.username] = true + fullData.users[this.conf.get('username')] = true this.log.verbose("starring", fullData) } else { - delete fullData.users[this.username] + delete fullData.users[this.conf.get('username')] this.log.info("unstarring", fullData._id) this.log.verbose("unstarring", fullData) } diff --git a/deps/npm/node_modules/npm-registry-client/package.json b/deps/npm/node_modules/npm-registry-client/package.json index 709027af4cb..0576a2c24f4 100644 --- a/deps/npm/node_modules/npm-registry-client/package.json +++ b/deps/npm/node_modules/npm-registry-client/package.json @@ -6,7 +6,7 @@ }, "name": "npm-registry-client", "description": "Client for the npm registry", - "version": "0.1.4", + "version": "0.2.6", "repository": { "url": "git://github.com/isaacs/npm-registry-client" }, @@ -15,7 +15,6 @@ "test": "tap test/*.js" }, "dependencies": { - "node-uuid": "~1.3.3", "request": "~2.9.202", "graceful-fs": "~1.1.8", "semver": "~1.0.14", @@ -34,7 +33,7 @@ "npmlog": "" }, "license": "BSD", - "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(options)\n\nclient.get(\"npm\", \"latest\", 1000, function (er, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Options\n\n* `registry` **Required** {String} URL to the registry\n* `cache` **Required** {String} Path to the cache folder\n* `alwaysAuth` {Boolean} Auth even for GET requests.\n* `auth` {String} A base64-encoded `username:password`\n* `email` {String} User's email address\n* `tag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `ca` {String} Cerficate signing authority certificates to trust.\n* `strictSSL` {Boolean} Whether or not to be strict with SSL\n certificates. Default = `true`\n* `userAgent` {String} User agent header to send. Default =\n `\"node/{process.version}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `retries` {Number} Number of times to retry on GET failures.\n Default=2\n* `retryFactor` {Number} `factor` setting for `node-retry`. Default=10\n* `retryMinTimeout` {Number} `minTimeout` setting for `node-retry`.\n Default=10000 (10 seconds)\n* `retryMaxTimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default=60000 (60 seconds)\n\n# client.request(method, where, [what], [etag], [nofollow], cb)\n\n* `method` {String} HTTP method\n* `where` {String} Path to request on the server\n* `what` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON.\n* `etag` {String} The cached ETag\n* `nofollow` {Boolean} Prevent following 302/301 responses\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a request to the registry. All the other methods are wrappers\naround this. one.\n\n# client.adduser(username, password, email, cb)\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `cb` {Function}\n\nAdd a user account to the registry, or verify the credentials.\n\n# client.get(url, [timeout], [nofollow], [staleOk], cb)\n\n* `url` {String} The url path to fetch\n* `timeout` {Number} Number of seconds old that a cached copy must be\n before a new request will be made.\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `staleOk` {Boolean} If there's cached data available, then return that\n to the callback quickly, and update the cache the background.\n\nFetches data from the registry via a GET request, saving it in\nthe cache folder with the ETag.\n\n# client.publish(data, tarball, [readme], cb)\n\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `readme` {String} Contents of the README markdown file\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder. However, it\ncan accept a gzipped tar stream or a filename to a tarball.\n\n# client.star(package, starred, cb)\n\n* `package` {String} Name of the package to star\n* `starred` {Boolean} True to star the package, false to unstar it.\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or\nunstar a package, though other writes do require that the user be the\npackage owner.\n\n# client.tag(project, version, tag, cb)\n\n* `project` {String} Project name\n* `version` {String} Version to tag\n* `tag` {String} Tag name to apply\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag`\nwill fetch the specified version.\n\n# client.unpublish(name, [ver], cb)\n\n* `name` {String} package name\n* `ver` {String} version to unpublish. Leave blank to unpublish all\n versions.\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When\nthe last version us unpublished, the entire document is removed from the\ndatabase.\n\n# client.upload(where, file, [etag], [nofollow], cb)\n\n* `where` {String} URL path to upload to\n* `file` {String | Stream} Either the filename or a readable stream\n* `etag` {String} Cache ETag\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `cb` {Function}\n\nUpload an attachment. Mostly used by `client.publish()`.\n", - "_id": "npm-registry-client@0.1.4", - "_from": "npm-registry-client@latest" + "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(config)\n\nclient.get(\"npm\", \"latest\", 1000, function (er, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Configuration\n\nThis program is designed to work with\n[npmconf](https://npmjs.org/package/npmconf), but you can also pass in\na plain-jane object with the appropriate configs, and it'll shim it\nfor you. Any configuration thingie that has get/set/del methods will\nalso be accepted.\n\n* `registry` **Required** {String} URL to the registry\n* `cache` **Required** {String} Path to the cache folder\n* `always-auth` {Boolean} Auth even for GET requests.\n* `auth` {String} A base64-encoded `username:password`\n* `email` {String} User's email address\n* `tag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `ca` {String} Cerficate signing authority certificates to trust.\n* `strict-ssl` {Boolean} Whether or not to be strict with SSL\n certificates. Default = `true`\n* `user-agent` {String} User agent header to send. Default =\n `\"node/{process.version}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `fetch-retries` {Number} Number of times to retry on GET failures.\n Default=2\n* `fetch-retry-factor` {Number} `factor` setting for `node-retry`. Default=10\n* `fetch-retry-mintimeout` {Number} `minTimeout` setting for `node-retry`.\n Default=10000 (10 seconds)\n* `fetch-retry-maxtimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default=60000 (60 seconds)\n* `proxy` {URL} The url to proxy requests through.\n* `https-proxy` {URL} The url to proxy https requests through.\n Defaults to be the same as `proxy` if unset.\n* `_auth` {String} The base64-encoded authorization header.\n* `username` `_password` {String} Username/password to use to generate\n `_auth` if not supplied.\n* `_token` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login)\n\n# client.request(method, where, [what], [etag], [nofollow], cb)\n\n* `method` {String} HTTP method\n* `where` {String} Path to request on the server\n* `what` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON.\n* `etag` {String} The cached ETag\n* `nofollow` {Boolean} Prevent following 302/301 responses\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a request to the registry. All the other methods are wrappers\naround this. one.\n\n# client.adduser(username, password, email, cb)\n\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `cb` {Function}\n\nAdd a user account to the registry, or verify the credentials.\n\n# client.get(url, [timeout], [nofollow], [staleOk], cb)\n\n* `url` {String} The url path to fetch\n* `timeout` {Number} Number of seconds old that a cached copy must be\n before a new request will be made.\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `staleOk` {Boolean} If there's cached data available, then return that\n to the callback quickly, and update the cache the background.\n\nFetches data from the registry via a GET request, saving it in\nthe cache folder with the ETag.\n\n# client.publish(data, tarball, [readme], cb)\n\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `readme` {String} Contents of the README markdown file\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder. However, it\ncan accept a gzipped tar stream or a filename to a tarball.\n\n# client.star(package, starred, cb)\n\n* `package` {String} Name of the package to star\n* `starred` {Boolean} True to star the package, false to unstar it.\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or\nunstar a package, though other writes do require that the user be the\npackage owner.\n\n# client.tag(project, version, tag, cb)\n\n* `project` {String} Project name\n* `version` {String} Version to tag\n* `tag` {String} Tag name to apply\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag`\nwill fetch the specified version.\n\n# client.unpublish(name, [ver], cb)\n\n* `name` {String} package name\n* `ver` {String} version to unpublish. Leave blank to unpublish all\n versions.\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When\nthe last version us unpublished, the entire document is removed from the\ndatabase.\n\n# client.upload(where, file, [etag], [nofollow], cb)\n\n* `where` {String} URL path to upload to\n* `file` {String | Stream} Either the filename or a readable stream\n* `etag` {String} Cache ETag\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `cb` {Function}\n\nUpload an attachment. Mostly used by `client.publish()`.\n", + "_id": "npm-registry-client@0.2.6", + "_from": "npm-registry-client@~0.2.4" } diff --git a/deps/npm/node_modules/npm-registry-client/test/retries.js b/deps/npm/node_modules/npm-registry-client/test/retries.js index 500abf29d95..8f0e63f721c 100644 --- a/deps/npm/node_modules/npm-registry-client/test/retries.js +++ b/deps/npm/node_modules/npm-registry-client/test/retries.js @@ -5,9 +5,9 @@ var pkg = { _id: 'some-package@1.2.3', name: 'some-package', version: '1.2.3' } var client = new RC({ - retries: 6 - , retryMinTimeout: 10 - , retryMaxTimeout: 100 + 'fetch-retries': 6 + , 'fetch-retry-mintimeout': 10 + , 'fetch-retry-maxtimeout': 100 , cache: __dirname + '/fixtures/cache' , registry: 'http://localhost:' + server.port }) diff --git a/deps/npm/node_modules/npmconf/config-defs.js b/deps/npm/node_modules/npmconf/config-defs.js index 32c13d5209b..c951b339f3e 100644 --- a/deps/npm/node_modules/npmconf/config-defs.js +++ b/deps/npm/node_modules/npmconf/config-defs.js @@ -176,6 +176,7 @@ Object.defineProperty(exports, "defaults", {get: function () { , npaturl : "http://npat.npmjs.org/" , npat : false , "onload-script" : false + , optional: true , parseable : false , pre: false , prefix : globalPrefix @@ -266,6 +267,7 @@ exports.types = , npaturl : url , npat : Boolean , "onload-script" : [null, String] + , optional: Boolean , parseable : Boolean , pre: Boolean , prefix: path @@ -304,6 +306,7 @@ exports.types = , viewer: String , yes: [false, null, Boolean] , _exit : Boolean + , _password: String } exports.shorthands = diff --git a/deps/npm/node_modules/npmconf/npmconf.js b/deps/npm/node_modules/npmconf/npmconf.js index da4b4229072..e32a958193f 100644 --- a/deps/npm/node_modules/npmconf/npmconf.js +++ b/deps/npm/node_modules/npmconf/npmconf.js @@ -9,6 +9,7 @@ var path = require('path') var nopt = require('nopt') var ini = require('ini') var Octal = configDefs.Octal +var mkdirp = require('mkdirp') exports.load = load exports.Conf = Conf @@ -143,14 +144,22 @@ function Conf (base) { Conf.prototype.save = function (where, cb) { var target = this.sources[where] - if (!target || !(target.path || target.source) || !target.data) - return this.emit('error', new Error('bad save target: '+where)) + if (!target || !(target.path || target.source) || !target.data) { + if (where !== 'builtin') + var er = new Error('bad save target: '+where) + if (cb) { + process.nextTick(cb.bind(null, er)) + return this + } + return this.emit('error', er) + } if (target.source) { var pref = target.prefix || '' Object.keys(target.data).forEach(function (k) { target.source[pref + k] = target.data[k] }) + if (cb) process.nextTick(cb) return this } @@ -174,18 +183,23 @@ Conf.prototype.save = function (where, cb) { then = then.bind(this) done = done.bind(this) this._saving ++ + var mode = where === 'user' ? 0600 : 0666 if (!data.trim()) fs.unlink(target.path, done) else { - fs.writeFile(target.path, data, 'utf8', function (er) { + mkdirp(path.dirname(target.path), function (er) { if (er) return then(er) - if (where === 'user' && myUid && myGid) - fs.chown(target.path, +myUid, +myGid, then) - else - then() - }.bind(this)) + fs.writeFile(target.path, data, 'utf8', function (er) { + if (er) + return then(er) + if (where === 'user' && myUid && myGid) + fs.chown(target.path, +myUid, +myGid, then) + else + then() + }) + }) } function then (er) { diff --git a/deps/npm/node_modules/npmconf/package.json b/deps/npm/node_modules/npmconf/package.json index 3a50fe9a4d2..849e8f229db 100644 --- a/deps/npm/node_modules/npmconf/package.json +++ b/deps/npm/node_modules/npmconf/package.json @@ -1,6 +1,6 @@ { "name": "npmconf", - "version": "0.0.6", + "version": "0.0.11", "description": "The config thing npm uses", "main": "npmconf.js", "directories": { @@ -10,6 +10,8 @@ "config-chain": "~1.1.1", "inherits": "~1.0.0", "once": "~1.1.1", + "mkdirp": "~0.3.3", + "osenv": "0.0.3", "nopt": "~2.0.0" }, "devDependencies": {}, @@ -37,6 +39,6 @@ "nopt": "~2.0.0" }, "readme": "# npmconf\n\nThe config thing npm uses\n\nIf you are interested in interacting with the config settings that npm\nuses, then use this module.\n\nHowever, if you are writing a new Node.js program, and want\nconfiguration functionality similar to what npm has, but for your\nown thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),\nwhich is probably what you want.\n\nIf I were to do it all over again, that's what I'd do for npm. But,\nalas, there are many systems depending on many of the particulars of\nnpm's configuration setup, so it's not worth the cost of changing.\n\n## USAGE\n\n```javascript\nvar npmconf = require('npmconf')\n\n// pass in the cli options that you read from the cli\n// or whatever top-level configs you want npm to use for now.\nnpmconf.load({some:'configs'}, function (er, conf) {\n // do stuff with conf\n conf.get('some', 'cli') // 'configs'\n conf.get('username') // 'joebobwhatevers'\n conf.set('foo', 'bar', 'user')\n conf.save('user', function (er) {\n // foo = bar is now saved to ~/.npmrc or wherever\n })\n})\n```\n", - "_id": "npmconf@0.0.6", - "_from": "npmconf@latest" + "_id": "npmconf@0.0.11", + "_from": "npmconf@0" } diff --git a/deps/npm/node_modules/read-installed/package.json b/deps/npm/node_modules/read-installed/package.json index 3e703bf9071..b122b54afe4 100644 --- a/deps/npm/node_modules/read-installed/package.json +++ b/deps/npm/node_modules/read-installed/package.json @@ -1,7 +1,7 @@ { "name": "read-installed", "description": "Read all the installed packages in a folder, and return a tree structure with all the data.", - "version": "0.0.1", + "version": "0.0.2", "repository": { "type": "git", "url": "git://github.com/isaacs/read-installed" @@ -27,6 +27,6 @@ "url": "http://blog.izs.me/" }, "readme": "# read-installed\n\nRead all the installed packages in a folder, and return a tree\nstructure with all the data.\n\nnpm uses this.\n\n## Usage\n\n```javascript\nvar readInstalled = require(\"read-installed\")\n// depth is optional, defaults to Infinity\nreadInstalled(folder, depth, function (er, data) {\n ...\n})\n```\n", - "_id": "read-installed@0.0.1", - "_from": "read-installed" + "_id": "read-installed@0.0.2", + "_from": "read-installed@0" } diff --git a/deps/npm/node_modules/read-installed/read-installed.js b/deps/npm/node_modules/read-installed/read-installed.js index be394225b87..cb77dba33df 100644 --- a/deps/npm/node_modules/read-installed/read-installed.js +++ b/deps/npm/node_modules/read-installed/read-installed.js @@ -286,6 +286,8 @@ function findUnmet (obj) { +found.path+",\nwhich is version "+found.version ) found.invalid = true + } else { + found.extraneous = false } deps[d] = found } diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json index 42d06112729..8e56b11e32e 100644 --- a/deps/npm/node_modules/read-package-json/package.json +++ b/deps/npm/node_modules/read-package-json/package.json @@ -1,6 +1,6 @@ { "name": "read-package-json", - "version": "0.1.3", + "version": "0.1.4", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -31,6 +31,6 @@ "graceful-fs": "~1.1.8" }, "readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\nreadJson('/path/to/package.json', function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n}\n```\n\n## readJson(file, cb)\n\n* `file` {String} The path to the package.json file\n* `cb` {Function}\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n", - "_id": "read-package-json@0.1.3", - "_from": "read-package-json@~0.1.1" + "_id": "read-package-json@0.1.4", + "_from": "read-package-json@~0.1.3" } diff --git a/deps/npm/node_modules/read-package-json/read-json.js b/deps/npm/node_modules/read-package-json/read-json.js index 837c6b7c4a8..17e8b4320d6 100644 --- a/deps/npm/node_modules/read-package-json/read-json.js +++ b/deps/npm/node_modules/read-package-json/read-json.js @@ -254,7 +254,7 @@ function mans (file, data, cb) { function mans_ (file, data, mans, cb) { var m = data.directories && data.directories.man data.man = mans.map(function (mf) { - return path.resolve(m, mf) + return path.resolve(path.dirname(file), m, mf) }) return cb(null, data) } diff --git a/deps/npm/node_modules/read/README.md b/deps/npm/node_modules/read/README.md index 01aa8e76bd4..2edefdf473e 100644 --- a/deps/npm/node_modules/read/README.md +++ b/deps/npm/node_modules/read/README.md @@ -33,6 +33,21 @@ Every option is optional. If silent is true, and the input is a TTY, then read will set raw mode, and read character by character. +## COMPATIBILITY + +This module works sort of with node 0.6. It does not work with node +versions less than 0.6. It is best on node 0.8. + +On node version 0.6, it will remove all listeners on the input +stream's `data` and `keypress` events, because the readline module did +not fully clean up after itself in that version of node, and did not +make it possible to clean up after it in a way that has no potential +for side effects. + +Additionally, some of the readline options (like `terminal`) will not +function in versions of node before 0.8, because they were not +implemented in the builtin readline module. + ## CONTRIBUTING Patches welcome. diff --git a/deps/npm/node_modules/read/lib/read.js b/deps/npm/node_modules/read/lib/read.js index 4b0e303f6ce..4b8a422d9b3 100644 --- a/deps/npm/node_modules/read/lib/read.js +++ b/deps/npm/node_modules/read/lib/read.js @@ -23,7 +23,13 @@ function read (opts, cb) { var def = opts.default || '' var terminal = !!(opts.terminal || output.isTTY) var rlOpts = { input: input, output: output, terminal: terminal } - var rl = readline.createInterface(rlOpts) + + if (process.version.match(/^v0\.6/)) { + var rl = readline.createInterface(rlOpts.input, rlOpts.output) + } else { + var rl = readline.createInterface(rlOpts) + } + var prompt = (opts.prompt || '').trim() + ' ' var silent = opts.silent var editDef = false @@ -69,6 +75,13 @@ function read (opts, cb) { function done () { called = true rl.close() + + if (process.version.match(/^v0\.6/)) { + rl.input.removeAllListeners('data') + rl.input.removeAllListeners('keypress') + rl.input.pause() + } + clearTimeout(timer) output.mute() output.end() diff --git a/deps/npm/node_modules/read/node_modules/mute-stream/mute.js b/deps/npm/node_modules/read/node_modules/mute-stream/mute.js index f0c3550fe10..7746618a129 100644 --- a/deps/npm/node_modules/read/node_modules/mute-stream/mute.js +++ b/deps/npm/node_modules/read/node_modules/mute-stream/mute.js @@ -63,6 +63,21 @@ function setIsTTY (isTTY) { }) } +Object.defineProperty(MuteStream.prototype, 'rows', { + get: function () { + return( this._dest ? this._dest.rows + : this._src ? this._src.rows + : undefined ) + }, enumerable: true, configurable: true }) + +Object.defineProperty(MuteStream.prototype, 'columns', { + get: function () { + return( this._dest ? this._dest.columns + : this._src ? this._src.columns + : undefined ) + }, enumerable: true, configurable: true }) + + MuteStream.prototype.pipe = function (dest) { this._dest = dest return Stream.prototype.pipe.call(this, dest) diff --git a/deps/npm/node_modules/read/node_modules/mute-stream/package.json b/deps/npm/node_modules/read/node_modules/mute-stream/package.json index ff942b853e8..629b5be6722 100644 --- a/deps/npm/node_modules/read/node_modules/mute-stream/package.json +++ b/deps/npm/node_modules/read/node_modules/mute-stream/package.json @@ -1,6 +1,6 @@ { "name": "mute-stream", - "version": "0.0.2", + "version": "0.0.3", "main": "mute.js", "directories": { "test": "test" @@ -28,9 +28,6 @@ "license": "BSD", "description": "Bytes go in, but they don't come out (when muted).", "readme": "# mute-stream\n\nBytes go in, but they don't come out (when muted).\n\nThis is a basic pass-through stream, but when muted, the bytes are\nsilently dropped, rather than being passed through.\n\n## Usage\n\n```javascript\nvar MuteStream = require('mute-stream')\n\nvar ms = new MuteStream(options)\n\nms.pipe(process.stdout)\nms.write('foo') // writes 'foo' to stdout\nms.mute()\nms.write('bar') // does not write 'bar'\nms.unmute()\nms.write('baz') // writes 'baz' to stdout\n\n// can also be used to mute incoming data\nvar ms = new MuteStream\ninput.pipe(ms)\n\nms.on('data', function (c) {\n console.log('data: ' + c)\n})\n\ninput.emit('data', 'foo') // logs 'foo'\nms.mute()\ninput.emit('data', 'bar') // does not log 'bar'\nms.unmute()\ninput.emit('data', 'baz') // logs 'baz'\n```\n\n## Options\n\nAll options are optional.\n\n* `replace` Set to a string to replace each character with the\n specified string when muted. (So you can show `****` instead of the\n password, for example.)\n\n## ms.mute()\n\nSet `muted` to `true`. Turns `.write()` into a no-op.\n\n## ms.unmute()\n\nSet `muted` to `false`\n\n## ms.isTTY\n\nTrue if the pipe destination is a TTY, or if the incoming pipe source is\na TTY.\n\n## Other stream methods...\n\nThe other standard readable and writable stream methods are all\navailable. The MuteStream object acts as a facade to its pipe source\nand destination.\n", - "_id": "mute-stream@0.0.2", - "dist": { - "shasum": "75d4466df24a57e80fec806bda88561cd0560d2d" - }, + "_id": "mute-stream@0.0.3", "_from": "mute-stream@~0.0.2" } diff --git a/deps/npm/node_modules/read/node_modules/mute-stream/test/basic.js b/deps/npm/node_modules/read/node_modules/mute-stream/test/basic.js index 473f8279696..2d1f6aed301 100644 --- a/deps/npm/node_modules/read/node_modules/mute-stream/test/basic.js +++ b/deps/npm/node_modules/read/node_modules/mute-stream/test/basic.js @@ -89,17 +89,29 @@ tap.test('outgoing', function (t) { tap.test('isTTY', function (t) { var str = new PassThrough str.isTTY = true + str.columns=80 + str.rows=24 var ms = new MS t.equal(ms.isTTY, false) + t.equal(ms.columns, undefined) + t.equal(ms.rows, undefined) ms.pipe(str) t.equal(ms.isTTY, true) + t.equal(ms.columns, 80) + t.equal(ms.rows, 24) str.isTTY = false t.equal(ms.isTTY, false) + t.equal(ms.columns, 80) + t.equal(ms.rows, 24) str.isTTY = true t.equal(ms.isTTY, true) + t.equal(ms.columns, 80) + t.equal(ms.rows, 24) ms.isTTY = false t.equal(ms.isTTY, false) + t.equal(ms.columns, 80) + t.equal(ms.rows, 24) ms = new MS t.equal(ms.isTTY, false) diff --git a/deps/npm/node_modules/read/package.json b/deps/npm/node_modules/read/package.json index 79e5b7ce2c1..f76034e867a 100644 --- a/deps/npm/node_modules/read/package.json +++ b/deps/npm/node_modules/read/package.json @@ -1,6 +1,6 @@ { "name": "read", - "version": "1.0.3", + "version": "1.0.4", "main": "lib/read.js", "dependencies": { "mute-stream": "~0.0.2" @@ -25,7 +25,7 @@ "scripts": { "test": "tap test/*.js" }, - "readme": "## read\n\nFor reading user input from stdin.\n\nSimilar to the `readline` builtin's `question()` method, but with a\nfew more features.\n\n## USAGE\n\n```javascript\nvar read = require(\"read\")\nread(options, callback)\n```\n\nThe callback gets called with either the user input, or the default\nspecified, or an error, as `callback(error, result, isDefault)`\nnode style.\n\n## OPTIONS\n\nEvery option is optional.\n\n* `prompt` What to write to stdout before reading input.\n* `silent` Don't echo the output as the user types it.\n* `replace` Replace silenced characters with the supplied character value.\n* `timeout` Number of ms to wait for user input before giving up.\n* `default` The default value if the user enters nothing.\n* `edit` Allow the user to edit the default value.\n* `terminal` Treat the output as a TTY, whether it is or not.\n* `stdin` Readable stream to get input data from. (default `process.stdin`)\n* `stdout` Writeable stream to write prompts to. (default: `process.stdout`)\n\nIf silent is true, and the input is a TTY, then read will set raw\nmode, and read character by character.\n\n## CONTRIBUTING\n\nPatches welcome.\n", - "_id": "read@1.0.3", - "_from": "read@~1" + "readme": "## read\n\nFor reading user input from stdin.\n\nSimilar to the `readline` builtin's `question()` method, but with a\nfew more features.\n\n## USAGE\n\n```javascript\nvar read = require(\"read\")\nread(options, callback)\n```\n\nThe callback gets called with either the user input, or the default\nspecified, or an error, as `callback(error, result, isDefault)`\nnode style.\n\n## OPTIONS\n\nEvery option is optional.\n\n* `prompt` What to write to stdout before reading input.\n* `silent` Don't echo the output as the user types it.\n* `replace` Replace silenced characters with the supplied character value.\n* `timeout` Number of ms to wait for user input before giving up.\n* `default` The default value if the user enters nothing.\n* `edit` Allow the user to edit the default value.\n* `terminal` Treat the output as a TTY, whether it is or not.\n* `stdin` Readable stream to get input data from. (default `process.stdin`)\n* `stdout` Writeable stream to write prompts to. (default: `process.stdout`)\n\nIf silent is true, and the input is a TTY, then read will set raw\nmode, and read character by character.\n\n## COMPATIBILITY\n\nThis module works sort of with node 0.6. It does not work with node\nversions less than 0.6. It is best on node 0.8.\n\nOn node version 0.6, it will remove all listeners on the input\nstream's `data` and `keypress` events, because the readline module did\nnot fully clean up after itself in that version of node, and did not\nmake it possible to clean up after it in a way that has no potential\nfor side effects.\n\nAdditionally, some of the readline options (like `terminal`) will not\nfunction in versions of node before 0.8, because they were not\nimplemented in the builtin readline module.\n\n## CONTRIBUTING\n\nPatches welcome.\n", + "_id": "read@1.0.4", + "_from": "read@~1.0.3" } diff --git a/deps/npm/node_modules/read/test/basic.js b/deps/npm/node_modules/read/test/basic.js index c90c41036c7..f5324b4aa68 100644 --- a/deps/npm/node_modules/read/test/basic.js +++ b/deps/npm/node_modules/read/test/basic.js @@ -5,6 +5,11 @@ if (process.argv[2] === 'child') { return child() } +var CLOSE = 'close' +if (process.version.match(/^v0\.6/)) { + CLOSE = 'exit' +} + var spawn = require('child_process').spawn tap.test('basic', function (t) { @@ -31,7 +36,7 @@ tap.test('basic', function (t) { console.error('result %j', c.toString()) }) - child.on('close', function () { + child.on(CLOSE, function () { result = JSON.parse(result) t.same(result, {"user":"a user","pass":"a password","verify":"a password","passMatch":true}) t.equal(output, 'Username: (test-user) Password: (<default hidden>) Password again: (<default hidden>) ') diff --git a/deps/npm/node_modules/read/test/defaults.js b/deps/npm/node_modules/read/test/defaults.js index 6f7644d2a97..f3335ac8237 100644 --- a/deps/npm/node_modules/read/test/defaults.js +++ b/deps/npm/node_modules/read/test/defaults.js @@ -5,6 +5,11 @@ if (process.argv[2] === 'child') { return child() } +var CLOSE = 'close' +if (process.version.match(/^v0\.6/)) { + CLOSE = 'exit' +} + var spawn = require('child_process').spawn tap.test('defaults', function (t) { @@ -31,7 +36,7 @@ tap.test('defaults', function (t) { console.error('result %j', c.toString()) }) - child.on('close', function () { + child.on(CLOSE, function () { result = JSON.parse(result) t.same(result, {"user":"test-user","pass":"test-pass","verify":"test-pass","passMatch":true}) t.equal(output, 'Username: (test-user) Password: (<default hidden>) Password again: (<default hidden>) ') diff --git a/deps/npm/node_modules/read/test/many.js b/deps/npm/node_modules/read/test/many.js index 0d32dae8af9..2aaa586e450 100644 --- a/deps/npm/node_modules/read/test/many.js +++ b/deps/npm/node_modules/read/test/many.js @@ -1,6 +1,11 @@ var tap = require('tap') var read = require('../lib/read.js') +var CLOSE = 'close' +if (process.version.match(/^v0\.6/)) { + CLOSE = 'exit' +} + if (process.argv[2] === 'child') { return child() } @@ -68,7 +73,7 @@ tap.test('many reads', function (t) { output += c console.error('' + c) }) - child.on('close', function (c) { + child.on(CLOSE, function (c) { t.equal(output, expect) t.equal(n, 19) t.end() diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md index 8713a807ce1..1a55ac50b81 100644 --- a/deps/npm/node_modules/request/README.md +++ b/deps/npm/node_modules/request/README.md @@ -151,7 +151,7 @@ The first argument can be either a url or an options object. The only required o * `headers` - http headers, defaults to {} * `body` - entity body for POST and PUT requests. Must be buffer or string. * `form` - sets `body` but to querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. -* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. +* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as json. * `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below. * `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true. * `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false. diff --git a/deps/npm/node_modules/request/aws2.js b/deps/npm/node_modules/request/aws2.js deleted file mode 100644 index eb683f7659c..00000000000 --- a/deps/npm/node_modules/request/aws2.js +++ /dev/null @@ -1,128 +0,0 @@ -var crypto = require('crypto') - -// The Authentication Header -// -// The Amazon S3 REST API uses the standard HTTPAuthorization header to pass authentication information. (The name of the standard header is unfortunate because it carries authentication information, not authorization).Under the Amazon S3 authentication scheme, the Authorization header has the following form. -// -// Authorization: AWS AWSAccessKeyId:Signature -// -// Developers are issued an AWS Access Key ID and AWS SecretAccess Key when they register. For request authentication, theAWSAccessKeyId element identifies the secret key that was used to compute the signature, and (indirectly) the developer making the request. -// -// The Signature element is the RFC 2104HMAC-SHA1 of selected elements from the request, and so theSignature part of the Authorization header will vary from request to request. If the request signature calculated by the system matches theSignature included with the request, then the requester will have demonstrated possession to the AWSSecret Access Key. The request will then be processed under the identity, and with the authority, of the developer to whom the key was issued. -// -// Following is pseudo-grammar that illustrates the construction of the Authorization request header (\nmeans the Unicode code point U+000A commonly called newline). - -function authorizationHeader (accessKey) { - // Authorization = "AWS" + " " + AWSAccessKeyId + ":" + Signature; - - var authorization = 'AWS' + " " + accessKey + ":" + signature() - - return authorization -} - -// - -function signature (secret, verb, md5, contenttype, date, amzheaders, bucket, path) { - // Signature = Base64( HMAC-SHA1( UTF-8-Encoding-Of( YourSecretAccessKeyID, StringToSign ) ) ); - - function encodeSignature (stringToSign) { - return crypto.createHash('sha1').update(stringToSign).digest('base64') - } - - // - // StringToSign = HTTP-Verb + "\n" + - // Content-MD5 + "\n" + - // Content-Type + "\n" + - // Date + "\n" + - // CanonicalizedAmzHeaders + - // CanonicalizedResource; - - function compileStringToSign () { - var s = - verb + '\n' - (md5 || '') + '\n' - (contenttype || '') + '\n' - date.toUTCString() + '\n' - canonicalizeAmzHeaders(amzheaders) + - canonicalizeResource() - return s - } - - // - // CanonicalizedResource = [ "/" + Bucket ] + - // <HTTP-Request-URI, from the protocol name up to the query string> + - // [ sub-resource, if present. For example "?acl", "?location", "?logging", or "?torrent"]; - - function canonicalizeResource () { - return '/' + bucket + path - } - - // - // CanonicalizedAmzHeaders = <described below> - // - // HMAC-SHA1 is an algorithm defined by RFC 2104 (go to RFC 2104 - Keyed-Hashing for Message Authentication ). The algorithm takes as input two byte-strings: a key and a message. For Amazon S3 Request authentication, use your AWS Secret Access Key (YourSecretAccessKeyID) as the key, and the UTF-8 encoding of the StringToSign as the message. The output of HMAC-SHA1 is also a byte string, called the digest. The Signature request parameter is constructed by Base64 encoding this digest. - // Request Canonicalization for Signing - // - // Recall that when the system receives an authenticated request, it compares the computed request signature with the signature provided in the request in StringToSign. For that reason, you must compute the signature using the same method used by Amazon S3. We call the process of putting a request in an agreed-upon form for signing "canonicalization". - -} - - - -// Constructing the CanonicalizedResource Element -// -// CanonicalizedResource represents the Amazon S3 resource targeted by the request. Construct it for a REST request as follows: -// -// Launch Process -// -// 1 -// -// -// Start with the empty string (""). -// -// 2 -// -// -// If the request specifies a bucket using the HTTP Host header (virtual hosted-style), append the bucket name preceded by a "/" (e.g., "/bucketname"). For path-style requests and requests that don't address a bucket, do nothing. For more information on virtual hosted-style requests, see Virtual Hosting of Buckets. -// -// 3 -// -// -// Append the path part of the un-decoded HTTP Request-URI, up-to but not including the query string. -// -// 4 -// -// -// If the request addresses a sub-resource, like ?versioning, ?location, ?acl, ?torrent, ?lifecycle, or ?versionid append the sub-resource, its value if it has one, and the question mark. Note that in case of multiple sub-resources, sub-resources must be lexicographically sorted by sub-resource name and separated by '&'. e.g. ?acl&versionId=value. -// -// The list of sub-resources that must be included when constructing the CanonicalizedResource Element are: acl, lifecycle, location, logging, notification, partNumber, policy, requestPayment, torrent, uploadId, uploads, versionId, versioning, versions and website. -// -// If the request specifies query string parameters overriding the response header values (see Get Object), append the query string parameters, and its values. When signing you do not encode these values. However, when making the request, you must encode these parameter values. The query string parameters in a GET request include response-content-type, response-content-language, response-expires, response-cache-control, response-content-disposition, response-content-encoding. -// -// The delete query string parameter must be including when creating the CanonicalizedResource for a Multi-Object Delete request. -// -// Elements of the CanonicalizedResource that come from the HTTP Request-URI should be signed literally as they appear in the HTTP request, including URL-Encoding meta characters. -// -// The CanonicalizedResource might be different than the HTTP Request-URI. In particular, if your request uses the HTTP Host header to specify a bucket, the bucket does appear in the HTTP Request-URI. However, the CanonicalizedResource continues to include the bucket. Query string parameters might also appear in the Request-URI but are not included in CanonicalizedResource. For more information, see Virtual Hosting of Buckets. -// Constructing the CanonicalizedAmzHeaders Element -// -// To construct the CanonicalizedAmzHeaders part of StringToSign, select all HTTP request headers that start with 'x-amz-' (using a case-insensitive comparison) and use the following process. -// -// CanonicalizedAmzHeaders Process -// 1 Convert each HTTP header name to lower-case. For example, 'X-Amz-Date' becomes 'x-amz-date'. -// 2 Sort the collection of headers lexicographically by header name. -// 3 Combine header fields with the same name into one "header-name:comma-separated-value-list" pair as prescribed by RFC 2616, section 4.2, without any white-space between values. For example, the two metadata headers 'x-amz-meta-username: fred' and 'x-amz-meta-username: barney' would be combined into the single header 'x-amz-meta-username: fred,barney'. -// 4 "Unfold" long headers that span multiple lines (as allowed by RFC 2616, section 4.2) by replacing the folding white-space (including new-line) by a single space. -// 5 Trim any white-space around the colon in the header. For example, the header 'x-amz-meta-username: fred,barney' would become 'x-amz-meta-username:fred,barney' -// 6 Finally, append a new-line (U+000A) to each canonicalized header in the resulting list. Construct the CanonicalizedResource element by concatenating all headers in this list into a single string. -// -// Positional versus Named HTTP Header StringToSign Elements -// -// The first few header elements of StringToSign (Content-Type, Date, and Content-MD5) are positional in nature. StringToSign does not include the names of these headers, only their values from the request. In contrast, the 'x-amz-' elements are named; Both the header names and the header values appear in StringToSign. -// -// If a positional header called for in the definition of StringToSign is not present in your request, (Content-Type or Content-MD5, for example, are optional for PUT requests, and meaningless for GET requests), substitute the empty string ("") in for that position. -// Time Stamp Requirement -// -// A valid time stamp (using either the HTTP Date header or an x-amz-date alternative) is mandatory for authenticated requests. Furthermore, the client time-stamp included with an authenticated request must be within 15 minutes of the Amazon S3 system time when the request is received. If not, the request will fail with the RequestTimeTooSkewed error status code. The intention of these restrictions is to limit the possibility that intercepted requests could be replayed by an adversary. For stronger protection against eavesdropping, use the HTTPS transport for authenticated requests. -// -// Some HTTP client libraries do not expose the ability to set the Date header for a request. If you have trouble including the value of the 'Date' header in the canonicalized headers, you can set the time-stamp for the request using an 'x-amz-date' header instead. The value of the x-amz-date header must be in one of the RFC 2616 formats (http://www.ietf.org/rfc/rfc2616.txt). When an x-amz-date header is present in a request, the system will ignore any Date header when computing the request signature. Therefore, if you include the x-amz-date header, use the empty string for the Date when constructing the StringToSign. See the next section for an example. diff --git a/deps/npm/node_modules/request/main.js b/deps/npm/node_modules/request/main.js index 2407a934925..dcdd5caab12 100644 --- a/deps/npm/node_modules/request/main.js +++ b/deps/npm/node_modules/request/main.js @@ -107,7 +107,7 @@ Request.prototype.init = function (options) { var self = this if (!options) options = {} - + if (process.env.NODE_DEBUG && /request/.test(process.env.NODE_DEBUG)) console.error('REQUEST', options) if (!self.pool && self.pool !== false) self.pool = globalPool self.dests = [] self.__isRequestRequest = true @@ -140,12 +140,11 @@ Request.prototype.init = function (options) { // do the HTTP CONNECT dance using koichik/node-tunnel if (http.globalAgent && self.uri.protocol === "https:") { - self.tunnel = true var tunnelFn = self.proxy.protocol === "http:" ? tunnel.httpsOverHttp : tunnel.httpsOverHttps var tunnelOptions = { proxy: { host: self.proxy.hostname - , port: +self.proxy.port + , port: +self.proxy.port , proxyAuth: self.proxy.auth } , ca: this.ca } @@ -223,6 +222,18 @@ Request.prototype.init = function (options) { self.emit('error', error) } + self._parserErrorHandler = function (error) { + if (this.res) { + if (this.res.request) { + this.res.request.emit('error', error) + } else { + this.res.emit('error', error) + } + } else { + this._httpMessage.emit('error', error) + } + } + if (options.form) { self.form(options.form) } @@ -319,7 +330,7 @@ Request.prototype.init = function (options) { } self.once('pipe', function (src) { - if (self.ntick) throw new Error("You cannot pipe to this stream after the first nextTick() after creation of the request stream.") + if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") self.src = src if (isReadStream(src)) { if (!self.headers['content-type'] && !self.headers['Content-Type']) @@ -367,6 +378,70 @@ Request.prototype.init = function (options) { }) } +// Must call this when following a redirect from https to http or vice versa +// Attempts to keep everything as identical as possible, but update the +// httpModule, Tunneling agent, and/or Forever Agent in use. +Request.prototype._updateProtocol = function () { + var self = this + var protocol = self.uri.protocol + + if (protocol === 'https:') { + // previously was doing http, now doing https + // if it's https, then we might need to tunnel now. + if (self.proxy) { + self.tunnel = true + var tunnelFn = self.proxy.protocol === 'http:' + ? tunnel.httpsOverHttp : tunnel.httpsOverHttps + var tunnelOptions = { proxy: { host: self.proxy.hostname + , post: +self.proxy.port + , proxyAuth: self.proxy.auth } + , ca: self.ca } + self.agent = tunnelFn(tunnelOptions) + return + } + + self.httpModule = https + switch (self.agentClass) { + case ForeverAgent: + self.agentClass = ForeverAgent.SSL + break + case http.Agent: + self.agentClass = https.Agent + break + default: + // nothing we can do. Just hope for the best. + return + } + + // if there's an agent, we need to get a new one. + if (self.agent) self.agent = self.getAgent() + + } else { + if (log) log('previously https, now http') + // previously was doing https, now doing http + // stop any tunneling. + if (self.tunnel) self.tunnel = false + self.httpModule = http + switch (self.agentClass) { + case ForeverAgent.SSL: + self.agentClass = ForeverAgent + break + case https.Agent: + self.agentClass = http.Agent + break + default: + // nothing we can do. just hope for the best + return + } + + // if there's an agent, then get a new one. + if (self.agent) { + self.agent = null + self.agent = self.getAgent() + } + } +} + Request.prototype.getAgent = function () { var Agent = this.agentClass var options = {} @@ -392,7 +467,11 @@ Request.prototype.getAgent = function () { poolKey += this.host + ':' + this.port } - if (options.ca) { + // ca option is only relevant if proxy or destination are https + var proxy = this.proxy + if (typeof proxy === 'string') proxy = url.parse(proxy) + var caRelevant = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' + if (options.ca && caRelevant) { if (poolKey) poolKey += ':' poolKey += options.ca } @@ -402,6 +481,9 @@ Request.prototype.getAgent = function () { return this.httpModule.globalAgent } + // we're using a stored agent. Make sure it's protocol-specific + poolKey = this.uri.protocol + poolKey + // already generated an agent for this setting if (this.pool[poolKey]) return this.pool[poolKey] @@ -410,25 +492,28 @@ Request.prototype.getAgent = function () { Request.prototype.start = function () { var self = this - + if (self._aborted) return - + self._started = true self.method = self.method || 'GET' self.href = self.uri.href if (log) log('%method %href', self) - + if (self.src && self.src.stat && self.src.stat.size) { self.headers['content-length'] = self.src.stat.size } if (self._aws) { self.aws(self._aws, true) } - + self.req = self.httpModule.request(self, function (response) { + if (response.connection.listeners('error').indexOf(self._parserErrorHandler) === -1) { + response.connection.once('error', self._parserErrorHandler) + } if (self._aborted) return if (self._paused) response.pause() - + self.response = response response.request = self response.toJSON = toJSON @@ -446,7 +531,7 @@ Request.prototype.start = function () { clearTimeout(self.timeoutTimer) self.timeoutTimer = null } - + var addCookie = function (cookie) { if (self._jar) self._jar.add(new Cookie(cookie)) else cookieJar.add(new Cookie(cookie)) @@ -470,7 +555,15 @@ Request.prototype.start = function () { if (!isUrl.test(response.headers.location)) { response.headers.location = url.resolve(self.uri.href, response.headers.location) } - self.uri = response.headers.location + + var uriPrev = self.uri + self.uri = url.parse(response.headers.location) + + // handle the case where we change protocol from https to http or vice versa + if (self.uri.protocol !== uriPrev.protocol) { + self._updateProtocol() + } + self.redirects.push( { statusCode : response.statusCode , redirectUri: response.headers.location @@ -540,7 +633,7 @@ Request.prototype.start = function () { if (self.encoding === null) { response.body = body } else { - response.body = body.toString() + response.body = body.toString(self.encoding) } } else if (buffer.length) { response.body = buffer.join('') @@ -584,7 +677,9 @@ Request.prototype.start = function () { self.req.on('drain', function() { self.emit('drain') }) - + self.on('end', function() { + self.req.connection.removeListener('error', self._parserErrorHandler) + }) self.emit('request', self.req) } @@ -659,10 +754,12 @@ Request.prototype.multipart = function (multipart) { self.headers['content-type'] = self.headers['content-type'].split(';')[0] + '; boundary=' + self.boundary; } - console.log('boundary >> ' + self.boundary) - if (!multipart.forEach) throw new Error('Argument error, options.multipart.') + if (self.preambleCRLF) { + self.body.push(new Buffer('\r\n')) + } + multipart.forEach(function (part) { var body = part.body if(body == null) throw Error('Body attribute missing in multipart.') @@ -747,6 +844,7 @@ Request.prototype.oauth = function (_oauth) { // skip } else { delete oa['oauth_'+i] + delete oa[i] } } this.headers.Authorization = @@ -861,16 +959,25 @@ function request (uri, options, callback) { module.exports = request -request.defaults = function (options) { +request.initParams = initParams; + +request.defaults = function (options, requester) { var def = function (method) { var d = function (uri, opts, callback) { var params = initParams(uri, opts, callback); for (var i in options) { if (params.options[i] === undefined) params.options[i] = options[i] } - return method(params.options, params.callback) + if(typeof requester === 'function') { + if(method === request) { + method = requester; + } else { + params.options._requester = requester; + } + } + return method(params.options, params.callback); } - return d + return d; } var de = def(request) de.get = def(request.get) @@ -920,6 +1027,9 @@ request.head = function (uri, options, callback) { request.del = function (uri, options, callback) { var params = initParams(uri, options, callback); params.options.method = 'DELETE' + if(typeof params.options._requester === 'function') { + request = params.options._requester; + } return request(params.uri || null, params.options, params.callback) } request.jar = function () { diff --git a/deps/npm/node_modules/request/package.json b/deps/npm/node_modules/request/package.json index 6796f5dff69..05d31444949 100644 --- a/deps/npm/node_modules/request/package.json +++ b/deps/npm/node_modules/request/package.json @@ -26,10 +26,10 @@ "scripts": { "test": "node tests/run.js" }, - "readme": "# Request -- Simplified HTTP request method\n\n## Install\n\n<pre>\n npm install request\n</pre>\n\nOr from source:\n\n<pre>\n git clone git://github.com/mikeal/request.git \n cd request\n npm link\n</pre>\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types, in this case `application/json`, and use the proper content-type in the PUT request if one is not already provided in the headers.\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also pipe to itself. When doing so the content-type and content-length will be preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let's get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n } \n }\n})\n```\n\nYou can also pipe() from a http.ServerRequest instance and to a http.ServerResponse instance. The HTTP method and headers will be sent as well as the entity-body data. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since pipe() returns the destination stream in node 0.5.x you can do one line proxying :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Assume by some stretch of magic you aquired the verifier\n var access_token = qs.parse(body)\n , oauth = \n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: VERIFIER\n , token_secret: access_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth = \n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1/users/show.json?'\n , params = \n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n\n\n### request(options, callback)\n\nThe first argument can be either a url or an options object. The only required option is uri, all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from url.parse()\n* `qs` - object containing querystring values to be appended to the uri\n* `method` - http method, defaults to GET\n* `headers` - http headers, defaults to {}\n* `body` - entity body for POST and PUT requests. Must be buffer or string.\n* `form` - sets `body` but to querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true.\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false.\n* `maxRedirects` - the maximum number of redirects to follow, defaults to 10.\n* `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.\n* `pool` - A hash object containing the agents for these requests. If omitted this request will use the global pool which is set to node's default maxSockets.\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\t\n* `proxy` - An HTTP proxy to be used. Support proxy Auth with Basic Auth the same way it's supported with the `url` parameter by embedding the auth info in the uri.\n* `oauth` - Options for OAuth HMAC-SHA1 signing, see documentation above.\n* `strictSSL` - Set to `true` to require that SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that ca as an option.\n* `jar` - Set to `false` if you don't want cookies to be remembered for future use or define your custom cookie jar (see examples section)\n\n\nThe callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second in an http.ClientResponse object. The third is the response body String or Buffer.\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options) \n \nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as request() but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.post\n\nSame as request() but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as request() but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nAlias to normal request method for uniformity.\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart: \n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ] \n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\nCookies are enabled by default (so they can be used in subsequent requests). To disable cookies set jar to false (either in defaults or in the options sent).\n\n```javascript\nvar request = request.defaults({jar: false})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nIf you to use a custom cookie jar (instead of letting request use its own global cookie jar) you do so by setting the jar default or by specifying it as an option:\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.add(cookie)\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", + "readme": "# Request -- Simplified HTTP request method\n\n## Install\n\n<pre>\n npm install request\n</pre>\n\nOr from source:\n\n<pre>\n git clone git://github.com/mikeal/request.git \n cd request\n npm link\n</pre>\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```javascript\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Print the google web page.\n }\n})\n```\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```javascript\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types, in this case `application/json`, and use the proper content-type in the PUT request if one is not already provided in the headers.\n\n```javascript\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also pipe to itself. When doing so the content-type and content-length will be preserved in the PUT headers.\n\n```javascript\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nNow let's get fancy.\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n } \n }\n})\n```\n\nYou can also pipe() from a http.ServerRequest instance and to a http.ServerResponse instance. The HTTP method and headers will be sent as well as the entity-body data. Which means that, if you don't really care about security, you can do:\n\n```javascript\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since pipe() returns the destination stream in node 0.5.x you can do one line proxying :)\n\n```javascript\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```javascript\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## OAuth Signing\n\n```javascript\n// Twitter OAuth\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Assume by some stretch of magic you aquired the verifier\n var access_token = qs.parse(body)\n , oauth = \n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: access_token.oauth_token\n , verifier: VERIFIER\n , token_secret: access_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n var perm_token = qs.parse(body)\n , oauth = \n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_token.oauth_token\n , token_secret: perm_token.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1/users/show.json?'\n , params = \n { screen_name: perm_token.screen_name\n , user_id: perm_token.user_id\n }\n ;\n url += qs.stringify(params)\n request.get({url:url, oauth:oauth, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\n\n\n### request(options, callback)\n\nThe first argument can be either a url or an options object. The only required option is uri, all others are optional.\n\n* `uri` || `url` - fully qualified uri or a parsed url object from url.parse()\n* `qs` - object containing querystring values to be appended to the uri\n* `method` - http method, defaults to GET\n* `headers` - http headers, defaults to {}\n* `body` - entity body for POST and PUT requests. Must be buffer or string.\n* `form` - sets `body` but to querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header.\n* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as json.\n* `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below.\n* `followRedirect` - follow HTTP 3xx responses as redirects. defaults to true.\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects. defaults to false.\n* `maxRedirects` - the maximum number of redirects to follow, defaults to 10.\n* `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.\n* `pool` - A hash object containing the agents for these requests. If omitted this request will use the global pool which is set to node's default maxSockets.\n* `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool.\n* `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request\t\n* `proxy` - An HTTP proxy to be used. Support proxy Auth with Basic Auth the same way it's supported with the `url` parameter by embedding the auth info in the uri.\n* `oauth` - Options for OAuth HMAC-SHA1 signing, see documentation above.\n* `strictSSL` - Set to `true` to require that SSL certificates be valid. Note: to use your own certificate authority, you need to specify an agent that was created with that ca as an option.\n* `jar` - Set to `false` if you don't want cookies to be remembered for future use or define your custom cookie jar (see examples section)\n\n\nThe callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second in an http.ClientResponse object. The third is the response body String or Buffer.\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n### request.defaults(options) \n \nThis method returns a wrapper around the normal request API that defaults to whatever options you pass in to it.\n\n### request.put\n\nSame as request() but defaults to `method: \"PUT\"`.\n\n```javascript\nrequest.put(url)\n```\n\n### request.post\n\nSame as request() but defaults to `method: \"POST\"`.\n\n```javascript\nrequest.post(url)\n```\n\n### request.head\n\nSame as request() but defaults to `method: \"HEAD\"`.\n\n```javascript\nrequest.head(url)\n```\n\n### request.del\n\nSame as request() but defaults to `method: \"DELETE\"`.\n\n```javascript\nrequest.del(url)\n```\n\n### request.get\n\nAlias to normal request method for uniformity.\n\n```javascript\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```javascript\nrequest.cookie('cookie_string_here')\n```\n### request.jar\n\nFunction that creates a new cookie jar.\n\n```javascript\nrequest.jar()\n```\n\n\n## Examples:\n\n```javascript\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart: \n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ] \n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\nCookies are enabled by default (so they can be used in subsequent requests). To disable cookies set jar to false (either in defaults or in the options sent).\n\n```javascript\nvar request = request.defaults({jar: false})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nIf you to use a custom cookie jar (instead of letting request use its own global cookie jar) you do so by setting the jar default or by specifying it as an option:\n\n```javascript\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.add(cookie)\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", "_id": "request@2.9.203", "dist": { - "shasum": "f4c8f35b61b4d6621cb287bb1a1be6002b0bbe4a" + "shasum": "baf55a9b2ccfcca405cfcc0b104edf8b2681eeef" }, - "_from": "request@~2.9" + "_from": "git://github.com/isaacs/request" } diff --git a/deps/npm/node_modules/request/tests/server.js b/deps/npm/node_modules/request/tests/server.js index 921f5120408..5b7cb511f71 100644 --- a/deps/npm/node_modules/request/tests/server.js +++ b/deps/npm/node_modules/request/tests/server.js @@ -51,11 +51,15 @@ exports.createPostValidator = function (text) { var r = ''; req.on('data', function (chunk) {r += chunk}) req.on('end', function () { - if (r !== text) console.log(r, text); - assert.equal(r, text) - resp.writeHead(200, {'content-type':'text/plain'}) - resp.write('OK') - resp.end() + if (req.headers['content-type'] && req.headers['content-type'].indexOf('boundary=') >= 0) { + var boundary = req.headers['content-type'].split('boundary=')[1]; + text = text.replace(/__BOUNDARY__/g, boundary); + } + if (r !== text) console.log(r, text); + assert.equal(r, text) + resp.writeHead(200, {'content-type':'text/plain'}) + resp.write('OK') + resp.end() }) } return l; diff --git a/deps/npm/node_modules/request/tests/test-body.js b/deps/npm/node_modules/request/tests/test-body.js index e3fc75d9707..a624397d7c5 100644 --- a/deps/npm/node_modules/request/tests/test-body.js +++ b/deps/npm/node_modules/request/tests/test-body.js @@ -30,6 +30,11 @@ var tests = , encoding: null , expectBody: new Buffer("TESTING!") } + , testGetEncoding : + { resp : server.createGetResponse(new Buffer('efa3bfcea9e29883', 'hex')) + , encoding: 'hex' + , expectBody: "efa3bfcea9e29883" + } , testGetJSON : { resp : server.createGetResponse('{"test":true}', 'application/json') , json : true @@ -50,7 +55,39 @@ var tests = , method: "PUT" , json: {foo: 'bar'} } - + , testPutMultipart : + { resp: server.createPostValidator( + '--__BOUNDARY__\r\n' + + 'content-type: text/html\r\n' + + '\r\n' + + '<html><body>Oh hi.</body></html>' + + '\r\n--__BOUNDARY__\r\n\r\n' + + 'Oh hi.' + + '\r\n--__BOUNDARY__--' + ) + , method: "PUT" + , multipart: + [ {'content-type': 'text/html', 'body': '<html><body>Oh hi.</body></html>'} + , {'body': 'Oh hi.'} + ] + } + , testPutMultipartPreambleCRLF : + { resp: server.createPostValidator( + '\r\n--__BOUNDARY__\r\n' + + 'content-type: text/html\r\n' + + '\r\n' + + '<html><body>Oh hi.</body></html>' + + '\r\n--__BOUNDARY__\r\n\r\n' + + 'Oh hi.' + + '\r\n--__BOUNDARY__--' + ) + , method: "PUT" + , preambleCRLF: true + , multipart: + [ {'content-type': 'text/html', 'body': '<html><body>Oh hi.</body></html>'} + , {'body': 'Oh hi.'} + ] + } } s.listen(s.port, function () { diff --git a/deps/npm/node_modules/request/tests/test-defaults.js b/deps/npm/node_modules/request/tests/test-defaults.js index 6c8b58fa692..479abf2338e 100644 --- a/deps/npm/node_modules/request/tests/test-defaults.js +++ b/deps/npm/node_modules/request/tests/test-defaults.js @@ -61,8 +61,39 @@ s.listen(s.port, function () { request.defaults({headers:{foo:"bar"}}).head({uri: s.url + '/head'}, function (e, r, b){ if (e) throw e; counter += 1; - console.log(counter.toString() + " tests passed.") - s.close() }); + s.on('/get_custom', function(req, resp) { + assert.equal(req.headers.foo, 'bar'); + assert.equal(req.headers.x, 'y'); + resp.writeHead(200, {'Content-Type': 'text/plain'}); + resp.end(); + }); + + // test custom request handler function + var defaultRequest = request.defaults({ + headers:{foo:"bar"} + , body: 'TESTING!' + }, function(uri, options, callback) { + var params = request.initParams(uri, options, callback); + options = params.options; + options.headers.x = 'y'; + + return request(params.uri, params.options, params.callback); + }); + + var msg = 'defaults test failed. head request should throw earlier'; + assert.throws(function() { + defaultRequest.head(s.url + '/get_custom', function(e, r, b) { + throw new Error(msg); + }); + counter+=1; + }, msg); + + defaultRequest.get(s.url + '/get_custom', function(e, r, b) { + if(e) throw e; + counter += 1; + console.log(counter.toString() + " tests passed."); + s.close(); + }); }) diff --git a/deps/npm/node_modules/request/tests/test-follow-all-303.js b/deps/npm/node_modules/request/tests/test-follow-all-303.js new file mode 100644 index 00000000000..5eec49768bc --- /dev/null +++ b/deps/npm/node_modules/request/tests/test-follow-all-303.js @@ -0,0 +1,30 @@ +var request = require('request'); +var http = require('http'); +var requests = 0; +var assert = require('assert'); + +var server = http.createServer(function (req, res) { + console.error(req.method, req.url); + requests ++; + + if (req.method === 'POST') { + console.error('send 303'); + res.setHeader('location', req.url); + res.statusCode = 303; + res.end('try again, i guess\n'); + } else { + console.error('send 200') + res.end('ok: ' + requests); + } +}); +server.listen(6767); + +request.post({ url: 'http://localhost:6767/foo', + followAllRedirects: true, + form: { foo: 'bar' } }, function (er, req, body) { + if (er) throw er; + assert.equal(body, 'ok: 2'); + assert.equal(requests, 2); + console.error('ok - ' + process.version); + server.close(); +}); diff --git a/deps/npm/node_modules/request/tests/test-follow-all.js b/deps/npm/node_modules/request/tests/test-follow-all.js new file mode 100644 index 00000000000..4dbde6145fe --- /dev/null +++ b/deps/npm/node_modules/request/tests/test-follow-all.js @@ -0,0 +1,35 @@ +var request = require('request'); +var http = require('http'); +var requests = 0; +var assert = require('assert'); + +var server = http.createServer(function (req, res) { + requests ++; + + // redirect everything 3 times, no matter what. + var c = req.headers.cookie; + + if (!c) c = 0; + else c = +c.split('=')[1] || 0; + + if (c > 3) { + res.end('ok: '+requests); + return; + } + + res.setHeader('set-cookie', 'c=' + (c + 1)); + res.setHeader('location', req.url); + res.statusCode = 302; + res.end('try again, i guess\n'); +}); +server.listen(6767); + +request.post({ url: 'http://localhost:6767/foo', + followAllRedirects: true, + form: { foo: 'bar' } }, function (er, req, body) { + if (er) throw er; + assert.equal(body, 'ok: 5'); + assert.equal(requests, 5); + console.error('ok - ' + process.version); + server.close(); +}); diff --git a/deps/npm/node_modules/request/tests/test-https-strict.js b/deps/npm/node_modules/request/tests/test-https-strict.js index f53fc14a8d9..470b68ddd70 100644 --- a/deps/npm/node_modules/request/tests/test-https-strict.js +++ b/deps/npm/node_modules/request/tests/test-https-strict.js @@ -52,13 +52,13 @@ var tests = } , testPutMultipart : { resp: server.createPostValidator( - '--frontier\r\n' + + '--__BOUNDARY__\r\n' + 'content-type: text/html\r\n' + '\r\n' + '<html><body>Oh hi.</body></html>' + - '\r\n--frontier\r\n\r\n' + + '\r\n--__BOUNDARY__\r\n\r\n' + 'Oh hi.' + - '\r\n--frontier--' + '\r\n--__BOUNDARY__--' ) , method: "PUT" , multipart: diff --git a/deps/npm/node_modules/request/tests/test-https.js b/deps/npm/node_modules/request/tests/test-https.js index df7330b39d8..58e7db93f7c 100644 --- a/deps/npm/node_modules/request/tests/test-https.js +++ b/deps/npm/node_modules/request/tests/test-https.js @@ -44,13 +44,13 @@ var tests = } , testPutMultipart : { resp: server.createPostValidator( - '--frontier\r\n' + + '--__BOUNDARY__\r\n' + 'content-type: text/html\r\n' + '\r\n' + '<html><body>Oh hi.</body></html>' + - '\r\n--frontier\r\n\r\n' + + '\r\n--__BOUNDARY__\r\n\r\n' + 'Oh hi.' + - '\r\n--frontier--' + '\r\n--__BOUNDARY__--' ) , method: "PUT" , multipart: diff --git a/deps/npm/node_modules/request/tests/test-params.js b/deps/npm/node_modules/request/tests/test-params.js index 8354f6d8d21..5ddb311625b 100644 --- a/deps/npm/node_modules/request/tests/test-params.js +++ b/deps/npm/node_modules/request/tests/test-params.js @@ -50,13 +50,13 @@ var tests = } , testPutMultipart : { resp: server.createPostValidator( - '--frontier\r\n' + + '--__BOUNDARY__\r\n' + 'content-type: text/html\r\n' + '\r\n' + '<html><body>Oh hi.</body></html>' + - '\r\n--frontier\r\n\r\n' + + '\r\n--__BOUNDARY__\r\n\r\n' + 'Oh hi.' + - '\r\n--frontier--' + '\r\n--__BOUNDARY__--' ) , method: "PUT" , multipart: diff --git a/deps/npm/node_modules/request/tests/test-protocol-changing-redirect.js b/deps/npm/node_modules/request/tests/test-protocol-changing-redirect.js new file mode 100644 index 00000000000..f74e196805c --- /dev/null +++ b/deps/npm/node_modules/request/tests/test-protocol-changing-redirect.js @@ -0,0 +1,60 @@ +var server = require('./server') + , assert = require('assert') + , request = require('../main.js') + + +var s = server.createServer() +var ss = server.createSSLServer() +var sUrl = 'http://localhost:' + s.port +var ssUrl = 'https://localhost:' + ss.port + +s.listen(s.port, bouncy(s, ssUrl)) +ss.listen(ss.port, bouncy(ss, sUrl)) + +var hits = {} +var expect = {} +var pending = 0 +function bouncy (s, server) { return function () { + + var redirs = { a: 'b' + , b: 'c' + , c: 'd' + , d: 'e' + , e: 'f' + , f: 'g' + , g: 'h' + , h: 'end' } + + var perm = true + Object.keys(redirs).forEach(function (p) { + var t = redirs[p] + + // switch type each time + var type = perm ? 301 : 302 + perm = !perm + s.on('/' + p, function (req, res) { + res.writeHead(type, { location: server + '/' + t }) + res.end() + }) + }) + + s.on('/end', function (req, res) { + var h = req.headers['x-test-key'] + hits[h] = true + pending -- + if (pending === 0) done() + }) +}} + +for (var i = 0; i < 5; i ++) { + pending ++ + var val = 'test_' + i + expect[val] = true + request({ url: (i % 2 ? sUrl : ssUrl) + '/a' + , headers: { 'x-test-key': val } }) +} + +function done () { + assert.deepEqual(hits, expect) + process.exit(0) +} diff --git a/deps/npm/node_modules/request/tests/test-s3.js b/deps/npm/node_modules/request/tests/test-s3.js deleted file mode 100644 index 5f59c4ad0a4..00000000000 --- a/deps/npm/node_modules/request/tests/test-s3.js +++ /dev/null @@ -1,13 +0,0 @@ -var request = require('../main') - -var r = request.get('https://log.curlybracecast.com.s3.amazonaws.com/', - { aws: - { key: 'AKIAI6KIQRRVMGK3WK5Q' - , secret: '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' - , bucket: 'log.curlybracecast.com' - } - }, function (e, resp, body) { - console.log(r.headers) - console.log(body) - } -)
\ No newline at end of file diff --git a/deps/npm/node_modules/request/tests/test-tunnel.js b/deps/npm/node_modules/request/tests/test-tunnel.js index 58131b9bbaa..51e2126f854 100644 --- a/deps/npm/node_modules/request/tests/test-tunnel.js +++ b/deps/npm/node_modules/request/tests/test-tunnel.js @@ -32,9 +32,10 @@ squid.stdout.on('data', function (c) { }) squid.on('exit', function (c) { - console.error('exit '+c) + console.error('squid: exit '+c) if (c && !ready) { console.error('squid must be installed to run this test.') + console.error('skipping this test. please install squid and run again if you need to test tunneling.') c = null hadError = null process.exit(0) @@ -49,8 +50,9 @@ squid.on('exit', function (c) { setTimeout(function F () { if (!ready) return setTimeout(F, 100) - request({ uri: 'https://registry.npmjs.org/request/' + request({ uri: 'https://registry.npmjs.org/' , proxy: 'http://localhost:3128' + , strictSSL: true , ca: ca , json: true }, function (er, body) { hadError = er diff --git a/deps/npm/node_modules/request/tunnel.js b/deps/npm/node_modules/request/tunnel.js index 453786c5e7b..469c130e898 100644 --- a/deps/npm/node_modules/request/tunnel.js +++ b/deps/npm/node_modules/request/tunnel.js @@ -188,6 +188,7 @@ function createSecureSocket(options, cb) { TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { // 0 is dummy port for v0.6 var secureSocket = tls.connect(0, mergeOptions({}, self.options, { + servername: options.host, socket: socket })); cb(secureSocket); diff --git a/deps/npm/package.json b/deps/npm/package.json index d0b4d7be7c0..227a9c89bd0 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "1.1.49", + "version": "1.1.59", "name": "npm", "publishConfig": { "proprietary-attribs": false @@ -41,7 +41,6 @@ "graceful-fs": "~1.1.1", "minimatch": "~0.2.6", "nopt": "~2.0", - "node-uuid": "~1.3", "rimraf": "2", "request": "~2.9", "which": "1", @@ -50,7 +49,7 @@ "block-stream": "*", "inherits": "1", "mkdirp": "~0.3.3", - "read": "~1.0.3", + "read": "~1.0.4", "lru-cache": "~2.0.0", "node-gyp": "~0.6.4", "fstream-npm": "0.1", @@ -59,7 +58,7 @@ "chownr": "0", "npmlog": "0", "ansi": "~0.1.2", - "npm-registry-client": "~0.1.4", + "npm-registry-client": "~0.2.6", "read-package-json": "~0.1.3", "read-installed": "0", "glob": "~3.1.12", @@ -69,7 +68,7 @@ "retry": "~0.6.0", "couch-login": "~0.1.9", "once": "~1.1.1", - "npmconf": "~0.0.6" + "npmconf": "0" }, "bundleDependencies": [ "semver", @@ -79,7 +78,6 @@ "graceful-fs", "minimatch", "nopt", - "node-uuid", "rimraf", "request", "which", @@ -114,7 +112,7 @@ "tap": "~0.2.5" }, "engines": { - "node": ">=0.8", + "node": ">=0.6", "npm": "1" }, "scripts": { diff --git a/deps/npm/test/tap/publish-config.js b/deps/npm/test/tap/publish-config.js new file mode 100644 index 00000000000..ac8c94a0d0f --- /dev/null +++ b/deps/npm/test/tap/publish-config.js @@ -0,0 +1,41 @@ +var test = require('tap').test +var fs = require('fs') +var pkg = process.env.npm_config_tmp || '/tmp' +pkg += '/npm-test-publish-config' + +require('mkdirp').sync(pkg) + +fs.writeFileSync(pkg + '/package.json', JSON.stringify({ + name: 'npm-test-publish-config', + version: '1.2.3', + publishConfig: { registry: 'http://localhost:13370' } +}), 'utf8') + +var spawn = require('child_process').spawn +var npm = require.resolve('../../bin/npm-cli.js') +var node = process.execPath + +console.error('pkg=%j', pkg) + +test(function (t) { + var child + require('http').createServer(function (req, res) { + t.pass('got request on the fakey fake registry') + t.end() + this.close() + res.statusCode = 500 + res.end('{"error":"sshhh. naptime nao. \\^O^/ <(YAWWWWN!)"}') + child.kill() + }).listen(13370, function () { + t.pass('server is listening') + + // don't much care about listening to the child's results + // just wanna make sure it hits the server we just set up. + // + // there are plenty of other tests to verify that publish + // itself functions normally. + child = spawn(node, [npm, 'publish'], { + cwd: pkg + }) + }) +}) diff --git a/deps/openssl/config/android/openssl/opensslconf.h b/deps/openssl/config/android/openssl/opensslconf.h index 26ac6ba3aa7..9280eb28630 100644 --- a/deps/openssl/config/android/openssl/opensslconf.h +++ b/deps/openssl/config/android/openssl/opensslconf.h @@ -5,8 +5,8 @@ #ifndef OPENSSL_DOING_MAKEDEPEND -#ifndef OPENSSL_NO_CAST -# define OPENSSL_NO_CAST +#ifndef OPENSSL_NO_CAMELLIA +# define OPENSSL_NO_CAMELLIA #endif #ifndef OPENSSL_NO_GMP # define OPENSSL_NO_GMP @@ -20,8 +20,11 @@ #ifndef OPENSSL_NO_KRB5 # define OPENSSL_NO_KRB5 #endif -#ifndef OPENSSL_NO_MD2 -# define OPENSSL_NO_MD2 +#ifndef OPENSSL_NO_MDC2 +# define OPENSSL_NO_MDC2 +#endif +#ifndef OPENSSL_NO_CMS +# define OPENSSL_NO_CMS #endif #ifndef OPENSSL_NO_RC5 # define OPENSSL_NO_RC5 @@ -35,9 +38,6 @@ #ifndef OPENSSL_NO_SHA0 # define OPENSSL_NO_SHA0 #endif -#ifndef OPENSSL_NO_STORE -# define OPENSSL_NO_STORE -#endif #ifndef OPENSSL_NO_WHRLPOOL # define OPENSSL_NO_WHRLPOOL #endif @@ -92,6 +92,9 @@ # if defined(OPENSSL_NO_WHRLPOOL) && !defined(NO_WHRLPOOL) # define NO_WHRLPOOL # endif +# if defined(OPENSSL_NO_MDC2) && !defined(NO_MDC2) +# define NO_MDC2 +# endif #endif /* crypto/opensslconf.h.in */ diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp index c9dc07dc87e..4bd39cd81f4 100644 --- a/deps/openssl/openssl.gyp +++ b/deps/openssl/openssl.gyp @@ -652,11 +652,18 @@ 'sources': [ 'openssl/crypto/bn/bn_asm.c', ] - }, { + }], + ['target_arch=="x64"', { 'variables': {'openssl_config_path': 'config/k8'}, 'sources': [ 'openssl/crypto/bn/asm/x86_64-gcc.c', ] + }], + ['target_arch=="arm"', { + 'variables': {'openssl_config_path': 'config/android'}, + 'sources': [ + 'openssl/crypto/bn/bn_asm.c', + ] }] ], 'include_dirs': [ diff --git a/deps/v8/src/code-stubs.cc b/deps/v8/src/code-stubs.cc index 8f316606c20..7d4f23ce942 100644 --- a/deps/v8/src/code-stubs.cc +++ b/deps/v8/src/code-stubs.cc @@ -172,7 +172,9 @@ void ICCompareStub::AddToSpecialCache(Handle<Code> new_object) { Isolate* isolate = new_object->GetIsolate(); Factory* factory = isolate->factory(); return Map::UpdateCodeCache(known_map_, - factory->compare_ic_symbol(), + strict() ? + factory->strict_compare_ic_symbol() : + factory->compare_ic_symbol(), new_object); } @@ -183,10 +185,16 @@ bool ICCompareStub::FindCodeInSpecialCache(Code** code_out) { Code::Flags flags = Code::ComputeFlags( static_cast<Code::Kind>(GetCodeKind()), UNINITIALIZED); + ASSERT(op_ == Token::EQ || op_ == Token::EQ_STRICT); Handle<Object> probe( - known_map_->FindInCodeCache(*factory->compare_ic_symbol(), flags)); + known_map_->FindInCodeCache( + strict() ? + *factory->strict_compare_ic_symbol() : + *factory->compare_ic_symbol(), + flags)); if (probe->IsCode()) { *code_out = Code::cast(*probe); + ASSERT(op_ == (*code_out)->compare_operation()); return true; } return false; diff --git a/deps/v8/src/heap.h b/deps/v8/src/heap.h index dd1f710b252..f80f2a7804c 100644 --- a/deps/v8/src/heap.h +++ b/deps/v8/src/heap.h @@ -240,7 +240,8 @@ namespace internal { V(use_strict, "use strict") \ V(dot_symbol, ".") \ V(anonymous_function_symbol, "(anonymous function)") \ - V(compare_ic_symbol, ".compare_ic") \ + V(compare_ic_symbol, "==") \ + V(strict_compare_ic_symbol, "===") \ V(infinity_symbol, "Infinity") \ V(minus_infinity_symbol, "-Infinity") \ V(hidden_stack_trace_symbol, "v8::hidden_stack_trace") \ diff --git a/deps/v8/src/version.cc b/deps/v8/src/version.cc index f6afc47ccad..2da80cc678f 100644 --- a/deps/v8/src/version.cc +++ b/deps/v8/src/version.cc @@ -35,7 +35,7 @@ #define MAJOR_VERSION 3 #define MINOR_VERSION 11 #define BUILD_NUMBER 10 -#define PATCH_LEVEL 18 +#define PATCH_LEVEL 19 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) #define IS_CANDIDATE_VERSION 0 diff --git a/deps/v8/test/mjsunit/regress/regress-2291.js b/deps/v8/test/mjsunit/regress/regress-2291.js new file mode 100644 index 00000000000..96627fc6f0b --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-2291.js @@ -0,0 +1,36 @@ +// Copyright 2012 the V8 project authors. All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER 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. + +function StrictCompare(x) { return x === Object(x); } + +var obj = new Object(); +var obj2 = new Object(); +obj == obj; // Populate IC cache with non-strict comparison. + +StrictCompare(obj); // Set IC in StrictCompare from IC cache. + +assertFalse(StrictCompare('foo')); // Use == stub for === operation. diff --git a/doc/about/index.html b/doc/about/index.html index 07e95bb0549..ef2e4c52f51 100644 --- a/doc/about/index.html +++ b/doc/about/index.html @@ -2,12 +2,6 @@ <html lang="en"> <head> <meta charset="utf-8"> - <style> - ul { - padding: 0; - margin: 0; - } - </style> <link type="image/x-icon" rel="icon" href="../favicon.ico"> <link type="image/x-icon" rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" href="../pipe.css"> diff --git a/doc/api/_toc.markdown b/doc/api/_toc.markdown index d8da1740e2e..276b3db8a8a 100644 --- a/doc/api/_toc.markdown +++ b/doc/api/_toc.markdown @@ -34,5 +34,3 @@ * [OS](os.html) * [Debugger](debugger.html) * [Cluster](cluster.html) -* Appendixes - * [Appendix 1: Recommended Third-party Modules](appendix_1.html) diff --git a/doc/api/all.markdown b/doc/api/all.markdown index 044c0aee974..4e0dd817418 100644 --- a/doc/api/all.markdown +++ b/doc/api/all.markdown @@ -34,4 +34,3 @@ @include os @include debugger @include cluster -@include appendix_1 diff --git a/doc/api/appendix_1.markdown b/doc/api/appendix_1.markdown deleted file mode 100644 index 9e114df467c..00000000000 --- a/doc/api/appendix_1.markdown +++ /dev/null @@ -1,46 +0,0 @@ -# Appendix 1 - Third Party Modules - -There are many third party modules for Node. At the time of writing, August -2010, the master repository of modules is -[the wiki page](https://github.com/joyent/node/wiki/modules). - -You can also find third party modules via [npm search](http://search.npmjs.org). - -This appendix is intended as a SMALL guide to new-comers to help them -quickly find what are considered to be quality modules. It is not intended -to be a complete list. There may be better more complete modules found -elsewhere. - -- Module Installer: [npm](https://github.com/isaacs/npm) - -- HTTP Middleware: [Connect](https://github.com/senchalabs/connect) - -- Web Framework: [Express](https://github.com/visionmedia/express) - -- Web Sockets: [Socket.IO](https://github.com/learnboost/socket.io) - -- HTML Parsing: [HTML5](https://github.com/aredridel/html5) - -- [mDNS/Zeroconf/Bonjour](https://github.com/agnat/node_mdns) - -- [RabbitMQ, AMQP](https://github.com/postwait/node-amqp) - -- [mysql](https://github.com/felixge/node-mysql) - -- Serialization: [msgpack](https://github.com/pgriess/node-msgpack) - -- Scraping: [Apricot](https://github.com/silentrob/Apricot) - -- Debugger: [ndb](https://github.com/smtlaissezfaire/ndb) is a CLI debugger - [inspector](https://github.com/dannycoates/node-inspector) is a web based - tool. - -- [pcap binding](https://github.com/mranney/node_pcap) - -- [ncurses](https://github.com/mscdex/node-ncurses) - -- Testing/TDD/BDD: [vows](http://vowsjs.org/), - [mocha](https://github.com/visionmedia/mocha), - [mjsunit.runner](https://github.com/tmpvar/mjsunit.runner) - -Patches to this list are welcome. diff --git a/doc/api/cluster.markdown b/doc/api/cluster.markdown index 0686c163a1b..fa96d488d6b 100644 --- a/doc/api/cluster.markdown +++ b/doc/api/cluster.markdown @@ -222,8 +222,8 @@ call `.setupMaster()` with no arguments. * `silent` {Boolean} whether or not to send output to parent's stdio. (Default=`false`) -The `setupMaster` is used to change the default 'fork' behavior. It takes -one option object argument. +`setupMaster` is used to change the default 'fork' behavior. The new settings +are effective immediately and permanently, they cannot be changed later on. Example: @@ -361,7 +361,7 @@ server. An alternative wound be to execute `worker.destroy()` after 2 seconds, b that would normally not allow the worker to do any cleanup if needed. if (cluster.isMaster) { - var worker = cluser.fork(); + var worker = cluster.fork(); var timeout; worker.on('listening', function(address) { diff --git a/doc/api/https.markdown b/doc/api/https.markdown index 5f0052c2c3a..e2c9862a090 100644 --- a/doc/api/https.markdown +++ b/doc/api/https.markdown @@ -48,8 +48,12 @@ Or ## https.request(options, callback) -Makes a request to a secure web server. All options from [http.request()][] -are valid. +Makes a request to a secure web server. + +`options` can be an object or a string. If `options` is a string, it is +automatically parsed with [url.parse()](url.html#url.parse). + +All options from [http.request()][] are valid. Example: @@ -157,11 +161,14 @@ Example: Like `http.get()` but for HTTPS. +`options` can be an object or a string. If `options` is a string, it is +automatically parsed with [url.parse()](url.html#url.parse). + Example: var https = require('https'); - https.get({ host: 'encrypted.google.com', path: '/' }, function(res) { + https.get('https://encrypted.google.com/', function(res) { console.log("statusCode: ", res.statusCode); console.log("headers: ", res.headers); diff --git a/doc/api/tls.markdown b/doc/api/tls.markdown index 279a672faa1..8ac39509348 100644 --- a/doc/api/tls.markdown +++ b/doc/api/tls.markdown @@ -101,24 +101,34 @@ automatically set as a listener for the [secureConnection][] event. The - `crl` : Either a string or list of strings of PEM encoded CRLs (Certificate Revocation List) - - `ciphers`: A string describing the ciphers to use or exclude. Consult - <http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT> for - details on the format. - To mitigate [BEAST attacks] - (http://blog.ivanristic.com/2011/10/mitigating-the-beast-attack-on-tls.html), - it is recommended that you use this option in conjunction with the - `honorCipherOrder` option described below to prioritize the RC4 algorithm, - since it is a non-CBC cipher. A recommended cipher list follows: - `ECDHE-RSA-AES256-SHA:AES256-SHA:RC4-SHA:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM` - - - `honorCipherOrder` : - When choosing a cipher, use the server's preferences instead of the client - preferences. - Note that if SSLv2 is used, the server will send its list of preferences - to the client, and the client chooses the cipher. - Although, this option is disabled by default, it is *recommended* that you - use this option in conjunction with the `ciphers` option to mitigate - BEAST attacks. + - `ciphers`: A string describing the ciphers to use or exclude. + + To mitigate [BEAST attacks] it is recommended that you use this option in + conjunction with the `honorCipherOrder` option described below to + prioritize the non-CBC cipher. + + Defaults to + `ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH`. + Consult the [OpenSSL cipher list format documentation] for details on the + format. + + `ECDHE-RSA-AES128-SHA256` and `AES128-GCM-SHA256` are used when node.js is + linked against OpenSSL 1.0.1 or newer and the client speaks TLS 1.2, RC4 is + used as a secure fallback. + + **NOTE**: Previous revisions of this section suggested `AES256-SHA` as an + acceptable cipher. Unfortunately, `AES256-SHA` is a CBC cipher and therefore + susceptible to BEAST attacks. Do *not* use it. + + - `honorCipherOrder` : When choosing a cipher, use the server's preferences + instead of the client preferences. + + Note that if SSLv2 is used, the server will send its list of preferences + to the client, and the client chooses the cipher. + + Although, this option is disabled by default, it is *recommended* that you + use this option in conjunction with the `ciphers` option to mitigate + BEAST attacks. - `requestCert`: If `true` the server will request a certificate from clients that connect and attempt to verify that certificate. Default: @@ -488,6 +498,8 @@ The string representation of the remote IP address. For example, The numeric representation of the remote port. For example, `443`. +[OpenSSL cipher list format documentation]: http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT +[BEAST attacks]: http://blog.ivanristic.com/2011/10/mitigating-the-beast-attack-on-tls.html [CleartextStream]: #tls_class_tls_cleartextstream [net.Server.address()]: net.html#net_server_address ['secureConnect']: #tls_event_secureconnect diff --git a/doc/api_assets/sh.css b/doc/api_assets/sh.css index b9ed5a30360..7022e199de6 100644 --- a/doc/api_assets/sh.css +++ b/doc/api_assets/sh.css @@ -3,7 +3,8 @@ font-style: normal; } -.sh_sourceCode .sh_symbol , .sh_sourceCode .sh_cbracket { +.sh_sourceCode .sh_symbol, +.sh_sourceCode .sh_cbracket { color: #333; } @@ -11,13 +12,13 @@ color: #c96; } -.sh_sourceCode .sh_string, .sh_sourceCode .sh_regexp, .sh_sourceCode .sh_number, -.sh_sourceCode .sh_specialchar -{ +.sh_sourceCode .sh_string, +.sh_sourceCode .sh_regexp, +.sh_sourceCode .sh_number, +.sh_sourceCode .sh_specialchar { color: #690; } .sh_sourceCode .sh_comment { color: #666; } - diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css index f91690266fd..5772c4ad762 100644 --- a/doc/api_assets/style.css +++ b/doc/api_assets/style.css @@ -1,40 +1,44 @@ /*--------------------- Layout and Typography ----------------------------*/ html { - -webkit-font-smoothing: antialiased; + -webkit-font-smoothing: antialiased; } body { font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; - font-size: 14px; + font-size: 14px; line-height: 180%; color: black; margin: 0; padding: 49px 0 0 0; border-top: 6px #8CC84B solid; } + a { color: #480; text-decoration: underline; } - a:visited { - color: #46483e; - text-decoration: underline; - } - a:hover, a:focus { - text-decoration: none; - } - code a:hover { - background: none; - color: #b950b7; - } +a:visited { + color: #46483e; + text-decoration: underline; +} + +a:hover, +a:focus { + text-decoration: none; +} + +code a:hover { + background: none; + color: #b950b7; +} #changelog #gtoc { display: none; } #gtoc p { - margin:0; - font-size:18px; + margin: 0; + font-size: 18px; line-height: 30px; } @@ -45,21 +49,22 @@ a { } #gtoc a:hover { - color: #669900; - text-decoration: underline; + color: #669900; + text-decoration: underline; } .notice { display: block; padding: 1em; margin: 1.4667em 0 2.9334em; - background:#FFF6BF; - color:#514721; - border:1px solid #FFD324; + background: #FFF6BF; + color: #514721; + border: 1px solid #FFD324; +} + +.notice p { + margin: 0; } - .notice p { - margin: 0; - } ul.plain { list-style: none; @@ -75,7 +80,8 @@ p { text-rendering: optimizeLegibility; } -.apidoc #apicontent p, .apidoc #apicontent li { +.apidoc #apicontent p, +.apidoc #apicontent li { font-size: 15px; line-height: 22px; color: #000; @@ -93,7 +99,9 @@ dl ul, dl ol, dl dl { margin-bottom: 0; } -ol p:first-child, ul p:first-child, dl p:first-child { +ol p:first-child, +ul p:first-child, +dl p:first-child { margin-bottom: 0; } @@ -101,7 +109,6 @@ ul, ol { margin-left: 2em; } - dl dt { position: relative; margin: 1.5em 0 0; @@ -139,8 +146,8 @@ h1 { } #toc + h1 { - margin-top:1em; - padding-top:0; + margin-top: 1em; + padding-top: 0; } h2 { @@ -163,37 +170,40 @@ h3 + h3 { margin: 0 0 0.5em; } - h2, h3, h4 { - position:relative; - padding-right:40px; - } - h1 span, h2 span, h3 span, h4 span { - font-size:25px; - position:absolute; - display:block; - top:0; - right:0; - opacity: 0.3; - } - h1 span:hover, h2 span:hover, h3 span:hover, h4 span:hover { - opacity: 1; - } - h1 span a, h2 span a, h3 span a, h4 span a { - font-size: 0.8em; - color: #000; - text-decoration: none; - font-family: Helvetica, Arial, sans-serif; - font-weight:bold; - } - - h1 span a.top, h3 span a.top, h3 span a.top, h4 span a.top { - /* XXX Get an image and clean up these two links - * so that they look nice next to one another. - * http://www.chrisglass.com/work/nodejs/website/v05/docs.html - * -isaacs - */ - display:none; - } +h2, h3, h4 { + position: relative; + padding-right: 40px; +} + +h1 span, h2 span, h3 span, h4 span { + font-size: 25px; + position: absolute; + display: block; + top: 0; + right: 0; + opacity: 0.3; +} + +h1 span:hover, h2 span:hover, h3 span:hover, h4 span:hover { + opacity: 1; +} + +h1 span a, h2 span a, h3 span a, h4 span a { + font-size: 0.8em; + color: #000; + text-decoration: none; + font-family: Helvetica, Arial, sans-serif; + font-weight: bold; +} + +h1 span a.top, h2 span a.top, h3 span a.top, h4 span a.top { + /* XXX Get an image and clean up these two links + * so that they look nice next to one another. + * http://www.chrisglass.com/work/nodejs/website/v05/docs.html + * -isaacs + */ + display: none; +} h5 { font-size: 1.125em; @@ -205,43 +215,42 @@ h6 { line-height: 1.4667em; } - pre, tt, code { - font-size: 14px; - line-height: 1.5438em; - font-family: Monaco, Consolas, "Lucida Console", monospace; - margin: 0; padding: 0; - } - - .pre { - font-family: Monaco, Consolas, "Lucida Console", monospace; - line-height: 1.5438em; - font-size: 0.95em; - } - - pre { - padding: 1em 1.6em 1em 1.2em; - vertical-align: top; - background: #f8f8f8; - border: 1px solid #e8e8e8; - border-width: 1px 1px 1px 6px; - margin: -0.5em 0 1.1em; - overflow-x:auto; - } - - pre + h3 { - margin-top: 2.225em; - } +pre, tt, code { + font-size: 14px; + line-height: 1.5438em; + font-family: Monaco, Consolas, "Lucida Console", monospace; + margin: 0; padding: 0; +} + +.pre { + font-family: Monaco, Consolas, "Lucida Console", monospace; + line-height: 1.5438em; + font-size: 0.95em; +} + +pre { + padding: 1em 1.6em 1em 1.2em; + vertical-align: top; + background: #f8f8f8; + border: 1px solid #e8e8e8; + border-width: 1px 1px 1px 6px; + margin: -0.5em 0 1.1em; + overflow-x: auto; +} + +pre + h3 { + margin-top: 2.225em; +} code.pre { white-space: pre; } #intro { - width: 775px; - margin: 0 auto; - text-align: center; - color: #d2d8ba; - + width: 775px; + margin: 0 auto; + text-align: center; + color: #d2d8ba; /* preload platform-icons.png */ background-image: url(http://nodejs.org/images/platform-icons.png); background-repeat: no-repeat; @@ -249,8 +258,8 @@ code.pre { } #intro.interior #logo { - margin-left: -298px; - border:0; + margin-left: -298px; + border: 0; } hr { @@ -261,86 +270,90 @@ hr { } #toc { - font-size:15px; - line-height:1.5em; + font-size: 15px; + line-height: 1.5em; line-height: 22px; - padding-top:4px; + padding-top: 4px; } - #toc h2 { - font-size: 15px; - line-height: 21px; - margin: 0 0 0.5em; - } +#toc h2 { + font-size: 15px; + line-height: 21px; + margin: 0 0 0.5em; +} - #toc h2 a { - float: right; - } +#toc h2 a { + float: right; +} - #toc hr { - margin: 1em 0 2em; - } +#toc hr { + margin: 1em 0 2em; +} - #toc ul, #api-section-index #apicontent ul li, #api-section-index #apicontent ul { - font-family: Georgia, FreeSerif, Times, serif; - color:#666!important; - } +#toc ul, +#api-section-index #apicontent ul li, +#api-section-index #apicontent ul { + font-family: Georgia, FreeSerif, Times, serif; + color: #666 !important; +} - #toc ul a { - text-decoration:none; - border-bottom:1px dotted #480; - } - #toc ul a:hover, #toc ul a:focus { - border-bottom:1px dotted #fff; - color:#000; - } +#toc ul a { + text-decoration: none; + border-bottom: 1px dotted #480; +} +#toc ul a:hover, +#toc ul a:focus { + border-bottom: 1px dotted #fff; + color: #000; +} -p tt, p code { +p tt, +p code { background: #f8f8ff; border: 1px solid #dedede; padding: 0 0.2em; } #content { - width: 953px; - margin: 0 auto; - overflow: visible; - clear: both; - display: block; + width: 953px; + margin: 0 auto; + overflow: visible; + clear: both; + display: block; } #column1.interior { - width: 749px; - float: right; - padding-top: 7px; - padding-top: 11px; - font-size:18px; + width: 749px; + float: right; + padding-top: 7px; + padding-top: 11px; + font-size: 18px; } #column2.interior { - width: 140px; - float: left; - margin-top: -55px; - overflow: visible; + width: 140px; + float: left; + margin-top: -55px; + overflow: visible; } #column2.interior ul { - margin-left: 0; + margin-left: 0; } #column2.interior li { - list-style-type: none; + list-style-type: none; } #column2.interior li a { - display: block; - padding: 0 0 0 35px; - color: #878b78; - text-transform: uppercase; - text-decoration: none; - font-size: 11px; - line-height: 23px; + display: block; + padding: 0 0 0 35px; + color: #878b78; + text-transform: uppercase; + text-decoration: none; + font-size: 11px; + line-height: 23px; } #column2.interior li a.home { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px 3px; } @@ -351,7 +364,7 @@ p tt, p code { #column2.interior li a.blog { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -117px; } #column2.interior li a.community { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -141px; } #column2.interior li a.logos { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -165px; } -#column2.interior li a.jobs { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -189px; } +#column2.interior li a.jobs { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -189px; } #column2.interior li a.home.current { background-position: 2px 3px; } #column2.interior li a.download.current { background-position: 2px -21px; } @@ -362,7 +375,6 @@ p tt, p code { #column2.interior li a.community.current { background-position: 2px -141px; } #column2.interior li a.logos.current { background-position: 2px -165px; } #column2.interior li a.jobs.current { background-position: 2px -189px; } -#column2.interior li a.current { color: #8cc84b; font-weight: bold; } #column2.interior li a.home:hover { background-position: -331px 3px; } #column2.interior li a.download:hover { background-position: -331px -21px; } @@ -373,23 +385,33 @@ p tt, p code { #column2.interior li a.community:hover { background-position: -331px -141px; } #column2.interior li a.logos:hover { background-position: -331px -165px; } #column2.interior li a.jobs:hover { background-position: -331px -189px; } -#column2.interior li a:hover { color: #000000; text-decoration: none; } + +#column2.interior li a.current { + color: #8cc84b; + font-weight: bold; +} + +#column2.interior li a:hover { + color: #000000; + text-decoration: none; +} #column2.interior li + li { - border-top: 1px solid #c1c7ac; + border-top: 1px solid #c1c7ac; } + #column2.interior p.twitter { - padding-top: 20px; + padding-top: 20px; } #column2.interior p.twitter a { - background: url(http://nodejs.org/images/twitter-bird.png) no-repeat 0 4px; - padding-left: 37px; - text-decoration: none; + background: url(http://nodejs.org/images/twitter-bird.png) no-repeat 0 4px; + padding-left: 37px; + text-decoration: none; } #column2.interior p.twitter a:hover { - text-decoration: underline; + text-decoration: underline; } a.totop { @@ -412,82 +434,84 @@ a.anchor { width: 13px; border-bottom: 1px solid #cccccc; } + #footer { - width: 942px; - margin: 150px auto 55px auto; - padding:0; + width: 942px; + margin: 150px auto 55px auto; + padding: 0; } #footer p { - font-size: 11px; - line-height:1em; - padding: 0 0 0 195px; - color: #666; + font-size: 11px; + line-height: 1em; + padding: 0 0 0 195px; + color: #666; } -#footer p, #footer li { - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; +#footer p, +#footer li { + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; } #footer a { - text-decoration:none; - border:none; + text-decoration: none; + border: none; color: #480; } + #footer a:hover { - color:#000; + color: #000; } #footer p a { - border-bottom:1px dotted #480; - color: #878b78; + border-bottom: 1px dotted #480; + color: #878b78; } #footer ul { - background: url(http://nodejs.org/images/footer-logo-alt.png) left 17px no-repeat; - padding: 23px 0 0 195px; - height: 26px; - margin-left: -1px; - border-top: 1px solid #626557; + background: url(http://nodejs.org/images/footer-logo-alt.png) left 17px no-repeat; + padding: 23px 0 0 195px; + height: 26px; + margin-left: -1px; + border-top: 1px solid #626557; } #footer ul li { - list-style-type: none; - float: left; - font-size: 12px; - margin:0!important; - padding:0; - height: 12px; + list-style-type: none; + float: left; + font-size: 12px; + margin: 0 !important; + padding: 0; + height: 12px; } #footer ul li a { - margin: 0; - padding: 0 6px 0 0; - display: block; - height:12px; - line-height:12px; + margin: 0; + padding: 0 6px 0 0; + display: block; + height: 12px; + line-height: 12px; } #footer ul li + li { - margin-left: 3px; + margin-left: 3px; } #footer ul li + li a { - padding: 0 6px 0 6px; - border-left: 1px solid #878b78; + padding: 0 6px 0 6px; + border-left: 1px solid #878b78; } #footer ul li a.twitter { - background: url(http://nodejs.org/images/twitter-bird.png) no-repeat 5px 0px; - padding-left: 25px; + background: url(http://nodejs.org/images/twitter-bird.png) no-repeat 5px 0px; + padding-left: 25px; } /* simpler clearfix */ .clearfix:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; } - diff --git a/doc/blog/release/v0.8.8.md b/doc/blog/release/v0.8.8.md new file mode 100644 index 00000000000..83e830861c3 --- /dev/null +++ b/doc/blog/release/v0.8.8.md @@ -0,0 +1,77 @@ +version: 0.8.8 +title: Version 0.8.8 (stable) +category: release +slug: node-v0-8-8-stable +date: 2012-08-22T19:50:38.833Z + +2012.08.22, Version 0.8.8 (Stable) + +* V8: upgrade to 3.11.10.19 + +* npm: upgrade to 1.1.59 + +* windows: fix uninitialized memory access in uv_update_time() (Bert Belder) + +* unix, windows: fix memory corruption in fs-poll.c (Ben Noordhuis) + +* unix: fix integer overflow in uv_hrtime (Tim Holy) + +* sunos: fix uv_cpu_info() on x86_64 (Ben Noordhuis) + +* tls: update default cipher list (Ben Noordhuis) + +* unix: Fix llvm and older gcc duplicate symbol warnings (Bert Belder) + +* fs: fix use after free in stat watcher (Ben Noordhuis) + +* build: Fix using manually compiled gcc on OS X (Nathan Rajlich) + +* windows: make junctions work again (Bert Belder) + + +Source Code: http://nodejs.org/dist/v0.8.8/node-v0.8.8.tar.gz + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.8.8/node-v0.8.8.pkg + +Windows Installer: http://nodejs.org/dist/v0.8.8/node-v0.8.8-x86.msi + +Windows x64 Installer: http://nodejs.org/dist/v0.8.8/x64/node-v0.8.8-x64.msi + +Windows x64 Files: http://nodejs.org/dist/v0.8.8/x64/ + +Linux 32-bit Binary: http://nodejs.org/dist/v0.8.8/node-v0.8.8-linux-x86.tar.gz + +Linux 64-bit Binary: http://nodejs.org/dist/v0.8.8/node-v0.8.8-linux-x64.tar.gz + +SunOS 32-bit Binary: http://nodejs.org/dist/v0.8.8/node-v0.8.8-sunos-x86.tar.gz + +SunOS 64-bit Binary: http://nodejs.org/dist/v0.8.8/node-v0.8.8-sunos-x64.tar.gz + +Other release files: http://nodejs.org/dist/v0.8.8/ + +Website: http://nodejs.org/docs/v0.8.8/ + +Documentation: http://nodejs.org/docs/v0.8.8/api/ + +Shasums: + +``` +ecf54d3aad371621446ee0432f7c182a4494a1a3 node-v0.8.8-darwin-x64.tar.gz +d1aca7c797fd262e2f0c601fe5cc3815622ce801 node-v0.8.8-darwin-x86.tar.gz +603c36611c54651c149a26dc5bc6f833b0b846d0 node-v0.8.8-linux-x64.tar.gz +30c66fc26845b14ef99d3e043bb4dfcba605bd45 node-v0.8.8-linux-x86.tar.gz +cd0d46d232d882dd4afe955bd8acd6c435c2f5fe node-v0.8.8-sunos-x64.tar.gz +857facbd156d4f7a49b9e1c5610b4a1f893bf534 node-v0.8.8-sunos-x86.tar.gz +bb08591a6f973f3699085abb50f6bdc9586f01f9 node-v0.8.8-x86.msi +14239f6f379953405ca914b129c19b379718ba64 node-v0.8.8.pkg +5ddafc059d2f774e35e6375f5b61157879a46f0f node-v0.8.8.tar.gz +6cc8a0a363c1efa184f6b72970a5d1182b5b44aa node.exe +395c73c055886e2e981b46f3c363837613456d82 node.exp +ca8a9560b3da13ecddbbc2fb15c1b3ab85d7371b node.lib +b8e0e35b0ecc7c3514ad8ca4549c57dd8a221be4 node.pdb +b604a56a236f632cdf55c366a882d3ecb2312fba x64/node-v0.8.8-x64.msi +e80c1f4791e80243c5ddc7ea1e92ebd58fc4e10f x64/node.exe +8baf5b459e7f2074e0237d40c8c80e89b47660a3 x64/node.exp +4448fc2bfef66b7334016c0ab2e118c1cbc8544c x64/node.lib +0ddddf2c2fcd746827863b2454ddb4a8f6c3844e x64/node.pdb +``` diff --git a/doc/community/index.html b/doc/community/index.html index 1ce96797781..3ea98c137c3 100644 --- a/doc/community/index.html +++ b/doc/community/index.html @@ -2,12 +2,6 @@ <html lang="en"> <head> <meta charset="utf-8"> - <style> - ul { - padding: 0; - margin: 0; - } - </style> <script src="../sh_main.js"></script> <script src="../sh_javascript.min.js"></script> <link type="image/x-icon" rel="icon" href="../favicon.ico"> @@ -20,180 +14,217 @@ href="http://feeds.feedburner.com/nodejs/123123123"> <title>node.js</title> </head> + <body class="int" id="community"> <div id="intro" class="interior"> - <a href="/" title="Go back to the home page"> - <img id="logo" src="http://nodejs.org/images/logo.png" alt="node.js"> - </a> + <a href="/" title="Go back to the home page"> + <img id="logo" src="http://nodejs.org/images/logo.png" alt="node.js"> + </a> </div> - <div id="content" class="clearfix"> - <div id="column2" class="interior"> - <ul> - <li><a href="/" class="home">Home</a></li> - <li><a href="/download/" class="download">Download</a></li> - <li><a href="/about/" class="about">About</a></li> - <li><a href="http://search.npmjs.org/" class="npm">npm Registry</a></li> - <li><a href="http://nodejs.org/api/" class="docs">Docs</a></li> - <li><a href="http://blog.nodejs.org" class="blog">Blog</a></li> - <li><a href="/community/" class="community current">Community</a></li> - <li><a href="/logos/" class="logos">Logos</a></li> - <li><a href="http://jobs.nodejs.org/" class="jobs">Jobs</a></li> - </ul> - <p class="twitter"><a href="http://twitter.com/nodejs">@nodejs</a></p> - - </div> - - <div id="column1" class="interior"> - <p>Node's most valuable feature is the friendly and <a href="http://blip.tv/jsconf/nodeconf-2011-marak-squires-5729610">colorful community</a> of developers. There are many places where this group congregates on the internet. This page attempts to highlight the best forums.</p> - - <div class="row clearfix"> - <div class="block"> - <h2 class="documentation">Documentation</h2> - - <p><a href="http://nodejs.org/api">Official API docs</a> detail the node API.</p> - <p><a href="http://www.nodemanual.org">Node Manual</a> offers stylized API docs, as well as tutorials and live code samples</p> - <p><a href="http://www.nodebits.org">Node Bits</a> provides sample Node.js projects</p> - <p><a href="http://docs.nodejitsu.com/">docs.nodejitsu.com</a> answers many of the common problems people come across.</p> - <p><a href="http://howtonode.org/">How To Node</a> has a growing number of useful tutorials.</p> - <p><a href="http://stackoverflow.com/questions/tagged/node.js">Stack Overflow node.js tag</a> collects new information every day.</p> - </div> - - - <div class="block"> - <h2 class="github">GitHub</h2> - <p>All development takes place at <a - href="http://github.com/joyent/node">http://github.com/joyent/node</a>. - The comments on commit messages are often source of heated - discussion regarding core development.</p><p>The <a - href="http://github.com/joyent/node/wiki">GitHub Node - wiki</a> is full of useful links for newcomers. Don't - miss <a - href="https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node">Projects, - Applications, and Companies Using Node</a> or the <a - href="https://github.com/joyent/node/wiki/modules">very - long list of Node modules</a>, many of which are - published in the <a href="http://search.npmjs.org/">npm - registry</a>.</p> - </div> - </div> - - - <div class="row clearfix"> - <div class="block"> - <h2 class="mailing">Mailing Lists</h2> - - <p>The <a - href="http://groups.google.com/group/nodejs">user - mailing list</a> is used for announcements, discussion, - and flame wars about Node. The <a - href="http://groups.google.com/group/nodejs-dev">internal - development mailing list</a> is used for discussion of - internal design and feature proposals.</p> - </div> - - <div class="block"> - <h2 class="periodicals">Periodicals</h2> - - <p> <a - href="http://planetnodejs.com">Planet Node</a> is an - aggregator of Node developer blogs.</p><p><a - href="http://nodeup.com/">NodeUp</a> - is a podcast covering the latest Node news in the - community. </p> - </div> - </div> - <div class="row clearfix"> - <div class="block"> - <h2 class="conferences">Conferences</h2> - - <p><a href="http://www.nodeconf.com/">NodeConf</a> - conferences are the main event in the United States; they - are organized by <a href="http://www.mikealrogers.com/">Mikeal Rogers</a>.</p> - <p><a href="http://nodefest.jp/">NodeFest (東京Node学園祭)</a> - is organized by the <a href="http://nodejs.jp">Node.js - Japan user group</a>.</p> - <p><a href="http://nodecamp.de/">NodeCamp.de</a> in Cologne, - Germany is organized by <a href="railslove.de">Rails Love</a>.</p> - <p>An <a href="http://nodejsconf.it/">Italian - Node.js Conference</a> exists as well.</p> - <p><a href="http://nodesummit.com/">Node Summit</a> is a - conference in San Francisco focusing on the adoption of - Node in larger companies.</p> - <p><a href="http://jsconf.com/">JSConf</a> organizes the main - JavaScript conferences.</p> - </div> - - <div class="block"> - <h2 class="localized">Localized Sites</h2> - - <p><code>nodejs.org</code> does not maintain any - translations into other languages. However there are - community websites in various languages with mailing lists - and translations of the website.</p> + <div id="content" class="clearfix"> + <div id="column2" class="interior"> + <ul> + <li><a href="/" class="home">Home</a></li> + <li><a href="/download/" class="download">Download</a></li> + <li><a href="/about/" class="about">About</a></li> + <li><a href="http://search.npmjs.org/" class="npm">npm Registry</a></li> + <li><a href="http://nodejs.org/api/" class="docs">Docs</a></li> + <li><a href="http://blog.nodejs.org" class="blog">Blog</a></li> + <li><a href="/community/" class="community current">Community</a></li> + <li><a href="/logos/" class="logos">Logos</a></li> + <li><a href="http://jobs.nodejs.org/" class="jobs">Jobs</a></li> + </ul> + <p class="twitter"><a href="http://twitter.com/nodejs">@nodejs</a></p> + </div> + + <div id="column1" class="interior"> + <p> + Node's most valuable feature is the friendly and <a href= + "http://blip.tv/jsconf/nodeconf-2011-marak-squires-5729610">colorful + community</a> of developers. There are many places where this group + congregates on the internet. This page attempts to highlight the + best forums. + </p> + + <div class="row clearfix"> + <div class="block"> + <h2 class="documentation">Documentation</h2> + <p> + <a href="http://nodejs.org/api">Official API docs</a> detail the + node API. + </p> + <p> + <a href="http://www.nodemanual.org">Node Manual</a> offers + stylized API docs, as well as tutorials and live code samples + </p> + <p> + <a href="http://www.nodebits.org">Node Bits</a> provides sample + Node.js projects + </p> + <p> + <a href="http://docs.nodejitsu.com/">docs.nodejitsu.com</a> + answers many of the common problems people come across. + </p> + <p> + <a href="http://howtonode.org/">How To Node</a> has a growing + number of useful tutorials. + </p> + <p> + <a href= + "http://stackoverflow.com/questions/tagged/node.js">Stack + Overflow node.js tag</a> collects new information every day. + </p> + </div> + + <div class="block"> + <h2 class="github">GitHub</h2> + <p> + All development takes place at + <a href="http://github.com/joyent/node"> + http://github.com/joyent/node</a>. The comments on commit + messages are often source of heated discussion regarding core + development. + </p> + <p> + The <a href="http://github.com/joyent/node/wiki">GitHub Node + wiki</a> is full of useful links for newcomers. Don't miss + <a href="https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node"> + Projects, Applications, and Companies Using Node</a> or the + <a href="https://github.com/joyent/node/wiki/modules">very long + list of Node modules</a>, many of which are published in the + <a href="http://search.npmjs.org/">npm registry</a>. + </p> + </div> + </div> - <p><a href="http://nodejs.ru/">nodejs.ru</a> Russian blog. - <br> - <a href="http://nodejs.ir">nodejs.ir</a> Iran group in Persian - <br> - <a href="http://nodejs.jp/">nodejs.jp</a> Japan user group - <br> - <a href="http://cnodejs.org">CNodeJS.org</a> Chinese community - <br> - <a href="http://nodejs.co.il">nodejs.co.il</a> Israeli wiki - <br> - <a href="http://nodejs.hk">HKNoJ</a> Hong Kong community - <br> - <a href="http://nodejs.tw">nodejs.tw</a> Taiwan community - <br> - <a href="http://nodehispano.com">Node Hispano</a> Spanish language community - <br> - <a href="http://www.nodejs.es">Node.js Español</a> Node.js in Spanish - <br> - <a href="http://nodejskr.org">OctoberSkyJs</a> Korea Node.js community - </p> + <div class="row clearfix"> + <div class="block"> + <h2 class="mailing">Mailing List</h2> + <p> + The <a href="http://groups.google.com/group/nodejs">mailing + list</a> is used for announcements, discussion, and flame wars + about Node. + </p> + </div> + + <div class="block"> + <h2 class="periodicals">Periodicals</h2> + <p> + <a href="http://planetnodejs.com">Planet Node</a> is an + aggregator of Node developer blogs. + </p> + <p> + <a href="http://nodeup.com/">NodeUp</a> is a podcast covering + the latest Node news in the community. + </p> + </div> + </div> - </div> - </div> + <div class="row clearfix"> + <div class="block"> + <h2 class="conferences">Conferences</h2> + <p> + <a href="http://www.nodeconf.com/">NodeConf</a> conferences are + the main event in the United States; they are organized by + <a href="http://www.mikealrogers.com/">Mikeal Rogers</a>. + </p> + <p> + <a href="http://nodefest.jp/">NodeFest (東京Node学園祭)</a> is + organized by the <a href="http://nodejs.jp">Node.js Japan user + group</a>. + </p> + <p> + <a href="http://nodecamp.de/">NodeCamp.de</a> in Cologne, + Germany is organized by <a href="railslove.de">Rails Love</a>. + </p> + <p> + An <a href="http://nodejsconf.it/">Italian Node.js + Conference</a> exists as well. + </p> + <p> + <a href="http://nodesummit.com/">Node Summit</a> is a conference + in San Francisco focusing on the adoption of Node in larger + companies. + </p> + <p> + <a href="http://jsconf.com/">JSConf</a> organizes the main + JavaScript conferences. + </p> + </div> + + <div class="block"> + <h2 class="localized">Localized Sites</h2> + <p> + <code>nodejs.org</code> does not maintain any translations into + other languages. However there are community websites in various + languages with mailing lists and translations of the website. + </p> + <p> + <a href="http://nodejs.ru/">nodejs.ru</a> Russian blog.<br> + <a href="http://nodejs.ir">nodejs.ir</a> Iran group in + Persian<br> + <a href="http://nodejs.jp/">nodejs.jp</a> Japan user group<br> + <a href="http://cnodejs.org">CNodeJS.org</a> Chinese + community<br> + <a href="http://nodejs.co.il">nodejs.co.il</a> Israeli wiki<br> + <a href="http://nodejs.hk">HKNoJ</a> Hong Kong community<br> + <a href="http://nodejs.tw">nodejs.tw</a> Taiwan community<br> + <a href="http://nodehispano.com">Node Hispano</a> Spanish + language community<br> + <a href="http://www.nodejs.es">Node.js Español</a> Node.js in + Spanish<br> + <a href="http://nodejskr.org">OctoberSkyJs</a> Korea Node.js + community + </p> + </div> + </div> - <div class="row clearfix"> - <div class="block"> - <h2 class="irc">IRC</h2> + <div class="row clearfix"> + <div class="block"> + <h2 class="irc">IRC</h2> + <p> + For real-time chat about Node development go to + <code>irc.freenode.net</code> in the <code>#node.js</code> + channel with an <a href="http://www.mirc.com">IRC</a> + <a href="http://colloquy.info/">client</a> or connect in your web + browser to the channel using + <a href="http://webchat.freenode.net/?channels=node.js"> + freenode's WebChat</a>. + </p> + </div> + </div> - <p>For real-time chat about Node development go to - <code>irc.freenode.net</code> in the <code>#node.js</code> - channel with an <a href="http://www.mirc.com">IRC</a> <a - href="http://colloquy.info/">client</a> or connect in - your web browser to the channel using <a - href="http://webchat.freenode.net/?channels=node.js">freenode's - WebChat</a>. Felix Geisendörfer keeps <a - href="http://nodejs.debuggable.com/">logs of the - channel</a> for those who miss a day.</p> - </div> - </div> + <p> + <a href="http://notinventedhe.re/on/2011-7-26"> + <img src="http://nodejs.org/images/not-invented-here.png" width="100%"> + </a> + </p> + </div> + </div> - <p><a href="http://notinventedhe.re/on/2011-7-26"><img - src="http://nodejs.org/images/not-invented-here.png" width="100%"></a></p> - </div> -</div> <div id="footer"> - <ul class="clearfix"> - <li><a href="/">Node.js</a></li> - <li><a href="/download/">Download</a></li> - <li><a href="/about/">About</a></li> - <li><a href="http://search.npmjs.org/">npm Registry</a></li> - <li><a href="http://nodejs.org/api/">Docs</a></li> - <li><a href="http://blog.nodejs.org">Blog</a></li> - <li><a href="/community/">Community</a></li> - <li><a href="/logos/">Logos</a></li> - <li><a href="http://jobs.nodejs.org/">Jobs</a></li> - <li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li> - </ul> - - <p>Copyright <a href="http://joyent.com/">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/__VERSION__/LICENSE">license</a>.</p> + <ul class="clearfix"> + <li><a href="/">Node.js</a></li> + <li><a href="/download/">Download</a></li> + <li><a href="/about/">About</a></li> + <li><a href="http://search.npmjs.org/">npm Registry</a></li> + <li><a href="http://nodejs.org/api/">Docs</a></li> + <li><a href="http://blog.nodejs.org">Blog</a></li> + <li><a href="/community/">Community</a></li> + <li><a href="/logos/">Logos</a></li> + <li><a href="http://jobs.nodejs.org/">Jobs</a></li> + <li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li> + </ul> + + <p> + Copyright <a href="http://joyent.com/">Joyent, Inc</a>, Node.js is a + <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View + <a href="https://raw.github.com/joyent/node/__VERSION__/LICENSE">license</a>. + </p> </div> - <script> + <script type="text/javascript"> window._gaq = [['_setAccount', 'UA-10874194-2'], ['_trackPageview']]; (function(d, t) { var g = d.createElement(t), @@ -202,5 +233,5 @@ s.parentNode.insertBefore(g, s); }(document, 'script')); </script> -</body> + </body> </html> diff --git a/doc/download/index.html b/doc/download/index.html index bb753fd450e..c6031e6037a 100644 --- a/doc/download/index.html +++ b/doc/download/index.html @@ -2,12 +2,6 @@ <html lang="en"> <head> <meta charset="utf-8"> - <style> - ul { - padding: 0; - margin: 0; - } - </style> <link type="image/x-icon" rel="icon" href="../favicon.ico"> <link type="image/x-icon" rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" href="../pipe.css"> diff --git a/doc/index.html b/doc/index.html index fc26d9b8a7d..cb98e4c77ce 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2,12 +2,6 @@ <html lang="en"> <head> <meta charset="utf-8"> - <style> - ul { - padding: 0; - margin: 0; - } - </style> <link type="image/x-icon" rel="icon" href="favicon.ico"> <link type="image/x-icon" rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="pipe.css"> @@ -39,41 +33,6 @@ <a href="http://github.com/joyent/node"><img class="forkme" src="images/forkme.png" alt="Fork me on GitHub"></a> </div> - <script>;(function(d,n){ - var os = n.platform.match(/(Win|Mac|Linux)/); - var x = n.userAgent.match(/x86_64|Win64|WOW64/) || n.cpuClass === 'x64' ? - 'x64' : 'x86'; - var base = 'http://nodejs.org/dist/__VERSION__/'; - var href = 'node-__VERSION__.tar.gz'; - var db = d.getElementById('downloadbutton'); - var d2; - switch (os && os[1]) { - case 'Mac': - href = 'node-__VERSION__.pkg'; - break; - case 'Win': - href = 'node-__VERSION__-x' + x + '.msi'; - break; - - // TODO uncomment when we have these - // case 'Linux': - // // two buttons: .deb and .rpm - // href = 'node-__VERSION__-' + x + '.rpm'; - // var d2 = document.createElement('a'); - // d2.href = base + 'node-__VERSION__-' + x + '.deb'; - // d2.className = 'button downloadbutton'; - // d2.innerHTML = 'INSTALL .deb'; - // db.innerHTML = 'INSTALL .rpm'; - // db.parentNode.insertBefore(d2, db); - // break; - } - - db.href = base + href; - // if there's one download option, then download it at #download - if (location.hash === '#download' && !d2) - location.replace(b.href); - })(document,navigator);</script> - <div id="quotes" class="clearfix"> <h2>Node.js in the Industry</h2> <ul> @@ -195,6 +154,41 @@ server.listen(1337, '127.0.0.1');</pre> g.src = '//www.google-analytics.com/ga.js'; s.parentNode.insertBefore(g, s); }(document, 'script')); + ;(function(d,n) { + var os = n.platform.match(/(Win|Mac|Linux)/); + var x = n.userAgent.match(/x86_64|Win64|WOW64/) || + n.cpuClass === 'x64' ? 'x64' : 'x86'; + var base = 'http://nodejs.org/dist/__VERSION__/'; + var href = 'node-__VERSION__.tar.gz'; + var db = d.getElementById('downloadbutton'); + var d2; + switch (os && os[1]) { + case 'Mac': + href = 'node-__VERSION__.pkg'; + break; + case 'Win': + href = 'node-__VERSION__-' + x + '.msi'; + if (x === 'x64') href = 'x64/' + href; + break; + + // TODO uncomment when we have these + // case 'Linux': + // // two buttons: .deb and .rpm + // href = 'node-__VERSION__-' + x + '.rpm'; + // var d2 = document.createElement('a'); + // d2.href = base + 'node-__VERSION__-' + x + '.deb'; + // d2.className = 'button downloadbutton'; + // d2.innerHTML = 'INSTALL .deb'; + // db.innerHTML = 'INSTALL .rpm'; + // db.parentNode.insertBefore(d2, db); + // break; + } + + db.href = base + href; + // if there's one download option, then download it at #download + if (location.hash === '#download' && !d2) + location.replace(b.href); + })(document,navigator); </script> - </body> + </body> </html> diff --git a/doc/logos/index.html b/doc/logos/index.html index 62e308229aa..92e749cf0ea 100644 --- a/doc/logos/index.html +++ b/doc/logos/index.html @@ -2,12 +2,6 @@ <html lang="en"> <head> <meta charset="utf-8"> - <style> - ul { - padding: 0; - margin: 0; - } - </style> <link type="image/x-icon" rel="icon" href="../favicon.ico"> <link type="image/x-icon" rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" href="../pipe.css"> diff --git a/doc/pipe.css b/doc/pipe.css index e17251bbab0..01b44169607 100644 --- a/doc/pipe.css +++ b/doc/pipe.css @@ -1,110 +1,130 @@ html { - -webkit-font-smoothing: antialiased; + -webkit-font-smoothing: antialiased; + -webkit-text-stroke: .1px; } body { - background: #46483e; - color: #eee; - font-size: 12px; - line-height: 180%; - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; - margin: 0; - padding-top: 40px; - border-top: 6px #8cc84b solid; + background: #46483e; + color: #eee; + font-size: 12px; + line-height: 180%; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; + margin: 0; + padding-top: 40px; + border-top: 6px #8cc84b solid; } body.alt { - background: white; - color: #46483e; + background: white; + color: #46483e; } body.int { - padding-top:49px; + padding-top: 49px; } img { - border: 0; + border: 0; +} + +ul { + margin: 0px; + padding: 0px; +} + +@media all and (min-height: 650px) { + #toc { + position: fixed; + } } -@media all and (min-height: 650px) { #toc { position: fixed; }} + #toctitle { display: none; } + h1, h2, h3, h4 { - color: #d2d8ba; - font-family: Helvetica, Arial, sans-serif; - margin-top: 2em; - margin-right: 0; - margin-bottom: 10px; - margin-left: 0; - text-transform: uppercase; + color: #d2d8ba; + font-family: Helvetica, Arial, sans-serif; + margin-top: 2em; + margin-right: 0; + margin-bottom: 10px; + margin-left: 0; + text-transform: uppercase; } + h1 { - font-family: Georgia, FreeSerif, Times, serif; - font-size: 30px; - line-height: 36px; - text-transform: none; - color: #669900; - font-weight: normal; - margin: 15px 0 11px; + font-family: Georgia, FreeSerif, Times, serif; + font-size: 30px; + line-height: 36px; + text-transform: none; + color: #669900; + font-weight: normal; + margin: 15px 0 11px; } h2 { - font-size: 12px; - font-weight: normal; + font-size: 12px; + font-weight: normal; } h1 code, h2 code, h3 code, h4 code, -h1 a, h2 a, h3 a, h4 a -{ +h1 a, h2 a, h3 a, h4 a { color: inherit; font-size: inherit; } #intro { - width: 775px; - margin: 0 auto; - text-align: center; - color: #d2d8ba; + width: 775px; + margin: 0 auto; + text-align: center; + color: #d2d8ba; } #intro p { - width: 680px; - line-height: 180%; - padding-top: 30px; - margin: 0 auto; - font-size: 14px; + width: 680px; + line-height: 180%; + padding-top: 30px; + margin: 0 auto; + font-size: 14px; } #intro.interior #logo { - margin-left: -298px; + margin-left: -298px; } #intro p.version { - padding-top: 10px; - font-size: 12px; + padding-top: 10px; + font-size: 12px; } #intro .buttons { - height:auto; - overflow:hidden; - _zoom:1; - width:300px; - margin:0 auto; + height: auto; + overflow: hidden; + _zoom: 1; + width: 300px; + margin: 0 auto; } #intro .button { - font-weight: bold; + font-family: helvetica,arial,sans-serif; font-size: 12px; - padding: 6px 0; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - margin: 30px 4px 0; - - display:inline-block; + line-height: 36px; + -webkit-text-transform: uppercase; + -moz-text-transform: uppercase; + text-transform: uppercase; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + + -webkit-transition: .2s all ease-in-out; + -moz-transition: .2s all ease-in-out; + transition: .2s all ease-in-out; + + margin: 10px 4px; + display: inline-block; color: #46483e; background-color: #9a9f8b; - width:96px; + width: 96px; } #intro .forkme { @@ -120,13 +140,16 @@ h1 a, h2 a, h3 a, h4 a } #intro #docsbutton { - clear:left; + clear: left; } #intro .downloadbutton { background-color: #8BC84B; - width:200px; - font-size:14px; + width: 200px; + font-size: 14px; + font-weight: bold; + display: block; + margin: 30px auto 0px auto; } #intro .downloadbutton:hover { @@ -134,40 +157,40 @@ h1 a, h2 a, h3 a, h4 a } #quotes { - text-align: center; - width: 100%; - background-color: #33342d; - margin-top: 40px; - padding-top: 20px; - padding-bottom: 20px; + text-align: center; + width: 100%; + background-color: #33342d; + margin-top: 40px; + padding-top: 20px; + padding-bottom: 20px; } #quotes h2 { - margin-top: 0; + margin-top: 0; } #quotes ul { - display: block; - width: 775px; - margin: 0 auto; - padding-top: 20px; + display: block; + width: 775px; + margin: 0 auto; + padding-top: 20px; } #quotes ul li { - display: block; - text-align: left; - width: 180px; - float: left; - padding-right: 15px; - font-size: 11px; + display: block; + text-align: left; + width: 180px; + float: left; + padding-right: 15px; + font-size: 11px; } #quotes ul li:last-child { - padding-right: 0; + padding-right: 0; } #quotes ul li p span { - font-size: 10px; + font-size: 10px; } #quotes ul li p { @@ -175,166 +198,167 @@ h1 a, h2 a, h3 a, h4 a } #content { - width: 775px; - margin: 0 auto; - overflow: visible; - clear: both; - display: block; + width: 775px; + margin: 0 auto; + overflow: visible; + clear: both; + display: block; } + .int #content { width: 953px; } #column1 { - width: 460px; - float: left; + width: 460px; + float: left; } #content p, #content ul { - font-size: 14px; - line-height:24px; + font-size: 14px; + line-height: 24px; } #content ul { - margin-top:1em; + margin-top: 1em; } #content table { - font-size:14px; - line-height:24px; - width:100%; + font-size: 14px; + line-height: 24px; + width: 100%; } #download-page #installers { - width:600px; - display:table; - margin-bottom:1em; + width: 600px; + display: table; + margin-bottom: 1em; } #download-page #installers ul { width: auto; text-align: center; margin: 0 auto; - display:table-row; - width:600px; + display: table-row; + width: 600px; } #download-page #installers ul img { - display:block; - margin:0 auto; + display: block; + margin: 0 auto; } #download-page #installers ul a { - display:block; - width:100%; - text-decoration:none; + display: block; + width: 100%; + text-decoration: none; font-size: 16px; - padding-top:1em; + padding-top: 1em; } #download-page #installers ul a:hover, #download-page #installers ul a:active { - background:#666; + background: #666; color: #8cc84b; } - #download-page #installers ul li { - width:33%; - display:table-cell; + width: 33%; + display: table-cell; } + #download-page #installers a small { font-size: 10px; - display:block; - color:#eee; + display: block; + color: #eee; } #download-page #content th { - text-align:left; - width:33%; + text-align: left; + width: 33%; } #download-page #content table { - table-collapse:separate; + table-collapse: separate; } #download-page #content td, #download-page #content th { - border:1px solid #666; + border: 1px solid #666; } #download-page #content td a { - display:block; - height:100%; - width:100%; - text-align:center; + display: block; + height: 100%; + width: 100%; + text-align: center; } #download-page #content td a:hover, #download-page #content td a:active { - background:#666; + background: #666; color: #8cc84b; } #front #content p { - font-size:12px; + font-size: 12px; } #content h1 + p { - font-size: 18px; - line-height: 30px; - color: #46483e; - font-family: Georgia, FreeSerif, Times, serif; + font-size: 18px; + line-height: 30px; + color: #46483e; + font-family: Georgia, FreeSerif, Times, serif; } #column2 { - width: 260px; - float: right; + width: 260px; + float: right; } #column1.interior { - width: 600px; - float: right; - padding-top: 11px; - font-size:18px; - padding-right:150px; + width: 600px; + float: right; + padding-top: 11px; + font-size: 18px; + padding-right: 150px; } #column2.interior { - width: 140px; - float: left; - margin-top: -54px; - overflow: visible; + width: 140px; + float: left; + margin-top: -54px; + overflow: visible; } #column2.interior ul { - margin-left: 0; + margin-left: 0; } #column2.interior li { - list-style-type: none; + list-style-type: none; } #column2.interior li a { - display: block; - padding: 0 0 0 35px; - color: #878b78; - text-transform: uppercase; - text-decoration: none; - font-size: 11px; - line-height: 23px; + display: block; + padding: 0 0 0 35px; + color: #878b78; + text-transform: uppercase; + text-decoration: none; + font-size: 11px; + line-height: 23px; } #column2.interior li a.home { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px 3px; } #column2.interior li a.download { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -21px; } -#column2.interior li a.about { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -44px; } +#column2.interior li a.about { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -45px; } #column2.interior li a.npm { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -69px; } #column2.interior li a.docs { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -93px; } #column2.interior li a.blog { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -117px; } #column2.interior li a.community { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -141px; } #column2.interior li a.logos { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -165px; } -#column2.interior li a.jobs { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -189px; } +#column2.interior li a.jobs { background: url(http://nodejs.org/images/icons-interior.png) no-repeat -156px -189px; } #column2.interior li a.home.current { background-position: 2px 3px; } #column2.interior li a.download.current { background-position: 2px -21px; } @@ -345,7 +369,6 @@ h1 a, h2 a, h3 a, h4 a #column2.interior li a.community.current { background-position: 2px -141px; } #column2.interior li a.logos.current { background-position: 2px -165px; } #column2.interior li a.jobs.current { background-position: 2px -189px; } -#column2.interior li a.current { color: #8cc84b; font-weight: bold; } #column2.interior li a.home:hover { background-position: -331px 3px; } #column2.interior li a.download:hover { background-position: -331px -21px; } @@ -356,44 +379,53 @@ h1 a, h2 a, h3 a, h4 a #column2.interior li a.community:hover { background-position: -331px -141px; } #column2.interior li a.logos:hover { background-position: -331px -165px; } #column2.interior li a.jobs:hover { background-position: -331px -189px; } -#column2.interior li a:hover { color: #000000; text-decoration: none; } + +#column2.interior li a.current { + color: #8cc84b; + font-weight: bold; +} + +#column2.interior li a:hover { + color: #000000; + text-decoration: none; +} #column2.interior li + li { - border-top: 1px solid #c1c7ac; - border-top:1px solid #65675c; + border-top: 1px solid #c1c7ac; + border-top: 1px solid #65675c; } .alt #column2.interior li + li { - border-top: 1px solid #c1c7ac; + border-top: 1px solid #c1c7ac; } #column2.interior p.twitter { - padding-top: 20px; + padding-top: 20px; } #column2.interior p.twitter a { - background: url(http://nodejs.org/images/twitter-bird.png) no-repeat 0 4px; - padding-left: 37px; + background: url(http://nodejs.org/images/twitter-bird.png) no-repeat 0 4px; + padding-left: 37px; } .row { - padding-top: 10px; - padding-bottom: 10px; + padding-top: 10px; + padding-bottom: 10px; } .row + .row { - border-top: 1px solid #626557; + border-top: 1px solid #626557; } .row h2 { - font-size: 24px; - color: white; - text-transform: none; - font-family: Georgia, FreeSerif, Times, serif; - background: url(http://nodejs.org/images/community-icons.png) no-repeat; - padding-left: 45px; - padding-top: 6px; - padding-bottom: 10px; - margin-top: 10px; + font-size: 24px; + color: white; + text-transform: none; + font-family: Georgia, FreeSerif, Times, serif; + background: url(http://nodejs.org/images/community-icons.png) no-repeat; + padding-left: 45px; + padding-top: 6px; + padding-bottom: 10px; + margin-top: 10px; } .row h2.github { background-position: left -92px; } @@ -405,70 +437,70 @@ h1 a, h2 a, h3 a, h4 a .row h2.installers { background-position: left -522px; } .block { - width: 280px; - float: left; + width: 280px; + float: left; } .block + .block { - margin-left: 20px; - width: 300px; + margin-left: 20px; + width: 300px; } #content .block p { - font-size: 13px; - line-height:21px; + font-size: 13px; + line-height: 21px; } #explore { - background: url(http://nodejs.org/images/home-icons.png) no-repeat left 17px; + background: url(http://nodejs.org/images/home-icons.png) no-repeat left 17px; } #explore li { - font-size:12px; - list-style-type: none; - color: #d2d8ba; - line-height: 14px; - padding: 10px 0 10px 40px; - border-top: 1px solid #626557; + font-size: 12px; + list-style-type: none; + color: #d2d8ba; + line-height: 14px; + padding: 10px 0 10px 40px; + border-top: 1px solid #626557; } #explore li span { } #explore li a.explore { - text-transform: uppercase; + text-transform: uppercase; } #explore ol.jobs { - padding: 0; + padding: 0; } #explore ol.jobs li { - display: inline; - padding: 0; - border: none; + display: inline; + padding: 0; + border: none; } #explore ol.jobs li:after { - content: ', '; + content: ', '; } #explore ol.jobs li:last-child:after { - content: ''; + content: ''; } #footer { - width: 942px; - margin: 150px auto 55px auto; - padding:0; + width: 942px; + margin: 150px auto 55px auto; + padding: 0; } #footer p { - font-size: 11px; - line-height:1em; - padding: 0 0 0 195px; - color: #666; - font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; + font-size: 11px; + line-height: 1em; + padding: 0 0 0 195px; + color: #666; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; } #front #footer { @@ -476,106 +508,108 @@ h1 a, h2 a, h3 a, h4 a margin: 50px auto 30px auto; padding-top: 15px; } + #front #footer ul { - margin-right:0; - padding-right:0; + margin-right: 0; + padding-right: 0; } #footer a { - text-decoration:none; - border:none; + text-decoration: none; + border: none; color: #690; } #footer a:hover { - color:#000; + color: #000; } + #front #footer a:hover { - color:#fff; + color: #fff; } #footer p a { - border-bottom:1px dotted #690; - color: #878b78; + border-bottom: 1px dotted #690; + color: #878b78; } #footer ul { - background: url(http://nodejs.org/images/footer-logo.png) left 17px no-repeat; - border-top: 1px solid #626557; - border-color:#90918b; - padding-top:23px; - padding-left: 195px; - height: 26px; - margin-right:137px; + background: url(http://nodejs.org/images/footer-logo.png) left 17px no-repeat; + border-top: 1px solid #626557; + border-color: #90918b; + padding-top: 23px; + padding-left: 195px; + height: 26px; + margin-right: 137px; } + .alt #footer ul { - background-image: url(http://nodejs.org/images/footer-logo-alt.png); + background-image: url(http://nodejs.org/images/footer-logo-alt.png); } #footer ul li { - list-style-type: none; - float: left; - font-size: 12px; - margin:0!important; - height: 12px; + list-style-type: none; + float: left; + font-size: 12px; + margin: 0 !important; + height: 12px; } #footer ul li a { - margin: 0; - padding: 0 6px 0 0; - display: block; - height:12px; - line-height:12px; + margin: 0; + padding: 0 6px 0 0; + display: block; + height: 12px; + line-height: 12px; } #footer ul li + li { - margin-left: 3px; + margin-left: 3px; } #footer ul li + li a { - padding: 0 6px 0 6px; - border-left: 1px solid #878b78; + padding: 0 6px 0 6px; + border-left: 1px solid #878b78; } #footer ul li a.twitter { - background: url(http://nodejs.org/images/twitter-bird.png) no-repeat 5px 0px; - padding-left: 25px; + background: url(http://nodejs.org/images/twitter-bird.png) no-repeat 5px 0px; + padding-left: 25px; } - pre, tt, code { - color: #d2d8ba; - font-size: 14px; - line-height: 22px; - font-family: Monaco, Consolas, "Lucida Console", monospace; - margin: 0; padding: 0; + color: #d2d8ba; + font-size: 14px; + line-height: 22px; + font-family: Monaco, Consolas, "Lucida Console", monospace; + margin: 0; padding: 0; } #front pre, #front tt, #front code { - font-size:12px; - line-height:22px; + font-size: 12px; + line-height: 22px; } pre { - padding-left: 1em; - margin-left: -1em; - border-left-width: 1px; - border-left-style: solid; - border-left-color: #626557; + padding-left: 1em; + margin-left: -1em; + border-left-width: 1px; + border-left-style: solid; + border-left-color: #626557; } .alt pre { - font-size: 14px; - margin-left: 0; - border-left: 2px solid #dadad7; - background-color: #f4f4f2; - color: #46483e; - padding: 1em 1.5em; - line-height: 2em; + font-size: 14px; + margin-left: 0; + border-left: 2px solid #dadad7; + background-color: #f4f4f2; + color: #46483e; + padding: 1em 1.5em; + line-height: 2em; } .alt code { - color: #996633; + color: #996633; } dd { @@ -583,20 +617,23 @@ dd { margin-left: 1em; } - a { - color: #690; - text-decoration: none; + color: #690; + text-decoration: none; +} + +a:hover { + text-decoration: underline; } -a:hover { text-decoration: underline; } .alt a { - background-color: #eff2db; - padding: 0 2px; + background-color: #eff2db; + padding: 0 2px; } -.alt #intro a, .alt #footer a { - background-color: transparent; +.alt #intro a, +.alt #footer a { + background-color: transparent; } .highlight { @@ -604,7 +641,7 @@ a:hover { text-decoration: underline; } padding: 0.2em 0; } .desktops { - font-size: 12px; + font-size: 12px; } .release { @@ -613,10 +650,9 @@ a:hover { text-decoration: underline; } /* simpler clearfix */ .clearfix:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; } - diff --git a/doc/sh.css b/doc/sh.css index b9ed5a30360..7022e199de6 100644 --- a/doc/sh.css +++ b/doc/sh.css @@ -3,7 +3,8 @@ font-style: normal; } -.sh_sourceCode .sh_symbol , .sh_sourceCode .sh_cbracket { +.sh_sourceCode .sh_symbol, +.sh_sourceCode .sh_cbracket { color: #333; } @@ -11,13 +12,13 @@ color: #c96; } -.sh_sourceCode .sh_string, .sh_sourceCode .sh_regexp, .sh_sourceCode .sh_number, -.sh_sourceCode .sh_specialchar -{ +.sh_sourceCode .sh_string, +.sh_sourceCode .sh_regexp, +.sh_sourceCode .sh_number, +.sh_sourceCode .sh_specialchar { color: #690; } .sh_sourceCode .sh_comment { color: #666; } - diff --git a/doc/sh_vim-dark.css b/doc/sh_vim-dark.css index a915a7875dd..42b74f44d61 100644 --- a/doc/sh_vim-dark.css +++ b/doc/sh_vim-dark.css @@ -1,10 +1,10 @@ .sh_sourceCode { - font-weight: normal; font-style: normal; } -.sh_sourceCode .sh_symbol , .sh_sourceCode .sh_cbracket { +.sh_sourceCode .sh_symbol , +.sh_sourceCode .sh_cbracket { color: #fff; } @@ -12,10 +12,11 @@ font-style: italic; } -.sh_sourceCode .sh_string, .sh_sourceCode .sh_regexp, .sh_sourceCode .sh_number, -.sh_sourceCode .sh_specialchar -{ - color: #a0c874; +.sh_sourceCode .sh_string, +.sh_sourceCode .sh_regexp, +.sh_sourceCode .sh_number, +.sh_sourceCode .sh_specialchar { + color: #a0c874; } .sh_sourceCode .sh_comment { @@ -23,11 +24,10 @@ } .alt .sh_sourceCode .sh_keyword { - font-style: normal; - color: #996633; + font-style: normal; + color: #996633; } .alt .sh_sourceCode .sh_symbol , .alt .sh_sourceCode .sh_cbracket { - color: #46483e; + color: #46483e; } - diff --git a/lib/child_process.js b/lib/child_process.js index 213787f1766..d6f62cb7c7f 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -313,7 +313,8 @@ function setupChannel(target, channel) { var obj = handleConversion[message.type]; // Update simultaneous accepts on Windows - if (obj.simultaneousAccepts) { + if (process.platform === 'win32') { + handle._simultaneousAccepts = false; net._setSimultaneousAccepts(handle); } diff --git a/lib/https.js b/lib/https.js index 9778354007f..a243b2bc2e8 100644 --- a/lib/https.js +++ b/lib/https.js @@ -21,6 +21,7 @@ var tls = require('tls'); var http = require('http'); +var url = require('url'); var inherits = require('util').inherits; function Server(opts, requestListener) { @@ -88,6 +89,10 @@ exports.globalAgent = globalAgent; exports.Agent = Agent; exports.request = function(options, cb) { + if (typeof options === 'string') { + options = url.parse(options); + } + if (options.protocol && options.protocol !== 'https:') { throw new Error('Protocol:' + options.protocol + ' not supported.'); } diff --git a/lib/net.js b/lib/net.js index 5201977ed01..8108f160cb3 100644 --- a/lib/net.js +++ b/lib/net.js @@ -375,7 +375,7 @@ Socket.prototype.destroy = function(exception) { function onread(buffer, offset, length) { var handle = this; var self = handle.owner; - assert.equal(handle, self._handle); + assert(handle === self._handle, 'handle != self._handle'); timers.active(self); @@ -735,7 +735,7 @@ function afterConnect(status, handle, req, readable, writable) { return; } - assert.equal(handle, self._handle); + assert(handle === self._handle, 'handle != self._handle'); debug('afterConnect'); diff --git a/lib/tls.js b/lib/tls.js index f444fd0e9d6..098532c9e57 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -29,6 +29,9 @@ var END_OF_FILE = 42; var assert = require('assert').ok; var constants = require('constants'); +var DEFAULT_CIPHERS = 'ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:' + // TLS 1.2 + 'RC4:HIGH:!MD5:!aNULL:!EDH'; // TLS 1.0 + // Allow {CLIENT_RENEG_LIMIT} client-initiated session renegotiations // every {CLIENT_RENEG_WINDOW} seconds. An error event is emitted if more // renegotations are seen. The settings are applied to all remote client @@ -1061,7 +1064,7 @@ function Server(/* [options], listener */) { passphrase: self.passphrase, cert: self.cert, ca: self.ca, - ciphers: self.ciphers || 'RC4-SHA:AES128-SHA:AES256-SHA', + ciphers: self.ciphers || DEFAULT_CIPHERS, secureProtocol: self.secureProtocol, secureOptions: self.secureOptions, crl: self.crl, diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index 8f38033d1a2..c3f668c086f 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -49,19 +49,39 @@ void StatWatcher::Initialize(Handle<Object> target) { } +static void Delete(uv_handle_t* handle) { + delete reinterpret_cast<uv_fs_poll_t*>(handle); +} + + +StatWatcher::StatWatcher() + : ObjectWrap() + , watcher_(new uv_fs_poll_t) +{ + uv_fs_poll_init(uv_default_loop(), watcher_); + watcher_->data = static_cast<void*>(this); +} + + +StatWatcher::~StatWatcher() { + Stop(); + uv_close(reinterpret_cast<uv_handle_t*>(watcher_), Delete); +} + + void StatWatcher::Callback(uv_fs_poll_t* handle, int status, const uv_statbuf_t* prev, const uv_statbuf_t* curr) { - StatWatcher* wrap = container_of(handle, StatWatcher, watcher_); - assert(handle == &wrap->watcher_); + StatWatcher* wrap = static_cast<StatWatcher*>(handle->data); + assert(wrap->watcher_ == handle); HandleScope scope; Local<Value> argv[3]; argv[0] = BuildStatsObject(curr); argv[1] = BuildStatsObject(prev); argv[2] = Integer::New(status); if (status == -1) { - SetErrno(uv_last_error(wrap->watcher_.loop)); + SetErrno(uv_last_error(wrap->watcher_->loop)); } if (onchange_sym.IsEmpty()) { onchange_sym = NODE_PSYMBOL("onchange"); @@ -88,8 +108,8 @@ Handle<Value> StatWatcher::Start(const Arguments& args) { const bool persistent = args[1]->BooleanValue(); const uint32_t interval = args[2]->Uint32Value(); - if (!persistent) uv_unref(reinterpret_cast<uv_handle_t*>(&wrap->watcher_)); - uv_fs_poll_start(&wrap->watcher_, Callback, *path, interval); + if (!persistent) uv_unref(reinterpret_cast<uv_handle_t*>(wrap->watcher_)); + uv_fs_poll_start(wrap->watcher_, Callback, *path, interval); wrap->Ref(); return Undefined(); @@ -109,8 +129,8 @@ Handle<Value> StatWatcher::Stop(const Arguments& args) { void StatWatcher::Stop () { - if (!uv_is_active(reinterpret_cast<uv_handle_t*>(&watcher_))) return; - uv_fs_poll_stop(&watcher_); + if (!uv_is_active(reinterpret_cast<uv_handle_t*>(watcher_))) return; + uv_fs_poll_stop(watcher_); Unref(); } diff --git a/src/node_stat_watcher.h b/src/node_stat_watcher.h index 62bbce0fc82..18afa79944f 100644 --- a/src/node_stat_watcher.h +++ b/src/node_stat_watcher.h @@ -34,13 +34,8 @@ class StatWatcher : ObjectWrap { protected: static v8::Persistent<v8::FunctionTemplate> constructor_template; - StatWatcher() : ObjectWrap() { - uv_fs_poll_init(uv_default_loop(), &watcher_); - } - - ~StatWatcher() { - Stop(); - } + StatWatcher(); + virtual ~StatWatcher(); static v8::Handle<v8::Value> New(const v8::Arguments& args); static v8::Handle<v8::Value> Start(const v8::Arguments& args); @@ -53,7 +48,7 @@ class StatWatcher : ObjectWrap { const uv_statbuf_t* curr); void Stop(); - uv_fs_poll_t watcher_; + uv_fs_poll_t* watcher_; }; } // namespace node diff --git a/test/simple/test-https-client-get-url.js b/test/simple/test-https-client-get-url.js new file mode 100644 index 00000000000..c6ddb032d0f --- /dev/null +++ b/test/simple/test-https-client-get-url.js @@ -0,0 +1,55 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// 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. + +if (!process.versions.openssl) { + console.error('Skipping because node compiled without OpenSSL.'); + process.exit(0); +} + +var common = require('../common'); +var assert = require('assert'); +var https = require('https'); +var fs = require('fs'); + +var seen_req = false; + +var options = { + key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'), + cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem') +}; + +var server = https.createServer(options, function(req, res) { + assert.equal('GET', req.method); + assert.equal('/foo?bar', req.url); + res.writeHead(200, {'Content-Type': 'text/plain'}); + res.write('hello\n'); + res.end(); + server.close(); + seen_req = true; +}); + +server.listen(common.PORT, function() { + https.get('https://127.0.0.1:' + common.PORT + '/foo?bar'); +}); + +process.on('exit', function() { + assert(seen_req); +}); diff --git a/tools/gyp/gyptest.py b/tools/gyp/gyptest.py index d9c814f3fad..c84f3d3306c 100755 --- a/tools/gyp/gyptest.py +++ b/tools/gyp/gyptest.py @@ -153,6 +153,8 @@ def main(argv=None): help="chdir to the specified directory") parser.add_option("-f", "--format", action="store", default='', help="run tests with the specified formats") + parser.add_option("-G", '--gyp_option', action="append", default=[], + help="Add -G options to the gyp command line") parser.add_option("-l", "--list", action="store_true", help="list available tests and exit") parser.add_option("-n", "--no-exec", action="store_true", @@ -220,8 +222,14 @@ def main(argv=None): if not opts.quiet: sys.stdout.write('TESTGYP_FORMAT=%s\n' % format) + gyp_options = [] + for option in opts.gyp_option: + gyp_options += ['-G', option] + if gyp_options and not opts.quiet: + sys.stdout.write('Extra Gyp options: %s\n' % gyp_options) + for test in tests: - status = cr.run([sys.executable, test], + status = cr.run([sys.executable, test] + gyp_options, stdout=sys.stdout, stderr=sys.stderr) if status == 2: diff --git a/tools/gyp/pylib/gyp/MSVSSettings.py b/tools/gyp/pylib/gyp/MSVSSettings.py index 3821fb9256a..d0d4990319c 100644 --- a/tools/gyp/pylib/gyp/MSVSSettings.py +++ b/tools/gyp/pylib/gyp/MSVSSettings.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -15,7 +15,7 @@ MSBuild install directory, e.g. c:\Program Files (x86)\MSBuild """ import sys - +import re # Dictionaries of settings validators. The key is the tool name, the value is # a dictionary mapping setting names to validation functions. @@ -362,6 +362,24 @@ def _CustomGeneratePreprocessedFile(tool, msvs_name): _msvs_to_msbuild_converters[tool.msvs_name][msvs_name] = _Translate +fix_vc_macro_slashes_regex_list = ('IntDir', 'OutDir') +fix_vc_macro_slashes_regex = re.compile( + r'(\$\((?:%s)\))(?:[\\/]+)' % "|".join(fix_vc_macro_slashes_regex_list) +) + +def FixVCMacroSlashes(s): + """Replace macros which have excessive following slashes. + + These macros are known to have a built-in trailing slash. Furthermore, many + scripts hiccup on processing paths with extra slashes in the middle. + + This list is probably not exhaustive. Add as needed. + """ + if '$' in s: + s = fix_vc_macro_slashes_regex.sub(r'\1', s) + return s + + def ConvertVCMacrosToMSBuild(s): """Convert the the MSVS macros found in the string to the MSBuild equivalent. @@ -378,14 +396,10 @@ def ConvertVCMacrosToMSBuild(s): '$(ParentName)': '$(ProjectFileName)', '$(PlatformName)': '$(Platform)', '$(SafeInputName)': '%(Filename)', - - '$(IntDir)\\': '$(IntDir)', - '$(OutDir)\\': '$(OutDir)', - '$(IntDir)/': '$(IntDir)', - '$(OutDir)/': '$(OutDir)', } for old, new in replace_map.iteritems(): s = s.replace(old, new) + s = FixVCMacroSlashes(s) return s diff --git a/tools/gyp/pylib/gyp/MSVSVersion.py b/tools/gyp/pylib/gyp/MSVSVersion.py index 5ca5493508e..eeec2e615e5 100644 --- a/tools/gyp/pylib/gyp/MSVSVersion.py +++ b/tools/gyp/pylib/gyp/MSVSVersion.py @@ -16,7 +16,7 @@ class VisualStudioVersion(object): def __init__(self, short_name, description, solution_version, project_version, flat_sln, uses_vcxproj, - path, sdk_based): + path, sdk_based, default_toolset=None): self.short_name = short_name self.description = description self.solution_version = solution_version @@ -25,6 +25,7 @@ class VisualStudioVersion(object): self.uses_vcxproj = uses_vcxproj self.path = path self.sdk_based = sdk_based + self.default_toolset = default_toolset def ShortName(self): return self.short_name @@ -60,6 +61,11 @@ class VisualStudioVersion(object): """Returns the path to a given compiler tool. """ return os.path.normpath(os.path.join(self.path, "VC/bin", tool)) + def DefaultToolset(self): + """Returns the msbuild toolset version that will be used in the absence + of a user override.""" + return self.default_toolset + def SetupScript(self, target_arch): """Returns a command (with arguments) to be used to set up the environment.""" @@ -188,6 +194,24 @@ def _CreateVersion(name, path, sdk_based=False): passed in that doesn't match a value in versions python will throw a error. """ versions = { + '2012': VisualStudioVersion('2012', + 'Visual Studio 2012', + solution_version='12.00', + project_version='4.0', + flat_sln=False, + uses_vcxproj=True, + path=path, + sdk_based=sdk_based, + default_toolset='v110'), + '2012e': VisualStudioVersion('2012e', + 'Visual Studio 2012', + solution_version='12.00', + project_version='4.0', + flat_sln=True, + uses_vcxproj=True, + path=path, + sdk_based=sdk_based, + default_toolset='v110'), '2010': VisualStudioVersion('2010', 'Visual Studio 2010', solution_version='11.00', @@ -252,9 +276,11 @@ def _DetectVisualStudioVersions(versions_to_check, force_express): 2005(e) - Visual Studio 2005 (8) 2008(e) - Visual Studio 2008 (9) 2010(e) - Visual Studio 2010 (10) + 2012(e) - Visual Studio 2012 (11) Where (e) is e for express editions of MSVS and blank otherwise. """ - version_to_year = {'8.0': '2005', '9.0': '2008', '10.0': '2010'} + version_to_year = { + '8.0': '2005', '9.0': '2008', '10.0': '2010', '11.0': '2012'} versions = [] for version in versions_to_check: # Old method of searching for which VS version is installed @@ -306,13 +332,15 @@ def SelectVisualStudioVersion(version='auto'): if version == 'auto': version = os.environ.get('GYP_MSVS_VERSION', 'auto') version_map = { - 'auto': ('10.0', '9.0', '8.0'), + 'auto': ('10.0', '9.0', '8.0', '11.0'), '2005': ('8.0',), '2005e': ('8.0',), '2008': ('9.0',), '2008e': ('9.0',), '2010': ('10.0',), '2010e': ('10.0',), + '2012': ('11.0',), + '2012e': ('11.0',), } version = str(version) versions = _DetectVisualStudioVersions(version_map[version], 'e' in version) diff --git a/tools/gyp/pylib/gyp/__init__.py b/tools/gyp/pylib/gyp/__init__.py index 1402713889a..54488e5e6bb 100755 --- a/tools/gyp/pylib/gyp/__init__.py +++ b/tools/gyp/pylib/gyp/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2011 Google Inc. All rights reserved. +# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -39,11 +39,18 @@ def FindBuildFiles(): files = os.listdir(os.getcwd()) build_files = [] for file in files: - if file[-len(extension):] == extension: + if file.endswith(extension): build_files.append(file) return build_files +class GypError(Exception): + """Error class representing an error, which is to be presented + to the user. The main entry point will catch and display this. + """ + pass + + def Load(build_files, format, default_variables={}, includes=[], depth='.', params=None, check=False, circular_check=True): """ @@ -66,7 +73,22 @@ def Load(build_files, format, default_variables={}, # avoiding collisions with user and automatic variables. default_variables['GENERATOR'] = format - generator_name = 'gyp.generator.' + format + # Format can be a custom python file, or by default the name of a module + # within gyp.generator. + if format.endswith('.py'): + generator_name = os.path.splitext(format)[0] + path, generator_name = os.path.split(generator_name) + + # Make sure the path to the custom generator is in sys.path + # Don't worry about removing it once we are done. Keeping the path + # to each generator that is used in sys.path is likely harmless and + # arguably a good idea. + path = os.path.abspath(path) + if path not in sys.path: + sys.path.insert(0, path) + else: + generator_name = 'gyp.generator.' + format + # These parameters are passed in order (as opposed to by key) # because ActivePython cannot handle key parameters to __import__. generator = __import__(generator_name, globals(), locals(), generator_name) @@ -157,7 +179,10 @@ def RegenerateAppendFlag(flag, values, predicate, env_name, options): flags = [] if options.use_environment and env_name: for flag_value in ShlexEnv(env_name): - flags.append(FormatOpt(flag, predicate(flag_value))) + value = FormatOpt(flag, predicate(flag_value)) + if value in flags: + flags.remove(value) + flags.append(value) if values: for flag_value in values: flags.append(FormatOpt(flag, predicate(flag_value))) @@ -254,7 +279,7 @@ class RegeneratableOptionParser(optparse.OptionParser): values._regeneration_metadata = self.__regeneratable_options return values, args -def main(args): +def gyp_main(args): my_name = os.path.basename(sys.argv[0]) parser = RegeneratableOptionParser() @@ -366,9 +391,8 @@ def main(args): if not build_files: build_files = FindBuildFiles() if not build_files: - print >>sys.stderr, (usage + '\n\n%s: error: no build_file') % \ - (my_name, my_name) - return 1 + raise GypError((usage + '\n\n%s: error: no build_file') % + (my_name, my_name)) # TODO(mark): Chromium-specific hack! # For Chromium, the gyp "depth" variable should always be a relative path @@ -393,10 +417,9 @@ def main(args): break if not options.depth: - raise Exception, \ - 'Could not automatically locate src directory. This is a ' + \ - 'temporary Chromium feature that will be removed. Use ' + \ - '--depth as a workaround.' + raise GypError('Could not automatically locate src directory. This is' + 'a temporary Chromium feature that will be removed. Use' + '--depth as a workaround.') # If toplevel-dir is not set, we assume that depth is the root of our source # tree. @@ -483,5 +506,12 @@ def main(args): return 0 +def main(args): + try: + return gyp_main(args) + except GypError, e: + sys.stderr.write("gyp: %s\n" % e) + return 1 + if __name__ == '__main__': sys.exit(main(sys.argv[1:])) diff --git a/tools/gyp/pylib/gyp/common.py b/tools/gyp/pylib/gyp/common.py index 5b06a9746fb..6144d2fe7af 100644 --- a/tools/gyp/pylib/gyp/common.py +++ b/tools/gyp/pylib/gyp/common.py @@ -95,6 +95,15 @@ def BuildFile(fully_qualified_target): return ParseQualifiedTarget(fully_qualified_target)[0] +def GetEnvironFallback(var_list, default): + """Look up a key in the environment, with fallback to secondary keys + and finally falling back to a default value.""" + for var in var_list: + if var in os.environ: + return os.environ[var] + return default + + def QualifiedTarget(build_file, target, toolset): # "Qualified" means the file that a target was defined in and the target # name, separated by a colon, suffixed by a # and the toolset name: diff --git a/tools/gyp/pylib/gyp/easy_xml.py b/tools/gyp/pylib/gyp/easy_xml.py index db54aadbee7..bf949b6ac9b 100644 --- a/tools/gyp/pylib/gyp/easy_xml.py +++ b/tools/gyp/pylib/gyp/easy_xml.py @@ -3,6 +3,7 @@ # found in the LICENSE file. import re +import os def XmlToString(content, encoding='utf-8', pretty=False): @@ -79,7 +80,7 @@ def _ConstructContentList(xml_parts, specification, pretty, level=0): rest = specification[1:] if rest and isinstance(rest[0], dict): for at, val in sorted(rest[0].iteritems()): - xml_parts.append(' %s="%s"' % (at, _XmlEscape(val))) + xml_parts.append(' %s="%s"' % (at, _XmlEscape(val, attr=True))) rest = rest[1:] if rest: xml_parts.append('>') @@ -101,7 +102,8 @@ def _ConstructContentList(xml_parts, specification, pretty, level=0): xml_parts.append('/>%s' % new_line) -def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False): +def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False, + win32=False): """ Writes the XML content to disk, touching the file only if it has changed. Args: @@ -111,6 +113,8 @@ def WriteXmlIfChanged(content, path, encoding='utf-8', pretty=False): pretty: True if we want pretty printing with indents and new lines. """ xml_string = XmlToString(content, encoding, pretty) + if win32 and os.linesep != '\r\n': + xml_string = xml_string.replace('\n', '\r\n') # Get the old content try: @@ -142,7 +146,12 @@ _xml_escape_re = re.compile( "(%s)" % "|".join(map(re.escape, _xml_escape_map.keys()))) -def _XmlEscape(value): +def _XmlEscape(value, attr=False): """ Escape a string for inclusion in XML.""" - replace = lambda m: _xml_escape_map[m.string[m.start() : m.end()]] + def replace(match): + m = match.string[match.start() : match.end()] + # don't replace single quotes in attrs + if attr and m == "'": + return m + return _xml_escape_map[m] return _xml_escape_re.sub(replace, value) diff --git a/tools/gyp/pylib/gyp/easy_xml_test.py b/tools/gyp/pylib/gyp/easy_xml_test.py index a2aa4f20c26..df64354982c 100755 --- a/tools/gyp/pylib/gyp/easy_xml_test.py +++ b/tools/gyp/pylib/gyp/easy_xml_test.py @@ -32,11 +32,12 @@ class TestSequenceFunctions(unittest.TestCase): def test_EasyXml_escaping(self): original = '<test>\'"\r&\nfoo' - converted = '<test>'"
&
foo' + converted = '<test>\'"
&
foo' + converted_apos = converted.replace("'", ''') self.assertEqual( easy_xml.XmlToString(['test3', {'a': original}, original]), '<?xml version="1.0" encoding="utf-8"?><test3 a="%s">%s</test3>' % - (converted, converted)) + (converted, converted_apos)) def test_EasyXml_pretty(self): self.assertEqual( @@ -73,8 +74,8 @@ class TestSequenceFunctions(unittest.TestCase): '</PropertyGroup>' '<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.props"/>' '<PropertyGroup ' - 'Condition="'$(Configuration)|$(Platform)'==' - ''Debug|Win32'" Label="Configuration">' + 'Condition="\'$(Configuration)|$(Platform)\'==' + '\'Debug|Win32\'" Label="Configuration">' '<ConfigurationType>Application</ConfigurationType>' '<CharacterSet>Unicode</CharacterSet>' '</PropertyGroup>' diff --git a/tools/gyp/pylib/gyp/generator/android.py b/tools/gyp/pylib/gyp/generator/android.py new file mode 100644 index 00000000000..0cecf7a64c4 --- /dev/null +++ b/tools/gyp/pylib/gyp/generator/android.py @@ -0,0 +1,1077 @@ +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Notes: +# +# This generates makefiles suitable for inclusion into the Android build system +# via an Android.mk file. It is based on make.py, the standard makefile +# generator. +# +# The code below generates a separate .mk file for each target, but +# all are sourced by the top-level GypAndroid.mk. This means that all +# variables in .mk-files clobber one another, and furthermore that any +# variables set potentially clash with other Android build system variables. +# Try to avoid setting global variables where possible. + +import gyp +import gyp.common +import gyp.generator.make as make # Reuse global functions from make backend. +import os +import re + +generator_default_variables = { + 'OS': 'android', + 'EXECUTABLE_PREFIX': '', + 'EXECUTABLE_SUFFIX': '', + 'STATIC_LIB_PREFIX': 'lib', + 'SHARED_LIB_PREFIX': 'lib', + 'STATIC_LIB_SUFFIX': '.a', + 'SHARED_LIB_SUFFIX': '.so', + 'INTERMEDIATE_DIR': '$(gyp_intermediate_dir)', + 'SHARED_INTERMEDIATE_DIR': '$(gyp_shared_intermediate_dir)', + 'PRODUCT_DIR': '$(gyp_shared_intermediate_dir)', + 'SHARED_LIB_DIR': '$(builddir)/lib.$(TOOLSET)', + 'LIB_DIR': '$(obj).$(TOOLSET)', + 'RULE_INPUT_ROOT': '%(INPUT_ROOT)s', # This gets expanded by Python. + 'RULE_INPUT_DIRNAME': '%(INPUT_DIRNAME)s', # This gets expanded by Python. + 'RULE_INPUT_PATH': '$(RULE_SOURCES)', + 'RULE_INPUT_EXT': '$(suffix $<)', + 'RULE_INPUT_NAME': '$(notdir $<)', +} + +# Make supports multiple toolsets +generator_supports_multiple_toolsets = True + + +SHARED_FOOTER = """\ +# "gyp_all_modules" is a concatenation of the "gyp_all_modules" targets from +# all the included sub-makefiles. This is just here to clarify. +gyp_all_modules: +""" + +header = """\ +# This file is generated by gyp; do not edit. + +""" + +android_standard_include_paths = set([ + # JNI_H_INCLUDE in build/core/binary.mk + 'dalvik/libnativehelper/include/nativehelper', + # from SRC_HEADERS in build/core/config.mk + 'system/core/include', + 'hardware/libhardware/include', + 'hardware/libhardware_legacy/include', + 'hardware/ril/include', + 'dalvik/libnativehelper/include', + 'frameworks/native/include', + 'frameworks/native/opengl/include', + 'frameworks/base/include', + 'frameworks/base/opengl/include', + 'frameworks/base/native/include', + 'external/skia/include', + # TARGET_C_INCLUDES in build/core/combo/TARGET_linux-arm.mk + 'bionic/libc/arch-arm/include', + 'bionic/libc/include', + 'bionic/libstdc++/include', + 'bionic/libc/kernel/common', + 'bionic/libc/kernel/arch-arm', + 'bionic/libm/include', + 'bionic/libm/include/arm', + 'bionic/libthread_db/include', + ]) + + +# Map gyp target types to Android module classes. +MODULE_CLASSES = { + 'static_library': 'STATIC_LIBRARIES', + 'shared_library': 'SHARED_LIBRARIES', + 'executable': 'EXECUTABLES', +} + + +def IsCPPExtension(ext): + return make.COMPILABLE_EXTENSIONS.get(ext) == 'cxx' + + +def Sourceify(path): + """Convert a path to its source directory form. The Android backend does not + support options.generator_output, so this function is a noop.""" + return path + + +# Map from qualified target to path to output. +# For Android, the target of these maps is a tuple ('static', 'modulename'), +# ('dynamic', 'modulename'), or ('path', 'some/path') instead of a string, +# since we link by module. +target_outputs = {} +# Map from qualified target to any linkable output. A subset +# of target_outputs. E.g. when mybinary depends on liba, we want to +# include liba in the linker line; when otherbinary depends on +# mybinary, we just want to build mybinary first. +target_link_deps = {} + + +class AndroidMkWriter(object): + """AndroidMkWriter packages up the writing of one target-specific Android.mk. + + Its only real entry point is Write(), and is mostly used for namespacing. + """ + + def __init__(self, android_top_dir): + self.android_top_dir = android_top_dir + + def Write(self, qualified_target, base_path, output_filename, spec, configs, + part_of_all): + """The main entry point: writes a .mk file for a single target. + + Arguments: + qualified_target: target we're generating + base_path: path relative to source root we're building in, used to resolve + target-relative paths + output_filename: output .mk file name to write + spec, configs: gyp info + part_of_all: flag indicating this target is part of 'all' + """ + make.ensure_directory_exists(output_filename) + + self.fp = open(output_filename, 'w') + + self.fp.write(header) + + self.qualified_target = qualified_target + self.path = base_path + self.target = spec['target_name'] + self.type = spec['type'] + self.toolset = spec['toolset'] + + deps, link_deps = self.ComputeDeps(spec) + + # Some of the generation below can add extra output, sources, or + # link dependencies. All of the out params of the functions that + # follow use names like extra_foo. + extra_outputs = [] + extra_sources = [] + + self.android_class = MODULE_CLASSES.get(self.type, 'NONE') + self.android_module = self.ComputeAndroidModule(spec) + (self.android_stem, self.android_suffix) = self.ComputeOutputParts(spec) + self.output = self.output_binary = self.ComputeOutput(spec) + + # Standard header. + self.WriteLn('include $(CLEAR_VARS)\n') + + # Module class and name. + self.WriteLn('LOCAL_MODULE_CLASS := ' + self.android_class) + self.WriteLn('LOCAL_MODULE := ' + self.android_module) + # Only emit LOCAL_MODULE_STEM if it's different to LOCAL_MODULE. + # The library module classes fail if the stem is set. ComputeOutputParts + # makes sure that stem == modulename in these cases. + if self.android_stem != self.android_module: + self.WriteLn('LOCAL_MODULE_STEM := ' + self.android_stem) + self.WriteLn('LOCAL_MODULE_SUFFIX := ' + self.android_suffix) + self.WriteLn('LOCAL_MODULE_TAGS := optional') + if self.toolset == 'host': + self.WriteLn('LOCAL_IS_HOST_MODULE := true') + + # Grab output directories; needed for Actions and Rules. + self.WriteLn('gyp_intermediate_dir := $(call local-intermediates-dir)') + self.WriteLn('gyp_shared_intermediate_dir := ' + '$(call intermediates-dir-for,GYP,shared)') + self.WriteLn() + + # List files this target depends on so that actions/rules/copies/sources + # can depend on the list. + # TODO: doesn't pull in things through transitive link deps; needed? + target_dependencies = [x[1] for x in deps if x[0] == 'path'] + self.WriteLn('# Make sure our deps are built first.') + self.WriteList(target_dependencies, 'GYP_TARGET_DEPENDENCIES', + local_pathify=True) + + # Actions must come first, since they can generate more OBJs for use below. + if 'actions' in spec: + self.WriteActions(spec['actions'], extra_sources, extra_outputs) + + # Rules must be early like actions. + if 'rules' in spec: + self.WriteRules(spec['rules'], extra_sources, extra_outputs) + + if 'copies' in spec: + self.WriteCopies(spec['copies'], extra_outputs) + + # GYP generated outputs. + self.WriteList(extra_outputs, 'GYP_GENERATED_OUTPUTS', local_pathify=True) + + # Set LOCAL_ADDITIONAL_DEPENDENCIES so that Android's build rules depend + # on both our dependency targets and our generated files. + self.WriteLn('# Make sure our deps and generated files are built first.') + self.WriteLn('LOCAL_ADDITIONAL_DEPENDENCIES := $(GYP_TARGET_DEPENDENCIES) ' + '$(GYP_GENERATED_OUTPUTS)') + self.WriteLn() + + # Sources. + if spec.get('sources', []) or extra_sources: + self.WriteSources(spec, configs, extra_sources) + + self.WriteTarget(spec, configs, deps, link_deps, part_of_all) + + # Update global list of target outputs, used in dependency tracking. + target_outputs[qualified_target] = ('path', self.output_binary) + + # Update global list of link dependencies. + if self.type == 'static_library': + target_link_deps[qualified_target] = ('static', self.android_module) + elif self.type == 'shared_library': + target_link_deps[qualified_target] = ('shared', self.android_module) + + self.fp.close() + return self.android_module + + + def WriteActions(self, actions, extra_sources, extra_outputs): + """Write Makefile code for any 'actions' from the gyp input. + + extra_sources: a list that will be filled in with newly generated source + files, if any + extra_outputs: a list that will be filled in with any outputs of these + actions (used to make other pieces dependent on these + actions) + """ + for action in actions: + name = make.StringToMakefileVariable('%s_%s' % (self.qualified_target, + action['action_name'])) + self.WriteLn('### Rules for action "%s":' % action['action_name']) + inputs = action['inputs'] + outputs = action['outputs'] + + # Build up a list of outputs. + # Collect the output dirs we'll need. + dirs = set() + for out in outputs: + if not out.startswith('$'): + print ('WARNING: Action for target "%s" writes output to local path ' + '"%s".' % (self.target, out)) + dir = os.path.split(out)[0] + if dir: + dirs.add(dir) + if int(action.get('process_outputs_as_sources', False)): + extra_sources += outputs + + # Prepare the actual command. + command = gyp.common.EncodePOSIXShellList(action['action']) + if 'message' in action: + quiet_cmd = 'Gyp action: %s ($@)' % action['message'] + else: + quiet_cmd = 'Gyp action: %s ($@)' % name + if len(dirs) > 0: + command = 'mkdir -p %s' % ' '.join(dirs) + '; ' + command + + cd_action = 'cd $(gyp_local_path)/%s; ' % self.path + command = cd_action + command + + # The makefile rules are all relative to the top dir, but the gyp actions + # are defined relative to their containing dir. This replaces the gyp_* + # variables for the action rule with an absolute version so that the + # output goes in the right place. + # Only write the gyp_* rules for the "primary" output (:1); + # it's superfluous for the "extra outputs", and this avoids accidentally + # writing duplicate dummy rules for those outputs. + main_output = make.QuoteSpaces(self.LocalPathify(outputs[0])) + self.WriteLn('%s: gyp_local_path := $(LOCAL_PATH)' % main_output) + self.WriteLn('%s: gyp_intermediate_dir := ' + '$(GYP_ABS_ANDROID_TOP_DIR)/$(gyp_intermediate_dir)' % + main_output) + self.WriteLn('%s: gyp_shared_intermediate_dir := ' + '$(GYP_ABS_ANDROID_TOP_DIR)/$(gyp_shared_intermediate_dir)' % + main_output) + + for input in inputs: + assert ' ' not in input, ( + "Spaces in action input filenames not supported (%s)" % input) + for output in outputs: + assert ' ' not in output, ( + "Spaces in action output filenames not supported (%s)" % output) + + self.WriteLn('%s: %s $(GYP_TARGET_DEPENDENCIES)' % + (main_output, ' '.join(map(self.LocalPathify, inputs)))) + self.WriteLn('\t@echo "%s"' % quiet_cmd) + self.WriteLn('\t$(hide)%s\n' % command) + for output in outputs[1:]: + # Make each output depend on the main output, with an empty command + # to force make to notice that the mtime has changed. + self.WriteLn('%s: %s ;' % (self.LocalPathify(output), main_output)) + + extra_outputs += outputs + self.WriteLn() + + self.WriteLn() + + + def WriteRules(self, rules, extra_sources, extra_outputs): + """Write Makefile code for any 'rules' from the gyp input. + + extra_sources: a list that will be filled in with newly generated source + files, if any + extra_outputs: a list that will be filled in with any outputs of these + rules (used to make other pieces dependent on these rules) + """ + if len(rules) == 0: + return + rule_trigger = '%s_rule_trigger' % self.android_module + + did_write_rule = False + for rule in rules: + if len(rule.get('rule_sources', [])) == 0: + continue + did_write_rule = True + name = make.StringToMakefileVariable('%s_%s' % (self.qualified_target, + rule['rule_name'])) + self.WriteLn('\n### Generated for rule "%s":' % name) + self.WriteLn('# "%s":' % rule) + + inputs = rule.get('inputs') + for rule_source in rule.get('rule_sources', []): + (rule_source_dirname, rule_source_basename) = os.path.split(rule_source) + (rule_source_root, rule_source_ext) = \ + os.path.splitext(rule_source_basename) + + outputs = [self.ExpandInputRoot(out, rule_source_root, + rule_source_dirname) + for out in rule['outputs']] + + dirs = set() + for out in outputs: + if not out.startswith('$'): + print ('WARNING: Rule for target %s writes output to local path %s' + % (self.target, out)) + dir = os.path.dirname(out) + if dir: + dirs.add(dir) + extra_outputs += outputs + if int(rule.get('process_outputs_as_sources', False)): + extra_sources.extend(outputs) + + components = [] + for component in rule['action']: + component = self.ExpandInputRoot(component, rule_source_root, + rule_source_dirname) + if '$(RULE_SOURCES)' in component: + component = component.replace('$(RULE_SOURCES)', + rule_source) + components.append(component) + + command = gyp.common.EncodePOSIXShellList(components) + cd_action = 'cd $(gyp_local_path)/%s; ' % self.path + command = cd_action + command + if dirs: + command = 'mkdir -p %s' % ' '.join(dirs) + '; ' + command + + # We set up a rule to build the first output, and then set up + # a rule for each additional output to depend on the first. + outputs = map(self.LocalPathify, outputs) + main_output = outputs[0] + self.WriteLn('%s: gyp_local_path := $(LOCAL_PATH)' % main_output) + self.WriteLn('%s: gyp_intermediate_dir := ' + '$(GYP_ABS_ANDROID_TOP_DIR)/$(gyp_intermediate_dir)' + % main_output) + self.WriteLn('%s: gyp_shared_intermediate_dir := ' + '$(GYP_ABS_ANDROID_TOP_DIR)/$(gyp_shared_intermediate_dir)' + % main_output) + + main_output_deps = self.LocalPathify(rule_source) + if inputs: + main_output_deps += ' ' + main_output_deps += ' '.join([self.LocalPathify(f) for f in inputs]) + + self.WriteLn('%s: %s $(GYP_TARGET_DEPENDENCIES)' % + (main_output, main_output_deps)) + self.WriteLn('\t%s\n' % command) + for output in outputs[1:]: + self.WriteLn('%s: %s' % (output, main_output)) + self.WriteLn('.PHONY: %s' % (rule_trigger)) + self.WriteLn('%s: %s' % (rule_trigger, main_output)) + self.WriteLn('') + if did_write_rule: + extra_sources.append(rule_trigger) # Force all rules to run. + self.WriteLn('### Finished generating for all rules') + self.WriteLn('') + + + def WriteCopies(self, copies, extra_outputs): + """Write Makefile code for any 'copies' from the gyp input. + + extra_outputs: a list that will be filled in with any outputs of this action + (used to make other pieces dependent on this action) + """ + self.WriteLn('### Generated for copy rule.') + + variable = make.StringToMakefileVariable(self.qualified_target + '_copies') + outputs = [] + for copy in copies: + for path in copy['files']: + # The Android build system does not allow generation of files into the + # source tree. The destination should start with a variable, which will + # typically be $(gyp_intermediate_dir) or + # $(gyp_shared_intermediate_dir). Note that we can't use an assertion + # because some of the gyp tests depend on this. + if not copy['destination'].startswith('$'): + print ('WARNING: Copy rule for target %s writes output to ' + 'local path %s' % (self.target, copy['destination'])) + + # LocalPathify() calls normpath, stripping trailing slashes. + path = Sourceify(self.LocalPathify(path)) + filename = os.path.split(path)[1] + output = Sourceify(self.LocalPathify(os.path.join(copy['destination'], + filename))) + + self.WriteLn('%s: %s $(GYP_TARGET_DEPENDENCIES) | $(ACP)' % + (output, path)) + self.WriteLn('\t@echo Copying: $@') + self.WriteLn('\t$(hide) mkdir -p $(dir $@)') + self.WriteLn('\t$(hide) $(ACP) -r $< $@') + self.WriteLn() + outputs.append(output) + self.WriteLn('%s = %s' % (variable, + ' '.join(map(make.QuoteSpaces, outputs)))) + extra_outputs.append('$(%s)' % variable) + self.WriteLn() + + + def WriteSourceFlags(self, spec, configs): + """Write out the flags and include paths used to compile source files for + the current target. + + Args: + spec, configs: input from gyp. + """ + config = configs[spec['default_configuration']] + extracted_includes = [] + + self.WriteLn('\n# Flags passed to both C and C++ files.') + cflags, includes_from_cflags = self.ExtractIncludesFromCFlags( + config.get('cflags')) + extracted_includes.extend(includes_from_cflags) + self.WriteList(cflags, 'MY_CFLAGS') + + cflags_c, includes_from_cflags_c = self.ExtractIncludesFromCFlags( + config.get('cflags_c')) + extracted_includes.extend(includes_from_cflags_c) + self.WriteList(cflags_c, 'MY_CFLAGS_C') + + self.WriteList(config.get('defines'), 'MY_DEFS', prefix='-D', + quoter=make.EscapeCppDefine) + self.WriteLn('LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)') + + # Undefine ANDROID for host modules + # TODO: the source code should not use macro ANDROID to tell if it's host or + # target module. + if self.toolset == 'host': + self.WriteLn('# Undefine ANDROID for host modules') + self.WriteLn('LOCAL_CFLAGS += -UANDROID') + + self.WriteLn('\n# Include paths placed before CFLAGS/CPPFLAGS') + includes = list(config.get('include_dirs', [])) + includes.extend(extracted_includes) + includes = map(Sourceify, map(self.LocalPathify, includes)) + includes = self.NormalizeIncludePaths(includes) + self.WriteList(includes, 'LOCAL_C_INCLUDES') + self.WriteLn('LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) ' + '$(LOCAL_C_INCLUDES)') + + self.WriteLn('\n# Flags passed to only C++ (and not C) files.') + self.WriteList(config.get('cflags_cc'), 'LOCAL_CPPFLAGS') + + + def WriteSources(self, spec, configs, extra_sources): + """Write Makefile code for any 'sources' from the gyp input. + These are source files necessary to build the current target. + We need to handle shared_intermediate directory source files as + a special case by copying them to the intermediate directory and + treating them as a genereated sources. Otherwise the Android build + rules won't pick them up. + + Args: + spec, configs: input from gyp. + extra_sources: Sources generated from Actions or Rules. + """ + sources = filter(make.Compilable, spec.get('sources', [])) + generated_not_sources = [x for x in extra_sources if not make.Compilable(x)] + extra_sources = filter(make.Compilable, extra_sources) + + # Determine and output the C++ extension used by these sources. + # We simply find the first C++ file and use that extension. + all_sources = sources + extra_sources + local_cpp_extension = '.cpp' + for source in all_sources: + (root, ext) = os.path.splitext(source) + if IsCPPExtension(ext): + local_cpp_extension = ext + break + if local_cpp_extension != '.cpp': + self.WriteLn('LOCAL_CPP_EXTENSION := %s' % local_cpp_extension) + + # We need to move any non-generated sources that are coming from the + # shared intermediate directory out of LOCAL_SRC_FILES and put them + # into LOCAL_GENERATED_SOURCES. We also need to move over any C++ files + # that don't match our local_cpp_extension, since Android will only + # generate Makefile rules for a single LOCAL_CPP_EXTENSION. + local_files = [] + for source in sources: + (root, ext) = os.path.splitext(source) + if '$(gyp_shared_intermediate_dir)' in source: + extra_sources.append(source) + elif '$(gyp_intermediate_dir)' in source: + extra_sources.append(source) + elif IsCPPExtension(ext) and ext != local_cpp_extension: + extra_sources.append(source) + else: + local_files.append(os.path.normpath(os.path.join(self.path, source))) + + # For any generated source, if it is coming from the shared intermediate + # directory then we add a Make rule to copy them to the local intermediate + # directory first. This is because the Android LOCAL_GENERATED_SOURCES + # must be in the local module intermediate directory for the compile rules + # to work properly. If the file has the wrong C++ extension, then we add + # a rule to copy that to intermediates and use the new version. + final_generated_sources = [] + # If a source file gets copied, we still need to add the orginal source + # directory as header search path, for GCC searches headers in the + # directory that contains the source file by default. + origin_src_dirs = [] + for source in extra_sources: + local_file = source + if not '$(gyp_intermediate_dir)/' in local_file: + basename = os.path.basename(local_file) + local_file = '$(gyp_intermediate_dir)/' + basename + (root, ext) = os.path.splitext(local_file) + if IsCPPExtension(ext) and ext != local_cpp_extension: + local_file = root + local_cpp_extension + if local_file != source: + self.WriteLn('%s: %s' % (local_file, self.LocalPathify(source))) + self.WriteLn('\tmkdir -p $(@D); cp $< $@') + origin_src_dirs.append(os.path.dirname(source)) + final_generated_sources.append(local_file) + + # We add back in all of the non-compilable stuff to make sure that the + # make rules have dependencies on them. + final_generated_sources.extend(generated_not_sources) + self.WriteList(final_generated_sources, 'LOCAL_GENERATED_SOURCES') + + origin_src_dirs = gyp.common.uniquer(origin_src_dirs) + origin_src_dirs = map(Sourceify, map(self.LocalPathify, origin_src_dirs)) + self.WriteList(origin_src_dirs, 'GYP_COPIED_SOURCE_ORIGIN_DIRS') + + self.WriteList(local_files, 'LOCAL_SRC_FILES') + + # Write out the flags used to compile the source; this must be done last + # so that GYP_COPIED_SOURCE_ORIGIN_DIRS can be used as an include path. + self.WriteSourceFlags(spec, configs) + + + def ComputeAndroidModule(self, spec): + """Return the Android module name used for a gyp spec. + + We use the complete qualified target name to avoid collisions between + duplicate targets in different directories. We also add a suffix to + distinguish gyp-generated module names. + """ + + if self.type == 'shared_library': + # For reasons of convention, the Android build system requires that all + # shared library modules are named 'libfoo' when generating -l flags. + prefix = 'lib_' + else: + prefix = '' + + if spec['toolset'] == 'host': + suffix = '_host_gyp' + else: + suffix = '_gyp' + + if self.path: + name = '%s%s_%s%s' % (prefix, self.path, self.target, suffix) + else: + name = '%s%s%s' % (prefix, self.target, suffix) + + return make.StringToMakefileVariable(name) + + + def ComputeOutputParts(self, spec): + """Return the 'output basename' of a gyp spec, split into filename + ext. + + Android libraries must be named the same thing as their module name, + otherwise the linker can't find them, so product_name and so on must be + ignored if we are building a library, and the "lib" prepending is + not done for Android. + """ + assert self.type != 'loadable_module' # TODO: not supported? + + target = spec['target_name'] + target_prefix = '' + target_ext = '' + if self.type == 'static_library': + target = self.ComputeAndroidModule(spec) + target_ext = '.a' + elif self.type == 'shared_library': + target = self.ComputeAndroidModule(spec) + target_ext = '.so' + elif self.type == 'none': + target_ext = '.stamp' + elif self.type != 'executable': + print ("ERROR: What output file should be generated?", + "type", self.type, "target", target) + + if self.type != 'static_library' and self.type != 'shared_library': + target_prefix = spec.get('product_prefix', target_prefix) + target = spec.get('product_name', target) + product_ext = spec.get('product_extension') + if product_ext: + target_ext = '.' + product_ext + + target_stem = target_prefix + target + return (target_stem, target_ext) + + + def ComputeOutputBasename(self, spec): + """Return the 'output basename' of a gyp spec. + + E.g., the loadable module 'foobar' in directory 'baz' will produce + 'libfoobar.so' + """ + return ''.join(self.ComputeOutputParts(spec)) + + + def ComputeOutput(self, spec): + """Return the 'output' (full output path) of a gyp spec. + + E.g., the loadable module 'foobar' in directory 'baz' will produce + '$(obj)/baz/libfoobar.so' + """ + if self.type == 'executable' and self.toolset == 'host': + # We install host executables into shared_intermediate_dir so they can be + # run by gyp rules that refer to PRODUCT_DIR. + path = '$(gyp_shared_intermediate_dir)' + elif self.type == 'shared_library': + if self.toolset == 'host': + path = '$(HOST_OUT_INTERMEDIATE_LIBRARIES)' + else: + path = '$(TARGET_OUT_INTERMEDIATE_LIBRARIES)' + else: + # Other targets just get built into their intermediate dir. + if self.toolset == 'host': + path = '$(call intermediates-dir-for,%s,%s,true)' % (self.android_class, + self.android_module) + else: + path = '$(call intermediates-dir-for,%s,%s)' % (self.android_class, + self.android_module) + + assert spec.get('product_dir') is None # TODO: not supported? + return os.path.join(path, self.ComputeOutputBasename(spec)) + + + def NormalizeLdFlags(self, ld_flags): + """ Clean up ldflags from gyp file. + Remove any ldflags that contain android_top_dir. + + Args: + ld_flags: ldflags from gyp files. + + Returns: + clean ldflags + """ + clean_ldflags = [] + for flag in ld_flags: + if self.android_top_dir in flag: + continue + clean_ldflags.append(flag) + return clean_ldflags + + def NormalizeIncludePaths(self, include_paths): + """ Normalize include_paths. + Convert absolute paths to relative to the Android top directory; + filter out include paths that are already brought in by the Android build + system. + + Args: + include_paths: A list of unprocessed include paths. + Returns: + A list of normalized include paths. + """ + normalized = [] + for path in include_paths: + if path[0] == '/': + path = gyp.common.RelativePath(path, self.android_top_dir) + + # Filter out the Android standard search path. + if path not in android_standard_include_paths: + normalized.append(path) + return normalized + + def ExtractIncludesFromCFlags(self, cflags): + """Extract includes "-I..." out from cflags + + Args: + cflags: A list of compiler flags, which may be mixed with "-I.." + Returns: + A tuple of lists: (clean_clfags, include_paths). "-I.." is trimmed. + """ + clean_cflags = [] + include_paths = [] + if cflags: + for flag in cflags: + if flag.startswith('-I'): + include_paths.append(flag[2:]) + else: + clean_cflags.append(flag) + + return (clean_cflags, include_paths) + + def ComputeAndroidLibraryModuleNames(self, libraries): + """Compute the Android module names from libraries, ie spec.get('libraries') + + Args: + libraries: the value of spec.get('libraries') + Returns: + A tuple (static_lib_modules, dynamic_lib_modules) + """ + static_lib_modules = [] + dynamic_lib_modules = [] + for libs in libraries: + # Libs can have multiple words. + for lib in libs.split(): + # Filter the system libraries, which are added by default by the Android + # build system. + if (lib == '-lc' or lib == '-lstdc++' or lib == '-lm' or + lib.endswith('libgcc.a')): + continue + match = re.search(r'([^/]+)\.a$', lib) + if match: + static_lib_modules.append(match.group(1)) + continue + match = re.search(r'([^/]+)\.so$', lib) + if match: + dynamic_lib_modules.append(match.group(1)) + continue + # "-lstlport" -> libstlport + if lib.startswith('-l'): + if lib.endswith('_static'): + static_lib_modules.append('lib' + lib[2:]) + else: + dynamic_lib_modules.append('lib' + lib[2:]) + return (static_lib_modules, dynamic_lib_modules) + + + def ComputeDeps(self, spec): + """Compute the dependencies of a gyp spec. + + Returns a tuple (deps, link_deps), where each is a list of + filenames that will need to be put in front of make for either + building (deps) or linking (link_deps). + """ + deps = [] + link_deps = [] + if 'dependencies' in spec: + deps.extend([target_outputs[dep] for dep in spec['dependencies'] + if target_outputs[dep]]) + for dep in spec['dependencies']: + if dep in target_link_deps: + link_deps.append(target_link_deps[dep]) + deps.extend(link_deps) + return (gyp.common.uniquer(deps), gyp.common.uniquer(link_deps)) + + + def WriteTargetFlags(self, spec, configs, link_deps): + """Write Makefile code to specify the link flags and library dependencies. + + spec, configs: input from gyp. + link_deps: link dependency list; see ComputeDeps() + """ + config = configs[spec['default_configuration']] + + # LDFLAGS + ldflags = list(config.get('ldflags', [])) + static_flags, dynamic_flags = self.ComputeAndroidLibraryModuleNames( + ldflags) + self.WriteLn('') + self.WriteList(self.NormalizeLdFlags(ldflags), 'LOCAL_LDFLAGS') + + # Libraries (i.e. -lfoo) + libraries = gyp.common.uniquer(spec.get('libraries', [])) + static_libs, dynamic_libs = self.ComputeAndroidLibraryModuleNames( + libraries) + + # Link dependencies (i.e. libfoo.a, libfoo.so) + static_link_deps = [x[1] for x in link_deps if x[0] == 'static'] + shared_link_deps = [x[1] for x in link_deps if x[0] == 'shared'] + self.WriteLn('') + self.WriteList(static_flags + static_libs + static_link_deps, + 'LOCAL_STATIC_LIBRARIES') + self.WriteLn('# Enable grouping to fix circular references') + self.WriteLn('LOCAL_GROUP_STATIC_LIBRARIES := true') + self.WriteLn('') + self.WriteList(dynamic_flags + dynamic_libs + shared_link_deps, + 'LOCAL_SHARED_LIBRARIES') + + + def WriteTarget(self, spec, configs, deps, link_deps, part_of_all): + """Write Makefile code to produce the final target of the gyp spec. + + spec, configs: input from gyp. + deps, link_deps: dependency lists; see ComputeDeps() + part_of_all: flag indicating this target is part of 'all' + """ + self.WriteLn('### Rules for final target.') + + if self.type != 'none': + self.WriteTargetFlags(spec, configs, link_deps) + + # Add to the set of targets which represent the gyp 'all' target. We use the + # name 'gyp_all_modules' as the Android build system doesn't allow the use + # of the Make target 'all' and because 'all_modules' is the equivalent of + # the Make target 'all' on Android. + if part_of_all: + self.WriteLn('# Add target alias to "gyp_all_modules" target.') + self.WriteLn('.PHONY: gyp_all_modules') + self.WriteLn('gyp_all_modules: %s' % self.android_module) + self.WriteLn('') + + # Add an alias from the gyp target name to the Android module name. This + # simplifies manual builds of the target, and is required by the test + # framework. + self.WriteLn('# Alias gyp target name.') + self.WriteLn('.PHONY: %s' % self.target) + self.WriteLn('%s: %s' % (self.target, self.android_module)) + self.WriteLn('') + + # Add the command to trigger build of the target type depending + # on the toolset. Ex: BUILD_STATIC_LIBRARY vs. BUILD_HOST_STATIC_LIBRARY + # NOTE: This has to come last! + modifier = '' + if self.toolset == 'host': + modifier = 'HOST_' + if self.type == 'static_library': + self.WriteLn('include $(BUILD_%sSTATIC_LIBRARY)' % modifier) + elif self.type == 'shared_library': + self.WriteLn('LOCAL_PRELINK_MODULE := false') + self.WriteLn('include $(BUILD_%sSHARED_LIBRARY)' % modifier) + elif self.type == 'executable': + if self.toolset == 'host': + self.WriteLn('LOCAL_MODULE_PATH := $(gyp_shared_intermediate_dir)') + else: + # Don't install target executables for now, as it results in them being + # included in ROM. This can be revisited if there's a reason to install + # them later. + self.WriteLn('LOCAL_UNINSTALLABLE_MODULE := true') + self.WriteLn('include $(BUILD_%sEXECUTABLE)' % modifier) + else: + self.WriteLn('LOCAL_MODULE_PATH := $(PRODUCT_OUT)/gyp_stamp') + self.WriteLn('LOCAL_UNINSTALLABLE_MODULE := true') + self.WriteLn() + self.WriteLn('include $(BUILD_SYSTEM)/base_rules.mk') + self.WriteLn() + self.WriteLn('$(LOCAL_BUILT_MODULE): $(LOCAL_ADDITIONAL_DEPENDENCIES)') + self.WriteLn('\t$(hide) echo "Gyp timestamp: $@"') + self.WriteLn('\t$(hide) mkdir -p $(dir $@)') + self.WriteLn('\t$(hide) touch $@') + + + def WriteList(self, value_list, variable=None, prefix='', + quoter=make.QuoteIfNecessary, local_pathify=False): + """Write a variable definition that is a list of values. + + E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out + foo = blaha blahb + but in a pretty-printed style. + """ + values = '' + if value_list: + value_list = [quoter(prefix + l) for l in value_list] + if local_pathify: + value_list = [self.LocalPathify(l) for l in value_list] + values = ' \\\n\t' + ' \\\n\t'.join(value_list) + self.fp.write('%s :=%s\n\n' % (variable, values)) + + + def WriteLn(self, text=''): + self.fp.write(text + '\n') + + + def LocalPathify(self, path): + """Convert a subdirectory-relative path into a normalized path which starts + with the make variable $(LOCAL_PATH) (i.e. the top of the project tree). + Absolute paths, or paths that contain variables, are just normalized.""" + if '$(' in path or os.path.isabs(path): + # path is not a file in the project tree in this case, but calling + # normpath is still important for trimming trailing slashes. + return os.path.normpath(path) + local_path = os.path.join('$(LOCAL_PATH)', self.path, path) + local_path = os.path.normpath(local_path) + # Check that normalizing the path didn't ../ itself out of $(LOCAL_PATH) + # - i.e. that the resulting path is still inside the project tree. The + # path may legitimately have ended up containing just $(LOCAL_PATH), though, + # so we don't look for a slash. + assert local_path.startswith('$(LOCAL_PATH)'), ( + 'Path %s attempts to escape from gyp path %s !)' % (path, self.path)) + return local_path + + + def ExpandInputRoot(self, template, expansion, dirname): + if '%(INPUT_ROOT)s' not in template and '%(INPUT_DIRNAME)s' not in template: + return template + path = template % { + 'INPUT_ROOT': expansion, + 'INPUT_DIRNAME': dirname, + } + return path + + +def WriteAutoRegenerationRule(params, root_makefile, makefile_name, + build_files): + """Write the target to regenerate the Makefile.""" + options = params['options'] + # Sort to avoid non-functional changes to makefile. + build_files = sorted([os.path.join('$(LOCAL_PATH)', f) for f in build_files]) + build_files_args = [gyp.common.RelativePath(filename, options.toplevel_dir) + for filename in params['build_files_arg']] + build_files_args = [os.path.join('$(PRIVATE_LOCAL_PATH)', f) + for f in build_files_args] + gyp_binary = gyp.common.FixIfRelativePath(params['gyp_binary'], + options.toplevel_dir) + makefile_path = os.path.join('$(LOCAL_PATH)', makefile_name) + if not gyp_binary.startswith(os.sep): + gyp_binary = os.path.join('.', gyp_binary) + root_makefile.write('GYP_FILES := \\\n %s\n\n' % + '\\\n '.join(map(Sourceify, build_files))) + root_makefile.write('%s: PRIVATE_LOCAL_PATH := $(LOCAL_PATH)\n' % + makefile_path) + root_makefile.write('%s: $(GYP_FILES)\n' % makefile_path) + root_makefile.write('\techo ACTION Regenerating $@\n\t%s\n\n' % + gyp.common.EncodePOSIXShellList([gyp_binary, '-fandroid'] + + gyp.RegenerateFlags(options) + + build_files_args)) + + +def GenerateOutput(target_list, target_dicts, data, params): + options = params['options'] + generator_flags = params.get('generator_flags', {}) + builddir_name = generator_flags.get('output_dir', 'out') + limit_to_target_all = generator_flags.get('limit_to_target_all', False) + android_top_dir = os.environ.get('ANDROID_BUILD_TOP') + assert android_top_dir, '$ANDROID_BUILD_TOP not set; you need to run lunch.' + + def CalculateMakefilePath(build_file, base_name): + """Determine where to write a Makefile for a given gyp file.""" + # Paths in gyp files are relative to the .gyp file, but we want + # paths relative to the source root for the master makefile. Grab + # the path of the .gyp file as the base to relativize against. + # E.g. "foo/bar" when we're constructing targets for "foo/bar/baz.gyp". + base_path = gyp.common.RelativePath(os.path.dirname(build_file), + options.depth) + # We write the file in the base_path directory. + output_file = os.path.join(options.depth, base_path, base_name) + assert not options.generator_output, ( + 'The Android backend does not support options.generator_output.') + base_path = gyp.common.RelativePath(os.path.dirname(build_file), + options.toplevel_dir) + return base_path, output_file + + # TODO: search for the first non-'Default' target. This can go + # away when we add verification that all targets have the + # necessary configurations. + default_configuration = None + toolsets = set([target_dicts[target]['toolset'] for target in target_list]) + for target in target_list: + spec = target_dicts[target] + if spec['default_configuration'] != 'Default': + default_configuration = spec['default_configuration'] + break + if not default_configuration: + default_configuration = 'Default' + + srcdir = '.' + makefile_name = 'GypAndroid.mk' + options.suffix + makefile_path = os.path.join(options.toplevel_dir, makefile_name) + assert not options.generator_output, ( + 'The Android backend does not support options.generator_output.') + make.ensure_directory_exists(makefile_path) + root_makefile = open(makefile_path, 'w') + + root_makefile.write(header) + + # We set LOCAL_PATH just once, here, to the top of the project tree. This + # allows all the other paths we use to be relative to the Android.mk file, + # as the Android build system expects. + root_makefile.write('\nLOCAL_PATH := $(call my-dir)\n') + + # Find the list of targets that derive from the gyp file(s) being built. + needed_targets = set() + for build_file in params['build_files']: + for target in gyp.common.AllTargets(target_list, target_dicts, build_file): + needed_targets.add(target) + + build_files = set() + include_list = set() + android_modules = {} + for qualified_target in target_list: + build_file, target, toolset = gyp.common.ParseQualifiedTarget( + qualified_target) + build_files.add(gyp.common.RelativePath(build_file, options.toplevel_dir)) + included_files = data[build_file]['included_files'] + for included_file in included_files: + # The included_files entries are relative to the dir of the build file + # that included them, so we have to undo that and then make them relative + # to the root dir. + relative_include_file = gyp.common.RelativePath( + gyp.common.UnrelativePath(included_file, build_file), + options.toplevel_dir) + abs_include_file = os.path.abspath(relative_include_file) + # If the include file is from the ~/.gyp dir, we should use absolute path + # so that relocating the src dir doesn't break the path. + if (params['home_dot_gyp'] and + abs_include_file.startswith(params['home_dot_gyp'])): + build_files.add(abs_include_file) + else: + build_files.add(relative_include_file) + + base_path, output_file = CalculateMakefilePath(build_file, + target + '.' + toolset + options.suffix + '.mk') + + spec = target_dicts[qualified_target] + configs = spec['configurations'] + + part_of_all = (qualified_target in needed_targets and + not int(spec.get('suppress_wildcard', False))) + if limit_to_target_all and not part_of_all: + continue + writer = AndroidMkWriter(android_top_dir) + android_module = writer.Write(qualified_target, base_path, output_file, + spec, configs, part_of_all=part_of_all) + if android_module in android_modules: + print ('ERROR: Android module names must be unique. The following ' + 'targets both generate Android module name %s.\n %s\n %s' % + (android_module, android_modules[android_module], + qualified_target)) + return + android_modules[android_module] = qualified_target + + # Our root_makefile lives at the source root. Compute the relative path + # from there to the output_file for including. + mkfile_rel_path = gyp.common.RelativePath(output_file, + os.path.dirname(makefile_path)) + include_list.add(mkfile_rel_path) + + # Some tools need to know the absolute path of the top directory. + root_makefile.write('GYP_ABS_ANDROID_TOP_DIR := $(shell pwd)\n') + + # Write out the sorted list of includes. + root_makefile.write('\n') + for include_file in sorted(include_list): + root_makefile.write('include $(LOCAL_PATH)/' + include_file + '\n') + root_makefile.write('\n') + + if generator_flags.get('auto_regeneration', True): + WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) + + root_makefile.write(SHARED_FOOTER) + + root_makefile.close() diff --git a/tools/gyp/pylib/gyp/generator/eclipse.py b/tools/gyp/pylib/gyp/generator/eclipse.py index 5e16c02739d..0f90b5ea608 100644 --- a/tools/gyp/pylib/gyp/generator/eclipse.py +++ b/tools/gyp/pylib/gyp/generator/eclipse.py @@ -17,6 +17,7 @@ still result in a few indexer issues here and there. This generator has no automated tests, so expect it to be broken. """ +from xml.sax.saxutils import escape import os.path import subprocess import gyp @@ -36,7 +37,8 @@ for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME', 'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT', 'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX', 'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX', - 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX']: + 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX', + 'CONFIGURATION_NAME']: generator_default_variables[unused] = '' # Include dirs will occasionaly use the SHARED_INTERMEDIATE_DIR variable as @@ -216,7 +218,7 @@ def WriteMacros(out, eclipse_langs, defines): out.write(' <language name="%s">\n' % lang) for key in sorted(defines.iterkeys()): out.write(' <macro><name>%s</name><value>%s</value></macro>\n' % - (key, defines[key])) + (escape(key), escape(defines[key]))) out.write(' </language>\n') out.write(' </section>\n') diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py index 2b7f7293403..4648bd9b278 100644 --- a/tools/gyp/pylib/gyp/generator/make.py +++ b/tools/gyp/pylib/gyp/generator/make.py @@ -21,13 +21,14 @@ # toplevel Makefile. It may make sense to generate some .mk files on # the side to keep the the files readable. +import os +import re +import sys import gyp import gyp.common import gyp.system_test import gyp.xcode_emulation -import os -import re -import sys +from gyp.common import GetEnvironFallback generator_default_variables = { 'EXECUTABLE_PREFIX': '', @@ -60,7 +61,6 @@ generator_extra_sources_for_rules = [] def CalculateVariables(default_variables, params): """Calculate additional variables for use in the build (called by gyp).""" - cc_target = os.environ.get('CC.target', os.environ.get('CC', 'cc')) flavor = gyp.common.GetFlavor(params) if flavor == 'mac': default_variables.setdefault('OS', 'mac') @@ -255,11 +255,11 @@ all_deps := # This will allow make to invoke N linker processes as specified in -jN. LINK ?= %(flock)s $(builddir)/linker.lock $(CXX) -CC.target ?= $(CC) +CC.target ?= %(CC.target)s CFLAGS.target ?= $(CFLAGS) -CXX.target ?= $(CXX) +CXX.target ?= %(CXX.target)s CXXFLAGS.target ?= $(CXXFLAGS) -LINK.target ?= $(LINK) +LINK.target ?= %(LINK.target)s LDFLAGS.target ?= $(LDFLAGS) AR.target ?= $(AR) ARFLAGS.target ?= %(ARFLAGS.target)s @@ -268,13 +268,13 @@ ARFLAGS.target ?= %(ARFLAGS.target)s # in gyp's make.py where ARFLAGS.host etc. is computed. # TODO(evan): move all cross-compilation logic to gyp-time so we don't need # to replicate this environment fallback in make as well. -CC.host ?= gcc +CC.host ?= %(CC.host)s CFLAGS.host ?= -CXX.host ?= g++ +CXX.host ?= %(CXX.host)s CXXFLAGS.host ?= -LINK.host ?= g++ +LINK.host ?= %(LINK.host)s LDFLAGS.host ?= -AR.host ?= ar +AR.host ?= %(AR.host)s ARFLAGS.host := %(ARFLAGS.host)s # Define a dir function that can handle spaces. @@ -1590,18 +1590,19 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD phony = True) - def WriteList(self, list, variable=None, prefix='', quoter=QuoteIfNecessary): + def WriteList(self, value_list, variable=None, prefix='', + quoter=QuoteIfNecessary): """Write a variable definition that is a list of values. E.g. WriteList(['a','b'], 'foo', prefix='blah') writes out foo = blaha blahb but in a pretty-printed style. """ - self.fp.write(variable + " := ") - if list: - list = [quoter(prefix + l) for l in list] - self.fp.write(" \\\n\t".join(list)) - self.fp.write("\n\n") + values = '' + if value_list: + value_list = [quoter(prefix + l) for l in value_list] + values = ' \\\n\t' + ' \\\n\t'.join(value_list) + self.fp.write('%s :=%s\n\n' % (variable, values)) def WriteDoCmd(self, outputs, inputs, command, part_of_all, comment=None, @@ -1810,8 +1811,9 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)/%%%s FORCE_DO_CMD """Convert a path to its output directory form.""" if '$(' in path: path = path.replace('$(obj)/', '$(obj).%s/$(TARGET)/' % self.toolset) - return path - return '$(obj).%s/$(TARGET)/%s' % (self.toolset, path) + if not '$(obj)' in path: + path = '$(obj).%s/$(TARGET)/%s' % (self.toolset, path) + return path def Pchify(self, path, lang): @@ -1890,8 +1892,8 @@ def RunSystemTests(flavor): # Compute flags used for building static archives. # N.B.: this fallback logic should match the logic in SHARED_HEADER. # See comment there for more details. - ar_target = os.environ.get('AR.target', os.environ.get('AR', 'ar')) - cc_target = os.environ.get('CC.target', os.environ.get('CC', 'cc')) + ar_target = GetEnvironFallback(('AR_target', 'AR'), 'ar') + cc_target = GetEnvironFallback(('CC_target', 'CC'), 'cc') arflags_target = 'crs' # ar -T enables thin archives on Linux. OS X's ar supports a -T flag, but it # does something useless (it limits filenames in the archive to 15 chars). @@ -1899,12 +1901,12 @@ def RunSystemTests(flavor): cc_command=cc_target): arflags_target = 'crsT' - ar_host = os.environ.get('AR.host', 'ar') - cc_host = os.environ.get('CC.host', 'gcc') + ar_host = os.environ.get('AR_host', 'ar') + cc_host = os.environ.get('CC_host', 'gcc') arflags_host = 'crs' # It feels redundant to compute this again given that most builds aren't - # cross-compiles, but due to quirks of history CC.host defaults to 'gcc' - # while CC.target defaults to 'cc', so the commands really are different + # cross-compiles, but due to quirks of history CC_host defaults to 'gcc' + # while CC_target defaults to 'cc', so the commands really are different # even though they're nearly guaranteed to run the same code underneath. if flavor != 'mac' and gyp.system_test.TestArSupportsT(ar_command=ar_host, cc_command=cc_host): @@ -1993,18 +1995,29 @@ def GenerateOutput(target_list, target_dicts, data, params): header_params.update({ 'flock': 'lockf', }) + header_params.update(RunSystemTests(flavor)) + header_params.update({ + 'CC.target': GetEnvironFallback(('CC_target', 'CC'), '$(CC)'), + 'AR.target': GetEnvironFallback(('AR_target', 'AR'), '$(AR)'), + 'CXX.target': GetEnvironFallback(('CXX_target', 'CXX'), '$(CXX)'), + 'LINK.target': GetEnvironFallback(('LD_target', 'LD'), '$(LINK)'), + 'CC.host': GetEnvironFallback(('CC_host',), 'gcc'), + 'AR.host': GetEnvironFallback(('AR_host',), 'ar'), + 'CXX.host': GetEnvironFallback(('CXX_host',), 'g++'), + 'LINK.host': GetEnvironFallback(('LD_host',), 'g++'), + }) build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) - make_global_settings_dict = data[build_file].get('make_global_settings', {}) + make_global_settings_array = data[build_file].get('make_global_settings', []) make_global_settings = '' - for key, value in make_global_settings_dict: + for key, value in make_global_settings_array: if value[0] != '$': value = '$(abspath %s)' % value if key == 'LINK': make_global_settings += ('%s ?= %s $(builddir)/linker.lock %s\n' % (key, flock_command, value)) - elif key in ['CC', 'CXX']: + elif key in ('CC', 'CC.host', 'CXX', 'CXX.host'): make_global_settings += ( 'ifneq (,$(filter $(origin %s), undefined default))\n' % key) # Let gyp-time envvars win over global settings. @@ -2046,8 +2059,8 @@ def GenerateOutput(target_list, target_dicts, data, params): build_file, target, toolset = gyp.common.ParseQualifiedTarget( qualified_target) - this_make_global_settings = data[build_file].get('make_global_settings', {}) - assert make_global_settings_dict == this_make_global_settings, ( + this_make_global_settings = data[build_file].get('make_global_settings', []) + assert make_global_settings_array == this_make_global_settings, ( "make_global_settings needs to be the same for all targets.") build_files.add(gyp.common.RelativePath(build_file, options.toplevel_dir)) @@ -2123,7 +2136,8 @@ def GenerateOutput(target_list, target_dicts, data, params): root_makefile.write("endif\n") root_makefile.write('\n') - if generator_flags.get('auto_regeneration', True): + if (not generator_flags.get('standalone') + and generator_flags.get('auto_regeneration', True)): WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) root_makefile.write(SHARED_FOOTER) diff --git a/tools/gyp/pylib/gyp/generator/msvs.py b/tools/gyp/pylib/gyp/generator/msvs.py index cca04e14aca..70152486bf6 100644 --- a/tools/gyp/pylib/gyp/generator/msvs.py +++ b/tools/gyp/pylib/gyp/generator/msvs.py @@ -39,10 +39,10 @@ generator_default_variables = { 'STATIC_LIB_SUFFIX': '.lib', 'SHARED_LIB_SUFFIX': '.dll', 'INTERMEDIATE_DIR': '$(IntDir)', - 'SHARED_INTERMEDIATE_DIR': '$(OutDir)/obj/global_intermediate', + 'SHARED_INTERMEDIATE_DIR': '$(OutDir)obj/global_intermediate', 'OS': 'win', 'PRODUCT_DIR': '$(OutDir)', - 'LIB_DIR': '$(OutDir)\\lib', + 'LIB_DIR': '$(OutDir)lib', 'RULE_INPUT_ROOT': '$(InputName)', 'RULE_INPUT_DIRNAME': '$(InputDir)', 'RULE_INPUT_EXT': '$(InputExt)', @@ -268,8 +268,7 @@ def _BuildCommandLineForRuleRaw(spec, cmd, cygwin_shell, has_input_path, direct_cmd = [i.replace('$(InputPath)', '`cygpath -m "${INPUTPATH}"`') for i in direct_cmd] - direct_cmd = ['"%s"' % i for i in direct_cmd] - direct_cmd = [i.replace('"', '\\"') for i in direct_cmd] + direct_cmd = ['\\"%s\\"' % i.replace('"', '\\\\\\"') for i in direct_cmd] #direct_cmd = gyp.common.EncodePOSIXShellList(direct_cmd) direct_cmd = ' '.join(direct_cmd) # TODO(quote): regularize quoting path names throughout the module @@ -295,10 +294,19 @@ def _BuildCommandLineForRuleRaw(spec, cmd, cygwin_shell, has_input_path, command = ['type'] else: command = [cmd[0].replace('/', '\\')] + # Add call before command to ensure that commands can be tied together one + # after the other without aborting in Incredibuild, since IB makes a bat + # file out of the raw command string, and some commands (like python) are + # actually batch files themselves. + command.insert(0, 'call') # Fix the paths - # If the argument starts with a slash, it's probably a command line switch - arguments = [i.startswith('/') and i or _FixPath(i) for i in cmd[1:]] + # TODO(quote): This is a really ugly heuristic, and will miss path fixing + # for arguments like "--arg=path" or "/opt:path". + # If the argument starts with a slash or dash, it's probably a command line + # switch + arguments = [i if (i[:1] in "/-") else _FixPath(i) for i in cmd[1:]] arguments = [i.replace('$(InputDir)','%INPUTDIR%') for i in arguments] + arguments = [MSVSSettings.FixVCMacroSlashes(i) for i in arguments] if quote_cmd: # Support a mode for using cmd directly. # Convert any paths to native form (first element is used directly). @@ -830,18 +838,22 @@ def _GetGuidOfProject(proj_path, spec): return guid -def _GetMsbuildToolsetOfProject(proj_path, spec): +def _GetMsbuildToolsetOfProject(proj_path, spec, version): """Get the platform toolset for the project. Arguments: proj_path: Path of the vcproj or vcxproj file to generate. spec: The target dictionary containing the properties of the target. + version: The MSVSVersion object. Returns: the platform toolset string or None. """ # Pluck out the default configuration. default_config = _GetDefaultConfiguration(spec) - return default_config.get('msbuild_toolset') + toolset = default_config.get('msbuild_toolset') + if not toolset and version.DefaultToolset(): + toolset = version.DefaultToolset() + return toolset def _GenerateProject(project, options, version, generator_flags): @@ -896,7 +908,8 @@ def _GenerateMSVSProject(project, options, version, generator_flags): # Prepare list of sources and excluded sources. gyp_file = os.path.split(project.build_file)[1] - sources, excluded_sources = _PrepareListOfSources(spec, gyp_file) + sources, excluded_sources = _PrepareListOfSources(spec, generator_flags, + gyp_file) # Add rules. actions_to_add = {} @@ -1046,7 +1059,7 @@ def _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config): defines) # Change program database directory to prevent collisions. _ToolAppend(tools, 'VCCLCompilerTool', 'ProgramDataBaseFileName', - '$(IntDir)\\$(ProjectName)\\vc80.pdb', only_if_unset=True) + '$(IntDir)$(ProjectName)\\vc80.pdb', only_if_unset=True) # Add disabled warnings. _ToolAppend(tools, 'VCCLCompilerTool', 'DisableSpecificWarnings', disabled_warnings) @@ -1133,10 +1146,10 @@ def _GetOutputFilePathAndTool(spec): vc_tool = '' msbuild_tool = '' output_file_map = { - 'executable': ('VCLinkerTool', 'Link', '$(OutDir)\\', '.exe'), - 'shared_library': ('VCLinkerTool', 'Link', '$(OutDir)\\', '.dll'), - 'loadable_module': ('VCLinkerTool', 'Link', '$(OutDir)\\', '.dll'), - 'static_library': ('VCLibrarianTool', 'Lib', '$(OutDir)\\lib\\', '.lib'), + 'executable': ('VCLinkerTool', 'Link', '$(OutDir)', '.exe'), + 'shared_library': ('VCLinkerTool', 'Link', '$(OutDir)', '.dll'), + 'loadable_module': ('VCLinkerTool', 'Link', '$(OutDir)', '.dll'), + 'static_library': ('VCLibrarianTool', 'Lib', '$(OutDir)lib\\', '.lib'), } output_file_props = output_file_map.get(spec['type']) if output_file_props and int(spec.get('msvs_auto_output_file', 1)): @@ -1249,9 +1262,13 @@ def _GetMSVSAttributes(spec, config, config_type): prepared_attrs['ConfigurationType'] = config_type output_dir = prepared_attrs.get('OutputDirectory', '$(SolutionDir)$(ConfigurationName)') - prepared_attrs['OutputDirectory'] = output_dir + prepared_attrs['OutputDirectory'] = _FixPath(output_dir) + '\\' if 'IntermediateDirectory' not in prepared_attrs: intermediate = '$(ConfigurationName)\\obj\\$(ProjectName)' + prepared_attrs['IntermediateDirectory'] = _FixPath(intermediate) + '\\' + else: + intermediate = _FixPath(prepared_attrs['IntermediateDirectory']) + '\\' + intermediate = MSVSSettings.FixVCMacroSlashes(intermediate) prepared_attrs['IntermediateDirectory'] = intermediate return prepared_attrs @@ -1261,7 +1278,7 @@ def _AddNormalizedSources(sources_set, sources_array): sources_set.update(set(sources)) -def _PrepareListOfSources(spec, gyp_file): +def _PrepareListOfSources(spec, generator_flags, gyp_file): """Prepare list of sources and excluded sources. Besides the sources specified directly in the spec, adds the gyp file so @@ -1280,7 +1297,8 @@ def _PrepareListOfSources(spec, gyp_file): _AddNormalizedSources(sources, spec.get('sources', [])) excluded_sources = set() # Add in the gyp file. - sources.add(gyp_file) + if not generator_flags.get('standalone'): + sources.add(gyp_file) # Add in 'action' inputs and outputs. for a in spec.get('actions', []): @@ -1598,7 +1616,7 @@ def _GetPathOfProject(qualified_target, spec, options, msvs_version): msvs_version.ProjectExtension()) build_file = gyp.common.BuildFile(qualified_target) - proj_path = os.path.join(os.path.split(build_file)[0], proj_filename) + proj_path = os.path.join(os.path.dirname(build_file), proj_filename) fix_prefix = None if options.generator_output: project_dir_path = os.path.dirname(os.path.abspath(proj_path)) @@ -1657,7 +1675,8 @@ def _CreateProjectObjects(target_list, target_dicts, options, msvs_version): fixpath_prefix=fixpath_prefix) # Set project toolset if any (MS build only) if msvs_version.UsesVcxproj(): - obj.set_msbuild_toolset(_GetMsbuildToolsetOfProject(proj_path, spec)) + obj.set_msbuild_toolset( + _GetMsbuildToolsetOfProject(proj_path, spec, msvs_version)) projects[qualified_target] = obj # Set all the dependencies for project in projects.values(): @@ -1804,9 +1823,9 @@ def GenerateOutput(target_list, target_dicts, data, params): for build_file in data: # Validate build_file extension - if build_file[-4:] != '.gyp': + if not build_file.endswith('.gyp'): continue - sln_path = build_file[:-4] + options.suffix + '.sln' + sln_path = os.path.splitext(build_file)[0] + options.suffix + '.sln' if options.generator_output: sln_path = os.path.join(options.generator_output, sln_path) # Get projects in the solution, and their dependents. @@ -1856,7 +1875,7 @@ def _GenerateMSBuildFiltersFile(filters_path, source_files, ['ItemGroup'] + filter_group, ['ItemGroup'] + source_group ] - easy_xml.WriteXmlIfChanged(content, filters_path) + easy_xml.WriteXmlIfChanged(content, filters_path, pretty=True, win32=True) elif os.path.exists(filters_path): # We don't need this filter anymore. Delete the old filter file. os.unlink(filters_path) @@ -2057,7 +2076,7 @@ def _GenerateMSBuildRulePropsFile(props_path, msbuild_rules): ], ] ]) - easy_xml.WriteXmlIfChanged(content, props_path) + easy_xml.WriteXmlIfChanged(content, props_path, pretty=True, win32=True) def _GenerateMSBuildRuleTargetsFile(targets_path, msbuild_rules): @@ -2219,7 +2238,7 @@ def _GenerateMSBuildRuleTargetsFile(targets_path, msbuild_rules): ] ], ]) - easy_xml.WriteXmlIfChanged(content, targets_path) + easy_xml.WriteXmlIfChanged(content, targets_path, pretty=True, win32=True) def _GenerateMSBuildRuleXmlFile(xml_path, msbuild_rules): @@ -2397,7 +2416,7 @@ def _GenerateMSBuildRuleXmlFile(xml_path, msbuild_rules): } ] ]) - easy_xml.WriteXmlIfChanged(content, xml_path) + easy_xml.WriteXmlIfChanged(content, xml_path, pretty=True, win32=True) def _GetConfigurationAndPlatform(name, settings): @@ -2505,9 +2524,6 @@ def _GetMSBuildPropertySheets(configurations): return sheets def _ConvertMSVSBuildAttributes(spec, config, build_file): - - - config_type = _GetMSVSConfigurationType(spec, build_file) msvs_attributes = _GetMSVSAttributes(spec, config, config_type) msbuild_attributes = {} @@ -2558,10 +2574,10 @@ def _GetMSBuildAttributes(spec, config, build_file): msbuild_attributes['ConfigurationType'] = config_type output_dir = msbuild_attributes.get('OutputDirectory', '$(SolutionDir)$(Configuration)\\') - msbuild_attributes['OutputDirectory'] = output_dir + msbuild_attributes['OutputDirectory'] = _FixPath(output_dir) if 'IntermediateDirectory' not in msbuild_attributes: intermediate = '$(Configuration)\\' - msbuild_attributes['IntermediateDirectory'] = intermediate + msbuild_attributes['IntermediateDirectory'] = _FixPath(intermediate) if 'CharacterSet' in msbuild_attributes: msbuild_attributes['CharacterSet'] = _ConvertMSVSCharacterSet( msbuild_attributes['CharacterSet']) @@ -2584,7 +2600,7 @@ def _GetMSBuildAttributes(spec, config, build_file): msbuild_settings = config['finalized_msbuild_settings'] out_file = msbuild_settings[msbuild_tool].get('OutputFile') if out_file: - msbuild_attributes['TargetPath'] = out_file + msbuild_attributes['TargetPath'] = _FixPath(out_file) return msbuild_attributes @@ -2960,7 +2976,8 @@ def _GenerateMSBuildProject(project, options, version, generator_flags): relative_path_of_gyp_file = gyp.common.RelativePath(gyp_path, project_dir) gyp_file = os.path.split(project.build_file)[1] - sources, excluded_sources = _PrepareListOfSources(spec, gyp_file) + sources, excluded_sources = _PrepareListOfSources(spec, generator_flags, + gyp_file) # Add rules. actions_to_add = {} props_files_of_rules = set() @@ -3034,7 +3051,7 @@ def _GenerateMSBuildProject(project, options, version, generator_flags): # TODO(jeanluc) File a bug to get rid of runas. We had in MSVS: # has_run_as = _WriteMSVSUserFile(project.path, version, spec) - easy_xml.WriteXmlIfChanged(content, project.path) + easy_xml.WriteXmlIfChanged(content, project.path, pretty=True, win32=True) return missing_sources diff --git a/tools/gyp/pylib/gyp/generator/ninja.py b/tools/gyp/pylib/gyp/generator/ninja.py index 6f6fc5bb643..d2b8fdce1cb 100644 --- a/tools/gyp/pylib/gyp/generator/ninja.py +++ b/tools/gyp/pylib/gyp/generator/ninja.py @@ -3,18 +3,19 @@ # found in the LICENSE file. import copy +import hashlib +import os.path +import re +import subprocess +import sys import gyp import gyp.common import gyp.msvs_emulation import gyp.MSVSVersion import gyp.system_test import gyp.xcode_emulation -import hashlib -import os.path -import re -import subprocess -import sys +from gyp.common import GetEnvironFallback import gyp.ninja_syntax as ninja_syntax generator_default_variables = { @@ -27,14 +28,18 @@ generator_default_variables = { # Gyp expects the following variables to be expandable by the build # system to the appropriate locations. Ninja prefers paths to be # known at gyp time. To resolve this, introduce special - # variables starting with $! (which begin with a $ so gyp knows it - # should be treated as a path, but is otherwise an invalid + # variables starting with $! and $| (which begin with a $ so gyp knows it + # should be treated specially, but is otherwise an invalid # ninja/shell variable) that are passed to gyp here but expanded # before writing out into the target .ninja files; see # ExpandSpecial. + # $! is used for variables that represent a path and that can only appear at + # the start of a string, while $| is used for variables that can appear + # anywhere in a string. 'INTERMEDIATE_DIR': '$!INTERMEDIATE_DIR', 'SHARED_INTERMEDIATE_DIR': '$!PRODUCT_DIR/gen', 'PRODUCT_DIR': '$!PRODUCT_DIR', + 'CONFIGURATION_NAME': '$|CONFIGURATION_NAME', # Special variables that may be used by gyp 'rule' targets. # We generate definitions for these variables on the fly when processing a @@ -54,7 +59,12 @@ generator_extra_sources_for_rules = [] # TODO: figure out how to not build extra host objects in the non-cross-compile # case when this is enabled, and enable unconditionally. generator_supports_multiple_toolsets = ( - os.environ.get('AR_target') or os.environ.get('CC_target') or + os.environ.get('GYP_CROSSCOMPILE') or + os.environ.get('AR_host') or + os.environ.get('CC_host') or + os.environ.get('CXX_host') or + os.environ.get('AR_target') or + os.environ.get('CC_target') or os.environ.get('CXX_target')) @@ -258,6 +268,10 @@ class NinjaWriter: # so insert product_dir in front if it is provided. path = path.replace(INTERMEDIATE_DIR, os.path.join(product_dir or '', int_dir)) + + CONFIGURATION_NAME = '$|CONFIGURATION_NAME' + path = path.replace(CONFIGURATION_NAME, self.config_name) + return path def ExpandRuleVariables(self, path, root, dirname, source, ext, name): @@ -287,6 +301,8 @@ class NinjaWriter: if self.flavor == 'win': expanded = os.path.normpath(expanded) return expanded + if '$|' in path: + path = self.ExpandSpecial(path) assert '$' not in path, path return os.path.normpath(os.path.join(self.build_to_base, path)) @@ -695,11 +711,11 @@ class NinjaWriter: def WriteSources(self, config_name, config, sources, predepends, precompiled_header): """Write build rules to compile all of |sources|.""" - if self.toolset == 'target': - self.ninja.variable('ar', '$ar_target') - self.ninja.variable('cc', '$cc_target') - self.ninja.variable('cxx', '$cxx_target') - self.ninja.variable('ld', '$ld_target') + if self.toolset == 'host': + self.ninja.variable('ar', '$ar_host') + self.ninja.variable('cc', '$cc_host') + self.ninja.variable('cxx', '$cxx_host') + self.ninja.variable('ld', '$ld_host') extra_defines = [] if self.flavor == 'mac': @@ -875,8 +891,12 @@ class NinjaWriter: self.GypPathToNinja) self.WriteVariableList( 'libflags', gyp.common.uniquer(map(self.ExpandSpecial, libflags))) - ldflags = self.msvs_settings.GetLdflags(config_name, - self.GypPathToNinja, self.ExpandSpecial) + is_executable = spec['type'] == 'executable' + manifest_name = self.GypPathToUniqueOutput( + self.ComputeOutputFileName(spec)) + ldflags, manifest_files = self.msvs_settings.GetLdflags(config_name, + self.GypPathToNinja, self.ExpandSpecial, manifest_name, is_executable) + self.WriteVariableList('manifests', manifest_files) else: ldflags = config.get('ldflags', []) self.WriteVariableList('ldflags', @@ -1182,7 +1202,6 @@ def CalculateVariables(default_variables, params): """Calculate additional variables for use in the build (called by gyp).""" global generator_additional_non_configuration_keys global generator_additional_path_sections - cc_target = os.environ.get('CC.target', os.environ.get('CC', 'cc')) flavor = gyp.common.GetFlavor(params) if flavor == 'mac': default_variables.setdefault('OS', 'mac') @@ -1274,41 +1293,92 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, gyp.common.CopyTool(flavor, toplevel_build) # Grab make settings for CC/CXX. + # The rules are + # - The priority from low to high is gcc/g++, the 'make_global_settings' in + # gyp, the environment variable. + # - If there is no 'make_global_settings' for CC.host/CXX.host or + # 'CC_host'/'CXX_host' enviroment variable, cc_host/cxx_host should be set + # to cc/cxx. if flavor == 'win': - cc = cxx = 'cl.exe' + cc = 'cl.exe' + cxx = 'cl.exe' + ld = 'link.exe' gyp.msvs_emulation.GenerateEnvironmentFiles( toplevel_build, generator_flags, OpenOutput) + ld_host = '$ld' else: - cc, cxx = 'gcc', 'g++' + cc = 'gcc' + cxx = 'g++' + ld = '$cxx' + ld_host = '$cxx_host' + + cc_host = None + cxx_host = None + cc_host_global_setting = None + cxx_host_global_setting = None + build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0]) make_global_settings = data[build_file].get('make_global_settings', []) build_to_root = InvertRelativePath(build_dir) for key, value in make_global_settings: - if key == 'CC': cc = os.path.join(build_to_root, value) - if key == 'CXX': cxx = os.path.join(build_to_root, value) + if key == 'CC': + cc = os.path.join(build_to_root, value) + if key == 'CXX': + cxx = os.path.join(build_to_root, value) + if key == 'LD': + ld = os.path.join(build_to_root, value) + if key == 'CC.host': + cc_host = os.path.join(build_to_root, value) + cc_host_global_setting = value + if key == 'CXX.host': + cxx_host = os.path.join(build_to_root, value) + cxx_host_global_setting = value + if key == 'LD.host': + ld_host = os.path.join(build_to_root, value) flock = 'flock' if flavor == 'mac': flock = './gyp-mac-tool flock' - master_ninja.variable('cc', os.environ.get('CC', cc)) - master_ninja.variable('cxx', os.environ.get('CXX', cxx)) + cc = GetEnvironFallback(['CC_target', 'CC'], cc) + master_ninja.variable('cc', cc) + cxx = GetEnvironFallback(['CXX_target', 'CXX'], cxx) + master_ninja.variable('cxx', cxx) + ld = GetEnvironFallback(['LD_target', 'LD'], ld) + + if not cc_host: + cc_host = cc + if not cxx_host: + cxx_host = cxx + if flavor == 'win': - master_ninja.variable('ld', 'link.exe') + master_ninja.variable('ld', ld) master_ninja.variable('idl', 'midl.exe') master_ninja.variable('ar', 'lib.exe') master_ninja.variable('rc', 'rc.exe') master_ninja.variable('asm', 'ml.exe') + master_ninja.variable('mt', 'mt.exe') + master_ninja.variable('use_dep_database', '1') else: - master_ninja.variable('ld', flock + ' linker.lock $cxx') - master_ninja.variable('ar', os.environ.get('AR', 'ar')) - - master_ninja.variable('ar_target', os.environ.get('AR_target', '$ar')) - master_ninja.variable('cc_target', os.environ.get('CC_target', '$cc')) - master_ninja.variable('cxx_target', os.environ.get('CXX_target', '$cxx')) + master_ninja.variable('ld', flock + ' linker.lock ' + ld) + master_ninja.variable('ar', GetEnvironFallback(['AR_target', 'AR'], 'ar')) + + master_ninja.variable('ar_host', GetEnvironFallback(['AR_host'], 'ar')) + cc_host = GetEnvironFallback(['CC_host'], cc_host) + cxx_host = GetEnvironFallback(['CXX_host'], cxx_host) + ld_host = GetEnvironFallback(['LD_host'], ld_host) + + # The environment variable could be used in 'make_global_settings', like + # ['CC.host', '$(CC)'] or ['CXX.host', '$(CXX)'], transform them here. + if '$(CC)' in cc_host and cc_host_global_setting: + cc_host = cc_host_global_setting.replace('$(CC)', cc) + if '$(CXX)' in cxx_host and cxx_host_global_setting: + cxx_host = cxx_host_global_setting.replace('$(CXX)', cxx) + master_ninja.variable('cc_host', cc_host) + master_ninja.variable('cxx_host', cxx_host) if flavor == 'win': - master_ninja.variable('ld_target', os.environ.get('LD_target', '$ld')) + master_ninja.variable('ld_host', ld_host) else: - master_ninja.variable('ld_target', flock + ' linker.lock $cxx_target') + master_ninja.variable('ld_host', flock + ' linker.lock ' + ld_host) if flavor == 'mac': master_ninja.variable('mac_tool', os.path.join('.', 'gyp-mac-tool')) @@ -1348,28 +1418,28 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, 'cc', description='CC $out', command=cc_template % {'outspec': '/Fo$out'}, - deplist='$out.dl', + depfile='$out.dl', rspfile='$out.rsp', rspfile_content='$defines $includes $cflags $cflags_c') master_ninja.rule( 'cc_pch', description='CC PCH $out', command=cc_template % {'outspec': '/Fp$out /Fo$out.obj'}, - deplist='$out.dl', + depfile='$out.dl', rspfile='$out.rsp', rspfile_content='$defines $includes $cflags $cflags_c') master_ninja.rule( 'cxx', description='CXX $out', command=cxx_template % {'outspec': '/Fo$out'}, - deplist='$out.dl', + depfile='$out.dl', rspfile='$out.rsp', rspfile_content='$defines $includes $cflags $cflags_cc') master_ninja.rule( 'cxx_pch', description='CXX PCH $out', command=cxx_template % {'outspec': '/Fp$out /Fo$out.obj'}, - deplist='$out.dl', + depfile='$out.dl', rspfile='$out.rsp', rspfile_content='$defines $includes $cflags $cflags_cc') master_ninja.rule( @@ -1446,6 +1516,9 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, dllcmd = ('%s gyp-win-tool link-wrapper $arch ' '$ld /nologo /IMPLIB:$implib /DLL /OUT:$dll ' '/PDB:$dll.pdb @$dll.rsp' % sys.executable) + dllcmd += (' && %s gyp-win-tool manifest-wrapper $arch ' + '$mt -nologo -manifest $manifests -out:$dll.manifest' % + sys.executable) master_ninja.rule('solink', description=dlldesc, command=dllcmd, rspfile='$dll.rsp', rspfile_content='$libs $in_newline $ldflags', @@ -1460,8 +1533,10 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, 'link', description='LINK $out', command=('%s gyp-win-tool link-wrapper $arch ' - '$ld /nologo /OUT:$out /PDB:$out.pdb @$out.rsp' % - sys.executable), + '$ld /nologo /OUT:$out /PDB:$out.pdb @$out.rsp && ' + '%s gyp-win-tool manifest-wrapper $arch ' + '$mt -nologo -manifest $manifests -out:$out.manifest' % + (sys.executable, sys.executable)), rspfile='$out.rsp', rspfile_content='$in_newline $libs $ldflags') else: diff --git a/tools/gyp/pylib/gyp/generator/xcode.py b/tools/gyp/pylib/gyp/generator/xcode.py index a9fac46d0d8..9ea4fbdff06 100644 --- a/tools/gyp/pylib/gyp/generator/xcode.py +++ b/tools/gyp/pylib/gyp/generator/xcode.py @@ -7,6 +7,7 @@ import gyp.common import gyp.xcodeproj_file import errno import os +import sys import posixpath import re import shutil @@ -145,7 +146,6 @@ class XcodeProject(object): xccl = CreateXCConfigurationList(configurations) self.project.SetProperty('buildConfigurationList', xccl) except: - import sys sys.stderr.write("Problem with gyp file %s\n" % self.gyp_path) raise @@ -526,7 +526,7 @@ def AddSourceToTarget(source, type, pbxp, xct): basename = posixpath.basename(source) (root, ext) = posixpath.splitext(basename) - if ext != '': + if ext: ext = ext[1:].lower() if ext in source_extensions and type != 'none': @@ -614,11 +614,13 @@ def GenerateOutput(target_list, target_dicts, data, params): if project_version: xcp.project_file.SetXcodeVersion(project_version) - main_group = pbxp.GetProperty('mainGroup') - build_group = gyp.xcodeproj_file.PBXGroup({'name': 'Build'}) - main_group.AppendChild(build_group) - for included_file in build_file_dict['included_files']: - build_group.AddOrGetFileByPath(included_file, False) + # Add gyp/gypi files to project + if not generator_flags.get('standalone'): + main_group = pbxp.GetProperty('mainGroup') + build_group = gyp.xcodeproj_file.PBXGroup({'name': 'Build'}) + main_group.AppendChild(build_group) + for included_file in build_file_dict['included_files']: + build_group.AddOrGetFileByPath(included_file, False) xcode_targets = {} xcode_target_to_target_dict = {} diff --git a/tools/gyp/pylib/gyp/msvs_emulation.py b/tools/gyp/pylib/gyp/msvs_emulation.py index 4e1ecc6e3f0..4a55aca0575 100644 --- a/tools/gyp/pylib/gyp/msvs_emulation.py +++ b/tools/gyp/pylib/gyp/msvs_emulation.py @@ -113,6 +113,10 @@ def _FindDirectXInstallation(): """Try to find an installation location for the DirectX SDK. Check for the standard environment variable, and if that doesn't exist, try to find via the registry. May return None if not found in either location.""" + # Return previously calculated value, if there is one + if hasattr(_FindDirectXInstallation, 'dxsdk_dir'): + return _FindDirectXInstallation.dxsdk_dir + dxsdk_dir = os.environ.get('DXSDK_DIR') if not dxsdk_dir: # Setup params to pass to and attempt to launch reg.exe. @@ -121,6 +125,9 @@ def _FindDirectXInstallation(): for line in p.communicate()[0].splitlines(): if 'InstallPath' in line: dxsdk_dir = line.split(' ')[3] + "\\" + + # Cache return value + _FindDirectXInstallation.dxsdk_dir = dxsdk_dir return dxsdk_dir @@ -169,6 +176,7 @@ class MsvsSettings(object): '$(InputName)': '${root}', '$(ProjectName)': self.spec['target_name'], '$(PlatformName)': target_platform, + '$(ProjectDir)\\': '', } # Chromium uses DXSDK_DIR in include/lib paths, but it may or may not be # set. This happens when the SDK is sync'd via src-internal, rather than @@ -362,8 +370,10 @@ class MsvsSettings(object): elif len(def_files) > 1: raise Exception("Multiple .def files") - def GetLdflags(self, config, gyp_to_build_path, expand_special): - """Returns the flags that need to be added to link commands.""" + def GetLdflags(self, config, gyp_to_build_path, expand_special, + manifest_base_name, is_executable): + """Returns the flags that need to be added to link commands, and the + manifest files.""" config = self._RealConfig(config) ldflags = [] ld = self._GetWrapper(self, self.msvs_settings[config], @@ -412,7 +422,46 @@ class MsvsSettings(object): if not filter(lambda x: 'NXCOMPAT' in x, ldflags): ldflags.append('/NXCOMPAT') - return ldflags + have_def_file = filter(lambda x: x.startswith('/DEF:'), ldflags) + manifest_flags, intermediate_manifest_file = self._GetLdManifestFlags( + config, manifest_base_name, is_executable and not have_def_file) + ldflags.extend(manifest_flags) + manifest_files = self._GetAdditionalManifestFiles(config, gyp_to_build_path) + manifest_files.append(intermediate_manifest_file) + + return ldflags, manifest_files + + def _GetLdManifestFlags(self, config, name, allow_isolation): + """Returns the set of flags that need to be added to the link to generate + a default manifest, as well as the name of the generated file.""" + # Add manifest flags that mirror the defaults in VS. Chromium dev builds + # do not currently use any non-default settings, but we could parse + # VCManifestTool blocks if Chromium or other projects need them in the + # future. Of particular note, we do not yet support EmbedManifest because + # it complicates incremental linking. + output_name = name + '.intermediate.manifest' + flags = [ + '/MANIFEST', + '/ManifestFile:' + output_name, + '''/MANIFESTUAC:"level='asInvoker' uiAccess='false'"''' + ] + if allow_isolation: + flags.append('/ALLOWISOLATION') + return flags, output_name + + def _GetAdditionalManifestFiles(self, config, gyp_to_build_path): + """Gets additional manifest files that are added to the default one + generated by the linker.""" + files = self._Setting(('VCManifestTool', 'AdditionalManifestFiles'), config, + default=[]) + if (self._Setting( + ('VCManifestTool', 'EmbedManifest'), config, default='') == 'true'): + print 'gyp/msvs_emulation.py: "EmbedManifest: true" not yet supported.' + if isinstance(files, str): + files = files.split(';') + return [os.path.normpath( + gyp_to_build_path(self.ConvertVSMacros(f, config=config))) + for f in files] def IsUseLibraryDependencyInputs(self, config): """Returns whether the target should be linked via Use Library Dependency @@ -447,8 +496,8 @@ class MsvsSettings(object): cygwin_dir = os.path.normpath( os.path.join(path_to_base, self.msvs_cygwin_dirs[0])) cd = ('cd %s' % path_to_base).replace('\\', '/') - args = [a.replace('\\', '/') for a in args] - args = ["'%s'" % a.replace("'", "\\'") for a in args] + args = [a.replace('\\', '/').replace('"', '\\"') for a in args] + args = ["'%s'" % a.replace("'", "'\\''") for a in args] bash_cmd = ' '.join(args) cmd = ( 'call "%s\\setup_env.bat" && set CYGWIN=nontsec && ' % cygwin_dir + diff --git a/tools/gyp/pylib/gyp/ninja_syntax.py b/tools/gyp/pylib/gyp/ninja_syntax.py index 25b9f744286..ae85d0f54fa 100644 --- a/tools/gyp/pylib/gyp/ninja_syntax.py +++ b/tools/gyp/pylib/gyp/ninja_syntax.py @@ -35,7 +35,7 @@ class Writer(object): self._line('%s = %s' % (key, value), indent) def rule(self, name, command, description=None, depfile=None, - generator=False, restat=False, deplist=None, rspfile=None, + generator=False, restat=False, rspfile=None, rspfile_content=None): self._line('rule %s' % name) self.variable('command', command, indent=1) @@ -43,8 +43,6 @@ class Writer(object): self.variable('description', description, indent=1) if depfile: self.variable('depfile', depfile, indent=1) - if deplist: - self.variable('deplist', deplist, indent=1) if generator: self.variable('generator', '1', indent=1) if restat: diff --git a/tools/gyp/pylib/gyp/win_tool.py b/tools/gyp/pylib/gyp/win_tool.py index 9548b1cfe3d..c9c6a7b5a1d 100644 --- a/tools/gyp/pylib/gyp/win_tool.py +++ b/tools/gyp/pylib/gyp/win_tool.py @@ -13,6 +13,9 @@ import os import shutil import subprocess import sys +import win32con +import win32file +import pywintypes def main(args): @@ -22,6 +25,22 @@ def main(args): sys.exit(exit_code) +class LinkLock(object): + """A flock-style lock to limit the number of concurrent links to one. Based on + http://code.activestate.com/recipes/65203-portalocker-cross-platform-posixnt-api-for-flock-s/ + """ + def __enter__(self): + self.file = open('LinkLock', 'w+') + self.file_handle = win32file._get_osfhandle(self.file.fileno()) + win32file.LockFileEx(self.file_handle, win32con.LOCKFILE_EXCLUSIVE_LOCK, + 0, -0x10000, pywintypes.OVERLAPPED()) + + def __exit__(self, type, value, traceback): + win32file.UnlockFileEx( + self.file_handle, 0, -0x10000, pywintypes.OVERLAPPED()) + self.file.close() + + class WinTool(object): """This class performs all the Windows tooling steps. The methods can either be executed directly, or dispatched from an argument list.""" @@ -68,12 +87,26 @@ class WinTool(object): ' Creating library ui.dll.lib and object ui.dll.exp' This happens when there are exports from the dll or exe. """ + with LinkLock(): + env = self._GetEnv(arch) + popen = subprocess.Popen(args, shell=True, env=env, + stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + out, _ = popen.communicate() + for line in out.splitlines(): + if not line.startswith(' Creating library '): + print line + return popen.returncode + + def ExecManifestWrapper(self, arch, *args): + """Run manifest tool with environment set. Strip out undesirable warning + (some XML blocks are recognized by the OS loader, but not the manifest + tool).""" env = self._GetEnv(arch) popen = subprocess.Popen(args, shell=True, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) out, _ = popen.communicate() for line in out.splitlines(): - if not line.startswith(' Creating library '): + if line and 'manifest authoring warning 81010002' not in line: print line return popen.returncode diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py index ce2dabf960e..32b6f352463 100644 --- a/tools/gyp/pylib/gyp/xcode_emulation.py +++ b/tools/gyp/pylib/gyp/xcode_emulation.py @@ -244,8 +244,9 @@ class XcodeSettings(object): def _SdkPath(self): sdk_root = self.GetPerTargetSetting('SDKROOT', default='macosx10.5') if sdk_root.startswith('macosx'): - sdk_root = 'MacOSX' + sdk_root[len('macosx'):] - return os.path.join(self._GetSdkBaseDir(), '%s.sdk' % sdk_root) + return os.path.join(self._GetSdkBaseDir(), + 'MacOSX' + sdk_root[len('macosx'):] + '.sdk') + return sdk_root def GetCflags(self, configname): """Returns flags that need to be added to .c, .cc, .m, and .mm @@ -335,7 +336,7 @@ class XcodeSettings(object): config = self.spec['configurations'][self.configname] framework_dirs = config.get('mac_framework_dirs', []) for directory in framework_dirs: - cflags.append('-F ' + directory.replace('$(SDKROOT)', sdk_root)) + cflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root)) self.configname = None return cflags @@ -553,6 +554,11 @@ class XcodeSettings(object): for rpath in self._Settings().get('LD_RUNPATH_SEARCH_PATHS', []): ldflags.append('-Wl,-rpath,' + rpath) + config = self.spec['configurations'][self.configname] + framework_dirs = config.get('mac_framework_dirs', []) + for directory in framework_dirs: + ldflags.append('-F' + directory.replace('$(SDKROOT)', self._SdkPath())) + self.configname = None return ldflags diff --git a/tools/gyp/pylib/gyp/xcodeproj_file.py b/tools/gyp/pylib/gyp/xcodeproj_file.py index 403407a4139..5124ed0bf6d 100644 --- a/tools/gyp/pylib/gyp/xcodeproj_file.py +++ b/tools/gyp/pylib/gyp/xcodeproj_file.py @@ -1,4 +1,4 @@ -# Copyright (c) 2009 Google Inc. All rights reserved. +# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -1199,11 +1199,9 @@ class PBXGroup(XCHierarchicalElement): is_dir = False if path.endswith('/'): is_dir = True - normpath = posixpath.normpath(path) + path = posixpath.normpath(path) if is_dir: - normpath = path + '/' - else: - normpath = path + path = path + '/' # Adding or getting a variant? Variants are files inside directories # with an ".lproj" extension. Xcode uses variants for localization. For @@ -1232,7 +1230,7 @@ class PBXGroup(XCHierarchicalElement): # this PBXGroup, no recursion necessary. if variant_name is None: # Add or get a PBXFileReference. - file_ref = self.GetChildByPath(normpath) + file_ref = self.GetChildByPath(path) if file_ref != None: assert file_ref.__class__ == PBXFileReference else: diff --git a/tools/gyp/tools/emacs/README b/tools/gyp/tools/emacs/README new file mode 100644 index 00000000000..eeef39f41b7 --- /dev/null +++ b/tools/gyp/tools/emacs/README @@ -0,0 +1,12 @@ +How to install gyp-mode for emacs: + +Add the following to your ~/.emacs (replace ... with the path to your gyp +checkout). + +(setq load-path (cons ".../tools/emacs" load-path)) +(require 'gyp) + +Restart emacs (or eval-region the added lines) and you should be all set. + +Please note that ert is required for running the tests, which is included in +Emacs 24, or available separately from https://github.com/ohler/ert diff --git a/tools/gyp/tools/emacs/gyp-tests.el b/tools/gyp/tools/emacs/gyp-tests.el new file mode 100644 index 00000000000..e988a350edf --- /dev/null +++ b/tools/gyp/tools/emacs/gyp-tests.el @@ -0,0 +1,54 @@ +;;; gyp-tests.el - unit tests for gyp-mode. + +;; Copyright (c) 2012 Google Inc. All rights reserved. +;; Use of this source code is governed by a BSD-style license that can be +;; found in the LICENSE file. + +;; The recommended way to run these tests is to run them from the command-line, +;; with the run-unit-tests.sh script. + +(require 'cl) +(require 'ert) +(require 'gyp) + +(defconst samples (directory-files "testdata" t ".gyp$") + "List of golden samples to check") + +(defun fontify (filename) + (with-temp-buffer + (insert-file-contents-literally filename) + (gyp-mode) + (font-lock-fontify-buffer) + (buffer-string))) + +(defun read-golden-sample (filename) + (with-temp-buffer + (insert-file-contents-literally (concat filename ".fontified")) + (read (current-buffer)))) + +(defun text-face-properties (s) + "Extract the text properties from s" + (let ((result (list t))) + (dotimes (i (length s)) + (setq result (cons (get-text-property i 'face s) result))) + (nreverse result))) + +(ert-deftest test-golden-samples () + "Check that fontification produces the same results as the golden samples" + (dolist (sample samples) + (let ((golden (read-golden-sample sample)) + (fontified (fontify sample))) + (should (equal golden fontified)) + (should (equal (text-face-properties golden) + (text-face-properties fontified)))))) + +(defun create-golden-sample (filename) + "Create a golden sample by fontifying filename and writing out the printable + representation of the fontified buffer (with text properties) to the + FILENAME.fontified" + (with-temp-file (concat filename ".fontified") + (print (fontify filename) (current-buffer)))) + +(defun create-golden-samples () + "Recreate the golden samples" + (dolist (sample samples) (create-golden-sample sample))) diff --git a/tools/gyp/tools/emacs/gyp.el b/tools/gyp/tools/emacs/gyp.el new file mode 100644 index 00000000000..c20fc8de976 --- /dev/null +++ b/tools/gyp/tools/emacs/gyp.el @@ -0,0 +1,251 @@ +;;; gyp.el - font-lock-mode support for gyp files. + +;; Copyright (c) 2012 Google Inc. All rights reserved. +;; Use of this source code is governed by a BSD-style license that can be +;; found in the LICENSE file. + +;; Put this somewhere in your load-path and +;; (require 'gyp) + +(require 'python) +(require 'cl) + +(when (string-match "python-mode.el" (symbol-file 'python-mode 'defun)) + (error (concat "python-mode must be loaded from python.el (bundled with " + "recent emacsen), not from the older and less maintained " + "python-mode.el"))) + +(defadvice python-calculate-indentation (after ami-outdent-closing-parens + activate) + "De-indent closing parens, braces, and brackets in gyp-mode." + (if (and (eq major-mode 'gyp-mode) + (string-match "^ *[])}][],)}]* *$" + (buffer-substring-no-properties + (line-beginning-position) (line-end-position)))) + (setq ad-return-value (- ad-return-value 2)))) + +(define-derived-mode gyp-mode python-mode "Gyp" + "Major mode for editing .gyp files. See http://code.google.com/p/gyp/" + ;; gyp-parse-history is a stack of (POSITION . PARSE-STATE) tuples, + ;; with greater positions at the top of the stack. PARSE-STATE + ;; is a list of section symbols (see gyp-section-name and gyp-parse-to) + ;; with most nested section symbol at the front of the list. + (set (make-local-variable 'gyp-parse-history) '((1 . (list)))) + (gyp-add-font-lock-keywords)) + +(defun gyp-set-indentation () + "Hook function to configure python indentation to suit gyp mode." + (setq python-continuation-offset 2 + python-indent 2 + python-guess-indent nil)) + +(add-hook 'gyp-mode-hook 'gyp-set-indentation) + +(add-to-list 'auto-mode-alist '("\\.gyp\\'" . gyp-mode)) +(add-to-list 'auto-mode-alist '("\\.gypi\\'" . gyp-mode)) + +;;; Font-lock support + +(defconst gyp-dependencies-regexp + (regexp-opt (list "dependencies" "export_dependent_settings")) + "Regular expression to introduce 'dependencies' section") + +(defconst gyp-sources-regexp + (regexp-opt (list "action" "files" "include_dirs" "includes" "inputs" + "libraries" "outputs" "sources")) + "Regular expression to introduce 'sources' sections") + +(defconst gyp-conditions-regexp + (regexp-opt (list "conditions" "target_conditions")) + "Regular expression to introduce conditions sections") + +(defconst gyp-variables-regexp + "^variables" + "Regular expression to introduce variables sections") + +(defconst gyp-defines-regexp + "^defines" + "Regular expression to introduce 'defines' sections") + +(defconst gyp-targets-regexp + "^targets" + "Regular expression to introduce 'targets' sections") + +(defun gyp-section-name (section) + "Map the sections we are interested in from SECTION to symbol. + + SECTION is a string from the buffer that introduces a section. The result is + a symbol representing the kind of section. + + This allows us to treat (for the purposes of font-lock) several different + section names as the same kind of section. For example, a 'sources section + can be introduced by the 'sources', 'inputs', 'outputs' keyword. + + 'other is the default section kind when a more specific match is not made." + (cond ((string-match-p gyp-dependencies-regexp section) 'dependencies) + ((string-match-p gyp-sources-regexp section) 'sources) + ((string-match-p gyp-variables-regexp section) 'variables) + ((string-match-p gyp-conditions-regexp section) 'conditions) + ((string-match-p gyp-targets-regexp section) 'targets) + ((string-match-p gyp-defines-regexp section) 'defines) + (t 'other))) + +(defun gyp-invalidate-parse-states-after (target-point) + "Erase any parse information after target-point." + (while (> (caar gyp-parse-history) target-point) + (setq gyp-parse-history (cdr gyp-parse-history)))) + +(defun gyp-parse-point () + "The point of the last parse state added by gyp-parse-to." + (caar gyp-parse-history)) + +(defun gyp-parse-sections () + "A list of section symbols holding at the last parse state point." + (cdar gyp-parse-history)) + +(defun gyp-inside-dictionary-p () + "Predicate returning true if the parser is inside a dictionary." + (not (eq (cadar gyp-parse-history) 'list))) + +(defun gyp-add-parse-history (point sections) + "Add parse state SECTIONS to the parse history at POINT so that parsing can be + resumed instantly." + (while (>= (caar gyp-parse-history) point) + (setq gyp-parse-history (cdr gyp-parse-history))) + (setq gyp-parse-history (cons (cons point sections) gyp-parse-history))) + +(defun gyp-parse-to (target-point) + "Parses from (point) to TARGET-POINT adding the parse state information to + gyp-parse-state-history. Parsing stops if TARGET-POINT is reached or if a + string literal has been parsed. Returns nil if no further parsing can be + done, otherwise returns the position of the start of a parsed string, leaving + the point at the end of the string." + (let ((parsing t) + string-start) + (while parsing + (setq string-start nil) + ;; Parse up to a character that starts a sexp, or if the nesting + ;; level decreases. + (let ((state (parse-partial-sexp (gyp-parse-point) + target-point + -1 + t)) + (sections (gyp-parse-sections))) + (if (= (nth 0 state) -1) + (setq sections (cdr sections)) ; pop out a level + (cond ((looking-at-p "['\"]") ; a string + (setq string-start (point)) + (forward-sexp 1) + (if (gyp-inside-dictionary-p) + ;; Look for sections inside a dictionary + (let ((section (gyp-section-name + (buffer-substring-no-properties + (+ 1 string-start) + (- (point) 1))))) + (setq sections (cons section (cdr sections))))) + ;; Stop after the string so it can be fontified. + (setq target-point (point))) + ((looking-at-p "{") + ;; Inside a dictionary. Increase nesting. + (forward-char 1) + (setq sections (cons 'unknown sections))) + ((looking-at-p "\\[") + ;; Inside a list. Increase nesting + (forward-char 1) + (setq sections (cons 'list sections))) + ((not (eobp)) + ;; other + (forward-char 1)))) + (gyp-add-parse-history (point) sections) + (setq parsing (< (point) target-point)))) + string-start)) + +(defun gyp-section-at-point () + "Transform the last parse state, which is a list of nested sections and return + the section symbol that should be used to determine font-lock information for + the string. Can return nil indicating the string should not have any attached + section." + (let ((sections (gyp-parse-sections))) + (cond + ((eq (car sections) 'conditions) + ;; conditions can occur in a variables section, but we still want to + ;; highlight it as a keyword. + nil) + ((and (eq (car sections) 'list) + (eq (cadr sections) 'list)) + ;; conditions and sources can have items in [[ ]] + (caddr sections)) + (t (cadr sections))))) + +(defun gyp-section-match (limit) + "Parse from (point) to LIMIT returning by means of match data what was + matched. The group of the match indicates what style font-lock should apply. + See also `gyp-add-font-lock-keywords'." + (gyp-invalidate-parse-states-after (point)) + (let ((group nil) + (string-start t)) + (while (and (< (point) limit) + (not group) + string-start) + (setq string-start (gyp-parse-to limit)) + (if string-start + (setq group (case (gyp-section-at-point) + ('dependencies 1) + ('variables 2) + ('conditions 2) + ('sources 3) + ('defines 4) + (nil nil))))) + (if group + (progn + ;; Set the match data to indicate to the font-lock mechanism the + ;; highlighting to be performed. + (set-match-data (append (list string-start (point)) + (make-list (* (1- group) 2) nil) + (list (1+ string-start) (1- (point))))) + t)))) + +;;; Please see http://code.google.com/p/gyp/wiki/GypLanguageSpecification for +;;; canonical list of keywords. +(defun gyp-add-font-lock-keywords () + "Add gyp-mode keywords to font-lock mechanism." + ;; TODO(jknotten): Move all the keyword highlighting into gyp-section-match + ;; so that we can do the font-locking in a single font-lock pass. + (font-lock-add-keywords + nil + (list + ;; Top-level keywords + (list (concat "['\"]\\(" + (regexp-opt (list "action" "action_name" "actions" "cflags" + "conditions" "configurations" "copies" "defines" + "dependencies" "destination" + "direct_dependent_settings" + "export_dependent_settings" "extension" "files" + "include_dirs" "includes" "inputs" "libraries" + "link_settings" "mac_bundle" "message" + "msvs_external_rule" "outputs" "product_name" + "process_outputs_as_sources" "rules" "rule_name" + "sources" "suppress_wildcard" + "target_conditions" "target_defaults" + "target_defines" "target_name" "toolsets" + "targets" "type" "variables" "xcode_settings")) + "[!/+=]?\\)") 1 'font-lock-keyword-face t) + ;; Type of target + (list (concat "['\"]\\(" + (regexp-opt (list "loadable_module" "static_library" + "shared_library" "executable" "none")) + "\\)") 1 'font-lock-type-face t) + (list "\\(?:target\\|action\\)_name['\"]\\s-*:\\s-*['\"]\\([^ '\"]*\\)" 1 + 'font-lock-function-name-face t) + (list 'gyp-section-match + (list 1 'font-lock-function-name-face t t) ; dependencies + (list 2 'font-lock-variable-name-face t t) ; variables, conditions + (list 3 'font-lock-constant-face t t) ; sources + (list 4 'font-lock-preprocessor-face t t)) ; preprocessor + ;; Variable expansion + (list "<@?(\\([^\n )]+\\))" 1 'font-lock-variable-name-face t) + ;; Command expansion + (list "<!@?(\\([^\n )]+\\))" 1 'font-lock-variable-name-face t) + ))) + +(provide 'gyp) diff --git a/tools/gyp/tools/emacs/run-unit-tests.sh b/tools/gyp/tools/emacs/run-unit-tests.sh new file mode 100755 index 00000000000..6e62b9b28cb --- /dev/null +++ b/tools/gyp/tools/emacs/run-unit-tests.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +emacs --no-site-file --no-init-file --batch \ + --load ert.el --load gyp.el --load gyp-tests.el \ + -f ert-run-tests-batch-and-exit diff --git a/tools/gyp/tools/emacs/testdata/media.gyp b/tools/gyp/tools/emacs/testdata/media.gyp new file mode 100644 index 00000000000..29300fe1b89 --- /dev/null +++ b/tools/gyp/tools/emacs/testdata/media.gyp @@ -0,0 +1,1105 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'variables': { + 'chromium_code': 1, + # Override to dynamically link the PulseAudio library. + 'use_pulseaudio%': 0, + # Override to dynamically link the cras (ChromeOS audio) library. + 'use_cras%': 0, + }, + 'targets': [ + { + 'target_name': 'media', + 'type': '<(component)', + 'dependencies': [ + 'yuv_convert', + '../base/base.gyp:base', + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../build/temp_gyp/googleurl.gyp:googleurl', + '../crypto/crypto.gyp:crypto', + '../third_party/openmax/openmax.gyp:il', + '../ui/ui.gyp:ui', + ], + 'defines': [ + 'MEDIA_IMPLEMENTATION', + ], + 'include_dirs': [ + '..', + ], + 'sources': [ + 'audio/android/audio_manager_android.cc', + 'audio/android/audio_manager_android.h', + 'audio/android/audio_track_output_android.cc', + 'audio/android/audio_track_output_android.h', + 'audio/android/opensles_input.cc', + 'audio/android/opensles_input.h', + 'audio/android/opensles_output.cc', + 'audio/android/opensles_output.h', + 'audio/async_socket_io_handler.h', + 'audio/async_socket_io_handler_posix.cc', + 'audio/async_socket_io_handler_win.cc', + 'audio/audio_buffers_state.cc', + 'audio/audio_buffers_state.h', + 'audio/audio_io.h', + 'audio/audio_input_controller.cc', + 'audio/audio_input_controller.h', + 'audio/audio_input_stream_impl.cc', + 'audio/audio_input_stream_impl.h', + 'audio/audio_device_name.cc', + 'audio/audio_device_name.h', + 'audio/audio_manager.cc', + 'audio/audio_manager.h', + 'audio/audio_manager_base.cc', + 'audio/audio_manager_base.h', + 'audio/audio_output_controller.cc', + 'audio/audio_output_controller.h', + 'audio/audio_output_dispatcher.cc', + 'audio/audio_output_dispatcher.h', + 'audio/audio_output_dispatcher_impl.cc', + 'audio/audio_output_dispatcher_impl.h', + 'audio/audio_output_mixer.cc', + 'audio/audio_output_mixer.h', + 'audio/audio_output_proxy.cc', + 'audio/audio_output_proxy.h', + 'audio/audio_parameters.cc', + 'audio/audio_parameters.h', + 'audio/audio_util.cc', + 'audio/audio_util.h', + 'audio/cross_process_notification.cc', + 'audio/cross_process_notification.h', + 'audio/cross_process_notification_win.cc', + 'audio/cross_process_notification_posix.cc', + 'audio/fake_audio_input_stream.cc', + 'audio/fake_audio_input_stream.h', + 'audio/fake_audio_output_stream.cc', + 'audio/fake_audio_output_stream.h', + 'audio/linux/audio_manager_linux.cc', + 'audio/linux/audio_manager_linux.h', + 'audio/linux/alsa_input.cc', + 'audio/linux/alsa_input.h', + 'audio/linux/alsa_output.cc', + 'audio/linux/alsa_output.h', + 'audio/linux/alsa_util.cc', + 'audio/linux/alsa_util.h', + 'audio/linux/alsa_wrapper.cc', + 'audio/linux/alsa_wrapper.h', + 'audio/linux/cras_output.cc', + 'audio/linux/cras_output.h', + 'audio/openbsd/audio_manager_openbsd.cc', + 'audio/openbsd/audio_manager_openbsd.h', + 'audio/mac/audio_input_mac.cc', + 'audio/mac/audio_input_mac.h', + 'audio/mac/audio_low_latency_input_mac.cc', + 'audio/mac/audio_low_latency_input_mac.h', + 'audio/mac/audio_low_latency_output_mac.cc', + 'audio/mac/audio_low_latency_output_mac.h', + 'audio/mac/audio_manager_mac.cc', + 'audio/mac/audio_manager_mac.h', + 'audio/mac/audio_output_mac.cc', + 'audio/mac/audio_output_mac.h', + 'audio/null_audio_sink.cc', + 'audio/null_audio_sink.h', + 'audio/pulse/pulse_output.cc', + 'audio/pulse/pulse_output.h', + 'audio/sample_rates.cc', + 'audio/sample_rates.h', + 'audio/simple_sources.cc', + 'audio/simple_sources.h', + 'audio/win/audio_low_latency_input_win.cc', + 'audio/win/audio_low_latency_input_win.h', + 'audio/win/audio_low_latency_output_win.cc', + 'audio/win/audio_low_latency_output_win.h', + 'audio/win/audio_manager_win.cc', + 'audio/win/audio_manager_win.h', + 'audio/win/avrt_wrapper_win.cc', + 'audio/win/avrt_wrapper_win.h', + 'audio/win/device_enumeration_win.cc', + 'audio/win/device_enumeration_win.h', + 'audio/win/wavein_input_win.cc', + 'audio/win/wavein_input_win.h', + 'audio/win/waveout_output_win.cc', + 'audio/win/waveout_output_win.h', + 'base/android/media_jni_registrar.cc', + 'base/android/media_jni_registrar.h', + 'base/audio_decoder.cc', + 'base/audio_decoder.h', + 'base/audio_decoder_config.cc', + 'base/audio_decoder_config.h', + 'base/audio_renderer.h', + 'base/audio_renderer_mixer.cc', + 'base/audio_renderer_mixer.h', + 'base/audio_renderer_mixer_input.cc', + 'base/audio_renderer_mixer_input.h', + 'base/bitstream_buffer.h', + 'base/buffers.cc', + 'base/buffers.h', + 'base/byte_queue.cc', + 'base/byte_queue.h', + 'base/channel_layout.cc', + 'base/channel_layout.h', + 'base/clock.cc', + 'base/clock.h', + 'base/composite_filter.cc', + 'base/composite_filter.h', + 'base/data_buffer.cc', + 'base/data_buffer.h', + 'base/data_source.cc', + 'base/data_source.h', + 'base/decoder_buffer.cc', + 'base/decoder_buffer.h', + 'base/decrypt_config.cc', + 'base/decrypt_config.h', + 'base/decryptor.h', + 'base/decryptor_client.h', + 'base/demuxer.cc', + 'base/demuxer.h', + 'base/demuxer_stream.cc', + 'base/demuxer_stream.h', + 'base/djb2.cc', + 'base/djb2.h', + 'base/filter_collection.cc', + 'base/filter_collection.h', + 'base/filter_host.h', + 'base/filters.cc', + 'base/filters.h', + 'base/h264_bitstream_converter.cc', + 'base/h264_bitstream_converter.h', + 'base/media.h', + 'base/media_android.cc', + 'base/media_export.h', + 'base/media_log.cc', + 'base/media_log.h', + 'base/media_log_event.h', + 'base/media_posix.cc', + 'base/media_switches.cc', + 'base/media_switches.h', + 'base/media_win.cc', + 'base/message_loop_factory.cc', + 'base/message_loop_factory.h', + 'base/pipeline.cc', + 'base/pipeline.h', + 'base/pipeline_status.cc', + 'base/pipeline_status.h', + 'base/ranges.cc', + 'base/ranges.h', + 'base/seekable_buffer.cc', + 'base/seekable_buffer.h', + 'base/state_matrix.cc', + 'base/state_matrix.h', + 'base/stream_parser.cc', + 'base/stream_parser.h', + 'base/stream_parser_buffer.cc', + 'base/stream_parser_buffer.h', + 'base/video_decoder.cc', + 'base/video_decoder.h', + 'base/video_decoder_config.cc', + 'base/video_decoder_config.h', + 'base/video_frame.cc', + 'base/video_frame.h', + 'base/video_renderer.h', + 'base/video_util.cc', + 'base/video_util.h', + 'crypto/aes_decryptor.cc', + 'crypto/aes_decryptor.h', + 'ffmpeg/ffmpeg_common.cc', + 'ffmpeg/ffmpeg_common.h', + 'ffmpeg/file_protocol.cc', + 'ffmpeg/file_protocol.h', + 'filters/audio_file_reader.cc', + 'filters/audio_file_reader.h', + 'filters/audio_renderer_algorithm.cc', + 'filters/audio_renderer_algorithm.h', + 'filters/audio_renderer_impl.cc', + 'filters/audio_renderer_impl.h', + 'filters/bitstream_converter.cc', + 'filters/bitstream_converter.h', + 'filters/chunk_demuxer.cc', + 'filters/chunk_demuxer.h', + 'filters/chunk_demuxer_client.h', + 'filters/dummy_demuxer.cc', + 'filters/dummy_demuxer.h', + 'filters/ffmpeg_audio_decoder.cc', + 'filters/ffmpeg_audio_decoder.h', + 'filters/ffmpeg_demuxer.cc', + 'filters/ffmpeg_demuxer.h', + 'filters/ffmpeg_h264_bitstream_converter.cc', + 'filters/ffmpeg_h264_bitstream_converter.h', + 'filters/ffmpeg_glue.cc', + 'filters/ffmpeg_glue.h', + 'filters/ffmpeg_video_decoder.cc', + 'filters/ffmpeg_video_decoder.h', + 'filters/file_data_source.cc', + 'filters/file_data_source.h', + 'filters/gpu_video_decoder.cc', + 'filters/gpu_video_decoder.h', + 'filters/in_memory_url_protocol.cc', + 'filters/in_memory_url_protocol.h', + 'filters/source_buffer_stream.cc', + 'filters/source_buffer_stream.h', + 'filters/video_frame_generator.cc', + 'filters/video_frame_generator.h', + 'filters/video_renderer_base.cc', + 'filters/video_renderer_base.h', + 'video/capture/fake_video_capture_device.cc', + 'video/capture/fake_video_capture_device.h', + 'video/capture/linux/video_capture_device_linux.cc', + 'video/capture/linux/video_capture_device_linux.h', + 'video/capture/mac/video_capture_device_mac.h', + 'video/capture/mac/video_capture_device_mac.mm', + 'video/capture/mac/video_capture_device_qtkit_mac.h', + 'video/capture/mac/video_capture_device_qtkit_mac.mm', + 'video/capture/video_capture.h', + 'video/capture/video_capture_device.h', + 'video/capture/video_capture_device_dummy.cc', + 'video/capture/video_capture_device_dummy.h', + 'video/capture/video_capture_proxy.cc', + 'video/capture/video_capture_proxy.h', + 'video/capture/video_capture_types.h', + 'video/capture/win/filter_base_win.cc', + 'video/capture/win/filter_base_win.h', + 'video/capture/win/pin_base_win.cc', + 'video/capture/win/pin_base_win.h', + 'video/capture/win/sink_filter_observer_win.h', + 'video/capture/win/sink_filter_win.cc', + 'video/capture/win/sink_filter_win.h', + 'video/capture/win/sink_input_pin_win.cc', + 'video/capture/win/sink_input_pin_win.h', + 'video/capture/win/video_capture_device_win.cc', + 'video/capture/win/video_capture_device_win.h', + 'video/picture.cc', + 'video/picture.h', + 'video/video_decode_accelerator.cc', + 'video/video_decode_accelerator.h', + 'webm/webm_constants.h', + 'webm/webm_cluster_parser.cc', + 'webm/webm_cluster_parser.h', + 'webm/webm_content_encodings.cc', + 'webm/webm_content_encodings.h', + 'webm/webm_content_encodings_client.cc', + 'webm/webm_content_encodings_client.h', + 'webm/webm_info_parser.cc', + 'webm/webm_info_parser.h', + 'webm/webm_parser.cc', + 'webm/webm_parser.h', + 'webm/webm_stream_parser.cc', + 'webm/webm_stream_parser.h', + 'webm/webm_tracks_parser.cc', + 'webm/webm_tracks_parser.h', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '..', + ], + }, + 'conditions': [ + # Android doesn't use ffmpeg, so make the dependency conditional + # and exclude the sources which depend on ffmpeg. + ['OS != "android"', { + 'dependencies': [ + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + }], + ['OS == "android"', { + 'sources!': [ + 'base/media_posix.cc', + 'ffmpeg/ffmpeg_common.cc', + 'ffmpeg/ffmpeg_common.h', + 'ffmpeg/file_protocol.cc', + 'ffmpeg/file_protocol.h', + 'filters/audio_file_reader.cc', + 'filters/audio_file_reader.h', + 'filters/bitstream_converter.cc', + 'filters/bitstream_converter.h', + 'filters/chunk_demuxer.cc', + 'filters/chunk_demuxer.h', + 'filters/chunk_demuxer_client.h', + 'filters/ffmpeg_audio_decoder.cc', + 'filters/ffmpeg_audio_decoder.h', + 'filters/ffmpeg_demuxer.cc', + 'filters/ffmpeg_demuxer.h', + 'filters/ffmpeg_h264_bitstream_converter.cc', + 'filters/ffmpeg_h264_bitstream_converter.h', + 'filters/ffmpeg_glue.cc', + 'filters/ffmpeg_glue.h', + 'filters/ffmpeg_video_decoder.cc', + 'filters/ffmpeg_video_decoder.h', + 'filters/gpu_video_decoder.cc', + 'filters/gpu_video_decoder.h', + 'webm/webm_cluster_parser.cc', + 'webm/webm_cluster_parser.h', + 'webm/webm_stream_parser.cc', + 'webm/webm_stream_parser.h', + ], + }], + # The below 'android' condition were added temporarily and should be + # removed in downstream, because there is no Java environment setup in + # upstream yet. + ['OS == "android"', { + 'sources!':[ + 'audio/android/audio_track_output_android.cc', + ], + 'sources':[ + 'audio/android/audio_track_output_stub_android.cc', + ], + 'link_settings': { + 'libraries': [ + '-lOpenSLES', + ], + }, + }], + ['OS=="linux" or OS=="freebsd" or OS=="solaris"', { + 'link_settings': { + 'libraries': [ + '-lasound', + ], + }, + }], + ['OS=="openbsd"', { + 'sources/': [ ['exclude', '/alsa_' ], + ['exclude', '/audio_manager_linux' ] ], + 'link_settings': { + 'libraries': [ + ], + }, + }], + ['OS!="openbsd"', { + 'sources!': [ + 'audio/openbsd/audio_manager_openbsd.cc', + 'audio/openbsd/audio_manager_openbsd.h', + ], + }], + ['OS=="linux"', { + 'variables': { + 'conditions': [ + ['sysroot!=""', { + 'pkg-config': '../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"', + }, { + 'pkg-config': 'pkg-config' + }], + ], + }, + 'conditions': [ + ['use_cras == 1', { + 'cflags': [ + '<!@(<(pkg-config) --cflags libcras)', + ], + 'link_settings': { + 'libraries': [ + '<!@(<(pkg-config) --libs libcras)', + ], + }, + 'defines': [ + 'USE_CRAS', + ], + }, { # else: use_cras == 0 + 'sources!': [ + 'audio/linux/cras_output.cc', + 'audio/linux/cras_output.h', + ], + }], + ], + }], + ['os_posix == 1', { + 'conditions': [ + ['use_pulseaudio == 1', { + 'cflags': [ + '<!@(pkg-config --cflags libpulse)', + ], + 'link_settings': { + 'libraries': [ + '<!@(pkg-config --libs-only-l libpulse)', + ], + }, + 'defines': [ + 'USE_PULSEAUDIO', + ], + }, { # else: use_pulseaudio == 0 + 'sources!': [ + 'audio/pulse/pulse_output.cc', + 'audio/pulse/pulse_output.h', + ], + }], + ], + }], + ['os_posix == 1 and OS != "android"', { + # Video capture isn't supported in Android yet. + 'sources!': [ + 'video/capture/video_capture_device_dummy.cc', + 'video/capture/video_capture_device_dummy.h', + ], + }], + ['OS=="mac"', { + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework', + '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework', + '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework', + '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework', + '$(SDKROOT)/System/Library/Frameworks/QTKit.framework', + ], + }, + }], + ['OS=="win"', { + 'sources!': [ + 'audio/pulse/pulse_output.cc', + 'audio/pulse/pulse_output.h', + 'video/capture/video_capture_device_dummy.cc', + 'video/capture/video_capture_device_dummy.h', + ], + }], + ['proprietary_codecs==1 or branding=="Chrome"', { + 'sources': [ + 'mp4/avc.cc', + 'mp4/avc.h', + 'mp4/box_definitions.cc', + 'mp4/box_definitions.h', + 'mp4/box_reader.cc', + 'mp4/box_reader.h', + 'mp4/cenc.cc', + 'mp4/cenc.h', + 'mp4/mp4_stream_parser.cc', + 'mp4/mp4_stream_parser.h', + 'mp4/offset_byte_queue.cc', + 'mp4/offset_byte_queue.h', + 'mp4/track_run_iterator.cc', + 'mp4/track_run_iterator.h', + ], + }], + ], + }, + { + 'target_name': 'yuv_convert', + 'type': 'static_library', + 'include_dirs': [ + '..', + ], + 'conditions': [ + ['order_profiling != 0', { + 'target_conditions' : [ + ['_toolset=="target"', { + 'cflags!': [ '-finstrument-functions' ], + }], + ], + }], + [ 'target_arch == "ia32" or target_arch == "x64"', { + 'dependencies': [ + 'yuv_convert_simd_x86', + ], + }], + [ 'target_arch == "arm"', { + 'dependencies': [ + 'yuv_convert_simd_arm', + ], + }], + ], + 'sources': [ + 'base/yuv_convert.cc', + 'base/yuv_convert.h', + ], + }, + { + 'target_name': 'yuv_convert_simd_x86', + 'type': 'static_library', + 'include_dirs': [ + '..', + ], + 'sources': [ + 'base/simd/convert_rgb_to_yuv_c.cc', + 'base/simd/convert_rgb_to_yuv_sse2.cc', + 'base/simd/convert_rgb_to_yuv_ssse3.asm', + 'base/simd/convert_rgb_to_yuv_ssse3.cc', + 'base/simd/convert_rgb_to_yuv_ssse3.inc', + 'base/simd/convert_yuv_to_rgb_c.cc', + 'base/simd/convert_yuv_to_rgb_x86.cc', + 'base/simd/convert_yuv_to_rgb_mmx.asm', + 'base/simd/convert_yuv_to_rgb_mmx.inc', + 'base/simd/convert_yuv_to_rgb_sse.asm', + 'base/simd/filter_yuv.h', + 'base/simd/filter_yuv_c.cc', + 'base/simd/filter_yuv_mmx.cc', + 'base/simd/filter_yuv_sse2.cc', + 'base/simd/linear_scale_yuv_to_rgb_mmx.asm', + 'base/simd/linear_scale_yuv_to_rgb_mmx.inc', + 'base/simd/linear_scale_yuv_to_rgb_sse.asm', + 'base/simd/scale_yuv_to_rgb_mmx.asm', + 'base/simd/scale_yuv_to_rgb_mmx.inc', + 'base/simd/scale_yuv_to_rgb_sse.asm', + 'base/simd/yuv_to_rgb_table.cc', + 'base/simd/yuv_to_rgb_table.h', + ], + 'conditions': [ + ['order_profiling != 0', { + 'target_conditions' : [ + ['_toolset=="target"', { + 'cflags!': [ '-finstrument-functions' ], + }], + ], + }], + [ 'target_arch == "x64"', { + # Source files optimized for X64 systems. + 'sources': [ + 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm', + 'base/simd/scale_yuv_to_rgb_sse2_x64.asm', + ], + }], + [ 'os_posix == 1 and OS != "mac" and OS != "android"', { + 'cflags': [ + '-msse2', + ], + }], + [ 'OS == "mac"', { + 'configurations': { + 'Debug': { + 'xcode_settings': { + # gcc on the mac builds horribly unoptimized sse code in debug + # mode. Since this is rarely going to be debugged, run with full + # optimizations in Debug as well as Release. + 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 + }, + }, + }, + }], + [ 'OS=="win"', { + 'variables': { + 'yasm_flags': [ + '-DWIN32', + '-DMSVC', + '-DCHROMIUM', + '-Isimd', + ], + }, + }], + [ 'OS=="mac"', { + 'variables': { + 'yasm_flags': [ + '-DPREFIX', + '-DMACHO', + '-DCHROMIUM', + '-Isimd', + ], + }, + }], + [ 'os_posix==1 and OS!="mac"', { + 'variables': { + 'conditions': [ + [ 'target_arch=="ia32"', { + 'yasm_flags': [ + '-DX86_32', + '-DELF', + '-DCHROMIUM', + '-Isimd', + ], + }, { + 'yasm_flags': [ + '-DARCH_X86_64', + '-DELF', + '-DPIC', + '-DCHROMIUM', + '-Isimd', + ], + }], + ], + }, + }], + ], + 'variables': { + 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media', + }, + 'msvs_2010_disable_uldi_when_referenced': 1, + 'includes': [ + '../third_party/yasm/yasm_compile.gypi', + ], + }, + { + 'target_name': 'yuv_convert_simd_arm', + 'type': 'static_library', + 'include_dirs': [ + '..', + ], + 'sources': [ + 'base/simd/convert_rgb_to_yuv_c.cc', + 'base/simd/convert_rgb_to_yuv.h', + 'base/simd/convert_yuv_to_rgb_c.cc', + 'base/simd/convert_yuv_to_rgb.h', + 'base/simd/filter_yuv.h', + 'base/simd/filter_yuv_c.cc', + 'base/simd/yuv_to_rgb_table.cc', + 'base/simd/yuv_to_rgb_table.h', + ], + }, + { + 'target_name': 'media_unittests', + 'type': 'executable', + 'dependencies': [ + 'media', + 'media_test_support', + 'yuv_convert', + '../base/base.gyp:base', + '../base/base.gyp:base_i18n', + '../base/base.gyp:test_support_base', + '../testing/gmock.gyp:gmock', + '../testing/gtest.gyp:gtest', + '../ui/ui.gyp:ui', + ], + 'sources': [ + 'audio/async_socket_io_handler_unittest.cc', + 'audio/audio_input_controller_unittest.cc', + 'audio/audio_input_device_unittest.cc', + 'audio/audio_input_unittest.cc', + 'audio/audio_input_volume_unittest.cc', + 'audio/audio_low_latency_input_output_unittest.cc', + 'audio/audio_output_controller_unittest.cc', + 'audio/audio_output_proxy_unittest.cc', + 'audio/audio_parameters_unittest.cc', + 'audio/audio_util_unittest.cc', + 'audio/cross_process_notification_unittest.cc', + 'audio/linux/alsa_output_unittest.cc', + 'audio/mac/audio_low_latency_input_mac_unittest.cc', + 'audio/mac/audio_output_mac_unittest.cc', + 'audio/simple_sources_unittest.cc', + 'audio/win/audio_low_latency_input_win_unittest.cc', + 'audio/win/audio_low_latency_output_win_unittest.cc', + 'audio/win/audio_output_win_unittest.cc', + 'base/audio_renderer_mixer_unittest.cc', + 'base/audio_renderer_mixer_input_unittest.cc', + 'base/buffers_unittest.cc', + 'base/clock_unittest.cc', + 'base/composite_filter_unittest.cc', + 'base/data_buffer_unittest.cc', + 'base/decoder_buffer_unittest.cc', + 'base/djb2_unittest.cc', + 'base/fake_audio_render_callback.cc', + 'base/fake_audio_render_callback.h', + 'base/filter_collection_unittest.cc', + 'base/h264_bitstream_converter_unittest.cc', + 'base/pipeline_unittest.cc', + 'base/ranges_unittest.cc', + 'base/run_all_unittests.cc', + 'base/seekable_buffer_unittest.cc', + 'base/state_matrix_unittest.cc', + 'base/test_data_util.cc', + 'base/test_data_util.h', + 'base/video_frame_unittest.cc', + 'base/video_util_unittest.cc', + 'base/yuv_convert_unittest.cc', + 'crypto/aes_decryptor_unittest.cc', + 'ffmpeg/ffmpeg_common_unittest.cc', + 'filters/audio_renderer_algorithm_unittest.cc', + 'filters/audio_renderer_impl_unittest.cc', + 'filters/bitstream_converter_unittest.cc', + 'filters/chunk_demuxer_unittest.cc', + 'filters/ffmpeg_audio_decoder_unittest.cc', + 'filters/ffmpeg_decoder_unittest.h', + 'filters/ffmpeg_demuxer_unittest.cc', + 'filters/ffmpeg_glue_unittest.cc', + 'filters/ffmpeg_h264_bitstream_converter_unittest.cc', + 'filters/ffmpeg_video_decoder_unittest.cc', + 'filters/file_data_source_unittest.cc', + 'filters/pipeline_integration_test.cc', + 'filters/pipeline_integration_test_base.cc', + 'filters/source_buffer_stream_unittest.cc', + 'filters/video_renderer_base_unittest.cc', + 'video/capture/video_capture_device_unittest.cc', + 'webm/cluster_builder.cc', + 'webm/cluster_builder.h', + 'webm/webm_cluster_parser_unittest.cc', + 'webm/webm_content_encodings_client_unittest.cc', + 'webm/webm_parser_unittest.cc', + ], + 'conditions': [ + ['os_posix==1 and OS!="mac"', { + 'conditions': [ + ['linux_use_tcmalloc==1', { + 'dependencies': [ + '../base/allocator/allocator.gyp:allocator', + ], + }], + ], + }], + ['OS != "android"', { + 'dependencies': [ + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + }], + ['OS == "android"', { + 'sources!': [ + 'audio/audio_input_volume_unittest.cc', + 'base/test_data_util.cc', + 'base/test_data_util.h', + 'ffmpeg/ffmpeg_common_unittest.cc', + 'filters/ffmpeg_audio_decoder_unittest.cc', + 'filters/bitstream_converter_unittest.cc', + 'filters/chunk_demuxer_unittest.cc', + 'filters/ffmpeg_demuxer_unittest.cc', + 'filters/ffmpeg_glue_unittest.cc', + 'filters/ffmpeg_h264_bitstream_converter_unittest.cc', + 'filters/ffmpeg_video_decoder_unittest.cc', + 'filters/pipeline_integration_test.cc', + 'filters/pipeline_integration_test_base.cc', + 'mp4/mp4_stream_parser_unittest.cc', + 'webm/webm_cluster_parser_unittest.cc', + ], + }], + ['OS == "linux"', { + 'conditions': [ + ['use_cras == 1', { + 'sources': [ + 'audio/linux/cras_output_unittest.cc', + ], + 'defines': [ + 'USE_CRAS', + ], + }], + ], + }], + [ 'target_arch=="ia32" or target_arch=="x64"', { + 'sources': [ + 'base/simd/convert_rgb_to_yuv_unittest.cc', + ], + }], + ['proprietary_codecs==1 or branding=="Chrome"', { + 'sources': [ + 'mp4/avc_unittest.cc', + 'mp4/box_reader_unittest.cc', + 'mp4/mp4_stream_parser_unittest.cc', + 'mp4/offset_byte_queue_unittest.cc', + ], + }], + ], + }, + { + 'target_name': 'media_test_support', + 'type': 'static_library', + 'dependencies': [ + 'media', + '../base/base.gyp:base', + '../testing/gmock.gyp:gmock', + '../testing/gtest.gyp:gtest', + ], + 'sources': [ + 'audio/test_audio_input_controller_factory.cc', + 'audio/test_audio_input_controller_factory.h', + 'base/mock_callback.cc', + 'base/mock_callback.h', + 'base/mock_data_source_host.cc', + 'base/mock_data_source_host.h', + 'base/mock_demuxer_host.cc', + 'base/mock_demuxer_host.h', + 'base/mock_filter_host.cc', + 'base/mock_filter_host.h', + 'base/mock_filters.cc', + 'base/mock_filters.h', + ], + }, + { + 'target_name': 'scaler_bench', + 'type': 'executable', + 'dependencies': [ + 'media', + 'yuv_convert', + '../base/base.gyp:base', + '../skia/skia.gyp:skia', + ], + 'sources': [ + 'tools/scaler_bench/scaler_bench.cc', + ], + }, + { + 'target_name': 'qt_faststart', + 'type': 'executable', + 'sources': [ + 'tools/qt_faststart/qt_faststart.c' + ], + }, + { + 'target_name': 'seek_tester', + 'type': 'executable', + 'dependencies': [ + 'media', + '../base/base.gyp:base', + ], + 'sources': [ + 'tools/seek_tester/seek_tester.cc', + ], + }, + ], + 'conditions': [ + ['OS=="win"', { + 'targets': [ + { + 'target_name': 'player_wtl', + 'type': 'executable', + 'dependencies': [ + 'media', + 'yuv_convert', + '../base/base.gyp:base', + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../ui/ui.gyp:ui', + ], + 'include_dirs': [ + '<(DEPTH)/third_party/wtl/include', + ], + 'sources': [ + 'tools/player_wtl/list.h', + 'tools/player_wtl/mainfrm.h', + 'tools/player_wtl/movie.cc', + 'tools/player_wtl/movie.h', + 'tools/player_wtl/player_wtl.cc', + 'tools/player_wtl/player_wtl.rc', + 'tools/player_wtl/props.h', + 'tools/player_wtl/seek.h', + 'tools/player_wtl/resource.h', + 'tools/player_wtl/view.h', + ], + 'msvs_settings': { + 'VCLinkerTool': { + 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS + }, + }, + 'defines': [ + '_CRT_SECURE_NO_WARNINGS=1', + ], + }, + ], + }], + ['OS == "win" or toolkit_uses_gtk == 1', { + 'targets': [ + { + 'target_name': 'shader_bench', + 'type': 'executable', + 'dependencies': [ + 'media', + 'yuv_convert', + '../base/base.gyp:base', + '../ui/gl/gl.gyp:gl', + ], + 'sources': [ + 'tools/shader_bench/shader_bench.cc', + 'tools/shader_bench/cpu_color_painter.cc', + 'tools/shader_bench/cpu_color_painter.h', + 'tools/shader_bench/gpu_color_painter.cc', + 'tools/shader_bench/gpu_color_painter.h', + 'tools/shader_bench/gpu_painter.cc', + 'tools/shader_bench/gpu_painter.h', + 'tools/shader_bench/painter.cc', + 'tools/shader_bench/painter.h', + 'tools/shader_bench/window.cc', + 'tools/shader_bench/window.h', + ], + 'conditions': [ + ['toolkit_uses_gtk == 1', { + 'dependencies': [ + '../build/linux/system.gyp:gtk', + ], + 'sources': [ + 'tools/shader_bench/window_linux.cc', + ], + }], + ['OS=="win"', { + 'dependencies': [ + '../third_party/angle/src/build_angle.gyp:libEGL', + '../third_party/angle/src/build_angle.gyp:libGLESv2', + ], + 'sources': [ + 'tools/shader_bench/window_win.cc', + ], + }], + ], + }, + ], + }], + ['OS == "linux" and target_arch != "arm"', { + 'targets': [ + { + 'target_name': 'tile_render_bench', + 'type': 'executable', + 'dependencies': [ + '../base/base.gyp:base', + '../ui/gl/gl.gyp:gl', + ], + 'libraries': [ + '-lGL', + '-ldl', + ], + 'sources': [ + 'tools/tile_render_bench/tile_render_bench.cc', + ], + }, + ], + }], + ['os_posix == 1 and OS != "mac" and OS != "android"', { + 'targets': [ + { + 'target_name': 'player_x11', + 'type': 'executable', + 'dependencies': [ + 'media', + 'yuv_convert', + '../base/base.gyp:base', + '../ui/gl/gl.gyp:gl', + ], + 'link_settings': { + 'libraries': [ + '-ldl', + '-lX11', + '-lXrender', + '-lXext', + ], + }, + 'sources': [ + 'tools/player_x11/data_source_logger.cc', + 'tools/player_x11/data_source_logger.h', + 'tools/player_x11/gl_video_renderer.cc', + 'tools/player_x11/gl_video_renderer.h', + 'tools/player_x11/player_x11.cc', + 'tools/player_x11/x11_video_renderer.cc', + 'tools/player_x11/x11_video_renderer.h', + ], + }, + ], + }], + ['OS == "android"', { + 'targets': [ + { + 'target_name': 'player_android', + 'type': 'static_library', + 'sources': [ + 'base/android/media_player_bridge.cc', + 'base/android/media_player_bridge.h', + ], + 'dependencies': [ + '../base/base.gyp:base', + ], + 'include_dirs': [ + '<(SHARED_INTERMEDIATE_DIR)/media', + ], + 'actions': [ + { + 'action_name': 'generate-jni-headers', + 'inputs': [ + '../base/android/jni_generator/jni_generator.py', + 'base/android/java/src/org/chromium/media/MediaPlayerListener.java', + ], + 'outputs': [ + '<(SHARED_INTERMEDIATE_DIR)/media/jni/media_player_listener_jni.h', + ], + 'action': [ + 'python', + '<(DEPTH)/base/android/jni_generator/jni_generator.py', + '-o', + '<@(_inputs)', + '<@(_outputs)', + ], + }, + ], + }, + { + 'target_name': 'media_java', + 'type': 'none', + 'dependencies': [ '../base/base.gyp:base_java' ], + 'variables': { + 'package_name': 'media', + 'java_in_dir': 'base/android/java', + }, + 'includes': [ '../build/java.gypi' ], + }, + + ], + }, { # OS != "android"' + # Android does not use ffmpeg, so disable the targets which require it. + 'targets': [ + { + 'target_name': 'ffmpeg_unittests', + 'type': 'executable', + 'dependencies': [ + 'media', + 'media_test_support', + '../base/base.gyp:base', + '../base/base.gyp:base_i18n', + '../base/base.gyp:test_support_base', + '../base/base.gyp:test_support_perf', + '../testing/gtest.gyp:gtest', + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + 'sources': [ + 'ffmpeg/ffmpeg_unittest.cc', + ], + 'conditions': [ + ['toolkit_uses_gtk == 1', { + 'dependencies': [ + # Needed for the following #include chain: + # base/run_all_unittests.cc + # ../base/test_suite.h + # gtk/gtk.h + '../build/linux/system.gyp:gtk', + ], + 'conditions': [ + ['linux_use_tcmalloc==1', { + 'dependencies': [ + '../base/allocator/allocator.gyp:allocator', + ], + }], + ], + }], + ], + }, + { + 'target_name': 'ffmpeg_regression_tests', + 'type': 'executable', + 'dependencies': [ + 'media', + 'media_test_support', + '../base/base.gyp:test_support_base', + '../testing/gmock.gyp:gmock', + '../testing/gtest.gyp:gtest', + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + 'sources': [ + 'base/test_data_util.cc', + 'base/run_all_unittests.cc', + 'ffmpeg/ffmpeg_regression_tests.cc', + 'filters/pipeline_integration_test_base.cc', + ], + 'conditions': [ + ['os_posix==1 and OS!="mac"', { + 'conditions': [ + ['linux_use_tcmalloc==1', { + 'dependencies': [ + '../base/allocator/allocator.gyp:allocator', + ], + }], + ], + }], + ], + }, + { + 'target_name': 'ffmpeg_tests', + 'type': 'executable', + 'dependencies': [ + 'media', + '../base/base.gyp:base', + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + 'sources': [ + 'test/ffmpeg_tests/ffmpeg_tests.cc', + ], + }, + { + 'target_name': 'media_bench', + 'type': 'executable', + 'dependencies': [ + 'media', + '../base/base.gyp:base', + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + 'sources': [ + 'tools/media_bench/media_bench.cc', + ], + }, + ], + }] + ], +} diff --git a/tools/gyp/tools/emacs/testdata/media.gyp.fontified b/tools/gyp/tools/emacs/testdata/media.gyp.fontified new file mode 100644 index 00000000000..962b7b2c43a --- /dev/null +++ b/tools/gyp/tools/emacs/testdata/media.gyp.fontified @@ -0,0 +1,1107 @@ + +#("# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'variables': { + 'chromium_code': 1, + # Override to dynamically link the PulseAudio library. + 'use_pulseaudio%': 0, + # Override to dynamically link the cras (ChromeOS audio) library. + 'use_cras%': 0, + }, + 'targets': [ + { + 'target_name': 'media', + 'type': '<(component)', + 'dependencies': [ + 'yuv_convert', + '../base/base.gyp:base', + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../build/temp_gyp/googleurl.gyp:googleurl', + '../crypto/crypto.gyp:crypto', + '../third_party/openmax/openmax.gyp:il', + '../ui/ui.gyp:ui', + ], + 'defines': [ + 'MEDIA_IMPLEMENTATION', + ], + 'include_dirs': [ + '..', + ], + 'sources': [ + 'audio/android/audio_manager_android.cc', + 'audio/android/audio_manager_android.h', + 'audio/android/audio_track_output_android.cc', + 'audio/android/audio_track_output_android.h', + 'audio/android/opensles_input.cc', + 'audio/android/opensles_input.h', + 'audio/android/opensles_output.cc', + 'audio/android/opensles_output.h', + 'audio/async_socket_io_handler.h', + 'audio/async_socket_io_handler_posix.cc', + 'audio/async_socket_io_handler_win.cc', + 'audio/audio_buffers_state.cc', + 'audio/audio_buffers_state.h', + 'audio/audio_io.h', + 'audio/audio_input_controller.cc', + 'audio/audio_input_controller.h', + 'audio/audio_input_stream_impl.cc', + 'audio/audio_input_stream_impl.h', + 'audio/audio_device_name.cc', + 'audio/audio_device_name.h', + 'audio/audio_manager.cc', + 'audio/audio_manager.h', + 'audio/audio_manager_base.cc', + 'audio/audio_manager_base.h', + 'audio/audio_output_controller.cc', + 'audio/audio_output_controller.h', + 'audio/audio_output_dispatcher.cc', + 'audio/audio_output_dispatcher.h', + 'audio/audio_output_dispatcher_impl.cc', + 'audio/audio_output_dispatcher_impl.h', + 'audio/audio_output_mixer.cc', + 'audio/audio_output_mixer.h', + 'audio/audio_output_proxy.cc', + 'audio/audio_output_proxy.h', + 'audio/audio_parameters.cc', + 'audio/audio_parameters.h', + 'audio/audio_util.cc', + 'audio/audio_util.h', + 'audio/cross_process_notification.cc', + 'audio/cross_process_notification.h', + 'audio/cross_process_notification_win.cc', + 'audio/cross_process_notification_posix.cc', + 'audio/fake_audio_input_stream.cc', + 'audio/fake_audio_input_stream.h', + 'audio/fake_audio_output_stream.cc', + 'audio/fake_audio_output_stream.h', + 'audio/linux/audio_manager_linux.cc', + 'audio/linux/audio_manager_linux.h', + 'audio/linux/alsa_input.cc', + 'audio/linux/alsa_input.h', + 'audio/linux/alsa_output.cc', + 'audio/linux/alsa_output.h', + 'audio/linux/alsa_util.cc', + 'audio/linux/alsa_util.h', + 'audio/linux/alsa_wrapper.cc', + 'audio/linux/alsa_wrapper.h', + 'audio/linux/cras_output.cc', + 'audio/linux/cras_output.h', + 'audio/openbsd/audio_manager_openbsd.cc', + 'audio/openbsd/audio_manager_openbsd.h', + 'audio/mac/audio_input_mac.cc', + 'audio/mac/audio_input_mac.h', + 'audio/mac/audio_low_latency_input_mac.cc', + 'audio/mac/audio_low_latency_input_mac.h', + 'audio/mac/audio_low_latency_output_mac.cc', + 'audio/mac/audio_low_latency_output_mac.h', + 'audio/mac/audio_manager_mac.cc', + 'audio/mac/audio_manager_mac.h', + 'audio/mac/audio_output_mac.cc', + 'audio/mac/audio_output_mac.h', + 'audio/null_audio_sink.cc', + 'audio/null_audio_sink.h', + 'audio/pulse/pulse_output.cc', + 'audio/pulse/pulse_output.h', + 'audio/sample_rates.cc', + 'audio/sample_rates.h', + 'audio/simple_sources.cc', + 'audio/simple_sources.h', + 'audio/win/audio_low_latency_input_win.cc', + 'audio/win/audio_low_latency_input_win.h', + 'audio/win/audio_low_latency_output_win.cc', + 'audio/win/audio_low_latency_output_win.h', + 'audio/win/audio_manager_win.cc', + 'audio/win/audio_manager_win.h', + 'audio/win/avrt_wrapper_win.cc', + 'audio/win/avrt_wrapper_win.h', + 'audio/win/device_enumeration_win.cc', + 'audio/win/device_enumeration_win.h', + 'audio/win/wavein_input_win.cc', + 'audio/win/wavein_input_win.h', + 'audio/win/waveout_output_win.cc', + 'audio/win/waveout_output_win.h', + 'base/android/media_jni_registrar.cc', + 'base/android/media_jni_registrar.h', + 'base/audio_decoder.cc', + 'base/audio_decoder.h', + 'base/audio_decoder_config.cc', + 'base/audio_decoder_config.h', + 'base/audio_renderer.h', + 'base/audio_renderer_mixer.cc', + 'base/audio_renderer_mixer.h', + 'base/audio_renderer_mixer_input.cc', + 'base/audio_renderer_mixer_input.h', + 'base/bitstream_buffer.h', + 'base/buffers.cc', + 'base/buffers.h', + 'base/byte_queue.cc', + 'base/byte_queue.h', + 'base/channel_layout.cc', + 'base/channel_layout.h', + 'base/clock.cc', + 'base/clock.h', + 'base/composite_filter.cc', + 'base/composite_filter.h', + 'base/data_buffer.cc', + 'base/data_buffer.h', + 'base/data_source.cc', + 'base/data_source.h', + 'base/decoder_buffer.cc', + 'base/decoder_buffer.h', + 'base/decrypt_config.cc', + 'base/decrypt_config.h', + 'base/decryptor.h', + 'base/decryptor_client.h', + 'base/demuxer.cc', + 'base/demuxer.h', + 'base/demuxer_stream.cc', + 'base/demuxer_stream.h', + 'base/djb2.cc', + 'base/djb2.h', + 'base/filter_collection.cc', + 'base/filter_collection.h', + 'base/filter_host.h', + 'base/filters.cc', + 'base/filters.h', + 'base/h264_bitstream_converter.cc', + 'base/h264_bitstream_converter.h', + 'base/media.h', + 'base/media_android.cc', + 'base/media_export.h', + 'base/media_log.cc', + 'base/media_log.h', + 'base/media_log_event.h', + 'base/media_posix.cc', + 'base/media_switches.cc', + 'base/media_switches.h', + 'base/media_win.cc', + 'base/message_loop_factory.cc', + 'base/message_loop_factory.h', + 'base/pipeline.cc', + 'base/pipeline.h', + 'base/pipeline_status.cc', + 'base/pipeline_status.h', + 'base/ranges.cc', + 'base/ranges.h', + 'base/seekable_buffer.cc', + 'base/seekable_buffer.h', + 'base/state_matrix.cc', + 'base/state_matrix.h', + 'base/stream_parser.cc', + 'base/stream_parser.h', + 'base/stream_parser_buffer.cc', + 'base/stream_parser_buffer.h', + 'base/video_decoder.cc', + 'base/video_decoder.h', + 'base/video_decoder_config.cc', + 'base/video_decoder_config.h', + 'base/video_frame.cc', + 'base/video_frame.h', + 'base/video_renderer.h', + 'base/video_util.cc', + 'base/video_util.h', + 'crypto/aes_decryptor.cc', + 'crypto/aes_decryptor.h', + 'ffmpeg/ffmpeg_common.cc', + 'ffmpeg/ffmpeg_common.h', + 'ffmpeg/file_protocol.cc', + 'ffmpeg/file_protocol.h', + 'filters/audio_file_reader.cc', + 'filters/audio_file_reader.h', + 'filters/audio_renderer_algorithm.cc', + 'filters/audio_renderer_algorithm.h', + 'filters/audio_renderer_impl.cc', + 'filters/audio_renderer_impl.h', + 'filters/bitstream_converter.cc', + 'filters/bitstream_converter.h', + 'filters/chunk_demuxer.cc', + 'filters/chunk_demuxer.h', + 'filters/chunk_demuxer_client.h', + 'filters/dummy_demuxer.cc', + 'filters/dummy_demuxer.h', + 'filters/ffmpeg_audio_decoder.cc', + 'filters/ffmpeg_audio_decoder.h', + 'filters/ffmpeg_demuxer.cc', + 'filters/ffmpeg_demuxer.h', + 'filters/ffmpeg_h264_bitstream_converter.cc', + 'filters/ffmpeg_h264_bitstream_converter.h', + 'filters/ffmpeg_glue.cc', + 'filters/ffmpeg_glue.h', + 'filters/ffmpeg_video_decoder.cc', + 'filters/ffmpeg_video_decoder.h', + 'filters/file_data_source.cc', + 'filters/file_data_source.h', + 'filters/gpu_video_decoder.cc', + 'filters/gpu_video_decoder.h', + 'filters/in_memory_url_protocol.cc', + 'filters/in_memory_url_protocol.h', + 'filters/source_buffer_stream.cc', + 'filters/source_buffer_stream.h', + 'filters/video_frame_generator.cc', + 'filters/video_frame_generator.h', + 'filters/video_renderer_base.cc', + 'filters/video_renderer_base.h', + 'video/capture/fake_video_capture_device.cc', + 'video/capture/fake_video_capture_device.h', + 'video/capture/linux/video_capture_device_linux.cc', + 'video/capture/linux/video_capture_device_linux.h', + 'video/capture/mac/video_capture_device_mac.h', + 'video/capture/mac/video_capture_device_mac.mm', + 'video/capture/mac/video_capture_device_qtkit_mac.h', + 'video/capture/mac/video_capture_device_qtkit_mac.mm', + 'video/capture/video_capture.h', + 'video/capture/video_capture_device.h', + 'video/capture/video_capture_device_dummy.cc', + 'video/capture/video_capture_device_dummy.h', + 'video/capture/video_capture_proxy.cc', + 'video/capture/video_capture_proxy.h', + 'video/capture/video_capture_types.h', + 'video/capture/win/filter_base_win.cc', + 'video/capture/win/filter_base_win.h', + 'video/capture/win/pin_base_win.cc', + 'video/capture/win/pin_base_win.h', + 'video/capture/win/sink_filter_observer_win.h', + 'video/capture/win/sink_filter_win.cc', + 'video/capture/win/sink_filter_win.h', + 'video/capture/win/sink_input_pin_win.cc', + 'video/capture/win/sink_input_pin_win.h', + 'video/capture/win/video_capture_device_win.cc', + 'video/capture/win/video_capture_device_win.h', + 'video/picture.cc', + 'video/picture.h', + 'video/video_decode_accelerator.cc', + 'video/video_decode_accelerator.h', + 'webm/webm_constants.h', + 'webm/webm_cluster_parser.cc', + 'webm/webm_cluster_parser.h', + 'webm/webm_content_encodings.cc', + 'webm/webm_content_encodings.h', + 'webm/webm_content_encodings_client.cc', + 'webm/webm_content_encodings_client.h', + 'webm/webm_info_parser.cc', + 'webm/webm_info_parser.h', + 'webm/webm_parser.cc', + 'webm/webm_parser.h', + 'webm/webm_stream_parser.cc', + 'webm/webm_stream_parser.h', + 'webm/webm_tracks_parser.cc', + 'webm/webm_tracks_parser.h', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '..', + ], + }, + 'conditions': [ + # Android doesn't use ffmpeg, so make the dependency conditional + # and exclude the sources which depend on ffmpeg. + ['OS != \"android\"', { + 'dependencies': [ + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + }], + ['OS == \"android\"', { + 'sources!': [ + 'base/media_posix.cc', + 'ffmpeg/ffmpeg_common.cc', + 'ffmpeg/ffmpeg_common.h', + 'ffmpeg/file_protocol.cc', + 'ffmpeg/file_protocol.h', + 'filters/audio_file_reader.cc', + 'filters/audio_file_reader.h', + 'filters/bitstream_converter.cc', + 'filters/bitstream_converter.h', + 'filters/chunk_demuxer.cc', + 'filters/chunk_demuxer.h', + 'filters/chunk_demuxer_client.h', + 'filters/ffmpeg_audio_decoder.cc', + 'filters/ffmpeg_audio_decoder.h', + 'filters/ffmpeg_demuxer.cc', + 'filters/ffmpeg_demuxer.h', + 'filters/ffmpeg_h264_bitstream_converter.cc', + 'filters/ffmpeg_h264_bitstream_converter.h', + 'filters/ffmpeg_glue.cc', + 'filters/ffmpeg_glue.h', + 'filters/ffmpeg_video_decoder.cc', + 'filters/ffmpeg_video_decoder.h', + 'filters/gpu_video_decoder.cc', + 'filters/gpu_video_decoder.h', + 'webm/webm_cluster_parser.cc', + 'webm/webm_cluster_parser.h', + 'webm/webm_stream_parser.cc', + 'webm/webm_stream_parser.h', + ], + }], + # The below 'android' condition were added temporarily and should be + # removed in downstream, because there is no Java environment setup in + # upstream yet. + ['OS == \"android\"', { + 'sources!':[ + 'audio/android/audio_track_output_android.cc', + ], + 'sources':[ + 'audio/android/audio_track_output_stub_android.cc', + ], + 'link_settings': { + 'libraries': [ + '-lOpenSLES', + ], + }, + }], + ['OS==\"linux\" or OS==\"freebsd\" or OS==\"solaris\"', { + 'link_settings': { + 'libraries': [ + '-lasound', + ], + }, + }], + ['OS==\"openbsd\"', { + 'sources/': [ ['exclude', '/alsa_' ], + ['exclude', '/audio_manager_linux' ] ], + 'link_settings': { + 'libraries': [ + ], + }, + }], + ['OS!=\"openbsd\"', { + 'sources!': [ + 'audio/openbsd/audio_manager_openbsd.cc', + 'audio/openbsd/audio_manager_openbsd.h', + ], + }], + ['OS==\"linux\"', { + 'variables': { + 'conditions': [ + ['sysroot!=\"\"', { + 'pkg-config': '../build/linux/pkg-config-wrapper \"<(sysroot)\" \"<(target_arch)\"', + }, { + 'pkg-config': 'pkg-config' + }], + ], + }, + 'conditions': [ + ['use_cras == 1', { + 'cflags': [ + '<!@(<(pkg-config) --cflags libcras)', + ], + 'link_settings': { + 'libraries': [ + '<!@(<(pkg-config) --libs libcras)', + ], + }, + 'defines': [ + 'USE_CRAS', + ], + }, { # else: use_cras == 0 + 'sources!': [ + 'audio/linux/cras_output.cc', + 'audio/linux/cras_output.h', + ], + }], + ], + }], + ['os_posix == 1', { + 'conditions': [ + ['use_pulseaudio == 1', { + 'cflags': [ + '<!@(pkg-config --cflags libpulse)', + ], + 'link_settings': { + 'libraries': [ + '<!@(pkg-config --libs-only-l libpulse)', + ], + }, + 'defines': [ + 'USE_PULSEAUDIO', + ], + }, { # else: use_pulseaudio == 0 + 'sources!': [ + 'audio/pulse/pulse_output.cc', + 'audio/pulse/pulse_output.h', + ], + }], + ], + }], + ['os_posix == 1 and OS != \"android\"', { + # Video capture isn't supported in Android yet. + 'sources!': [ + 'video/capture/video_capture_device_dummy.cc', + 'video/capture/video_capture_device_dummy.h', + ], + }], + ['OS==\"mac\"', { + 'link_settings': { + 'libraries': [ + '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework', + '$(SDKROOT)/System/Library/Frameworks/AudioToolbox.framework', + '$(SDKROOT)/System/Library/Frameworks/CoreAudio.framework', + '$(SDKROOT)/System/Library/Frameworks/CoreVideo.framework', + '$(SDKROOT)/System/Library/Frameworks/QTKit.framework', + ], + }, + }], + ['OS==\"win\"', { + 'sources!': [ + 'audio/pulse/pulse_output.cc', + 'audio/pulse/pulse_output.h', + 'video/capture/video_capture_device_dummy.cc', + 'video/capture/video_capture_device_dummy.h', + ], + }], + ['proprietary_codecs==1 or branding==\"Chrome\"', { + 'sources': [ + 'mp4/avc.cc', + 'mp4/avc.h', + 'mp4/box_definitions.cc', + 'mp4/box_definitions.h', + 'mp4/box_reader.cc', + 'mp4/box_reader.h', + 'mp4/cenc.cc', + 'mp4/cenc.h', + 'mp4/mp4_stream_parser.cc', + 'mp4/mp4_stream_parser.h', + 'mp4/offset_byte_queue.cc', + 'mp4/offset_byte_queue.h', + 'mp4/track_run_iterator.cc', + 'mp4/track_run_iterator.h', + ], + }], + ], + }, + { + 'target_name': 'yuv_convert', + 'type': 'static_library', + 'include_dirs': [ + '..', + ], + 'conditions': [ + ['order_profiling != 0', { + 'target_conditions' : [ + ['_toolset==\"target\"', { + 'cflags!': [ '-finstrument-functions' ], + }], + ], + }], + [ 'target_arch == \"ia32\" or target_arch == \"x64\"', { + 'dependencies': [ + 'yuv_convert_simd_x86', + ], + }], + [ 'target_arch == \"arm\"', { + 'dependencies': [ + 'yuv_convert_simd_arm', + ], + }], + ], + 'sources': [ + 'base/yuv_convert.cc', + 'base/yuv_convert.h', + ], + }, + { + 'target_name': 'yuv_convert_simd_x86', + 'type': 'static_library', + 'include_dirs': [ + '..', + ], + 'sources': [ + 'base/simd/convert_rgb_to_yuv_c.cc', + 'base/simd/convert_rgb_to_yuv_sse2.cc', + 'base/simd/convert_rgb_to_yuv_ssse3.asm', + 'base/simd/convert_rgb_to_yuv_ssse3.cc', + 'base/simd/convert_rgb_to_yuv_ssse3.inc', + 'base/simd/convert_yuv_to_rgb_c.cc', + 'base/simd/convert_yuv_to_rgb_x86.cc', + 'base/simd/convert_yuv_to_rgb_mmx.asm', + 'base/simd/convert_yuv_to_rgb_mmx.inc', + 'base/simd/convert_yuv_to_rgb_sse.asm', + 'base/simd/filter_yuv.h', + 'base/simd/filter_yuv_c.cc', + 'base/simd/filter_yuv_mmx.cc', + 'base/simd/filter_yuv_sse2.cc', + 'base/simd/linear_scale_yuv_to_rgb_mmx.asm', + 'base/simd/linear_scale_yuv_to_rgb_mmx.inc', + 'base/simd/linear_scale_yuv_to_rgb_sse.asm', + 'base/simd/scale_yuv_to_rgb_mmx.asm', + 'base/simd/scale_yuv_to_rgb_mmx.inc', + 'base/simd/scale_yuv_to_rgb_sse.asm', + 'base/simd/yuv_to_rgb_table.cc', + 'base/simd/yuv_to_rgb_table.h', + ], + 'conditions': [ + ['order_profiling != 0', { + 'target_conditions' : [ + ['_toolset==\"target\"', { + 'cflags!': [ '-finstrument-functions' ], + }], + ], + }], + [ 'target_arch == \"x64\"', { + # Source files optimized for X64 systems. + 'sources': [ + 'base/simd/linear_scale_yuv_to_rgb_mmx_x64.asm', + 'base/simd/scale_yuv_to_rgb_sse2_x64.asm', + ], + }], + [ 'os_posix == 1 and OS != \"mac\" and OS != \"android\"', { + 'cflags': [ + '-msse2', + ], + }], + [ 'OS == \"mac\"', { + 'configurations': { + 'Debug': { + 'xcode_settings': { + # gcc on the mac builds horribly unoptimized sse code in debug + # mode. Since this is rarely going to be debugged, run with full + # optimizations in Debug as well as Release. + 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 + }, + }, + }, + }], + [ 'OS==\"win\"', { + 'variables': { + 'yasm_flags': [ + '-DWIN32', + '-DMSVC', + '-DCHROMIUM', + '-Isimd', + ], + }, + }], + [ 'OS==\"mac\"', { + 'variables': { + 'yasm_flags': [ + '-DPREFIX', + '-DMACHO', + '-DCHROMIUM', + '-Isimd', + ], + }, + }], + [ 'os_posix==1 and OS!=\"mac\"', { + 'variables': { + 'conditions': [ + [ 'target_arch==\"ia32\"', { + 'yasm_flags': [ + '-DX86_32', + '-DELF', + '-DCHROMIUM', + '-Isimd', + ], + }, { + 'yasm_flags': [ + '-DARCH_X86_64', + '-DELF', + '-DPIC', + '-DCHROMIUM', + '-Isimd', + ], + }], + ], + }, + }], + ], + 'variables': { + 'yasm_output_path': '<(SHARED_INTERMEDIATE_DIR)/media', + }, + 'msvs_2010_disable_uldi_when_referenced': 1, + 'includes': [ + '../third_party/yasm/yasm_compile.gypi', + ], + }, + { + 'target_name': 'yuv_convert_simd_arm', + 'type': 'static_library', + 'include_dirs': [ + '..', + ], + 'sources': [ + 'base/simd/convert_rgb_to_yuv_c.cc', + 'base/simd/convert_rgb_to_yuv.h', + 'base/simd/convert_yuv_to_rgb_c.cc', + 'base/simd/convert_yuv_to_rgb.h', + 'base/simd/filter_yuv.h', + 'base/simd/filter_yuv_c.cc', + 'base/simd/yuv_to_rgb_table.cc', + 'base/simd/yuv_to_rgb_table.h', + ], + }, + { + 'target_name': 'media_unittests', + 'type': 'executable', + 'dependencies': [ + 'media', + 'media_test_support', + 'yuv_convert', + '../base/base.gyp:base', + '../base/base.gyp:base_i18n', + '../base/base.gyp:test_support_base', + '../testing/gmock.gyp:gmock', + '../testing/gtest.gyp:gtest', + '../ui/ui.gyp:ui', + ], + 'sources': [ + 'audio/async_socket_io_handler_unittest.cc', + 'audio/audio_input_controller_unittest.cc', + 'audio/audio_input_device_unittest.cc', + 'audio/audio_input_unittest.cc', + 'audio/audio_input_volume_unittest.cc', + 'audio/audio_low_latency_input_output_unittest.cc', + 'audio/audio_output_controller_unittest.cc', + 'audio/audio_output_proxy_unittest.cc', + 'audio/audio_parameters_unittest.cc', + 'audio/audio_util_unittest.cc', + 'audio/cross_process_notification_unittest.cc', + 'audio/linux/alsa_output_unittest.cc', + 'audio/mac/audio_low_latency_input_mac_unittest.cc', + 'audio/mac/audio_output_mac_unittest.cc', + 'audio/simple_sources_unittest.cc', + 'audio/win/audio_low_latency_input_win_unittest.cc', + 'audio/win/audio_low_latency_output_win_unittest.cc', + 'audio/win/audio_output_win_unittest.cc', + 'base/audio_renderer_mixer_unittest.cc', + 'base/audio_renderer_mixer_input_unittest.cc', + 'base/buffers_unittest.cc', + 'base/clock_unittest.cc', + 'base/composite_filter_unittest.cc', + 'base/data_buffer_unittest.cc', + 'base/decoder_buffer_unittest.cc', + 'base/djb2_unittest.cc', + 'base/fake_audio_render_callback.cc', + 'base/fake_audio_render_callback.h', + 'base/filter_collection_unittest.cc', + 'base/h264_bitstream_converter_unittest.cc', + 'base/pipeline_unittest.cc', + 'base/ranges_unittest.cc', + 'base/run_all_unittests.cc', + 'base/seekable_buffer_unittest.cc', + 'base/state_matrix_unittest.cc', + 'base/test_data_util.cc', + 'base/test_data_util.h', + 'base/video_frame_unittest.cc', + 'base/video_util_unittest.cc', + 'base/yuv_convert_unittest.cc', + 'crypto/aes_decryptor_unittest.cc', + 'ffmpeg/ffmpeg_common_unittest.cc', + 'filters/audio_renderer_algorithm_unittest.cc', + 'filters/audio_renderer_impl_unittest.cc', + 'filters/bitstream_converter_unittest.cc', + 'filters/chunk_demuxer_unittest.cc', + 'filters/ffmpeg_audio_decoder_unittest.cc', + 'filters/ffmpeg_decoder_unittest.h', + 'filters/ffmpeg_demuxer_unittest.cc', + 'filters/ffmpeg_glue_unittest.cc', + 'filters/ffmpeg_h264_bitstream_converter_unittest.cc', + 'filters/ffmpeg_video_decoder_unittest.cc', + 'filters/file_data_source_unittest.cc', + 'filters/pipeline_integration_test.cc', + 'filters/pipeline_integration_test_base.cc', + 'filters/source_buffer_stream_unittest.cc', + 'filters/video_renderer_base_unittest.cc', + 'video/capture/video_capture_device_unittest.cc', + 'webm/cluster_builder.cc', + 'webm/cluster_builder.h', + 'webm/webm_cluster_parser_unittest.cc', + 'webm/webm_content_encodings_client_unittest.cc', + 'webm/webm_parser_unittest.cc', + ], + 'conditions': [ + ['os_posix==1 and OS!=\"mac\"', { + 'conditions': [ + ['linux_use_tcmalloc==1', { + 'dependencies': [ + '../base/allocator/allocator.gyp:allocator', + ], + }], + ], + }], + ['OS != \"android\"', { + 'dependencies': [ + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + }], + ['OS == \"android\"', { + 'sources!': [ + 'audio/audio_input_volume_unittest.cc', + 'base/test_data_util.cc', + 'base/test_data_util.h', + 'ffmpeg/ffmpeg_common_unittest.cc', + 'filters/ffmpeg_audio_decoder_unittest.cc', + 'filters/bitstream_converter_unittest.cc', + 'filters/chunk_demuxer_unittest.cc', + 'filters/ffmpeg_demuxer_unittest.cc', + 'filters/ffmpeg_glue_unittest.cc', + 'filters/ffmpeg_h264_bitstream_converter_unittest.cc', + 'filters/ffmpeg_video_decoder_unittest.cc', + 'filters/pipeline_integration_test.cc', + 'filters/pipeline_integration_test_base.cc', + 'mp4/mp4_stream_parser_unittest.cc', + 'webm/webm_cluster_parser_unittest.cc', + ], + }], + ['OS == \"linux\"', { + 'conditions': [ + ['use_cras == 1', { + 'sources': [ + 'audio/linux/cras_output_unittest.cc', + ], + 'defines': [ + 'USE_CRAS', + ], + }], + ], + }], + [ 'target_arch==\"ia32\" or target_arch==\"x64\"', { + 'sources': [ + 'base/simd/convert_rgb_to_yuv_unittest.cc', + ], + }], + ['proprietary_codecs==1 or branding==\"Chrome\"', { + 'sources': [ + 'mp4/avc_unittest.cc', + 'mp4/box_reader_unittest.cc', + 'mp4/mp4_stream_parser_unittest.cc', + 'mp4/offset_byte_queue_unittest.cc', + ], + }], + ], + }, + { + 'target_name': 'media_test_support', + 'type': 'static_library', + 'dependencies': [ + 'media', + '../base/base.gyp:base', + '../testing/gmock.gyp:gmock', + '../testing/gtest.gyp:gtest', + ], + 'sources': [ + 'audio/test_audio_input_controller_factory.cc', + 'audio/test_audio_input_controller_factory.h', + 'base/mock_callback.cc', + 'base/mock_callback.h', + 'base/mock_data_source_host.cc', + 'base/mock_data_source_host.h', + 'base/mock_demuxer_host.cc', + 'base/mock_demuxer_host.h', + 'base/mock_filter_host.cc', + 'base/mock_filter_host.h', + 'base/mock_filters.cc', + 'base/mock_filters.h', + ], + }, + { + 'target_name': 'scaler_bench', + 'type': 'executable', + 'dependencies': [ + 'media', + 'yuv_convert', + '../base/base.gyp:base', + '../skia/skia.gyp:skia', + ], + 'sources': [ + 'tools/scaler_bench/scaler_bench.cc', + ], + }, + { + 'target_name': 'qt_faststart', + 'type': 'executable', + 'sources': [ + 'tools/qt_faststart/qt_faststart.c' + ], + }, + { + 'target_name': 'seek_tester', + 'type': 'executable', + 'dependencies': [ + 'media', + '../base/base.gyp:base', + ], + 'sources': [ + 'tools/seek_tester/seek_tester.cc', + ], + }, + ], + 'conditions': [ + ['OS==\"win\"', { + 'targets': [ + { + 'target_name': 'player_wtl', + 'type': 'executable', + 'dependencies': [ + 'media', + 'yuv_convert', + '../base/base.gyp:base', + '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../ui/ui.gyp:ui', + ], + 'include_dirs': [ + '<(DEPTH)/third_party/wtl/include', + ], + 'sources': [ + 'tools/player_wtl/list.h', + 'tools/player_wtl/mainfrm.h', + 'tools/player_wtl/movie.cc', + 'tools/player_wtl/movie.h', + 'tools/player_wtl/player_wtl.cc', + 'tools/player_wtl/player_wtl.rc', + 'tools/player_wtl/props.h', + 'tools/player_wtl/seek.h', + 'tools/player_wtl/resource.h', + 'tools/player_wtl/view.h', + ], + 'msvs_settings': { + 'VCLinkerTool': { + 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS + }, + }, + 'defines': [ + '_CRT_SECURE_NO_WARNINGS=1', + ], + }, + ], + }], + ['OS == \"win\" or toolkit_uses_gtk == 1', { + 'targets': [ + { + 'target_name': 'shader_bench', + 'type': 'executable', + 'dependencies': [ + 'media', + 'yuv_convert', + '../base/base.gyp:base', + '../ui/gl/gl.gyp:gl', + ], + 'sources': [ + 'tools/shader_bench/shader_bench.cc', + 'tools/shader_bench/cpu_color_painter.cc', + 'tools/shader_bench/cpu_color_painter.h', + 'tools/shader_bench/gpu_color_painter.cc', + 'tools/shader_bench/gpu_color_painter.h', + 'tools/shader_bench/gpu_painter.cc', + 'tools/shader_bench/gpu_painter.h', + 'tools/shader_bench/painter.cc', + 'tools/shader_bench/painter.h', + 'tools/shader_bench/window.cc', + 'tools/shader_bench/window.h', + ], + 'conditions': [ + ['toolkit_uses_gtk == 1', { + 'dependencies': [ + '../build/linux/system.gyp:gtk', + ], + 'sources': [ + 'tools/shader_bench/window_linux.cc', + ], + }], + ['OS==\"win\"', { + 'dependencies': [ + '../third_party/angle/src/build_angle.gyp:libEGL', + '../third_party/angle/src/build_angle.gyp:libGLESv2', + ], + 'sources': [ + 'tools/shader_bench/window_win.cc', + ], + }], + ], + }, + ], + }], + ['OS == \"linux\" and target_arch != \"arm\"', { + 'targets': [ + { + 'target_name': 'tile_render_bench', + 'type': 'executable', + 'dependencies': [ + '../base/base.gyp:base', + '../ui/gl/gl.gyp:gl', + ], + 'libraries': [ + '-lGL', + '-ldl', + ], + 'sources': [ + 'tools/tile_render_bench/tile_render_bench.cc', + ], + }, + ], + }], + ['os_posix == 1 and OS != \"mac\" and OS != \"android\"', { + 'targets': [ + { + 'target_name': 'player_x11', + 'type': 'executable', + 'dependencies': [ + 'media', + 'yuv_convert', + '../base/base.gyp:base', + '../ui/gl/gl.gyp:gl', + ], + 'link_settings': { + 'libraries': [ + '-ldl', + '-lX11', + '-lXrender', + '-lXext', + ], + }, + 'sources': [ + 'tools/player_x11/data_source_logger.cc', + 'tools/player_x11/data_source_logger.h', + 'tools/player_x11/gl_video_renderer.cc', + 'tools/player_x11/gl_video_renderer.h', + 'tools/player_x11/player_x11.cc', + 'tools/player_x11/x11_video_renderer.cc', + 'tools/player_x11/x11_video_renderer.h', + ], + }, + ], + }], + ['OS == \"android\"', { + 'targets': [ + { + 'target_name': 'player_android', + 'type': 'static_library', + 'sources': [ + 'base/android/media_player_bridge.cc', + 'base/android/media_player_bridge.h', + ], + 'dependencies': [ + '../base/base.gyp:base', + ], + 'include_dirs': [ + '<(SHARED_INTERMEDIATE_DIR)/media', + ], + 'actions': [ + { + 'action_name': 'generate-jni-headers', + 'inputs': [ + '../base/android/jni_generator/jni_generator.py', + 'base/android/java/src/org/chromium/media/MediaPlayerListener.java', + ], + 'outputs': [ + '<(SHARED_INTERMEDIATE_DIR)/media/jni/media_player_listener_jni.h', + ], + 'action': [ + 'python', + '<(DEPTH)/base/android/jni_generator/jni_generator.py', + '-o', + '<@(_inputs)', + '<@(_outputs)', + ], + }, + ], + }, + { + 'target_name': 'media_java', + 'type': 'none', + 'dependencies': [ '../base/base.gyp:base_java' ], + 'variables': { + 'package_name': 'media', + 'java_in_dir': 'base/android/java', + }, + 'includes': [ '../build/java.gypi' ], + }, + + ], + }, { # OS != \"android\"' + # Android does not use ffmpeg, so disable the targets which require it. + 'targets': [ + { + 'target_name': 'ffmpeg_unittests', + 'type': 'executable', + 'dependencies': [ + 'media', + 'media_test_support', + '../base/base.gyp:base', + '../base/base.gyp:base_i18n', + '../base/base.gyp:test_support_base', + '../base/base.gyp:test_support_perf', + '../testing/gtest.gyp:gtest', + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + 'sources': [ + 'ffmpeg/ffmpeg_unittest.cc', + ], + 'conditions': [ + ['toolkit_uses_gtk == 1', { + 'dependencies': [ + # Needed for the following #include chain: + # base/run_all_unittests.cc + # ../base/test_suite.h + # gtk/gtk.h + '../build/linux/system.gyp:gtk', + ], + 'conditions': [ + ['linux_use_tcmalloc==1', { + 'dependencies': [ + '../base/allocator/allocator.gyp:allocator', + ], + }], + ], + }], + ], + }, + { + 'target_name': 'ffmpeg_regression_tests', + 'type': 'executable', + 'dependencies': [ + 'media', + 'media_test_support', + '../base/base.gyp:test_support_base', + '../testing/gmock.gyp:gmock', + '../testing/gtest.gyp:gtest', + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + 'sources': [ + 'base/test_data_util.cc', + 'base/run_all_unittests.cc', + 'ffmpeg/ffmpeg_regression_tests.cc', + 'filters/pipeline_integration_test_base.cc', + ], + 'conditions': [ + ['os_posix==1 and OS!=\"mac\"', { + 'conditions': [ + ['linux_use_tcmalloc==1', { + 'dependencies': [ + '../base/allocator/allocator.gyp:allocator', + ], + }], + ], + }], + ], + }, + { + 'target_name': 'ffmpeg_tests', + 'type': 'executable', + 'dependencies': [ + 'media', + '../base/base.gyp:base', + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + 'sources': [ + 'test/ffmpeg_tests/ffmpeg_tests.cc', + ], + }, + { + 'target_name': 'media_bench', + 'type': 'executable', + 'dependencies': [ + 'media', + '../base/base.gyp:base', + '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', + ], + 'sources': [ + 'tools/media_bench/media_bench.cc', + ], + }, + ], + }] + ], +} +" 0 64 (face font-lock-comment-face) 64 137 (face font-lock-comment-face) 137 166 (face font-lock-comment-face) 166 171 nil 171 172 (face font-lock-string-face) 172 181 (face font-lock-keyword-face) 181 182 (face font-lock-string-face) 182 190 nil 190 191 (face font-lock-string-face) 191 204 (face font-lock-variable-name-face) 204 205 (face font-lock-string-face) 205 214 nil 214 269 (face font-lock-comment-face) 269 273 nil 273 274 (face font-lock-string-face) 274 289 (face font-lock-variable-name-face) 289 290 (face font-lock-string-face) 290 299 nil 299 365 (face font-lock-comment-face) 365 369 nil 369 370 (face font-lock-string-face) 370 379 (face font-lock-variable-name-face) 379 380 (face font-lock-string-face) 380 392 nil 392 393 (face font-lock-string-face) 393 400 (face font-lock-keyword-face) 400 401 (face font-lock-string-face) 401 417 nil 417 418 (face font-lock-string-face) 418 429 (face font-lock-keyword-face) 429 430 (face font-lock-string-face) 430 432 nil 432 433 (face font-lock-string-face) 433 438 (face font-lock-function-name-face) 438 439 (face font-lock-string-face) 439 447 nil 447 448 (face font-lock-string-face) 448 452 (face font-lock-keyword-face) 452 453 (face font-lock-string-face) 453 455 nil 455 458 (face font-lock-string-face) 458 467 (face font-lock-variable-name-face) 467 469 (face font-lock-string-face) 469 477 nil 477 478 (face font-lock-string-face) 478 490 (face font-lock-keyword-face) 490 491 (face font-lock-string-face) 491 503 nil 503 504 (face font-lock-string-face) 504 515 (face font-lock-function-name-face) 515 516 (face font-lock-string-face) 516 526 nil 526 527 (face font-lock-string-face) 527 548 (face font-lock-function-name-face) 548 549 (face font-lock-string-face) 549 559 nil 559 560 (face font-lock-string-face) 560 643 (face font-lock-function-name-face) 643 644 (face font-lock-string-face) 644 654 nil 654 655 (face font-lock-string-face) 655 696 (face font-lock-function-name-face) 696 697 (face font-lock-string-face) 697 707 nil 707 708 (face font-lock-string-face) 708 735 (face font-lock-function-name-face) 735 736 (face font-lock-string-face) 736 746 nil 746 747 (face font-lock-string-face) 747 784 (face font-lock-function-name-face) 784 785 (face font-lock-string-face) 785 795 nil 795 796 (face font-lock-string-face) 796 811 (face font-lock-function-name-face) 811 812 (face font-lock-string-face) 812 829 nil 829 830 (face font-lock-string-face) 830 837 (face font-lock-keyword-face) 837 838 (face font-lock-string-face) 838 850 nil 850 851 (face font-lock-string-face) 851 871 (face font-lock-preprocessor-face) 871 872 (face font-lock-string-face) 872 889 nil 889 890 (face font-lock-string-face) 890 902 (face font-lock-keyword-face) 902 903 (face font-lock-string-face) 903 915 nil 915 916 (face font-lock-string-face) 916 918 (face font-lock-constant-face) 918 919 (face font-lock-string-face) 919 936 nil 936 937 (face font-lock-string-face) 937 944 (face font-lock-keyword-face) 944 945 (face font-lock-string-face) 945 957 nil 957 958 (face font-lock-string-face) 958 996 (face font-lock-constant-face) 996 997 (face font-lock-string-face) 997 1007 nil 1007 1008 (face font-lock-string-face) 1008 1045 (face font-lock-constant-face) 1045 1046 (face font-lock-string-face) 1046 1056 nil 1056 1057 (face font-lock-string-face) 1057 1100 (face font-lock-constant-face) 1100 1101 (face font-lock-string-face) 1101 1111 nil 1111 1112 (face font-lock-string-face) 1112 1154 (face font-lock-constant-face) 1154 1155 (face font-lock-string-face) 1155 1165 nil 1165 1166 (face font-lock-string-face) 1166 1197 (face font-lock-constant-face) 1197 1198 (face font-lock-string-face) 1198 1208 nil 1208 1209 (face font-lock-string-face) 1209 1239 (face font-lock-constant-face) 1239 1240 (face font-lock-string-face) 1240 1250 nil 1250 1251 (face font-lock-string-face) 1251 1283 (face font-lock-constant-face) 1283 1284 (face font-lock-string-face) 1284 1294 nil 1294 1295 (face font-lock-string-face) 1295 1326 (face font-lock-constant-face) 1326 1327 (face font-lock-string-face) 1327 1337 nil 1337 1338 (face font-lock-string-face) 1338 1369 (face font-lock-constant-face) 1369 1370 (face font-lock-string-face) 1370 1380 nil 1380 1381 (face font-lock-string-face) 1381 1419 (face font-lock-constant-face) 1419 1420 (face font-lock-string-face) 1420 1430 nil 1430 1431 (face font-lock-string-face) 1431 1467 (face font-lock-constant-face) 1467 1468 (face font-lock-string-face) 1468 1478 nil 1478 1479 (face font-lock-string-face) 1479 1507 (face font-lock-constant-face) 1507 1508 (face font-lock-string-face) 1508 1518 nil 1518 1519 (face font-lock-string-face) 1519 1546 (face font-lock-constant-face) 1546 1547 (face font-lock-string-face) 1547 1557 nil 1557 1558 (face font-lock-string-face) 1558 1574 (face font-lock-constant-face) 1574 1575 (face font-lock-string-face) 1575 1585 nil 1585 1586 (face font-lock-string-face) 1586 1617 (face font-lock-constant-face) 1617 1618 (face font-lock-string-face) 1618 1628 nil 1628 1629 (face font-lock-string-face) 1629 1659 (face font-lock-constant-face) 1659 1660 (face font-lock-string-face) 1660 1670 nil 1670 1671 (face font-lock-string-face) 1671 1703 (face font-lock-constant-face) 1703 1704 (face font-lock-string-face) 1704 1714 nil 1714 1715 (face font-lock-string-face) 1715 1746 (face font-lock-constant-face) 1746 1747 (face font-lock-string-face) 1747 1757 nil 1757 1758 (face font-lock-string-face) 1758 1784 (face font-lock-constant-face) 1784 1785 (face font-lock-string-face) 1785 1795 nil 1795 1796 (face font-lock-string-face) 1796 1821 (face font-lock-constant-face) 1821 1822 (face font-lock-string-face) 1822 1832 nil 1832 1833 (face font-lock-string-face) 1833 1855 (face font-lock-constant-face) 1855 1856 (face font-lock-string-face) 1856 1866 nil 1866 1867 (face font-lock-string-face) 1867 1888 (face font-lock-constant-face) 1888 1889 (face font-lock-string-face) 1889 1899 nil 1899 1900 (face font-lock-string-face) 1900 1927 (face font-lock-constant-face) 1927 1928 (face font-lock-string-face) 1928 1938 nil 1938 1939 (face font-lock-string-face) 1939 1965 (face font-lock-constant-face) 1965 1966 (face font-lock-string-face) 1966 1976 nil 1976 1977 (face font-lock-string-face) 1977 2009 (face font-lock-constant-face) 2009 2010 (face font-lock-string-face) 2010 2020 nil 2020 2021 (face font-lock-string-face) 2021 2052 (face font-lock-constant-face) 2052 2053 (face font-lock-string-face) 2053 2063 nil 2063 2064 (face font-lock-string-face) 2064 2096 (face font-lock-constant-face) 2096 2097 (face font-lock-string-face) 2097 2107 nil 2107 2108 (face font-lock-string-face) 2108 2139 (face font-lock-constant-face) 2139 2140 (face font-lock-string-face) 2140 2150 nil 2150 2151 (face font-lock-string-face) 2151 2188 (face font-lock-constant-face) 2188 2189 (face font-lock-string-face) 2189 2199 nil 2199 2200 (face font-lock-string-face) 2200 2236 (face font-lock-constant-face) 2236 2237 (face font-lock-string-face) 2237 2247 nil 2247 2248 (face font-lock-string-face) 2248 2275 (face font-lock-constant-face) 2275 2276 (face font-lock-string-face) 2276 2286 nil 2286 2287 (face font-lock-string-face) 2287 2313 (face font-lock-constant-face) 2313 2314 (face font-lock-string-face) 2314 2324 nil 2324 2325 (face font-lock-string-face) 2325 2352 (face font-lock-constant-face) 2352 2353 (face font-lock-string-face) 2353 2363 nil 2363 2364 (face font-lock-string-face) 2364 2390 (face font-lock-constant-face) 2390 2391 (face font-lock-string-face) 2391 2401 nil 2401 2402 (face font-lock-string-face) 2402 2427 (face font-lock-constant-face) 2427 2428 (face font-lock-string-face) 2428 2438 nil 2438 2439 (face font-lock-string-face) 2439 2463 (face font-lock-constant-face) 2463 2464 (face font-lock-string-face) 2464 2474 nil 2474 2475 (face font-lock-string-face) 2475 2494 (face font-lock-constant-face) 2494 2495 (face font-lock-string-face) 2495 2505 nil 2505 2506 (face font-lock-string-face) 2506 2524 (face font-lock-constant-face) 2524 2525 (face font-lock-string-face) 2525 2535 nil 2535 2536 (face font-lock-string-face) 2536 2571 (face font-lock-constant-face) 2571 2572 (face font-lock-string-face) 2572 2582 nil 2582 2583 (face font-lock-string-face) 2583 2617 (face font-lock-constant-face) 2617 2618 (face font-lock-string-face) 2618 2628 nil 2628 2629 (face font-lock-string-face) 2629 2668 (face font-lock-constant-face) 2668 2669 (face font-lock-string-face) 2669 2679 nil 2679 2680 (face font-lock-string-face) 2680 2721 (face font-lock-constant-face) 2721 2722 (face font-lock-string-face) 2722 2732 nil 2732 2733 (face font-lock-string-face) 2733 2765 (face font-lock-constant-face) 2765 2766 (face font-lock-string-face) 2766 2776 nil 2776 2777 (face font-lock-string-face) 2777 2808 (face font-lock-constant-face) 2808 2809 (face font-lock-string-face) 2809 2819 nil 2819 2820 (face font-lock-string-face) 2820 2853 (face font-lock-constant-face) 2853 2854 (face font-lock-string-face) 2854 2864 nil 2864 2865 (face font-lock-string-face) 2865 2897 (face font-lock-constant-face) 2897 2898 (face font-lock-string-face) 2898 2908 nil 2908 2909 (face font-lock-string-face) 2909 2943 (face font-lock-constant-face) 2943 2944 (face font-lock-string-face) 2944 2954 nil 2954 2955 (face font-lock-string-face) 2955 2988 (face font-lock-constant-face) 2988 2989 (face font-lock-string-face) 2989 2999 nil 2999 3000 (face font-lock-string-face) 3000 3025 (face font-lock-constant-face) 3025 3026 (face font-lock-string-face) 3026 3036 nil 3036 3037 (face font-lock-string-face) 3037 3061 (face font-lock-constant-face) 3061 3062 (face font-lock-string-face) 3062 3072 nil 3072 3073 (face font-lock-string-face) 3073 3099 (face font-lock-constant-face) 3099 3100 (face font-lock-string-face) 3100 3110 nil 3110 3111 (face font-lock-string-face) 3111 3136 (face font-lock-constant-face) 3136 3137 (face font-lock-string-face) 3137 3147 nil 3147 3148 (face font-lock-string-face) 3148 3172 (face font-lock-constant-face) 3172 3173 (face font-lock-string-face) 3173 3183 nil 3183 3184 (face font-lock-string-face) 3184 3207 (face font-lock-constant-face) 3207 3208 (face font-lock-string-face) 3208 3218 nil 3218 3219 (face font-lock-string-face) 3219 3246 (face font-lock-constant-face) 3246 3247 (face font-lock-string-face) 3247 3257 nil 3257 3258 (face font-lock-string-face) 3258 3284 (face font-lock-constant-face) 3284 3285 (face font-lock-string-face) 3285 3295 nil 3295 3296 (face font-lock-string-face) 3296 3322 (face font-lock-constant-face) 3322 3323 (face font-lock-string-face) 3323 3333 nil 3333 3334 (face font-lock-string-face) 3334 3359 (face font-lock-constant-face) 3359 3360 (face font-lock-string-face) 3360 3370 nil 3370 3371 (face font-lock-string-face) 3371 3409 (face font-lock-constant-face) 3409 3410 (face font-lock-string-face) 3410 3420 nil 3420 3421 (face font-lock-string-face) 3421 3458 (face font-lock-constant-face) 3458 3459 (face font-lock-string-face) 3459 3469 nil 3469 3470 (face font-lock-string-face) 3470 3498 (face font-lock-constant-face) 3498 3499 (face font-lock-string-face) 3499 3509 nil 3509 3510 (face font-lock-string-face) 3510 3537 (face font-lock-constant-face) 3537 3538 (face font-lock-string-face) 3538 3548 nil 3548 3549 (face font-lock-string-face) 3549 3589 (face font-lock-constant-face) 3589 3590 (face font-lock-string-face) 3590 3600 nil 3600 3601 (face font-lock-string-face) 3601 3640 (face font-lock-constant-face) 3640 3641 (face font-lock-string-face) 3641 3651 nil 3651 3652 (face font-lock-string-face) 3652 3693 (face font-lock-constant-face) 3693 3694 (face font-lock-string-face) 3694 3704 nil 3704 3705 (face font-lock-string-face) 3705 3745 (face font-lock-constant-face) 3745 3746 (face font-lock-string-face) 3746 3756 nil 3756 3757 (face font-lock-string-face) 3757 3787 (face font-lock-constant-face) 3787 3788 (face font-lock-string-face) 3788 3798 nil 3798 3799 (face font-lock-string-face) 3799 3828 (face font-lock-constant-face) 3828 3829 (face font-lock-string-face) 3829 3839 nil 3839 3840 (face font-lock-string-face) 3840 3869 (face font-lock-constant-face) 3869 3870 (face font-lock-string-face) 3870 3880 nil 3880 3881 (face font-lock-string-face) 3881 3909 (face font-lock-constant-face) 3909 3910 (face font-lock-string-face) 3910 3920 nil 3920 3921 (face font-lock-string-face) 3921 3945 (face font-lock-constant-face) 3945 3946 (face font-lock-string-face) 3946 3956 nil 3956 3957 (face font-lock-string-face) 3957 3980 (face font-lock-constant-face) 3980 3981 (face font-lock-string-face) 3981 3991 nil 3991 3992 (face font-lock-string-face) 3992 4019 (face font-lock-constant-face) 4019 4020 (face font-lock-string-face) 4020 4030 nil 4030 4031 (face font-lock-string-face) 4031 4057 (face font-lock-constant-face) 4057 4058 (face font-lock-string-face) 4058 4068 nil 4068 4069 (face font-lock-string-face) 4069 4090 (face font-lock-constant-face) 4090 4091 (face font-lock-string-face) 4091 4101 nil 4101 4102 (face font-lock-string-face) 4102 4122 (face font-lock-constant-face) 4122 4123 (face font-lock-string-face) 4123 4133 nil 4133 4134 (face font-lock-string-face) 4134 4157 (face font-lock-constant-face) 4157 4158 (face font-lock-string-face) 4158 4168 nil 4168 4169 (face font-lock-string-face) 4169 4191 (face font-lock-constant-face) 4191 4192 (face font-lock-string-face) 4192 4202 nil 4202 4203 (face font-lock-string-face) 4203 4243 (face font-lock-constant-face) 4243 4244 (face font-lock-string-face) 4244 4254 nil 4254 4255 (face font-lock-string-face) 4255 4294 (face font-lock-constant-face) 4294 4295 (face font-lock-string-face) 4295 4305 nil 4305 4306 (face font-lock-string-face) 4306 4347 (face font-lock-constant-face) 4347 4348 (face font-lock-string-face) 4348 4358 nil 4358 4359 (face font-lock-string-face) 4359 4399 (face font-lock-constant-face) 4399 4400 (face font-lock-string-face) 4400 4410 nil 4410 4411 (face font-lock-string-face) 4411 4441 (face font-lock-constant-face) 4441 4442 (face font-lock-string-face) 4442 4452 nil 4452 4453 (face font-lock-string-face) 4453 4482 (face font-lock-constant-face) 4482 4483 (face font-lock-string-face) 4483 4493 nil 4493 4494 (face font-lock-string-face) 4494 4523 (face font-lock-constant-face) 4523 4524 (face font-lock-string-face) 4524 4534 nil 4534 4535 (face font-lock-string-face) 4535 4563 (face font-lock-constant-face) 4563 4564 (face font-lock-string-face) 4564 4574 nil 4574 4575 (face font-lock-string-face) 4575 4610 (face font-lock-constant-face) 4610 4611 (face font-lock-string-face) 4611 4621 nil 4621 4622 (face font-lock-string-face) 4622 4656 (face font-lock-constant-face) 4656 4657 (face font-lock-string-face) 4657 4667 nil 4667 4668 (face font-lock-string-face) 4668 4697 (face font-lock-constant-face) 4697 4698 (face font-lock-string-face) 4698 4708 nil 4708 4709 (face font-lock-string-face) 4709 4737 (face font-lock-constant-face) 4737 4738 (face font-lock-string-face) 4738 4748 nil 4748 4749 (face font-lock-string-face) 4749 4780 (face font-lock-constant-face) 4780 4781 (face font-lock-string-face) 4781 4791 nil 4791 4792 (face font-lock-string-face) 4792 4822 (face font-lock-constant-face) 4822 4823 (face font-lock-string-face) 4823 4833 nil 4833 4834 (face font-lock-string-face) 4834 4869 (face font-lock-constant-face) 4869 4870 (face font-lock-string-face) 4870 4880 nil 4880 4881 (face font-lock-string-face) 4881 4915 (face font-lock-constant-face) 4915 4916 (face font-lock-string-face) 4916 4926 nil 4926 4927 (face font-lock-string-face) 4927 4948 (face font-lock-constant-face) 4948 4949 (face font-lock-string-face) 4949 4959 nil 4959 4960 (face font-lock-string-face) 4960 4980 (face font-lock-constant-face) 4980 4981 (face font-lock-string-face) 4981 4991 nil 4991 4992 (face font-lock-string-face) 4992 5020 (face font-lock-constant-face) 5020 5021 (face font-lock-string-face) 5021 5031 nil 5031 5032 (face font-lock-string-face) 5032 5059 (face font-lock-constant-face) 5059 5060 (face font-lock-string-face) 5060 5070 nil 5070 5071 (face font-lock-string-face) 5071 5092 (face font-lock-constant-face) 5092 5093 (face font-lock-string-face) 5093 5103 nil 5103 5104 (face font-lock-string-face) 5104 5132 (face font-lock-constant-face) 5132 5133 (face font-lock-string-face) 5133 5143 nil 5143 5144 (face font-lock-string-face) 5144 5171 (face font-lock-constant-face) 5171 5172 (face font-lock-string-face) 5172 5182 nil 5182 5183 (face font-lock-string-face) 5183 5217 (face font-lock-constant-face) 5217 5218 (face font-lock-string-face) 5218 5228 nil 5228 5229 (face font-lock-string-face) 5229 5262 (face font-lock-constant-face) 5262 5263 (face font-lock-string-face) 5263 5273 nil 5273 5274 (face font-lock-string-face) 5274 5297 (face font-lock-constant-face) 5297 5298 (face font-lock-string-face) 5298 5308 nil 5308 5309 (face font-lock-string-face) 5309 5324 (face font-lock-constant-face) 5324 5325 (face font-lock-string-face) 5325 5335 nil 5335 5336 (face font-lock-string-face) 5336 5350 (face font-lock-constant-face) 5350 5351 (face font-lock-string-face) 5351 5361 nil 5361 5362 (face font-lock-string-face) 5362 5380 (face font-lock-constant-face) 5380 5381 (face font-lock-string-face) 5381 5391 nil 5391 5392 (face font-lock-string-face) 5392 5409 (face font-lock-constant-face) 5409 5410 (face font-lock-string-face) 5410 5420 nil 5420 5421 (face font-lock-string-face) 5421 5443 (face font-lock-constant-face) 5443 5444 (face font-lock-string-face) 5444 5454 nil 5454 5455 (face font-lock-string-face) 5455 5476 (face font-lock-constant-face) 5476 5477 (face font-lock-string-face) 5477 5487 nil 5487 5488 (face font-lock-string-face) 5488 5501 (face font-lock-constant-face) 5501 5502 (face font-lock-string-face) 5502 5512 nil 5512 5513 (face font-lock-string-face) 5513 5525 (face font-lock-constant-face) 5525 5526 (face font-lock-string-face) 5526 5536 nil 5536 5537 (face font-lock-string-face) 5537 5561 (face font-lock-constant-face) 5561 5562 (face font-lock-string-face) 5562 5572 nil 5572 5573 (face font-lock-string-face) 5573 5596 (face font-lock-constant-face) 5596 5597 (face font-lock-string-face) 5597 5607 nil 5607 5608 (face font-lock-string-face) 5608 5627 (face font-lock-constant-face) 5627 5628 (face font-lock-string-face) 5628 5638 nil 5638 5639 (face font-lock-string-face) 5639 5657 (face font-lock-constant-face) 5657 5658 (face font-lock-string-face) 5658 5668 nil 5668 5669 (face font-lock-string-face) 5669 5688 (face font-lock-constant-face) 5688 5689 (face font-lock-string-face) 5689 5699 nil 5699 5700 (face font-lock-string-face) 5700 5718 (face font-lock-constant-face) 5718 5719 (face font-lock-string-face) 5719 5729 nil 5729 5730 (face font-lock-string-face) 5730 5752 (face font-lock-constant-face) 5752 5753 (face font-lock-string-face) 5753 5763 nil 5763 5764 (face font-lock-string-face) 5764 5785 (face font-lock-constant-face) 5785 5786 (face font-lock-string-face) 5786 5796 nil 5796 5797 (face font-lock-string-face) 5797 5819 (face font-lock-constant-face) 5819 5820 (face font-lock-string-face) 5820 5830 nil 5830 5831 (face font-lock-string-face) 5831 5852 (face font-lock-constant-face) 5852 5853 (face font-lock-string-face) 5853 5863 nil 5863 5864 (face font-lock-string-face) 5864 5880 (face font-lock-constant-face) 5880 5881 (face font-lock-string-face) 5881 5891 nil 5891 5892 (face font-lock-string-face) 5892 5915 (face font-lock-constant-face) 5915 5916 (face font-lock-string-face) 5916 5926 nil 5926 5927 (face font-lock-string-face) 5927 5942 (face font-lock-constant-face) 5942 5943 (face font-lock-string-face) 5943 5953 nil 5953 5954 (face font-lock-string-face) 5954 5968 (face font-lock-constant-face) 5968 5969 (face font-lock-string-face) 5969 5979 nil 5979 5980 (face font-lock-string-face) 5980 6002 (face font-lock-constant-face) 6002 6003 (face font-lock-string-face) 6003 6013 nil 6013 6014 (face font-lock-string-face) 6014 6035 (face font-lock-constant-face) 6035 6036 (face font-lock-string-face) 6036 6046 nil 6046 6047 (face font-lock-string-face) 6047 6059 (face font-lock-constant-face) 6059 6060 (face font-lock-string-face) 6060 6070 nil 6070 6071 (face font-lock-string-face) 6071 6082 (face font-lock-constant-face) 6082 6083 (face font-lock-string-face) 6083 6093 nil 6093 6094 (face font-lock-string-face) 6094 6119 (face font-lock-constant-face) 6119 6120 (face font-lock-string-face) 6120 6130 nil 6130 6131 (face font-lock-string-face) 6131 6155 (face font-lock-constant-face) 6155 6156 (face font-lock-string-face) 6156 6166 nil 6166 6167 (face font-lock-string-face) 6167 6185 (face font-lock-constant-face) 6185 6186 (face font-lock-string-face) 6186 6196 nil 6196 6197 (face font-lock-string-face) 6197 6212 (face font-lock-constant-face) 6212 6213 (face font-lock-string-face) 6213 6223 nil 6223 6224 (face font-lock-string-face) 6224 6238 (face font-lock-constant-face) 6238 6239 (face font-lock-string-face) 6239 6249 nil 6249 6250 (face font-lock-string-face) 6250 6282 (face font-lock-constant-face) 6282 6283 (face font-lock-string-face) 6283 6293 nil 6293 6294 (face font-lock-string-face) 6294 6325 (face font-lock-constant-face) 6325 6326 (face font-lock-string-face) 6326 6336 nil 6336 6337 (face font-lock-string-face) 6337 6349 (face font-lock-constant-face) 6349 6350 (face font-lock-string-face) 6350 6360 nil 6360 6361 (face font-lock-string-face) 6361 6382 (face font-lock-constant-face) 6382 6383 (face font-lock-string-face) 6383 6393 nil 6393 6394 (face font-lock-string-face) 6394 6413 (face font-lock-constant-face) 6413 6414 (face font-lock-string-face) 6414 6424 nil 6424 6425 (face font-lock-string-face) 6425 6442 (face font-lock-constant-face) 6442 6443 (face font-lock-string-face) 6443 6453 nil 6453 6454 (face font-lock-string-face) 6454 6470 (face font-lock-constant-face) 6470 6471 (face font-lock-string-face) 6471 6481 nil 6481 6482 (face font-lock-string-face) 6482 6504 (face font-lock-constant-face) 6504 6505 (face font-lock-string-face) 6505 6515 nil 6515 6516 (face font-lock-string-face) 6516 6535 (face font-lock-constant-face) 6535 6536 (face font-lock-string-face) 6536 6546 nil 6546 6547 (face font-lock-string-face) 6547 6569 (face font-lock-constant-face) 6569 6570 (face font-lock-string-face) 6570 6580 nil 6580 6581 (face font-lock-string-face) 6581 6602 (face font-lock-constant-face) 6602 6603 (face font-lock-string-face) 6603 6613 nil 6613 6614 (face font-lock-string-face) 6614 6631 (face font-lock-constant-face) 6631 6632 (face font-lock-string-face) 6632 6642 nil 6642 6643 (face font-lock-string-face) 6643 6671 (face font-lock-constant-face) 6671 6672 (face font-lock-string-face) 6672 6682 nil 6682 6683 (face font-lock-string-face) 6683 6710 (face font-lock-constant-face) 6710 6711 (face font-lock-string-face) 6711 6721 nil 6721 6722 (face font-lock-string-face) 6722 6738 (face font-lock-constant-face) 6738 6739 (face font-lock-string-face) 6739 6749 nil 6749 6750 (face font-lock-string-face) 6750 6765 (face font-lock-constant-face) 6765 6766 (face font-lock-string-face) 6766 6776 nil 6776 6777 (face font-lock-string-face) 6777 6800 (face font-lock-constant-face) 6800 6801 (face font-lock-string-face) 6801 6811 nil 6811 6812 (face font-lock-string-face) 6812 6834 (face font-lock-constant-face) 6834 6835 (face font-lock-string-face) 6835 6845 nil 6845 6846 (face font-lock-string-face) 6846 6860 (face font-lock-constant-face) 6860 6861 (face font-lock-string-face) 6861 6871 nil 6871 6872 (face font-lock-string-face) 6872 6885 (face font-lock-constant-face) 6885 6886 (face font-lock-string-face) 6886 6896 nil 6896 6897 (face font-lock-string-face) 6897 6920 (face font-lock-constant-face) 6920 6921 (face font-lock-string-face) 6921 6931 nil 6931 6932 (face font-lock-string-face) 6932 6954 (face font-lock-constant-face) 6954 6955 (face font-lock-string-face) 6955 6965 nil 6965 6966 (face font-lock-string-face) 6966 6986 (face font-lock-constant-face) 6986 6987 (face font-lock-string-face) 6987 6997 nil 6997 6998 (face font-lock-string-face) 6998 7017 (face font-lock-constant-face) 7017 7018 (face font-lock-string-face) 7018 7028 nil 7028 7029 (face font-lock-string-face) 7029 7050 (face font-lock-constant-face) 7050 7051 (face font-lock-string-face) 7051 7061 nil 7061 7062 (face font-lock-string-face) 7062 7082 (face font-lock-constant-face) 7082 7083 (face font-lock-string-face) 7083 7093 nil 7093 7094 (face font-lock-string-face) 7094 7122 (face font-lock-constant-face) 7122 7123 (face font-lock-string-face) 7123 7133 nil 7133 7134 (face font-lock-string-face) 7134 7161 (face font-lock-constant-face) 7161 7162 (face font-lock-string-face) 7162 7172 nil 7172 7173 (face font-lock-string-face) 7173 7194 (face font-lock-constant-face) 7194 7195 (face font-lock-string-face) 7195 7205 nil 7205 7206 (face font-lock-string-face) 7206 7226 (face font-lock-constant-face) 7226 7227 (face font-lock-string-face) 7227 7237 nil 7237 7238 (face font-lock-string-face) 7238 7266 (face font-lock-constant-face) 7266 7267 (face font-lock-string-face) 7267 7277 nil 7277 7278 (face font-lock-string-face) 7278 7305 (face font-lock-constant-face) 7305 7306 (face font-lock-string-face) 7306 7316 nil 7316 7317 (face font-lock-string-face) 7317 7336 (face font-lock-constant-face) 7336 7337 (face font-lock-string-face) 7337 7347 nil 7347 7348 (face font-lock-string-face) 7348 7366 (face font-lock-constant-face) 7366 7367 (face font-lock-string-face) 7367 7377 nil 7377 7378 (face font-lock-string-face) 7378 7399 (face font-lock-constant-face) 7399 7400 (face font-lock-string-face) 7400 7410 nil 7410 7411 (face font-lock-string-face) 7411 7429 (face font-lock-constant-face) 7429 7430 (face font-lock-string-face) 7430 7440 nil 7440 7441 (face font-lock-string-face) 7441 7458 (face font-lock-constant-face) 7458 7459 (face font-lock-string-face) 7459 7469 nil 7469 7470 (face font-lock-string-face) 7470 7493 (face font-lock-constant-face) 7493 7494 (face font-lock-string-face) 7494 7504 nil 7504 7505 (face font-lock-string-face) 7505 7527 (face font-lock-constant-face) 7527 7528 (face font-lock-string-face) 7528 7538 nil 7538 7539 (face font-lock-string-face) 7539 7562 (face font-lock-constant-face) 7562 7563 (face font-lock-string-face) 7563 7573 nil 7573 7574 (face font-lock-string-face) 7574 7596 (face font-lock-constant-face) 7596 7597 (face font-lock-string-face) 7597 7607 nil 7607 7608 (face font-lock-string-face) 7608 7631 (face font-lock-constant-face) 7631 7632 (face font-lock-string-face) 7632 7642 nil 7642 7643 (face font-lock-string-face) 7643 7665 (face font-lock-constant-face) 7665 7666 (face font-lock-string-face) 7666 7676 nil 7676 7677 (face font-lock-string-face) 7677 7705 (face font-lock-constant-face) 7705 7706 (face font-lock-string-face) 7706 7716 nil 7716 7717 (face font-lock-string-face) 7717 7744 (face font-lock-constant-face) 7744 7745 (face font-lock-string-face) 7745 7755 nil 7755 7756 (face font-lock-string-face) 7756 7791 (face font-lock-constant-face) 7791 7792 (face font-lock-string-face) 7792 7802 nil 7802 7803 (face font-lock-string-face) 7803 7837 (face font-lock-constant-face) 7837 7838 (face font-lock-string-face) 7838 7848 nil 7848 7849 (face font-lock-string-face) 7849 7879 (face font-lock-constant-face) 7879 7880 (face font-lock-string-face) 7880 7890 nil 7890 7891 (face font-lock-string-face) 7891 7920 (face font-lock-constant-face) 7920 7921 (face font-lock-string-face) 7921 7931 nil 7931 7932 (face font-lock-string-face) 7932 7962 (face font-lock-constant-face) 7962 7963 (face font-lock-string-face) 7963 7973 nil 7973 7974 (face font-lock-string-face) 7974 8003 (face font-lock-constant-face) 8003 8004 (face font-lock-string-face) 8004 8014 nil 8014 8015 (face font-lock-string-face) 8015 8039 (face font-lock-constant-face) 8039 8040 (face font-lock-string-face) 8040 8050 nil 8050 8051 (face font-lock-string-face) 8051 8074 (face font-lock-constant-face) 8074 8075 (face font-lock-string-face) 8075 8085 nil 8085 8086 (face font-lock-string-face) 8086 8116 (face font-lock-constant-face) 8116 8117 (face font-lock-string-face) 8117 8127 nil 8127 8128 (face font-lock-string-face) 8128 8152 (face font-lock-constant-face) 8152 8153 (face font-lock-string-face) 8153 8163 nil 8163 8164 (face font-lock-string-face) 8164 8187 (face font-lock-constant-face) 8187 8188 (face font-lock-string-face) 8188 8198 nil 8198 8199 (face font-lock-string-face) 8199 8230 (face font-lock-constant-face) 8230 8231 (face font-lock-string-face) 8231 8241 nil 8241 8242 (face font-lock-string-face) 8242 8272 (face font-lock-constant-face) 8272 8273 (face font-lock-string-face) 8273 8283 nil 8283 8284 (face font-lock-string-face) 8284 8309 (face font-lock-constant-face) 8309 8310 (face font-lock-string-face) 8310 8320 nil 8320 8321 (face font-lock-string-face) 8321 8345 (face font-lock-constant-face) 8345 8346 (face font-lock-string-face) 8346 8356 nil 8356 8357 (face font-lock-string-face) 8357 8399 (face font-lock-constant-face) 8399 8400 (face font-lock-string-face) 8400 8410 nil 8410 8411 (face font-lock-string-face) 8411 8452 (face font-lock-constant-face) 8452 8453 (face font-lock-string-face) 8453 8463 nil 8463 8464 (face font-lock-string-face) 8464 8486 (face font-lock-constant-face) 8486 8487 (face font-lock-string-face) 8487 8497 nil 8497 8498 (face font-lock-string-face) 8498 8519 (face font-lock-constant-face) 8519 8520 (face font-lock-string-face) 8520 8530 nil 8530 8531 (face font-lock-string-face) 8531 8562 (face font-lock-constant-face) 8562 8563 (face font-lock-string-face) 8563 8573 nil 8573 8574 (face font-lock-string-face) 8574 8604 (face font-lock-constant-face) 8604 8605 (face font-lock-string-face) 8605 8615 nil 8615 8616 (face font-lock-string-face) 8616 8643 (face font-lock-constant-face) 8643 8644 (face font-lock-string-face) 8644 8654 nil 8654 8655 (face font-lock-string-face) 8655 8681 (face font-lock-constant-face) 8681 8682 (face font-lock-string-face) 8682 8692 nil 8692 8693 (face font-lock-string-face) 8693 8721 (face font-lock-constant-face) 8721 8722 (face font-lock-string-face) 8722 8732 nil 8732 8733 (face font-lock-string-face) 8733 8760 (face font-lock-constant-face) 8760 8761 (face font-lock-string-face) 8761 8771 nil 8771 8772 (face font-lock-string-face) 8772 8805 (face font-lock-constant-face) 8805 8806 (face font-lock-string-face) 8806 8816 nil 8816 8817 (face font-lock-string-face) 8817 8849 (face font-lock-constant-face) 8849 8850 (face font-lock-string-face) 8850 8860 nil 8860 8861 (face font-lock-string-face) 8861 8892 (face font-lock-constant-face) 8892 8893 (face font-lock-string-face) 8893 8903 nil 8903 8904 (face font-lock-string-face) 8904 8934 (face font-lock-constant-face) 8934 8935 (face font-lock-string-face) 8935 8945 nil 8945 8946 (face font-lock-string-face) 8946 8978 (face font-lock-constant-face) 8978 8979 (face font-lock-string-face) 8979 8989 nil 8989 8990 (face font-lock-string-face) 8990 9021 (face font-lock-constant-face) 9021 9022 (face font-lock-string-face) 9022 9032 nil 9032 9033 (face font-lock-string-face) 9033 9063 (face font-lock-constant-face) 9063 9064 (face font-lock-string-face) 9064 9074 nil 9074 9075 (face font-lock-string-face) 9075 9104 (face font-lock-constant-face) 9104 9105 (face font-lock-string-face) 9105 9115 nil 9115 9116 (face font-lock-string-face) 9116 9158 (face font-lock-constant-face) 9158 9159 (face font-lock-string-face) 9159 9169 nil 9169 9170 (face font-lock-string-face) 9170 9211 (face font-lock-constant-face) 9211 9212 (face font-lock-string-face) 9212 9222 nil 9222 9223 (face font-lock-string-face) 9223 9272 (face font-lock-constant-face) 9272 9273 (face font-lock-string-face) 9273 9283 nil 9283 9284 (face font-lock-string-face) 9284 9332 (face font-lock-constant-face) 9332 9333 (face font-lock-string-face) 9333 9343 nil 9343 9344 (face font-lock-string-face) 9344 9388 (face font-lock-constant-face) 9388 9389 (face font-lock-string-face) 9389 9399 nil 9399 9400 (face font-lock-string-face) 9400 9445 (face font-lock-constant-face) 9445 9446 (face font-lock-string-face) 9446 9456 nil 9456 9457 (face font-lock-string-face) 9457 9507 (face font-lock-constant-face) 9507 9508 (face font-lock-string-face) 9508 9518 nil 9518 9519 (face font-lock-string-face) 9519 9570 (face font-lock-constant-face) 9570 9571 (face font-lock-string-face) 9571 9581 nil 9581 9582 (face font-lock-string-face) 9582 9611 (face font-lock-constant-face) 9611 9612 (face font-lock-string-face) 9612 9622 nil 9622 9623 (face font-lock-string-face) 9623 9659 (face font-lock-constant-face) 9659 9660 (face font-lock-string-face) 9660 9670 nil 9670 9671 (face font-lock-string-face) 9671 9714 (face font-lock-constant-face) 9714 9715 (face font-lock-string-face) 9715 9725 nil 9725 9726 (face font-lock-string-face) 9726 9768 (face font-lock-constant-face) 9768 9769 (face font-lock-string-face) 9769 9779 nil 9779 9780 (face font-lock-string-face) 9780 9816 (face font-lock-constant-face) 9816 9817 (face font-lock-string-face) 9817 9827 nil 9827 9828 (face font-lock-string-face) 9828 9863 (face font-lock-constant-face) 9863 9864 (face font-lock-string-face) 9864 9874 nil 9874 9875 (face font-lock-string-face) 9875 9910 (face font-lock-constant-face) 9910 9911 (face font-lock-string-face) 9911 9921 nil 9921 9922 (face font-lock-string-face) 9922 9958 (face font-lock-constant-face) 9958 9959 (face font-lock-string-face) 9959 9969 nil 9969 9970 (face font-lock-string-face) 9970 10005 (face font-lock-constant-face) 10005 10006 (face font-lock-string-face) 10006 10016 nil 10016 10017 (face font-lock-string-face) 10017 10050 (face font-lock-constant-face) 10050 10051 (face font-lock-string-face) 10051 10061 nil 10061 10062 (face font-lock-string-face) 10062 10094 (face font-lock-constant-face) 10094 10095 (face font-lock-string-face) 10095 10105 nil 10105 10106 (face font-lock-string-face) 10106 10150 (face font-lock-constant-face) 10150 10151 (face font-lock-string-face) 10151 10161 nil 10161 10162 (face font-lock-string-face) 10162 10198 (face font-lock-constant-face) 10198 10199 (face font-lock-string-face) 10199 10209 nil 10209 10210 (face font-lock-string-face) 10210 10245 (face font-lock-constant-face) 10245 10246 (face font-lock-string-face) 10246 10256 nil 10256 10257 (face font-lock-string-face) 10257 10296 (face font-lock-constant-face) 10296 10297 (face font-lock-string-face) 10297 10307 nil 10307 10308 (face font-lock-string-face) 10308 10346 (face font-lock-constant-face) 10346 10347 (face font-lock-string-face) 10347 10357 nil 10357 10358 (face font-lock-string-face) 10358 10403 (face font-lock-constant-face) 10403 10404 (face font-lock-string-face) 10404 10414 nil 10414 10415 (face font-lock-string-face) 10415 10459 (face font-lock-constant-face) 10459 10460 (face font-lock-string-face) 10460 10470 nil 10470 10471 (face font-lock-string-face) 10471 10487 (face font-lock-constant-face) 10487 10488 (face font-lock-string-face) 10488 10498 nil 10498 10499 (face font-lock-string-face) 10499 10514 (face font-lock-constant-face) 10514 10515 (face font-lock-string-face) 10515 10525 nil 10525 10526 (face font-lock-string-face) 10526 10559 (face font-lock-constant-face) 10559 10560 (face font-lock-string-face) 10560 10570 nil 10570 10571 (face font-lock-string-face) 10571 10603 (face font-lock-constant-face) 10603 10604 (face font-lock-string-face) 10604 10614 nil 10614 10615 (face font-lock-string-face) 10615 10636 (face font-lock-constant-face) 10636 10637 (face font-lock-string-face) 10637 10647 nil 10647 10648 (face font-lock-string-face) 10648 10675 (face font-lock-constant-face) 10675 10676 (face font-lock-string-face) 10676 10686 nil 10686 10687 (face font-lock-string-face) 10687 10713 (face font-lock-constant-face) 10713 10714 (face font-lock-string-face) 10714 10724 nil 10724 10725 (face font-lock-string-face) 10725 10755 (face font-lock-constant-face) 10755 10756 (face font-lock-string-face) 10756 10766 nil 10766 10767 (face font-lock-string-face) 10767 10796 (face font-lock-constant-face) 10796 10797 (face font-lock-string-face) 10797 10807 nil 10807 10808 (face font-lock-string-face) 10808 10845 (face font-lock-constant-face) 10845 10846 (face font-lock-string-face) 10846 10856 nil 10856 10857 (face font-lock-string-face) 10857 10893 (face font-lock-constant-face) 10893 10894 (face font-lock-string-face) 10894 10904 nil 10904 10905 (face font-lock-string-face) 10905 10929 (face font-lock-constant-face) 10929 10930 (face font-lock-string-face) 10930 10940 nil 10940 10941 (face font-lock-string-face) 10941 10964 (face font-lock-constant-face) 10964 10965 (face font-lock-string-face) 10965 10975 nil 10975 10976 (face font-lock-string-face) 10976 10995 (face font-lock-constant-face) 10995 10996 (face font-lock-string-face) 10996 11006 nil 11006 11007 (face font-lock-string-face) 11007 11025 (face font-lock-constant-face) 11025 11026 (face font-lock-string-face) 11026 11036 nil 11036 11037 (face font-lock-string-face) 11037 11063 (face font-lock-constant-face) 11063 11064 (face font-lock-string-face) 11064 11074 nil 11074 11075 (face font-lock-string-face) 11075 11100 (face font-lock-constant-face) 11100 11101 (face font-lock-string-face) 11101 11111 nil 11111 11112 (face font-lock-string-face) 11112 11138 (face font-lock-constant-face) 11138 11139 (face font-lock-string-face) 11139 11149 nil 11149 11150 (face font-lock-string-face) 11150 11175 (face font-lock-constant-face) 11175 11176 (face font-lock-string-face) 11176 11193 nil 11193 11194 (face font-lock-string-face) 11194 11219 (face font-lock-keyword-face) 11219 11220 (face font-lock-string-face) 11220 11232 nil 11232 11233 (face font-lock-string-face) 11233 11245 (face font-lock-keyword-face) 11245 11246 (face font-lock-string-face) 11246 11260 nil 11260 11261 (face font-lock-string-face) 11261 11263 (face font-lock-constant-face) 11263 11264 (face font-lock-string-face) 11264 11292 nil 11292 11293 (face font-lock-string-face) 11293 11303 (face font-lock-keyword-face) 11303 11304 (face font-lock-string-face) 11304 11316 nil 11316 11381 (face font-lock-comment-face) 11381 11389 nil 11389 11439 (face font-lock-comment-face) 11439 11448 nil 11448 11449 (face font-lock-string-face) 11449 11464 (face font-lock-variable-name-face) 11464 11465 (face font-lock-string-face) 11465 11479 nil 11479 11480 (face font-lock-string-face) 11480 11492 (face font-lock-keyword-face) 11492 11493 (face font-lock-string-face) 11493 11509 nil 11509 11510 (face font-lock-string-face) 11510 11549 (face font-lock-function-name-face) 11549 11550 (face font-lock-string-face) 11550 11586 nil 11586 11587 (face font-lock-string-face) 11587 11602 (face font-lock-variable-name-face) 11602 11603 (face font-lock-string-face) 11603 11617 nil 11617 11618 (face font-lock-string-face) 11618 11626 (face font-lock-keyword-face) 11626 11627 (face font-lock-string-face) 11627 11643 nil 11643 11644 (face font-lock-string-face) 11644 11663 (face font-lock-constant-face) 11663 11664 (face font-lock-string-face) 11664 11678 nil 11678 11679 (face font-lock-string-face) 11679 11702 (face font-lock-constant-face) 11702 11703 (face font-lock-string-face) 11703 11717 nil 11717 11718 (face font-lock-string-face) 11718 11740 (face font-lock-constant-face) 11740 11741 (face font-lock-string-face) 11741 11755 nil 11755 11756 (face font-lock-string-face) 11756 11779 (face font-lock-constant-face) 11779 11780 (face font-lock-string-face) 11780 11794 nil 11794 11795 (face font-lock-string-face) 11795 11817 (face font-lock-constant-face) 11817 11818 (face font-lock-string-face) 11818 11832 nil 11832 11833 (face font-lock-string-face) 11833 11861 (face font-lock-constant-face) 11861 11862 (face font-lock-string-face) 11862 11876 nil 11876 11877 (face font-lock-string-face) 11877 11904 (face font-lock-constant-face) 11904 11905 (face font-lock-string-face) 11905 11919 nil 11919 11920 (face font-lock-string-face) 11920 11950 (face font-lock-constant-face) 11950 11951 (face font-lock-string-face) 11951 11965 nil 11965 11966 (face font-lock-string-face) 11966 11995 (face font-lock-constant-face) 11995 11996 (face font-lock-string-face) 11996 12010 nil 12010 12011 (face font-lock-string-face) 12011 12035 (face font-lock-constant-face) 12035 12036 (face font-lock-string-face) 12036 12050 nil 12050 12051 (face font-lock-string-face) 12051 12074 (face font-lock-constant-face) 12074 12075 (face font-lock-string-face) 12075 12089 nil 12089 12090 (face font-lock-string-face) 12090 12120 (face font-lock-constant-face) 12120 12121 (face font-lock-string-face) 12121 12135 nil 12135 12136 (face font-lock-string-face) 12136 12167 (face font-lock-constant-face) 12167 12168 (face font-lock-string-face) 12168 12182 nil 12182 12183 (face font-lock-string-face) 12183 12213 (face font-lock-constant-face) 12213 12214 (face font-lock-string-face) 12214 12228 nil 12228 12229 (face font-lock-string-face) 12229 12254 (face font-lock-constant-face) 12254 12255 (face font-lock-string-face) 12255 12269 nil 12269 12270 (face font-lock-string-face) 12270 12294 (face font-lock-constant-face) 12294 12295 (face font-lock-string-face) 12295 12309 nil 12309 12310 (face font-lock-string-face) 12310 12352 (face font-lock-constant-face) 12352 12353 (face font-lock-string-face) 12353 12367 nil 12367 12368 (face font-lock-string-face) 12368 12409 (face font-lock-constant-face) 12409 12410 (face font-lock-string-face) 12410 12424 nil 12424 12425 (face font-lock-string-face) 12425 12447 (face font-lock-constant-face) 12447 12448 (face font-lock-string-face) 12448 12462 nil 12462 12463 (face font-lock-string-face) 12463 12484 (face font-lock-constant-face) 12484 12485 (face font-lock-string-face) 12485 12499 nil 12499 12500 (face font-lock-string-face) 12500 12531 (face font-lock-constant-face) 12531 12532 (face font-lock-string-face) 12532 12546 nil 12546 12547 (face font-lock-string-face) 12547 12577 (face font-lock-constant-face) 12577 12578 (face font-lock-string-face) 12578 12592 nil 12592 12593 (face font-lock-string-face) 12593 12621 (face font-lock-constant-face) 12621 12622 (face font-lock-string-face) 12622 12636 nil 12636 12637 (face font-lock-string-face) 12637 12664 (face font-lock-constant-face) 12664 12665 (face font-lock-string-face) 12665 12679 nil 12679 12680 (face font-lock-string-face) 12680 12707 (face font-lock-constant-face) 12707 12708 (face font-lock-string-face) 12708 12722 nil 12722 12723 (face font-lock-string-face) 12723 12749 (face font-lock-constant-face) 12749 12750 (face font-lock-string-face) 12750 12764 nil 12764 12765 (face font-lock-string-face) 12765 12791 (face font-lock-constant-face) 12791 12792 (face font-lock-string-face) 12792 12806 nil 12806 12807 (face font-lock-string-face) 12807 12832 (face font-lock-constant-face) 12832 12833 (face font-lock-string-face) 12833 12868 nil 12868 12937 (face font-lock-comment-face) 12937 12945 nil 12945 13016 (face font-lock-comment-face) 13016 13024 nil 13024 13040 (face font-lock-comment-face) 13040 13049 nil 13049 13050 (face font-lock-string-face) 13050 13065 (face font-lock-variable-name-face) 13065 13066 (face font-lock-string-face) 13066 13080 nil 13080 13081 (face font-lock-string-face) 13081 13089 (face font-lock-keyword-face) 13089 13090 (face font-lock-string-face) 13090 13105 nil 13105 13106 (face font-lock-string-face) 13106 13149 (face font-lock-constant-face) 13149 13150 (face font-lock-string-face) 13150 13175 nil 13175 13176 (face font-lock-string-face) 13176 13183 (face font-lock-keyword-face) 13183 13184 (face font-lock-string-face) 13184 13199 nil 13199 13200 (face font-lock-string-face) 13200 13248 (face font-lock-constant-face) 13248 13249 (face font-lock-string-face) 13249 13274 nil 13274 13275 (face font-lock-string-face) 13275 13288 (face font-lock-keyword-face) 13288 13289 (face font-lock-string-face) 13289 13305 nil 13305 13306 (face font-lock-string-face) 13306 13315 (face font-lock-keyword-face) 13315 13316 (face font-lock-string-face) 13316 13334 nil 13334 13335 (face font-lock-string-face) 13335 13345 (face font-lock-constant-face) 13345 13346 (face font-lock-string-face) 13346 13397 nil 13397 13398 (face font-lock-string-face) 13398 13443 (face font-lock-variable-name-face) 13443 13444 (face font-lock-string-face) 13444 13458 nil 13458 13459 (face font-lock-string-face) 13459 13472 (face font-lock-keyword-face) 13472 13473 (face font-lock-string-face) 13473 13489 nil 13489 13490 (face font-lock-string-face) 13490 13499 (face font-lock-keyword-face) 13499 13500 (face font-lock-string-face) 13500 13518 nil 13518 13519 (face font-lock-string-face) 13519 13527 (face font-lock-constant-face) 13527 13528 (face font-lock-string-face) 13528 13579 nil 13579 13580 (face font-lock-string-face) 13580 13593 (face font-lock-variable-name-face) 13593 13594 (face font-lock-string-face) 13594 13608 nil 13608 13609 (face font-lock-string-face) 13609 13617 (face font-lock-keyword-face) 13617 13618 (face font-lock-string-face) 13618 13623 nil 13623 13624 (face font-lock-string-face) 13624 13631 (face font-lock-constant-face) 13631 13632 (face font-lock-string-face) 13632 13634 nil 13634 13635 (face font-lock-string-face) 13635 13641 (face font-lock-constant-face) 13641 13642 (face font-lock-string-face) 13642 13671 nil 13671 13672 (face font-lock-string-face) 13672 13679 (face font-lock-constant-face) 13679 13680 (face font-lock-string-face) 13680 13682 nil 13682 13683 (face font-lock-string-face) 13683 13703 (face font-lock-constant-face) 13703 13704 (face font-lock-string-face) 13704 13720 nil 13720 13721 (face font-lock-string-face) 13721 13734 (face font-lock-keyword-face) 13734 13735 (face font-lock-string-face) 13735 13751 nil 13751 13752 (face font-lock-string-face) 13752 13761 (face font-lock-keyword-face) 13761 13762 (face font-lock-string-face) 13762 13815 nil 13815 13816 (face font-lock-string-face) 13816 13829 (face font-lock-variable-name-face) 13829 13830 (face font-lock-string-face) 13830 13844 nil 13844 13845 (face font-lock-string-face) 13845 13853 (face font-lock-keyword-face) 13853 13854 (face font-lock-string-face) 13854 13870 nil 13870 13871 (face font-lock-string-face) 13871 13909 (face font-lock-constant-face) 13909 13910 (face font-lock-string-face) 13910 13924 nil 13924 13925 (face font-lock-string-face) 13925 13962 (face font-lock-constant-face) 13962 13963 (face font-lock-string-face) 13963 13999 nil 13999 14000 (face font-lock-string-face) 14000 14011 (face font-lock-variable-name-face) 14011 14012 (face font-lock-string-face) 14012 14026 nil 14026 14027 (face font-lock-string-face) 14027 14036 (face font-lock-keyword-face) 14036 14037 (face font-lock-string-face) 14037 14053 nil 14053 14054 (face font-lock-string-face) 14054 14064 (face font-lock-keyword-face) 14064 14065 (face font-lock-string-face) 14065 14084 nil 14084 14085 (face font-lock-string-face) 14085 14096 (face font-lock-variable-name-face) 14096 14097 (face font-lock-string-face) 14097 14117 nil 14117 14129 (face font-lock-string-face) 14129 14131 nil 14131 14169 (face font-lock-string-face) 14169 14176 (face font-lock-variable-name-face) 14176 14182 (face font-lock-string-face) 14182 14193 (face font-lock-variable-name-face) 14193 14196 (face font-lock-string-face) 14196 14233 nil 14233 14245 (face font-lock-string-face) 14245 14247 nil 14247 14259 (face font-lock-string-face) 14259 14316 nil 14316 14317 (face font-lock-string-face) 14317 14327 (face font-lock-keyword-face) 14327 14328 (face font-lock-string-face) 14328 14345 nil 14345 14346 (face font-lock-string-face) 14346 14359 (face font-lock-variable-name-face) 14359 14360 (face font-lock-string-face) 14360 14378 nil 14378 14379 (face font-lock-string-face) 14379 14385 (face font-lock-keyword-face) 14385 14386 (face font-lock-string-face) 14386 14406 nil 14406 14411 (face font-lock-string-face) 14411 14413 (face font-lock-variable-name-face) 14413 14423 (face font-lock-variable-name-face) 14423 14443 (face font-lock-string-face) 14443 14476 nil 14476 14477 (face font-lock-string-face) 14477 14490 (face font-lock-keyword-face) 14490 14491 (face font-lock-string-face) 14491 14511 nil 14511 14512 (face font-lock-string-face) 14512 14521 (face font-lock-keyword-face) 14521 14522 (face font-lock-string-face) 14522 14544 nil 14544 14545 (face font-lock-string-face) 14545 14549 (face font-lock-constant-face) 14549 14551 (face font-lock-variable-name-face) 14551 14561 (face font-lock-variable-name-face) 14561 14578 (face font-lock-constant-face) 14578 14579 (face font-lock-string-face) 14579 14631 nil 14631 14632 (face font-lock-string-face) 14632 14639 (face font-lock-keyword-face) 14639 14640 (face font-lock-string-face) 14640 14660 nil 14660 14661 (face font-lock-string-face) 14661 14669 (face font-lock-preprocessor-face) 14669 14670 (face font-lock-string-face) 14670 14707 nil 14707 14729 (face font-lock-comment-face) 14729 14743 nil 14743 14744 (face font-lock-string-face) 14744 14752 (face font-lock-keyword-face) 14752 14753 (face font-lock-string-face) 14753 14773 nil 14773 14774 (face font-lock-string-face) 14774 14800 (face font-lock-constant-face) 14800 14801 (face font-lock-string-face) 14801 14819 nil 14819 14820 (face font-lock-string-face) 14820 14845 (face font-lock-constant-face) 14845 14846 (face font-lock-string-face) 14846 14915 nil 14915 14916 (face font-lock-string-face) 14916 14929 (face font-lock-variable-name-face) 14929 14930 (face font-lock-string-face) 14930 14944 nil 14944 14945 (face font-lock-string-face) 14945 14955 (face font-lock-keyword-face) 14955 14956 (face font-lock-string-face) 14956 14973 nil 14973 14974 (face font-lock-string-face) 14974 14993 (face font-lock-variable-name-face) 14993 14994 (face font-lock-string-face) 14994 15012 nil 15012 15013 (face font-lock-string-face) 15013 15019 (face font-lock-keyword-face) 15019 15020 (face font-lock-string-face) 15020 15040 nil 15040 15075 (face font-lock-string-face) 15075 15108 nil 15108 15109 (face font-lock-string-face) 15109 15122 (face font-lock-keyword-face) 15122 15123 (face font-lock-string-face) 15123 15143 nil 15143 15144 (face font-lock-string-face) 15144 15153 (face font-lock-keyword-face) 15153 15154 (face font-lock-string-face) 15154 15176 nil 15176 15177 (face font-lock-string-face) 15177 15215 (face font-lock-constant-face) 15215 15216 (face font-lock-string-face) 15216 15268 nil 15268 15269 (face font-lock-string-face) 15269 15276 (face font-lock-keyword-face) 15276 15277 (face font-lock-string-face) 15277 15297 nil 15297 15298 (face font-lock-string-face) 15298 15312 (face font-lock-preprocessor-face) 15312 15313 (face font-lock-string-face) 15313 15350 nil 15350 15378 (face font-lock-comment-face) 15378 15392 nil 15392 15393 (face font-lock-string-face) 15393 15401 (face font-lock-keyword-face) 15401 15402 (face font-lock-string-face) 15402 15422 nil 15422 15423 (face font-lock-string-face) 15423 15450 (face font-lock-constant-face) 15450 15451 (face font-lock-string-face) 15451 15469 nil 15469 15470 (face font-lock-string-face) 15470 15496 (face font-lock-constant-face) 15496 15497 (face font-lock-string-face) 15497 15566 nil 15566 15567 (face font-lock-string-face) 15567 15600 (face font-lock-variable-name-face) 15600 15601 (face font-lock-string-face) 15601 15615 nil 15615 15663 (face font-lock-comment-face) 15663 15673 nil 15673 15674 (face font-lock-string-face) 15674 15682 (face font-lock-keyword-face) 15682 15683 (face font-lock-string-face) 15683 15699 nil 15699 15700 (face font-lock-string-face) 15700 15743 (face font-lock-constant-face) 15743 15744 (face font-lock-string-face) 15744 15758 nil 15758 15759 (face font-lock-string-face) 15759 15801 (face font-lock-constant-face) 15801 15802 (face font-lock-string-face) 15802 15838 nil 15838 15839 (face font-lock-string-face) 15839 15848 (face font-lock-variable-name-face) 15848 15849 (face font-lock-string-face) 15849 15863 nil 15863 15864 (face font-lock-string-face) 15864 15877 (face font-lock-keyword-face) 15877 15878 (face font-lock-string-face) 15878 15894 nil 15894 15895 (face font-lock-string-face) 15895 15904 (face font-lock-keyword-face) 15904 15905 (face font-lock-string-face) 15905 15923 nil 15923 15924 (face font-lock-string-face) 15924 15980 (face font-lock-constant-face) 15980 15981 (face font-lock-string-face) 15981 15997 nil 15997 15998 (face font-lock-string-face) 15998 16057 (face font-lock-constant-face) 16057 16058 (face font-lock-string-face) 16058 16074 nil 16074 16075 (face font-lock-string-face) 16075 16131 (face font-lock-constant-face) 16131 16132 (face font-lock-string-face) 16132 16148 nil 16148 16149 (face font-lock-string-face) 16149 16205 (face font-lock-constant-face) 16205 16206 (face font-lock-string-face) 16206 16222 nil 16222 16223 (face font-lock-string-face) 16223 16275 (face font-lock-constant-face) 16275 16276 (face font-lock-string-face) 16276 16327 nil 16327 16328 (face font-lock-string-face) 16328 16337 (face font-lock-variable-name-face) 16337 16338 (face font-lock-string-face) 16338 16352 nil 16352 16353 (face font-lock-string-face) 16353 16361 (face font-lock-keyword-face) 16361 16362 (face font-lock-string-face) 16362 16378 nil 16378 16379 (face font-lock-string-face) 16379 16406 (face font-lock-constant-face) 16406 16407 (face font-lock-string-face) 16407 16421 nil 16421 16422 (face font-lock-string-face) 16422 16448 (face font-lock-constant-face) 16448 16449 (face font-lock-string-face) 16449 16463 nil 16463 16464 (face font-lock-string-face) 16464 16507 (face font-lock-constant-face) 16507 16508 (face font-lock-string-face) 16508 16522 nil 16522 16523 (face font-lock-string-face) 16523 16565 (face font-lock-constant-face) 16565 16566 (face font-lock-string-face) 16566 16602 nil 16602 16603 (face font-lock-string-face) 16603 16646 (face font-lock-variable-name-face) 16646 16647 (face font-lock-string-face) 16647 16661 nil 16661 16662 (face font-lock-string-face) 16662 16669 (face font-lock-keyword-face) 16669 16670 (face font-lock-string-face) 16670 16686 nil 16686 16687 (face font-lock-string-face) 16687 16697 (face font-lock-constant-face) 16697 16698 (face font-lock-string-face) 16698 16712 nil 16712 16713 (face font-lock-string-face) 16713 16722 (face font-lock-constant-face) 16722 16723 (face font-lock-string-face) 16723 16737 nil 16737 16738 (face font-lock-string-face) 16738 16760 (face font-lock-constant-face) 16760 16761 (face font-lock-string-face) 16761 16775 nil 16775 16776 (face font-lock-string-face) 16776 16797 (face font-lock-constant-face) 16797 16798 (face font-lock-string-face) 16798 16812 nil 16812 16813 (face font-lock-string-face) 16813 16830 (face font-lock-constant-face) 16830 16831 (face font-lock-string-face) 16831 16845 nil 16845 16846 (face font-lock-string-face) 16846 16862 (face font-lock-constant-face) 16862 16863 (face font-lock-string-face) 16863 16877 nil 16877 16878 (face font-lock-string-face) 16878 16889 (face font-lock-constant-face) 16889 16890 (face font-lock-string-face) 16890 16904 nil 16904 16905 (face font-lock-string-face) 16905 16915 (face font-lock-constant-face) 16915 16916 (face font-lock-string-face) 16916 16930 nil 16930 16931 (face font-lock-string-face) 16931 16955 (face font-lock-constant-face) 16955 16956 (face font-lock-string-face) 16956 16970 nil 16970 16971 (face font-lock-string-face) 16971 16994 (face font-lock-constant-face) 16994 16995 (face font-lock-string-face) 16995 17009 nil 17009 17010 (face font-lock-string-face) 17010 17034 (face font-lock-constant-face) 17034 17035 (face font-lock-string-face) 17035 17049 nil 17049 17050 (face font-lock-string-face) 17050 17073 (face font-lock-constant-face) 17073 17074 (face font-lock-string-face) 17074 17088 nil 17088 17089 (face font-lock-string-face) 17089 17114 (face font-lock-constant-face) 17114 17115 (face font-lock-string-face) 17115 17129 nil 17129 17130 (face font-lock-string-face) 17130 17154 (face font-lock-constant-face) 17154 17155 (face font-lock-string-face) 17155 17210 nil 17210 17211 (face font-lock-string-face) 17211 17222 (face font-lock-keyword-face) 17222 17223 (face font-lock-string-face) 17223 17225 nil 17225 17226 (face font-lock-string-face) 17226 17237 (face font-lock-function-name-face) 17237 17238 (face font-lock-string-face) 17238 17246 nil 17246 17247 (face font-lock-string-face) 17247 17251 (face font-lock-keyword-face) 17251 17252 (face font-lock-string-face) 17252 17254 nil 17254 17255 (face font-lock-string-face) 17255 17269 (face font-lock-type-face) 17269 17270 (face font-lock-string-face) 17270 17278 nil 17278 17279 (face font-lock-string-face) 17279 17291 (face font-lock-keyword-face) 17291 17292 (face font-lock-string-face) 17292 17304 nil 17304 17305 (face font-lock-string-face) 17305 17307 (face font-lock-constant-face) 17307 17308 (face font-lock-string-face) 17308 17325 nil 17325 17326 (face font-lock-string-face) 17326 17336 (face font-lock-keyword-face) 17336 17337 (face font-lock-string-face) 17337 17350 nil 17350 17351 (face font-lock-string-face) 17351 17371 (face font-lock-variable-name-face) 17371 17372 (face font-lock-string-face) 17372 17386 nil 17386 17387 (face font-lock-string-face) 17387 17404 (face font-lock-keyword-face) 17404 17405 (face font-lock-string-face) 17405 17423 nil 17423 17424 (face font-lock-string-face) 17424 17442 (face font-lock-variable-name-face) 17442 17443 (face font-lock-string-face) 17443 17461 nil 17461 17462 (face font-lock-string-face) 17462 17469 (face font-lock-keyword-face) 17469 17470 (face font-lock-string-face) 17470 17474 nil 17474 17498 (face font-lock-string-face) 17498 17553 nil 17553 17554 (face font-lock-string-face) 17554 17599 (face font-lock-variable-name-face) 17599 17600 (face font-lock-string-face) 17600 17614 nil 17614 17615 (face font-lock-string-face) 17615 17627 (face font-lock-keyword-face) 17627 17628 (face font-lock-string-face) 17628 17644 nil 17644 17645 (face font-lock-string-face) 17645 17665 (face font-lock-function-name-face) 17665 17666 (face font-lock-string-face) 17666 17703 nil 17703 17704 (face font-lock-string-face) 17704 17724 (face font-lock-variable-name-face) 17724 17725 (face font-lock-string-face) 17725 17739 nil 17739 17740 (face font-lock-string-face) 17740 17752 (face font-lock-keyword-face) 17752 17753 (face font-lock-string-face) 17753 17769 nil 17769 17770 (face font-lock-string-face) 17770 17790 (face font-lock-function-name-face) 17790 17791 (face font-lock-string-face) 17791 17833 nil 17833 17834 (face font-lock-string-face) 17834 17841 (face font-lock-keyword-face) 17841 17842 (face font-lock-string-face) 17842 17854 nil 17854 17855 (face font-lock-string-face) 17855 17874 (face font-lock-constant-face) 17874 17875 (face font-lock-string-face) 17875 17885 nil 17885 17886 (face font-lock-string-face) 17886 17904 (face font-lock-constant-face) 17904 17905 (face font-lock-string-face) 17905 17935 nil 17935 17936 (face font-lock-string-face) 17936 17947 (face font-lock-keyword-face) 17947 17948 (face font-lock-string-face) 17948 17950 nil 17950 17951 (face font-lock-string-face) 17951 17971 (face font-lock-function-name-face) 17971 17972 (face font-lock-string-face) 17972 17980 nil 17980 17981 (face font-lock-string-face) 17981 17985 (face font-lock-keyword-face) 17985 17986 (face font-lock-string-face) 17986 17988 nil 17988 17989 (face font-lock-string-face) 17989 18003 (face font-lock-type-face) 18003 18004 (face font-lock-string-face) 18004 18012 nil 18012 18013 (face font-lock-string-face) 18013 18025 (face font-lock-keyword-face) 18025 18026 (face font-lock-string-face) 18026 18038 nil 18038 18039 (face font-lock-string-face) 18039 18041 (face font-lock-constant-face) 18041 18042 (face font-lock-string-face) 18042 18059 nil 18059 18060 (face font-lock-string-face) 18060 18067 (face font-lock-keyword-face) 18067 18068 (face font-lock-string-face) 18068 18080 nil 18080 18081 (face font-lock-string-face) 18081 18114 (face font-lock-constant-face) 18114 18115 (face font-lock-string-face) 18115 18125 nil 18125 18126 (face font-lock-string-face) 18126 18162 (face font-lock-constant-face) 18162 18163 (face font-lock-string-face) 18163 18173 nil 18173 18174 (face font-lock-string-face) 18174 18212 (face font-lock-constant-face) 18212 18213 (face font-lock-string-face) 18213 18223 nil 18223 18224 (face font-lock-string-face) 18224 18261 (face font-lock-constant-face) 18261 18262 (face font-lock-string-face) 18262 18272 nil 18272 18273 (face font-lock-string-face) 18273 18311 (face font-lock-constant-face) 18311 18312 (face font-lock-string-face) 18312 18322 nil 18322 18323 (face font-lock-string-face) 18323 18356 (face font-lock-constant-face) 18356 18357 (face font-lock-string-face) 18357 18367 nil 18367 18368 (face font-lock-string-face) 18368 18403 (face font-lock-constant-face) 18403 18404 (face font-lock-string-face) 18404 18414 nil 18414 18415 (face font-lock-string-face) 18415 18451 (face font-lock-constant-face) 18451 18452 (face font-lock-string-face) 18452 18462 nil 18462 18463 (face font-lock-string-face) 18463 18499 (face font-lock-constant-face) 18499 18500 (face font-lock-string-face) 18500 18510 nil 18510 18511 (face font-lock-string-face) 18511 18547 (face font-lock-constant-face) 18547 18548 (face font-lock-string-face) 18548 18558 nil 18558 18559 (face font-lock-string-face) 18559 18581 (face font-lock-constant-face) 18581 18582 (face font-lock-string-face) 18582 18592 nil 18592 18593 (face font-lock-string-face) 18593 18618 (face font-lock-constant-face) 18618 18619 (face font-lock-string-face) 18619 18629 nil 18629 18630 (face font-lock-string-face) 18630 18657 (face font-lock-constant-face) 18657 18658 (face font-lock-string-face) 18658 18668 nil 18668 18669 (face font-lock-string-face) 18669 18697 (face font-lock-constant-face) 18697 18698 (face font-lock-string-face) 18698 18708 nil 18708 18709 (face font-lock-string-face) 18709 18750 (face font-lock-constant-face) 18750 18751 (face font-lock-string-face) 18751 18761 nil 18761 18762 (face font-lock-string-face) 18762 18803 (face font-lock-constant-face) 18803 18804 (face font-lock-string-face) 18804 18814 nil 18814 18815 (face font-lock-string-face) 18815 18856 (face font-lock-constant-face) 18856 18857 (face font-lock-string-face) 18857 18867 nil 18867 18868 (face font-lock-string-face) 18868 18902 (face font-lock-constant-face) 18902 18903 (face font-lock-string-face) 18903 18913 nil 18913 18914 (face font-lock-string-face) 18914 18948 (face font-lock-constant-face) 18948 18949 (face font-lock-string-face) 18949 18959 nil 18959 18960 (face font-lock-string-face) 18960 18994 (face font-lock-constant-face) 18994 18995 (face font-lock-string-face) 18995 19005 nil 19005 19006 (face font-lock-string-face) 19006 19035 (face font-lock-constant-face) 19035 19036 (face font-lock-string-face) 19036 19046 nil 19046 19047 (face font-lock-string-face) 19047 19075 (face font-lock-constant-face) 19075 19076 (face font-lock-string-face) 19076 19093 nil 19093 19094 (face font-lock-string-face) 19094 19104 (face font-lock-keyword-face) 19104 19105 (face font-lock-string-face) 19105 19118 nil 19118 19119 (face font-lock-string-face) 19119 19139 (face font-lock-variable-name-face) 19139 19140 (face font-lock-string-face) 19140 19154 nil 19154 19155 (face font-lock-string-face) 19155 19172 (face font-lock-keyword-face) 19172 19173 (face font-lock-string-face) 19173 19191 nil 19191 19192 (face font-lock-string-face) 19192 19210 (face font-lock-variable-name-face) 19210 19211 (face font-lock-string-face) 19211 19229 nil 19229 19230 (face font-lock-string-face) 19230 19237 (face font-lock-keyword-face) 19237 19238 (face font-lock-string-face) 19238 19242 nil 19242 19266 (face font-lock-string-face) 19266 19321 nil 19321 19322 (face font-lock-string-face) 19322 19342 (face font-lock-variable-name-face) 19342 19343 (face font-lock-string-face) 19343 19357 nil 19357 19399 (face font-lock-comment-face) 19399 19409 nil 19409 19410 (face font-lock-string-face) 19410 19417 (face font-lock-keyword-face) 19417 19418 (face font-lock-string-face) 19418 19434 nil 19434 19435 (face font-lock-string-face) 19435 19480 (face font-lock-constant-face) 19480 19481 (face font-lock-string-face) 19481 19495 nil 19495 19496 (face font-lock-string-face) 19496 19535 (face font-lock-constant-face) 19535 19536 (face font-lock-string-face) 19536 19573 nil 19573 19574 (face font-lock-string-face) 19574 19623 (face font-lock-variable-name-face) 19623 19624 (face font-lock-string-face) 19624 19638 nil 19638 19639 (face font-lock-string-face) 19639 19645 (face font-lock-keyword-face) 19645 19646 (face font-lock-string-face) 19646 19662 nil 19662 19670 (face font-lock-string-face) 19670 19707 nil 19707 19708 (face font-lock-string-face) 19708 19719 (face font-lock-variable-name-face) 19719 19720 (face font-lock-string-face) 19720 19734 nil 19734 19735 (face font-lock-string-face) 19735 19749 (face font-lock-keyword-face) 19749 19750 (face font-lock-string-face) 19750 19766 nil 19766 19773 (face font-lock-string-face) 19773 19791 nil 19791 19792 (face font-lock-string-face) 19792 19806 (face font-lock-keyword-face) 19806 19807 (face font-lock-string-face) 19807 19827 nil 19827 19890 (face font-lock-comment-face) 19890 19906 nil 19906 19971 (face font-lock-comment-face) 19971 19987 nil 19987 20032 (face font-lock-comment-face) 20032 20048 nil 20048 20072 (face font-lock-string-face) 20072 20074 nil 20074 20077 (face font-lock-string-face) 20077 20080 nil 20080 20086 (face font-lock-comment-face) 20086 20155 nil 20155 20156 (face font-lock-string-face) 20156 20165 (face font-lock-variable-name-face) 20165 20166 (face font-lock-string-face) 20166 20180 nil 20180 20181 (face font-lock-string-face) 20181 20190 (face font-lock-keyword-face) 20190 20191 (face font-lock-string-face) 20191 20207 nil 20207 20208 (face font-lock-string-face) 20208 20218 (face font-lock-variable-name-face) 20218 20219 (face font-lock-string-face) 20219 20237 nil 20237 20246 (face font-lock-string-face) 20246 20262 nil 20262 20270 (face font-lock-string-face) 20270 20286 nil 20286 20298 (face font-lock-string-face) 20298 20314 nil 20314 20322 (face font-lock-string-face) 20322 20374 nil 20374 20375 (face font-lock-string-face) 20375 20384 (face font-lock-variable-name-face) 20384 20385 (face font-lock-string-face) 20385 20399 nil 20399 20400 (face font-lock-string-face) 20400 20409 (face font-lock-keyword-face) 20409 20410 (face font-lock-string-face) 20410 20426 nil 20426 20427 (face font-lock-string-face) 20427 20437 (face font-lock-variable-name-face) 20437 20438 (face font-lock-string-face) 20438 20456 nil 20456 20466 (face font-lock-string-face) 20466 20482 nil 20482 20491 (face font-lock-string-face) 20491 20507 nil 20507 20519 (face font-lock-string-face) 20519 20535 nil 20535 20543 (face font-lock-string-face) 20543 20595 nil 20595 20596 (face font-lock-string-face) 20596 20621 (face font-lock-variable-name-face) 20621 20622 (face font-lock-string-face) 20622 20636 nil 20636 20637 (face font-lock-string-face) 20637 20646 (face font-lock-keyword-face) 20646 20647 (face font-lock-string-face) 20647 20663 nil 20663 20664 (face font-lock-string-face) 20664 20674 (face font-lock-keyword-face) 20674 20675 (face font-lock-string-face) 20675 20695 nil 20695 20696 (face font-lock-string-face) 20696 20715 (face font-lock-variable-name-face) 20715 20716 (face font-lock-string-face) 20716 20736 nil 20736 20748 (face font-lock-string-face) 20748 20770 nil 20770 20780 (face font-lock-string-face) 20780 20800 nil 20800 20807 (face font-lock-string-face) 20807 20827 nil 20827 20839 (face font-lock-string-face) 20839 20859 nil 20859 20867 (face font-lock-string-face) 20867 20923 nil 20923 20935 (face font-lock-string-face) 20935 20957 nil 20957 20972 (face font-lock-string-face) 20972 20992 nil 20992 20999 (face font-lock-string-face) 20999 21019 nil 21019 21026 (face font-lock-string-face) 21026 21046 nil 21046 21058 (face font-lock-string-face) 21058 21078 nil 21078 21086 (face font-lock-string-face) 21086 21180 nil 21180 21181 (face font-lock-string-face) 21181 21190 (face font-lock-keyword-face) 21190 21191 (face font-lock-string-face) 21191 21203 nil 21203 21204 (face font-lock-string-face) 21204 21220 (face font-lock-variable-name-face) 21220 21221 (face font-lock-string-face) 21221 21223 nil 21223 21224 (face font-lock-string-face) 21224 21256 (face font-lock-variable-name-face) 21256 21257 (face font-lock-string-face) 21257 21274 nil 21274 21314 (face font-lock-string-face) 21314 21325 nil 21325 21326 (face font-lock-string-face) 21326 21334 (face font-lock-keyword-face) 21334 21335 (face font-lock-string-face) 21335 21347 nil 21347 21348 (face font-lock-string-face) 21348 21385 (face font-lock-constant-face) 21385 21386 (face font-lock-string-face) 21386 21416 nil 21416 21417 (face font-lock-string-face) 21417 21428 (face font-lock-keyword-face) 21428 21429 (face font-lock-string-face) 21429 21431 nil 21431 21432 (face font-lock-string-face) 21432 21452 (face font-lock-function-name-face) 21452 21453 (face font-lock-string-face) 21453 21461 nil 21461 21462 (face font-lock-string-face) 21462 21466 (face font-lock-keyword-face) 21466 21467 (face font-lock-string-face) 21467 21469 nil 21469 21470 (face font-lock-string-face) 21470 21484 (face font-lock-type-face) 21484 21485 (face font-lock-string-face) 21485 21493 nil 21493 21494 (face font-lock-string-face) 21494 21506 (face font-lock-keyword-face) 21506 21507 (face font-lock-string-face) 21507 21519 nil 21519 21520 (face font-lock-string-face) 21520 21522 (face font-lock-constant-face) 21522 21523 (face font-lock-string-face) 21523 21540 nil 21540 21541 (face font-lock-string-face) 21541 21548 (face font-lock-keyword-face) 21548 21549 (face font-lock-string-face) 21549 21561 nil 21561 21562 (face font-lock-string-face) 21562 21595 (face font-lock-constant-face) 21595 21596 (face font-lock-string-face) 21596 21606 nil 21606 21607 (face font-lock-string-face) 21607 21637 (face font-lock-constant-face) 21637 21638 (face font-lock-string-face) 21638 21648 nil 21648 21649 (face font-lock-string-face) 21649 21682 (face font-lock-constant-face) 21682 21683 (face font-lock-string-face) 21683 21693 nil 21693 21694 (face font-lock-string-face) 21694 21724 (face font-lock-constant-face) 21724 21725 (face font-lock-string-face) 21725 21735 nil 21735 21736 (face font-lock-string-face) 21736 21758 (face font-lock-constant-face) 21758 21759 (face font-lock-string-face) 21759 21769 nil 21769 21770 (face font-lock-string-face) 21770 21795 (face font-lock-constant-face) 21795 21796 (face font-lock-string-face) 21796 21806 nil 21806 21807 (face font-lock-string-face) 21807 21836 (face font-lock-constant-face) 21836 21837 (face font-lock-string-face) 21837 21847 nil 21847 21848 (face font-lock-string-face) 21848 21876 (face font-lock-constant-face) 21876 21877 (face font-lock-string-face) 21877 21907 nil 21907 21908 (face font-lock-string-face) 21908 21919 (face font-lock-keyword-face) 21919 21920 (face font-lock-string-face) 21920 21922 nil 21922 21923 (face font-lock-string-face) 21923 21938 (face font-lock-function-name-face) 21938 21939 (face font-lock-string-face) 21939 21947 nil 21947 21948 (face font-lock-string-face) 21948 21952 (face font-lock-keyword-face) 21952 21953 (face font-lock-string-face) 21953 21955 nil 21955 21956 (face font-lock-string-face) 21956 21966 (face font-lock-type-face) 21966 21967 (face font-lock-string-face) 21967 21975 nil 21975 21976 (face font-lock-string-face) 21976 21988 (face font-lock-keyword-face) 21988 21989 (face font-lock-string-face) 21989 22001 nil 22001 22002 (face font-lock-string-face) 22002 22007 (face font-lock-function-name-face) 22007 22008 (face font-lock-string-face) 22008 22018 nil 22018 22019 (face font-lock-string-face) 22019 22037 (face font-lock-function-name-face) 22037 22038 (face font-lock-string-face) 22038 22048 nil 22048 22049 (face font-lock-string-face) 22049 22060 (face font-lock-function-name-face) 22060 22061 (face font-lock-string-face) 22061 22071 nil 22071 22072 (face font-lock-string-face) 22072 22093 (face font-lock-function-name-face) 22093 22094 (face font-lock-string-face) 22094 22104 nil 22104 22105 (face font-lock-string-face) 22105 22131 (face font-lock-function-name-face) 22131 22132 (face font-lock-string-face) 22132 22142 nil 22142 22143 (face font-lock-string-face) 22143 22177 (face font-lock-function-name-face) 22177 22178 (face font-lock-string-face) 22178 22188 nil 22188 22189 (face font-lock-string-face) 22189 22215 (face font-lock-function-name-face) 22215 22216 (face font-lock-string-face) 22216 22226 nil 22226 22227 (face font-lock-string-face) 22227 22253 (face font-lock-function-name-face) 22253 22254 (face font-lock-string-face) 22254 22264 nil 22264 22265 (face font-lock-string-face) 22265 22280 (face font-lock-function-name-face) 22280 22281 (face font-lock-string-face) 22281 22298 nil 22298 22299 (face font-lock-string-face) 22299 22306 (face font-lock-keyword-face) 22306 22307 (face font-lock-string-face) 22307 22319 nil 22319 22320 (face font-lock-string-face) 22320 22361 (face font-lock-constant-face) 22361 22362 (face font-lock-string-face) 22362 22372 nil 22372 22373 (face font-lock-string-face) 22373 22413 (face font-lock-constant-face) 22413 22414 (face font-lock-string-face) 22414 22424 nil 22424 22425 (face font-lock-string-face) 22425 22461 (face font-lock-constant-face) 22461 22462 (face font-lock-string-face) 22462 22472 nil 22472 22473 (face font-lock-string-face) 22473 22502 (face font-lock-constant-face) 22502 22503 (face font-lock-string-face) 22503 22513 nil 22513 22514 (face font-lock-string-face) 22514 22550 (face font-lock-constant-face) 22550 22551 (face font-lock-string-face) 22551 22561 nil 22561 22562 (face font-lock-string-face) 22562 22610 (face font-lock-constant-face) 22610 22611 (face font-lock-string-face) 22611 22621 nil 22621 22622 (face font-lock-string-face) 22622 22663 (face font-lock-constant-face) 22663 22664 (face font-lock-string-face) 22664 22674 nil 22674 22675 (face font-lock-string-face) 22675 22711 (face font-lock-constant-face) 22711 22712 (face font-lock-string-face) 22712 22722 nil 22722 22723 (face font-lock-string-face) 22723 22757 (face font-lock-constant-face) 22757 22758 (face font-lock-string-face) 22758 22768 nil 22768 22769 (face font-lock-string-face) 22769 22797 (face font-lock-constant-face) 22797 22798 (face font-lock-string-face) 22798 22808 nil 22808 22809 (face font-lock-string-face) 22809 22853 (face font-lock-constant-face) 22853 22854 (face font-lock-string-face) 22854 22864 nil 22864 22865 (face font-lock-string-face) 22865 22900 (face font-lock-constant-face) 22900 22901 (face font-lock-string-face) 22901 22911 nil 22911 22912 (face font-lock-string-face) 22912 22961 (face font-lock-constant-face) 22961 22962 (face font-lock-string-face) 22962 22972 nil 22972 22973 (face font-lock-string-face) 22973 23011 (face font-lock-constant-face) 23011 23012 (face font-lock-string-face) 23012 23022 nil 23022 23023 (face font-lock-string-face) 23023 23055 (face font-lock-constant-face) 23055 23056 (face font-lock-string-face) 23056 23066 nil 23066 23067 (face font-lock-string-face) 23067 23116 (face font-lock-constant-face) 23116 23117 (face font-lock-string-face) 23117 23127 nil 23127 23128 (face font-lock-string-face) 23128 23178 (face font-lock-constant-face) 23178 23179 (face font-lock-string-face) 23179 23189 nil 23189 23190 (face font-lock-string-face) 23190 23228 (face font-lock-constant-face) 23228 23229 (face font-lock-string-face) 23229 23239 nil 23239 23240 (face font-lock-string-face) 23240 23277 (face font-lock-constant-face) 23277 23278 (face font-lock-string-face) 23278 23288 nil 23288 23289 (face font-lock-string-face) 23289 23332 (face font-lock-constant-face) 23332 23333 (face font-lock-string-face) 23333 23343 nil 23343 23344 (face font-lock-string-face) 23344 23368 (face font-lock-constant-face) 23368 23369 (face font-lock-string-face) 23369 23379 nil 23379 23380 (face font-lock-string-face) 23380 23402 (face font-lock-constant-face) 23402 23403 (face font-lock-string-face) 23403 23413 nil 23413 23414 (face font-lock-string-face) 23414 23447 (face font-lock-constant-face) 23447 23448 (face font-lock-string-face) 23448 23458 nil 23458 23459 (face font-lock-string-face) 23459 23487 (face font-lock-constant-face) 23487 23488 (face font-lock-string-face) 23488 23498 nil 23498 23499 (face font-lock-string-face) 23499 23530 (face font-lock-constant-face) 23530 23531 (face font-lock-string-face) 23531 23541 nil 23541 23542 (face font-lock-string-face) 23542 23563 (face font-lock-constant-face) 23563 23564 (face font-lock-string-face) 23564 23574 nil 23574 23575 (face font-lock-string-face) 23575 23609 (face font-lock-constant-face) 23609 23610 (face font-lock-string-face) 23610 23620 nil 23620 23621 (face font-lock-string-face) 23621 23654 (face font-lock-constant-face) 23654 23655 (face font-lock-string-face) 23655 23665 nil 23665 23666 (face font-lock-string-face) 23666 23700 (face font-lock-constant-face) 23700 23701 (face font-lock-string-face) 23701 23711 nil 23711 23712 (face font-lock-string-face) 23712 23753 (face font-lock-constant-face) 23753 23754 (face font-lock-string-face) 23754 23764 nil 23764 23765 (face font-lock-string-face) 23765 23790 (face font-lock-constant-face) 23790 23791 (face font-lock-string-face) 23791 23801 nil 23801 23802 (face font-lock-string-face) 23802 23825 (face font-lock-constant-face) 23825 23826 (face font-lock-string-face) 23826 23836 nil 23836 23837 (face font-lock-string-face) 23837 23862 (face font-lock-constant-face) 23862 23863 (face font-lock-string-face) 23863 23873 nil 23873 23874 (face font-lock-string-face) 23874 23906 (face font-lock-constant-face) 23906 23907 (face font-lock-string-face) 23907 23917 nil 23917 23918 (face font-lock-string-face) 23918 23947 (face font-lock-constant-face) 23947 23948 (face font-lock-string-face) 23948 23958 nil 23958 23959 (face font-lock-string-face) 23959 23981 (face font-lock-constant-face) 23981 23982 (face font-lock-string-face) 23982 23992 nil 23992 23993 (face font-lock-string-face) 23993 24014 (face font-lock-constant-face) 24014 24015 (face font-lock-string-face) 24015 24025 nil 24025 24026 (face font-lock-string-face) 24026 24054 (face font-lock-constant-face) 24054 24055 (face font-lock-string-face) 24055 24065 nil 24065 24066 (face font-lock-string-face) 24066 24093 (face font-lock-constant-face) 24093 24094 (face font-lock-string-face) 24094 24104 nil 24104 24105 (face font-lock-string-face) 24105 24133 (face font-lock-constant-face) 24133 24134 (face font-lock-string-face) 24134 24144 nil 24144 24145 (face font-lock-string-face) 24145 24177 (face font-lock-constant-face) 24177 24178 (face font-lock-string-face) 24178 24188 nil 24188 24189 (face font-lock-string-face) 24189 24221 (face font-lock-constant-face) 24221 24222 (face font-lock-string-face) 24222 24232 nil 24232 24233 (face font-lock-string-face) 24233 24277 (face font-lock-constant-face) 24277 24278 (face font-lock-string-face) 24278 24288 nil 24288 24289 (face font-lock-string-face) 24289 24328 (face font-lock-constant-face) 24328 24329 (face font-lock-string-face) 24329 24339 nil 24339 24340 (face font-lock-string-face) 24340 24379 (face font-lock-constant-face) 24379 24380 (face font-lock-string-face) 24380 24390 nil 24390 24391 (face font-lock-string-face) 24391 24424 (face font-lock-constant-face) 24424 24425 (face font-lock-string-face) 24425 24435 nil 24435 24436 (face font-lock-string-face) 24436 24476 (face font-lock-constant-face) 24476 24477 (face font-lock-string-face) 24477 24487 nil 24487 24488 (face font-lock-string-face) 24488 24521 (face font-lock-constant-face) 24521 24522 (face font-lock-string-face) 24522 24532 nil 24532 24533 (face font-lock-string-face) 24533 24567 (face font-lock-constant-face) 24567 24568 (face font-lock-string-face) 24568 24578 nil 24578 24579 (face font-lock-string-face) 24579 24610 (face font-lock-constant-face) 24610 24611 (face font-lock-string-face) 24611 24621 nil 24621 24622 (face font-lock-string-face) 24622 24673 (face font-lock-constant-face) 24673 24674 (face font-lock-string-face) 24674 24684 nil 24684 24685 (face font-lock-string-face) 24685 24725 (face font-lock-constant-face) 24725 24726 (face font-lock-string-face) 24726 24736 nil 24736 24737 (face font-lock-string-face) 24737 24773 (face font-lock-constant-face) 24773 24774 (face font-lock-string-face) 24774 24784 nil 24784 24785 (face font-lock-string-face) 24785 24821 (face font-lock-constant-face) 24821 24822 (face font-lock-string-face) 24822 24832 nil 24832 24833 (face font-lock-string-face) 24833 24874 (face font-lock-constant-face) 24874 24875 (face font-lock-string-face) 24875 24885 nil 24885 24886 (face font-lock-string-face) 24886 24926 (face font-lock-constant-face) 24926 24927 (face font-lock-string-face) 24927 24937 nil 24937 24938 (face font-lock-string-face) 24938 24977 (face font-lock-constant-face) 24977 24978 (face font-lock-string-face) 24978 24988 nil 24988 24989 (face font-lock-string-face) 24989 25035 (face font-lock-constant-face) 25035 25036 (face font-lock-string-face) 25036 25046 nil 25046 25047 (face font-lock-string-face) 25047 25070 (face font-lock-constant-face) 25070 25071 (face font-lock-string-face) 25071 25081 nil 25081 25082 (face font-lock-string-face) 25082 25104 (face font-lock-constant-face) 25104 25105 (face font-lock-string-face) 25105 25115 nil 25115 25116 (face font-lock-string-face) 25116 25152 (face font-lock-constant-face) 25152 25153 (face font-lock-string-face) 25153 25163 nil 25163 25164 (face font-lock-string-face) 25164 25210 (face font-lock-constant-face) 25210 25211 (face font-lock-string-face) 25211 25221 nil 25221 25222 (face font-lock-string-face) 25222 25250 (face font-lock-constant-face) 25250 25251 (face font-lock-string-face) 25251 25268 nil 25268 25269 (face font-lock-string-face) 25269 25279 (face font-lock-keyword-face) 25279 25280 (face font-lock-string-face) 25280 25293 nil 25293 25294 (face font-lock-string-face) 25294 25319 (face font-lock-variable-name-face) 25319 25320 (face font-lock-string-face) 25320 25334 nil 25334 25335 (face font-lock-string-face) 25335 25345 (face font-lock-keyword-face) 25345 25346 (face font-lock-string-face) 25346 25363 nil 25363 25364 (face font-lock-string-face) 25364 25385 (face font-lock-variable-name-face) 25385 25386 (face font-lock-string-face) 25386 25404 nil 25404 25405 (face font-lock-string-face) 25405 25417 (face font-lock-keyword-face) 25417 25418 (face font-lock-string-face) 25418 25438 nil 25438 25439 (face font-lock-string-face) 25439 25480 (face font-lock-function-name-face) 25480 25481 (face font-lock-string-face) 25481 25550 nil 25550 25551 (face font-lock-string-face) 25551 25566 (face font-lock-variable-name-face) 25566 25567 (face font-lock-string-face) 25567 25581 nil 25581 25582 (face font-lock-string-face) 25582 25594 (face font-lock-keyword-face) 25594 25595 (face font-lock-string-face) 25595 25611 nil 25611 25612 (face font-lock-string-face) 25612 25651 (face font-lock-function-name-face) 25651 25652 (face font-lock-string-face) 25652 25688 nil 25688 25689 (face font-lock-string-face) 25689 25704 (face font-lock-variable-name-face) 25704 25705 (face font-lock-string-face) 25705 25719 nil 25719 25720 (face font-lock-string-face) 25720 25728 (face font-lock-keyword-face) 25728 25729 (face font-lock-string-face) 25729 25745 nil 25745 25746 (face font-lock-string-face) 25746 25782 (face font-lock-constant-face) 25782 25783 (face font-lock-string-face) 25783 25797 nil 25797 25798 (face font-lock-string-face) 25798 25820 (face font-lock-constant-face) 25820 25821 (face font-lock-string-face) 25821 25835 nil 25835 25836 (face font-lock-string-face) 25836 25857 (face font-lock-constant-face) 25857 25858 (face font-lock-string-face) 25858 25872 nil 25872 25873 (face font-lock-string-face) 25873 25905 (face font-lock-constant-face) 25905 25906 (face font-lock-string-face) 25906 25920 nil 25920 25921 (face font-lock-string-face) 25921 25961 (face font-lock-constant-face) 25961 25962 (face font-lock-string-face) 25962 25976 nil 25976 25977 (face font-lock-string-face) 25977 26016 (face font-lock-constant-face) 26016 26017 (face font-lock-string-face) 26017 26031 nil 26031 26032 (face font-lock-string-face) 26032 26065 (face font-lock-constant-face) 26065 26066 (face font-lock-string-face) 26066 26080 nil 26080 26081 (face font-lock-string-face) 26081 26115 (face font-lock-constant-face) 26115 26116 (face font-lock-string-face) 26116 26130 nil 26130 26131 (face font-lock-string-face) 26131 26162 (face font-lock-constant-face) 26162 26163 (face font-lock-string-face) 26163 26177 nil 26177 26178 (face font-lock-string-face) 26178 26229 (face font-lock-constant-face) 26229 26230 (face font-lock-string-face) 26230 26244 nil 26244 26245 (face font-lock-string-face) 26245 26285 (face font-lock-constant-face) 26285 26286 (face font-lock-string-face) 26286 26300 nil 26300 26301 (face font-lock-string-face) 26301 26337 (face font-lock-constant-face) 26337 26338 (face font-lock-string-face) 26338 26352 nil 26352 26353 (face font-lock-string-face) 26353 26394 (face font-lock-constant-face) 26394 26395 (face font-lock-string-face) 26395 26409 nil 26409 26410 (face font-lock-string-face) 26410 26443 (face font-lock-constant-face) 26443 26444 (face font-lock-string-face) 26444 26458 nil 26458 26459 (face font-lock-string-face) 26459 26495 (face font-lock-constant-face) 26495 26496 (face font-lock-string-face) 26496 26532 nil 26532 26533 (face font-lock-string-face) 26533 26546 (face font-lock-variable-name-face) 26546 26547 (face font-lock-string-face) 26547 26561 nil 26561 26562 (face font-lock-string-face) 26562 26572 (face font-lock-keyword-face) 26572 26573 (face font-lock-string-face) 26573 26590 nil 26590 26591 (face font-lock-string-face) 26591 26604 (face font-lock-variable-name-face) 26604 26605 (face font-lock-string-face) 26605 26623 nil 26623 26624 (face font-lock-string-face) 26624 26631 (face font-lock-keyword-face) 26631 26632 (face font-lock-string-face) 26632 26652 nil 26652 26653 (face font-lock-string-face) 26653 26688 (face font-lock-constant-face) 26688 26689 (face font-lock-string-face) 26689 26722 nil 26722 26723 (face font-lock-string-face) 26723 26730 (face font-lock-keyword-face) 26730 26731 (face font-lock-string-face) 26731 26751 nil 26751 26752 (face font-lock-string-face) 26752 26760 (face font-lock-preprocessor-face) 26760 26761 (face font-lock-string-face) 26761 26831 nil 26831 26832 (face font-lock-string-face) 26832 26873 (face font-lock-variable-name-face) 26873 26874 (face font-lock-string-face) 26874 26888 nil 26888 26889 (face font-lock-string-face) 26889 26896 (face font-lock-keyword-face) 26896 26897 (face font-lock-string-face) 26897 26913 nil 26913 26914 (face font-lock-string-face) 26914 26954 (face font-lock-constant-face) 26954 26955 (face font-lock-string-face) 26955 26991 nil 26991 26992 (face font-lock-string-face) 26992 27035 (face font-lock-variable-name-face) 27035 27036 (face font-lock-string-face) 27036 27050 nil 27050 27051 (face font-lock-string-face) 27051 27058 (face font-lock-keyword-face) 27058 27059 (face font-lock-string-face) 27059 27075 nil 27075 27076 (face font-lock-string-face) 27076 27095 (face font-lock-constant-face) 27095 27096 (face font-lock-string-face) 27096 27110 nil 27110 27111 (face font-lock-string-face) 27111 27137 (face font-lock-constant-face) 27137 27138 (face font-lock-string-face) 27138 27152 nil 27152 27153 (face font-lock-string-face) 27153 27186 (face font-lock-constant-face) 27186 27187 (face font-lock-string-face) 27187 27201 nil 27201 27202 (face font-lock-string-face) 27202 27235 (face font-lock-constant-face) 27235 27236 (face font-lock-string-face) 27236 27291 nil 27291 27292 (face font-lock-string-face) 27292 27303 (face font-lock-keyword-face) 27303 27304 (face font-lock-string-face) 27304 27306 nil 27306 27307 (face font-lock-string-face) 27307 27325 (face font-lock-function-name-face) 27325 27326 (face font-lock-string-face) 27326 27334 nil 27334 27335 (face font-lock-string-face) 27335 27339 (face font-lock-keyword-face) 27339 27340 (face font-lock-string-face) 27340 27342 nil 27342 27343 (face font-lock-string-face) 27343 27357 (face font-lock-type-face) 27357 27358 (face font-lock-string-face) 27358 27366 nil 27366 27367 (face font-lock-string-face) 27367 27379 (face font-lock-keyword-face) 27379 27380 (face font-lock-string-face) 27380 27392 nil 27392 27393 (face font-lock-string-face) 27393 27398 (face font-lock-function-name-face) 27398 27399 (face font-lock-string-face) 27399 27409 nil 27409 27410 (face font-lock-string-face) 27410 27431 (face font-lock-function-name-face) 27431 27432 (face font-lock-string-face) 27432 27442 nil 27442 27443 (face font-lock-string-face) 27443 27469 (face font-lock-function-name-face) 27469 27470 (face font-lock-string-face) 27470 27480 nil 27480 27481 (face font-lock-string-face) 27481 27507 (face font-lock-function-name-face) 27507 27508 (face font-lock-string-face) 27508 27525 nil 27525 27526 (face font-lock-string-face) 27526 27533 (face font-lock-keyword-face) 27533 27534 (face font-lock-string-face) 27534 27546 nil 27546 27547 (face font-lock-string-face) 27547 27591 (face font-lock-constant-face) 27591 27592 (face font-lock-string-face) 27592 27602 nil 27602 27603 (face font-lock-string-face) 27603 27646 (face font-lock-constant-face) 27646 27647 (face font-lock-string-face) 27647 27657 nil 27657 27658 (face font-lock-string-face) 27658 27679 (face font-lock-constant-face) 27679 27680 (face font-lock-string-face) 27680 27690 nil 27690 27691 (face font-lock-string-face) 27691 27711 (face font-lock-constant-face) 27711 27712 (face font-lock-string-face) 27712 27722 nil 27722 27723 (face font-lock-string-face) 27723 27752 (face font-lock-constant-face) 27752 27753 (face font-lock-string-face) 27753 27763 nil 27763 27764 (face font-lock-string-face) 27764 27792 (face font-lock-constant-face) 27792 27793 (face font-lock-string-face) 27793 27803 nil 27803 27804 (face font-lock-string-face) 27804 27829 (face font-lock-constant-face) 27829 27830 (face font-lock-string-face) 27830 27840 nil 27840 27841 (face font-lock-string-face) 27841 27865 (face font-lock-constant-face) 27865 27866 (face font-lock-string-face) 27866 27876 nil 27876 27877 (face font-lock-string-face) 27877 27901 (face font-lock-constant-face) 27901 27902 (face font-lock-string-face) 27902 27912 nil 27912 27913 (face font-lock-string-face) 27913 27936 (face font-lock-constant-face) 27936 27937 (face font-lock-string-face) 27937 27947 nil 27947 27948 (face font-lock-string-face) 27948 27968 (face font-lock-constant-face) 27968 27969 (face font-lock-string-face) 27969 27979 nil 27979 27980 (face font-lock-string-face) 27980 27999 (face font-lock-constant-face) 27999 28000 (face font-lock-string-face) 28000 28030 nil 28030 28031 (face font-lock-string-face) 28031 28042 (face font-lock-keyword-face) 28042 28043 (face font-lock-string-face) 28043 28045 nil 28045 28046 (face font-lock-string-face) 28046 28058 (face font-lock-function-name-face) 28058 28059 (face font-lock-string-face) 28059 28067 nil 28067 28068 (face font-lock-string-face) 28068 28072 (face font-lock-keyword-face) 28072 28073 (face font-lock-string-face) 28073 28075 nil 28075 28076 (face font-lock-string-face) 28076 28086 (face font-lock-type-face) 28086 28087 (face font-lock-string-face) 28087 28095 nil 28095 28096 (face font-lock-string-face) 28096 28108 (face font-lock-keyword-face) 28108 28109 (face font-lock-string-face) 28109 28121 nil 28121 28122 (face font-lock-string-face) 28122 28127 (face font-lock-function-name-face) 28127 28128 (face font-lock-string-face) 28128 28138 nil 28138 28139 (face font-lock-string-face) 28139 28150 (face font-lock-function-name-face) 28150 28151 (face font-lock-string-face) 28151 28161 nil 28161 28162 (face font-lock-string-face) 28162 28183 (face font-lock-function-name-face) 28183 28184 (face font-lock-string-face) 28184 28194 nil 28194 28195 (face font-lock-string-face) 28195 28216 (face font-lock-function-name-face) 28216 28217 (face font-lock-string-face) 28217 28234 nil 28234 28235 (face font-lock-string-face) 28235 28242 (face font-lock-keyword-face) 28242 28243 (face font-lock-string-face) 28243 28255 nil 28255 28256 (face font-lock-string-face) 28256 28290 (face font-lock-constant-face) 28290 28291 (face font-lock-string-face) 28291 28321 nil 28321 28322 (face font-lock-string-face) 28322 28333 (face font-lock-keyword-face) 28333 28334 (face font-lock-string-face) 28334 28336 nil 28336 28337 (face font-lock-string-face) 28337 28349 (face font-lock-function-name-face) 28349 28350 (face font-lock-string-face) 28350 28358 nil 28358 28359 (face font-lock-string-face) 28359 28363 (face font-lock-keyword-face) 28363 28364 (face font-lock-string-face) 28364 28366 nil 28366 28367 (face font-lock-string-face) 28367 28377 (face font-lock-type-face) 28377 28378 (face font-lock-string-face) 28378 28386 nil 28386 28387 (face font-lock-string-face) 28387 28394 (face font-lock-keyword-face) 28394 28395 (face font-lock-string-face) 28395 28407 nil 28407 28408 (face font-lock-string-face) 28408 28441 (face font-lock-constant-face) 28441 28442 (face font-lock-string-face) 28442 28471 nil 28471 28472 (face font-lock-string-face) 28472 28483 (face font-lock-keyword-face) 28483 28484 (face font-lock-string-face) 28484 28486 nil 28486 28487 (face font-lock-string-face) 28487 28498 (face font-lock-function-name-face) 28498 28499 (face font-lock-string-face) 28499 28507 nil 28507 28508 (face font-lock-string-face) 28508 28512 (face font-lock-keyword-face) 28512 28513 (face font-lock-string-face) 28513 28515 nil 28515 28516 (face font-lock-string-face) 28516 28526 (face font-lock-type-face) 28526 28527 (face font-lock-string-face) 28527 28535 nil 28535 28536 (face font-lock-string-face) 28536 28548 (face font-lock-keyword-face) 28548 28549 (face font-lock-string-face) 28549 28561 nil 28561 28562 (face font-lock-string-face) 28562 28567 (face font-lock-function-name-face) 28567 28568 (face font-lock-string-face) 28568 28578 nil 28578 28579 (face font-lock-string-face) 28579 28600 (face font-lock-function-name-face) 28600 28601 (face font-lock-string-face) 28601 28618 nil 28618 28619 (face font-lock-string-face) 28619 28626 (face font-lock-keyword-face) 28626 28627 (face font-lock-string-face) 28627 28639 nil 28639 28640 (face font-lock-string-face) 28640 28672 (face font-lock-constant-face) 28672 28673 (face font-lock-string-face) 28673 28698 nil 28698 28699 (face font-lock-string-face) 28699 28709 (face font-lock-keyword-face) 28709 28710 (face font-lock-string-face) 28710 28719 nil 28719 28720 (face font-lock-string-face) 28720 28729 (face font-lock-variable-name-face) 28729 28730 (face font-lock-string-face) 28730 28740 nil 28740 28741 (face font-lock-string-face) 28741 28748 (face font-lock-keyword-face) 28748 28749 (face font-lock-string-face) 28749 28773 nil 28773 28774 (face font-lock-string-face) 28774 28785 (face font-lock-keyword-face) 28785 28786 (face font-lock-string-face) 28786 28788 nil 28788 28789 (face font-lock-string-face) 28789 28799 (face font-lock-function-name-face) 28799 28800 (face font-lock-string-face) 28800 28812 nil 28812 28813 (face font-lock-string-face) 28813 28817 (face font-lock-keyword-face) 28817 28818 (face font-lock-string-face) 28818 28820 nil 28820 28821 (face font-lock-string-face) 28821 28831 (face font-lock-type-face) 28831 28832 (face font-lock-string-face) 28832 28844 nil 28844 28845 (face font-lock-string-face) 28845 28857 (face font-lock-keyword-face) 28857 28858 (face font-lock-string-face) 28858 28874 nil 28874 28875 (face font-lock-string-face) 28875 28880 (face font-lock-function-name-face) 28880 28881 (face font-lock-string-face) 28881 28895 nil 28895 28896 (face font-lock-string-face) 28896 28907 (face font-lock-function-name-face) 28907 28908 (face font-lock-string-face) 28908 28922 nil 28922 28923 (face font-lock-string-face) 28923 28944 (face font-lock-function-name-face) 28944 28945 (face font-lock-string-face) 28945 28959 nil 28959 28960 (face font-lock-string-face) 28960 29043 (face font-lock-function-name-face) 29043 29044 (face font-lock-string-face) 29044 29058 nil 29058 29059 (face font-lock-string-face) 29059 29074 (face font-lock-function-name-face) 29074 29075 (face font-lock-string-face) 29075 29100 nil 29100 29101 (face font-lock-string-face) 29101 29113 (face font-lock-keyword-face) 29113 29114 (face font-lock-string-face) 29114 29130 nil 29130 29131 (face font-lock-string-face) 29131 29133 (face font-lock-constant-face) 29133 29138 (face font-lock-variable-name-face) 29138 29163 (face font-lock-constant-face) 29163 29164 (face font-lock-string-face) 29164 29189 nil 29189 29190 (face font-lock-string-face) 29190 29197 (face font-lock-keyword-face) 29197 29198 (face font-lock-string-face) 29198 29214 nil 29214 29215 (face font-lock-string-face) 29215 29238 (face font-lock-constant-face) 29238 29239 (face font-lock-string-face) 29239 29253 nil 29253 29254 (face font-lock-string-face) 29254 29280 (face font-lock-constant-face) 29280 29281 (face font-lock-string-face) 29281 29295 nil 29295 29296 (face font-lock-string-face) 29296 29321 (face font-lock-constant-face) 29321 29322 (face font-lock-string-face) 29322 29336 nil 29336 29337 (face font-lock-string-face) 29337 29361 (face font-lock-constant-face) 29361 29362 (face font-lock-string-face) 29362 29376 nil 29376 29377 (face font-lock-string-face) 29377 29407 (face font-lock-constant-face) 29407 29408 (face font-lock-string-face) 29408 29422 nil 29422 29423 (face font-lock-string-face) 29423 29453 (face font-lock-constant-face) 29453 29454 (face font-lock-string-face) 29454 29468 nil 29468 29469 (face font-lock-string-face) 29469 29493 (face font-lock-constant-face) 29493 29494 (face font-lock-string-face) 29494 29508 nil 29508 29509 (face font-lock-string-face) 29509 29532 (face font-lock-constant-face) 29532 29533 (face font-lock-string-face) 29533 29547 nil 29547 29548 (face font-lock-string-face) 29548 29575 (face font-lock-constant-face) 29575 29576 (face font-lock-string-face) 29576 29590 nil 29590 29591 (face font-lock-string-face) 29591 29614 (face font-lock-constant-face) 29614 29615 (face font-lock-string-face) 29615 29640 nil 29640 29655 (face font-lock-string-face) 29655 29671 nil 29671 29685 (face font-lock-string-face) 29685 29703 nil 29703 29714 (face font-lock-string-face) 29714 29716 nil 29716 29719 (face font-lock-string-face) 29719 29729 nil 29729 29754 (face font-lock-comment-face) 29754 29792 nil 29792 29793 (face font-lock-string-face) 29793 29800 (face font-lock-keyword-face) 29800 29801 (face font-lock-string-face) 29801 29817 nil 29817 29818 (face font-lock-string-face) 29818 29843 (face font-lock-preprocessor-face) 29843 29844 (face font-lock-string-face) 29844 29892 nil 29892 29893 (face font-lock-string-face) 29893 29929 (face font-lock-variable-name-face) 29929 29930 (face font-lock-string-face) 29930 29940 nil 29940 29941 (face font-lock-string-face) 29941 29948 (face font-lock-keyword-face) 29948 29949 (face font-lock-string-face) 29949 29973 nil 29973 29974 (face font-lock-string-face) 29974 29985 (face font-lock-keyword-face) 29985 29986 (face font-lock-string-face) 29986 29988 nil 29988 29989 (face font-lock-string-face) 29989 30001 (face font-lock-function-name-face) 30001 30002 (face font-lock-string-face) 30002 30014 nil 30014 30015 (face font-lock-string-face) 30015 30019 (face font-lock-keyword-face) 30019 30020 (face font-lock-string-face) 30020 30022 nil 30022 30023 (face font-lock-string-face) 30023 30033 (face font-lock-type-face) 30033 30034 (face font-lock-string-face) 30034 30046 nil 30046 30047 (face font-lock-string-face) 30047 30059 (face font-lock-keyword-face) 30059 30060 (face font-lock-string-face) 30060 30076 nil 30076 30077 (face font-lock-string-face) 30077 30082 (face font-lock-function-name-face) 30082 30083 (face font-lock-string-face) 30083 30097 nil 30097 30098 (face font-lock-string-face) 30098 30109 (face font-lock-function-name-face) 30109 30110 (face font-lock-string-face) 30110 30124 nil 30124 30125 (face font-lock-string-face) 30125 30146 (face font-lock-function-name-face) 30146 30147 (face font-lock-string-face) 30147 30161 nil 30161 30162 (face font-lock-string-face) 30162 30180 (face font-lock-function-name-face) 30180 30181 (face font-lock-string-face) 30181 30206 nil 30206 30207 (face font-lock-string-face) 30207 30214 (face font-lock-keyword-face) 30214 30215 (face font-lock-string-face) 30215 30231 nil 30231 30232 (face font-lock-string-face) 30232 30266 (face font-lock-constant-face) 30266 30267 (face font-lock-string-face) 30267 30281 nil 30281 30282 (face font-lock-string-face) 30282 30321 (face font-lock-constant-face) 30321 30322 (face font-lock-string-face) 30322 30336 nil 30336 30337 (face font-lock-string-face) 30337 30375 (face font-lock-constant-face) 30375 30376 (face font-lock-string-face) 30376 30390 nil 30390 30391 (face font-lock-string-face) 30391 30430 (face font-lock-constant-face) 30430 30431 (face font-lock-string-face) 30431 30445 nil 30445 30446 (face font-lock-string-face) 30446 30484 (face font-lock-constant-face) 30484 30485 (face font-lock-string-face) 30485 30499 nil 30499 30500 (face font-lock-string-face) 30500 30533 (face font-lock-constant-face) 30533 30534 (face font-lock-string-face) 30534 30548 nil 30548 30549 (face font-lock-string-face) 30549 30581 (face font-lock-constant-face) 30581 30582 (face font-lock-string-face) 30582 30596 nil 30596 30597 (face font-lock-string-face) 30597 30626 (face font-lock-constant-face) 30626 30627 (face font-lock-string-face) 30627 30641 nil 30641 30642 (face font-lock-string-face) 30642 30670 (face font-lock-constant-face) 30670 30671 (face font-lock-string-face) 30671 30685 nil 30685 30686 (face font-lock-string-face) 30686 30714 (face font-lock-constant-face) 30714 30715 (face font-lock-string-face) 30715 30729 nil 30729 30730 (face font-lock-string-face) 30730 30757 (face font-lock-constant-face) 30757 30758 (face font-lock-string-face) 30758 30783 nil 30783 30784 (face font-lock-string-face) 30784 30794 (face font-lock-keyword-face) 30794 30795 (face font-lock-string-face) 30795 30812 nil 30812 30813 (face font-lock-string-face) 30813 30834 (face font-lock-variable-name-face) 30834 30835 (face font-lock-string-face) 30835 30853 nil 30853 30854 (face font-lock-string-face) 30854 30866 (face font-lock-keyword-face) 30866 30867 (face font-lock-string-face) 30867 30887 nil 30887 30888 (face font-lock-string-face) 30888 30917 (face font-lock-function-name-face) 30917 30918 (face font-lock-string-face) 30918 30951 nil 30951 30952 (face font-lock-string-face) 30952 30959 (face font-lock-keyword-face) 30959 30960 (face font-lock-string-face) 30960 30980 nil 30980 30981 (face font-lock-string-face) 30981 31015 (face font-lock-constant-face) 31015 31016 (face font-lock-string-face) 31016 31064 nil 31064 31065 (face font-lock-string-face) 31065 31074 (face font-lock-variable-name-face) 31074 31075 (face font-lock-string-face) 31075 31093 nil 31093 31094 (face font-lock-string-face) 31094 31106 (face font-lock-keyword-face) 31106 31107 (face font-lock-string-face) 31107 31127 nil 31127 31128 (face font-lock-string-face) 31128 31175 (face font-lock-function-name-face) 31175 31176 (face font-lock-string-face) 31176 31194 nil 31194 31195 (face font-lock-string-face) 31195 31245 (face font-lock-function-name-face) 31245 31246 (face font-lock-string-face) 31246 31279 nil 31279 31280 (face font-lock-string-face) 31280 31287 (face font-lock-keyword-face) 31287 31288 (face font-lock-string-face) 31288 31308 nil 31308 31309 (face font-lock-string-face) 31309 31341 (face font-lock-constant-face) 31341 31342 (face font-lock-string-face) 31342 31423 nil 31423 31424 (face font-lock-string-face) 31424 31462 (face font-lock-variable-name-face) 31462 31463 (face font-lock-string-face) 31463 31473 nil 31473 31474 (face font-lock-string-face) 31474 31481 (face font-lock-keyword-face) 31481 31482 (face font-lock-string-face) 31482 31506 nil 31506 31507 (face font-lock-string-face) 31507 31518 (face font-lock-keyword-face) 31518 31519 (face font-lock-string-face) 31519 31521 nil 31521 31522 (face font-lock-string-face) 31522 31539 (face font-lock-function-name-face) 31539 31540 (face font-lock-string-face) 31540 31552 nil 31552 31553 (face font-lock-string-face) 31553 31557 (face font-lock-keyword-face) 31557 31558 (face font-lock-string-face) 31558 31560 nil 31560 31561 (face font-lock-string-face) 31561 31571 (face font-lock-type-face) 31571 31572 (face font-lock-string-face) 31572 31584 nil 31584 31585 (face font-lock-string-face) 31585 31597 (face font-lock-keyword-face) 31597 31598 (face font-lock-string-face) 31598 31614 nil 31614 31615 (face font-lock-string-face) 31615 31636 (face font-lock-function-name-face) 31636 31637 (face font-lock-string-face) 31637 31651 nil 31651 31652 (face font-lock-string-face) 31652 31670 (face font-lock-function-name-face) 31670 31671 (face font-lock-string-face) 31671 31696 nil 31696 31697 (face font-lock-string-face) 31697 31706 (face font-lock-keyword-face) 31706 31707 (face font-lock-string-face) 31707 31723 nil 31723 31724 (face font-lock-string-face) 31724 31728 (face font-lock-constant-face) 31728 31729 (face font-lock-string-face) 31729 31743 nil 31743 31744 (face font-lock-string-face) 31744 31748 (face font-lock-constant-face) 31748 31749 (face font-lock-string-face) 31749 31774 nil 31774 31775 (face font-lock-string-face) 31775 31782 (face font-lock-keyword-face) 31782 31783 (face font-lock-string-face) 31783 31799 nil 31799 31800 (face font-lock-string-face) 31800 31844 (face font-lock-constant-face) 31844 31845 (face font-lock-string-face) 31845 31893 nil 31893 31894 (face font-lock-string-face) 31894 31943 (face font-lock-variable-name-face) 31943 31944 (face font-lock-string-face) 31944 31954 nil 31954 31955 (face font-lock-string-face) 31955 31962 (face font-lock-keyword-face) 31962 31963 (face font-lock-string-face) 31963 31987 nil 31987 31988 (face font-lock-string-face) 31988 31999 (face font-lock-keyword-face) 31999 32000 (face font-lock-string-face) 32000 32002 nil 32002 32003 (face font-lock-string-face) 32003 32013 (face font-lock-function-name-face) 32013 32014 (face font-lock-string-face) 32014 32026 nil 32026 32027 (face font-lock-string-face) 32027 32031 (face font-lock-keyword-face) 32031 32032 (face font-lock-string-face) 32032 32034 nil 32034 32035 (face font-lock-string-face) 32035 32045 (face font-lock-type-face) 32045 32046 (face font-lock-string-face) 32046 32058 nil 32058 32059 (face font-lock-string-face) 32059 32071 (face font-lock-keyword-face) 32071 32072 (face font-lock-string-face) 32072 32088 nil 32088 32089 (face font-lock-string-face) 32089 32094 (face font-lock-function-name-face) 32094 32095 (face font-lock-string-face) 32095 32109 nil 32109 32110 (face font-lock-string-face) 32110 32121 (face font-lock-function-name-face) 32121 32122 (face font-lock-string-face) 32122 32136 nil 32136 32137 (face font-lock-string-face) 32137 32158 (face font-lock-function-name-face) 32158 32159 (face font-lock-string-face) 32159 32173 nil 32173 32174 (face font-lock-string-face) 32174 32192 (face font-lock-function-name-face) 32192 32193 (face font-lock-string-face) 32193 32218 nil 32218 32219 (face font-lock-string-face) 32219 32232 (face font-lock-keyword-face) 32232 32233 (face font-lock-string-face) 32233 32249 nil 32249 32250 (face font-lock-string-face) 32250 32259 (face font-lock-keyword-face) 32259 32260 (face font-lock-string-face) 32260 32278 nil 32278 32279 (face font-lock-string-face) 32279 32283 (face font-lock-constant-face) 32283 32284 (face font-lock-string-face) 32284 32300 nil 32300 32301 (face font-lock-string-face) 32301 32306 (face font-lock-constant-face) 32306 32307 (face font-lock-string-face) 32307 32323 nil 32323 32324 (face font-lock-string-face) 32324 32333 (face font-lock-constant-face) 32333 32334 (face font-lock-string-face) 32334 32350 nil 32350 32351 (face font-lock-string-face) 32351 32357 (face font-lock-constant-face) 32357 32358 (face font-lock-string-face) 32358 32398 nil 32398 32399 (face font-lock-string-face) 32399 32406 (face font-lock-keyword-face) 32406 32407 (face font-lock-string-face) 32407 32423 nil 32423 32424 (face font-lock-string-face) 32424 32462 (face font-lock-constant-face) 32462 32463 (face font-lock-string-face) 32463 32477 nil 32477 32478 (face font-lock-string-face) 32478 32515 (face font-lock-constant-face) 32515 32516 (face font-lock-string-face) 32516 32530 nil 32530 32531 (face font-lock-string-face) 32531 32568 (face font-lock-constant-face) 32568 32569 (face font-lock-string-face) 32569 32583 nil 32583 32584 (face font-lock-string-face) 32584 32620 (face font-lock-constant-face) 32620 32621 (face font-lock-string-face) 32621 32635 nil 32635 32636 (face font-lock-string-face) 32636 32666 (face font-lock-constant-face) 32666 32667 (face font-lock-string-face) 32667 32681 nil 32681 32682 (face font-lock-string-face) 32682 32720 (face font-lock-constant-face) 32720 32721 (face font-lock-string-face) 32721 32735 nil 32735 32736 (face font-lock-string-face) 32736 32773 (face font-lock-constant-face) 32773 32774 (face font-lock-string-face) 32774 32822 nil 32822 32823 (face font-lock-string-face) 32823 32838 (face font-lock-variable-name-face) 32838 32839 (face font-lock-string-face) 32839 32849 nil 32849 32850 (face font-lock-string-face) 32850 32857 (face font-lock-keyword-face) 32857 32858 (face font-lock-string-face) 32858 32882 nil 32882 32883 (face font-lock-string-face) 32883 32894 (face font-lock-keyword-face) 32894 32895 (face font-lock-string-face) 32895 32897 nil 32897 32898 (face font-lock-string-face) 32898 32912 (face font-lock-function-name-face) 32912 32913 (face font-lock-string-face) 32913 32925 nil 32925 32926 (face font-lock-string-face) 32926 32930 (face font-lock-keyword-face) 32930 32931 (face font-lock-string-face) 32931 32933 nil 32933 32934 (face font-lock-string-face) 32934 32948 (face font-lock-type-face) 32948 32949 (face font-lock-string-face) 32949 32961 nil 32961 32962 (face font-lock-string-face) 32962 32969 (face font-lock-keyword-face) 32969 32970 (face font-lock-string-face) 32970 32986 nil 32986 32987 (face font-lock-string-face) 32987 33022 (face font-lock-constant-face) 33022 33023 (face font-lock-string-face) 33023 33037 nil 33037 33038 (face font-lock-string-face) 33038 33072 (face font-lock-constant-face) 33072 33073 (face font-lock-string-face) 33073 33098 nil 33098 33099 (face font-lock-string-face) 33099 33111 (face font-lock-keyword-face) 33111 33112 (face font-lock-string-face) 33112 33128 nil 33128 33129 (face font-lock-string-face) 33129 33150 (face font-lock-function-name-face) 33150 33151 (face font-lock-string-face) 33151 33176 nil 33176 33177 (face font-lock-string-face) 33177 33189 (face font-lock-keyword-face) 33189 33190 (face font-lock-string-face) 33190 33206 nil 33206 33207 (face font-lock-string-face) 33207 33209 (face font-lock-constant-face) 33209 33232 (face font-lock-variable-name-face) 33232 33239 (face font-lock-constant-face) 33239 33240 (face font-lock-string-face) 33240 33265 nil 33265 33266 (face font-lock-string-face) 33266 33273 (face font-lock-keyword-face) 33273 33274 (face font-lock-string-face) 33274 33306 nil 33306 33307 (face font-lock-string-face) 33307 33318 (face font-lock-keyword-face) 33318 33319 (face font-lock-string-face) 33319 33321 nil 33321 33322 (face font-lock-string-face) 33322 33342 (face font-lock-function-name-face) 33342 33343 (face font-lock-string-face) 33343 33359 nil 33359 33360 (face font-lock-string-face) 33360 33366 (face font-lock-keyword-face) 33366 33367 (face font-lock-string-face) 33367 33387 nil 33387 33388 (face font-lock-string-face) 33388 33434 (face font-lock-constant-face) 33434 33435 (face font-lock-string-face) 33435 33453 nil 33453 33454 (face font-lock-string-face) 33454 33519 (face font-lock-constant-face) 33519 33520 (face font-lock-string-face) 33520 33553 nil 33553 33554 (face font-lock-string-face) 33554 33561 (face font-lock-keyword-face) 33561 33562 (face font-lock-string-face) 33562 33582 nil 33582 33583 (face font-lock-string-face) 33583 33585 (face font-lock-constant-face) 33585 33608 (face font-lock-variable-name-face) 33608 33647 (face font-lock-constant-face) 33647 33648 (face font-lock-string-face) 33648 33681 nil 33681 33682 (face font-lock-string-face) 33682 33688 (face font-lock-keyword-face) 33688 33689 (face font-lock-string-face) 33689 33709 nil 33709 33710 (face font-lock-string-face) 33710 33716 (face font-lock-constant-face) 33716 33717 (face font-lock-string-face) 33717 33735 nil 33735 33736 (face font-lock-string-face) 33736 33738 (face font-lock-constant-face) 33738 33743 (face font-lock-variable-name-face) 33743 33788 (face font-lock-constant-face) 33788 33789 (face font-lock-string-face) 33789 33807 nil 33807 33808 (face font-lock-string-face) 33808 33810 (face font-lock-constant-face) 33810 33811 (face font-lock-string-face) 33811 33829 nil 33829 33830 (face font-lock-string-face) 33830 33833 (face font-lock-constant-face) 33833 33840 (face font-lock-variable-name-face) 33840 33841 (face font-lock-constant-face) 33841 33842 (face font-lock-string-face) 33842 33860 nil 33860 33861 (face font-lock-string-face) 33861 33864 (face font-lock-constant-face) 33864 33872 (face font-lock-variable-name-face) 33872 33873 (face font-lock-constant-face) 33873 33874 (face font-lock-string-face) 33874 33952 nil 33952 33953 (face font-lock-string-face) 33953 33964 (face font-lock-keyword-face) 33964 33965 (face font-lock-string-face) 33965 33967 nil 33967 33968 (face font-lock-string-face) 33968 33978 (face font-lock-function-name-face) 33978 33979 (face font-lock-string-face) 33979 33991 nil 33991 33992 (face font-lock-string-face) 33992 33996 (face font-lock-keyword-face) 33996 33997 (face font-lock-string-face) 33997 33999 nil 33999 34000 (face font-lock-string-face) 34000 34004 (face font-lock-type-face) 34004 34005 (face font-lock-string-face) 34005 34017 nil 34017 34018 (face font-lock-string-face) 34018 34030 (face font-lock-keyword-face) 34030 34031 (face font-lock-string-face) 34031 34035 nil 34035 34036 (face font-lock-string-face) 34036 34062 (face font-lock-function-name-face) 34062 34063 (face font-lock-string-face) 34063 34077 nil 34077 34078 (face font-lock-string-face) 34078 34087 (face font-lock-keyword-face) 34087 34088 (face font-lock-string-face) 34088 34104 nil 34104 34105 (face font-lock-string-face) 34105 34117 (face font-lock-variable-name-face) 34117 34118 (face font-lock-string-face) 34118 34120 nil 34120 34121 (face font-lock-string-face) 34121 34126 (face font-lock-variable-name-face) 34126 34127 (face font-lock-string-face) 34127 34141 nil 34141 34142 (face font-lock-string-face) 34142 34153 (face font-lock-variable-name-face) 34153 34154 (face font-lock-string-face) 34154 34156 nil 34156 34157 (face font-lock-string-face) 34157 34174 (face font-lock-variable-name-face) 34174 34175 (face font-lock-string-face) 34175 34200 nil 34200 34201 (face font-lock-string-face) 34201 34209 (face font-lock-keyword-face) 34209 34210 (face font-lock-string-face) 34210 34214 nil 34214 34215 (face font-lock-string-face) 34215 34233 (face font-lock-constant-face) 34233 34234 (face font-lock-string-face) 34234 34268 nil 34268 34287 (face font-lock-comment-face) 34287 34293 nil 34293 34365 (face font-lock-comment-face) 34365 34371 nil 34371 34372 (face font-lock-string-face) 34372 34379 (face font-lock-keyword-face) 34379 34380 (face font-lock-string-face) 34380 34404 nil 34404 34405 (face font-lock-string-face) 34405 34416 (face font-lock-keyword-face) 34416 34417 (face font-lock-string-face) 34417 34419 nil 34419 34420 (face font-lock-string-face) 34420 34436 (face font-lock-function-name-face) 34436 34437 (face font-lock-string-face) 34437 34449 nil 34449 34450 (face font-lock-string-face) 34450 34454 (face font-lock-keyword-face) 34454 34455 (face font-lock-string-face) 34455 34457 nil 34457 34458 (face font-lock-string-face) 34458 34468 (face font-lock-type-face) 34468 34469 (face font-lock-string-face) 34469 34481 nil 34481 34482 (face font-lock-string-face) 34482 34494 (face font-lock-keyword-face) 34494 34495 (face font-lock-string-face) 34495 34511 nil 34511 34512 (face font-lock-string-face) 34512 34517 (face font-lock-function-name-face) 34517 34518 (face font-lock-string-face) 34518 34532 nil 34532 34533 (face font-lock-string-face) 34533 34551 (face font-lock-function-name-face) 34551 34552 (face font-lock-string-face) 34552 34566 nil 34566 34567 (face font-lock-string-face) 34567 34588 (face font-lock-function-name-face) 34588 34589 (face font-lock-string-face) 34589 34603 nil 34603 34604 (face font-lock-string-face) 34604 34630 (face font-lock-function-name-face) 34630 34631 (face font-lock-string-face) 34631 34645 nil 34645 34646 (face font-lock-string-face) 34646 34680 (face font-lock-function-name-face) 34680 34681 (face font-lock-string-face) 34681 34695 nil 34695 34696 (face font-lock-string-face) 34696 34730 (face font-lock-function-name-face) 34730 34731 (face font-lock-string-face) 34731 34745 nil 34745 34746 (face font-lock-string-face) 34746 34772 (face font-lock-function-name-face) 34772 34773 (face font-lock-string-face) 34773 34787 nil 34787 34788 (face font-lock-string-face) 34788 34827 (face font-lock-function-name-face) 34827 34828 (face font-lock-string-face) 34828 34853 nil 34853 34854 (face font-lock-string-face) 34854 34861 (face font-lock-keyword-face) 34861 34862 (face font-lock-string-face) 34862 34878 nil 34878 34879 (face font-lock-string-face) 34879 34904 (face font-lock-constant-face) 34904 34905 (face font-lock-string-face) 34905 34930 nil 34930 34931 (face font-lock-string-face) 34931 34941 (face font-lock-keyword-face) 34941 34942 (face font-lock-string-face) 34942 34959 nil 34959 34960 (face font-lock-string-face) 34960 34981 (face font-lock-variable-name-face) 34981 34982 (face font-lock-string-face) 34982 35000 nil 35000 35001 (face font-lock-string-face) 35001 35013 (face font-lock-keyword-face) 35013 35014 (face font-lock-string-face) 35014 35034 nil 35034 35077 (face font-lock-comment-face) 35077 35093 nil 35093 35123 (face font-lock-comment-face) 35123 35139 nil 35139 35164 (face font-lock-comment-face) 35164 35180 nil 35180 35194 (face font-lock-comment-face) 35194 35210 nil 35210 35211 (face font-lock-string-face) 35211 35240 (face font-lock-function-name-face) 35240 35241 (face font-lock-string-face) 35241 35274 nil 35274 35275 (face font-lock-string-face) 35275 35285 (face font-lock-keyword-face) 35285 35286 (face font-lock-string-face) 35286 35307 nil 35307 35308 (face font-lock-string-face) 35308 35329 (face font-lock-variable-name-face) 35329 35330 (face font-lock-string-face) 35330 35352 nil 35352 35353 (face font-lock-string-face) 35353 35365 (face font-lock-keyword-face) 35365 35366 (face font-lock-string-face) 35366 35390 nil 35390 35391 (face font-lock-string-face) 35391 35432 (face font-lock-function-name-face) 35432 35433 (face font-lock-string-face) 35433 35553 nil 35553 35554 (face font-lock-string-face) 35554 35565 (face font-lock-keyword-face) 35565 35566 (face font-lock-string-face) 35566 35568 nil 35568 35569 (face font-lock-string-face) 35569 35592 (face font-lock-function-name-face) 35592 35593 (face font-lock-string-face) 35593 35605 nil 35605 35606 (face font-lock-string-face) 35606 35610 (face font-lock-keyword-face) 35610 35611 (face font-lock-string-face) 35611 35613 nil 35613 35614 (face font-lock-string-face) 35614 35624 (face font-lock-type-face) 35624 35625 (face font-lock-string-face) 35625 35637 nil 35637 35638 (face font-lock-string-face) 35638 35650 (face font-lock-keyword-face) 35650 35651 (face font-lock-string-face) 35651 35667 nil 35667 35668 (face font-lock-string-face) 35668 35673 (face font-lock-function-name-face) 35673 35674 (face font-lock-string-face) 35674 35688 nil 35688 35689 (face font-lock-string-face) 35689 35707 (face font-lock-function-name-face) 35707 35708 (face font-lock-string-face) 35708 35722 nil 35722 35723 (face font-lock-string-face) 35723 35757 (face font-lock-function-name-face) 35757 35758 (face font-lock-string-face) 35758 35772 nil 35772 35773 (face font-lock-string-face) 35773 35799 (face font-lock-function-name-face) 35799 35800 (face font-lock-string-face) 35800 35814 nil 35814 35815 (face font-lock-string-face) 35815 35841 (face font-lock-function-name-face) 35841 35842 (face font-lock-string-face) 35842 35856 nil 35856 35857 (face font-lock-string-face) 35857 35896 (face font-lock-function-name-face) 35896 35897 (face font-lock-string-face) 35897 35922 nil 35922 35923 (face font-lock-string-face) 35923 35930 (face font-lock-keyword-face) 35930 35931 (face font-lock-string-face) 35931 35947 nil 35947 35948 (face font-lock-string-face) 35948 35970 (face font-lock-constant-face) 35970 35971 (face font-lock-string-face) 35971 35985 nil 35985 35986 (face font-lock-string-face) 35986 36011 (face font-lock-constant-face) 36011 36012 (face font-lock-string-face) 36012 36026 nil 36026 36027 (face font-lock-string-face) 36027 36060 (face font-lock-constant-face) 36060 36061 (face font-lock-string-face) 36061 36075 nil 36075 36076 (face font-lock-string-face) 36076 36117 (face font-lock-constant-face) 36117 36118 (face font-lock-string-face) 36118 36143 nil 36143 36144 (face font-lock-string-face) 36144 36154 (face font-lock-keyword-face) 36154 36155 (face font-lock-string-face) 36155 36172 nil 36172 36173 (face font-lock-string-face) 36173 36198 (face font-lock-variable-name-face) 36198 36199 (face font-lock-string-face) 36199 36217 nil 36217 36218 (face font-lock-string-face) 36218 36228 (face font-lock-keyword-face) 36228 36229 (face font-lock-string-face) 36229 36250 nil 36250 36251 (face font-lock-string-face) 36251 36272 (face font-lock-variable-name-face) 36272 36273 (face font-lock-string-face) 36273 36295 nil 36295 36296 (face font-lock-string-face) 36296 36308 (face font-lock-keyword-face) 36308 36309 (face font-lock-string-face) 36309 36333 nil 36333 36334 (face font-lock-string-face) 36334 36375 (face font-lock-function-name-face) 36375 36376 (face font-lock-string-face) 36376 36496 nil 36496 36497 (face font-lock-string-face) 36497 36508 (face font-lock-keyword-face) 36508 36509 (face font-lock-string-face) 36509 36511 nil 36511 36512 (face font-lock-string-face) 36512 36524 (face font-lock-function-name-face) 36524 36525 (face font-lock-string-face) 36525 36537 nil 36537 36538 (face font-lock-string-face) 36538 36542 (face font-lock-keyword-face) 36542 36543 (face font-lock-string-face) 36543 36545 nil 36545 36546 (face font-lock-string-face) 36546 36556 (face font-lock-type-face) 36556 36557 (face font-lock-string-face) 36557 36569 nil 36569 36570 (face font-lock-string-face) 36570 36582 (face font-lock-keyword-face) 36582 36583 (face font-lock-string-face) 36583 36599 nil 36599 36600 (face font-lock-string-face) 36600 36605 (face font-lock-function-name-face) 36605 36606 (face font-lock-string-face) 36606 36620 nil 36620 36621 (face font-lock-string-face) 36621 36642 (face font-lock-function-name-face) 36642 36643 (face font-lock-string-face) 36643 36657 nil 36657 36658 (face font-lock-string-face) 36658 36697 (face font-lock-function-name-face) 36697 36698 (face font-lock-string-face) 36698 36723 nil 36723 36724 (face font-lock-string-face) 36724 36731 (face font-lock-keyword-face) 36731 36732 (face font-lock-string-face) 36732 36748 nil 36748 36749 (face font-lock-string-face) 36749 36782 (face font-lock-constant-face) 36782 36783 (face font-lock-string-face) 36783 36829 nil 36829 36830 (face font-lock-string-face) 36830 36841 (face font-lock-keyword-face) 36841 36842 (face font-lock-string-face) 36842 36844 nil 36844 36845 (face font-lock-string-face) 36845 36856 (face font-lock-function-name-face) 36856 36857 (face font-lock-string-face) 36857 36869 nil 36869 36870 (face font-lock-string-face) 36870 36874 (face font-lock-keyword-face) 36874 36875 (face font-lock-string-face) 36875 36877 nil 36877 36878 (face font-lock-string-face) 36878 36888 (face font-lock-type-face) 36888 36889 (face font-lock-string-face) 36889 36901 nil 36901 36902 (face font-lock-string-face) 36902 36914 (face font-lock-keyword-face) 36914 36915 (face font-lock-string-face) 36915 36931 nil 36931 36932 (face font-lock-string-face) 36932 36937 (face font-lock-function-name-face) 36937 36938 (face font-lock-string-face) 36938 36952 nil 36952 36953 (face font-lock-string-face) 36953 36974 (face font-lock-function-name-face) 36974 36975 (face font-lock-string-face) 36975 36989 nil 36989 36990 (face font-lock-string-face) 36990 37029 (face font-lock-function-name-face) 37029 37030 (face font-lock-string-face) 37030 37055 nil 37055 37056 (face font-lock-string-face) 37056 37063 (face font-lock-keyword-face) 37063 37064 (face font-lock-string-face) 37064 37080 nil 37080 37081 (face font-lock-string-face) 37081 37113 (face font-lock-constant-face) 37113 37114 (face font-lock-string-face) 37114 37163 nil) |