Changeset 516
- Timestamp:
- 03/14/14 12:36:58 (11 years ago)
- Location:
- Dev/trunk
- Files:
-
- 257 added
- 31 deleted
- 265 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk
- Property svn:ignore
-
old new 1 1 build 2 quod-erat.git
-
- Property svn:ignore
-
Dev/trunk/Gruntfile.js
r505 r516 14 14 ,'coffeelint:lint' 15 15 ,'jsonlint:lint' 16 16 //,'tv4:lint' 17 17 ,'less:compile' 18 18 ,'usebanner:generated-css' … … 27 27 ,'dojo:build' 28 28 ]); 29 grunt.registerTask('deploy', ['path-check:deploy', 30 'svninfo', 31 'build', 32 'git_deploy:deploy']); 29 33 30 34 // FILES AND FOLDERS … … 69 73 releaseDir: '../../'+buildDir }} 70 74 }, 75 git_deploy: { 76 deploy: { 77 options: { 78 url: 'git@heroku.com:quod-erat.git', 79 branch: 'master', 80 message: "Deployment of revision <%= svninfo.rev %> on <%= grunt.template.today() %>." 81 }, 82 src: buildDir 83 } 84 }, 71 85 htmlhint: { 72 86 options: { htmlhintrc: srcDir+".htmlhintrc" }, … … 82 96 }, 83 97 jsonlint: { 84 'lint': { files: { src: [ srcDir+'client/qed-client/**/*.json', srcDir+'server/**/*.json' ] } } ,98 'lint': { files: { src: [ srcDir+'client/qed-client/**/*.json', srcDir+'server/**/*.json' ] } } 85 99 }, 86 100 less: { … … 88 102 dumpLineNumbers: "all" }, 89 103 compile: { files: lessMap } 104 }, 105 'path-check': { 106 'deploy': { 107 src: [ 'git', 'svn' ] 108 } 90 109 }, 91 110 requirejs: { … … 143 162 grunt.loadNpmTasks('grunt-contrib-less'); 144 163 grunt.loadNpmTasks('grunt-dojo'); 164 grunt.loadNpmTasks('grunt-git-deploy'); 145 165 grunt.loadNpmTasks('grunt-htmlhint'); 146 166 grunt.loadNpmTasks('grunt-jsonlint'); 167 grunt.loadNpmTasks('grunt-path-check'); 168 grunt.loadNpmTasks('grunt-svninfo'); 147 169 grunt.loadNpmTasks('grunt-tv4'); 148 170 grunt.loadTasks('./grunt-tasks'); -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/amdefine/package.json
r484 r516 33 33 }, 34 34 "_id": "amdefine@0.0.8", 35 "_from": "amdefine@0.0.8",36 35 "dist": { 37 36 "shasum": "d68d47b0400ada2aae32f758b87b0aeca12b5c8c" 38 37 }, 38 "_from": "amdefine@0.0.8", 39 39 "_resolved": "https://registry.npmjs.org/amdefine/-/amdefine-0.0.8.tgz" 40 40 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/.npmignore
r484 r516 4 4 AUTHORS 5 5 CHANGELOG 6 CONTRIBUTING. MD6 CONTRIBUTING.md 7 7 custom-gruntfile.js 8 8 Gruntfile.js -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/LICENSE-MIT
r484 r516 1 Copyright (c) 201 3"Cowboy" Ben Alman1 Copyright (c) 2014 "Cowboy" Ben Alman 2 2 3 3 Permission is hereby granted, free of charge, to any person -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/README.md
r484 r516 1 # Grunt: The JavaScript Task Runner [](http://travis-ci.org/gruntjs/grunt) 1 # Grunt: The JavaScript Task Runner 2 3 [](http://travis-ci.org/gruntjs/grunt) 4 [](http://gruntjs.com/) 2 5 3 6 <img align="right" height="260" src="http://gruntjs.com/img/grunt-logo-no-wordmark.svg"> -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/internal-tasks/bump.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman, contributors5 * Copyright (c) 2014 "Cowboy" Ben Alman, contributors 6 6 * Licensed under the MIT license. 7 7 */ -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/internal-tasks/subgrunt.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 23 23 return grunt[name] = require('./grunt/' + name); 24 24 } 25 var util = gRequire('util'); 25 26 var util = require('grunt-legacy-util'); 27 grunt.util = util; 28 grunt.util.task = require('./util/task'); 29 26 30 gRequire('template'); 27 31 gRequire('event'); … … 153 157 // allows the error callback to execute multiple times. 154 158 tasks.forEach(function(name) { task.run(name); }); 155 task.start(); 159 // Run tasks async internally to reduce call-stack, per: 160 // https://github.com/gruntjs/grunt/pull/1026 161 task.start({asyncDone:true}); 156 162 }; -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/cli.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 22 22 // CLI-parsed options override any passed-in "default" options. 23 23 if (options) { 24 // For each def ult option...24 // For each default option... 25 25 Object.keys(options).forEach(function(key) { 26 26 if (!(key in cli.options)) { … … 62 62 short: 'd', 63 63 info: 'Enable debugging mode for tasks that support it.', 64 type: Number64 type: [Number, Boolean] 65 65 }, 66 66 stack: { -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/config.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/event.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/fail.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/file.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 134 134 var pathSeparatorRe = /[\/\\]/g; 135 135 136 // The "ext" option refers to either everything after the first dot (default) 137 // or everything after the last dot. 138 var extDotRe = { 139 first: /(\.[^\/]*)?$/, 140 last: /(\.[^\/\.]*)?$/, 141 }; 142 136 143 // Build a multi task "files" object dynamically. 137 144 file.expandMapping = function(patterns, destBase, options) { 138 145 options = grunt.util._.defaults({}, options, { 146 extDot: 'first', 139 147 rename: function(destBase, destPath) { 140 148 return path.join(destBase || '', destPath); … … 151 159 } 152 160 // Change the extension? 153 if ( options.ext) {154 destPath = destPath.replace( /(\.[^\/]*)?$/, options.ext);161 if ('ext' in options) { 162 destPath = destPath.replace(extDotRe[options.extDot], options.ext); 155 163 } 156 164 // Generate destination filename. -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/help.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/log.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/option.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/task.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 108 108 } 109 109 } else if (Array.isArray(data.files)) { 110 data.files.forEach(function(obj) {110 grunt.util._.flatten(data.files).forEach(function(obj) { 111 111 var prop; 112 112 if ('src' in obj || 'dest' in obj) { … … 245 245 return options; 246 246 }; 247 // Expose the current target. 248 this.target = target; 249 // Recreate flags object so that the target isn't set as a flag. 250 this.flags = {}; 251 this.args.forEach(function(arg) { this.flags[arg] = true; }, this); 247 252 // Expose data on `this` (as well as task.current). 248 253 this.data = grunt.config([name, target]); … … 256 261 }.bind(this) 257 262 }); 258 // Expose the current target.259 this.target = target;260 // Recreate flags object so that the target isn't set as a flag.261 this.flags = {};262 this.args.forEach(function(arg) { this.flags[arg] = true; }, this);263 263 // Call original task function, passing in the target and any other args. 264 264 return fn.apply(this, this.args); … … 278 278 // Override built-in renameTask to use the registry. 279 279 task.renameTask = function(oldname, newname) { 280 // Add and remove task. 281 registry.untasks.push(oldname); 282 registry.tasks.push(newname); 283 // Actually rename task. 284 return parent.renameTask.apply(task, arguments); 280 var result; 281 try { 282 // Actually rename task. 283 result = parent.renameTask.apply(task, arguments); 284 // Add and remove task. 285 registry.untasks.push(oldname); 286 registry.tasks.push(newname); 287 // Return result. 288 return result; 289 } catch(e) { 290 grunt.log.error(e.message); 291 } 285 292 }; 286 293 -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/grunt/template.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/lib/util/task.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 90 90 // easier to implement than some kind of in-task "super" functionality. 91 91 Task.prototype.renameTask = function(oldname, newname) { 92 if (!this._tasks[oldname]) { 93 throw new Error('Cannot rename missing "' + oldname + '" task.'); 94 } 92 95 // Rename task. 93 96 this._tasks[newname] = this._tasks[oldname]; … … 186 189 187 190 // Run a task function, handling this.async / return value. 188 Task.prototype.runTaskFn = function(context, fn, done ) {191 Task.prototype.runTaskFn = function(context, fn, done, asyncDone) { 189 192 // Async flag. 190 193 var async = false; … … 213 216 this._options.error.call({name: context.name, nameArgs: context.nameArgs}, err); 214 217 } 215 done(err, success); 218 // only call done async if explicitly requested to 219 // see: https://github.com/gruntjs/grunt/pull/1026 220 if (asyncDone) { 221 process.nextTick(function () { 222 done(err, success); 223 }); 224 } else { 225 done(err, success); 226 } 216 227 }.bind(this); 217 228 … … 244 255 245 256 // Begin task queue processing. Ie. run all tasks. 246 Task.prototype.start = function() { 257 Task.prototype.start = function(opts) { 258 if (!opts) { 259 opts = {}; 260 } 247 261 // Abort if already running. 248 262 if (this._running) { return false; } … … 281 295 this.runTaskFn(context, function() { 282 296 return thing.task.fn.apply(this, this.args); 283 }, nextTask );297 }, nextTask, !!opts.asyncDone); 284 298 285 299 }.bind(this); -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/colors/package.json
r484 r516 26 26 "readmeFilename": "ReadMe.md", 27 27 "_id": "colors@0.6.2", 28 "dist": { 29 "shasum": "57915cf80820c121e254ec8b7819ab808d2beae5" 30 }, 31 "_from": "colors@~0.6.2", 32 "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", 33 "scripts": {} 28 "_from": "colors@~0.6.2" 34 29 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/eventemitter2/package.json
r484 r516 59 59 "homepage": "https://github.com/hij1nx/EventEmitter2", 60 60 "_id": "eventemitter2@0.4.13", 61 "dist": { 62 "shasum": "2a03bdff50bda6586cf2e27c71feeaf6d37c383c" 63 }, 64 "_from": "eventemitter2@~0.4.13", 65 "_resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.13.tgz" 61 "_from": "eventemitter2@~0.4.13" 66 62 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/exit/package.json
r484 r516 48 48 "readmeFilename": "README.md", 49 49 "_id": "exit@0.1.2", 50 "dist": { 51 "shasum": "2a1f6b7dd67aedcf9544e948cc817113b64012a5" 52 }, 53 "_from": "exit@~0.1.1", 54 "_resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" 50 "_from": "exit@~0.1.1" 55 51 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/getobject/package.json
r484 r516 45 45 "readmeFilename": "README.md", 46 46 "_id": "getobject@0.1.0", 47 "dist": { 48 "shasum": "4563bd9ebffaa0790ee7eec6e2d74523b7e852a6" 49 }, 50 "_from": "getobject@~0.1.0", 51 "_resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz" 47 "_from": "getobject@~0.1.0" 52 48 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/glob/node_modules/inherits/package.json
r484 r516 27 27 "homepage": "https://github.com/isaacs/inherits", 28 28 "_id": "inherits@1.0.0", 29 "dist": {30 "shasum": "26467026b3b86de1c6f72f00d9a31b1c97077a92"31 },32 29 "_from": "inherits@1", 33 " _resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz"30 "scripts": {} 34 31 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/iconv-lite/package.json
r484 r516 77 77 }, 78 78 "_id": "iconv-lite@0.2.11", 79 "dist": { 80 "shasum": "1827821f46962889765690b557c045f5cc3976eb" 81 }, 82 "_from": "iconv-lite@~0.2.11", 83 "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz" 79 "_from": "iconv-lite@~0.2.11" 84 80 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json
r484 r516 70 70 "readmeFilename": "README.markdown", 71 71 "_id": "underscore.string@2.3.3", 72 "dist": { 73 "shasum": "a7cea3b9aa84d24cf1363ccbddd02ee10abee0c0" 74 }, 75 "_from": "underscore.string@~2.3.1", 76 "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz" 72 "_from": "underscore.string@~2.3.1" 77 73 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/minimatch/README.md
r484 r516 20 20 minimatch("bar.foo", "*.foo") // true! 21 21 minimatch("bar.foo", "*.bar") // false! 22 minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! 22 23 ``` 23 24 … … 36 37 * `man 3 fnmatch` 37 38 * `man 5 gitignore` 38 39 ### Comparisons to other fnmatch/glob implementations40 41 While strict compliance with the existing standards is a worthwhile42 goal, some discrepancies exist between minimatch and other43 implementations, and are intentional.44 45 If the pattern starts with a `!` character, then it is negated. Set the46 `nonegate` flag to suppress this behavior, and treat leading `!`47 characters normally. This is perhaps relevant if you wish to start the48 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`49 characters at the start of a pattern will negate the pattern multiple50 times.51 52 If a pattern starts with `#`, then it is treated as a comment, and53 will not match anything. Use `\#` to match a literal `#` at the54 start of a line, or set the `nocomment` flag to suppress this behavior.55 56 The double-star character `**` is supported by default, unless the57 `noglobstar` flag is set. This is supported in the manner of bsdglob58 and bash 4.1, where `**` only has special significance if it is the only59 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but60 `a/**b` will not. **Note that this is different from the way that `**` is61 handled by ruby's `Dir` class.**62 63 If an escaped pattern has no matches, and the `nonull` flag is set,64 then minimatch.match returns the pattern as-provided, rather than65 interpreting the character escapes. For example,66 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than67 `"*a?"`. This is akin to setting the `nullglob` option in bash, except68 that it does not resolve escaped pattern characters.69 70 If brace expansion is not disabled, then it is performed before any71 other interpretation of the glob pattern. Thus, a pattern like72 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded73 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are74 checked for validity. Since those two are valid, matching proceeds.75 76 39 77 40 ## Minimatch Class … … 217 180 Returns from negate expressions the same as if they were not negated. 218 181 (Ie, true on a hit, false on a miss.) 182 183 184 ## Comparisons to other fnmatch/glob implementations 185 186 While strict compliance with the existing standards is a worthwhile 187 goal, some discrepancies exist between minimatch and other 188 implementations, and are intentional. 189 190 If the pattern starts with a `!` character, then it is negated. Set the 191 `nonegate` flag to suppress this behavior, and treat leading `!` 192 characters normally. This is perhaps relevant if you wish to start the 193 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` 194 characters at the start of a pattern will negate the pattern multiple 195 times. 196 197 If a pattern starts with `#`, then it is treated as a comment, and 198 will not match anything. Use `\#` to match a literal `#` at the 199 start of a line, or set the `nocomment` flag to suppress this behavior. 200 201 The double-star character `**` is supported by default, unless the 202 `noglobstar` flag is set. This is supported in the manner of bsdglob 203 and bash 4.1, where `**` only has special significance if it is the only 204 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but 205 `a/**b` will not. 206 207 If an escaped pattern has no matches, and the `nonull` flag is set, 208 then minimatch.match returns the pattern as-provided, rather than 209 interpreting the character escapes. For example, 210 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than 211 `"*a?"`. This is akin to setting the `nullglob` option in bash, except 212 that it does not resolve escaped pattern characters. 213 214 If brace expansion is not disabled, then it is performed before any 215 other interpretation of the glob pattern. Thus, a pattern like 216 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded 217 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are 218 checked for validity. Since those two are valid, matching proceeds. -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/minimatch/minimatch.js
r484 r516 69 69 var slashSplit = /\/+/ 70 70 71 minimatch.monkeyPatch = monkeyPatch72 function monkeyPatch () {73 var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")74 var orig = desc.value75 desc.value = function (p) {76 if (p instanceof Minimatch) return p.match(this)77 return orig.call(this, p)78 }79 Object.defineProperty(String.prototype, desc)80 }81 82 71 minimatch.filter = filter 83 72 function filter (pattern, options) { … … 179 168 } 180 169 170 Minimatch.prototype.debug = function() {} 171 181 172 Minimatch.prototype.make = make 182 173 function make () { … … 203 194 var set = this.globSet = this.braceExpand() 204 195 205 if (options.debug) console.error(this.pattern, set) 196 if (options.debug) this.debug = console.error 197 198 this.debug(this.pattern, set) 206 199 207 200 // step 3: now we have a set, so turn each one into a series of path-portion … … 214 207 }) 215 208 216 if (options.debug) console.error(this.pattern, set)209 this.debug(this.pattern, set) 217 210 218 211 // glob --> regexps … … 221 214 }, this) 222 215 223 if (options.debug) console.error(this.pattern, set)216 this.debug(this.pattern, set) 224 217 225 218 // filter out everything that didn't compile properly. … … 228 221 }) 229 222 230 if (options.debug) console.error(this.pattern, set)223 this.debug(this.pattern, set) 231 224 232 225 this.set = set … … 303 296 // and then prepend it to everything we find. 304 297 if (pattern.charAt(0) !== "{") { 305 // console.error(pattern)298 this.debug(pattern) 306 299 var prefix = null 307 300 for (var i = 0, l = pattern.length; i < l; i ++) { 308 301 var c = pattern.charAt(i) 309 // console.error(i, c)302 this.debug(i, c) 310 303 if (c === "\\") { 311 304 escaping = !escaping … … 318 311 // actually no sets, all { were escaped. 319 312 if (prefix === null) { 320 // console.error("no sets")313 this.debug("no sets") 321 314 return [pattern] 322 315 } 323 316 324 var tail = braceExpand(pattern.substr(i), options)317 var tail = braceExpand.call(this, pattern.substr(i), options) 325 318 return tail.map(function (t) { 326 319 return prefix + t … … 337 330 var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) 338 331 if (numset) { 339 // console.error("numset", numset[1], numset[2])340 var suf = braceExpand (pattern.substr(numset[0].length), options)332 this.debug("numset", numset[1], numset[2]) 333 var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) 341 334 , start = +numset[1] 342 335 , end = +numset[2] … … 370 363 } 371 364 372 // console.error("Entering for")365 this.debug("Entering for") 373 366 FOR: for (i = 1, l = pattern.length; i < l; i ++) { 374 367 var c = pattern.charAt(i) 375 // console.error("", i, c)368 this.debug("", i, c) 376 369 377 370 if (escaping) { … … 421 414 // and need to escape the leading brace 422 415 if (depth !== 0) { 423 // console.error("didn't close", pattern)424 return braceExpand ("\\" + pattern, options)416 this.debug("didn't close", pattern) 417 return braceExpand.call(this, "\\" + pattern, options) 425 418 } 426 419 427 420 // x{y,z} -> ["xy", "xz"] 428 // console.error("set", set)429 // console.error("suffix", pattern.substr(i))430 var suf = braceExpand (pattern.substr(i), options)421 this.debug("set", set) 422 this.debug("suffix", pattern.substr(i)) 423 var suf = braceExpand.call(this, pattern.substr(i), options) 431 424 // ["b", "c{d,e}","{f,g}h"] -> 432 425 // [["b"], ["cd", "ce"], ["fh", "gh"]] 433 426 var addBraces = set.length === 1 434 // console.error("set pre-expanded", set)427 this.debug("set pre-expanded", set) 435 428 set = set.map(function (p) { 436 return braceExpand (p, options)437 } )438 // console.error("set expanded", set)429 return braceExpand.call(this, p, options) 430 }, this) 431 this.debug("set expanded", set) 439 432 440 433 … … 497 490 : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" 498 491 : "(?!\\.)" 492 , self = this 499 493 500 494 function clearStateChar () { … … 515 509 break 516 510 } 511 self.debug('clearStateChar %j %j', stateChar, re) 517 512 stateChar = false 518 513 } … … 523 518 ; i ++ ) { 524 519 525 if (options.debug) { 526 console.error("%s\t%s %s %j", pattern, i, re, c) 527 } 520 this.debug("%s\t%s %s %j", pattern, i, re, c) 528 521 529 522 // skip over any that are escaped. … … 552 545 case "@": 553 546 case "!": 554 if (options.debug) { 555 console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 556 } 547 this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 557 548 558 549 // all of those are literals inside a class, except that 559 550 // the glob [!a] means [^a] in regexp 560 551 if (inClass) { 552 this.debug(' in class') 561 553 if (c === "!" && i === classStart + 1) c = "^" 562 554 re += c … … 567 559 // that there was something like ** or +? in there. 568 560 // Handle the stateChar, then proceed with this one. 561 self.debug('call clearStateChar %j', stateChar) 569 562 clearStateChar() 570 563 stateChar = c … … 592 585 // negation is (?:(?!js)[^/]*) 593 586 re += stateChar === "!" ? "(?:(?!" : "(?:" 587 this.debug('plType %j %j', stateChar, re) 594 588 stateChar = false 595 589 continue … … 601 595 } 602 596 597 clearStateChar() 603 598 hasMagic = true 604 599 re += ")" … … 624 619 } 625 620 621 clearStateChar() 626 622 re += "|" 627 623 continue … … 716 712 }) 717 713 718 // console.error("tail=%j\n %s", tail, tail)714 this.debug("tail=%j\n %s", tail, tail) 719 715 var t = pl.type === "*" ? star 720 716 : pl.type === "?" ? qmark … … 830 826 Minimatch.prototype.match = match 831 827 function match (f, partial) { 832 // console.error("match", f, this.pattern)828 this.debug("match", f, this.pattern) 833 829 // short-circuit in the case of busted things. 834 830 // comments, etc. … … 848 844 // treat the test path as a set of pathparts. 849 845 f = f.split(slashSplit) 850 if (options.debug) { 851 console.error(this.pattern, "split", f) 852 } 846 this.debug(this.pattern, "split", f) 853 847 854 848 // just ONE of the pattern sets in this.set needs to match … … 858 852 859 853 var set = this.set 860 // console.error(this.pattern, "set", set) 854 this.debug(this.pattern, "set", set) 855 856 var splitFile = path.basename(f.join("/")).split("/") 861 857 862 858 for (var i = 0, l = set.length; i < l; i ++) { 863 var pattern = set[i] 864 var hit = this.matchOne(f, pattern, partial) 859 var pattern = set[i], file = f 860 if (options.matchBase && pattern.length === 1) { 861 file = splitFile 862 } 863 var hit = this.matchOne(file, pattern, partial) 865 864 if (hit) { 866 865 if (options.flipNegate) return true … … 883 882 var options = this.options 884 883 885 if (options.debug) { 886 console.error("matchOne", 887 { "this": this 888 , file: file 889 , pattern: pattern }) 890 } 891 892 if (options.matchBase && pattern.length === 1) { 893 file = path.basename(file.join("/")).split("/") 894 } 895 896 if (options.debug) { 897 console.error("matchOne", file.length, pattern.length) 898 } 884 this.debug("matchOne", 885 { "this": this 886 , file: file 887 , pattern: pattern }) 888 889 this.debug("matchOne", file.length, pattern.length) 899 890 900 891 for ( var fi = 0 … … 905 896 ; fi ++, pi ++ ) { 906 897 907 if (options.debug) { 908 console.error("matchOne loop") 909 } 898 this.debug("matchOne loop") 910 899 var p = pattern[pi] 911 900 , f = file[fi] 912 901 913 if (options.debug) { 914 console.error(pattern, p, f) 915 } 902 this.debug(pattern, p, f) 916 903 917 904 // should be impossible. … … 920 907 921 908 if (p === GLOBSTAR) { 922 if (options.debug) 923 console.error('GLOBSTAR', [pattern, p, f]) 909 this.debug('GLOBSTAR', [pattern, p, f]) 924 910 925 911 // "**" … … 948 934 , pr = pi + 1 949 935 if (pr === pl) { 950 if (options.debug) 951 console.error('** at the end') 936 this.debug('** at the end') 952 937 // a ** at the end will just swallow the rest. 953 938 // We have found a match. … … 967 952 var swallowee = file[fr] 968 953 969 if (options.debug) { 970 console.error('\nglobstar while', 971 file, fr, pattern, pr, swallowee) 972 } 954 this.debug('\nglobstar while', 955 file, fr, pattern, pr, swallowee) 973 956 974 957 // XXX remove this slice. Just pass the start index. 975 958 if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { 976 if (options.debug) 977 console.error('globstar found match!', fr, fl, swallowee) 959 this.debug('globstar found match!', fr, fl, swallowee) 978 960 // found a match. 979 961 return true … … 983 965 if (swallowee === "." || swallowee === ".." || 984 966 (!options.dot && swallowee.charAt(0) === ".")) { 985 if (options.debug) 986 console.error("dot detected!", file, fr, pattern, pr) 967 this.debug("dot detected!", file, fr, pattern, pr) 987 968 break WHILE 988 969 } 989 970 990 971 // ** swallows a segment, and continue. 991 if (options.debug) 992 console.error('globstar swallow a segment, and continue') 972 this.debug('globstar swallow a segment, and continue') 993 973 fr ++ 994 974 } … … 999 979 if (partial) { 1000 980 // ran out of file 1001 // console.error("\n>>> no match, partial?", file, fr, pattern, pr)981 this.debug("\n>>> no match, partial?", file, fr, pattern, pr) 1002 982 if (fr === fl) return true 1003 983 } … … 1015 995 hit = f === p 1016 996 } 1017 if (options.debug) { 1018 console.error("string match", p, f, hit) 1019 } 997 this.debug("string match", p, f, hit) 1020 998 } else { 1021 999 hit = f.match(p) 1022 if (options.debug) { 1023 console.error("pattern match", p, f, hit) 1024 } 1000 this.debug("pattern match", p, f, hit) 1025 1001 } 1026 1002 -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json
r484 r516 30 30 "homepage": "https://github.com/isaacs/node-lru-cache", 31 31 "_id": "lru-cache@2.5.0", 32 "dist": { 33 "shasum": "be07d09e5b05f10b83d0cf01d4891a7729288c69" 34 }, 35 "_from": "lru-cache@2", 36 "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz" 32 "_from": "lru-cache@2" 37 33 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/minimatch/package.json
r484 r516 7 7 "name": "minimatch", 8 8 "description": "a glob matcher in javascript", 9 "version": "0.2.1 2",9 "version": "0.2.14", 10 10 "repository": { 11 11 "type": "git", … … 14 14 "main": "minimatch.js", 15 15 "scripts": { 16 "test": "tap test "16 "test": "tap test/*.js" 17 17 }, 18 18 "engines": { … … 30 30 "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" 31 31 }, 32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n ```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", 33 33 "readmeFilename": "README.md", 34 34 "bugs": { … … 36 36 }, 37 37 "homepage": "https://github.com/isaacs/minimatch", 38 "_id": "minimatch@0.2.1 2",39 "_from": "minimatch@ 0.x.x"38 "_id": "minimatch@0.2.14", 39 "_from": "minimatch@~0.2.12" 40 40 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/rimraf/README.md
r484 r516 1 A`rm -rf` for node.1 `rm -rf` for node. 2 2 3 3 Install with `npm install rimraf`, or just drop rimraf.js somewhere. … … 10 10 errors are handled for you: 11 11 12 * `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times 13 before giving up. 14 * `EMFILE` - If too many file descriptors get opened, rimraf will 15 patiently wait until more become available. 16 12 * Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of 13 `opts.maxBusyTries` times before giving up. 14 * `ENOENT` - If the file doesn't exist, rimraf will return 15 successfully, since your desired outcome is already the case. 17 16 18 17 ## rimraf.sync … … 20 19 It can remove stuff synchronously, too. But that's not so good. Use 21 20 the async API. It's better. 21 22 ## CLI 23 24 If installed with `npm install rimraf -g` it can be used as a global 25 command `rimraf <path>` which is useful for cross platform support. 26 27 ## mkdirp 28 29 If you need to create a directory recursively, check out 30 [mkdirp](https://github.com/substack/node-mkdirp). -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/rimraf/package.json
r484 r516 1 1 { 2 2 "name": "rimraf", 3 "version": "2. 0.3",3 "version": "2.2.6", 4 4 "main": "rimraf.js", 5 5 "description": "A deep deletion module for node (like `rm -rf`)", … … 13 13 "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" 14 14 }, 15 "optionalDependencies": {16 "graceful-fs": "~1.1"17 },18 15 "repository": { 19 16 "type": "git", … … 22 19 "scripts": { 23 20 "test": "cd test && bash run.sh" 21 }, 22 "bin": { 23 "rimraf": "./bin.js" 24 24 }, 25 25 "contributors": [ … … 46 46 } 47 47 ], 48 "readme": " A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times\n before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n patiently wait until more become available.\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n",48 "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", 49 49 "readmeFilename": "README.md", 50 50 "bugs": { … … 52 52 }, 53 53 "homepage": "https://github.com/isaacs/rimraf", 54 "dependencies": { 55 "graceful-fs": "~1.1" 54 "_id": "rimraf@2.2.6", 55 "dist": { 56 "shasum": "c28d4de4cafcd392b82d02729509c65e3502240c" 56 57 }, 57 "_ id": "rimraf@2.0.3",58 "_ from": "rimraf@~2.0.3"58 "_from": "rimraf@~2.2.6", 59 "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" 59 60 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/rimraf/rimraf.js
r484 r516 3 3 4 4 var path = require("path") 5 , fs 6 7 try { 8 // optional dependency 9 fs = require("graceful-fs") 10 } catch (er) { 11 fs = require("fs") 12 } 13 14 var lstat = "lstat" 15 if (process.platform === "win32") { 16 // not reliable on windows prior to 0.7.9 17 var v = process.version.replace(/^v/, '').split(/\.|-/).map(Number) 18 if (v[0] === 0 && (v[1] < 7 || v[1] == 7 && v[2] < 9)) { 19 lstat = "stat" 20 } 21 } 22 if (!fs[lstat]) lstat = "stat" 23 var lstatSync = lstat + "Sync" 5 var fs = require("fs") 24 6 25 7 // for EMFILE handling … … 28 10 exports.BUSYTRIES_MAX = 3 29 11 12 var isWindows = (process.platform === "win32") 13 30 14 function rimraf (p, cb) { 31 32 15 if (!cb) throw new Error("No callback passed to rimraf()") 33 16 34 17 var busyTries = 0 35 36 18 rimraf_(p, function CB (er) { 37 19 if (er) { 38 if (er.code === "EBUSY" && busyTries < exports.BUSYTRIES_MAX) { 20 if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && 21 busyTries < exports.BUSYTRIES_MAX) { 39 22 busyTries ++ 40 23 var time = busyTries * 100 … … 61 44 } 62 45 46 // Two possible strategies. 47 // 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR 48 // 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR 49 // 50 // Both result in an extra syscall when you guess wrong. However, there 51 // are likely far more normal files in the world than directories. This 52 // is based on the assumption that a the average number of files per 53 // directory is >= 1. 54 // 55 // If anyone ever complains about this, then I guess the strategy could 56 // be made configurable somehow. But until then, YAGNI. 63 57 function rimraf_ (p, cb) { 64 fs [lstat](p, function (er, s) {58 fs.unlink(p, function (er) { 65 59 if (er) { 66 // already gone 67 if (er.code === "ENOENT") return cb() 68 // some other kind of error, permissions, etc. 69 return cb(er) 60 if (er.code === "ENOENT") 61 return cb(null) 62 if (er.code === "EPERM") 63 return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) 64 if (er.code === "EISDIR") 65 return rmdir(p, er, cb) 70 66 } 71 72 return rm_(p, s, false, cb) 67 return cb(er) 73 68 }) 74 69 } 75 70 76 77 var myGid = function myGid () { 78 var g = process.getgid && process.getgid() 79 myGid = function myGid () { return g } 80 return g 71 function fixWinEPERM (p, er, cb) { 72 fs.chmod(p, 666, function (er2) { 73 if (er2) 74 cb(er2.code === "ENOENT" ? null : er) 75 else 76 fs.stat(p, function(er3, stats) { 77 if (er3) 78 cb(er3.code === "ENOENT" ? null : er) 79 else if (stats.isDirectory()) 80 rmdir(p, er, cb) 81 else 82 fs.unlink(p, cb) 83 }) 84 }) 81 85 } 82 86 83 var myUid = function myUid () { 84 var u = process.getuid && process.getuid() 85 myUid = function myUid () { return u } 86 return u 87 function fixWinEPERMSync (p, er, cb) { 88 try { 89 fs.chmodSync(p, 666) 90 } catch (er2) { 91 if (er2.code !== "ENOENT") 92 throw er 93 } 94 95 try { 96 var stats = fs.statSync(p) 97 } catch (er3) { 98 if (er3 !== "ENOENT") 99 throw er 100 } 101 102 if (stats.isDirectory()) 103 rmdirSync(p, er) 104 else 105 fs.unlinkSync(p) 87 106 } 88 107 89 90 function writable (s) { 91 var mode = s.mode || 0777 92 , uid = myUid() 93 , gid = myGid() 94 return (mode & 0002) 95 || (gid === s.gid && (mode & 0020)) 96 || (uid === s.uid && (mode & 0200)) 108 function rmdir (p, originalEr, cb) { 109 // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) 110 // if we guessed wrong, and it's not a directory, then 111 // raise the original error. 112 fs.rmdir(p, function (er) { 113 if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) 114 rmkids(p, cb) 115 else if (er && er.code === "ENOTDIR") 116 cb(originalEr) 117 else 118 cb(er) 119 }) 97 120 } 98 121 99 function rm_ (p, s, didWritableCheck, cb) { 100 if (!didWritableCheck && !writable(s)) { 101 // make file writable 102 // user/group/world, doesn't matter at this point 103 // since it's about to get nuked. 104 return fs.chmod(p, s.mode | 0222, function (er) { 105 if (er) return cb(er) 106 rm_(p, s, true, cb) 107 }) 108 } 109 110 if (!s.isDirectory()) { 111 return fs.unlink(p, cb) 112 } 113 114 // directory 122 function rmkids(p, cb) { 115 123 fs.readdir(p, function (er, files) { 116 if (er) return cb(er) 117 asyncForEach(files.map(function (f) { 118 return path.join(p, f) 119 }), function (file, cb) { 120 rimraf(file, cb) 121 }, function (er) { 122 if (er) return cb(er) 123 fs.rmdir(p, cb) 124 if (er) 125 return cb(er) 126 var n = files.length 127 if (n === 0) 128 return fs.rmdir(p, cb) 129 var errState 130 files.forEach(function (f) { 131 rimraf(path.join(p, f), function (er) { 132 if (errState) 133 return 134 if (er) 135 return cb(errState = er) 136 if (--n === 0) 137 fs.rmdir(p, cb) 138 }) 124 139 }) 125 140 }) 126 141 } 127 142 128 function asyncForEach (list, fn, cb) { 129 if (!list.length) cb() 130 var c = list.length 131 , errState = null 132 list.forEach(function (item, i, list) { 133 fn(item, function (er) { 134 if (errState) return 135 if (er) return cb(errState = er) 136 if (-- c === 0) return cb() 137 }) 138 }) 143 // this looks simpler, and is strictly *faster*, but will 144 // tie up the JavaScript thread and fail on excessively 145 // deep directory trees. 146 function rimrafSync (p) { 147 try { 148 fs.unlinkSync(p) 149 } catch (er) { 150 if (er.code === "ENOENT") 151 return 152 if (er.code === "EPERM") 153 return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) 154 if (er.code !== "EISDIR") 155 throw er 156 rmdirSync(p, er) 157 } 139 158 } 140 159 141 // this looks simpler, but it will fail with big directory trees, 142 // or on slow stupid awful cygwin filesystems 143 function rimrafSync (p) { 160 function rmdirSync (p, originalEr) { 144 161 try { 145 var s = fs[lstatSync](p)162 fs.rmdirSync(p) 146 163 } catch (er) { 147 if (er.code === "ENOENT") return 148 throw er 164 if (er.code === "ENOENT") 165 return 166 if (er.code === "ENOTDIR") 167 throw originalEr 168 if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") 169 rmkidsSync(p) 149 170 } 171 } 150 172 151 if (!writable(s)) { 152 fs.chmodSync(p, s.mode | 0222) 153 } 154 155 if (!s.isDirectory()) return fs.unlinkSync(p) 156 173 function rmkidsSync (p) { 157 174 fs.readdirSync(p).forEach(function (f) { 158 175 rimrafSync(path.join(p, f)) -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/node_modules/underscore.string/package.json
r484 r516 69 69 "readmeFilename": "README.markdown", 70 70 "_id": "underscore.string@2.2.1", 71 "dist": { 72 "shasum": "2aa155e7c49bcbfd88ec69b8c9694d885385c717" 73 }, 74 "_from": "underscore.string@~2.2.1", 75 "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz" 71 "_from": "underscore.string@~2.2.1" 76 72 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/grunt/package.json
r484 r516 2 2 "name": "grunt", 3 3 "description": "The JavaScript Task Runner", 4 "version": "0.4. 2",4 "version": "0.4.4", 5 5 "author": { 6 6 "name": "\"Cowboy\" Ben Alman", … … 59 59 "minimatch": "~0.2.12", 60 60 "nopt": "~1.0.10", 61 "rimraf": "~2. 0.3",61 "rimraf": "~2.2.6", 62 62 "lodash": "~0.9.2", 63 63 "underscore.string": "~2.2.1", … … 65 65 "js-yaml": "~2.0.5", 66 66 "exit": "~0.1.1", 67 "getobject": "~0.1.0" 67 "getobject": "~0.1.0", 68 "grunt-legacy-util": "~0.1.2" 68 69 }, 69 70 "devDependencies": { … … 76 77 "shelljs": "~0.2.5" 77 78 }, 78 "readme": "# Grunt: The JavaScript Task Runner [](http://travis-ci.org/gruntjs/grunt)\n\n<img align=\"right\" height=\"260\" src=\"http://gruntjs.com/img/grunt-logo-no-wordmark.svg\">\n\n\n### Documentation\n\nVisit the [gruntjs.com](http://gruntjs.com/) website for all the things.\n\n### Support / Contributing\nBefore you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.\n\nYou can find the grunt team in [#grunt on irc.freenode.net](http://webchat.freenode.net/?channels=grunt).\n\n### Release History\nSee the [CHANGELOG](CHANGELOG).\n",79 "readme": "# Grunt: The JavaScript Task Runner\n\n[](http://travis-ci.org/gruntjs/grunt)\n[](http://gruntjs.com/)\n\n<img align=\"right\" height=\"260\" src=\"http://gruntjs.com/img/grunt-logo-no-wordmark.svg\">\n\n\n### Documentation\n\nVisit the [gruntjs.com](http://gruntjs.com/) website for all the things.\n\n### Support / Contributing\nBefore you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.\n\nYou can find the grunt team in [#grunt on irc.freenode.net](http://webchat.freenode.net/?channels=grunt).\n\n### Release History\nSee the [CHANGELOG](CHANGELOG).\n", 79 80 "readmeFilename": "README.md", 80 "_id": "grunt@0.4. 2",81 "_id": "grunt@0.4.4", 81 82 "dist": { 82 "shasum": " 1f6804f00e977dd90b9f97b1faed480215db0857"83 "shasum": "64f477fef801475ab92f1819a691c6c71b72902e" 83 84 }, 84 "_from": "grunt@0.4. 2",85 "_resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4. 2.tgz"85 "_from": "grunt@0.4.4", 86 "_resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.4.tgz" 86 87 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/mout/package.json
r484 r516 74 74 "readmeFilename": "README.md", 75 75 "_id": "mout@0.3.0", 76 "_from": "mout@0.3.0",77 76 "dist": { 78 77 "shasum": "f4be536a04a0e0faebdc81bb68a23ceaba4d6c90" 79 78 }, 79 "_from": "mout@0.3.0", 80 80 "_resolved": "https://registry.npmjs.org/mout/-/mout-0.3.0.tgz" 81 81 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/node_modules/underscore/package.json
r484 r516 32 32 }, 33 33 "_id": "underscore@1.4.4", 34 "_from": "underscore@1.4.4", 35 "dist": { 36 "shasum": "3e7ceb21f205bc19964685e1fdd52c8f77773674" 37 }, 38 "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz" 34 "_from": "underscore@1.4.4" 39 35 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt-lib-amd/package.json
r484 r516 34 34 }, 35 35 "_from": "grunt-lib-amd@0.1.x", 36 "_resolved": "https://registry.npmjs.org/grunt-lib-amd/-/grunt-lib-amd-0.1.3.tgz" 36 "_resolved": "https://registry.npmjs.org/grunt-lib-amd/-/grunt-lib-amd-0.1.3.tgz", 37 "devDependencies": { 38 "amdefine": "0.0.8", 39 "underscore": "^1.4.4", 40 "grunt": "^0.4.4", 41 "mout": "^0.3.0" 42 } 37 43 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/.npmignore
r484 r516 4 4 AUTHORS 5 5 CHANGELOG 6 CONTRIBUTING. MD6 CONTRIBUTING.md 7 7 custom-gruntfile.js 8 8 Gruntfile.js -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/LICENSE-MIT
r484 r516 1 Copyright (c) 201 3"Cowboy" Ben Alman1 Copyright (c) 2014 "Cowboy" Ben Alman 2 2 3 3 Permission is hereby granted, free of charge, to any person -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/README.md
r484 r516 1 # Grunt: The JavaScript Task Runner [](http://travis-ci.org/gruntjs/grunt) 1 # Grunt: The JavaScript Task Runner 2 3 [](http://travis-ci.org/gruntjs/grunt) 4 [](http://gruntjs.com/) 2 5 3 6 <img align="right" height="260" src="http://gruntjs.com/img/grunt-logo-no-wordmark.svg"> -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/internal-tasks/bump.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman, contributors5 * Copyright (c) 2014 "Cowboy" Ben Alman, contributors 6 6 * Licensed under the MIT license. 7 7 */ -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/internal-tasks/subgrunt.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 23 23 return grunt[name] = require('./grunt/' + name); 24 24 } 25 var util = gRequire('util'); 25 26 var util = require('grunt-legacy-util'); 27 grunt.util = util; 28 grunt.util.task = require('./util/task'); 29 26 30 gRequire('template'); 27 31 gRequire('event'); … … 153 157 // allows the error callback to execute multiple times. 154 158 tasks.forEach(function(name) { task.run(name); }); 155 task.start(); 159 // Run tasks async internally to reduce call-stack, per: 160 // https://github.com/gruntjs/grunt/pull/1026 161 task.start({asyncDone:true}); 156 162 }; -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/cli.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 22 22 // CLI-parsed options override any passed-in "default" options. 23 23 if (options) { 24 // For each def ult option...24 // For each default option... 25 25 Object.keys(options).forEach(function(key) { 26 26 if (!(key in cli.options)) { … … 62 62 short: 'd', 63 63 info: 'Enable debugging mode for tasks that support it.', 64 type: Number64 type: [Number, Boolean] 65 65 }, 66 66 stack: { -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/config.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/event.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/fail.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/file.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 134 134 var pathSeparatorRe = /[\/\\]/g; 135 135 136 // The "ext" option refers to either everything after the first dot (default) 137 // or everything after the last dot. 138 var extDotRe = { 139 first: /(\.[^\/]*)?$/, 140 last: /(\.[^\/\.]*)?$/, 141 }; 142 136 143 // Build a multi task "files" object dynamically. 137 144 file.expandMapping = function(patterns, destBase, options) { 138 145 options = grunt.util._.defaults({}, options, { 146 extDot: 'first', 139 147 rename: function(destBase, destPath) { 140 148 return path.join(destBase || '', destPath); … … 151 159 } 152 160 // Change the extension? 153 if ( options.ext) {154 destPath = destPath.replace( /(\.[^\/]*)?$/, options.ext);161 if ('ext' in options) { 162 destPath = destPath.replace(extDotRe[options.extDot], options.ext); 155 163 } 156 164 // Generate destination filename. -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/help.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/log.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/option.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/task.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 108 108 } 109 109 } else if (Array.isArray(data.files)) { 110 data.files.forEach(function(obj) {110 grunt.util._.flatten(data.files).forEach(function(obj) { 111 111 var prop; 112 112 if ('src' in obj || 'dest' in obj) { … … 245 245 return options; 246 246 }; 247 // Expose the current target. 248 this.target = target; 249 // Recreate flags object so that the target isn't set as a flag. 250 this.flags = {}; 251 this.args.forEach(function(arg) { this.flags[arg] = true; }, this); 247 252 // Expose data on `this` (as well as task.current). 248 253 this.data = grunt.config([name, target]); … … 256 261 }.bind(this) 257 262 }); 258 // Expose the current target.259 this.target = target;260 // Recreate flags object so that the target isn't set as a flag.261 this.flags = {};262 this.args.forEach(function(arg) { this.flags[arg] = true; }, this);263 263 // Call original task function, passing in the target and any other args. 264 264 return fn.apply(this, this.args); … … 278 278 // Override built-in renameTask to use the registry. 279 279 task.renameTask = function(oldname, newname) { 280 // Add and remove task. 281 registry.untasks.push(oldname); 282 registry.tasks.push(newname); 283 // Actually rename task. 284 return parent.renameTask.apply(task, arguments); 280 var result; 281 try { 282 // Actually rename task. 283 result = parent.renameTask.apply(task, arguments); 284 // Add and remove task. 285 registry.untasks.push(oldname); 286 registry.tasks.push(newname); 287 // Return result. 288 return result; 289 } catch(e) { 290 grunt.log.error(e.message); 291 } 285 292 }; 286 293 -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/grunt/template.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/lib/util/task.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 90 90 // easier to implement than some kind of in-task "super" functionality. 91 91 Task.prototype.renameTask = function(oldname, newname) { 92 if (!this._tasks[oldname]) { 93 throw new Error('Cannot rename missing "' + oldname + '" task.'); 94 } 92 95 // Rename task. 93 96 this._tasks[newname] = this._tasks[oldname]; … … 186 189 187 190 // Run a task function, handling this.async / return value. 188 Task.prototype.runTaskFn = function(context, fn, done ) {191 Task.prototype.runTaskFn = function(context, fn, done, asyncDone) { 189 192 // Async flag. 190 193 var async = false; … … 213 216 this._options.error.call({name: context.name, nameArgs: context.nameArgs}, err); 214 217 } 215 done(err, success); 218 // only call done async if explicitly requested to 219 // see: https://github.com/gruntjs/grunt/pull/1026 220 if (asyncDone) { 221 process.nextTick(function () { 222 done(err, success); 223 }); 224 } else { 225 done(err, success); 226 } 216 227 }.bind(this); 217 228 … … 244 255 245 256 // Begin task queue processing. Ie. run all tasks. 246 Task.prototype.start = function() { 257 Task.prototype.start = function(opts) { 258 if (!opts) { 259 opts = {}; 260 } 247 261 // Abort if already running. 248 262 if (this._running) { return false; } … … 281 295 this.runTaskFn(context, function() { 282 296 return thing.task.fn.apply(this, this.args); 283 }, nextTask );297 }, nextTask, !!opts.asyncDone); 284 298 285 299 }.bind(this); -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/colors/package.json
r484 r516 26 26 "readmeFilename": "ReadMe.md", 27 27 "_id": "colors@0.6.2", 28 "dist": { 29 "shasum": "57915cf80820c121e254ec8b7819ab808d2beae5" 30 }, 31 "_from": "colors@~0.6.2", 32 "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", 33 "scripts": {} 28 "_from": "colors@~0.6.2" 34 29 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/eventemitter2/package.json
r484 r516 59 59 "homepage": "https://github.com/hij1nx/EventEmitter2", 60 60 "_id": "eventemitter2@0.4.13", 61 "dist": { 62 "shasum": "2a03bdff50bda6586cf2e27c71feeaf6d37c383c" 63 }, 64 "_from": "eventemitter2@~0.4.13", 65 "_resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.13.tgz" 61 "_from": "eventemitter2@~0.4.13" 66 62 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/exit/package.json
r484 r516 48 48 "readmeFilename": "README.md", 49 49 "_id": "exit@0.1.2", 50 "dist": { 51 "shasum": "2a1f6b7dd67aedcf9544e948cc817113b64012a5" 52 }, 53 "_from": "exit@~0.1.1", 54 "_resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" 50 "_from": "exit@~0.1.1" 55 51 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/getobject/package.json
r484 r516 45 45 "readmeFilename": "README.md", 46 46 "_id": "getobject@0.1.0", 47 "dist": { 48 "shasum": "4563bd9ebffaa0790ee7eec6e2d74523b7e852a6" 49 }, 50 "_from": "getobject@~0.1.0", 51 "_resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz" 47 "_from": "getobject@~0.1.0" 52 48 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/glob/node_modules/inherits/package.json
r484 r516 27 27 "homepage": "https://github.com/isaacs/inherits", 28 28 "_id": "inherits@1.0.0", 29 "dist": { 30 "shasum": "26467026b3b86de1c6f72f00d9a31b1c97077a92" 31 }, 32 "_from": "inherits@1", 33 "_resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz" 29 "_from": "inherits@1" 34 30 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/iconv-lite/package.json
r484 r516 77 77 }, 78 78 "_id": "iconv-lite@0.2.11", 79 "dist": { 80 "shasum": "1827821f46962889765690b557c045f5cc3976eb" 81 }, 82 "_from": "iconv-lite@~0.2.11", 83 "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz" 79 "_from": "iconv-lite@~0.2.11" 84 80 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json
r484 r516 70 70 "readmeFilename": "README.markdown", 71 71 "_id": "underscore.string@2.3.3", 72 "dist": { 73 "shasum": "a7cea3b9aa84d24cf1363ccbddd02ee10abee0c0" 74 }, 75 "_from": "underscore.string@~2.3.1", 76 "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz" 72 "_from": "underscore.string@~2.3.1" 77 73 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/minimatch/README.md
r484 r516 20 20 minimatch("bar.foo", "*.foo") // true! 21 21 minimatch("bar.foo", "*.bar") // false! 22 minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! 22 23 ``` 23 24 … … 36 37 * `man 3 fnmatch` 37 38 * `man 5 gitignore` 38 39 ### Comparisons to other fnmatch/glob implementations40 41 While strict compliance with the existing standards is a worthwhile42 goal, some discrepancies exist between minimatch and other43 implementations, and are intentional.44 45 If the pattern starts with a `!` character, then it is negated. Set the46 `nonegate` flag to suppress this behavior, and treat leading `!`47 characters normally. This is perhaps relevant if you wish to start the48 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`49 characters at the start of a pattern will negate the pattern multiple50 times.51 52 If a pattern starts with `#`, then it is treated as a comment, and53 will not match anything. Use `\#` to match a literal `#` at the54 start of a line, or set the `nocomment` flag to suppress this behavior.55 56 The double-star character `**` is supported by default, unless the57 `noglobstar` flag is set. This is supported in the manner of bsdglob58 and bash 4.1, where `**` only has special significance if it is the only59 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but60 `a/**b` will not. **Note that this is different from the way that `**` is61 handled by ruby's `Dir` class.**62 63 If an escaped pattern has no matches, and the `nonull` flag is set,64 then minimatch.match returns the pattern as-provided, rather than65 interpreting the character escapes. For example,66 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than67 `"*a?"`. This is akin to setting the `nullglob` option in bash, except68 that it does not resolve escaped pattern characters.69 70 If brace expansion is not disabled, then it is performed before any71 other interpretation of the glob pattern. Thus, a pattern like72 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded73 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are74 checked for validity. Since those two are valid, matching proceeds.75 76 39 77 40 ## Minimatch Class … … 217 180 Returns from negate expressions the same as if they were not negated. 218 181 (Ie, true on a hit, false on a miss.) 182 183 184 ## Comparisons to other fnmatch/glob implementations 185 186 While strict compliance with the existing standards is a worthwhile 187 goal, some discrepancies exist between minimatch and other 188 implementations, and are intentional. 189 190 If the pattern starts with a `!` character, then it is negated. Set the 191 `nonegate` flag to suppress this behavior, and treat leading `!` 192 characters normally. This is perhaps relevant if you wish to start the 193 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` 194 characters at the start of a pattern will negate the pattern multiple 195 times. 196 197 If a pattern starts with `#`, then it is treated as a comment, and 198 will not match anything. Use `\#` to match a literal `#` at the 199 start of a line, or set the `nocomment` flag to suppress this behavior. 200 201 The double-star character `**` is supported by default, unless the 202 `noglobstar` flag is set. This is supported in the manner of bsdglob 203 and bash 4.1, where `**` only has special significance if it is the only 204 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but 205 `a/**b` will not. 206 207 If an escaped pattern has no matches, and the `nonull` flag is set, 208 then minimatch.match returns the pattern as-provided, rather than 209 interpreting the character escapes. For example, 210 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than 211 `"*a?"`. This is akin to setting the `nullglob` option in bash, except 212 that it does not resolve escaped pattern characters. 213 214 If brace expansion is not disabled, then it is performed before any 215 other interpretation of the glob pattern. Thus, a pattern like 216 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded 217 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are 218 checked for validity. Since those two are valid, matching proceeds. -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/minimatch/minimatch.js
r484 r516 69 69 var slashSplit = /\/+/ 70 70 71 minimatch.monkeyPatch = monkeyPatch72 function monkeyPatch () {73 var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")74 var orig = desc.value75 desc.value = function (p) {76 if (p instanceof Minimatch) return p.match(this)77 return orig.call(this, p)78 }79 Object.defineProperty(String.prototype, desc)80 }81 82 71 minimatch.filter = filter 83 72 function filter (pattern, options) { … … 179 168 } 180 169 170 Minimatch.prototype.debug = function() {} 171 181 172 Minimatch.prototype.make = make 182 173 function make () { … … 203 194 var set = this.globSet = this.braceExpand() 204 195 205 if (options.debug) console.error(this.pattern, set) 196 if (options.debug) this.debug = console.error 197 198 this.debug(this.pattern, set) 206 199 207 200 // step 3: now we have a set, so turn each one into a series of path-portion … … 214 207 }) 215 208 216 if (options.debug) console.error(this.pattern, set)209 this.debug(this.pattern, set) 217 210 218 211 // glob --> regexps … … 221 214 }, this) 222 215 223 if (options.debug) console.error(this.pattern, set)216 this.debug(this.pattern, set) 224 217 225 218 // filter out everything that didn't compile properly. … … 228 221 }) 229 222 230 if (options.debug) console.error(this.pattern, set)223 this.debug(this.pattern, set) 231 224 232 225 this.set = set … … 303 296 // and then prepend it to everything we find. 304 297 if (pattern.charAt(0) !== "{") { 305 // console.error(pattern)298 this.debug(pattern) 306 299 var prefix = null 307 300 for (var i = 0, l = pattern.length; i < l; i ++) { 308 301 var c = pattern.charAt(i) 309 // console.error(i, c)302 this.debug(i, c) 310 303 if (c === "\\") { 311 304 escaping = !escaping … … 318 311 // actually no sets, all { were escaped. 319 312 if (prefix === null) { 320 // console.error("no sets")313 this.debug("no sets") 321 314 return [pattern] 322 315 } 323 316 324 var tail = braceExpand(pattern.substr(i), options)317 var tail = braceExpand.call(this, pattern.substr(i), options) 325 318 return tail.map(function (t) { 326 319 return prefix + t … … 337 330 var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) 338 331 if (numset) { 339 // console.error("numset", numset[1], numset[2])340 var suf = braceExpand (pattern.substr(numset[0].length), options)332 this.debug("numset", numset[1], numset[2]) 333 var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) 341 334 , start = +numset[1] 342 335 , end = +numset[2] … … 370 363 } 371 364 372 // console.error("Entering for")365 this.debug("Entering for") 373 366 FOR: for (i = 1, l = pattern.length; i < l; i ++) { 374 367 var c = pattern.charAt(i) 375 // console.error("", i, c)368 this.debug("", i, c) 376 369 377 370 if (escaping) { … … 421 414 // and need to escape the leading brace 422 415 if (depth !== 0) { 423 // console.error("didn't close", pattern)424 return braceExpand ("\\" + pattern, options)416 this.debug("didn't close", pattern) 417 return braceExpand.call(this, "\\" + pattern, options) 425 418 } 426 419 427 420 // x{y,z} -> ["xy", "xz"] 428 // console.error("set", set)429 // console.error("suffix", pattern.substr(i))430 var suf = braceExpand (pattern.substr(i), options)421 this.debug("set", set) 422 this.debug("suffix", pattern.substr(i)) 423 var suf = braceExpand.call(this, pattern.substr(i), options) 431 424 // ["b", "c{d,e}","{f,g}h"] -> 432 425 // [["b"], ["cd", "ce"], ["fh", "gh"]] 433 426 var addBraces = set.length === 1 434 // console.error("set pre-expanded", set)427 this.debug("set pre-expanded", set) 435 428 set = set.map(function (p) { 436 return braceExpand (p, options)437 } )438 // console.error("set expanded", set)429 return braceExpand.call(this, p, options) 430 }, this) 431 this.debug("set expanded", set) 439 432 440 433 … … 497 490 : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" 498 491 : "(?!\\.)" 492 , self = this 499 493 500 494 function clearStateChar () { … … 515 509 break 516 510 } 511 self.debug('clearStateChar %j %j', stateChar, re) 517 512 stateChar = false 518 513 } … … 523 518 ; i ++ ) { 524 519 525 if (options.debug) { 526 console.error("%s\t%s %s %j", pattern, i, re, c) 527 } 520 this.debug("%s\t%s %s %j", pattern, i, re, c) 528 521 529 522 // skip over any that are escaped. … … 552 545 case "@": 553 546 case "!": 554 if (options.debug) { 555 console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 556 } 547 this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 557 548 558 549 // all of those are literals inside a class, except that 559 550 // the glob [!a] means [^a] in regexp 560 551 if (inClass) { 552 this.debug(' in class') 561 553 if (c === "!" && i === classStart + 1) c = "^" 562 554 re += c … … 567 559 // that there was something like ** or +? in there. 568 560 // Handle the stateChar, then proceed with this one. 561 self.debug('call clearStateChar %j', stateChar) 569 562 clearStateChar() 570 563 stateChar = c … … 592 585 // negation is (?:(?!js)[^/]*) 593 586 re += stateChar === "!" ? "(?:(?!" : "(?:" 587 this.debug('plType %j %j', stateChar, re) 594 588 stateChar = false 595 589 continue … … 601 595 } 602 596 597 clearStateChar() 603 598 hasMagic = true 604 599 re += ")" … … 624 619 } 625 620 621 clearStateChar() 626 622 re += "|" 627 623 continue … … 716 712 }) 717 713 718 // console.error("tail=%j\n %s", tail, tail)714 this.debug("tail=%j\n %s", tail, tail) 719 715 var t = pl.type === "*" ? star 720 716 : pl.type === "?" ? qmark … … 830 826 Minimatch.prototype.match = match 831 827 function match (f, partial) { 832 // console.error("match", f, this.pattern)828 this.debug("match", f, this.pattern) 833 829 // short-circuit in the case of busted things. 834 830 // comments, etc. … … 848 844 // treat the test path as a set of pathparts. 849 845 f = f.split(slashSplit) 850 if (options.debug) { 851 console.error(this.pattern, "split", f) 852 } 846 this.debug(this.pattern, "split", f) 853 847 854 848 // just ONE of the pattern sets in this.set needs to match … … 858 852 859 853 var set = this.set 860 // console.error(this.pattern, "set", set) 854 this.debug(this.pattern, "set", set) 855 856 var splitFile = path.basename(f.join("/")).split("/") 861 857 862 858 for (var i = 0, l = set.length; i < l; i ++) { 863 var pattern = set[i] 864 var hit = this.matchOne(f, pattern, partial) 859 var pattern = set[i], file = f 860 if (options.matchBase && pattern.length === 1) { 861 file = splitFile 862 } 863 var hit = this.matchOne(file, pattern, partial) 865 864 if (hit) { 866 865 if (options.flipNegate) return true … … 883 882 var options = this.options 884 883 885 if (options.debug) { 886 console.error("matchOne", 887 { "this": this 888 , file: file 889 , pattern: pattern }) 890 } 891 892 if (options.matchBase && pattern.length === 1) { 893 file = path.basename(file.join("/")).split("/") 894 } 895 896 if (options.debug) { 897 console.error("matchOne", file.length, pattern.length) 898 } 884 this.debug("matchOne", 885 { "this": this 886 , file: file 887 , pattern: pattern }) 888 889 this.debug("matchOne", file.length, pattern.length) 899 890 900 891 for ( var fi = 0 … … 905 896 ; fi ++, pi ++ ) { 906 897 907 if (options.debug) { 908 console.error("matchOne loop") 909 } 898 this.debug("matchOne loop") 910 899 var p = pattern[pi] 911 900 , f = file[fi] 912 901 913 if (options.debug) { 914 console.error(pattern, p, f) 915 } 902 this.debug(pattern, p, f) 916 903 917 904 // should be impossible. … … 920 907 921 908 if (p === GLOBSTAR) { 922 if (options.debug) 923 console.error('GLOBSTAR', [pattern, p, f]) 909 this.debug('GLOBSTAR', [pattern, p, f]) 924 910 925 911 // "**" … … 948 934 , pr = pi + 1 949 935 if (pr === pl) { 950 if (options.debug) 951 console.error('** at the end') 936 this.debug('** at the end') 952 937 // a ** at the end will just swallow the rest. 953 938 // We have found a match. … … 967 952 var swallowee = file[fr] 968 953 969 if (options.debug) { 970 console.error('\nglobstar while', 971 file, fr, pattern, pr, swallowee) 972 } 954 this.debug('\nglobstar while', 955 file, fr, pattern, pr, swallowee) 973 956 974 957 // XXX remove this slice. Just pass the start index. 975 958 if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { 976 if (options.debug) 977 console.error('globstar found match!', fr, fl, swallowee) 959 this.debug('globstar found match!', fr, fl, swallowee) 978 960 // found a match. 979 961 return true … … 983 965 if (swallowee === "." || swallowee === ".." || 984 966 (!options.dot && swallowee.charAt(0) === ".")) { 985 if (options.debug) 986 console.error("dot detected!", file, fr, pattern, pr) 967 this.debug("dot detected!", file, fr, pattern, pr) 987 968 break WHILE 988 969 } 989 970 990 971 // ** swallows a segment, and continue. 991 if (options.debug) 992 console.error('globstar swallow a segment, and continue') 972 this.debug('globstar swallow a segment, and continue') 993 973 fr ++ 994 974 } … … 999 979 if (partial) { 1000 980 // ran out of file 1001 // console.error("\n>>> no match, partial?", file, fr, pattern, pr)981 this.debug("\n>>> no match, partial?", file, fr, pattern, pr) 1002 982 if (fr === fl) return true 1003 983 } … … 1015 995 hit = f === p 1016 996 } 1017 if (options.debug) { 1018 console.error("string match", p, f, hit) 1019 } 997 this.debug("string match", p, f, hit) 1020 998 } else { 1021 999 hit = f.match(p) 1022 if (options.debug) { 1023 console.error("pattern match", p, f, hit) 1024 } 1000 this.debug("pattern match", p, f, hit) 1025 1001 } 1026 1002 -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json
r484 r516 30 30 "homepage": "https://github.com/isaacs/node-lru-cache", 31 31 "_id": "lru-cache@2.5.0", 32 "dist": { 33 "shasum": "be07d09e5b05f10b83d0cf01d4891a7729288c69" 34 }, 35 "_from": "lru-cache@2", 36 "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz" 32 "_from": "lru-cache@2" 37 33 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/minimatch/package.json
r484 r516 7 7 "name": "minimatch", 8 8 "description": "a glob matcher in javascript", 9 "version": "0.2.1 2",9 "version": "0.2.14", 10 10 "repository": { 11 11 "type": "git", … … 14 14 "main": "minimatch.js", 15 15 "scripts": { 16 "test": "tap test "16 "test": "tap test/*.js" 17 17 }, 18 18 "engines": { … … 30 30 "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" 31 31 }, 32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n ```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", 33 33 "readmeFilename": "README.md", 34 34 "bugs": { … … 36 36 }, 37 37 "homepage": "https://github.com/isaacs/minimatch", 38 "_id": "minimatch@0.2.1 2",39 "_from": "minimatch@ 0.x.x"38 "_id": "minimatch@0.2.14", 39 "_from": "minimatch@~0.2.12" 40 40 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/rimraf/README.md
r484 r516 1 A`rm -rf` for node.1 `rm -rf` for node. 2 2 3 3 Install with `npm install rimraf`, or just drop rimraf.js somewhere. … … 10 10 errors are handled for you: 11 11 12 * `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times 13 before giving up. 14 * `EMFILE` - If too many file descriptors get opened, rimraf will 15 patiently wait until more become available. 16 12 * Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of 13 `opts.maxBusyTries` times before giving up. 14 * `ENOENT` - If the file doesn't exist, rimraf will return 15 successfully, since your desired outcome is already the case. 17 16 18 17 ## rimraf.sync … … 20 19 It can remove stuff synchronously, too. But that's not so good. Use 21 20 the async API. It's better. 21 22 ## CLI 23 24 If installed with `npm install rimraf -g` it can be used as a global 25 command `rimraf <path>` which is useful for cross platform support. 26 27 ## mkdirp 28 29 If you need to create a directory recursively, check out 30 [mkdirp](https://github.com/substack/node-mkdirp). -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/rimraf/package.json
r484 r516 1 1 { 2 2 "name": "rimraf", 3 "version": "2. 0.3",3 "version": "2.2.6", 4 4 "main": "rimraf.js", 5 5 "description": "A deep deletion module for node (like `rm -rf`)", … … 13 13 "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" 14 14 }, 15 "optionalDependencies": {16 "graceful-fs": "~1.1"17 },18 15 "repository": { 19 16 "type": "git", … … 22 19 "scripts": { 23 20 "test": "cd test && bash run.sh" 21 }, 22 "bin": { 23 "rimraf": "./bin.js" 24 24 }, 25 25 "contributors": [ … … 46 46 } 47 47 ], 48 "readme": " A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times\n before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n patiently wait until more become available.\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n",48 "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", 49 49 "readmeFilename": "README.md", 50 50 "bugs": { … … 52 52 }, 53 53 "homepage": "https://github.com/isaacs/rimraf", 54 "dependencies": { 55 "graceful-fs": "~1.1" 54 "_id": "rimraf@2.2.6", 55 "dist": { 56 "shasum": "c28d4de4cafcd392b82d02729509c65e3502240c" 56 57 }, 57 "_ id": "rimraf@2.0.3",58 "_ from": "rimraf@~2.0.3"58 "_from": "rimraf@~2.2.6", 59 "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" 59 60 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/rimraf/rimraf.js
r484 r516 3 3 4 4 var path = require("path") 5 , fs 6 7 try { 8 // optional dependency 9 fs = require("graceful-fs") 10 } catch (er) { 11 fs = require("fs") 12 } 13 14 var lstat = "lstat" 15 if (process.platform === "win32") { 16 // not reliable on windows prior to 0.7.9 17 var v = process.version.replace(/^v/, '').split(/\.|-/).map(Number) 18 if (v[0] === 0 && (v[1] < 7 || v[1] == 7 && v[2] < 9)) { 19 lstat = "stat" 20 } 21 } 22 if (!fs[lstat]) lstat = "stat" 23 var lstatSync = lstat + "Sync" 5 var fs = require("fs") 24 6 25 7 // for EMFILE handling … … 28 10 exports.BUSYTRIES_MAX = 3 29 11 12 var isWindows = (process.platform === "win32") 13 30 14 function rimraf (p, cb) { 31 32 15 if (!cb) throw new Error("No callback passed to rimraf()") 33 16 34 17 var busyTries = 0 35 36 18 rimraf_(p, function CB (er) { 37 19 if (er) { 38 if (er.code === "EBUSY" && busyTries < exports.BUSYTRIES_MAX) { 20 if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && 21 busyTries < exports.BUSYTRIES_MAX) { 39 22 busyTries ++ 40 23 var time = busyTries * 100 … … 61 44 } 62 45 46 // Two possible strategies. 47 // 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR 48 // 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR 49 // 50 // Both result in an extra syscall when you guess wrong. However, there 51 // are likely far more normal files in the world than directories. This 52 // is based on the assumption that a the average number of files per 53 // directory is >= 1. 54 // 55 // If anyone ever complains about this, then I guess the strategy could 56 // be made configurable somehow. But until then, YAGNI. 63 57 function rimraf_ (p, cb) { 64 fs [lstat](p, function (er, s) {58 fs.unlink(p, function (er) { 65 59 if (er) { 66 // already gone 67 if (er.code === "ENOENT") return cb() 68 // some other kind of error, permissions, etc. 69 return cb(er) 60 if (er.code === "ENOENT") 61 return cb(null) 62 if (er.code === "EPERM") 63 return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) 64 if (er.code === "EISDIR") 65 return rmdir(p, er, cb) 70 66 } 71 72 return rm_(p, s, false, cb) 67 return cb(er) 73 68 }) 74 69 } 75 70 76 77 var myGid = function myGid () { 78 var g = process.getgid && process.getgid() 79 myGid = function myGid () { return g } 80 return g 71 function fixWinEPERM (p, er, cb) { 72 fs.chmod(p, 666, function (er2) { 73 if (er2) 74 cb(er2.code === "ENOENT" ? null : er) 75 else 76 fs.stat(p, function(er3, stats) { 77 if (er3) 78 cb(er3.code === "ENOENT" ? null : er) 79 else if (stats.isDirectory()) 80 rmdir(p, er, cb) 81 else 82 fs.unlink(p, cb) 83 }) 84 }) 81 85 } 82 86 83 var myUid = function myUid () { 84 var u = process.getuid && process.getuid() 85 myUid = function myUid () { return u } 86 return u 87 function fixWinEPERMSync (p, er, cb) { 88 try { 89 fs.chmodSync(p, 666) 90 } catch (er2) { 91 if (er2.code !== "ENOENT") 92 throw er 93 } 94 95 try { 96 var stats = fs.statSync(p) 97 } catch (er3) { 98 if (er3 !== "ENOENT") 99 throw er 100 } 101 102 if (stats.isDirectory()) 103 rmdirSync(p, er) 104 else 105 fs.unlinkSync(p) 87 106 } 88 107 89 90 function writable (s) { 91 var mode = s.mode || 0777 92 , uid = myUid() 93 , gid = myGid() 94 return (mode & 0002) 95 || (gid === s.gid && (mode & 0020)) 96 || (uid === s.uid && (mode & 0200)) 108 function rmdir (p, originalEr, cb) { 109 // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) 110 // if we guessed wrong, and it's not a directory, then 111 // raise the original error. 112 fs.rmdir(p, function (er) { 113 if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) 114 rmkids(p, cb) 115 else if (er && er.code === "ENOTDIR") 116 cb(originalEr) 117 else 118 cb(er) 119 }) 97 120 } 98 121 99 function rm_ (p, s, didWritableCheck, cb) { 100 if (!didWritableCheck && !writable(s)) { 101 // make file writable 102 // user/group/world, doesn't matter at this point 103 // since it's about to get nuked. 104 return fs.chmod(p, s.mode | 0222, function (er) { 105 if (er) return cb(er) 106 rm_(p, s, true, cb) 107 }) 108 } 109 110 if (!s.isDirectory()) { 111 return fs.unlink(p, cb) 112 } 113 114 // directory 122 function rmkids(p, cb) { 115 123 fs.readdir(p, function (er, files) { 116 if (er) return cb(er) 117 asyncForEach(files.map(function (f) { 118 return path.join(p, f) 119 }), function (file, cb) { 120 rimraf(file, cb) 121 }, function (er) { 122 if (er) return cb(er) 123 fs.rmdir(p, cb) 124 if (er) 125 return cb(er) 126 var n = files.length 127 if (n === 0) 128 return fs.rmdir(p, cb) 129 var errState 130 files.forEach(function (f) { 131 rimraf(path.join(p, f), function (er) { 132 if (errState) 133 return 134 if (er) 135 return cb(errState = er) 136 if (--n === 0) 137 fs.rmdir(p, cb) 138 }) 124 139 }) 125 140 }) 126 141 } 127 142 128 function asyncForEach (list, fn, cb) { 129 if (!list.length) cb() 130 var c = list.length 131 , errState = null 132 list.forEach(function (item, i, list) { 133 fn(item, function (er) { 134 if (errState) return 135 if (er) return cb(errState = er) 136 if (-- c === 0) return cb() 137 }) 138 }) 143 // this looks simpler, and is strictly *faster*, but will 144 // tie up the JavaScript thread and fail on excessively 145 // deep directory trees. 146 function rimrafSync (p) { 147 try { 148 fs.unlinkSync(p) 149 } catch (er) { 150 if (er.code === "ENOENT") 151 return 152 if (er.code === "EPERM") 153 return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) 154 if (er.code !== "EISDIR") 155 throw er 156 rmdirSync(p, er) 157 } 139 158 } 140 159 141 // this looks simpler, but it will fail with big directory trees, 142 // or on slow stupid awful cygwin filesystems 143 function rimrafSync (p) { 160 function rmdirSync (p, originalEr) { 144 161 try { 145 var s = fs[lstatSync](p)162 fs.rmdirSync(p) 146 163 } catch (er) { 147 if (er.code === "ENOENT") return 148 throw er 164 if (er.code === "ENOENT") 165 return 166 if (er.code === "ENOTDIR") 167 throw originalEr 168 if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") 169 rmkidsSync(p) 149 170 } 171 } 150 172 151 if (!writable(s)) { 152 fs.chmodSync(p, s.mode | 0222) 153 } 154 155 if (!s.isDirectory()) return fs.unlinkSync(p) 156 173 function rmkidsSync (p) { 157 174 fs.readdirSync(p).forEach(function (f) { 158 175 rimrafSync(path.join(p, f)) -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/node_modules/underscore.string/package.json
r484 r516 69 69 "readmeFilename": "README.markdown", 70 70 "_id": "underscore.string@2.2.1", 71 "dist": { 72 "shasum": "2aa155e7c49bcbfd88ec69b8c9694d885385c717" 73 }, 74 "_from": "underscore.string@~2.2.1", 75 "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz" 71 "_from": "underscore.string@~2.2.1" 76 72 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/grunt/package.json
r484 r516 2 2 "name": "grunt", 3 3 "description": "The JavaScript Task Runner", 4 "version": "0.4. 2",4 "version": "0.4.4", 5 5 "author": { 6 6 "name": "\"Cowboy\" Ben Alman", … … 59 59 "minimatch": "~0.2.12", 60 60 "nopt": "~1.0.10", 61 "rimraf": "~2. 0.3",61 "rimraf": "~2.2.6", 62 62 "lodash": "~0.9.2", 63 63 "underscore.string": "~2.2.1", … … 65 65 "js-yaml": "~2.0.5", 66 66 "exit": "~0.1.1", 67 "getobject": "~0.1.0" 67 "getobject": "~0.1.0", 68 "grunt-legacy-util": "~0.1.2" 68 69 }, 69 70 "devDependencies": { … … 76 77 "shelljs": "~0.2.5" 77 78 }, 78 "readme": "# Grunt: The JavaScript Task Runner [](http://travis-ci.org/gruntjs/grunt)\n\n<img align=\"right\" height=\"260\" src=\"http://gruntjs.com/img/grunt-logo-no-wordmark.svg\">\n\n\n### Documentation\n\nVisit the [gruntjs.com](http://gruntjs.com/) website for all the things.\n\n### Support / Contributing\nBefore you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.\n\nYou can find the grunt team in [#grunt on irc.freenode.net](http://webchat.freenode.net/?channels=grunt).\n\n### Release History\nSee the [CHANGELOG](CHANGELOG).\n",79 "readme": "# Grunt: The JavaScript Task Runner\n\n[](http://travis-ci.org/gruntjs/grunt)\n[](http://gruntjs.com/)\n\n<img align=\"right\" height=\"260\" src=\"http://gruntjs.com/img/grunt-logo-no-wordmark.svg\">\n\n\n### Documentation\n\nVisit the [gruntjs.com](http://gruntjs.com/) website for all the things.\n\n### Support / Contributing\nBefore you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.\n\nYou can find the grunt team in [#grunt on irc.freenode.net](http://webchat.freenode.net/?channels=grunt).\n\n### Release History\nSee the [CHANGELOG](CHANGELOG).\n", 79 80 "readmeFilename": "README.md", 80 "_id": "grunt@0.4. 2",81 "_id": "grunt@0.4.4", 81 82 "dist": { 82 "shasum": " 1f6804f00e977dd90b9f97b1faed480215db0857"83 "shasum": "64f477fef801475ab92f1819a691c6c71b72902e" 83 84 }, 84 "_from": "grunt@0.4. 2",85 "_resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4. 2.tgz"85 "_from": "grunt@0.4.4", 86 "_resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.4.tgz" 86 87 } -
Dev/trunk/node_modules/grunt-amd-check/node_modules/underscore/package.json
r484 r516 32 32 }, 33 33 "_id": "underscore@1.4.4", 34 "_from": "underscore@1.4.4", 35 "dist": { 36 "shasum": "3e7ceb21f205bc19964685e1fdd52c8f77773674" 37 }, 38 "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz" 34 "_from": "underscore@1.4.4" 39 35 } -
Dev/trunk/node_modules/grunt-amd-check/package.json
r484 r516 33 33 }, 34 34 "_from": "grunt-amd-check@", 35 "_resolved": "https://registry.npmjs.org/grunt-amd-check/-/grunt-amd-check-0.5.2.tgz" 35 "_resolved": "https://registry.npmjs.org/grunt-amd-check/-/grunt-amd-check-0.5.2.tgz", 36 "devDependencies": { 37 "underscore": "^1.4.4", 38 "grunt": "^0.4.4" 39 } 36 40 } -
Dev/trunk/node_modules/grunt-banner/package.json
r484 r516 45 45 "readmeFilename": "README.md", 46 46 "_id": "grunt-banner@0.1.4", 47 "_from": "grunt-banner@0.1.4",48 47 "dist": { 49 48 "shasum": "93d7c29395f7a33a039a231344e4a6fdd6fa28ea" 50 49 }, 50 "_from": "grunt-banner@0.1.4", 51 51 "_resolved": "https://registry.npmjs.org/grunt-banner/-/grunt-banner-0.1.4.tgz" 52 52 } -
Dev/trunk/node_modules/grunt-coffeelint/.travis.yml
r484 r516 1 1 language: node_js 2 2 node_js: 3 - 0.64 3 - 0.8 4 before_script: 5 - npm install -g grunt-cli -
Dev/trunk/node_modules/grunt-coffeelint/README.md
r484 r516 14 14 grunt.loadNpmTasks('grunt-coffeelint'); 15 15 16 ## Options 17 18 A few additional options are supported: 19 20 ### force 21 Type: `Boolean` 22 Default value: `false` 23 24 Set `force` to `true` to report CoffeeLint errors but not fail the task. 16 25 17 26 ## Configuration … … 68 77 ```` 69 78 70 For available options see [example configuration] or [coffeelint homepage]. 71 79 For available options see [coffeelint homepage]. 72 80 73 81 [CoffeeLint]: http://www.coffeelint.org/ 74 82 [coffeelint homepage]: http://www.coffeelint.org/ 75 [example configuration]: https://raw.github.com/clutchski/coffeelint/master/examples/coffeelint.json -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/.travis.yml
r484 r516 1 1 language: node_js 2 2 node_js: 3 - "0.6"4 3 - "0.8" 5 4 - "0.10" -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/bin/coffeelint
r484 r516 1 1 #!/usr/bin/env node 2 2 3 require('../lib/commandline') 3 var path = require("path"); 4 var fs = require("fs"); 5 6 // path.existsSync was moved to fs.existsSync node 0.6 -> 0.8 7 var existsFn = fs.existsSync || path.existsSync; 8 9 var thisdir = path.dirname(fs.realpathSync(__filename)); 10 11 // This setup allows for VERY fast development. You can clear the lib 12 // directory then run without having to recompile the coffeescript. 13 // 14 // I use this so vim runs the newest code while I work on CoffeeLint. -Asa 15 commandline = path.join(thisdir, '..', "lib", "commandline.js"); 16 if (existsFn(commandline)) { 17 require(commandline); 18 } else { 19 require('coffee-script'); 20 require('../src/commandline'); 21 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/lib/coffeelint.js
r484 r516 1 // Generated by CoffeeScript 1.6.2 1 !function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.coffeelint=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ 2 module.exports={ 3 "name": "coffeelint", 4 "description": "Lint your CoffeeScript", 5 "version": "1.0.8", 6 "homepage": "http://www.coffeelint.org", 7 "keywords": [ 8 "lint", 9 "coffeescript", 10 "coffee-script" 11 ], 12 "author": "Matthew Perpick <clutchski@gmail.com>", 13 "main": "./lib/coffeelint.js", 14 "engines": { 15 "node": ">=0.8.0" 16 }, 17 "repository": { 18 "type": "git", 19 "url": "git://github.com/clutchski/coffeelint.git" 20 }, 21 "bin": { 22 "coffeelint": "./bin/coffeelint" 23 }, 24 "dependencies": { 25 "optimist": ">=0.2.8", 26 "coffee-script": "1.6.x", 27 "glob": ">=3.1.9" 28 }, 29 "devDependencies": { 30 "vows": ">=0.6.0", 31 "underscore": ">=1.4.4" 32 }, 33 "licenses": [ 34 { 35 "type": "MIT", 36 "url": "http://github.com/clutchski/coffeelint/raw/master/LICENSE" 37 } 38 ], 39 "scripts": { 40 "pretest": "cake compile", 41 "test": "vows --spec test/*.coffee test/*.litcoffee", 42 "posttest": "npm run lint", 43 "prepublish": "cake prepublish", 44 "publish": "cake publish", 45 "lint": "cake compile && ./bin/coffeelint -f coffeelint.json src/*.coffee test/*.coffee test/*.litcoffee", 46 "lint-csv": "cake compile && ./bin/coffeelint --csv -f coffeelint.json src/*.coffee test/*.coffee", 47 "lint-jslint": "cake compile && ./bin/coffeelint --jslint -f coffeelint.json src/*.coffee test/*.coffee", 48 "compile": "cake compile" 49 } 50 } 51 },{}],2:[function(_dereq_,module,exports){ 52 var ASTApi, ASTLinter, BaseLinter, 53 __hasProp = {}.hasOwnProperty, 54 __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; 55 56 BaseLinter = _dereq_('./base_linter.coffee'); 57 58 ASTApi = (function() { 59 function ASTApi(config) { 60 this.config = config; 61 } 62 63 return ASTApi; 64 65 })(); 66 67 module.exports = ASTLinter = (function(_super) { 68 __extends(ASTLinter, _super); 69 70 function ASTLinter(source, config, rules, CoffeeScript) { 71 this.CoffeeScript = CoffeeScript; 72 ASTLinter.__super__.constructor.call(this, source, config, rules); 73 this.astApi = new ASTApi(this.config); 74 } 75 76 ASTLinter.prototype.acceptRule = function(rule) { 77 return typeof rule.lintAST === 'function'; 78 }; 79 80 ASTLinter.prototype.lint = function() { 81 var coffeeError, err, errors, rule, v, _i, _len, _ref; 82 errors = []; 83 try { 84 this.node = this.CoffeeScript.nodes(this.source); 85 } catch (_error) { 86 coffeeError = _error; 87 err = this._parseCoffeeScriptError(coffeeError); 88 if (err != null) { 89 errors.push(err); 90 } 91 return errors; 92 } 93 _ref = this.rules; 94 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 95 rule = _ref[_i]; 96 this.astApi.createError = (function(_this) { 97 return function(attrs) { 98 if (attrs == null) { 99 attrs = {}; 100 } 101 return _this.createError(rule.rule.name, attrs); 102 }; 103 })(this); 104 rule.errors = errors; 105 v = this.normalizeResult(rule, rule.lintAST(this.node, this.astApi)); 106 if (v != null) { 107 return v; 108 } 109 } 110 return errors; 111 }; 112 113 ASTLinter.prototype._parseCoffeeScriptError = function(coffeeError) { 114 var attrs, lineNumber, match, message, rule; 115 rule = this.config['coffeescript_error']; 116 message = coffeeError.toString(); 117 lineNumber = -1; 118 if (coffeeError.location != null) { 119 lineNumber = coffeeError.location.first_line + 1; 120 } else { 121 match = /line (\d+)/.exec(message); 122 if ((match != null ? match.length : void 0) > 1) { 123 lineNumber = parseInt(match[1], 10); 124 } 125 } 126 attrs = { 127 message: message, 128 level: rule.level, 129 lineNumber: lineNumber 130 }; 131 return this.createError('coffeescript_error', attrs); 132 }; 133 134 return ASTLinter; 135 136 })(BaseLinter); 137 138 139 },{"./base_linter.coffee":3}],3:[function(_dereq_,module,exports){ 140 var BaseLinter, defaults, extend, 141 __slice = [].slice; 142 143 extend = function() { 144 var destination, k, source, sources, v, _i, _len; 145 destination = arguments[0], sources = 2 <= arguments.length ? __slice.call(arguments, 1) : []; 146 for (_i = 0, _len = sources.length; _i < _len; _i++) { 147 source = sources[_i]; 148 for (k in source) { 149 v = source[k]; 150 destination[k] = v; 151 } 152 } 153 return destination; 154 }; 155 156 defaults = function(source, defaults) { 157 return extend({}, defaults, source); 158 }; 159 160 module.exports = BaseLinter = (function() { 161 function BaseLinter(source, config, rules) { 162 this.source = source; 163 this.config = config; 164 this.setupRules(rules); 165 } 166 167 BaseLinter.prototype.isObject = function(obj) { 168 return obj === Object(obj); 169 }; 170 171 BaseLinter.prototype.createError = function(ruleName, attrs) { 172 var level; 173 if (attrs == null) { 174 attrs = {}; 175 } 176 if (attrs.level == null) { 177 attrs.level = this.config[ruleName].level; 178 } 179 level = attrs.level; 180 if (level !== 'ignore' && level !== 'warn' && level !== 'error') { 181 throw new Error("unknown level " + level); 182 } 183 if (level === 'error' || level === 'warn') { 184 attrs.rule = ruleName; 185 return defaults(attrs, this.config[ruleName]); 186 } else { 187 return null; 188 } 189 }; 190 191 BaseLinter.prototype.acceptRule = function(rule) { 192 throw new Error("acceptRule needs to be overridden in the subclass"); 193 }; 194 195 BaseLinter.prototype.setupRules = function(rules) { 196 var RuleConstructor, level, name, rule, _results; 197 this.rules = []; 198 _results = []; 199 for (name in rules) { 200 RuleConstructor = rules[name]; 201 level = this.config[name].level; 202 if (level === 'error' || level === 'warn') { 203 rule = new RuleConstructor(this, this.config); 204 if (this.acceptRule(rule)) { 205 _results.push(this.rules.push(rule)); 206 } else { 207 _results.push(void 0); 208 } 209 } else if (level !== 'ignore') { 210 throw new Error("unknown level " + level); 211 } else { 212 _results.push(void 0); 213 } 214 } 215 return _results; 216 }; 217 218 BaseLinter.prototype.normalizeResult = function(p, result) { 219 if (result === true) { 220 return this.createError(p.rule.name); 221 } 222 if (this.isObject(result)) { 223 return this.createError(p.rule.name, result); 224 } 225 }; 226 227 return BaseLinter; 228 229 })(); 230 231 232 },{}],4:[function(_dereq_,module,exports){ 233 2 234 /* 3 235 CoffeeLint … … 5 237 Copyright (c) 2011 Matthew Perpick. 6 238 CoffeeLint is freely distributable under the MIT license. 7 */ 8 9 10 (function() { 11 var ASTLinter, CoffeeScript, ERROR, IGNORE, LexicalLinter, LineLinter, RULES, WARN, block_config, coffeelint, createError, defaults, extend, mergeDefaultConfig, regexes, 12 __slice = [].slice, 13 __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; 14 15 coffeelint = {}; 16 17 if (typeof exports !== "undefined" && exports !== null) { 18 coffeelint = exports; 19 CoffeeScript = require('coffee-script'); 239 */ 240 var ASTLinter, CoffeeScript, ERROR, IGNORE, LexicalLinter, LineLinter, RULES, WARN, coffeelint, cs, defaults, difference, extend, hasSyntaxError, mergeDefaultConfig, packageJSON, _rules, 241 __slice = [].slice, 242 __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; 243 244 coffeelint = exports; 245 246 if (typeof window !== "undefined" && window !== null) { 247 CoffeeScript = window.CoffeeScript; 248 } else { 249 cs = 'coffee-script'; 250 CoffeeScript = _dereq_(cs); 251 } 252 253 packageJSON = _dereq_('./../package.json'); 254 255 coffeelint.VERSION = packageJSON.version; 256 257 ERROR = 'error'; 258 259 WARN = 'warn'; 260 261 IGNORE = 'ignore'; 262 263 coffeelint.RULES = RULES = _dereq_('./rules.coffee'); 264 265 extend = function() { 266 var destination, k, source, sources, v, _i, _len; 267 destination = arguments[0], sources = 2 <= arguments.length ? __slice.call(arguments, 1) : []; 268 for (_i = 0, _len = sources.length; _i < _len; _i++) { 269 source = sources[_i]; 270 for (k in source) { 271 v = source[k]; 272 destination[k] = v; 273 } 274 } 275 return destination; 276 }; 277 278 defaults = function(source, defaults) { 279 return extend({}, defaults, source); 280 }; 281 282 difference = function(a, b) { 283 var j, _ref, _results; 284 j = 0; 285 _results = []; 286 while (j < a.length) { 287 if (_ref = a[j], __indexOf.call(b, _ref) >= 0) { 288 _results.push(a.splice(j, 1)); 289 } else { 290 _results.push(j++); 291 } 292 } 293 return _results; 294 }; 295 296 LineLinter = _dereq_('./line_linter.coffee'); 297 298 LexicalLinter = _dereq_('./lexical_linter.coffee'); 299 300 ASTLinter = _dereq_('./ast_linter.coffee'); 301 302 mergeDefaultConfig = function(userConfig) { 303 var config, rule, ruleConfig; 304 config = {}; 305 for (rule in RULES) { 306 ruleConfig = RULES[rule]; 307 config[rule] = defaults(userConfig[rule], ruleConfig); 308 } 309 return config; 310 }; 311 312 coffeelint.invertLiterate = function(source) { 313 var line, newSource, _i, _len, _ref; 314 source = CoffeeScript.helpers.invertLiterate(source); 315 newSource = ""; 316 _ref = source.split("\n"); 317 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 318 line = _ref[_i]; 319 if (line.match(/^#/)) { 320 line = line.replace(/\s*$/, ''); 321 } 322 line = line.replace(/^\s{4}/g, ''); 323 newSource += "" + line + "\n"; 324 } 325 return newSource; 326 }; 327 328 _rules = {}; 329 330 coffeelint.registerRule = function(RuleConstructor, ruleName) { 331 var e, name, p, _ref, _ref1; 332 if (ruleName == null) { 333 ruleName = void 0; 334 } 335 p = new RuleConstructor; 336 name = (p != null ? (_ref = p.rule) != null ? _ref.name : void 0 : void 0) || "(unknown)"; 337 e = function(msg) { 338 throw new Error("Invalid rule: " + name + " " + msg); 339 }; 340 if (p.rule == null) { 341 e("Rules must provide rule attribute with a default configuration."); 342 } 343 if (p.rule.name == null) { 344 e("Rule defaults require a name"); 345 } 346 if ((ruleName != null) && ruleName !== p.rule.name) { 347 e("Mismatched rule name: " + ruleName); 348 } 349 if (p.rule.message == null) { 350 e("Rule defaults require a message"); 351 } 352 if (p.rule.description == null) { 353 e("Rule defaults require a description"); 354 } 355 if ((_ref1 = p.rule.level) !== 'ignore' && _ref1 !== 'warn' && _ref1 !== 'error') { 356 e("Default level must be 'ignore', 'warn', or 'error'"); 357 } 358 if (typeof p.lintToken === 'function') { 359 if (!p.tokens) { 360 e("'tokens' is required for 'lintToken'"); 361 } 362 } else if (typeof p.lintLine !== 'function' && typeof p.lintAST !== 'function') { 363 e("Rules must implement lintToken, lintLine, or lintAST"); 364 } 365 RULES[p.rule.name] = p.rule; 366 return _rules[p.rule.name] = RuleConstructor; 367 }; 368 369 coffeelint.registerRule(_dereq_('./rules/arrow_spacing.coffee')); 370 371 coffeelint.registerRule(_dereq_('./rules/no_tabs.coffee')); 372 373 coffeelint.registerRule(_dereq_('./rules/no_trailing_whitespace.coffee')); 374 375 coffeelint.registerRule(_dereq_('./rules/max_line_length.coffee')); 376 377 coffeelint.registerRule(_dereq_('./rules/line_endings.coffee')); 378 379 coffeelint.registerRule(_dereq_('./rules/no_trailing_semicolons.coffee')); 380 381 coffeelint.registerRule(_dereq_('./rules/indentation.coffee')); 382 383 coffeelint.registerRule(_dereq_('./rules/camel_case_classes.coffee')); 384 385 coffeelint.registerRule(_dereq_('./rules/colon_assignment_spacing.coffee')); 386 387 coffeelint.registerRule(_dereq_('./rules/no_implicit_braces.coffee')); 388 389 coffeelint.registerRule(_dereq_('./rules/no_plusplus.coffee')); 390 391 coffeelint.registerRule(_dereq_('./rules/no_throwing_strings.coffee')); 392 393 coffeelint.registerRule(_dereq_('./rules/no_backticks.coffee')); 394 395 coffeelint.registerRule(_dereq_('./rules/no_implicit_parens.coffee')); 396 397 coffeelint.registerRule(_dereq_('./rules/no_empty_param_list.coffee')); 398 399 coffeelint.registerRule(_dereq_('./rules/no_stand_alone_at.coffee')); 400 401 coffeelint.registerRule(_dereq_('./rules/space_operators.coffee')); 402 403 coffeelint.registerRule(_dereq_('./rules/duplicate_key.coffee')); 404 405 coffeelint.registerRule(_dereq_('./rules/empty_constructor_needs_parens.coffee')); 406 407 coffeelint.registerRule(_dereq_('./rules/cyclomatic_complexity.coffee')); 408 409 coffeelint.registerRule(_dereq_('./rules/newlines_after_classes.coffee')); 410 411 coffeelint.registerRule(_dereq_('./rules/no_unnecessary_fat_arrows.coffee')); 412 413 coffeelint.registerRule(_dereq_('./rules/missing_fat_arrows.coffee')); 414 415 coffeelint.registerRule(_dereq_('./rules/non_empty_constructor_needs_parens.coffee')); 416 417 hasSyntaxError = function(source) { 418 try { 419 CoffeeScript.tokens(source); 420 return false; 421 } catch (_error) {} 422 return true; 423 }; 424 425 coffeelint.lint = function(source, userConfig, literate) { 426 var all_errors, astErrors, block_config, cmd, config, disabled, disabled_initially, e, errors, i, l, lexErrors, lexicalLinter, lineErrors, lineLinter, next_line, r, rules, s, tokensByLine, _i, _j, _k, _len, _len1, _ref, _ref1, _ref2, _ref3, _ref4; 427 if (userConfig == null) { 428 userConfig = {}; 429 } 430 if (literate == null) { 431 literate = false; 432 } 433 if (literate) { 434 source = this.invertLiterate(source); 435 } 436 config = mergeDefaultConfig(userConfig); 437 disabled_initially = []; 438 _ref = source.split('\n'); 439 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 440 l = _ref[_i]; 441 s = LineLinter.configStatement.exec(l); 442 if ((s != null ? s.length : void 0) > 2 && __indexOf.call(s, 'enable') >= 0) { 443 _ref1 = s.slice(1); 444 for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { 445 r = _ref1[_j]; 446 if (r !== 'enable' && r !== 'disable') { 447 if (!(r in config && ((_ref2 = config[r].level) === 'warn' || _ref2 === 'error'))) { 448 disabled_initially.push(r); 449 config[r] = { 450 level: 'error' 451 }; 452 } 453 } 454 } 455 } 456 } 457 astErrors = new ASTLinter(source, config, _rules, CoffeeScript).lint(); 458 errors = [].concat(astErrors); 459 if (!hasSyntaxError(source)) { 460 lexicalLinter = new LexicalLinter(source, config, _rules, CoffeeScript); 461 lexErrors = lexicalLinter.lint(); 462 errors = errors.concat(lexErrors); 463 tokensByLine = lexicalLinter.tokensByLine; 464 lineLinter = new LineLinter(source, config, _rules, tokensByLine, literate); 465 lineErrors = lineLinter.lint(); 466 errors = errors.concat(lineErrors); 467 block_config = lineLinter.block_config; 20 468 } else { 21 this.coffeelint = coffeelint; 22 CoffeeScript = this.CoffeeScript; 23 } 24 25 coffeelint.VERSION = "0.5.7"; 26 27 ERROR = 'error'; 28 29 WARN = 'warn'; 30 31 IGNORE = 'ignore'; 32 33 coffeelint.RULES = RULES = { 34 no_tabs: { 35 level: ERROR, 36 message: 'Line contains tab indentation', 37 description: "This rule forbids tabs in indentation. Enough said. It is enabled by\ndefault." 38 }, 39 no_trailing_whitespace: { 40 level: ERROR, 41 message: 'Line ends with trailing whitespace', 42 allowed_in_comments: false, 43 description: "This rule forbids trailing whitespace in your code, since it is\nneedless cruft. It is enabled by default." 44 }, 45 max_line_length: { 46 value: 80, 47 level: ERROR, 48 message: 'Line exceeds maximum allowed length', 49 description: "This rule imposes a maximum line length on your code. <a\nhref=\"http://www.python.org/dev/peps/pep-0008/\">Python's style\nguide</a> does a good job explaining why you might want to limit the\nlength of your lines, though this is a matter of taste.\n\nLines can be no longer than eighty characters by default." 50 }, 51 camel_case_classes: { 52 level: ERROR, 53 message: 'Class names should be camel cased', 54 description: "This rule mandates that all class names are camel cased. Camel\ncasing class names is a generally accepted way of distinguishing\nconstructor functions - which require the 'new' prefix to behave\nproperly - from plain old functions.\n<pre>\n<code># Good!\nclass BoaConstrictor\n\n# Bad!\nclass boaConstrictor\n</code>\n</pre>\nThis rule is enabled by default." 55 }, 56 indentation: { 57 value: 2, 58 level: ERROR, 59 message: 'Line contains inconsistent indentation', 60 description: "This rule imposes a standard number of spaces to be used for\nindentation. Since whitespace is significant in CoffeeScript, it's\ncritical that a project chooses a standard indentation format and\nstays consistent. Other roads lead to darkness. <pre> <code>#\nEnabling this option will prevent this ugly\n# but otherwise valid CoffeeScript.\ntwoSpaces = () ->\n fourSpaces = () ->\n eightSpaces = () ->\n 'this is valid CoffeeScript'\n\n</code>\n</pre>\nTwo space indentation is enabled by default." 61 }, 62 no_implicit_braces: { 63 level: IGNORE, 64 message: 'Implicit braces are forbidden', 65 description: "This rule prohibits implicit braces when declaring object literals.\nImplicit braces can make code more difficult to understand,\nespecially when used in combination with optional parenthesis.\n<pre>\n<code># Do you find this code ambiguous? Is it a\n# function call with three arguments or four?\nmyFunction a, b, 1:2, 3:4\n\n# While the same code written in a more\n# explicit manner has no ambiguity.\nmyFunction(a, b, {1:2, 3:4})\n</code>\n</pre>\nImplicit braces are permitted by default, since their use is\nidiomatic CoffeeScript." 66 }, 67 no_trailing_semicolons: { 68 level: ERROR, 69 message: 'Line contains a trailing semicolon', 70 description: "This rule prohibits trailing semicolons, since they are needless\ncruft in CoffeeScript.\n<pre>\n<code># This semicolon is meaningful.\nx = '1234'; console.log(x)\n\n# This semicolon is redundant.\nalert('end of line');\n</code>\n</pre>\nTrailing semicolons are forbidden by default." 71 }, 72 no_plusplus: { 73 level: IGNORE, 74 message: 'The increment and decrement operators are forbidden', 75 description: "This rule forbids the increment and decrement arithmetic operators.\nSome people believe the <tt>++</tt> and <tt>--</tt> to be cryptic\nand the cause of bugs due to misunderstandings of their precedence\nrules.\nThis rule is disabled by default." 76 }, 77 no_throwing_strings: { 78 level: ERROR, 79 message: 'Throwing strings is forbidden', 80 description: "This rule forbids throwing string literals or interpolations. While\nJavaScript (and CoffeeScript by extension) allow any expression to\nbe thrown, it is best to only throw <a\nhref=\"https://developer.mozilla.org\n/en/JavaScript/Reference/Global_Objects/Error\"> Error</a> objects,\nbecause they contain valuable debugging information like the stack\ntrace. Because of JavaScript's dynamic nature, CoffeeLint cannot\nensure you are always throwing instances of <tt>Error</tt>. It will\nonly catch the simple but real case of throwing literal strings.\n<pre>\n<code># CoffeeLint will catch this:\nthrow \"i made a boo boo\"\n\n# ... but not this:\nthrow getSomeString()\n</code>\n</pre>\nThis rule is enabled by default." 81 }, 82 cyclomatic_complexity: { 83 value: 10, 84 level: IGNORE, 85 message: 'The cyclomatic complexity is too damn high' 86 }, 87 no_backticks: { 88 level: ERROR, 89 message: 'Backticks are forbidden', 90 description: "Backticks allow snippets of JavaScript to be embedded in\nCoffeeScript. While some folks consider backticks useful in a few\nniche circumstances, they should be avoided because so none of\nJavaScript's \"bad parts\", like <tt>with</tt> and <tt>eval</tt>,\nsneak into CoffeeScript.\nThis rule is enabled by default." 91 }, 92 line_endings: { 93 level: IGNORE, 94 value: 'unix', 95 message: 'Line contains incorrect line endings', 96 description: "This rule ensures your project uses only <tt>windows</tt> or\n<tt>unix</tt> line endings. This rule is disabled by default." 97 }, 98 no_implicit_parens: { 99 level: IGNORE, 100 message: 'Implicit parens are forbidden', 101 description: "This rule prohibits implicit parens on function calls.\n<pre>\n<code># Some folks don't like this style of coding.\nmyFunction a, b, c\n\n# And would rather it always be written like this:\nmyFunction(a, b, c)\n</code>\n</pre>\nImplicit parens are permitted by default, since their use is\nidiomatic CoffeeScript." 102 }, 103 empty_constructor_needs_parens: { 104 level: IGNORE, 105 message: 'Invoking a constructor without parens and without arguments' 106 }, 107 non_empty_constructor_needs_parens: { 108 level: IGNORE, 109 message: 'Invoking a constructor without parens and with arguments' 110 }, 111 no_empty_param_list: { 112 level: IGNORE, 113 message: 'Empty parameter list is forbidden', 114 description: "This rule prohibits empty parameter lists in function definitions.\n<pre>\n<code># The empty parameter list in here is unnecessary:\nmyFunction = () ->\n\n# We might favor this instead:\nmyFunction = ->\n</code>\n</pre>\nEmpty parameter lists are permitted by default." 115 }, 116 space_operators: { 117 level: IGNORE, 118 message: 'Operators must be spaced properly' 119 }, 120 duplicate_key: { 121 level: ERROR, 122 message: 'Duplicate key defined in object or class' 123 }, 124 newlines_after_classes: { 125 value: 3, 126 level: IGNORE, 127 message: 'Wrong count of newlines between a class and other code' 128 }, 129 no_stand_alone_at: { 130 level: IGNORE, 131 message: '@ must not be used stand alone', 132 description: "This rule checks that no stand alone @ are in use, they are\ndiscouraged. Further information in CoffeScript issue <a\nhref=\"https://github.com/jashkenas/coffee-script/issues/1601\">\n#1601</a>" 133 }, 134 arrow_spacing: { 135 level: IGNORE, 136 message: 'Function arrow (->) must be spaced properly', 137 description: "<p>This rule checks to see that there is spacing before and after\nthe arrow operator that declares a function. This rule is disabled\nby default.</p> <p>Note that if arrow_spacing is enabled, and you\npass an empty function as a parameter, arrow_spacing will accept\neither a space or no space in-between the arrow operator and the\nparenthesis</p>\n<pre><code># Both of this will not trigger an error,\n# even with arrow_spacing enabled.\nx(-> 3)\nx( -> 3)\n\n# However, this will trigger an error\nx((a,b)-> 3)\n</code>\n</pre>" 138 }, 139 coffeescript_error: { 140 level: ERROR, 141 message: '' 142 } 143 }; 144 145 regexes = { 146 trailingWhitespace: /[^\s]+[\t ]+\r?$/, 147 lineHasComment: /^\s*[^\#]*\#/, 148 indentation: /\S/, 149 longUrlComment: /^\s*\#\s*http[^\s]+$/, 150 camelCase: /^[A-Z][a-zA-Z\d]*$/, 151 trailingSemicolon: /;\r?$/, 152 configStatement: /coffeelint:\s*(disable|enable)(?:=([\w\s,]*))?/ 153 }; 154 155 extend = function() { 156 var destination, k, source, sources, v, _i, _len; 157 158 destination = arguments[0], sources = 2 <= arguments.length ? __slice.call(arguments, 1) : []; 159 for (_i = 0, _len = sources.length; _i < _len; _i++) { 160 source = sources[_i]; 161 for (k in source) { 162 v = source[k]; 163 destination[k] = v; 164 } 165 } 166 return destination; 167 }; 168 169 defaults = function(source, defaults) { 170 return extend({}, defaults, source); 171 }; 172 173 createError = function(rule, attrs) { 174 var level; 175 469 block_config = { 470 enable: {}, 471 disable: {} 472 }; 473 } 474 errors.sort(function(a, b) { 475 return a.lineNumber - b.lineNumber; 476 }); 477 all_errors = errors; 478 errors = []; 479 disabled = disabled_initially; 480 next_line = 0; 481 for (i = _k = 0, _ref3 = source.split('\n').length; 0 <= _ref3 ? _k < _ref3 : _k > _ref3; i = 0 <= _ref3 ? ++_k : --_k) { 482 for (cmd in block_config) { 483 rules = block_config[cmd][i]; 484 if (rules != null) { 485 ({ 486 'disable': function() { 487 return disabled = disabled.concat(rules); 488 }, 489 'enable': function() { 490 difference(disabled, rules); 491 if (rules.length === 0) { 492 return disabled = disabled_initially; 493 } 494 } 495 })[cmd](); 496 } 497 } 498 while (next_line === i && all_errors.length > 0) { 499 next_line = all_errors[0].lineNumber - 1; 500 e = all_errors[0]; 501 if (e.lineNumber === i + 1 || (e.lineNumber == null)) { 502 e = all_errors.shift(); 503 if (_ref4 = e.rule, __indexOf.call(disabled, _ref4) < 0) { 504 errors.push(e); 505 } 506 } 507 } 508 } 509 return errors; 510 }; 511 512 513 },{"./../package.json":1,"./ast_linter.coffee":2,"./lexical_linter.coffee":5,"./line_linter.coffee":6,"./rules.coffee":7,"./rules/arrow_spacing.coffee":8,"./rules/camel_case_classes.coffee":9,"./rules/colon_assignment_spacing.coffee":10,"./rules/cyclomatic_complexity.coffee":11,"./rules/duplicate_key.coffee":12,"./rules/empty_constructor_needs_parens.coffee":13,"./rules/indentation.coffee":14,"./rules/line_endings.coffee":15,"./rules/max_line_length.coffee":16,"./rules/missing_fat_arrows.coffee":17,"./rules/newlines_after_classes.coffee":18,"./rules/no_backticks.coffee":19,"./rules/no_empty_param_list.coffee":20,"./rules/no_implicit_braces.coffee":21,"./rules/no_implicit_parens.coffee":22,"./rules/no_plusplus.coffee":23,"./rules/no_stand_alone_at.coffee":24,"./rules/no_tabs.coffee":25,"./rules/no_throwing_strings.coffee":26,"./rules/no_trailing_semicolons.coffee":27,"./rules/no_trailing_whitespace.coffee":28,"./rules/no_unnecessary_fat_arrows.coffee":29,"./rules/non_empty_constructor_needs_parens.coffee":30,"./rules/space_operators.coffee":31}],5:[function(_dereq_,module,exports){ 514 var BaseLinter, LexicalLinter, TokenApi, 515 __hasProp = {}.hasOwnProperty, 516 __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, 517 __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; 518 519 TokenApi = (function() { 520 function TokenApi(CoffeeScript, source, config, tokensByLine) { 521 this.config = config; 522 this.tokensByLine = tokensByLine; 523 this.tokens = CoffeeScript.tokens(source); 524 this.lines = source.split('\n'); 525 this.tokensByLine = {}; 526 } 527 528 TokenApi.prototype.i = 0; 529 530 TokenApi.prototype.peek = function(n) { 531 if (n == null) { 532 n = 1; 533 } 534 return this.tokens[this.i + n] || null; 535 }; 536 537 return TokenApi; 538 539 })(); 540 541 BaseLinter = _dereq_('./base_linter.coffee'); 542 543 module.exports = LexicalLinter = (function(_super) { 544 __extends(LexicalLinter, _super); 545 546 function LexicalLinter(source, config, rules, CoffeeScript) { 547 LexicalLinter.__super__.constructor.call(this, source, config, rules); 548 this.tokenApi = new TokenApi(CoffeeScript, source, this.config, this.tokensByLine); 549 this.tokensByLine = this.tokenApi.tokensByLine; 550 } 551 552 LexicalLinter.prototype.acceptRule = function(rule) { 553 return typeof rule.lintToken === 'function'; 554 }; 555 556 LexicalLinter.prototype.lint = function() { 557 var error, errors, i, token, _i, _j, _len, _len1, _ref, _ref1; 558 errors = []; 559 _ref = this.tokenApi.tokens; 560 for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { 561 token = _ref[i]; 562 this.tokenApi.i = i; 563 _ref1 = this.lintToken(token); 564 for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { 565 error = _ref1[_j]; 566 errors.push(error); 567 } 568 } 569 return errors; 570 }; 571 572 LexicalLinter.prototype.lintToken = function(token) { 573 var errors, lineNumber, rule, type, v, value, _base, _i, _len, _ref, _ref1; 574 type = token[0], value = token[1], lineNumber = token[2]; 575 if (typeof lineNumber === "object") { 576 if (type === 'OUTDENT' || type === 'INDENT') { 577 lineNumber = lineNumber.last_line; 578 } else { 579 lineNumber = lineNumber.first_line; 580 } 581 } 582 if ((_base = this.tokensByLine)[lineNumber] == null) { 583 _base[lineNumber] = []; 584 } 585 this.tokensByLine[lineNumber].push(token); 586 this.lineNumber = lineNumber || this.lineNumber || 0; 587 this.tokenApi.lineNumber = this.lineNumber; 588 errors = []; 589 _ref = this.rules; 590 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 591 rule = _ref[_i]; 592 if (!(_ref1 = token[0], __indexOf.call(rule.tokens, _ref1) >= 0)) { 593 continue; 594 } 595 v = this.normalizeResult(rule, rule.lintToken(token, this.tokenApi)); 596 if (v != null) { 597 errors.push(v); 598 } 599 } 600 return errors; 601 }; 602 603 LexicalLinter.prototype.createError = function(ruleName, attrs) { 176 604 if (attrs == null) { 177 605 attrs = {}; 178 606 } 179 level = attrs.level; 180 if (level !== IGNORE && level !== WARN && level !== ERROR) { 181 throw new Error("unknown level " + level); 182 } 183 if (level === ERROR || level === WARN) { 184 attrs.rule = rule; 185 return defaults(attrs, RULES[rule]); 607 attrs.lineNumber = this.lineNumber + 1; 608 attrs.line = this.tokenApi.lines[this.lineNumber]; 609 return LexicalLinter.__super__.createError.call(this, ruleName, attrs); 610 }; 611 612 return LexicalLinter; 613 614 })(BaseLinter); 615 616 617 },{"./base_linter.coffee":3}],6:[function(_dereq_,module,exports){ 618 var BaseLinter, LineApi, LineLinter, configStatement, 619 __hasProp = {}.hasOwnProperty, 620 __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; 621 622 LineApi = (function() { 623 function LineApi(source, config, tokensByLine, literate) { 624 this.config = config; 625 this.tokensByLine = tokensByLine; 626 this.literate = literate; 627 this.line = null; 628 this.lines = source.split('\n'); 629 this.lineCount = this.lines.length; 630 this.context = { 631 "class": { 632 inClass: false, 633 lastUnemptyLineInClass: null, 634 classIndents: null 635 } 636 }; 637 } 638 639 LineApi.prototype.lineNumber = 0; 640 641 LineApi.prototype.isLiterate = function() { 642 return this.literate; 643 }; 644 645 LineApi.prototype.maintainClassContext = function(line) { 646 if (this.context["class"].inClass) { 647 if (this.lineHasToken('INDENT')) { 648 this.context["class"].classIndents++; 649 } else if (this.lineHasToken('OUTDENT')) { 650 this.context["class"].classIndents--; 651 if (this.context["class"].classIndents === 0) { 652 this.context["class"].inClass = false; 653 this.context["class"].classIndents = null; 654 } 655 } 656 if (this.context["class"].inClass && !line.match(/^\s*$/)) { 657 this.context["class"].lastUnemptyLineInClass = this.lineNumber; 658 } 659 } else { 660 if (!line.match(/\\s*/)) { 661 this.context["class"].lastUnemptyLineInClass = null; 662 } 663 if (this.lineHasToken('CLASS')) { 664 this.context["class"].inClass = true; 665 this.context["class"].lastUnemptyLineInClass = this.lineNumber; 666 this.context["class"].classIndents = 0; 667 } 668 } 669 return null; 670 }; 671 672 LineApi.prototype.isLastLine = function() { 673 return this.lineNumber === this.lineCount - 1; 674 }; 675 676 LineApi.prototype.lineHasToken = function(tokenType, lineNumber) { 677 var token, tokens, _i, _len; 678 if (tokenType == null) { 679 tokenType = null; 680 } 681 if (lineNumber == null) { 682 lineNumber = null; 683 } 684 lineNumber = lineNumber != null ? lineNumber : this.lineNumber; 685 if (tokenType == null) { 686 return this.tokensByLine[lineNumber] != null; 687 } else { 688 tokens = this.tokensByLine[lineNumber]; 689 if (tokens == null) { 690 return null; 691 } 692 for (_i = 0, _len = tokens.length; _i < _len; _i++) { 693 token = tokens[_i]; 694 if (token[0] === tokenType) { 695 return true; 696 } 697 } 698 return false; 699 } 700 }; 701 702 LineApi.prototype.getLineTokens = function() { 703 return this.tokensByLine[this.lineNumber] || []; 704 }; 705 706 return LineApi; 707 708 })(); 709 710 BaseLinter = _dereq_('./base_linter.coffee'); 711 712 configStatement = /coffeelint:\s*(disable|enable)(?:=([\w\s,]*))?/; 713 714 module.exports = LineLinter = (function(_super) { 715 __extends(LineLinter, _super); 716 717 LineLinter.configStatement = configStatement; 718 719 function LineLinter(source, config, rules, tokensByLine, literate) { 720 if (literate == null) { 721 literate = false; 722 } 723 LineLinter.__super__.constructor.call(this, source, config, rules); 724 this.lineApi = new LineApi(source, config, tokensByLine, literate); 725 this.block_config = { 726 enable: {}, 727 disable: {} 728 }; 729 } 730 731 LineLinter.prototype.acceptRule = function(rule) { 732 return typeof rule.lintLine === 'function'; 733 }; 734 735 LineLinter.prototype.lint = function() { 736 var error, errors, line, lineNumber, _i, _j, _len, _len1, _ref, _ref1; 737 errors = []; 738 _ref = this.lineApi.lines; 739 for (lineNumber = _i = 0, _len = _ref.length; _i < _len; lineNumber = ++_i) { 740 line = _ref[lineNumber]; 741 this.lineApi.lineNumber = this.lineNumber = lineNumber; 742 this.lineApi.maintainClassContext(line); 743 this.collectInlineConfig(line); 744 _ref1 = this.lintLine(line); 745 for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { 746 error = _ref1[_j]; 747 errors.push(error); 748 } 749 } 750 return errors; 751 }; 752 753 LineLinter.prototype.lintLine = function(line) { 754 var errors, rule, v, _i, _len, _ref; 755 errors = []; 756 _ref = this.rules; 757 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 758 rule = _ref[_i]; 759 v = this.normalizeResult(rule, rule.lintLine(line, this.lineApi)); 760 if (v != null) { 761 errors.push(v); 762 } 763 } 764 return errors; 765 }; 766 767 LineLinter.prototype.collectInlineConfig = function(line) { 768 var cmd, r, result, rules, _i, _len, _ref; 769 result = configStatement.exec(line); 770 if (result != null) { 771 cmd = result[1]; 772 rules = []; 773 if (result[2] != null) { 774 _ref = result[2].split(','); 775 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 776 r = _ref[_i]; 777 rules.push(r.replace(/^\s+|\s+$/g, "")); 778 } 779 } 780 this.block_config[cmd][this.lineNumber] = rules; 781 } 782 return null; 783 }; 784 785 LineLinter.prototype.createError = function(rule, attrs) { 786 var _ref; 787 if (attrs == null) { 788 attrs = {}; 789 } 790 attrs.lineNumber = this.lineNumber + 1; 791 attrs.level = (_ref = this.config[rule]) != null ? _ref.level : void 0; 792 return LineLinter.__super__.createError.call(this, rule, attrs); 793 }; 794 795 return LineLinter; 796 797 })(BaseLinter); 798 799 800 },{"./base_linter.coffee":3}],7:[function(_dereq_,module,exports){ 801 var ERROR, IGNORE, WARN; 802 803 ERROR = 'error'; 804 805 WARN = 'warn'; 806 807 IGNORE = 'ignore'; 808 809 module.exports = { 810 coffeescript_error: { 811 level: ERROR, 812 message: '' 813 } 814 }; 815 816 817 },{}],8:[function(_dereq_,module,exports){ 818 var ArrowSpacing; 819 820 module.exports = ArrowSpacing = (function() { 821 function ArrowSpacing() {} 822 823 ArrowSpacing.prototype.rule = { 824 name: 'arrow_spacing', 825 level: 'ignore', 826 message: 'Function arrow (->) must be spaced properly', 827 description: "<p>This rule checks to see that there is spacing before and after\nthe arrow operator that declares a function. This rule is disabled\nby default.</p> <p>Note that if arrow_spacing is enabled, and you\npass an empty function as a parameter, arrow_spacing will accept\neither a space or no space in-between the arrow operator and the\nparenthesis</p>\n<pre><code># Both of this will not trigger an error,\n# even with arrow_spacing enabled.\nx(-> 3)\nx( -> 3)\n\n# However, this will trigger an error\nx((a,b)-> 3)\n</code>\n</pre>" 828 }; 829 830 ArrowSpacing.prototype.tokens = ['->']; 831 832 ArrowSpacing.prototype.lintToken = function(token, tokenApi) { 833 var pp; 834 pp = tokenApi.peek(-1); 835 if (!(((token.spaced != null) || (token.newLine != null) || this.atEof(tokenApi)) && (((pp.spaced != null) || pp[0] === 'TERMINATOR') || (pp.generated != null) || pp[0] === "INDENT" || (pp[1] === "(" && (pp.generated == null))))) { 836 return true; 186 837 } else { 187 838 return null; … … 189 840 }; 190 841 191 block_config = { 192 enable: {}, 193 disable: {} 194 }; 195 196 LineLinter = (function() { 197 function LineLinter(source, config, tokensByLine) { 198 this.source = source; 199 this.config = config; 200 this.line = null; 201 this.lineNumber = 0; 202 this.tokensByLine = tokensByLine; 203 this.lines = this.source.split('\n'); 204 this.lineCount = this.lines.length; 205 this.context = { 206 "class": { 207 inClass: false, 208 lastUnemptyLineInClass: null, 209 classIndents: null 210 } 842 ArrowSpacing.prototype.atEof = function(tokenApi) { 843 var i, token, tokens, _i, _len, _ref, _ref1; 844 tokens = tokenApi.tokens, i = tokenApi.i; 845 _ref = tokens.slice(i + 1); 846 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 847 token = _ref[_i]; 848 if (!(token.generated || ((_ref1 = token[0]) === 'OUTDENT' || _ref1 === 'TERMINATOR'))) { 849 return false; 850 } 851 } 852 return true; 853 }; 854 855 return ArrowSpacing; 856 857 })(); 858 859 860 },{}],9:[function(_dereq_,module,exports){ 861 var CamelCaseClasses, regexes; 862 863 regexes = { 864 camelCase: /^[A-Z][a-zA-Z\d]*$/ 865 }; 866 867 module.exports = CamelCaseClasses = (function() { 868 function CamelCaseClasses() {} 869 870 CamelCaseClasses.prototype.rule = { 871 name: 'camel_case_classes', 872 level: 'error', 873 message: 'Class names should be camel cased', 874 description: "This rule mandates that all class names are CamelCased. Camel\ncasing class names is a generally accepted way of distinguishing\nconstructor functions - which require the 'new' prefix to behave\nproperly - from plain old functions.\n<pre>\n<code># Good!\nclass BoaConstrictor\n\n# Bad!\nclass boaConstrictor\n</code>\n</pre>\nThis rule is enabled by default." 875 }; 876 877 CamelCaseClasses.prototype.tokens = ['CLASS']; 878 879 CamelCaseClasses.prototype.lintToken = function(token, tokenApi) { 880 var className, offset, _ref, _ref1, _ref2; 881 if ((token.newLine != null) || ((_ref = tokenApi.peek()[0]) === 'INDENT' || _ref === 'EXTENDS')) { 882 return null; 883 } 884 className = null; 885 offset = 1; 886 while (!className) { 887 if (((_ref1 = tokenApi.peek(offset + 1)) != null ? _ref1[0] : void 0) === '.') { 888 offset += 2; 889 } else if (((_ref2 = tokenApi.peek(offset)) != null ? _ref2[0] : void 0) === '@') { 890 offset += 1; 891 } else { 892 className = tokenApi.peek(offset)[1]; 893 } 894 } 895 if (!regexes.camelCase.test(className)) { 896 return { 897 context: "class name: " + className 211 898 }; 212 899 } 213 214 LineLinter.prototype.lint = function() { 215 var error, errors, line, lineNumber, _i, _len, _ref; 216 217 errors = []; 218 _ref = this.lines; 219 for (lineNumber = _i = 0, _len = _ref.length; _i < _len; lineNumber = ++_i) { 220 line = _ref[lineNumber]; 221 this.lineNumber = lineNumber; 222 this.line = line; 223 this.maintainClassContext(); 224 error = this.lintLine(); 225 if (error) { 226 errors.push(error); 227 } 228 } 229 return errors; 900 }; 901 902 return CamelCaseClasses; 903 904 })(); 905 906 907 },{}],10:[function(_dereq_,module,exports){ 908 var ColonAssignmentSpacing; 909 910 module.exports = ColonAssignmentSpacing = (function() { 911 function ColonAssignmentSpacing() {} 912 913 ColonAssignmentSpacing.prototype.rule = { 914 name: 'colon_assignment_spacing', 915 level: 'ignore', 916 message: 'Colon assignment without proper spacing', 917 spacing: { 918 left: 0, 919 right: 0 920 }, 921 description: "<p>This rule checks to see that there is spacing before and\nafter the colon in a colon assignment (i.e., classes, objects).\nThe spacing amount is specified by\nspacing.left and spacing.right, respectively.\nA zero value means no spacing required.\n</p>\n<pre><code>\n#\n# If spacing.left and spacing.right is 1\n#\n\n# Good\nobject = {spacing : true}\nclass Dog\n canBark : true\n\n# Bad\nobject = {spacing: true}\nclass Cat\n canBark: false\n</code></pre>" 922 }; 923 924 ColonAssignmentSpacing.prototype.tokens = [':']; 925 926 ColonAssignmentSpacing.prototype.lintToken = function(token, tokenApi) { 927 var checkSpacing, getSpaceFromToken, isLeftSpaced, isRightSpaced, leftSpacing, nextToken, previousToken, rightSpacing, spacingAllowances, _ref, _ref1; 928 spacingAllowances = tokenApi.config[this.rule.name].spacing; 929 previousToken = tokenApi.peek(-1); 930 nextToken = tokenApi.peek(1); 931 getSpaceFromToken = function(direction) { 932 switch (direction) { 933 case 'left': 934 return token[2].first_column - previousToken[2].last_column - 1; 935 case 'right': 936 return nextToken[2].first_column - token[2].first_column - 1; 937 } 230 938 }; 231 232 LineLinter.prototype.lintLine = function() { 233 return this.checkTabs() || this.checkTrailingWhitespace() || this.checkLineLength() || this.checkTrailingSemicolon() || this.checkLineEndings() || this.checkComments() || this.checkNewlinesAfterClasses(); 939 checkSpacing = function(direction) { 940 var isSpaced, spacing; 941 spacing = getSpaceFromToken(direction); 942 isSpaced = spacing < 0 ? true : spacing === parseInt(spacingAllowances[direction]); 943 return [isSpaced, spacing]; 234 944 }; 235 236 LineLinter.prototype.checkTabs = function() { 237 var indentation; 238 239 indentation = this.line.split(regexes.indentation)[0]; 240 if (this.lineHasToken() && __indexOf.call(indentation, '\t') >= 0) { 241 return this.createLineError('no_tabs'); 242 } else { 243 return null; 244 } 245 }; 246 247 LineLinter.prototype.checkTrailingWhitespace = function() { 248 var line, str, token, tokens, _i, _len, _ref, _ref1; 249 250 if (regexes.trailingWhitespace.test(this.line)) { 251 if (!((_ref = this.config['no_trailing_whitespace']) != null ? _ref.allowed_in_comments : void 0)) { 252 return this.createLineError('no_trailing_whitespace'); 253 } 254 line = this.line; 255 tokens = this.tokensByLine[this.lineNumber]; 256 if (!tokens) { 257 return null; 258 } 259 _ref1 = (function() { 260 var _j, _len, _results; 261 262 _results = []; 263 for (_j = 0, _len = tokens.length; _j < _len; _j++) { 264 token = tokens[_j]; 265 if (token[0] === 'STRING') { 266 _results.push(token[1]); 267 } 268 } 269 return _results; 270 })(); 271 for (_i = 0, _len = _ref1.length; _i < _len; _i++) { 272 str = _ref1[_i]; 273 line = line.replace(str, 'STRING'); 274 } 275 if (!regexes.lineHasComment.test(line)) { 276 return this.createLineError('no_trailing_whitespace'); 277 } else { 278 return null; 279 } 280 } else { 281 return null; 282 } 283 }; 284 285 LineLinter.prototype.checkLineLength = function() { 286 var attrs, max, rule, _ref; 287 288 rule = 'max_line_length'; 289 max = (_ref = this.config[rule]) != null ? _ref.value : void 0; 290 if (max && max < this.line.length && !regexes.longUrlComment.test(this.line)) { 291 attrs = { 292 context: "Length is " + this.line.length + ", max is " + max 293 }; 294 return this.createLineError(rule, attrs); 295 } else { 296 return null; 297 } 298 }; 299 300 LineLinter.prototype.checkTrailingSemicolon = function() { 301 var first, hasNewLine, hasSemicolon, last, _i, _ref; 302 303 hasSemicolon = regexes.trailingSemicolon.test(this.line); 304 _ref = this.getLineTokens(), first = 2 <= _ref.length ? __slice.call(_ref, 0, _i = _ref.length - 1) : (_i = 0, []), last = _ref[_i++]; 305 hasNewLine = last && (last.newLine != null); 306 if (hasSemicolon && !hasNewLine && this.lineHasToken()) { 307 return this.createLineError('no_trailing_semicolons'); 308 } else { 309 return null; 310 } 311 }; 312 313 LineLinter.prototype.checkLineEndings = function() { 314 var ending, lastChar, rule, valid, _ref; 315 316 rule = 'line_endings'; 317 ending = (_ref = this.config[rule]) != null ? _ref.value : void 0; 318 if (!ending || this.isLastLine() || !this.line) { 319 return null; 320 } 321 lastChar = this.line[this.line.length - 1]; 322 valid = (function() { 323 if (ending === 'windows') { 324 return lastChar === '\r'; 325 } else if (ending === 'unix') { 326 return lastChar !== '\r'; 327 } else { 328 throw new Error("unknown line ending type: " + ending); 329 } 330 })(); 331 if (!valid) { 332 return this.createLineError(rule, { 333 context: "Expected " + ending 334 }); 335 } else { 336 return null; 337 } 338 }; 339 340 LineLinter.prototype.checkComments = function() { 341 var cmd, r, result, rules, _i, _len, _ref; 342 343 result = regexes.configStatement.exec(this.line); 344 if (result != null) { 345 cmd = result[1]; 346 rules = []; 347 if (result[2] != null) { 348 _ref = result[2].split(','); 349 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 350 r = _ref[_i]; 351 rules.push(r.replace(/^\s+|\s+$/g, "")); 352 } 353 } 354 block_config[cmd][this.lineNumber] = rules; 355 } 945 _ref = checkSpacing('left'), isLeftSpaced = _ref[0], leftSpacing = _ref[1]; 946 _ref1 = checkSpacing('right'), isRightSpaced = _ref1[0], rightSpacing = _ref1[1]; 947 if (isLeftSpaced && isRightSpaced) { 356 948 return null; 357 }; 358 359 LineLinter.prototype.checkNewlinesAfterClasses = function() { 360 var ending, got, rule; 361 362 rule = 'newlines_after_classes'; 363 ending = this.config[rule].value; 364 if (!ending || this.isLastLine()) { 365 return null; 366 } 367 if (!this.context["class"].inClass && (this.context["class"].lastUnemptyLineInClass != null) && ((this.lineNumber - 1) - this.context["class"].lastUnemptyLineInClass) !== ending) { 368 got = (this.lineNumber - 1) - this.context["class"].lastUnemptyLineInClass; 369 return this.createLineError(rule, { 370 context: "Expected " + ending + " got " + got 371 }); 372 } 373 return null; 374 }; 375 376 LineLinter.prototype.createLineError = function(rule, attrs) { 377 var _ref; 378 379 if (attrs == null) { 380 attrs = {}; 381 } 382 attrs.lineNumber = this.lineNumber + 1; 383 attrs.level = (_ref = this.config[rule]) != null ? _ref.level : void 0; 384 return createError(rule, attrs); 385 }; 386 387 LineLinter.prototype.isLastLine = function() { 388 return this.lineNumber === this.lineCount - 1; 389 }; 390 391 LineLinter.prototype.lineHasToken = function(tokenType, lineNumber) { 392 var token, tokens, _i, _len; 393 394 if (tokenType == null) { 395 tokenType = null; 396 } 397 if (lineNumber == null) { 398 lineNumber = null; 399 } 400 lineNumber = lineNumber != null ? lineNumber : this.lineNumber; 401 if (tokenType == null) { 402 return this.tokensByLine[lineNumber] != null; 403 } else { 404 tokens = this.tokensByLine[lineNumber]; 405 if (tokens == null) { 406 return null; 407 } 408 for (_i = 0, _len = tokens.length; _i < _len; _i++) { 409 token = tokens[_i]; 410 if (token[0] === tokenType) { 411 return true; 412 } 413 } 414 return false; 415 } 416 }; 417 418 LineLinter.prototype.getLineTokens = function() { 419 return this.tokensByLine[this.lineNumber] || []; 420 }; 421 422 LineLinter.prototype.maintainClassContext = function() { 423 if (this.context["class"].inClass) { 424 if (this.lineHasToken('INDENT')) { 425 this.context["class"].classIndents++; 426 } else if (this.lineHasToken('OUTDENT')) { 427 this.context["class"].classIndents--; 428 if (this.context["class"].classIndents === 0) { 429 this.context["class"].inClass = false; 430 this.context["class"].classIndents = null; 431 } 432 } 433 if (this.context["class"].inClass && !this.line.match(/^\s*$/)) { 434 this.context["class"].lastUnemptyLineInClass = this.lineNumber; 435 } 436 } else { 437 if (!this.line.match(/\\s*/)) { 438 this.context["class"].lastUnemptyLineInClass = null; 439 } 440 if (this.lineHasToken('CLASS')) { 441 this.context["class"].inClass = true; 442 this.context["class"].lastUnemptyLineInClass = this.lineNumber; 443 this.context["class"].classIndents = 0; 444 } 445 } 446 return null; 447 }; 448 449 return LineLinter; 450 451 })(); 452 453 LexicalLinter = (function() { 454 function LexicalLinter(source, config) { 455 this.source = source; 456 this.tokens = CoffeeScript.tokens(source); 457 this.config = config; 458 this.i = 0; 459 this.tokensByLine = {}; 460 this.arrayTokens = []; 461 this.parenTokens = []; 462 this.callTokens = []; 463 this.lines = source.split('\n'); 464 this.braceScopes = []; 465 } 466 467 LexicalLinter.prototype.lint = function() { 468 var error, errors, i, token, _i, _len, _ref; 469 470 errors = []; 471 _ref = this.tokens; 472 for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { 473 token = _ref[i]; 474 this.i = i; 475 error = this.lintToken(token); 476 if (error) { 477 errors.push(error); 478 } 479 } 480 return errors; 481 }; 482 483 LexicalLinter.prototype.lintToken = function(token) { 484 var lineNumber, type, value, _base, _ref; 485 486 type = token[0], value = token[1], lineNumber = token[2]; 487 if (typeof lineNumber === "object") { 488 if (type === 'OUTDENT' || type === 'INDENT') { 489 lineNumber = lineNumber.last_line; 490 } else { 491 lineNumber = lineNumber.first_line; 492 } 493 } 494 if ((_ref = (_base = this.tokensByLine)[lineNumber]) == null) { 495 _base[lineNumber] = []; 496 } 497 this.tokensByLine[lineNumber].push(token); 498 this.lineNumber = lineNumber || this.lineNumber || 0; 499 switch (type) { 500 case "->": 501 return this.lintArrowSpacing(token); 502 case "INDENT": 503 return this.lintIndentation(token); 504 case "CLASS": 505 return this.lintClass(token); 506 case "UNARY": 507 return this.lintUnary(token); 508 case "{": 509 case "}": 510 return this.lintBrace(token); 511 case "IDENTIFIER": 512 return this.lintIdentifier(token); 513 case "++": 514 case "--": 515 return this.lintIncrement(token); 516 case "THROW": 517 return this.lintThrow(token); 518 case "[": 519 case "]": 520 return this.lintArray(token); 521 case "(": 522 case ")": 523 return this.lintParens(token); 524 case "JS": 525 return this.lintJavascript(token); 526 case "CALL_START": 527 case "CALL_END": 528 return this.lintCall(token); 529 case "PARAM_START": 530 return this.lintParam(token); 531 case "@": 532 return this.lintStandaloneAt(token); 533 case "+": 534 case "-": 535 return this.lintPlus(token); 536 case "=": 537 case "MATH": 538 case "COMPARE": 539 case "LOGIC": 540 case "COMPOUND_ASSIGN": 541 return this.lintMath(token); 542 default: 543 return null; 544 } 545 }; 546 547 LexicalLinter.prototype.lintUnary = function(token) { 548 var expectedCallStart, expectedIdentifier, identifierIndex; 549 550 if (token[1] === 'new') { 551 identifierIndex = 1; 552 while (true) { 553 expectedIdentifier = this.peek(identifierIndex); 554 expectedCallStart = this.peek(identifierIndex + 1); 555 if ((expectedIdentifier != null ? expectedIdentifier[0] : void 0) === 'IDENTIFIER') { 556 if ((expectedCallStart != null ? expectedCallStart[0] : void 0) === '.') { 557 identifierIndex += 2; 558 continue; 559 } 560 } 561 break; 562 } 563 if ((expectedIdentifier != null ? expectedIdentifier[0] : void 0) === 'IDENTIFIER' && (expectedCallStart != null)) { 564 if (expectedCallStart[0] === 'CALL_START') { 565 if (expectedCallStart.generated) { 566 return this.createLexError('non_empty_constructor_needs_parens'); 567 } 568 } else { 569 return this.createLexError('empty_constructor_needs_parens'); 570 } 571 } 572 } 573 }; 574 575 LexicalLinter.prototype.lintArray = function(token) { 576 if (token[0] === '[') { 577 this.arrayTokens.push(token); 578 } else if (token[0] === ']') { 579 this.arrayTokens.pop(); 580 } 581 return null; 582 }; 583 584 LexicalLinter.prototype.lintParens = function(token) { 585 var i, n1, n2, p1; 586 587 if (token[0] === '(') { 588 p1 = this.peek(-1); 589 n1 = this.peek(1); 590 n2 = this.peek(2); 591 i = n1 && n2 && n1[0] === 'STRING' && n2[0] === '+'; 592 token.isInterpolation = i; 593 this.parenTokens.push(token); 594 } else { 595 this.parenTokens.pop(); 596 } 597 return null; 598 }; 599 600 LexicalLinter.prototype.isInInterpolation = function() { 601 var t, _i, _len, _ref; 602 603 _ref = this.parenTokens; 604 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 605 t = _ref[_i]; 606 if (t.isInterpolation) { 607 return true; 608 } 609 } 610 return false; 611 }; 612 613 LexicalLinter.prototype.isInExtendedRegex = function() { 614 var t, _i, _len, _ref; 615 616 _ref = this.callTokens; 617 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 618 t = _ref[_i]; 619 if (t.isRegex) { 620 return true; 621 } 622 } 623 return false; 624 }; 625 626 LexicalLinter.prototype.lintPlus = function(token) { 627 var isUnary, p, unaries, _ref; 628 629 if (this.isInInterpolation() || this.isInExtendedRegex()) { 630 return null; 631 } 632 p = this.peek(-1); 633 unaries = ['TERMINATOR', '(', '=', '-', '+', ',', 'CALL_START', 'INDEX_START', '..', '...', 'COMPARE', 'IF', 'THROW', 'LOGIC', 'POST_IF', ':', '[', 'INDENT', 'COMPOUND_ASSIGN', 'RETURN', 'MATH']; 634 isUnary = !p ? false : (_ref = p[0], __indexOf.call(unaries, _ref) >= 0); 635 if ((isUnary && token.spaced) || (!isUnary && !token.spaced && !token.newLine)) { 636 return this.createLexError('space_operators', { 637 context: token[1] 638 }); 639 } else { 640 return null; 641 } 642 }; 643 644 LexicalLinter.prototype.lintMath = function(token) { 645 if (!token.spaced && !token.newLine) { 646 return this.createLexError('space_operators', { 647 context: token[1] 648 }); 649 } else { 650 return null; 651 } 652 }; 653 654 LexicalLinter.prototype.lintCall = function(token) { 655 var p; 656 657 if (token[0] === 'CALL_START') { 658 p = this.peek(-1); 659 token.isRegex = p && p[0] === 'IDENTIFIER' && p[1] === 'RegExp'; 660 this.callTokens.push(token); 661 if (token.generated) { 662 return this.createLexError('no_implicit_parens'); 663 } else { 664 return null; 665 } 666 } else { 667 this.callTokens.pop(); 668 return null; 669 } 670 }; 671 672 LexicalLinter.prototype.lintParam = function(token) { 673 var nextType; 674 675 nextType = this.peek()[0]; 676 if (nextType === 'PARAM_END') { 677 return this.createLexError('no_empty_param_list'); 678 } else { 679 return null; 680 } 681 }; 682 683 LexicalLinter.prototype.lintIdentifier = function(token) { 684 var key, nextToken, previousToken; 685 686 key = token[1]; 687 if (this.currentScope == null) { 688 return null; 689 } 690 nextToken = this.peek(1); 691 if (nextToken[1] !== ':') { 692 return null; 693 } 694 previousToken = this.peek(-1); 695 if (previousToken[0] === '@') { 696 key = "@" + key; 697 } 698 key = "identifier-" + key; 699 if (this.currentScope[key]) { 700 return this.createLexError('duplicate_key'); 701 } else { 702 this.currentScope[key] = token; 703 return null; 704 } 705 }; 706 707 LexicalLinter.prototype.lintBrace = function(token) { 708 var i, t; 709 710 if (token[0] === '{') { 711 if (this.currentScope != null) { 712 this.braceScopes.push(this.currentScope); 713 } 714 this.currentScope = {}; 715 } else { 716 this.currentScope = this.braceScopes.pop(); 717 } 718 if (token.generated && token[0] === '{') { 719 i = -1; 720 while (true) { 721 t = this.peek(i); 722 if ((t == null) || t[0] === 'TERMINATOR') { 723 return this.createLexError('no_implicit_braces'); 724 } 725 if (t[0] === 'CLASS') { 726 return null; 727 } 728 i -= 1; 729 } 730 } else { 731 return null; 732 } 733 }; 734 735 LexicalLinter.prototype.lintJavascript = function(token) { 736 return this.createLexError('no_backticks'); 737 }; 738 739 LexicalLinter.prototype.lintThrow = function(token) { 740 var n1, n2, nextIsString, _ref; 741 742 _ref = [this.peek(), this.peek(2)], n1 = _ref[0], n2 = _ref[1]; 743 nextIsString = n1[0] === 'STRING' || (n1[0] === '(' && n2[0] === 'STRING'); 744 if (nextIsString) { 745 return this.createLexError('no_throwing_strings'); 746 } 747 }; 748 749 LexicalLinter.prototype.lintIncrement = function(token) { 750 var attrs; 751 752 attrs = { 753 context: "found '" + token[0] + "'" 949 } else { 950 return { 951 context: "Incorrect spacing around column " + token[2].first_column + ".\nExpected left: " + spacingAllowances.left + ", right: " + spacingAllowances.right + ".\nGot left: " + leftSpacing + ", right: " + rightSpacing + "." 754 952 }; 755 return this.createLexError('no_plusplus', attrs); 756 }; 757 758 LexicalLinter.prototype.lintStandaloneAt = function(token) { 759 var isDot, isIdentifier, isIndexStart, isValidProtoProperty, nextToken, protoProperty, spaced; 760 761 nextToken = this.peek(); 762 spaced = token.spaced; 763 isIdentifier = nextToken[0] === 'IDENTIFIER'; 764 isIndexStart = nextToken[0] === 'INDEX_START'; 765 isDot = nextToken[0] === '.'; 766 if (nextToken[0] === '::') { 767 protoProperty = this.peek(2); 768 isValidProtoProperty = protoProperty[0] === 'IDENTIFIER'; 769 } 770 if (spaced || (!isIdentifier && !isIndexStart && !isDot && !isValidProtoProperty)) { 771 return this.createLexError('no_stand_alone_at'); 772 } 773 }; 774 775 LexicalLinter.prototype.lintIndentation = function(token) { 776 var context, currentLine, expected, ignoreIndent, isArrayIndent, isInterpIndent, isMultiline, lineNumber, numIndents, prevNum, previous, previousIndentation, previousLine, previousSymbol, type, _ref; 777 778 type = token[0], numIndents = token[1], lineNumber = token[2]; 779 if (token.generated != null) { 780 return null; 781 } 782 previous = this.peek(-2); 783 isInterpIndent = previous && previous[0] === '+'; 784 previous = this.peek(-1); 785 isArrayIndent = this.inArray() && (previous != null ? previous.newLine : void 0); 786 previousSymbol = (_ref = this.peek(-1)) != null ? _ref[0] : void 0; 787 isMultiline = previousSymbol === '=' || previousSymbol === ','; 788 ignoreIndent = isInterpIndent || isArrayIndent || isMultiline; 789 if (this.isChainedCall()) { 790 currentLine = this.lines[this.lineNumber]; 791 prevNum = 1; 792 while (/^\s*(#|$)/.test(this.lines[this.lineNumber - prevNum])) { 793 prevNum += 1; 794 } 795 previousLine = this.lines[this.lineNumber - prevNum]; 796 previousIndentation = previousLine.match(/^(\s*)/)[1].length; 797 numIndents = currentLine.match(/^(\s*)/)[1].length; 798 numIndents -= previousIndentation; 799 } 800 expected = this.config['indentation'].value; 801 if (!ignoreIndent && numIndents !== expected) { 802 context = ("Expected " + expected + " ") + ("got " + numIndents); 803 return this.createLexError('indentation', { 804 context: context 805 }); 806 } else { 807 return null; 808 } 809 }; 810 811 LexicalLinter.prototype.lintClass = function(token) { 812 var attrs, className, offset, _ref, _ref1, _ref2; 813 814 if ((token.newLine != null) || ((_ref = this.peek()[0]) === 'INDENT' || _ref === 'EXTENDS')) { 815 return null; 816 } 817 className = null; 818 offset = 1; 819 while (!className) { 820 if (((_ref1 = this.peek(offset + 1)) != null ? _ref1[0] : void 0) === '.') { 821 offset += 2; 822 } else if (((_ref2 = this.peek(offset)) != null ? _ref2[0] : void 0) === '@') { 823 offset += 1; 824 } else { 825 className = this.peek(offset)[1]; 826 } 827 } 828 if (!regexes.camelCase.test(className)) { 829 attrs = { 830 context: "class name: " + className 831 }; 832 return this.createLexError('camel_case_classes', attrs); 833 } else { 834 return null; 835 } 836 }; 837 838 LexicalLinter.prototype.lintArrowSpacing = function(token) { 839 var pp; 840 841 pp = this.peek(-1); 842 if (!(((token.spaced != null) || (token.newLine != null) || this.atEof()) && (((pp.spaced != null) || pp[0] === 'TERMINATOR') || (pp.generated != null) || pp[0] === "INDENT" || (pp[1] === "(" && (pp.generated == null))))) { 843 return this.createLexError('arrow_spacing'); 844 } else { 845 return null; 846 } 847 }; 848 849 LexicalLinter.prototype.createLexError = function(rule, attrs) { 850 if (attrs == null) { 851 attrs = {}; 852 } 853 attrs.lineNumber = this.lineNumber + 1; 854 attrs.level = this.config[rule].level; 855 attrs.line = this.lines[this.lineNumber]; 856 return createError(rule, attrs); 857 }; 858 859 LexicalLinter.prototype.peek = function(n) { 860 if (n == null) { 861 n = 1; 862 } 863 return this.tokens[this.i + n] || null; 864 }; 865 866 LexicalLinter.prototype.inArray = function() { 867 return this.arrayTokens.length > 0; 868 }; 869 870 LexicalLinter.prototype.atEof = function() { 871 var token, _i, _len, _ref, _ref1; 872 873 _ref = this.tokens.slice(this.i + 1); 874 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 875 token = _ref[_i]; 876 if (!(token.generated || ((_ref1 = token[0]) === 'OUTDENT' || _ref1 === 'TERMINATOR'))) { 877 return false; 878 } 879 } 880 return true; 881 }; 882 883 LexicalLinter.prototype.isChainedCall = function() { 884 var i, lastNewLineIndex, lines, t, token, tokens; 885 886 lines = (function() { 887 var _i, _len, _ref, _results; 888 889 _ref = this.tokens.slice(0, +this.i + 1 || 9e9); 890 _results = []; 891 for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { 892 token = _ref[i]; 893 if (token.newLine != null) { 894 _results.push(i); 895 } 896 } 897 return _results; 898 }).call(this); 899 lastNewLineIndex = lines ? lines[lines.length - 2] : null; 900 if (lastNewLineIndex == null) { 901 return false; 902 } 903 tokens = [this.tokens[lastNewLineIndex], this.tokens[lastNewLineIndex + 1]]; 904 return !!((function() { 905 var _i, _len, _results; 906 907 _results = []; 908 for (_i = 0, _len = tokens.length; _i < _len; _i++) { 909 t = tokens[_i]; 910 if (t && t[0] === '.') { 911 _results.push(t); 912 } 913 } 914 return _results; 915 })()).length; 916 }; 917 918 return LexicalLinter; 919 920 })(); 921 922 ASTLinter = (function() { 923 function ASTLinter(source, config) { 924 this.source = source; 925 this.config = config; 926 this.errors = []; 927 } 928 929 ASTLinter.prototype.lint = function() { 930 var coffeeError; 931 932 try { 933 this.node = CoffeeScript.nodes(this.source); 934 } catch (_error) { 935 coffeeError = _error; 936 this.errors.push(this._parseCoffeeScriptError(coffeeError)); 937 return this.errors; 938 } 939 this.lintNode(this.node); 940 return this.errors; 941 }; 942 943 ASTLinter.prototype.getComplexity = function(node) { 944 var complexity, name, _ref; 945 946 name = node.constructor.name; 947 complexity = name === 'If' || name === 'While' || name === 'For' || name === 'Try' ? 1 : name === 'Op' && ((_ref = node.operator) === '&&' || _ref === '||') ? 1 : name === 'Switch' ? node.cases.length : 0; 948 return complexity; 949 }; 950 951 ASTLinter.prototype.lintNode = function(node, line) { 952 var attrs, complexity, error, name, rule, 953 _this = this; 954 955 name = node.constructor.name; 956 complexity = this.getComplexity(node); 957 node.eachChild(function(childNode) { 953 } 954 }; 955 956 return ColonAssignmentSpacing; 957 958 })(); 959 960 961 },{}],11:[function(_dereq_,module,exports){ 962 var NoTabs; 963 964 module.exports = NoTabs = (function() { 965 function NoTabs() {} 966 967 NoTabs.prototype.rule = { 968 name: 'cyclomatic_complexity', 969 value: 10, 970 level: 'ignore', 971 message: 'The cyclomatic complexity is too damn high', 972 description: 'Examine the complexity of your application.' 973 }; 974 975 NoTabs.prototype.getComplexity = function(node) { 976 var complexity, name, _ref; 977 name = node.constructor.name; 978 complexity = name === 'If' || name === 'While' || name === 'For' || name === 'Try' ? 1 : name === 'Op' && ((_ref = node.operator) === '&&' || _ref === '||') ? 1 : name === 'Switch' ? node.cases.length : 0; 979 return complexity; 980 }; 981 982 NoTabs.prototype.lintAST = function(node, astApi) { 983 this.astApi = astApi; 984 this.lintNode(node); 985 return void 0; 986 }; 987 988 NoTabs.prototype.lintNode = function(node, line) { 989 var complexity, error, name, rule; 990 name = node.constructor.name; 991 complexity = this.getComplexity(node); 992 node.eachChild((function(_this) { 993 return function(childNode) { 958 994 var nodeLine; 959 960 995 nodeLine = childNode.locationData.first_line; 961 996 if (childNode) { 962 997 return complexity += _this.lintNode(childNode, nodeLine); 963 998 } 999 }; 1000 })(this)); 1001 rule = this.astApi.config[this.rule.name]; 1002 if (name === 'Code' && complexity >= rule.value) { 1003 error = this.astApi.createError({ 1004 context: complexity + 1, 1005 lineNumber: line + 1, 1006 lineNumberEnd: node.locationData.last_line + 1 964 1007 }); 965 rule = this.config.cyclomatic_complexity; 966 if (name === 'Code' && complexity >= rule.value) { 967 attrs = { 968 context: complexity + 1, 969 level: rule.level, 970 lineNumber: line + 1, 971 lineNumberEnd: node.locationData.last_line + 1 972 }; 973 error = createError('cyclomatic_complexity', attrs); 974 if (error) { 975 this.errors.push(error); 976 } 977 } 978 return complexity; 979 }; 980 981 ASTLinter.prototype._parseCoffeeScriptError = function(coffeeError) { 982 var attrs, lineNumber, match, message, rule; 983 984 rule = RULES['coffeescript_error']; 985 message = coffeeError.toString(); 986 lineNumber = -1; 987 if (coffeeError.location != null) { 988 lineNumber = coffeeError.location.first_line + 1; 989 } else { 990 match = /line (\d+)/.exec(message); 991 if ((match != null ? match.length : void 0) > 1) { 992 lineNumber = parseInt(match[1], 10); 993 } 994 } 995 attrs = { 996 message: message, 997 level: rule.level, 998 lineNumber: lineNumber 999 }; 1000 return createError('coffeescript_error', attrs); 1001 }; 1002 1003 return ASTLinter; 1004 1005 })(); 1006 1007 mergeDefaultConfig = function(userConfig) { 1008 var config, rule, ruleConfig; 1009 1010 config = {}; 1011 for (rule in RULES) { 1012 ruleConfig = RULES[rule]; 1013 config[rule] = defaults(userConfig[rule], ruleConfig); 1014 } 1015 return config; 1016 }; 1017 1018 coffeelint.invertLiterate = function(source) { 1019 var line, newSource, _i, _len, _ref; 1020 1021 source = CoffeeScript.helpers.invertLiterate(source); 1022 newSource = ""; 1023 _ref = source.split("\n"); 1024 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 1025 line = _ref[_i]; 1026 if (line.match(/^#/)) { 1027 line = line.replace(/\s*$/, ''); 1028 } 1029 line = line.replace(/^\s{4}/g, ''); 1030 newSource += "" + line + "\n"; 1031 } 1032 return newSource; 1033 }; 1034 1035 coffeelint.lint = function(source, userConfig, literate) { 1036 var all_errors, astErrors, cmd, config, difference, disabled, disabled_initially, e, errors, i, l, lexErrors, lexicalLinter, lineErrors, lineLinter, next_line, r, rules, s, tokensByLine, _i, _j, _k, _len, _len1, _ref, _ref1, _ref2, _ref3, _ref4; 1037 1038 if (userConfig == null) { 1039 userConfig = {}; 1040 } 1041 if (literate == null) { 1042 literate = false; 1043 } 1044 if (literate) { 1045 source = this.invertLiterate(source); 1046 } 1047 config = mergeDefaultConfig(userConfig); 1048 disabled_initially = []; 1049 _ref = source.split('\n'); 1050 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 1051 l = _ref[_i]; 1052 s = regexes.configStatement.exec(l); 1053 if ((s != null ? s.length : void 0) > 2 && __indexOf.call(s, 'enable') >= 0) { 1054 _ref1 = s.slice(1); 1055 for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { 1056 r = _ref1[_j]; 1057 if (r !== 'enable' && r !== 'disable') { 1058 if (!(r in config && ((_ref2 = config[r].level) === 'warn' || _ref2 === 'error'))) { 1059 disabled_initially.push(r); 1060 config[r] = { 1061 level: 'error' 1062 }; 1063 } 1008 if (error) { 1009 this.errors.push(error); 1010 } 1011 } 1012 return complexity; 1013 }; 1014 1015 return NoTabs; 1016 1017 })(); 1018 1019 1020 },{}],12:[function(_dereq_,module,exports){ 1021 var DuplicateKey; 1022 1023 module.exports = DuplicateKey = (function() { 1024 DuplicateKey.prototype.rule = { 1025 name: 'duplicate_key', 1026 level: 'error', 1027 message: 'Duplicate key defined in object or class', 1028 description: "Prevents defining duplicate keys in object literals and classes" 1029 }; 1030 1031 DuplicateKey.prototype.tokens = ['IDENTIFIER', "{", "}"]; 1032 1033 function DuplicateKey() { 1034 this.braceScopes = []; 1035 } 1036 1037 DuplicateKey.prototype.lintToken = function(_arg, tokenApi) { 1038 var type; 1039 type = _arg[0]; 1040 if (type === "{" || type === "}") { 1041 this.lintBrace.apply(this, arguments); 1042 return void 0; 1043 } 1044 if (type === "IDENTIFIER") { 1045 return this.lintIdentifier.apply(this, arguments); 1046 } 1047 }; 1048 1049 DuplicateKey.prototype.lintIdentifier = function(token, tokenApi) { 1050 var key, nextToken, previousToken; 1051 key = token[1]; 1052 if (this.currentScope == null) { 1053 return null; 1054 } 1055 nextToken = tokenApi.peek(1); 1056 if (nextToken[1] !== ':') { 1057 return null; 1058 } 1059 previousToken = tokenApi.peek(-1); 1060 if (previousToken[0] === '@') { 1061 key = "@" + key; 1062 } 1063 key = "identifier-" + key; 1064 if (this.currentScope[key]) { 1065 return true; 1066 } else { 1067 this.currentScope[key] = token; 1068 return null; 1069 } 1070 }; 1071 1072 DuplicateKey.prototype.lintBrace = function(token) { 1073 if (token[0] === '{') { 1074 if (this.currentScope != null) { 1075 this.braceScopes.push(this.currentScope); 1076 } 1077 this.currentScope = {}; 1078 } else { 1079 this.currentScope = this.braceScopes.pop(); 1080 } 1081 return null; 1082 }; 1083 1084 return DuplicateKey; 1085 1086 })(); 1087 1088 1089 },{}],13:[function(_dereq_,module,exports){ 1090 var EmptyConstructorNeedsParens; 1091 1092 module.exports = EmptyConstructorNeedsParens = (function() { 1093 function EmptyConstructorNeedsParens() {} 1094 1095 EmptyConstructorNeedsParens.prototype.rule = { 1096 name: 'empty_constructor_needs_parens', 1097 level: 'ignore', 1098 message: 'Invoking a constructor without parens and without arguments', 1099 description: "Requires constructors with no parameters to include the parens" 1100 }; 1101 1102 EmptyConstructorNeedsParens.prototype.tokens = ['UNARY']; 1103 1104 EmptyConstructorNeedsParens.prototype.lintToken = function(token, tokenApi) { 1105 var expectedCallStart, expectedIdentifier, identifierIndex; 1106 if (token[1] === 'new') { 1107 identifierIndex = 1; 1108 while (true) { 1109 expectedIdentifier = tokenApi.peek(identifierIndex); 1110 expectedCallStart = tokenApi.peek(identifierIndex + 1); 1111 if ((expectedIdentifier != null ? expectedIdentifier[0] : void 0) === 'IDENTIFIER') { 1112 if ((expectedCallStart != null ? expectedCallStart[0] : void 0) === '.') { 1113 identifierIndex += 2; 1114 continue; 1064 1115 } 1065 1116 } 1066 } 1067 } 1068 astErrors = new ASTLinter(source, config).lint(); 1069 lexicalLinter = new LexicalLinter(source, config); 1070 lexErrors = lexicalLinter.lint(); 1071 tokensByLine = lexicalLinter.tokensByLine; 1072 lineLinter = new LineLinter(source, config, tokensByLine); 1073 lineErrors = lineLinter.lint(); 1074 errors = lexErrors.concat(lineErrors, astErrors); 1075 errors.sort(function(a, b) { 1076 return a.lineNumber - b.lineNumber; 1077 }); 1078 difference = function(a, b) { 1079 var j, _ref3, _results; 1080 1081 j = 0; 1117 break; 1118 } 1119 if ((expectedIdentifier != null ? expectedIdentifier[0] : void 0) === 'IDENTIFIER' && (expectedCallStart != null)) { 1120 return this.handleExpectedCallStart(expectedCallStart); 1121 } 1122 } 1123 }; 1124 1125 EmptyConstructorNeedsParens.prototype.handleExpectedCallStart = function(expectedCallStart) { 1126 if (expectedCallStart[0] !== 'CALL_START') { 1127 return true; 1128 } 1129 }; 1130 1131 return EmptyConstructorNeedsParens; 1132 1133 })(); 1134 1135 1136 },{}],14:[function(_dereq_,module,exports){ 1137 var Indentation; 1138 1139 module.exports = Indentation = (function() { 1140 Indentation.prototype.rule = { 1141 name: 'indentation', 1142 value: 2, 1143 level: 'error', 1144 message: 'Line contains inconsistent indentation', 1145 description: "This rule imposes a standard number of spaces to be used for\nindentation. Since whitespace is significant in CoffeeScript, it's\ncritical that a project chooses a standard indentation format and\nstays consistent. Other roads lead to darkness. <pre> <code>#\nEnabling this option will prevent this ugly\n# but otherwise valid CoffeeScript.\ntwoSpaces = () ->\n fourSpaces = () ->\n eightSpaces = () ->\n 'this is valid CoffeeScript'\n\n</code>\n</pre>\nTwo space indentation is enabled by default." 1146 }; 1147 1148 Indentation.prototype.tokens = ['INDENT', "[", "]"]; 1149 1150 function Indentation() { 1151 this.arrayTokens = []; 1152 } 1153 1154 Indentation.prototype.lintToken = function(token, tokenApi) { 1155 var currentLine, expected, ignoreIndent, isArrayIndent, isInterpIndent, isMultiline, lineNumber, lines, numIndents, prevNum, previous, previousIndentation, previousLine, previousSymbol, type, _ref; 1156 type = token[0], numIndents = token[1], lineNumber = token[2]; 1157 if (type === "[" || type === "]") { 1158 this.lintArray(token); 1159 return void 0; 1160 } 1161 if (token.generated != null) { 1162 return null; 1163 } 1164 previous = tokenApi.peek(-2); 1165 isInterpIndent = previous && previous[0] === '+'; 1166 previous = tokenApi.peek(-1); 1167 isArrayIndent = this.inArray() && (previous != null ? previous.newLine : void 0); 1168 previousSymbol = (_ref = tokenApi.peek(-1)) != null ? _ref[0] : void 0; 1169 isMultiline = previousSymbol === '=' || previousSymbol === ','; 1170 ignoreIndent = isInterpIndent || isArrayIndent || isMultiline; 1171 if (this.isChainedCall(tokenApi)) { 1172 lines = tokenApi.lines, lineNumber = tokenApi.lineNumber; 1173 currentLine = lines[lineNumber]; 1174 prevNum = 1; 1175 while (/^\s*(#|$)/.test(lines[lineNumber - prevNum])) { 1176 prevNum += 1; 1177 } 1178 previousLine = lines[lineNumber - prevNum]; 1179 previousIndentation = previousLine.match(/^(\s*)/)[1].length; 1180 numIndents = currentLine.match(/^(\s*)/)[1].length; 1181 numIndents -= previousIndentation; 1182 } 1183 expected = tokenApi.config[this.rule.name].value; 1184 if (!ignoreIndent && numIndents !== expected) { 1185 return { 1186 context: "Expected " + expected + " got " + numIndents 1187 }; 1188 } 1189 }; 1190 1191 Indentation.prototype.inArray = function() { 1192 return this.arrayTokens.length > 0; 1193 }; 1194 1195 Indentation.prototype.lintArray = function(token) { 1196 if (token[0] === '[') { 1197 this.arrayTokens.push(token); 1198 } else if (token[0] === ']') { 1199 this.arrayTokens.pop(); 1200 } 1201 return null; 1202 }; 1203 1204 Indentation.prototype.isChainedCall = function(tokenApi) { 1205 var i, lastNewLineIndex, lines, t, token, tokens; 1206 tokens = tokenApi.tokens, i = tokenApi.i; 1207 lines = (function() { 1208 var _i, _len, _ref, _results; 1209 _ref = tokens.slice(0, +i + 1 || 9e9); 1082 1210 _results = []; 1083 while (j < a.length) { 1084 if (_ref3 = a[j], __indexOf.call(b, _ref3) >= 0) { 1085 _results.push(a.splice(j, 1)); 1086 } else { 1087 _results.push(j++); 1211 for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { 1212 token = _ref[i]; 1213 if (token.newLine != null) { 1214 _results.push(i); 1088 1215 } 1089 1216 } 1090 1217 return _results; 1218 })(); 1219 lastNewLineIndex = lines ? lines[lines.length - 2] : null; 1220 if (lastNewLineIndex == null) { 1221 return false; 1222 } 1223 tokens = [tokens[lastNewLineIndex], tokens[lastNewLineIndex + 1]]; 1224 return !!((function() { 1225 var _i, _len, _results; 1226 _results = []; 1227 for (_i = 0, _len = tokens.length; _i < _len; _i++) { 1228 t = tokens[_i]; 1229 if (t && t[0] === '.') { 1230 _results.push(t); 1231 } 1232 } 1233 return _results; 1234 })()).length; 1235 }; 1236 1237 return Indentation; 1238 1239 })(); 1240 1241 1242 },{}],15:[function(_dereq_,module,exports){ 1243 var LineEndings; 1244 1245 module.exports = LineEndings = (function() { 1246 function LineEndings() {} 1247 1248 LineEndings.prototype.rule = { 1249 name: 'line_endings', 1250 level: 'ignore', 1251 value: 'unix', 1252 message: 'Line contains incorrect line endings', 1253 description: "This rule ensures your project uses only <tt>windows</tt> or\n<tt>unix</tt> line endings. This rule is disabled by default." 1254 }; 1255 1256 LineEndings.prototype.lintLine = function(line, lineApi) { 1257 var ending, lastChar, valid, _ref; 1258 ending = (_ref = lineApi.config[this.rule.name]) != null ? _ref.value : void 0; 1259 if (!ending || lineApi.isLastLine() || !line) { 1260 return null; 1261 } 1262 lastChar = line[line.length - 1]; 1263 valid = (function() { 1264 if (ending === 'windows') { 1265 return lastChar === '\r'; 1266 } else if (ending === 'unix') { 1267 return lastChar !== '\r'; 1268 } else { 1269 throw new Error("unknown line ending type: " + ending); 1270 } 1271 })(); 1272 if (!valid) { 1273 return { 1274 context: "Expected " + ending 1275 }; 1276 } else { 1277 return null; 1278 } 1279 }; 1280 1281 return LineEndings; 1282 1283 })(); 1284 1285 1286 },{}],16:[function(_dereq_,module,exports){ 1287 var MaxLineLength, regexes; 1288 1289 regexes = { 1290 literateComment: /^\#\s/, 1291 longUrlComment: /^\s*\#\s*http[^\s]+$/ 1292 }; 1293 1294 module.exports = MaxLineLength = (function() { 1295 function MaxLineLength() {} 1296 1297 MaxLineLength.prototype.rule = { 1298 name: 'max_line_length', 1299 value: 80, 1300 level: 'error', 1301 limitComments: true, 1302 message: 'Line exceeds maximum allowed length', 1303 description: "This rule imposes a maximum line length on your code. <a\nhref=\"http://www.python.org/dev/peps/pep-0008/\">Python's style\nguide</a> does a good job explaining why you might want to limit the\nlength of your lines, though this is a matter of taste.\n\nLines can be no longer than eighty characters by default." 1304 }; 1305 1306 MaxLineLength.prototype.lintLine = function(line, lineApi) { 1307 var limitComments, lineLength, max, _ref, _ref1; 1308 max = (_ref = lineApi.config[this.rule.name]) != null ? _ref.value : void 0; 1309 limitComments = (_ref1 = lineApi.config[this.rule.name]) != null ? _ref1.limitComments : void 0; 1310 lineLength = line.length; 1311 if (lineApi.isLiterate() && regexes.literateComment.test(line)) { 1312 lineLength -= 2; 1313 } 1314 if (max && max < lineLength && !regexes.longUrlComment.test(line)) { 1315 if (!limitComments) { 1316 if (lineApi.getLineTokens().length === 0) { 1317 return; 1318 } 1319 } 1320 return { 1321 context: "Length is " + lineLength + ", max is " + max 1322 }; 1323 } 1324 }; 1325 1326 return MaxLineLength; 1327 1328 })(); 1329 1330 1331 },{}],17:[function(_dereq_,module,exports){ 1332 var MissingFatArrows, any, isClass, isCode, isFatArrowCode, isObject, isThis, isValue, methodsOfClass, needsFatArrow, 1333 __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; 1334 1335 isCode = function(node) { 1336 return (node != null ? node.constructor.name : void 0) === 'Code'; 1337 }; 1338 1339 isClass = function(node) { 1340 return node.constructor.name === 'Class'; 1341 }; 1342 1343 isValue = function(node) { 1344 return node.constructor.name === 'Value'; 1345 }; 1346 1347 isObject = function(node) { 1348 return node.constructor.name === 'Obj'; 1349 }; 1350 1351 isThis = function(node) { 1352 return isValue(node) && node.base.value === 'this'; 1353 }; 1354 1355 isFatArrowCode = function(node) { 1356 return isCode(node) && node.bound; 1357 }; 1358 1359 any = function(arr, test) { 1360 return arr.reduce((function(res, elt) { 1361 return res || test(elt); 1362 }), false); 1363 }; 1364 1365 needsFatArrow = function(node) { 1366 return isCode(node) && (any(node.params, function(param) { 1367 return param.contains(isThis) != null; 1368 }) || (node.body.contains(isThis) != null)); 1369 }; 1370 1371 methodsOfClass = function(classNode) { 1372 var bodyNodes, returnNode; 1373 bodyNodes = classNode.body.expressions; 1374 returnNode = bodyNodes[bodyNodes.length - 1]; 1375 if ((returnNode != null) && isValue(returnNode) && isObject(returnNode.base)) { 1376 return returnNode.base.properties.map(function(assignNode) { 1377 return assignNode.value; 1378 }).filter(isCode); 1379 } else { 1380 return []; 1381 } 1382 }; 1383 1384 module.exports = MissingFatArrows = (function() { 1385 function MissingFatArrows() {} 1386 1387 MissingFatArrows.prototype.rule = { 1388 name: 'missing_fat_arrows', 1389 level: 'ignore', 1390 message: 'Used `this` in a function without a fat arrow', 1391 description: "Warns when you use `this` inside a function that wasn't defined\nwith a fat arrow. This rule does not apply to methods defined in a\nclass, since they have `this` bound to the class instance (or the\nclass itself, for class methods).\n\nIt is impossible to statically determine whether a function using\n`this` will be bound with the correct `this` value due to language\nfeatures like `Function.prototype.call` and\n`Function.prototype.bind`, so this rule may produce false positives." 1392 }; 1393 1394 MissingFatArrows.prototype.lintAST = function(node, astApi) { 1395 this.lintNode(node, astApi); 1396 return void 0; 1397 }; 1398 1399 MissingFatArrows.prototype.lintNode = function(node, astApi, methods) { 1400 var error; 1401 if (methods == null) { 1402 methods = []; 1403 } 1404 if ((!isFatArrowCode(node)) && (__indexOf.call(methods, node) < 0) && (needsFatArrow(node))) { 1405 error = astApi.createError({ 1406 lineNumber: node.locationData.first_line + 1 1407 }); 1408 this.errors.push(error); 1409 } 1410 return node.eachChild((function(_this) { 1411 return function(child) { 1412 return _this.lintNode(child, astApi, (function() { 1413 switch (false) { 1414 case !isClass(node): 1415 return methodsOfClass(node); 1416 case !isCode(node): 1417 return []; 1418 default: 1419 return methods; 1420 } 1421 })()); 1422 }; 1423 })(this)); 1424 }; 1425 1426 return MissingFatArrows; 1427 1428 })(); 1429 1430 1431 },{}],18:[function(_dereq_,module,exports){ 1432 var NewlinesAfterClasses; 1433 1434 module.exports = NewlinesAfterClasses = (function() { 1435 function NewlinesAfterClasses() {} 1436 1437 NewlinesAfterClasses.prototype.rule = { 1438 name: 'newlines_after_classes', 1439 value: 3, 1440 level: 'ignore', 1441 message: 'Wrong count of newlines between a class and other code', 1442 description: "Checks the number of newlines between classes and other code" 1443 }; 1444 1445 NewlinesAfterClasses.prototype.lintLine = function(line, lineApi) { 1446 var context, ending, got, lineNumber; 1447 ending = lineApi.config[this.rule.name].value; 1448 if (!ending || lineApi.isLastLine()) { 1449 return null; 1450 } 1451 lineNumber = lineApi.lineNumber, context = lineApi.context; 1452 if (!context["class"].inClass && (context["class"].lastUnemptyLineInClass != null) && (lineNumber - context["class"].lastUnemptyLineInClass) !== ending) { 1453 got = lineNumber - context["class"].lastUnemptyLineInClass; 1454 return { 1455 context: "Expected " + ending + " got " + got 1456 }; 1457 } 1458 return null; 1459 }; 1460 1461 return NewlinesAfterClasses; 1462 1463 })(); 1464 1465 1466 },{}],19:[function(_dereq_,module,exports){ 1467 var NoBackticks; 1468 1469 module.exports = NoBackticks = (function() { 1470 function NoBackticks() {} 1471 1472 NoBackticks.prototype.rule = { 1473 name: 'no_backticks', 1474 level: 'error', 1475 message: 'Backticks are forbidden', 1476 description: "Backticks allow snippets of JavaScript to be embedded in\nCoffeeScript. While some folks consider backticks useful in a few\nniche circumstances, they should be avoided because so none of\nJavaScript's \"bad parts\", like <tt>with</tt> and <tt>eval</tt>,\nsneak into CoffeeScript.\nThis rule is enabled by default." 1477 }; 1478 1479 NoBackticks.prototype.tokens = ["JS"]; 1480 1481 NoBackticks.prototype.lintToken = function(token, tokenApi) { 1482 return true; 1483 }; 1484 1485 return NoBackticks; 1486 1487 })(); 1488 1489 1490 },{}],20:[function(_dereq_,module,exports){ 1491 var NoEmptyParamList; 1492 1493 module.exports = NoEmptyParamList = (function() { 1494 function NoEmptyParamList() {} 1495 1496 NoEmptyParamList.prototype.rule = { 1497 name: 'no_empty_param_list', 1498 level: 'ignore', 1499 message: 'Empty parameter list is forbidden', 1500 description: "This rule prohibits empty parameter lists in function definitions.\n<pre>\n<code># The empty parameter list in here is unnecessary:\nmyFunction = () ->\n\n# We might favor this instead:\nmyFunction = ->\n</code>\n</pre>\nEmpty parameter lists are permitted by default." 1501 }; 1502 1503 NoEmptyParamList.prototype.tokens = ["PARAM_START"]; 1504 1505 NoEmptyParamList.prototype.lintToken = function(token, tokenApi) { 1506 var nextType; 1507 nextType = tokenApi.peek()[0]; 1508 return nextType === 'PARAM_END'; 1509 }; 1510 1511 return NoEmptyParamList; 1512 1513 })(); 1514 1515 1516 },{}],21:[function(_dereq_,module,exports){ 1517 var NoImplicitBraces; 1518 1519 module.exports = NoImplicitBraces = (function() { 1520 function NoImplicitBraces() {} 1521 1522 NoImplicitBraces.prototype.rule = { 1523 name: 'no_implicit_braces', 1524 level: 'ignore', 1525 message: 'Implicit braces are forbidden', 1526 strict: true, 1527 description: "This rule prohibits implicit braces when declaring object literals.\nImplicit braces can make code more difficult to understand,\nespecially when used in combination with optional parenthesis.\n<pre>\n<code># Do you find this code ambiguous? Is it a\n# function call with three arguments or four?\nmyFunction a, b, 1:2, 3:4\n\n# While the same code written in a more\n# explicit manner has no ambiguity.\nmyFunction(a, b, {1:2, 3:4})\n</code>\n</pre>\nImplicit braces are permitted by default, since their use is\nidiomatic CoffeeScript." 1528 }; 1529 1530 NoImplicitBraces.prototype.tokens = ["{"]; 1531 1532 NoImplicitBraces.prototype.lintToken = function(token, tokenApi) { 1533 var previousToken; 1534 if (token.generated) { 1535 if (!tokenApi.config[this.rule.name].strict) { 1536 previousToken = tokenApi.peek(-1)[0]; 1537 if (previousToken === 'INDENT') { 1538 return; 1539 } 1540 } 1541 return this.isPartOfClass(tokenApi); 1542 } 1543 }; 1544 1545 NoImplicitBraces.prototype.isPartOfClass = function(tokenApi) { 1546 var i, t; 1547 i = -1; 1548 while (true) { 1549 t = tokenApi.peek(i); 1550 if ((t == null) || t[0] === 'TERMINATOR') { 1551 return true; 1552 } 1553 if (t[0] === 'CLASS') { 1554 return null; 1555 } 1556 i -= 1; 1557 } 1558 }; 1559 1560 return NoImplicitBraces; 1561 1562 })(); 1563 1564 1565 },{}],22:[function(_dereq_,module,exports){ 1566 var NoImplicitParens; 1567 1568 module.exports = NoImplicitParens = (function() { 1569 function NoImplicitParens() {} 1570 1571 NoImplicitParens.prototype.rule = { 1572 name: 'no_implicit_parens', 1573 level: 'ignore', 1574 message: 'Implicit parens are forbidden', 1575 description: "This rule prohibits implicit parens on function calls.\n<pre>\n<code># Some folks don't like this style of coding.\nmyFunction a, b, c\n\n# And would rather it always be written like this:\nmyFunction(a, b, c)\n</code>\n</pre>\nImplicit parens are permitted by default, since their use is\nidiomatic CoffeeScript." 1576 }; 1577 1578 NoImplicitParens.prototype.tokens = ["CALL_START"]; 1579 1580 NoImplicitParens.prototype.lintToken = function(token, tokenApi) { 1581 return token.generated; 1582 }; 1583 1584 return NoImplicitParens; 1585 1586 })(); 1587 1588 1589 },{}],23:[function(_dereq_,module,exports){ 1590 var NoPlusPlus; 1591 1592 module.exports = NoPlusPlus = (function() { 1593 function NoPlusPlus() {} 1594 1595 NoPlusPlus.prototype.rule = { 1596 name: 'no_plusplus', 1597 level: 'ignore', 1598 message: 'The increment and decrement operators are forbidden', 1599 description: "This rule forbids the increment and decrement arithmetic operators.\nSome people believe the <tt>++</tt> and <tt>--</tt> to be cryptic\nand the cause of bugs due to misunderstandings of their precedence\nrules.\nThis rule is disabled by default." 1600 }; 1601 1602 NoPlusPlus.prototype.tokens = ["++", "--"]; 1603 1604 NoPlusPlus.prototype.lintToken = function(token, tokenApi) { 1605 return { 1606 context: "found '" + token[0] + "'" 1091 1607 }; 1092 all_errors = errors; 1093 errors = []; 1094 disabled = disabled_initially; 1095 next_line = 0; 1096 for (i = _k = 0, _ref3 = source.split('\n').length; 0 <= _ref3 ? _k < _ref3 : _k > _ref3; i = 0 <= _ref3 ? ++_k : --_k) { 1097 for (cmd in block_config) { 1098 rules = block_config[cmd][i]; 1099 if (rules != null) { 1100 ({ 1101 'disable': function() { 1102 return disabled = disabled.concat(rules); 1103 }, 1104 'enable': function() { 1105 difference(disabled, rules); 1106 if (rules.length === 0) { 1107 return disabled = disabled_initially; 1108 } 1109 } 1110 })[cmd](); 1111 } 1112 } 1113 while (next_line === i && all_errors.length > 0) { 1114 next_line = all_errors[0].lineNumber - 1; 1115 e = all_errors[0]; 1116 if (e.lineNumber === i + 1 || (e.lineNumber == null)) { 1117 e = all_errors.shift(); 1118 if (_ref4 = e.rule, __indexOf.call(disabled, _ref4) < 0) { 1119 errors.push(e); 1608 }; 1609 1610 return NoPlusPlus; 1611 1612 })(); 1613 1614 1615 },{}],24:[function(_dereq_,module,exports){ 1616 var NoStandAloneAt; 1617 1618 module.exports = NoStandAloneAt = (function() { 1619 function NoStandAloneAt() {} 1620 1621 NoStandAloneAt.prototype.rule = { 1622 name: 'no_stand_alone_at', 1623 level: 'ignore', 1624 message: '@ must not be used stand alone', 1625 description: "This rule checks that no stand alone @ are in use, they are\ndiscouraged. Further information in CoffeScript issue <a\nhref=\"https://github.com/jashkenas/coffee-script/issues/1601\">\n#1601</a>" 1626 }; 1627 1628 NoStandAloneAt.prototype.tokens = ["@"]; 1629 1630 NoStandAloneAt.prototype.lintToken = function(token, tokenApi) { 1631 var isDot, isIdentifier, isIndexStart, isValidProtoProperty, nextToken, protoProperty, spaced; 1632 nextToken = tokenApi.peek(); 1633 spaced = token.spaced; 1634 isIdentifier = nextToken[0] === 'IDENTIFIER'; 1635 isIndexStart = nextToken[0] === 'INDEX_START'; 1636 isDot = nextToken[0] === '.'; 1637 if (nextToken[0] === '::') { 1638 protoProperty = tokenApi.peek(2); 1639 isValidProtoProperty = protoProperty[0] === 'IDENTIFIER'; 1640 } 1641 if (spaced || (!isIdentifier && !isIndexStart && !isDot && !isValidProtoProperty)) { 1642 return true; 1643 } 1644 }; 1645 1646 return NoStandAloneAt; 1647 1648 })(); 1649 1650 1651 },{}],25:[function(_dereq_,module,exports){ 1652 var NoTabs, indentationRegex, 1653 __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; 1654 1655 indentationRegex = /\S/; 1656 1657 module.exports = NoTabs = (function() { 1658 function NoTabs() {} 1659 1660 NoTabs.prototype.rule = { 1661 name: 'no_tabs', 1662 level: 'error', 1663 message: 'Line contains tab indentation', 1664 description: "This rule forbids tabs in indentation. Enough said. It is enabled by\ndefault." 1665 }; 1666 1667 NoTabs.prototype.lintLine = function(line, lineApi) { 1668 var indentation; 1669 indentation = line.split(indentationRegex)[0]; 1670 if (lineApi.lineHasToken() && __indexOf.call(indentation, '\t') >= 0) { 1671 return true; 1672 } else { 1673 return null; 1674 } 1675 }; 1676 1677 return NoTabs; 1678 1679 })(); 1680 1681 1682 },{}],26:[function(_dereq_,module,exports){ 1683 var NoThrowingStrings; 1684 1685 module.exports = NoThrowingStrings = (function() { 1686 function NoThrowingStrings() {} 1687 1688 NoThrowingStrings.prototype.rule = { 1689 name: 'no_throwing_strings', 1690 level: 'error', 1691 message: 'Throwing strings is forbidden', 1692 description: "This rule forbids throwing string literals or interpolations. While\nJavaScript (and CoffeeScript by extension) allow any expression to\nbe thrown, it is best to only throw <a\nhref=\"https://developer.mozilla.org\n/en/JavaScript/Reference/Global_Objects/Error\"> Error</a> objects,\nbecause they contain valuable debugging information like the stack\ntrace. Because of JavaScript's dynamic nature, CoffeeLint cannot\nensure you are always throwing instances of <tt>Error</tt>. It will\nonly catch the simple but real case of throwing literal strings.\n<pre>\n<code># CoffeeLint will catch this:\nthrow \"i made a boo boo\"\n\n# ... but not this:\nthrow getSomeString()\n</code>\n</pre>\nThis rule is enabled by default." 1693 }; 1694 1695 NoThrowingStrings.prototype.tokens = ["THROW"]; 1696 1697 NoThrowingStrings.prototype.lintToken = function(token, tokenApi) { 1698 var n1, n2, nextIsString, _ref; 1699 _ref = [tokenApi.peek(), tokenApi.peek(2)], n1 = _ref[0], n2 = _ref[1]; 1700 nextIsString = n1[0] === 'STRING' || (n1[0] === '(' && n2[0] === 'STRING'); 1701 return nextIsString; 1702 }; 1703 1704 return NoThrowingStrings; 1705 1706 })(); 1707 1708 1709 },{}],27:[function(_dereq_,module,exports){ 1710 var NoTrailingSemicolons, regexes, 1711 __slice = [].slice; 1712 1713 regexes = { 1714 trailingSemicolon: /;\r?$/ 1715 }; 1716 1717 module.exports = NoTrailingSemicolons = (function() { 1718 function NoTrailingSemicolons() {} 1719 1720 NoTrailingSemicolons.prototype.rule = { 1721 name: 'no_trailing_semicolons', 1722 level: 'error', 1723 message: 'Line contains a trailing semicolon', 1724 description: "This rule prohibits trailing semicolons, since they are needless\ncruft in CoffeeScript.\n<pre>\n<code># This semicolon is meaningful.\nx = '1234'; console.log(x)\n\n# This semicolon is redundant.\nalert('end of line');\n</code>\n</pre>\nTrailing semicolons are forbidden by default." 1725 }; 1726 1727 NoTrailingSemicolons.prototype.lintLine = function(line, lineApi) { 1728 var first, hasNewLine, hasSemicolon, last, lineTokens, _i, _ref; 1729 lineTokens = lineApi.getLineTokens(); 1730 if (lineTokens.length === 1 && lineTokens[0][0] === 'TERMINATOR') { 1731 return; 1732 } 1733 hasSemicolon = regexes.trailingSemicolon.test(line); 1734 _ref = lineApi.getLineTokens(), first = 2 <= _ref.length ? __slice.call(_ref, 0, _i = _ref.length - 1) : (_i = 0, []), last = _ref[_i++]; 1735 hasNewLine = last && (last.newLine != null); 1736 if (hasSemicolon && !hasNewLine && lineApi.lineHasToken() && last[0] !== 'STRING') { 1737 return true; 1738 } 1739 }; 1740 1741 return NoTrailingSemicolons; 1742 1743 })(); 1744 1745 1746 },{}],28:[function(_dereq_,module,exports){ 1747 var NoTrailingWhitespace, regexes; 1748 1749 regexes = { 1750 trailingWhitespace: /[^\s]+[\t ]+\r?$/, 1751 onlySpaces: /^[\t ]+\r?$/, 1752 lineHasComment: /^\s*[^\#]*\#/ 1753 }; 1754 1755 module.exports = NoTrailingWhitespace = (function() { 1756 function NoTrailingWhitespace() {} 1757 1758 NoTrailingWhitespace.prototype.rule = { 1759 name: 'no_trailing_whitespace', 1760 level: 'error', 1761 message: 'Line ends with trailing whitespace', 1762 allowed_in_comments: false, 1763 allowed_in_empty_lines: true, 1764 description: "This rule forbids trailing whitespace in your code, since it is\nneedless cruft. It is enabled by default." 1765 }; 1766 1767 NoTrailingWhitespace.prototype.lintLine = function(line, lineApi) { 1768 var str, token, tokens, _i, _len, _ref, _ref1, _ref2; 1769 if (!((_ref = lineApi.config['no_trailing_whitespace']) != null ? _ref.allowed_in_empty_lines : void 0)) { 1770 if (regexes.onlySpaces.test(line)) { 1771 return true; 1772 } 1773 } 1774 if (regexes.trailingWhitespace.test(line)) { 1775 if (!((_ref1 = lineApi.config['no_trailing_whitespace']) != null ? _ref1.allowed_in_comments : void 0)) { 1776 return true; 1777 } 1778 line = line; 1779 tokens = lineApi.tokensByLine[lineApi.lineNumber]; 1780 if (!tokens) { 1781 return null; 1782 } 1783 _ref2 = (function() { 1784 var _j, _len, _results; 1785 _results = []; 1786 for (_j = 0, _len = tokens.length; _j < _len; _j++) { 1787 token = tokens[_j]; 1788 if (token[0] === 'STRING') { 1789 _results.push(token[1]); 1120 1790 } 1121 1791 } 1122 } 1123 } 1124 block_config = { 1125 'enable': {}, 1126 'disable': {} 1127 }; 1128 return errors; 1129 }; 1130 1131 }).call(this); 1792 return _results; 1793 })(); 1794 for (_i = 0, _len = _ref2.length; _i < _len; _i++) { 1795 str = _ref2[_i]; 1796 line = line.replace(str, 'STRING'); 1797 } 1798 if (!regexes.lineHasComment.test(line)) { 1799 return true; 1800 } 1801 } 1802 }; 1803 1804 return NoTrailingWhitespace; 1805 1806 })(); 1807 1808 1809 },{}],29:[function(_dereq_,module,exports){ 1810 var NoUnnecessaryFatArrows, any, isCode, isFatArrowCode, isThis, needsFatArrow; 1811 1812 isCode = function(node) { 1813 return node.constructor.name === 'Code'; 1814 }; 1815 1816 isFatArrowCode = function(node) { 1817 return isCode(node) && node.bound; 1818 }; 1819 1820 isThis = function(node) { 1821 return node.constructor.name === 'Value' && node.base.value === 'this'; 1822 }; 1823 1824 any = function(arr, test) { 1825 return arr.reduce((function(res, elt) { 1826 return res || test(elt); 1827 }), false); 1828 }; 1829 1830 needsFatArrow = function(node) { 1831 return isCode(node) && (any(node.params, function(param) { 1832 return param.contains(isThis) != null; 1833 }) || (node.body.contains(isThis) != null) || (node.body.contains(function(child) { 1834 return isFatArrowCode(child) && needsFatArrow(child); 1835 }) != null)); 1836 }; 1837 1838 module.exports = NoUnnecessaryFatArrows = (function() { 1839 function NoUnnecessaryFatArrows() {} 1840 1841 NoUnnecessaryFatArrows.prototype.rule = { 1842 name: 'no_unnecessary_fat_arrows', 1843 level: 'warn', 1844 message: 'Unnecessary fat arrow', 1845 description: "Disallows defining functions with fat arrows when `this`\nis not used within the function." 1846 }; 1847 1848 NoUnnecessaryFatArrows.prototype.lintAST = function(node, astApi) { 1849 this.lintNode(node, astApi); 1850 return void 0; 1851 }; 1852 1853 NoUnnecessaryFatArrows.prototype.lintNode = function(node, astApi) { 1854 var error; 1855 if ((isFatArrowCode(node)) && (!needsFatArrow(node))) { 1856 error = astApi.createError({ 1857 lineNumber: node.locationData.first_line + 1 1858 }); 1859 this.errors.push(error); 1860 } 1861 return node.eachChild((function(_this) { 1862 return function(child) { 1863 return _this.lintNode(child, astApi); 1864 }; 1865 })(this)); 1866 }; 1867 1868 return NoUnnecessaryFatArrows; 1869 1870 })(); 1871 1872 1873 },{}],30:[function(_dereq_,module,exports){ 1874 var NonEmptyConstructorNeedsParens, ParentClass, 1875 __hasProp = {}.hasOwnProperty, 1876 __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; 1877 1878 ParentClass = _dereq_('./empty_constructor_needs_parens.coffee'); 1879 1880 module.exports = NonEmptyConstructorNeedsParens = (function(_super) { 1881 __extends(NonEmptyConstructorNeedsParens, _super); 1882 1883 function NonEmptyConstructorNeedsParens() { 1884 return NonEmptyConstructorNeedsParens.__super__.constructor.apply(this, arguments); 1885 } 1886 1887 NonEmptyConstructorNeedsParens.prototype.rule = { 1888 name: 'non_empty_constructor_needs_parens', 1889 level: 'ignore', 1890 message: 'Invoking a constructor without parens and with arguments', 1891 description: "Requires constructors with parameters to include the parens" 1892 }; 1893 1894 NonEmptyConstructorNeedsParens.prototype.handleExpectedCallStart = function(expectedCallStart) { 1895 if (expectedCallStart[0] === 'CALL_START' && expectedCallStart.generated) { 1896 return true; 1897 } 1898 }; 1899 1900 return NonEmptyConstructorNeedsParens; 1901 1902 })(ParentClass); 1903 1904 1905 },{"./empty_constructor_needs_parens.coffee":13}],31:[function(_dereq_,module,exports){ 1906 var SpaceOperators, 1907 __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; 1908 1909 module.exports = SpaceOperators = (function() { 1910 SpaceOperators.prototype.rule = { 1911 name: 'space_operators', 1912 level: 'ignore', 1913 message: 'Operators must be spaced properly', 1914 description: "This rule enforces that operators have space around them." 1915 }; 1916 1917 SpaceOperators.prototype.tokens = ["+", "-", "=", "MATH", "COMPARE", "LOGIC", "COMPOUND_ASSIGN", "(", ")", "CALL_START", "CALL_END"]; 1918 1919 function SpaceOperators() { 1920 this.callTokens = []; 1921 this.parenTokens = []; 1922 } 1923 1924 SpaceOperators.prototype.lintToken = function(_arg, tokenApi) { 1925 var type; 1926 type = _arg[0]; 1927 if (type === "CALL_START" || type === "CALL_END") { 1928 this.lintCall.apply(this, arguments); 1929 return void 0; 1930 } 1931 if (type === "(" || type === ")") { 1932 this.lintParens.apply(this, arguments); 1933 return void 0; 1934 } 1935 if (type === "+" || type === "-") { 1936 return this.lintPlus.apply(this, arguments); 1937 } else { 1938 return this.lintMath.apply(this, arguments); 1939 } 1940 }; 1941 1942 SpaceOperators.prototype.lintPlus = function(token, tokenApi) { 1943 var isUnary, p, unaries, _ref; 1944 if (this.isInInterpolation() || this.isInExtendedRegex()) { 1945 return null; 1946 } 1947 p = tokenApi.peek(-1); 1948 unaries = ['TERMINATOR', '(', '=', '-', '+', ',', 'CALL_START', 'INDEX_START', '..', '...', 'COMPARE', 'IF', 'THROW', 'LOGIC', 'POST_IF', ':', '[', 'INDENT', 'COMPOUND_ASSIGN', 'RETURN', 'MATH', 'BY', 'LEADING_WHEN']; 1949 isUnary = !p ? false : (_ref = p[0], __indexOf.call(unaries, _ref) >= 0); 1950 if ((isUnary && token.spaced) || (!isUnary && !token.spaced && !token.newLine)) { 1951 return { 1952 context: token[1] 1953 }; 1954 } else { 1955 return null; 1956 } 1957 }; 1958 1959 SpaceOperators.prototype.lintMath = function(token, tokenApi) { 1960 if (!token.spaced && !token.newLine) { 1961 return { 1962 context: token[1] 1963 }; 1964 } else { 1965 return null; 1966 } 1967 }; 1968 1969 SpaceOperators.prototype.isInExtendedRegex = function() { 1970 var t, _i, _len, _ref; 1971 _ref = this.callTokens; 1972 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 1973 t = _ref[_i]; 1974 if (t.isRegex) { 1975 return true; 1976 } 1977 } 1978 return false; 1979 }; 1980 1981 SpaceOperators.prototype.lintCall = function(token, tokenApi) { 1982 var p; 1983 if (token[0] === 'CALL_START') { 1984 p = tokenApi.peek(-1); 1985 token.isRegex = p && p[0] === 'IDENTIFIER' && p[1] === 'RegExp'; 1986 this.callTokens.push(token); 1987 } else { 1988 this.callTokens.pop(); 1989 } 1990 return null; 1991 }; 1992 1993 SpaceOperators.prototype.isInInterpolation = function() { 1994 var t, _i, _len, _ref; 1995 _ref = this.parenTokens; 1996 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 1997 t = _ref[_i]; 1998 if (t.isInterpolation) { 1999 return true; 2000 } 2001 } 2002 return false; 2003 }; 2004 2005 SpaceOperators.prototype.lintParens = function(token, tokenApi) { 2006 var i, n1, n2, p1; 2007 if (token[0] === '(') { 2008 p1 = tokenApi.peek(-1); 2009 n1 = tokenApi.peek(1); 2010 n2 = tokenApi.peek(2); 2011 i = n1 && n2 && n1[0] === 'STRING' && n2[0] === '+'; 2012 token.isInterpolation = i; 2013 this.parenTokens.push(token); 2014 } else { 2015 this.parenTokens.pop(); 2016 } 2017 return null; 2018 }; 2019 2020 return SpaceOperators; 2021 2022 })(); 2023 2024 2025 },{}]},{},[4]) 2026 (4) 2027 }); -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/lib/commandline.js
r484 r516 1 // Generated by CoffeeScript 1.6.22 1 /* 3 2 CoffeeLint … … 9 8 10 9 (function() { 11 var CSVReporter, C offeeScript, ErrorReport, JSLintReporter, Reporter, coffeelint, config, data, errorReport, existsFn, findCoffeeScripts, fs, glob, lintFiles, lintSource, optimist, options, path, paths, read, reportAndExit, scripts, stdin, thisdir, _ref, _ref1, _ref2,10 var CSVReporter, CheckstyleReporter, CoffeeScript, ErrorReport, JSLintReporter, Reporter, coffeelint, config, configfinder, data, errorReport, findCoffeeScripts, fs, getFallbackConfig, glob, lintFiles, lintSource, loadRules, optimist, options, path, paths, read, reportAndExit, scripts, stdin, thisdir, _ref, _ref1, _ref2, 12 11 __slice = [].slice, 13 12 __hasProp = {}.hasOwnProperty, … … 24 23 thisdir = path.dirname(fs.realpathSync(__filename)); 25 24 26 coffeelint = require(path.join(thisdir, "..", "lib", "coffeelint")); 25 coffeelint = require(path.join(thisdir, "coffeelint")); 26 27 configfinder = require(path.join(thisdir, "configfinder")); 27 28 28 29 CoffeeScript = require('coffee-script'); … … 30 31 read = function(path) { 31 32 var realPath; 32 33 33 realPath = fs.realpathSync(path); 34 34 return fs.readFileSync(realPath).toString(); … … 37 37 findCoffeeScripts = function(paths) { 38 38 var files, p, _i, _len; 39 40 39 files = []; 41 40 for (_i = 0, _len = paths.length; _i < _len; _i++) { … … 66 65 ErrorReport.prototype.getSummary = function() { 67 66 var error, errorCount, errors, pathCount, warningCount, _i, _len, _ref; 68 69 67 pathCount = errorCount = warningCount = 0; 70 68 _ref = this.paths; … … 112 110 ErrorReport.prototype._hasLevel = function(path, level) { 113 111 var error, _i, _len, _ref; 114 115 112 _ref = this.paths[path]; 116 113 for (_i = 0, _len = _ref.length; _i < _len; _i++) { … … 141 138 Reporter.prototype.stylize = function() { 142 139 var map, message, styles; 143 144 140 message = arguments[0], styles = 2 <= arguments.length ? __slice.call(arguments, 1) : []; 145 141 if (!this.colorize) { … … 159 155 Reporter.prototype.publish = function() { 160 156 var errors, paths, report; 161 162 157 paths = this.errorReport.paths; 163 158 report = ""; … … 176 171 Reporter.prototype.reportSummary = function(s) { 177 172 var e, err, file, msg, p, start, w, warn; 178 179 173 start = s.errorCount > 0 ? "" + this.err + " " + (this.stylize("Lint!", 'red', 'bold')) : s.warningCount > 0 ? "" + this.warn + " " + (this.stylize("Warning!", 'yellow', 'bold')) : "" + this.ok + " " + (this.stylize("Ok!", 'green', 'bold')); 180 174 e = s.errorCount; … … 190 184 Reporter.prototype.reportPath = function(path, errors) { 191 185 var color, e, hasError, hasWarning, lineEnd, o, output, overall, pathReport, _i, _len, _ref; 192 193 186 _ref = (hasError = this.errorReport.pathHasError(path)) ? [this.err, 'red'] : (hasWarning = this.errorReport.pathHasWarning(path)) ? [this.warn, 'yellow'] : [this.ok, 'green'], overall = _ref[0], color = _ref[1]; 194 187 pathReport = ""; … … 242 235 CSVReporter.prototype.publish = function() { 243 236 var e, errors, f, header, _ref1, _results; 244 245 237 header = ["path", "lineNumber", "lineNumberEnd", "level", "message"]; 246 238 this.print(header.join(",")); … … 251 243 _results.push((function() { 252 244 var _i, _len, _ref2, _results1; 253 254 245 _results1 = []; 255 246 for (_i = 0, _len = errors.length; _i < _len; _i++) { 256 247 e = errors[_i]; 248 if (e.context) { 249 e.message += " " + e.context + "."; 250 } 257 251 f = [path, e.lineNumber, (_ref2 = e.lineNumberEnd) != null ? _ref2 : e.lineNumberEnd, e.level, e.message]; 258 252 _results1.push(this.print(f.join(","))); … … 278 272 JSLintReporter.prototype.publish = function() { 279 273 var e, errors, _i, _len, _ref2, _ref3; 280 281 274 this.print("<?xml version=\"1.0\" encoding=\"utf-8\"?><jslint>"); 282 275 _ref2 = this.errorReport.paths; … … 287 280 for (_i = 0, _len = errors.length; _i < _len; _i++) { 288 281 e = errors[_i]; 289 this.print("<issue line=\"" + e.lineNumber + "\"\n lineEnd= " + ((_ref3 = e.lineNumberEnd) != null ? _ref3 : e.lineNumberEnd) +"\n reason=\"[" + (this.escape(e.level)) + "] " + (this.escape(e.message)) + "\"\n evidence=\"" + (this.escape(e.context)) + "\"/>");282 this.print("<issue line=\"" + e.lineNumber + "\"\n lineEnd=\"" + ((_ref3 = e.lineNumberEnd) != null ? _ref3 : e.lineNumber) + "\"\n reason=\"[" + (this.escape(e.level)) + "] " + (this.escape(e.message)) + "\"\n evidence=\"" + (this.escape(e.context)) + "\"/>"); 290 283 } 291 284 this.print("</file>"); … … 297 290 JSLintReporter.prototype.escape = function(msg) { 298 291 var r, replacements, _i, _len; 299 300 292 msg = "" + msg; 301 293 if (!msg) { … … 314 306 })(Reporter); 315 307 316 lintFiles = function(paths, config) { 317 var errorReport, literate, source, _i, _len; 318 308 CheckstyleReporter = (function(_super) { 309 __extends(CheckstyleReporter, _super); 310 311 function CheckstyleReporter() { 312 _ref2 = CheckstyleReporter.__super__.constructor.apply(this, arguments); 313 return _ref2; 314 } 315 316 CheckstyleReporter.prototype.publish = function() { 317 var context, e, errors, level, _i, _len, _ref3, _ref4; 318 this.print("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); 319 this.print("<checkstyle version=\"4.3\">"); 320 _ref3 = this.errorReport.paths; 321 for (path in _ref3) { 322 errors = _ref3[path]; 323 if (errors.length) { 324 this.print("<file name=\"" + path + "\">"); 325 for (_i = 0, _len = errors.length; _i < _len; _i++) { 326 e = errors[_i]; 327 level = e.level; 328 if (level === 'warn') { 329 level = 'warning'; 330 } 331 context = (_ref4 = e.context) != null ? _ref4 : ""; 332 this.print("<error line=\"" + e.lineNumber + "\"\n severity=\"" + (this.escape(level)) + "\"\n message=\"" + (this.escape(e.message + '; context: ' + context)) + "\"\n source=\"coffeelint\"/>"); 333 } 334 this.print("</file>"); 335 } 336 } 337 return this.print("</checkstyle>"); 338 }; 339 340 return CheckstyleReporter; 341 342 })(JSLintReporter); 343 344 lintFiles = function(files, config) { 345 var data, errorReport, file, fileConfig, literate, ruleName, source, _i, _len; 319 346 errorReport = new ErrorReport(); 320 for (_i = 0, _len = paths.length; _i < _len; _i++) { 321 path = paths[_i]; 322 source = read(path); 323 literate = CoffeeScript.helpers.isLiterate(path); 324 errorReport.paths[path] = coffeelint.lint(source, config, literate); 347 for (_i = 0, _len = files.length; _i < _len; _i++) { 348 file = files[_i]; 349 source = read(file); 350 literate = CoffeeScript.helpers.isLiterate(file); 351 fileConfig = config ? config : getFallbackConfig(file); 352 for (ruleName in fileConfig) { 353 data = fileConfig[ruleName]; 354 if (data.module != null) { 355 loadRules(data.module, ruleName); 356 } 357 } 358 errorReport.paths[file] = coffeelint.lint(source, fileConfig, literate); 325 359 } 326 360 return errorReport; … … 328 362 329 363 lintSource = function(source, config, literate) { 330 var errorReport; 331 364 var data, errorReport, ruleName; 332 365 if (literate == null) { 333 366 literate = false; 334 367 } 335 368 errorReport = new ErrorReport(); 369 config || (config = getFallbackConfig()); 370 for (ruleName in config) { 371 data = config[ruleName]; 372 if (data.module != null) { 373 loadRules(data.module, ruleName); 374 } 375 } 336 376 errorReport.paths["stdin"] = coffeelint.lint(source, config, literate); 337 377 return errorReport; 338 378 }; 339 379 380 getFallbackConfig = function(filename) { 381 if (filename == null) { 382 filename = null; 383 } 384 if (!options.argv.noconfig) { 385 return configfinder.getConfig(filename); 386 } 387 }; 388 389 loadRules = function(moduleName, ruleName) { 390 var e, rule, ruleModule, _i, _len, _results; 391 if (ruleName == null) { 392 ruleName = void 0; 393 } 394 try { 395 try { 396 ruleModule = require(moduleName); 397 } catch (_error) { 398 e = _error; 399 ruleModule = require(path.resolve(process.cwd(), moduleName)); 400 } 401 if (typeof ruleModule === 'function') { 402 return coffeelint.registerRule(ruleModule, ruleName); 403 } else { 404 _results = []; 405 for (_i = 0, _len = ruleModule.length; _i < _len; _i++) { 406 rule = ruleModule[_i]; 407 _results.push(coffeelint.registerRule(rule)); 408 } 409 return _results; 410 } 411 } catch (_error) { 412 e = _error; 413 console.error("Error loading " + moduleName); 414 throw e; 415 } 416 }; 417 340 418 reportAndExit = function(errorReport, options) { 341 419 var colorize, reporter; 342 343 reporter = options.argv.jslint ? new JSLintReporter(errorReport) : options.argv.csv ? new CSVReporter(errorReport) : (colorize = !options.argv.nocolor, new Reporter(errorReport, colorize)); 420 reporter = options.argv.jslint ? new JSLintReporter(errorReport) : options.argv.csv ? new CSVReporter(errorReport) : options.argv.checkstyle ? new CheckstyleReporter(errorReport) : (colorize = !options.argv.nocolor, new Reporter(errorReport, colorize)); 344 421 reporter.publish(); 345 422 return process.on('exit', function() { … … 348 425 }; 349 426 350 options = optimist.usage("Usage: coffeelint [options] source [...]").alias("f", "file").alias("h", "help").alias("v", "version").alias("s", "stdin").alias("q", "quiet").describe("f", "Specify a custom configuration file.").describe(" makeconfig", "Prints a default config file").describe("noconfig", "Ignores the environment variable COFFEELINT_CONFIG.").describe("h", "Print help information.").describe("v", "Print current version number.").describe("r", "Recursively lint .coffee files in subdirectories.").describe("csv", "Use the csv reporter.").describe("jslint", "Use the JSLint XML reporter.").describe("nocolor", "Don't colorize the output").describe("s", "Lint the source from stdin").describe("q", "Only print errors.").describe("literate", "Used with --stdin to process as Literate CoffeeScript").boolean("csv").boolean("jslint").boolean("nocolor").boolean("noconfig").boolean("makeconfig").boolean("literate").boolean("r").boolean("s").boolean("q", "Print errors only.");427 options = optimist.usage("Usage: coffeelint [options] source [...]").alias("f", "file").alias("h", "help").alias("v", "version").alias("s", "stdin").alias("q", "quiet").describe("f", "Specify a custom configuration file.").describe("rules", "Specify a custom rule or directory of rules.").describe("makeconfig", "Prints a default config file").describe("noconfig", "Ignores the environment variable COFFEELINT_CONFIG.").describe("h", "Print help information.").describe("v", "Print current version number.").describe("r", "(not used, but left for backward compatibility)").describe("csv", "Use the csv reporter.").describe("jslint", "Use the JSLint XML reporter.").describe("checkstyle", "Use the checkstyle XML reporter.").describe("nocolor", "Don't colorize the output").describe("s", "Lint the source from stdin").describe("q", "Only print errors.").describe("literate", "Used with --stdin to process as Literate CoffeeScript").boolean("csv").boolean("jslint").boolean("checkstyle").boolean("nocolor").boolean("noconfig").boolean("makeconfig").boolean("literate").boolean("r").boolean("s").boolean("q", "Print errors only."); 351 428 352 429 if (options.argv.v) { … … 366 443 process.exit(1); 367 444 } else { 368 config = {};445 config = null; 369 446 if (!options.argv.noconfig) { 370 existsFn = (_ref2 = fs.existsSync) != null ? _ref2 : path.existsSync;371 447 if (options.argv.f) { 372 448 config = JSON.parse(read(options.argv.f)); 373 } else if (process.env.COFFEELINT_CONFIG && existsFn(process.env.COFFEELINT_CONFIG)) {449 } else if (process.env.COFFEELINT_CONFIG && fs.existsSync(process.env.COFFEELINT_CONFIG)) { 374 450 config = JSON.parse(read(process.env.COFFEELINT_CONFIG)); 375 451 } 452 } 453 if (options.argv.rules) { 454 loadRules(options.argv.rules); 376 455 } 377 456 if (options.argv.s) { … … 385 464 stdin.on('end', function() { 386 465 var errorReport; 387 388 466 errorReport = lintSource(data, config, options.argv.literate); 389 467 return reportAndExit(errorReport, options); … … 391 469 } else { 392 470 paths = options.argv._; 393 scripts = options.argv.r ? findCoffeeScripts(paths) : paths;471 scripts = findCoffeeScripts(paths); 394 472 errorReport = lintFiles(scripts, config, options.argv.literate); 395 473 reportAndExit(errorReport, options); -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/browser.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 3 var CoffeeScript, compile, runScripts, … … 11 11 12 12 CoffeeScript["eval"] = function(code, options) { 13 var _ref;14 15 13 if (options == null) { 16 14 options = {}; 17 15 } 18 if ( (_ref = options.bare)== null) {16 if (options.bare == null) { 19 17 options.bare = true; 20 18 } … … 27 25 } 28 26 options.bare = true; 27 options.shiftLine = true; 29 28 return Function(compile(code, options))(); 30 29 }; … … 34 33 } 35 34 36 if ((typeof btoa !== "undefined" && btoa !== null) && (typeof JSON !== "undefined" && JSON !== null) ) {35 if ((typeof btoa !== "undefined" && btoa !== null) && (typeof JSON !== "undefined" && JSON !== null) && (typeof unescape !== "undefined" && unescape !== null) && (typeof encodeURIComponent !== "undefined" && encodeURIComponent !== null)) { 37 36 compile = function(code, options) { 38 37 var js, v3SourceMap, _ref; 39 40 38 if (options == null) { 41 39 options = {}; … … 44 42 options.inline = true; 45 43 _ref = CoffeeScript.compile(code, options), js = _ref.js, v3SourceMap = _ref.v3SourceMap; 46 return "" + js + "\n//@ sourceMappingURL=data:application/json;base64," + (btoa( v3SourceMap)) + "\n//@ sourceURL=coffeescript";44 return "" + js + "\n//@ sourceMappingURL=data:application/json;base64," + (btoa(unescape(encodeURIComponent(v3SourceMap)))) + "\n//@ sourceURL=coffeescript"; 47 45 }; 48 46 } … … 50 48 CoffeeScript.load = function(url, callback, options) { 51 49 var xhr; 52 53 50 if (options == null) { 54 51 options = {}; 55 52 } 56 53 options.sourceFiles = [url]; 57 xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest();54 xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') : new window.XMLHttpRequest(); 58 55 xhr.open('GET', url, true); 59 56 if ('overrideMimeType' in xhr) { … … 62 59 xhr.onreadystatechange = function() { 63 60 var _ref; 64 65 61 if (xhr.readyState === 4) { 66 62 if ((_ref = xhr.status) === 0 || _ref === 200) { … … 79 75 runScripts = function() { 80 76 var coffees, coffeetypes, execute, index, length, s, scripts; 81 82 scripts = document.getElementsByTagName('script'); 77 scripts = window.document.getElementsByTagName('script'); 83 78 coffeetypes = ['text/coffeescript', 'text/literate-coffeescript']; 84 79 coffees = (function() { 85 80 var _i, _len, _ref, _results; 86 87 81 _results = []; 88 82 for (_i = 0, _len = scripts.length; _i < _len; _i++) { … … 98 92 (execute = function() { 99 93 var mediatype, options, script; 100 101 94 script = coffees[index++]; 102 95 mediatype = script != null ? script.type : void 0; … … 118 111 119 112 if (window.addEventListener) { 120 addEventListener('DOMContentLoaded', runScripts, false);113 window.addEventListener('DOMContentLoaded', runScripts, false); 121 114 } else { 122 attachEvent('onload', runScripts);115 window.attachEvent('onload', runScripts); 123 116 } 124 117 -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/cake.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 3 var CoffeeScript, cakefileDirectory, existsSync, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks; … … 26 26 task: function(name, description, action) { 27 27 var _ref; 28 29 28 if (!action) { 30 29 _ref = [description, action], action = _ref[0], description = _ref[1]; … … 49 48 exports.run = function() { 50 49 var arg, args, e, _i, _len, _ref, _results; 51 52 50 global.__originalDirname = fs.realpathSync('.'); 53 51 process.chdir(cakefileDirectory(__originalDirname)); … … 77 75 printTasks = function() { 78 76 var cakefilePath, desc, name, relative, spaces, task; 79 80 77 relative = path.relative || path.resolve; 81 78 cakefilePath = path.join(relative(__originalDirname, process.cwd()), 'Cakefile'); … … 105 102 cakefileDirectory = function(dir) { 106 103 var parent; 107 108 104 if (existsSync(path.join(dir, 'Cakefile'))) { 109 105 return dir; -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/coffee-script.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 var Lexer, child_process, compile, ext, fork, formatSourcePosition, fs, helpers, lexer, loadFile, parser, patchStackTrace, patched, path, sourcemap, vm, _i, _len, _ref,3 var Lexer, Module, SourceMap, child_process, compile, ext, findExtension, fork, formatSourcePosition, fs, helpers, lexer, loadFile, parser, patchStackTrace, patched, path, sourceMaps, vm, _i, _len, _ref, 4 4 __hasProp = {}.hasOwnProperty; 5 5 … … 18 18 helpers = require('./helpers'); 19 19 20 sourcemap = require('./sourcemap');21 22 exports.VERSION = '1.6. 2';20 SourceMap = require('./sourcemap'); 21 22 exports.VERSION = '1.6.3'; 23 23 24 24 exports.helpers = helpers; 25 25 26 26 exports.compile = compile = function(code, options) { 27 var answer, currentColumn, currentLine, fragment, fragments, header, js, merge, newLines, sourceMap, _i, _len; 28 27 var answer, currentColumn, currentLine, fragment, fragments, header, js, map, merge, newLines, _i, _len; 29 28 if (options == null) { 30 29 options = {}; 31 30 } 32 merge = exports.helpers.merge;31 merge = helpers.merge; 33 32 if (options.sourceMap) { 34 sourceMap = new sourcemap.SourceMap();35 } 36 fragments = (parser.parse(lexer.tokenize(code, options))).compileToFragments(options);33 map = new SourceMap; 34 } 35 fragments = parser.parse(lexer.tokenize(code, options)).compileToFragments(options); 37 36 currentLine = 0; 38 if (options.header || options.inline) { 37 if (options.header) { 38 currentLine += 1; 39 } 40 if (options.shiftLine) { 39 41 currentLine += 1; 40 42 } … … 43 45 for (_i = 0, _len = fragments.length; _i < _len; _i++) { 44 46 fragment = fragments[_i]; 45 if ( sourceMap) {47 if (options.sourceMap) { 46 48 if (fragment.locationData) { 47 sourceMap.addMapping([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], {49 map.add([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], { 48 50 noReplace: true 49 51 }); … … 63 65 js: js 64 66 }; 65 if (sourceMap) { 66 answer.sourceMap = sourceMap; 67 answer.v3SourceMap = sourcemap.generateV3SourceMap(sourceMap, options, code); 68 } 67 answer.sourceMap = map; 68 answer.v3SourceMap = map.generate(options, code); 69 69 return answer; 70 70 } else { … … 86 86 87 87 exports.run = function(code, options) { 88 var answer, mainModule, _ref; 89 88 var answer, mainModule; 90 89 if (options == null) { 91 90 options = {}; 92 91 } 93 92 mainModule = require.main; 94 if ( (_ref = options.sourceMap)== null) {93 if (options.sourceMap == null) { 95 94 options.sourceMap = true; 96 95 } … … 101 100 answer = compile(code, options); 102 101 patchStackTrace(); 103 mainModule._sourceMaps[mainModule.filename] = answer.sourceMap;102 sourceMaps[mainModule.filename] = answer.sourceMap; 104 103 return mainModule._compile(answer.js, mainModule.filename); 105 104 } else { … … 110 109 exports["eval"] = function(code, options) { 111 110 var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref, _ref1, _require; 112 113 111 if (options == null) { 114 112 options = {}; … … 173 171 174 172 loadFile = function(module, filename) { 175 var raw, stripped; 176 173 var answer, raw, stripped; 177 174 raw = fs.readFileSync(filename, 'utf8'); 178 175 stripped = raw.charCodeAt(0) === 0xFEFF ? raw.substring(1) : raw; 179 return module._compile(compile(stripped, {176 answer = compile(stripped, { 180 177 filename: filename, 178 sourceMap: true, 181 179 literate: helpers.isLiterate(filename) 182 }), filename); 180 }); 181 sourceMaps[filename] = answer.sourceMap; 182 return module._compile(answer.js, filename); 183 183 }; 184 184 … … 189 189 require.extensions[ext] = loadFile; 190 190 } 191 Module = require('module'); 192 findExtension = function(filename) { 193 var curExtension, extensions; 194 extensions = path.basename(filename).split('.'); 195 if (extensions[0] === '') { 196 extensions.shift(); 197 } 198 while (extensions.shift()) { 199 curExtension = '.' + extensions.join('.'); 200 if (Module._extensions[curExtension]) { 201 return curExtension; 202 } 203 } 204 return '.js'; 205 }; 206 Module.prototype.load = function(filename) { 207 var extension; 208 this.filename = filename; 209 this.paths = Module._nodeModulePaths(path.dirname(filename)); 210 extension = findExtension(filename); 211 Module._extensions[extension](this, filename); 212 return this.loaded = true; 213 }; 191 214 } 192 215 … … 195 218 child_process.fork = function(path, args, options) { 196 219 var execPath; 197 198 220 if (args == null) { 199 221 args = []; … … 217 239 lex: function() { 218 240 var tag, token; 219 220 241 token = this.tokens[this.pos++]; 221 242 if (token) { … … 240 261 parser.yy.parseError = function(message, _arg) { 241 262 var token; 242 243 263 token = _arg.token; 244 264 message = "unexpected " + (token === 1 ? 'end of input' : token); … … 248 268 patched = false; 249 269 270 sourceMaps = {}; 271 250 272 patchStackTrace = function() { 251 273 var mainModule; 252 253 274 if (patched) { 254 275 return; … … 256 277 patched = true; 257 278 mainModule = require.main; 258 mainModule._sourceMaps = {};259 279 return Error.prepareStackTrace = function(err, stack) { 260 280 var frame, frames, getSourceMapping, sourceFiles, _ref1; 261 262 281 sourceFiles = {}; 263 282 getSourceMapping = function(filename, line, column) { 264 283 var answer, sourceMap; 265 266 sourceMap = mainModule._sourceMaps[filename]; 284 sourceMap = sourceMaps[filename]; 267 285 if (sourceMap) { 268 answer = sourceMap. getSourcePosition([line - 1, column - 1]);286 answer = sourceMap.sourceLocation([line - 1, column - 1]); 269 287 } 270 288 if (answer) { … … 276 294 frames = (function() { 277 295 var _j, _len1, _results; 278 279 296 _results = []; 280 297 for (_j = 0, _len1 = stack.length; _j < _len1; _j++) { … … 293 310 formatSourcePosition = function(frame, getSourceMapping) { 294 311 var as, column, fileLocation, fileName, functionName, isConstructor, isMethodCall, line, methodName, source, tp, typeName; 295 296 312 fileName = void 0; 297 313 fileLocation = ''; -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/command.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, exists, forkNode, fs, helpers, hidden, joinTimeout, lint, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, version, wait, watch, watchDir, watchers, writeJs, _ref;3 var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, exists, forkNode, fs, helpers, hidden, joinTimeout, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, useWinPathSep, version, wait, watch, watchDir, watchers, writeJs, _ref; 4 4 5 5 fs = require('fs'); … … 18 18 19 19 exists = fs.exists || path.exists; 20 21 useWinPathSep = path.sep === '\\'; 20 22 21 23 helpers.extend(CoffeeScript, new EventEmitter); … … 35 37 BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.'; 36 38 37 SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['- l', '--lint', 'pipe the compiled JavaScript through JavaScript Lint'], ['-m', '--map', 'generate source map and save as .map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']];39 SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-m', '--map', 'generate source map and save as .map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-l', '--literate', 'treat stdio as literate style coffee-script'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']]; 38 40 39 41 opts = {}; … … 51 53 exports.run = function() { 52 54 var literals, source, _i, _len, _results; 53 54 55 parseOptions(); 55 56 if (opts.nodejs) { … … 103 104 return fs.readdir(source, function(err, files) { 104 105 var file, index, _ref1, _ref2; 105 106 106 if (err && err.code !== 'ENOENT') { 107 107 throw err; … … 116 116 [].splice.apply(sources, [index, index - index + 1].concat(_ref1 = (function() { 117 117 var _i, _len, _results; 118 119 118 _results = []; 120 119 for (_i = 0, _len = files.length; _i < _len; _i++) { … … 153 152 compileScript = function(file, input, base) { 154 153 var compiled, err, message, o, options, t, task, useColors; 155 156 154 if (base == null) { 157 155 base = null; … … 190 188 } else if (o.compile || o.map) { 191 189 return writeJs(base, t.file, t.output, options.jsPath, t.sourceMap); 192 } else if (o.lint) {193 return lint(t.file, t.output);194 190 } 195 191 } … … 213 209 compileStdio = function() { 214 210 var code, stdin; 215 216 211 code = ''; 217 212 stdin = process.openStdin(); … … 244 239 watch = function(source, base) { 245 240 var compile, compileTimeout, e, prevStats, rewatch, watchErr, watcher; 246 247 241 prevStats = null; 248 242 compileTimeout = null; … … 301 295 watchDir = function(source, base) { 302 296 var e, readdirTimeout, watcher; 303 304 297 readdirTimeout = null; 305 298 try { … … 309 302 return fs.readdir(source, function(err, files) { 310 303 var file, _i, _len, _results; 311 312 304 if (err) { 313 305 if (err.code !== 'ENOENT') { … … 347 339 unwatchDir = function(source, base) { 348 340 var file, prevSources, toRemove, _i, _len; 349 350 341 prevSources = sources.slice(0); 351 342 toRemove = (function() { 352 343 var _i, _len, _results; 353 354 344 _results = []; 355 345 for (_i = 0, _len = sources.length; _i < _len; _i++) { … … 375 365 removeSource = function(source, base, removeJs) { 376 366 var index, jsPath; 377 378 367 index = sources.indexOf(source); 379 368 sources.splice(index, 1); … … 396 385 outputPath = function(source, base, extension) { 397 386 var baseDir, basename, dir, srcDir; 398 399 387 if (extension == null) { 400 388 extension = ".js"; 401 389 } 402 basename = helpers.baseFileName(source, true, path.sep);390 basename = helpers.baseFileName(source, true, useWinPathSep); 403 391 srcDir = path.dirname(source); 404 392 baseDir = base === '.' ? srcDir : srcDir.substring(base.length); … … 409 397 writeJs = function(base, sourcePath, js, jsPath, generatedSourceMap) { 410 398 var compile, jsDir, sourceMapPath; 411 412 399 if (generatedSourceMap == null) { 413 400 generatedSourceMap = null; … … 421 408 } 422 409 if (generatedSourceMap) { 423 js = "" + js + "\n/*\n//@ sourceMappingURL=" + (helpers.baseFileName(sourceMapPath, false, path.sep)) + "\n*/\n";410 js = "" + js + "\n/*\n//@ sourceMappingURL=" + (helpers.baseFileName(sourceMapPath, false, useWinPathSep)) + "\n*/\n"; 424 411 } 425 412 fs.writeFile(jsPath, js, function(err) { … … 456 443 }; 457 444 458 lint = function(file, js) {459 var conf, jsl, printIt;460 461 printIt = function(buffer) {462 return printLine(file + ':\t' + buffer.toString().trim());463 };464 conf = __dirname + '/../../extras/jsl.conf';465 jsl = spawn('jsl', ['-nologo', '-stdin', '-conf', conf]);466 jsl.stdout.on('data', printIt);467 jsl.stderr.on('data', printIt);468 jsl.stdin.write(js);469 return jsl.stdin.end();470 };471 472 445 printTokens = function(tokens) { 473 446 var strings, tag, token, value; 474 475 447 strings = (function() { 476 448 var _i, _len, _results; 477 478 449 _results = []; 479 450 for (_i = 0, _len = tokens.length; _i < _len; _i++) { … … 490 461 parseOptions = function() { 491 462 var i, o, source, _i, _len; 492 493 463 optionParser = new optparse.OptionParser(SWITCHES, BANNER); 494 464 o = opts = optionParser.parse(process.argv.slice(2)); 495 465 o.compile || (o.compile = !!o.output); 496 o.run = !(o.compile || o.print || o. lint || o.map);466 o.run = !(o.compile || o.print || o.map); 497 467 o.print = !!(o.print || (o["eval"] || o.stdio && o.compile)); 498 468 sources = o["arguments"]; … … 505 475 compileOptions = function(filename, base) { 506 476 var answer, cwd, jsDir, jsPath; 507 508 477 answer = { 509 478 filename: filename, 510 literate: helpers.isLiterate(filename),479 literate: opts.literate || helpers.isLiterate(filename), 511 480 bare: opts.bare, 512 481 header: opts.compile, … … 522 491 sourceRoot: path.relative(jsDir, cwd), 523 492 sourceFiles: [path.relative(cwd, filename)], 524 generatedFile: helpers.baseFileName(jsPath, false, path.sep)493 generatedFile: helpers.baseFileName(jsPath, false, useWinPathSep) 525 494 }); 526 495 } else { 527 496 answer = helpers.merge(answer, { 528 497 sourceRoot: "", 529 sourceFiles: [helpers.baseFileName(filename, false, path.sep)],530 generatedFile: helpers.baseFileName(filename, true, path.sep) + ".js"498 sourceFiles: [helpers.baseFileName(filename, false, useWinPathSep)], 499 generatedFile: helpers.baseFileName(filename, true, useWinPathSep) + ".js" 531 500 }); 532 501 } … … 537 506 forkNode = function() { 538 507 var args, nodeArgs; 539 540 508 nodeArgs = opts.nodejs.split(/\s+/); 541 509 args = process.argv.slice(1); -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/grammar.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 3 var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; … … 9 9 o = function(patternString, action, options) { 10 10 var addLocationDataFn, match, patternCount; 11 12 11 patternString = patternString.replace(/\s{2,}/g, ' '); 13 12 patternCount = patternString.split(' ').length; … … 352 351 }), o('CATCH Object Block', function() { 353 352 return [LOC(2)(new Value($2)), $3]; 353 }), o('CATCH Block', function() { 354 return [null, $2]; 354 355 }) 355 356 ], … … 596 597 grammar[name] = (function() { 597 598 var _i, _j, _len, _len1, _ref, _results; 598 599 599 _results = []; 600 600 for (_i = 0, _len = alternatives.length; _i < _len; _i++) { -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/helpers.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 3 var buildLocationData, extend, flatten, last, repeat, _ref; … … 9 9 exports.ends = function(string, literal, back) { 10 10 var len; 11 12 11 len = literal.length; 13 12 return literal === string.substr(string.length - len - (back || 0), len); … … 16 15 exports.repeat = repeat = function(str, n) { 17 16 var res; 18 19 17 res = ''; 20 18 while (n > 0) { … … 30 28 exports.compact = function(array) { 31 29 var item, _i, _len, _results; 32 33 30 _results = []; 34 31 for (_i = 0, _len = array.length; _i < _len; _i++) { … … 43 40 exports.count = function(string, substr) { 44 41 var num, pos; 45 46 42 num = pos = 0; 47 43 if (!substr.length) { … … 60 56 extend = exports.extend = function(object, properties) { 61 57 var key, val; 62 63 58 for (key in properties) { 64 59 val = properties[key]; … … 70 65 exports.flatten = flatten = function(array) { 71 66 var element, flattened, _i, _len; 72 73 67 flattened = []; 74 68 for (_i = 0, _len = array.length; _i < _len; _i++) { … … 85 79 exports.del = function(obj, key) { 86 80 var val; 87 88 81 val = obj[key]; 89 82 delete obj[key]; … … 97 90 exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) { 98 91 var e, _i, _len; 99 100 92 for (_i = 0, _len = this.length; _i < _len; _i++) { 101 93 e = this[_i]; … … 109 101 exports.invertLiterate = function(code) { 110 102 var line, lines, maybe_code; 111 112 103 maybe_code = true; 113 104 lines = (function() { 114 105 var _i, _len, _ref1, _results; 115 116 106 _ref1 = code.split('\n'); 117 107 _results = []; … … 155 145 exports.locationDataToString = function(obj) { 156 146 var locationData; 157 158 147 if (("2" in obj) && ("first_line" in obj[2])) { 159 148 locationData = obj[2]; … … 168 157 }; 169 158 170 exports.baseFileName = function(file, stripExt, pathSep) { 171 var parts; 172 159 exports.baseFileName = function(file, stripExt, useWinPathSep) { 160 var parts, pathSep; 173 161 if (stripExt == null) { 174 162 stripExt = false; 175 163 } 176 if (pathSep == null) { 177 pathSep = '/'; 178 } 164 if (useWinPathSep == null) { 165 useWinPathSep = false; 166 } 167 pathSep = useWinPathSep ? /\\|\// : /\//; 179 168 parts = file.split(pathSep); 180 169 file = parts[parts.length - 1]; … … 199 188 200 189 exports.throwSyntaxError = function(message, location) { 201 var error, _ref1, _ref2; 202 203 if ((_ref1 = location.last_line) == null) { 190 var error; 191 if (location.last_line == null) { 204 192 location.last_line = location.first_line; 205 193 } 206 if ( (_ref2 = location.last_column)== null) {194 if (location.last_column == null) { 207 195 location.last_column = location.first_column; 208 196 } … … 214 202 exports.prettyErrorMessage = function(error, fileName, code, useColors) { 215 203 var codeLine, colorize, end, first_column, first_line, last_column, last_line, marker, message, start, _ref1; 216 217 204 if (!error.location) { 218 205 return error.stack || ("" + error); -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/index.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 3 var key, val, _ref; -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/lexer.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, starts, throwSyntaxError, _ref, _ref1,3 var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1, 4 4 __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; 5 5 6 6 _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES; 7 7 8 _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError;8 _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; 9 9 10 10 exports.Lexer = Lexer = (function() { … … 13 13 Lexer.prototype.tokenize = function(code, opts) { 14 14 var consumed, i, tag, _ref2; 15 16 15 if (opts == null) { 17 16 opts = {}; … … 60 59 Lexer.prototype.identifierToken = function() { 61 60 var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4; 62 63 61 if (!(match = IDENTIFIER.exec(this.chunk))) { 64 62 return 0; … … 143 141 Lexer.prototype.numberToken = function() { 144 142 var binaryLiteral, lexedLength, match, number, octalLiteral; 145 146 143 if (!(match = NUMBER.exec(this.chunk))) { 147 144 return 0; … … 159 156 lexedLength = number.length; 160 157 if (octalLiteral = /^0o([0-7]+)/.exec(number)) { 161 number = '0x' + (parseInt(octalLiteral[1], 8)).toString(16);158 number = '0x' + parseInt(octalLiteral[1], 8).toString(16); 162 159 } 163 160 if (binaryLiteral = /^0b([01]+)/.exec(number)) { 164 number = '0x' + (parseInt(binaryLiteral[1], 2)).toString(16);161 number = '0x' + parseInt(binaryLiteral[1], 2).toString(16); 165 162 } 166 163 this.token('NUMBER', number, 0, lexedLength); … … 170 167 Lexer.prototype.stringToken = function() { 171 168 var match, octalEsc, string; 172 173 169 switch (this.chunk.charAt(0)) { 174 170 case "'": … … 203 199 Lexer.prototype.heredocToken = function() { 204 200 var doc, heredoc, match, quote; 205 206 201 if (!(match = HEREDOC.exec(this.chunk))) { 207 202 return 0; … … 227 222 Lexer.prototype.commentToken = function() { 228 223 var comment, here, match; 229 230 224 if (!(match = this.chunk.match(COMMENT))) { 231 225 return 0; … … 235 229 this.token('HERECOMMENT', this.sanitizeHeredoc(here, { 236 230 herecomment: true, 237 indent: Array(this.indent + 1).join(' ')231 indent: repeat(' ', this.indent) 238 232 }), 0, comment.length); 239 233 } … … 243 237 Lexer.prototype.jsToken = function() { 244 238 var match, script; 245 246 239 if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) { 247 240 return 0; … … 253 246 Lexer.prototype.regexToken = function() { 254 247 var flags, length, match, prev, regex, _ref2, _ref3; 255 256 248 if (this.chunk.charAt(0) !== '/') { 257 249 return 0; … … 281 273 Lexer.prototype.heregexToken = function(match) { 282 274 var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; 283 284 275 heregex = match[0], body = match[1], flags = match[2]; 285 276 if (0 > body.indexOf('#{')) { … … 335 326 Lexer.prototype.lineToken = function() { 336 327 var diff, indent, match, noNewlines, size; 337 338 328 if (!(match = MULTI_DENT.exec(this.chunk))) { 339 329 return 0; … … 372 362 Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) { 373 363 var dent, len; 374 375 364 while (moveOut > 0) { 376 365 len = this.indents.length - 1; … … 405 394 Lexer.prototype.whitespaceToken = function() { 406 395 var match, nline, prev; 407 408 396 if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) { 409 397 return 0; … … 439 427 Lexer.prototype.literalToken = function() { 440 428 var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5; 441 442 429 if (match = OPERATOR.exec(this.chunk)) { 443 430 value = match[0]; … … 506 493 Lexer.prototype.sanitizeHeredoc = function(doc, options) { 507 494 var attempt, herecomment, indent, match, _ref2; 508 509 495 indent = options.indent, herecomment = options.herecomment; 510 496 if (herecomment) { … … 534 520 Lexer.prototype.tagParameters = function() { 535 521 var i, stack, tok, tokens; 536 537 522 if (this.tag() !== ')') { 538 523 return this; … … 568 553 Lexer.prototype.balancedString = function(str, end) { 569 554 var continueCount, i, letter, match, prev, stack, _i, _ref2; 570 571 555 continueCount = 0; 572 556 stack = [end]; … … 604 588 Lexer.prototype.interpolateString = function(str, options) { 605 589 var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; 606 607 590 if (options == null) { 608 591 options = {}; … … 703 686 Lexer.prototype.pair = function(tag) { 704 687 var size, wanted; 705 706 688 if (tag !== (wanted = last(this.ends))) { 707 689 if ('OUTDENT' !== wanted) { … … 717 699 Lexer.prototype.getLineAndColumnFromChunk = function(offset) { 718 700 var column, lineCount, lines, string; 719 720 701 if (offset === 0) { 721 702 return [this.chunkLine, this.chunkColumn]; … … 730 711 if (lineCount > 0) { 731 712 lines = string.split('\n'); 732 column = (last(lines)).length;713 column = last(lines).length; 733 714 } else { 734 715 column += string.length; … … 739 720 Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) { 740 721 var lastCharacter, locationData, token, _ref2, _ref3; 741 742 722 if (offsetInChunk == null) { 743 723 offsetInChunk = 0; … … 756 736 Lexer.prototype.token = function(tag, value, offsetInChunk, length) { 757 737 var token; 758 759 738 token = this.makeToken(tag, value, offsetInChunk, length); 760 739 this.tokens.push(token); … … 764 743 Lexer.prototype.tag = function(index, tag) { 765 744 var tok; 766 767 745 return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]); 768 746 }; … … 770 748 Lexer.prototype.value = function(index, val) { 771 749 var tok; 772 773 750 return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]); 774 751 }; … … 776 753 Lexer.prototype.unfinished = function() { 777 754 var _ref2; 778 779 755 return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS'); 780 756 }; … … 828 804 COFFEE_ALIASES = (function() { 829 805 var _results; 830 831 806 _results = []; 832 807 for (key in COFFEE_ALIAS_MAP) { … … 902 877 BOOL = ['TRUE', 'FALSE']; 903 878 904 NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--' , ']'];905 906 NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING' );879 NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--']; 880 881 NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']'); 907 882 908 883 CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']; -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/nodes.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 3 var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, CodeFragment, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, last, locationDataToString, merge, multident, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, _ref2, _ref3, … … 39 39 function CodeFragment(parent, code) { 40 40 var _ref2; 41 42 41 this.code = "" + code; 43 42 this.locationData = parent != null ? parent.locationData : void 0; … … 46 45 47 46 CodeFragment.prototype.toString = function() { 48 return "" + this.code + [this.locationData ? ": " + locationDataToString(this.locationData) : void 0];47 return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : ''); 49 48 }; 50 49 … … 55 54 fragmentsToText = function(fragments) { 56 55 var fragment; 57 58 56 return ((function() { 59 57 var _i, _len, _results; 60 61 58 _results = []; 62 59 for (_i = 0, _len = fragments.length; _i < _len; _i++) { … … 77 74 Base.prototype.compileToFragments = function(o, lvl) { 78 75 var node; 79 80 76 o = extend({}, o); 81 77 if (lvl) { … … 93 89 Base.prototype.compileClosure = function(o) { 94 90 var jumpNode; 95 96 91 if (jumpNode = this.jumps()) { 97 92 jumpNode.error('cannot use a pure statement in an expression'); … … 103 98 Base.prototype.cache = function(o, level, reused) { 104 99 var ref, sub; 105 106 100 if (!this.isComplex()) { 107 101 ref = level ? this.compileToFragments(o, level) : this; … … 124 118 Base.prototype.makeReturn = function(res) { 125 119 var me; 126 127 120 me = this.unwrapAll(); 128 121 if (res) { … … 135 128 Base.prototype.contains = function(pred) { 136 129 var node; 137 138 130 node = void 0; 139 131 this.traverseChildren(false, function(n) { … … 148 140 Base.prototype.lastNonComment = function(list) { 149 141 var i; 150 151 142 i = list.length; 152 143 while (i--) { … … 160 151 Base.prototype.toString = function(idt, name) { 161 152 var tree; 162 163 153 if (idt == null) { 164 154 idt = ''; … … 179 169 Base.prototype.eachChild = function(func) { 180 170 var attr, child, _i, _j, _len, _len1, _ref2, _ref3; 181 182 171 if (!this.children) { 183 172 return this; … … 201 190 Base.prototype.traverseChildren = function(crossScope, func) { 202 191 return this.eachChild(function(child) { 203 if (func(child) === false) { 204 return false; 205 } 206 return child.traverseChildren(crossScope, func); 192 var recur; 193 recur = func(child); 194 if (recur !== false) { 195 return child.traverseChildren(crossScope, func); 196 } 207 197 }); 208 198 }; … … 214 204 Base.prototype.unwrapAll = function() { 215 205 var node; 216 217 206 node = this; 218 207 while (node !== (node = node.unwrap())) { … … 261 250 Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) { 262 251 var answer, fragments, i, _i, _len; 263 264 252 answer = []; 265 253 for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) { … … 314 302 Block.prototype.isStatement = function(o) { 315 303 var exp, _i, _len, _ref2; 316 317 304 _ref2 = this.expressions; 318 305 for (_i = 0, _len = _ref2.length; _i < _len; _i++) { … … 327 314 Block.prototype.jumps = function(o) { 328 315 var exp, _i, _len, _ref2; 329 330 316 _ref2 = this.expressions; 331 317 for (_i = 0, _len = _ref2.length; _i < _len; _i++) { … … 339 325 Block.prototype.makeReturn = function(res) { 340 326 var expr, len; 341 342 327 len = this.expressions.length; 343 328 while (len--) { … … 367 352 Block.prototype.compileNode = function(o) { 368 353 var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2; 369 370 354 this.tab = o.indent; 371 355 top = o.level === LEVEL_TOP; … … 411 395 Block.prototype.compileRoot = function(o) { 412 396 var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2; 413 414 397 o.indent = o.bare ? '' : TAB; 415 398 o.level = LEVEL_TOP; … … 425 408 preludeExps = (function() { 426 409 var _j, _len1, _ref3, _results; 427 428 410 _ref3 = this.expressions; 429 411 _results = []; … … 456 438 Block.prototype.compileWithDeclarations = function(o) { 457 439 var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4; 458 459 440 fragments = []; 460 441 post = []; … … 495 476 fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB)))); 496 477 } 497 fragments.push(this.makeCode(';\n\n')); 478 fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : ''))); 479 } else if (fragments.length && post.length) { 480 fragments.push(this.makeCode("\n")); 498 481 } 499 482 } … … 533 516 Literal.prototype.isStatement = function() { 534 517 var _ref2; 535 536 518 return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger'; 537 519 }; … … 554 536 Literal.prototype.compileNode = function(o) { 555 537 var answer, code, _ref2; 556 557 538 code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value; 558 539 answer = this.isStatement() ? "" + this.tab + code + ";" : code; … … 646 627 Return.prototype.compileToFragments = function(o, level) { 647 628 var expr, _ref4; 648 649 629 expr = (_ref4 = this.expression) != null ? _ref4.makeReturn() : void 0; 650 630 if (expr && !(expr instanceof Return)) { … … 657 637 Return.prototype.compileNode = function(o) { 658 638 var answer; 659 660 639 answer = []; 661 answer.push(this.makeCode(this.tab + ("return" + [this.expression ? " " : void 0])));640 answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : "")))); 662 641 if (this.expression) { 663 642 answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN)); … … 719 698 Value.prototype.isAtomic = function() { 720 699 var node, _i, _len, _ref4; 721 722 700 _ref4 = this.properties.concat(this.base); 723 701 for (_i = 0, _len = _ref4.length; _i < _len; _i++) { … … 763 741 Value.prototype.cacheReference = function(o) { 764 742 var base, bref, name, nref; 765 766 743 name = last(this.properties); 767 744 if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) { … … 786 763 Value.prototype.compileNode = function(o) { 787 764 var fragments, prop, props, _i, _len; 788 789 765 this.base.front = this.front; 790 766 props = this.properties; … … 801 777 802 778 Value.prototype.unfoldSoak = function(o) { 803 var _ref4, 804 _this = this; 805 806 return (_ref4 = this.unfoldedSoak) != null ? _ref4 : this.unfoldedSoak = (function() { 807 var fst, i, ifn, prop, ref, snd, _i, _len, _ref5, _ref6; 808 779 var _this = this; 780 return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function() { 781 var fst, i, ifn, prop, ref, snd, _i, _len, _ref4, _ref5; 809 782 if (ifn = _this.base.unfoldSoak(o)) { 810 (_ref 5 = ifn.body.properties).push.apply(_ref5, _this.properties);783 (_ref4 = ifn.body.properties).push.apply(_ref4, _this.properties); 811 784 return ifn; 812 785 } 813 _ref 6= _this.properties;814 for (i = _i = 0, _len = _ref 6.length; _i < _len; i = ++_i) {815 prop = _ref 6[i];786 _ref5 = _this.properties; 787 for (i = _i = 0, _len = _ref5.length; _i < _len; i = ++_i) { 788 prop = _ref5[i]; 816 789 if (!prop.soak) { 817 790 continue; … … 850 823 Comment.prototype.compileNode = function(o, level) { 851 824 var code; 852 853 code = '/*' + multident(this.comment, this.tab) + ("\n" + this.tab + "*/\n"); 825 code = "/*" + (multident(this.comment, this.tab)) + (__indexOf.call(this.comment, '\n') >= 0 ? "\n" + this.tab : '') + "*/\n"; 854 826 if ((level || o.level) === LEVEL_TOP) { 855 827 code = o.indent + code; … … 877 849 Call.prototype.newInstance = function() { 878 850 var base, _ref4; 879 880 851 base = ((_ref4 = this.variable) != null ? _ref4.base : void 0) || this.variable; 881 852 if (base instanceof Call && !base.isNew) { … … 889 860 Call.prototype.superReference = function(o) { 890 861 var accesses, method; 891 892 862 method = o.scope.namedMethod(); 893 863 if (method != null ? method.klass : void 0) { … … 907 877 Call.prototype.superThis = function(o) { 908 878 var method; 909 910 879 method = o.scope.method; 911 880 return (method && !method.klass && method.context) || "this"; … … 914 883 Call.prototype.unfoldSoak = function(o) { 915 884 var call, ifn, left, list, rite, _i, _len, _ref4, _ref5; 916 917 885 if (this.soak) { 918 886 if (this.variable) { … … 965 933 Call.prototype.compileNode = function(o) { 966 934 var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref4, _ref5; 967 968 935 if ((_ref4 = this.variable) != null) { 969 936 _ref4.front = this.front; … … 1003 970 Call.prototype.compileSplat = function(o, splatArgs) { 1004 971 var answer, base, fun, idt, name, ref; 1005 1006 972 if (this.isSuper) { 1007 973 return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")")); … … 1067 1033 Access.prototype.compileToFragments = function(o) { 1068 1034 var name; 1069 1070 1035 name = this.name.compileToFragments(o); 1071 1036 if (IDENTIFIER.test(fragmentsToText(name))) { … … 1119 1084 Range.prototype.compileVariables = function(o) { 1120 1085 var step, _ref4, _ref5, _ref6, _ref7; 1121 1122 1086 o = merge(o, { 1123 1087 top: true … … 1136 1100 Range.prototype.compileNode = function(o) { 1137 1101 var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref4, _ref5; 1138 1139 1102 if (!this.fromVar) { 1140 1103 this.compileVariables(o); … … 1168 1131 Range.prototype.compileArray = function(o) { 1169 1132 var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref4, _ref5, _results; 1170 1171 1133 if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) { 1172 1134 range = (function() { … … 1220 1182 Slice.prototype.compileNode = function(o) { 1221 1183 var compiled, compiledText, from, fromCompiled, to, toStr, _ref4; 1222 1223 1184 _ref4 = this.range, to = _ref4.to, from = _ref4.from; 1224 1185 fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')]; … … 1249 1210 Obj.prototype.compileNode = function(o) { 1250 1211 var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1; 1251 1252 1212 props = this.properties; 1253 1213 if (!props.length) { … … 1270 1230 indent = prop instanceof Comment ? '' : idt; 1271 1231 if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) { 1272 throw new SyntaxError('Invalid object key');1232 prop.variable.error('Invalid object key'); 1273 1233 } 1274 1234 if (prop instanceof Value && prop["this"]) { … … 1300 1260 Obj.prototype.assigns = function(name) { 1301 1261 var prop, _i, _len, _ref4; 1302 1303 1262 _ref4 = this.properties; 1304 1263 for (_i = 0, _len = _ref4.length; _i < _len; _i++) { … … 1326 1285 Arr.prototype.compileNode = function(o) { 1327 1286 var answer, compiledObjs, fragments, index, obj, _i, _len; 1328 1329 1287 if (!this.objects.length) { 1330 1288 return [this.makeCode('[]')]; … … 1338 1296 compiledObjs = (function() { 1339 1297 var _i, _len, _ref4, _results; 1340 1341 1298 _ref4 = this.objects; 1342 1299 _results = []; … … 1354 1311 answer.push.apply(answer, fragments); 1355 1312 } 1356 if ( (fragmentsToText(answer)).indexOf('\n') >= 0) {1313 if (fragmentsToText(answer).indexOf('\n') >= 0) { 1357 1314 answer.unshift(this.makeCode("[\n" + o.indent)); 1358 1315 answer.push(this.makeCode("\n" + this.tab + "]")); … … 1366 1323 Arr.prototype.assigns = function(name) { 1367 1324 var obj, _i, _len, _ref4; 1368 1369 1325 _ref4 = this.objects; 1370 1326 for (_i = 0, _len = _ref4.length; _i < _len; _i++) { … … 1396 1352 Class.prototype.determineName = function() { 1397 1353 var decl, tail; 1398 1399 1354 if (!this.variable) { 1400 1355 return null; … … 1425 1380 Class.prototype.addBoundFunctions = function(o) { 1426 1381 var bvar, lhs, _i, _len, _ref4; 1427 1428 1382 _ref4 = this.boundFuncs; 1429 1383 for (_i = 0, _len = _ref4.length; _i < _len; _i++) { … … 1436 1390 Class.prototype.addProperties = function(node, name, o) { 1437 1391 var assign, base, exprs, func, props; 1438 1439 1392 props = node.base.properties.slice(0); 1440 1393 exprs = (function() { 1441 1394 var _results; 1442 1443 1395 _results = []; 1444 1396 while (assign = props.shift()) { … … 1484 1436 Class.prototype.walkBody = function(name, o) { 1485 1437 var _this = this; 1486 1487 1438 return this.traverseChildren(false, function(child) { 1488 1439 var cont, exps, i, node, _i, _len, _ref4; 1489 1490 1440 cont = true; 1491 1441 if (child instanceof Class) { … … 1509 1459 Class.prototype.hoistDirectivePrologue = function() { 1510 1460 var expressions, index, node; 1511 1512 1461 index = 0; 1513 1462 expressions = this.body.expressions; … … 1520 1469 Class.prototype.ensureConstructor = function(name, o) { 1521 1470 var missing, ref, superCall; 1522 1523 1471 missing = !this.ctor; 1524 1472 this.ctor || (this.ctor = new Code); … … 1550 1498 Class.prototype.compileNode = function(o) { 1551 1499 var call, decl, klass, lname, name, params, _ref4; 1552 1553 1500 decl = this.determineName(); 1554 1501 name = decl || '_Class'; … … 1591 1538 function Assign(variable, value, context, options) { 1592 1539 var forbidden, name, _ref4; 1593 1594 1540 this.variable = variable; 1595 1541 this.value = value; … … 1619 1565 Assign.prototype.compileNode = function(o) { 1620 1566 var answer, compiledName, isValue, match, name, val, varBase, _ref4, _ref5, _ref6, _ref7; 1621 1622 1567 if (isValue = this.variable instanceof Value) { 1623 1568 if (this.variable.isArray() || this.variable.isObject()) { … … 1666 1611 Assign.prototype.compilePatternMatch = function(o) { 1667 1612 var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; 1668 1669 1613 top = o.level === LEVEL_TOP; 1670 1614 value = this.value; … … 1764 1708 Assign.prototype.compileConditional = function(o) { 1765 1709 var left, right, _ref4; 1766 1767 1710 _ref4 = this.variable.cacheReference(o), left = _ref4[0], right = _ref4[1]; 1768 1711 if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) { … … 1777 1720 Assign.prototype.compileSplice = function(o) { 1778 1721 var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref4, _ref5, _ref6; 1779 1780 1722 _ref4 = this.variable.properties.pop().range, from = _ref4.from, to = _ref4.to, exclusive = _ref4.exclusive; 1781 1723 name = this.variable.compile(o); … … 1835 1777 Code.prototype.compileNode = function(o) { 1836 1778 var answer, code, exprs, i, idt, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref4, _ref5, _ref6, _ref7, _ref8; 1837 1838 1779 o.scope = new Scope(o.scope, this.body, this); 1839 1780 o.scope.shared = del(o, 'sharedScope'); … … 1866 1807 splats = new Assign(new Value(new Arr((function() { 1867 1808 var _k, _len2, _ref6, _results; 1868 1869 1809 _ref6 = this.params; 1870 1810 _results = []; … … 1960 1900 Code.prototype.eachParamName = function(iterator) { 1961 1901 var param, _i, _len, _ref4, _results; 1962 1963 1902 _ref4 = this.params; 1964 1903 _results = []; … … 1985 1924 function Param(name, value, splat) { 1986 1925 var _ref4; 1987 1988 1926 this.name = name; 1989 1927 this.value = value; … … 2002 1940 Param.prototype.asReference = function(o) { 2003 1941 var node; 2004 2005 1942 if (this.reference) { 2006 1943 return this.reference; … … 2028 1965 Param.prototype.eachName = function(iterator, name) { 2029 1966 var atParam, node, obj, _i, _len, _ref4; 2030 2031 1967 if (name == null) { 2032 1968 name = this.name; … … 2034 1970 atParam = function(obj) { 2035 1971 var node; 2036 2037 1972 node = obj.properties[0].name; 2038 1973 if (!node.value.reserved) { … … 2097 2032 Splat.compileSplattedArray = function(o, list, apply) { 2098 2033 var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len; 2099 2100 2034 index = -1; 2101 2035 while ((node = list[++index]) && !(node instanceof Splat)) { … … 2126 2060 base = (function() { 2127 2061 var _j, _len1, _ref4, _results; 2128 2129 2062 _ref4 = list.slice(0, index); 2130 2063 _results = []; … … 2174 2107 While.prototype.jumps = function() { 2175 2108 var expressions, node, _i, _len; 2176 2177 2109 expressions = this.body.expressions; 2178 2110 if (!expressions.length) { … … 2192 2124 While.prototype.compileNode = function(o) { 2193 2125 var answer, body, rvar, set; 2194 2195 2126 o.indent += TAB; 2196 2127 set = ''; 2197 2128 body = this.body; 2198 2129 if (body.isEmpty()) { 2199 body = '';2130 body = this.makeCode(''); 2200 2131 } else { 2201 2132 if (this.returns) { … … 2273 2204 Op.prototype.isComplex = function() { 2274 2205 var _ref4; 2275 2276 2206 return !(this.isUnary() && ((_ref4 = this.operator) === '+' || _ref4 === '-')) || this.first.isComplex(); 2277 2207 }; … … 2279 2209 Op.prototype.isChainable = function() { 2280 2210 var _ref4; 2281 2282 2211 return (_ref4 = this.operator) === '<' || _ref4 === '>' || _ref4 === '>=' || _ref4 === '<=' || _ref4 === '===' || _ref4 === '!=='; 2283 2212 }; … … 2285 2214 Op.prototype.invert = function() { 2286 2215 var allInvertable, curr, fst, op, _ref4; 2287 2288 2216 if (this.isChainable() && this.first.isChainable()) { 2289 2217 allInvertable = true; … … 2320 2248 Op.prototype.unfoldSoak = function(o) { 2321 2249 var _ref4; 2322 2323 2250 return ((_ref4 = this.operator) === '++' || _ref4 === '--' || _ref4 === 'delete') && unfoldSoak(o, this, 'first'); 2324 2251 }; … … 2326 2253 Op.prototype.generateDo = function(exp) { 2327 2254 var call, func, param, passedParams, ref, _i, _len, _ref4; 2328 2329 2255 passedParams = []; 2330 2256 func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp; … … 2346 2272 Op.prototype.compileNode = function(o) { 2347 2273 var answer, isChain, _ref4, _ref5; 2348 2349 2274 isChain = this.isChainable() && this.first.isChainable(); 2350 2275 if (!isChain) { … … 2376 2301 Op.prototype.compileChain = function(o) { 2377 2302 var fragments, fst, shared, _ref4; 2378 2379 2303 _ref4 = this.first.second.cache(o), this.first.second = _ref4[0], shared = _ref4[1]; 2380 2304 fst = this.first.compileToFragments(o, LEVEL_OP); … … 2385 2309 Op.prototype.compileExistence = function(o) { 2386 2310 var fst, ref; 2387 2388 if (this.first.isComplex()) { 2311 if (!o.isExistentialEquals && this.first.isComplex()) { 2389 2312 ref = new Literal(o.scope.freeVariable('ref')); 2390 2313 fst = new Parens(new Assign(ref, this.first)); … … 2400 2323 Op.prototype.compileUnary = function(o) { 2401 2324 var op, parts, plusMinus; 2402 2403 2325 parts = []; 2404 2326 op = this.operator; … … 2447 2369 In.prototype.compileNode = function(o) { 2448 2370 var hasSplat, obj, _i, _len, _ref4; 2449 2450 2371 if (this.array instanceof Value && this.array.isArray()) { 2451 2372 _ref4 = this.array.base.objects; … … 2467 2388 In.prototype.compileOrTest = function(o) { 2468 2389 var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref4, _ref5, _ref6; 2469 2470 2390 if (this.array.base.objects.length === 0) { 2471 2391 return [this.makeCode("" + (!!this.negated))]; … … 2491 2411 In.prototype.compileLoopTest = function(o) { 2492 2412 var fragments, ref, sub, _ref4; 2493 2494 2413 _ref4 = this.object.cache(o, LEVEL_LIST), sub = _ref4[0], ref = _ref4[1]; 2495 2414 fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0'))); 2496 if ( (fragmentsToText(sub)) === (fragmentsToText(ref))) {2415 if (fragmentsToText(sub) === fragmentsToText(ref)) { 2497 2416 return fragments; 2498 2417 } … … 2529 2448 Try.prototype.jumps = function(o) { 2530 2449 var _ref4; 2531 2532 2450 return this.attempt.jumps(o) || ((_ref4 = this.recovery) != null ? _ref4.jumps(o) : void 0); 2533 2451 }; … … 2544 2462 2545 2463 Try.prototype.compileNode = function(o) { 2546 var catchPart, ensurePart, placeholder, tryPart, _ref4; 2547 2464 var catchPart, ensurePart, placeholder, tryPart; 2548 2465 o.indent += TAB; 2549 2466 tryPart = this.attempt.compileToFragments(o, LEVEL_TOP); 2550 catchPart = this.recovery ? (placeholder = new Literal('_error'), this. recovery.unshift(new Assign(this.errorVariable, placeholder)), this.errorVariable = placeholder, (_ref4 = this.errorVariable.value, __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0) ? this.errorVariable.error("catch variable may not be \"" + this.errorVariable.value + "\"") : void 0, [].concat(this.makeCode(" catch ("), this.errorVariable.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : [];2467 catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : []; 2551 2468 ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : []; 2552 2469 return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart); … … 2593 2510 Existence.prototype.compileNode = function(o) { 2594 2511 var cmp, cnj, code, _ref4; 2595 2596 2512 this.expression.front = this.front; 2597 2513 code = this.expression.compile(o, LEVEL_OP); … … 2628 2544 Parens.prototype.compileNode = function(o) { 2629 2545 var bare, expr, fragments; 2630 2631 2546 expr = this.body.unwrap(); 2632 2547 if (expr instanceof Value && expr.isAtomic()) { … … 2652 2567 function For(body, source) { 2653 2568 var _ref4; 2654 2655 2569 this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index; 2656 2570 this.body = Block.wrap([body]); … … 2671 2585 this.name.error('cannot pattern match over range loops'); 2672 2586 } 2587 if (this.own && !this.object) { 2588 this.index.error('cannot use own with for-in'); 2589 } 2673 2590 this.returns = false; 2674 2591 } … … 2678 2595 For.prototype.compileNode = function(o) { 2679 2596 var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref4, _ref5; 2680 2681 2597 body = Block.wrap([this.body]); 2682 2598 lastJumps = (_ref4 = last(body.expressions)) != null ? _ref4.jumps() : void 0; … … 2792 2708 For.prototype.pluckDirectCall = function(o, body) { 2793 2709 var base, defs, expr, fn, idx, ref, val, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; 2794 2795 2710 defs = []; 2796 2711 _ref4 = body.expressions; … … 2836 2751 Switch.prototype.jumps = function(o) { 2837 2752 var block, conds, _i, _len, _ref4, _ref5, _ref6; 2838 2839 2753 if (o == null) { 2840 2754 o = { … … 2854 2768 Switch.prototype.makeReturn = function(res) { 2855 2769 var pair, _i, _len, _ref4, _ref5; 2856 2857 2770 _ref4 = this.cases; 2858 2771 for (_i = 0, _len = _ref4.length; _i < _len; _i++) { … … 2871 2784 Switch.prototype.compileNode = function(o) { 2872 2785 var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref4, _ref5, _ref6; 2873 2874 2786 idt1 = o.indent + TAB; 2875 2787 idt2 = o.indent = idt1 + TAB; … … 2927 2839 If.prototype.bodyNode = function() { 2928 2840 var _ref4; 2929 2930 2841 return (_ref4 = this.body) != null ? _ref4.unwrap() : void 0; 2931 2842 }; … … 2933 2844 If.prototype.elseBodyNode = function() { 2934 2845 var _ref4; 2935 2936 2846 return (_ref4 = this.elseBody) != null ? _ref4.unwrap() : void 0; 2937 2847 }; … … 2949 2859 If.prototype.isStatement = function(o) { 2950 2860 var _ref4; 2951 2952 2861 return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref4 = this.elseBodyNode()) != null ? _ref4.isStatement(o) : void 0); 2953 2862 }; … … 2955 2864 If.prototype.jumps = function(o) { 2956 2865 var _ref4; 2957 2958 2866 return this.body.jumps(o) || ((_ref4 = this.elseBody) != null ? _ref4.jumps(o) : void 0); 2959 2867 }; … … 2986 2894 If.prototype.compileStatement = function(o) { 2987 2895 var answer, body, child, cond, exeq, ifPart, indent; 2988 2989 2896 child = del(o, 'chainChild'); 2990 2897 exeq = del(o, 'isExistentialEquals'); … … 3020 2927 If.prototype.compileExpression = function(o) { 3021 2928 var alt, body, cond, fragments; 3022 3023 2929 cond = this.condition.compileToFragments(o, LEVEL_COND); 3024 2930 body = this.bodyNode().compileToFragments(o, LEVEL_LIST); … … 3043 2949 wrap: function(expressions, statement, noReturn) { 3044 2950 var args, argumentsNode, call, func, meth; 3045 3046 2951 if (expressions.jumps()) { 3047 2952 return expressions; … … 3079 2984 unfoldSoak = function(o, parent, name) { 3080 2985 var ifn; 3081 3082 2986 if (!(ifn = parent[name].unfoldSoak(o))) { 3083 2987 return; … … 3132 3036 utility = function(name) { 3133 3037 var ref; 3134 3135 3038 ref = "__" + name; 3136 3039 Scope.root.assign(ref, UTILITIES[name]()); -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/optparse.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments; 3 var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat; 4 5 repeat = require('./helpers').repeat; 4 6 5 7 exports.OptionParser = OptionParser = (function() { … … 11 13 OptionParser.prototype.parse = function(args) { 12 14 var arg, i, isOption, matchedRule, options, originalArgs, pos, rule, seenNonOptionArg, skippingArgument, value, _i, _j, _len, _len1, _ref; 13 14 15 options = { 15 16 "arguments": [] … … 60 61 OptionParser.prototype.help = function() { 61 62 var letPart, lines, rule, spaces, _i, _len, _ref; 62 63 63 lines = []; 64 64 if (this.banner) { … … 69 69 rule = _ref[_i]; 70 70 spaces = 15 - rule.longFlag.length; 71 spaces = spaces > 0 ? Array(spaces + 1).join(' ') : '';71 spaces = spaces > 0 ? repeat(' ', spaces) : ''; 72 72 letPart = rule.shortFlag ? rule.shortFlag + ', ' : ' '; 73 73 lines.push(' ' + letPart + rule.longFlag + spaces + rule.description); … … 90 90 buildRules = function(rules) { 91 91 var tuple, _i, _len, _results; 92 93 92 _results = []; 94 93 for (_i = 0, _len = rules.length; _i < _len; _i++) { … … 104 103 buildRule = function(shortFlag, longFlag, description, options) { 105 104 var match; 106 107 105 if (options == null) { 108 106 options = {}; … … 122 120 normalizeArguments = function(args) { 123 121 var arg, l, match, result, _i, _j, _len, _len1, _ref; 124 125 122 args = args.slice(0); 126 123 result = []; -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/parser.js
r484 r516 5 5 symbols_: {"error":2,"Root":3,"Body":4,"Block":5,"TERMINATOR":6,"Line":7,"Expression":8,"Statement":9,"Return":10,"Comment":11,"STATEMENT":12,"Value":13,"Invocation":14,"Code":15,"Operation":16,"Assign":17,"If":18,"Try":19,"While":20,"For":21,"Switch":22,"Class":23,"Throw":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1}, 6 6 terminals_: {2:"error",6:"TERMINATOR",12:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"}, 7 productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[ 24,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]],7 productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[97,2],[24,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]], 8 8 performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) { 9 9 … … 288 288 case 138:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]); 289 289 break; 290 case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); 291 break; 292 case 140:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); 293 break; 294 case 141:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); 295 break; 296 case 142:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); 297 break; 298 case 143:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { 290 case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]); 291 break; 292 case 140:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); 293 break; 294 case 141:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); 295 break; 296 case 142:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); 297 break; 298 case 143:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); 299 break; 300 case 144:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { 299 301 guard: $$[$0] 300 302 })); 301 303 break; 302 case 14 4:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], {304 case 145:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], { 303 305 invert: true 304 306 })); 305 307 break; 306 case 14 5:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {308 case 146:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { 307 309 invert: true, 308 310 guard: $$[$0] 309 311 })); 310 312 break; 311 case 146:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); 312 break; 313 case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); 313 case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); 314 314 break; 315 315 case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); 316 316 break; 317 case 149:this.$ = yy.addLocationDataFn(_$[$0 ], _$[$0])($$[$0]);318 break; 319 case 150:this.$ = yy.addLocationDataFn(_$[$0 -1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0]));320 break; 321 case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody( yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]]))));322 break; 323 case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy. For($$[$0-1], $$[$0]));317 case 149:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); 318 break; 319 case 150:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]); 320 break; 321 case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0])); 322 break; 323 case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]])))); 324 324 break; 325 325 case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); 326 326 break; 327 case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); 328 break; 329 case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ 327 case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); 328 break; 329 case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); 330 break; 331 case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ 330 332 source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0])) 331 333 }); 332 334 break; 333 case 15 6:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () {335 case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () { 334 336 $$[$0].own = $$[$0-1].own; 335 337 $$[$0].name = $$[$0-1][0]; … … 338 340 }())); 339 341 break; 340 case 15 7:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]);341 break; 342 case 15 8:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {342 case 158:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]); 343 break; 344 case 159:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { 343 345 $$[$0].own = true; 344 346 return $$[$0]; 345 347 }())); 346 348 break; 347 case 159:this.$ = $$[$0];348 break;349 349 case 160:this.$ = $$[$0]; 350 350 break; 351 case 161:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));351 case 161:this.$ = $$[$0]; 352 352 break; 353 353 case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); 354 354 break; 355 case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); 356 break; 357 case 164:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); 358 break; 359 case 165:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ 355 case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); 356 break; 357 case 164:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); 358 break; 359 case 165:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); 360 break; 361 case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ 360 362 source: $$[$0] 361 363 }); 362 364 break; 363 case 16 6:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({365 case 167:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ 364 366 source: $$[$0], 365 367 object: true 366 368 }); 367 369 break; 368 case 16 7:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({370 case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ 369 371 source: $$[$0-2], 370 372 guard: $$[$0] 371 373 }); 372 374 break; 373 case 16 8:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({375 case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ 374 376 source: $$[$0-2], 375 377 guard: $$[$0], … … 377 379 }); 378 380 break; 379 case 1 69:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({381 case 170:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ 380 382 source: $$[$0-2], 381 383 step: $$[$0] 382 384 }); 383 385 break; 384 case 17 0:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({386 case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ 385 387 source: $$[$0-4], 386 388 guard: $$[$0-2], … … 388 390 }); 389 391 break; 390 case 17 1:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({392 case 172:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ 391 393 source: $$[$0-4], 392 394 step: $$[$0-2], … … 394 396 }); 395 397 break; 396 case 17 2:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1]));397 break; 398 case 17 3:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]));399 break; 400 case 17 4:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1]));401 break; 402 case 17 5:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1]));403 break; 404 case 17 6:this.$ = $$[$0];405 break; 406 case 17 7:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0]));407 break; 408 case 17 8:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]);409 break; 410 case 1 79:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]);411 break; 412 case 18 0:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {398 case 173:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1])); 399 break; 400 case 174:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1])); 401 break; 402 case 175:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1])); 403 break; 404 case 176:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1])); 405 break; 406 case 177:this.$ = $$[$0]; 407 break; 408 case 178:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0])); 409 break; 410 case 179:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]); 411 break; 412 case 180:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]); 413 break; 414 case 181:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { 413 415 type: $$[$0-2] 414 416 })); 415 417 break; 416 case 18 1:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], {418 case 182:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], { 417 419 type: $$[$0-2] 418 420 }))); 419 421 break; 420 case 182:this.$ = $$[$0]; 421 break; 422 case 183:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); 423 break; 424 case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { 425 type: $$[$0-1], 426 statement: true 427 })); 422 case 183:this.$ = $$[$0]; 423 break; 424 case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); 428 425 break; 429 426 case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { … … 432 429 })); 433 430 break; 434 case 186:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); 435 break; 436 case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); 437 break; 438 case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); 439 break; 440 case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); 441 break; 442 case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); 443 break; 444 case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); 445 break; 446 case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); 447 break; 448 case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); 449 break; 450 case 194:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); 451 break; 452 case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); 453 break; 454 case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); 431 case 186:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { 432 type: $$[$0-1], 433 statement: true 434 })); 435 break; 436 case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); 437 break; 438 case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); 439 break; 440 case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); 441 break; 442 case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); 443 break; 444 case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); 445 break; 446 case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); 447 break; 448 case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); 449 break; 450 case 194:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); 451 break; 452 case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); 453 break; 454 case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); 455 455 break; 456 456 case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); … … 460 460 case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); 461 461 break; 462 case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { 462 case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); 463 break; 464 case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { 463 465 if ($$[$0-1].charAt(0) === '!') { 464 466 return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert(); … … 468 470 }())); 469 471 break; 470 case 20 1:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1]));471 break; 472 case 20 2:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]));473 break; 474 case 20 3:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2]));475 break; 476 case 20 4:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0]));472 case 202:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1])); 473 break; 474 case 203:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3])); 475 break; 476 case 204:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2])); 477 break; 478 case 205:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0])); 477 479 break; 478 480 } 479 481 }, 480 table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,18 2],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,130],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28],86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[2,186],105:[2,186],106:[2,186],109:88,110:[2,186],111:69,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,78],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,189],74:[2,72],78:[2,189],84:[2,72],85:[2,72],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:87,104:[2,139],105:[2,139],106:[2,139],109:88,110:[2,139],111:69,118:[2,139],126:[2,139],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,142],126:[2,142],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,144],126:[2,144],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:87,104:[1,65],105:[2,151],106:[1,66],109:88,110:[1,68],111:69,118:[2,151],126:[2,151],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:87,104:[2,194],105:[2,194],106:[2,194],109:88,110:[2,194],111:69,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,78],133:[1,81],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,198],136:[2,198],137:[1,85]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:87,104:[1,65],105:[2,184],106:[1,66],109:88,110:[1,68],111:69,118:[2,184],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:87,104:[2,204],105:[2,204],106:[2,204],109:88,110:[2,204],111:69,118:[2,204],126:[2,204],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{27:258,28:[1,73],59:259,76:[1,70]},{120:260,122:219,123:[1,220]},{26:[1,261],121:[1,262],122:263,123:[1,220]},{26:[2,176],121:[2,176],123:[2,176]},{8:265,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:264,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:266,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101]},{8:267,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,74],26:[1,268]},{8:269,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,67],12:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{6:[1,271],25:[1,272],91:[1,270]},{6:[2,54],8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[2,54],88:[1,58],89:[1,59],90:[1,57],91:[2,54],94:273,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:274,54:[1,229]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{8:275,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:276,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],115:277},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:87,104:[2,165],105:[1,278],106:[2,165],109:88,110:[2,165],111:69,118:[1,279],126:[2,165],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:87,104:[2,166],105:[1,280],106:[2,166],109:88,110:[2,166],111:69,118:[2,166],126:[2,166],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,282],25:[1,283],78:[1,281]},{6:[2,54],11:169,25:[2,54],26:[2,54],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:284,42:168,44:172,46:[1,46],78:[2,54],89:[1,114]},{8:285,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,286],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{8:287,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,121],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,122],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],103:87,104:[2,37],105:[2,37],106:[2,37],109:88,110:[2,37],111:69,118:[2,37],126:[2,37],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,288],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,271],25:[1,272],86:[1,289]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{5:290,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:110,28:[1,73],44:111,55:291,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,55],25:[2,55],26:[2,55],27:110,28:[1,73],44:111,48:292,54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,293],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:87,104:[2,203],105:[2,203],106:[2,203],109:88,110:[2,203],111:69,118:[2,203],126:[2,203],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:294,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:295,25:[1,5]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{5:296,25:[1,5]},{5:297,25:[1,5]},{26:[1,298],121:[1,299],122:263,123:[1,220]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{5:300,25:[1,5]},{26:[2,177],121:[2,177],123:[2,177]},{5:301,25:[1,5],54:[1,302]},{25:[2,131],54:[2,131],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,102],5:303,6:[2,102],25:[1,5],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:87,104:[1,65],105:[2,102],106:[1,66],109:88,110:[1,68],111:69,118:[2,102],126:[2,102],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{102:[1,304]},{91:[1,305],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],128:[2,116],129:[2,116],132:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],94:306,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:307,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,271],25:[1,272],26:[1,308]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[2,143],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[2,145],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{116:[2,164],117:[2,164]},{8:309,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:310,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:311,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],128:[2,90],129:[2,90],132:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90]},{11:169,27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:312,42:168,44:172,46:[1,46],89:[1,114]},{6:[2,91],11:169,25:[2,91],26:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:313,89:[1,114]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:314,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,120],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],73:[2,38],78:[2,38],86:[2,38],91:[2,38],93:[2,38],102:[2,38],104:[2,38],105:[2,38],106:[2,38],110:[2,38],118:[2,38],126:[2,38],128:[2,38],129:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38],137:[2,38]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:315,54:[1,204]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{5:316,25:[1,5]},{26:[1,317]},{6:[1,318],26:[2,178],121:[2,178],123:[2,178]},{8:319,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],128:[2,119],129:[2,119],132:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,53],25:[2,53],26:[2,53],53:320,54:[1,229]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:87,104:[2,167],105:[2,167],106:[2,167],109:88,110:[2,167],111:69,118:[1,321],126:[2,167],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:87,104:[2,169],105:[1,322],106:[2,169],109:88,110:[2,169],111:69,118:[2,169],126:[2,169],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:87,104:[2,168],105:[2,168],106:[2,168],109:88,110:[2,168],111:69,118:[2,168],126:[2,168],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,53],25:[2,53],26:[2,53],53:323,54:[1,239]},{26:[1,324],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,250],25:[1,251],26:[1,325]},{26:[1,326]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,132],54:[2,132],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,271],25:[1,272],26:[1,327]},{8:328,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:329,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[1,282],25:[1,283],26:[1,330]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:87,104:[2,170],105:[2,170],106:[2,170],109:88,110:[2,170],111:69,118:[2,170],126:[2,170],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:87,104:[2,171],105:[2,171],106:[2,171],109:88,110:[2,171],111:69,118:[2,171],126:[2,171],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}],482 table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],121:[1,130],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28],86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],104:[2,194],105:[2,194],106:[2,194],110:[2,194],118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[2,194],133:[2,194],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],73:[2,189],78:[2,189],86:[2,189],91:[2,189],93:[2,189],102:[2,189],103:87,104:[2,189],105:[2,189],106:[2,189],109:88,110:[2,189],111:69,118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[1,78],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,191],74:[2,72],78:[2,191],84:[2,72],85:[2,72],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],73:[2,140],78:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],103:87,104:[2,140],105:[2,140],106:[2,140],109:88,110:[2,140],111:69,118:[2,140],126:[2,140],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],104:[2,151],105:[2,151],106:[2,151],110:[2,151],118:[2,151],126:[2,151],128:[2,151],129:[2,151],132:[2,151],133:[2,151],134:[2,151],135:[2,151],136:[2,151],137:[2,151]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],103:87,104:[1,65],105:[2,152],106:[1,66],109:88,110:[1,68],111:69,118:[2,152],126:[2,152],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,164],117:[2,164]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{54:[2,163],116:[2,163],117:[2,163]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],49:[2,157],54:[2,157],57:[2,157],73:[2,157],78:[2,157],86:[2,157],91:[2,157],93:[2,157],102:[2,157],104:[2,157],105:[2,157],106:[2,157],110:[2,157],118:[2,157],126:[2,157],128:[2,157],129:[2,157],132:[2,157],133:[2,157],134:[2,157],135:[2,157],136:[2,157],137:[2,157]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[1,81],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[2,197],129:[2,197],132:[1,78],133:[2,197],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,198],135:[2,198],136:[2,198],137:[2,198]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,199],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,200],137:[1,85]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,201],136:[2,201],137:[2,201]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[1,65],105:[2,186],106:[1,66],109:88,110:[1,68],111:69,118:[2,186],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],103:87,104:[2,202],105:[2,202],106:[2,202],109:88,110:[2,202],111:69,118:[2,202],126:[2,202],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,205],6:[2,205],25:[2,205],26:[2,205],49:[2,205],54:[2,205],57:[2,205],73:[2,205],78:[2,205],86:[2,205],91:[2,205],93:[2,205],102:[2,205],103:87,104:[2,205],105:[2,205],106:[2,205],109:88,110:[2,205],111:69,118:[2,205],126:[2,205],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],104:[2,184],105:[2,184],106:[2,184],110:[2,184],118:[2,184],126:[2,184],128:[2,184],129:[2,184],132:[2,184],133:[2,184],134:[2,184],135:[2,184],136:[2,184],137:[2,184]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{5:260,25:[1,5],27:258,28:[1,73],59:259,76:[1,70]},{120:261,122:219,123:[1,220]},{26:[1,262],121:[1,263],122:264,123:[1,220]},{26:[2,177],121:[2,177],123:[2,177]},{8:266,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:265,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:267,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101]},{8:268,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{6:[1,74],26:[1,269]},{8:270,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,67],12:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{6:[1,272],25:[1,273],91:[1,271]},{6:[2,54],8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[2,54],88:[1,58],89:[1,59],90:[1,57],91:[2,54],94:274,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:275,54:[1,229]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{8:276,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:277,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{116:[2,159],117:[2,159]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],115:278},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:87,104:[2,166],105:[1,279],106:[2,166],109:88,110:[2,166],111:69,118:[1,280],126:[2,166],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:87,104:[2,167],105:[1,281],106:[2,167],109:88,110:[2,167],111:69,118:[2,167],126:[2,167],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,283],25:[1,284],78:[1,282]},{6:[2,54],11:169,25:[2,54],26:[2,54],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:285,42:168,44:172,46:[1,46],78:[2,54],89:[1,114]},{8:286,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,287],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{8:288,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,121],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,122],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],103:87,104:[2,37],105:[2,37],106:[2,37],109:88,110:[2,37],111:69,118:[2,37],126:[2,37],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,289],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],86:[1,290]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{5:291,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:110,28:[1,73],44:111,55:292,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,55],25:[2,55],26:[2,55],27:110,28:[1,73],44:111,48:293,54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,294],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:87,104:[2,204],105:[2,204],106:[2,204],109:88,110:[2,204],111:69,118:[2,204],126:[2,204],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:295,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:296,25:[1,5]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{5:297,25:[1,5]},{5:298,25:[1,5]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],98:[2,139],102:[2,139],104:[2,139],105:[2,139],106:[2,139],110:[2,139],118:[2,139],126:[2,139],128:[2,139],129:[2,139],132:[2,139],133:[2,139],134:[2,139],135:[2,139],136:[2,139],137:[2,139]},{26:[1,299],121:[1,300],122:264,123:[1,220]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{5:301,25:[1,5]},{26:[2,178],121:[2,178],123:[2,178]},{5:302,25:[1,5],54:[1,303]},{25:[2,131],54:[2,131],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,102],5:304,6:[2,102],25:[1,5],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:87,104:[1,65],105:[2,102],106:[1,66],109:88,110:[1,68],111:69,118:[2,102],126:[2,102],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{102:[1,305]},{91:[1,306],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],128:[2,116],129:[2,116],132:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],94:307,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:308,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,272],25:[1,273],26:[1,309]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:87,104:[1,65],105:[2,144],106:[1,66],109:88,110:[1,68],111:69,118:[2,144],126:[2,144],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],103:87,104:[1,65],105:[2,146],106:[1,66],109:88,110:[1,68],111:69,118:[2,146],126:[2,146],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{116:[2,165],117:[2,165]},{8:310,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:311,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:312,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],128:[2,90],129:[2,90],132:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90]},{11:169,27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:313,42:168,44:172,46:[1,46],89:[1,114]},{6:[2,91],11:169,25:[2,91],26:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:314,89:[1,114]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:315,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,120],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],73:[2,38],78:[2,38],86:[2,38],91:[2,38],93:[2,38],102:[2,38],104:[2,38],105:[2,38],106:[2,38],110:[2,38],118:[2,38],126:[2,38],128:[2,38],129:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38],137:[2,38]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:316,54:[1,204]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],104:[2,203],105:[2,203],106:[2,203],110:[2,203],118:[2,203],126:[2,203],128:[2,203],129:[2,203],132:[2,203],133:[2,203],134:[2,203],135:[2,203],136:[2,203],137:[2,203]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[2,182],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{5:317,25:[1,5]},{26:[1,318]},{6:[1,319],26:[2,179],121:[2,179],123:[2,179]},{8:320,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],66:[2,142],67:[2,142],68:[2,142],69:[2,142],71:[2,142],73:[2,142],74:[2,142],78:[2,142],84:[2,142],85:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],104:[2,142],105:[2,142],106:[2,142],110:[2,142],118:[2,142],126:[2,142],128:[2,142],129:[2,142],132:[2,142],133:[2,142],134:[2,142],135:[2,142],136:[2,142],137:[2,142]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],128:[2,119],129:[2,119],132:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,53],25:[2,53],26:[2,53],53:321,54:[1,229]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:87,104:[2,168],105:[2,168],106:[2,168],109:88,110:[2,168],111:69,118:[1,322],126:[2,168],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:87,104:[2,170],105:[1,323],106:[2,170],109:88,110:[2,170],111:69,118:[2,170],126:[2,170],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:87,104:[2,169],105:[2,169],106:[2,169],109:88,110:[2,169],111:69,118:[2,169],126:[2,169],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,53],25:[2,53],26:[2,53],53:324,54:[1,239]},{26:[1,325],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,250],25:[1,251],26:[1,326]},{26:[1,327]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],49:[2,176],54:[2,176],57:[2,176],73:[2,176],78:[2,176],86:[2,176],91:[2,176],93:[2,176],102:[2,176],104:[2,176],105:[2,176],106:[2,176],110:[2,176],118:[2,176],126:[2,176],128:[2,176],129:[2,176],132:[2,176],133:[2,176],134:[2,176],135:[2,176],136:[2,176],137:[2,176]},{26:[2,180],121:[2,180],123:[2,180]},{25:[2,132],54:[2,132],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],26:[1,328]},{8:329,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:330,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[1,283],25:[1,284],26:[1,331]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:87,104:[2,171],105:[2,171],106:[2,171],109:88,110:[2,171],111:69,118:[2,171],126:[2,171],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],103:87,104:[2,172],105:[2,172],106:[2,172],109:88,110:[2,172],111:69,118:[2,172],126:[2,172],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}], 481 483 defaultActions: {60:[2,51],61:[2,52],75:[2,3],94:[2,109],191:[2,89]}, 482 484 parseError: function parseError(str, hash) { -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/repl.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 var CoffeeScript, addMultilineHandler, merge, nodeREPL, prettyErrorMessage, replDefaults, vm, _ref; 3 var CoffeeScript, addHistory, addMultilineHandler, fs, merge, nodeREPL, path, prettyErrorMessage, replDefaults, vm, _ref; 4 5 fs = require('fs'); 6 7 path = require('path'); 4 8 5 9 vm = require('vm'); … … 13 17 replDefaults = { 14 18 prompt: 'coffee> ', 19 historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0, 20 historyMaxInputSize: 10240, 15 21 "eval": function(input, context, filename, cb) { 16 22 var Assign, Block, Literal, Value, ast, err, js, _ref1; 17 18 23 input = input.replace(/\uFF00/g, '\n'); 19 24 input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1'); … … 36 41 addMultilineHandler = function(repl) { 37 42 var inputStream, multiline, nodeLineListener, outputStream, rli; 38 39 43 rli = repl.rli, inputStream = repl.inputStream, outputStream = repl.outputStream; 40 44 multiline = { … … 89 93 }; 90 94 95 addHistory = function(repl, filename, maxSize) { 96 var buffer, fd, lastLine, readFd, size, stat; 97 lastLine = null; 98 try { 99 stat = fs.statSync(filename); 100 size = Math.min(maxSize, stat.size); 101 readFd = fs.openSync(filename, 'r'); 102 buffer = new Buffer(size); 103 fs.readSync(readFd, buffer, 0, size, stat.size - size); 104 repl.rli.history = buffer.toString().split('\n').reverse(); 105 if (stat.size > maxSize) { 106 repl.rli.history.pop(); 107 } 108 if (repl.rli.history[0] === '') { 109 repl.rli.history.shift(); 110 } 111 repl.rli.historyIndex = -1; 112 lastLine = repl.rli.history[0]; 113 } catch (_error) {} 114 fd = fs.openSync(filename, 'a'); 115 repl.rli.addListener('line', function(code) { 116 if (code && code.length && code !== '.history' && lastLine !== code) { 117 fs.write(fd, "" + code + "\n"); 118 return lastLine = code; 119 } 120 }); 121 repl.rli.on('exit', function() { 122 return fs.close(fd); 123 }); 124 return repl.commands['.history'] = { 125 help: 'Show command history', 126 action: function() { 127 repl.outputStream.write("" + (repl.rli.history.slice(0).reverse().join('\n')) + "\n"); 128 return repl.displayPrompt(); 129 } 130 }; 131 }; 132 91 133 module.exports = { 92 134 start: function(opts) { 93 135 var build, major, minor, repl, _ref1; 94 95 136 if (opts == null) { 96 137 opts = {}; … … 109 150 }); 110 151 addMultilineHandler(repl); 152 if (opts.historyFile) { 153 addHistory(repl, opts.historyFile, opts.historyMaxInputSize); 154 } 111 155 return repl; 112 156 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/rewriter.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_ BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref,3 var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref, 4 4 __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, 5 5 __slice = [].slice; … … 7 7 generate = function(tag, value) { 8 8 var tok; 9 10 9 tok = [tag, value]; 11 10 tok.generated = true; … … 31 30 Rewriter.prototype.scanTokens = function(block) { 32 31 var i, token, tokens; 33 34 32 tokens = this.tokens; 35 33 i = 0; … … 42 40 Rewriter.prototype.detectEnd = function(i, condition, action) { 43 41 var levels, token, tokens, _ref, _ref1; 44 45 42 tokens = this.tokens; 46 43 levels = 0; … … 64 61 Rewriter.prototype.removeLeadingNewlines = function() { 65 62 var i, tag, _i, _len, _ref; 66 67 63 _ref = this.tokens; 68 64 for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { … … 80 76 return this.scanTokens(function(token, i, tokens) { 81 77 var _ref; 82 83 78 if (!(token[0] === 'TERMINATOR' && (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0))) { 84 79 return 1; … … 91 86 Rewriter.prototype.closeOpenCalls = function() { 92 87 var action, condition; 93 94 88 condition = function(token, i) { 95 89 var _ref; 96 97 90 return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')'; 98 91 }; … … 110 103 Rewriter.prototype.closeOpenIndexes = function() { 111 104 var action, condition; 112 113 105 condition = function(token, i) { 114 106 var _ref; 115 116 107 return (_ref = token[0]) === ']' || _ref === 'INDEX_END'; 117 108 }; … … 129 120 Rewriter.prototype.matchTags = function() { 130 121 var fuzz, i, j, pattern, _i, _ref, _ref1; 131 132 122 i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : []; 133 123 fuzz = 0; … … 155 145 Rewriter.prototype.findTagsBackwards = function(i, tags) { 156 146 var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; 157 158 147 backStack = []; 159 148 while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) { … … 171 160 Rewriter.prototype.addImplicitBracesAndParens = function() { 172 161 var stack; 173 174 162 stack = []; 175 163 return this.scanTokens(function(token, i, tokens) { 176 164 var endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; 177 178 165 tag = token[0]; 179 166 prevTag = (i > 0 ? tokens[i - 1] : [])[0]; … … 188 175 inImplicit = function() { 189 176 var _ref, _ref1; 190 191 177 return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0; 192 178 }; 193 179 inImplicitCall = function() { 194 180 var _ref; 195 196 181 return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '('; 197 182 }; 198 183 inImplicitObject = function() { 199 184 var _ref; 200 201 185 return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{'; 202 186 }; 203 187 inImplicitControl = function() { 204 188 var _ref; 205 206 189 return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL'; 207 190 }; 208 191 startImplicitCall = function(j) { 209 192 var idx; 210 211 193 idx = j != null ? j : i; 212 194 stack.push([ … … 227 209 startImplicitObject = function(j, startsLine) { 228 210 var idx; 229 230 211 if (startsLine == null) { 231 212 startsLine = true; … … 293 274 return forward(2); 294 275 } 295 if ( this.matchTags(i, IMPLICIT_FUNC, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) {276 if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) { 296 277 startImplicitCall(i + 1); 297 278 stack.push(['INDENT', i + 2]); … … 351 332 return this.scanTokens(function(token, i, tokens) { 352 333 var column, line, nextLocation, prevLocation, _ref, _ref1; 353 354 334 if (token[2]) { 355 335 return 1; … … 377 357 Rewriter.prototype.addImplicitIndentation = function() { 378 358 var action, condition, indent, outdent, starter; 379 380 359 starter = indent = outdent = null; 381 360 condition = function(token, i) { 382 var _ref; 383 384 return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && (starter !== 'IF' && starter !== 'THEN')); 361 var _ref, _ref1; 362 return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref1 = token[0]) === 'CATCH' || _ref1 === 'FINALLY') && (starter === '->' || starter === '=>')); 385 363 }; 386 364 action = function(token, i) { … … 388 366 }; 389 367 return this.scanTokens(function(token, i, tokens) { 390 var tag, _ref, _ref1; 391 368 var j, tag, _i, _ref, _ref1; 392 369 tag = token[0]; 393 370 if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') { … … 399 376 return 2; 400 377 } 401 if (tag === 'CATCH' && ((_ref = this.tag(i + 2)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) { 402 tokens.splice.apply(tokens, [i + 2, 0].concat(__slice.call(this.indentation()))); 403 return 4; 378 if (tag === 'CATCH') { 379 for (j = _i = 1; _i <= 2; j = ++_i) { 380 if (!((_ref = this.tag(i + j)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) { 381 continue; 382 } 383 tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation()))); 384 return 2 + j; 385 } 404 386 } 405 387 if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) { … … 422 404 Rewriter.prototype.tagPostfixConditionals = function() { 423 405 var action, condition, original; 424 425 406 original = null; 426 407 condition = function(token, i) { 427 408 var prevTag, tag; 428 429 409 tag = token[0]; 430 410 prevTag = this.tokens[i - 1][0]; … … 448 428 Rewriter.prototype.indentation = function(implicit) { 449 429 var indent, outdent; 450 451 430 if (implicit == null) { 452 431 implicit = false; … … 467 446 Rewriter.prototype.tag = function(i) { 468 447 var _ref; 469 470 448 return (_ref = this.tokens[i]) != null ? _ref[0] : void 0; 471 449 }; … … 497 475 IMPLICIT_UNSPACED_CALL = ['+', '-']; 498 476 499 IMPLICIT_BLOCK = ['->', '=>', '{', '[', ','];500 501 477 IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR']; 502 478 -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/scope.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 3 var Scope, extend, last, _ref; … … 40 40 Scope.prototype.namedMethod = function() { 41 41 var _ref1; 42 43 42 if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) { 44 43 return this.method; … … 64 63 Scope.prototype.check = function(name) { 65 64 var _ref1; 66 67 65 return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0)); 68 66 }; … … 78 76 Scope.prototype.type = function(name) { 79 77 var v, _i, _len, _ref1; 80 81 78 _ref1 = this.variables; 82 79 for (_i = 0, _len = _ref1.length; _i < _len; _i++) { … … 91 88 Scope.prototype.freeVariable = function(name, reserve) { 92 89 var index, temp; 93 94 90 if (reserve == null) { 95 91 reserve = true; … … 119 115 Scope.prototype.declaredVariables = function() { 120 116 var realVars, tempVars, v, _i, _len, _ref1; 121 122 117 realVars = []; 123 118 tempVars = []; … … 134 129 Scope.prototype.assignedVariables = function() { 135 130 var v, _i, _len, _ref1, _results; 136 137 131 _ref1 = this.variables; 138 132 _results = []; -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/lib/coffee-script/sourcemap.js
r484 r516 1 // Generated by CoffeeScript 1.6. 21 // Generated by CoffeeScript 1.6.3 2 2 (function() { 3 var BASE64_CHARS, LineMapping, MAX_BASE64_VALUE, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK, decodeBase64Char, encodeBase64Char;3 var LineMap, SourceMap; 4 4 5 LineMapping = (function() { 6 function LineMapping(generatedLine) { 7 this.generatedLine = generatedLine; 8 this.columnMap = {}; 9 this.columnMappings = []; 5 LineMap = (function() { 6 function LineMap(line) { 7 this.line = line; 8 this.columns = []; 10 9 } 11 10 12 LineMap ping.prototype.addMapping = function(generatedColumn, _arg, options) {11 LineMap.prototype.add = function(column, _arg, options) { 13 12 var sourceColumn, sourceLine; 14 15 13 sourceLine = _arg[0], sourceColumn = _arg[1]; 16 14 if (options == null) { 17 15 options = {}; 18 16 } 19 if (this.column Map[generatedColumn] && options.noReplace) {17 if (this.columns[column] && options.noReplace) { 20 18 return; 21 19 } 22 this.columnMap[generatedColumn] = {23 generatedLine: this.generatedLine,24 generatedColumn: generatedColumn,20 return this.columns[column] = { 21 line: this.line, 22 column: column, 25 23 sourceLine: sourceLine, 26 24 sourceColumn: sourceColumn 27 25 }; 28 this.columnMappings.push(this.columnMap[generatedColumn]);29 return this.columnMappings.sort(function(a, b) {30 return a.generatedColumn - b.generatedColumn;31 });32 26 }; 33 27 34 LineMapping.prototype.getSourcePosition = function(generatedColumn) { 35 var answer, columnMapping, lastColumnMapping, _i, _len, _ref; 36 37 answer = null; 38 lastColumnMapping = null; 39 _ref = this.columnMappings; 40 for (_i = 0, _len = _ref.length; _i < _len; _i++) { 41 columnMapping = _ref[_i]; 42 if (columnMapping.generatedColumn > generatedColumn) { 43 break; 44 } else { 45 lastColumnMapping = columnMapping; 46 } 28 LineMap.prototype.sourceLocation = function(column) { 29 var mapping; 30 while (!((mapping = this.columns[column]) || (column <= 0))) { 31 column--; 47 32 } 48 if (lastColumnMapping) { 49 return answer = [lastColumnMapping.sourceLine, lastColumnMapping.sourceColumn]; 50 } 33 return mapping && [mapping.sourceLine, mapping.sourceColumn]; 51 34 }; 52 35 53 return LineMap ping;36 return LineMap; 54 37 55 38 })(); 56 39 57 exports.SourceMap = (function() { 40 SourceMap = (function() { 41 var BASE64_CHARS, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK; 42 58 43 function SourceMap() { 59 this. generatedLines = [];44 this.lines = []; 60 45 } 61 46 62 SourceMap.prototype.addMapping = function(sourceLocation, generatedLocation, options) { 63 var generatedColumn, generatedLine, lineMapping; 64 47 SourceMap.prototype.add = function(sourceLocation, generatedLocation, options) { 48 var column, line, lineMap, _base; 65 49 if (options == null) { 66 50 options = {}; 67 51 } 68 generatedLine = generatedLocation[0], generatedColumn = generatedLocation[1]; 69 lineMapping = this.generatedLines[generatedLine]; 70 if (!lineMapping) { 71 lineMapping = this.generatedLines[generatedLine] = new LineMapping(generatedLine); 72 } 73 return lineMapping.addMapping(generatedColumn, sourceLocation, options); 52 line = generatedLocation[0], column = generatedLocation[1]; 53 lineMap = ((_base = this.lines)[line] || (_base[line] = new LineMap(line))); 54 return lineMap.add(column, sourceLocation, options); 74 55 }; 75 56 76 SourceMap.prototype.getSourcePosition = function(_arg) { 77 var answer, generatedColumn, generatedLine, lineMapping; 57 SourceMap.prototype.sourceLocation = function(_arg) { 58 var column, line, lineMap; 59 line = _arg[0], column = _arg[1]; 60 while (!((lineMap = this.lines[line]) || (line <= 0))) { 61 line--; 62 } 63 return lineMap && lineMap.sourceLocation(column); 64 }; 78 65 79 generatedLine = _arg[0], generatedColumn = _arg[1]; 80 answer = null; 81 lineMapping = this.generatedLines[generatedLine]; 82 if (!lineMapping) { 66 SourceMap.prototype.generate = function(options, code) { 67 var buffer, lastColumn, lastSourceColumn, lastSourceLine, lineMap, lineNumber, mapping, needComma, v3, writingline, _i, _j, _len, _len1, _ref, _ref1; 68 if (options == null) { 69 options = {}; 70 } 71 if (code == null) { 72 code = null; 73 } 74 writingline = 0; 75 lastColumn = 0; 76 lastSourceLine = 0; 77 lastSourceColumn = 0; 78 needComma = false; 79 buffer = ""; 80 _ref = this.lines; 81 for (lineNumber = _i = 0, _len = _ref.length; _i < _len; lineNumber = ++_i) { 82 lineMap = _ref[lineNumber]; 83 if (lineMap) { 84 _ref1 = lineMap.columns; 85 for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { 86 mapping = _ref1[_j]; 87 if (!(mapping)) { 88 continue; 89 } 90 while (writingline < mapping.line) { 91 lastColumn = 0; 92 needComma = false; 93 buffer += ";"; 94 writingline++; 95 } 96 if (needComma) { 97 buffer += ","; 98 needComma = false; 99 } 100 buffer += this.encodeVlq(mapping.column - lastColumn); 101 lastColumn = mapping.column; 102 buffer += this.encodeVlq(0); 103 buffer += this.encodeVlq(mapping.sourceLine - lastSourceLine); 104 lastSourceLine = mapping.sourceLine; 105 buffer += this.encodeVlq(mapping.sourceColumn - lastSourceColumn); 106 lastSourceColumn = mapping.sourceColumn; 107 needComma = true; 108 } 109 } 110 } 111 v3 = { 112 version: 3, 113 file: options.generatedFile || '', 114 sourceRoot: options.sourceRoot || '', 115 sources: options.sourceFiles || [''], 116 names: [], 117 mappings: buffer 118 }; 119 if (options.inline) { 120 v3.sourcesContent = [code]; 121 } 122 return JSON.stringify(v3, null, 2); 123 }; 83 124 84 } else { 85 answer = lineMapping.getSourcePosition(generatedColumn); 125 VLQ_SHIFT = 5; 126 127 VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT; 128 129 VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1; 130 131 SourceMap.prototype.encodeVlq = function(value) { 132 var answer, nextChunk, signBit, valueToEncode; 133 answer = ''; 134 signBit = value < 0 ? 1 : 0; 135 valueToEncode = (Math.abs(value) << 1) + signBit; 136 while (valueToEncode || !answer) { 137 nextChunk = valueToEncode & VLQ_VALUE_MASK; 138 valueToEncode = valueToEncode >> VLQ_SHIFT; 139 if (valueToEncode) { 140 nextChunk |= VLQ_CONTINUATION_BIT; 141 } 142 answer += this.encodeBase64(nextChunk); 86 143 } 87 144 return answer; 88 145 }; 89 146 90 SourceMap.prototype.forEachMapping = function(fn) { 91 var columnMapping, generatedLineNumber, lineMapping, _i, _len, _ref, _results; 147 BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; 92 148 93 _ref = this.generatedLines; 94 _results = []; 95 for (generatedLineNumber = _i = 0, _len = _ref.length; _i < _len; generatedLineNumber = ++_i) { 96 lineMapping = _ref[generatedLineNumber]; 97 if (lineMapping) { 98 _results.push((function() { 99 var _j, _len1, _ref1, _results1; 100 101 _ref1 = lineMapping.columnMappings; 102 _results1 = []; 103 for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { 104 columnMapping = _ref1[_j]; 105 _results1.push(fn(columnMapping)); 106 } 107 return _results1; 108 })()); 109 } else { 110 _results.push(void 0); 111 } 112 } 113 return _results; 149 SourceMap.prototype.encodeBase64 = function(value) { 150 return BASE64_CHARS[value] || (function() { 151 throw new Error("Cannot Base64 encode value: " + value); 152 })(); 114 153 }; 115 154 … … 118 157 })(); 119 158 120 exports.generateV3SourceMap = function(sourceMap, options, code) { 121 var answer, generatedFile, lastGeneratedColumnWritten, lastSourceColumnWritten, lastSourceLineWritten, mappings, needComma, sourceFiles, sourceRoot, writingGeneratedLine; 122 123 if (options == null) { 124 options = {}; 125 } 126 sourceRoot = options.sourceRoot || ""; 127 sourceFiles = options.sourceFiles || [""]; 128 generatedFile = options.generatedFile || ""; 129 writingGeneratedLine = 0; 130 lastGeneratedColumnWritten = 0; 131 lastSourceLineWritten = 0; 132 lastSourceColumnWritten = 0; 133 needComma = false; 134 mappings = ""; 135 sourceMap.forEachMapping(function(mapping) { 136 while (writingGeneratedLine < mapping.generatedLine) { 137 lastGeneratedColumnWritten = 0; 138 needComma = false; 139 mappings += ";"; 140 writingGeneratedLine++; 141 } 142 if (needComma) { 143 mappings += ","; 144 needComma = false; 145 } 146 mappings += exports.vlqEncodeValue(mapping.generatedColumn - lastGeneratedColumnWritten); 147 lastGeneratedColumnWritten = mapping.generatedColumn; 148 mappings += exports.vlqEncodeValue(0); 149 mappings += exports.vlqEncodeValue(mapping.sourceLine - lastSourceLineWritten); 150 lastSourceLineWritten = mapping.sourceLine; 151 mappings += exports.vlqEncodeValue(mapping.sourceColumn - lastSourceColumnWritten); 152 lastSourceColumnWritten = mapping.sourceColumn; 153 return needComma = true; 154 }); 155 answer = { 156 version: 3, 157 file: generatedFile, 158 sourceRoot: sourceRoot, 159 sources: sourceFiles, 160 names: [], 161 mappings: mappings 162 }; 163 if (options.inline) { 164 answer.sourcesContent = [code]; 165 } 166 return JSON.stringify(answer, null, 2); 167 }; 168 169 exports.loadV3SourceMap = function(sourceMap) { 170 return todo(); 171 }; 172 173 BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; 174 175 MAX_BASE64_VALUE = BASE64_CHARS.length - 1; 176 177 encodeBase64Char = function(value) { 178 if (value > MAX_BASE64_VALUE) { 179 throw new Error("Cannot encode value " + value + " > " + MAX_BASE64_VALUE); 180 } else if (value < 0) { 181 throw new Error("Cannot encode value " + value + " < 0"); 182 } 183 return BASE64_CHARS[value]; 184 }; 185 186 decodeBase64Char = function(char) { 187 var value; 188 189 value = BASE64_CHARS.indexOf(char); 190 if (value === -1) { 191 throw new Error("Invalid Base 64 character: " + char); 192 } 193 return value; 194 }; 195 196 VLQ_SHIFT = 5; 197 198 VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT; 199 200 VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1; 201 202 exports.vlqEncodeValue = function(value) { 203 var answer, nextVlqChunk, signBit, valueToEncode; 204 205 signBit = value < 0 ? 1 : 0; 206 valueToEncode = (Math.abs(value) << 1) + signBit; 207 answer = ""; 208 while (valueToEncode || !answer) { 209 nextVlqChunk = valueToEncode & VLQ_VALUE_MASK; 210 valueToEncode = valueToEncode >> VLQ_SHIFT; 211 if (valueToEncode) { 212 nextVlqChunk |= VLQ_CONTINUATION_BIT; 213 } 214 answer += encodeBase64Char(nextVlqChunk); 215 } 216 return answer; 217 }; 218 219 exports.vlqDecodeValue = function(str, offset) { 220 var consumed, continuationShift, done, nextChunkValue, nextVlqChunk, position, signBit, value; 221 222 if (offset == null) { 223 offset = 0; 224 } 225 position = offset; 226 done = false; 227 value = 0; 228 continuationShift = 0; 229 while (!done) { 230 nextVlqChunk = decodeBase64Char(str[position]); 231 position += 1; 232 nextChunkValue = nextVlqChunk & VLQ_VALUE_MASK; 233 value += nextChunkValue << continuationShift; 234 if (!(nextVlqChunk & VLQ_CONTINUATION_BIT)) { 235 done = true; 236 } 237 continuationShift += VLQ_SHIFT; 238 } 239 consumed = position - offset; 240 signBit = value & 1; 241 value = value >> 1; 242 if (signBit) { 243 value = -value; 244 } 245 return [value, consumed]; 246 }; 159 module.exports = SourceMap; 247 160 248 161 }).call(this); -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/coffee-script/package.json
r484 r516 11 11 "name": "Jeremy Ashkenas" 12 12 }, 13 "version": "1.6. 2",13 "version": "1.6.3", 14 14 "licenses": [ 15 15 { … … 46 46 "readme": "\n {\n } } {\n { { } }\n } }{ {\n { }{ } } _____ __ __\n ( }{ }{ { ) / ____| / _|/ _|\n .- { { } { }} -. | | ___ | |_| |_ ___ ___\n ( ( } { } { } } ) | | / _ \\| _| _/ _ \\/ _ \\\n |`-..________ ..-'| | |___| (_) | | | || __/ __/\n | | \\_____\\___/|_| |_| \\___|\\___|\n | ;--.\n | (__ \\ _____ _ _\n | | ) ) / ____| (_) | |\n | |/ / | (___ ___ _ __ _ _ __ | |_\n | ( / \\___ \\ / __| '__| | '_ \\| __|\n | |/ ____) | (__| | | | |_) | |_\n | | |_____/ \\___|_| |_| .__/ \\__|\n `-.._________..-' | |\n |_|\n\n\n CoffeeScript is a little language that compiles into JavaScript.\n\n Install Node.js, and then the CoffeeScript compiler:\n sudo bin/cake install\n\n Or, if you have the Node Package Manager installed:\n npm install -g coffee-script\n (Leave off the -g if you don't wish to install globally.)\n\n Execute a script:\n coffee /path/to/script.coffee\n\n Compile a script:\n coffee -c /path/to/script.coffee\n\n For documentation, usage, and examples, see:\n http://coffeescript.org/\n\n To suggest a feature, report a bug, or general discussion:\n http://github.com/jashkenas/coffee-script/issues/\n\n If you'd like to chat, drop by #coffeescript on Freenode IRC,\n or on webchat.freenode.net.\n\n The source repository:\n git://github.com/jashkenas/coffee-script.git\n\n All contributors are listed here:\n http://github.com/jashkenas/coffee-script/contributors\n", 47 47 "readmeFilename": "README", 48 "_id": "coffee-script@1.6.2", 49 "dist": { 50 "shasum": "800f724d18d1103902711ce5345000261f2a2c3b" 51 }, 52 "_from": "coffee-script@1.6.2", 53 "_resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.6.2.tgz" 48 "_id": "coffee-script@1.6.3", 49 "_from": "coffee-script@1.6.x" 54 50 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/README.md
r484 r516 1 1 # Glob 2 3 Match files using the patterns the shell uses, like stars and stuff. 2 4 3 5 This is a glob implementation in JavaScript. It uses the `minimatch` … … 58 60 Perform an asynchronous glob search. 59 61 60 ## glob.sync(pattern, [options] 62 ## glob.sync(pattern, [options]) 61 63 62 64 * `pattern` {String} Pattern to be matched … … 98 100 is no way at this time to continue a glob search after aborting, but 99 101 you can re-use the statCache to avoid having to duplicate syscalls. 102 * `statCache` Collection of all the stat results the glob search 103 performed. 104 * `cache` Convenience object. Each field has the following possible 105 values: 106 * `false` - Path does not exist 107 * `true` - Path exists 108 * `1` - Path exists, and is not a directory 109 * `2` - Path exists, and is a directory 110 * `[file, entries, ...]` - Path exists, is a directory, and the 111 array value is the results of `fs.readdir` 100 112 101 113 ### Events … … 129 141 onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix 130 142 systems, and `C:\` or some such on Windows.) 143 * `dot` Include `.dot` files in normal matches and `globstar` matches. 144 Note that an explicit dot in a portion of the pattern will always 145 match dot files. 131 146 * `nomount` By default, a pattern starting with a forward-slash will be 132 147 "mounted" onto the root setting, so that a valid filesystem path is … … 147 162 in search of other matches. Set the `strict` option to raise an error 148 163 in these cases. 164 * `cache` See `cache` property above. Pass in a previously generated 165 cache object to save some fs calls. 149 166 * `statCache` A cache of results of filesystem information, to prevent 150 167 unnecessary stat calls. While it should not normally be necessary to … … 187 204 and bash 4.1, where `**` only has special significance if it is the only 188 205 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but 189 `a/**b` will not. **Note that this is different from the way that `**` is 190 handled by ruby's `Dir` class.** 206 `a/**b` will not. 191 207 192 208 If an escaped pattern has no matches, and the `nonull` flag is set, … … 227 243 and readdir calls that it makes, in order to cut down on system 228 244 overhead. However, this also makes it even more susceptible to races, 229 especially if the statCache object is reused between glob calls. 230 231 Users are thus advised not to use a glob result as a 232 guarantee of filesystem state in the face of rapid changes. 233 For the vast majority of operations, this is never a problem. 245 especially if the cache or statCache objects are reused between glob 246 calls. 247 248 Users are thus advised not to use a glob result as a guarantee of 249 filesystem state in the face of rapid changes. For the vast majority 250 of operations, this is never a problem. -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/glob.js
r484 r516 23 23 // else // not globstar 24 24 // for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) 25 // Test ENTRY against pattern[n +1]25 // Test ENTRY against pattern[n] 26 26 // If fails, continue 27 27 // If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) … … 37 37 module.exports = glob 38 38 39 var fs = require(" graceful-fs")39 var fs = require("fs") 40 40 , minimatch = require("minimatch") 41 41 , Minimatch = minimatch.Minimatch … … 77 77 } 78 78 79 this._processingEmitQueue = false 79 80 80 81 glob.Glob = Glob … … 85 86 } 86 87 88 if (typeof options === "function") { 89 cb = options 90 options = null 91 } 92 87 93 if (typeof cb === "function") { 88 94 this.on("error", cb) 89 95 this.on("end", function (matches) { 90 // console.error("cb with matches", matches)91 96 cb(null, matches) 92 97 }) … … 95 100 options = options || {} 96 101 102 this._endEmitted = false 97 103 this.EOF = {} 98 104 this._emitQueue = [] 99 105 106 this.paused = false 107 this._processingEmitQueue = false 108 100 109 this.maxDepth = options.maxDepth || 1000 101 110 this.maxLength = options.maxLength || Infinity 111 this.cache = options.cache || {} 102 112 this.statCache = options.statCache || {} 103 113 … … 112 122 this.root = options.root || path.resolve(this.cwd, "/") 113 123 this.root = path.resolve(this.root) 124 if (process.platform === "win32") 125 this.root = this.root.replace(/\\/g, "/") 114 126 115 127 this.nomount = !!options.nomount … … 127 139 } 128 140 141 this.strict = options.strict !== false 129 142 this.dot = !!options.dot 130 143 this.mark = !!options.mark … … 135 148 this.nocase = !!options.nocase 136 149 this.stat = !!options.stat 150 137 151 this.debug = !!options.debug || !!options.globDebug 152 if (this.debug) 153 this.log = console.error 154 138 155 this.silent = !!options.silent 139 156 … … 144 161 this.error = null 145 162 this.aborted = false 163 164 // list of all the patterns that ** has resolved do, so 165 // we can avoid visiting multiple times. 166 this._globstars = {} 146 167 147 168 EE.call(this) … … 165 186 } 166 187 188 Glob.prototype.log = function () {} 189 167 190 Glob.prototype._finish = function () { 168 191 assert(this instanceof Glob) … … 173 196 for (var i = 0, l = this.matches.length; i < l; i ++) { 174 197 var matches = this.matches[i] 175 if (this.debug) console.error("matches[%d] =", i, matches)198 this.log("matches[%d] =", i, matches) 176 199 // do like the shell, and spit out the literal glob 177 200 if (!matches) { … … 199 222 if (this.mark) { 200 223 // at *some* point we statted all of these 201 all = all.map(function (m) { 202 var sc = this.statCache[m] 203 if (!sc) 204 return m 205 var isDir = (Array.isArray(sc) || sc === 2) 206 if (isDir && m.slice(-1) !== "/") { 207 return m + "/" 208 } 209 if (!isDir && m.slice(-1) === "/") { 210 return m.replace(/\/+$/, "") 211 } 212 return m 213 }, this) 214 } 215 216 if (this.debug) console.error("emitting end", all) 224 all = all.map(this._mark, this) 225 } 226 227 this.log("emitting end", all) 217 228 218 229 this.EOF = this.found = all … … 228 239 function alphasort (a, b) { 229 240 return a > b ? 1 : a < b ? -1 : 0 241 } 242 243 Glob.prototype._mark = function (p) { 244 var c = this.cache[p] 245 var m = p 246 if (c) { 247 var isDir = c === 2 || Array.isArray(c) 248 var slash = p.slice(-1) === '/' 249 250 if (isDir && !slash) 251 m += '/' 252 else if (!isDir && slash) 253 m = m.slice(0, -1) 254 255 if (m !== p) { 256 this.statCache[m] = this.statCache[p] 257 this.cache[m] = this.cache[p] 258 } 259 } 260 261 return m 230 262 } 231 263 … … 254 286 255 287 Glob.prototype.emitMatch = function (m) { 288 this.log('emitMatch', m) 256 289 this._emitQueue.push(m) 257 290 this._processEmitQueue() … … 259 292 260 293 Glob.prototype._processEmitQueue = function (m) { 294 this.log("pEQ paused=%j processing=%j m=%j", this.paused, 295 this._processingEmitQueue, m) 296 var done = false 261 297 while (!this._processingEmitQueue && 262 298 !this.paused) { 263 299 this._processingEmitQueue = true 264 300 var m = this._emitQueue.shift() 301 this.log(">processEmitQueue", m === this.EOF ? ":EOF:" : m) 265 302 if (!m) { 303 this.log(">processEmitQueue, falsey m") 266 304 this._processingEmitQueue = false 267 305 break 268 306 } 269 if (this.debug) { 270 console.error('emit!', m === this.EOF ? "end" : "match") 271 } 272 this.emit(m === this.EOF ? "end" : "match", m) 273 this._processingEmitQueue = false 274 } 307 308 if (m === this.EOF || !(this.mark && !this.stat)) { 309 this.log("peq: unmarked, or eof") 310 next.call(this, 0, false) 311 } else if (this.statCache[m]) { 312 var sc = this.statCache[m] 313 var exists 314 if (sc) 315 exists = sc.isDirectory() ? 2 : 1 316 this.log("peq: stat cached") 317 next.call(this, exists, exists === 2) 318 } else { 319 this.log("peq: _stat, then next") 320 this._stat(m, next) 321 } 322 323 function next(exists, isDir) { 324 this.log("next", m, exists, isDir) 325 var ev = m === this.EOF ? "end" : "match" 326 327 // "end" can only happen once. 328 assert(!this._endEmitted) 329 if (ev === "end") 330 this._endEmitted = true 331 332 if (exists) { 333 // Doesn't mean it necessarily doesn't exist, it's possible 334 // we just didn't check because we don't care that much, or 335 // this is EOF anyway. 336 if (isDir && !m.match(/\/$/)) { 337 m = m + "/" 338 } else if (!isDir && m.match(/\/$/)) { 339 m = m.replace(/\/+$/, "") 340 } 341 } 342 this.log("emit", ev, m) 343 this.emit(ev, m) 344 this._processingEmitQueue = false 345 if (done && m !== this.EOF && !this.paused) 346 this._processEmitQueue() 347 } 348 } 349 done = true 275 350 } 276 351 … … 316 391 // nothing more to do, either way. 317 392 if (exists) { 318 if (prefix.charAt(0) === "/" && !this.nomount) { 319 prefix = path.join(this.root, prefix) 393 if (prefix && isAbsolute(prefix) && !this.nomount) { 394 if (prefix.charAt(0) === "/") { 395 prefix = path.join(this.root, prefix) 396 } else { 397 prefix = path.resolve(this.root, prefix) 398 } 320 399 } 400 401 if (process.platform === "win32") 402 prefix = prefix.replace(/\\/g, "/") 403 321 404 this.matches[index] = this.matches[index] || {} 322 405 this.matches[index][prefix] = true … … 345 428 var read 346 429 if (prefix === null) read = "." 347 else if (isAbsolute(prefix)) { 348 read = prefix = path.resolve("/", prefix) 349 if (this.debug) console.error('absolute: ', prefix, this.root, pattern) 350 } else read = prefix 351 352 if (this.debug) console.error('readdir(%j)', read, this.cwd, this.root) 430 else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { 431 if (!prefix || !isAbsolute(prefix)) { 432 prefix = path.join("/", prefix) 433 } 434 read = prefix = path.resolve(prefix) 435 436 // if (process.platform === "win32") 437 // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/") 438 439 this.log('absolute: ', prefix, this.root, pattern, read) 440 } else { 441 read = prefix 442 } 443 444 this.log('readdir(%j)', read, this.cwd, this.root) 445 353 446 return this._readdir(read, function (er, entries) { 354 447 if (er) { … … 371 464 }, this) 372 465 466 s = s.filter(function (pattern) { 467 var key = gsKey(pattern) 468 var seen = !this._globstars[key] 469 this._globstars[key] = true 470 return seen 471 }, this) 472 473 if (!s.length) 474 return cb() 475 373 476 // now asyncForEach over this 374 477 var l = s.length … … 389 492 // dot is set. Stuff like @(.foo|.bar) isn't allowed. 390 493 var pn = pattern[n] 391 if (typeof pn === "string") { 392 var found = entries.indexOf(pn) !== -1 393 entries = found ? entries[pn] : [] 394 } else { 395 var rawGlob = pattern[n]._glob 396 , dotOk = this.dot || rawGlob.charAt(0) === "." 397 398 entries = entries.filter(function (e) { 399 return (e.charAt(0) !== "." || dotOk) && 400 (typeof pattern[n] === "string" && e === pattern[n] || 401 e.match(pattern[n])) 402 }) 403 } 494 var rawGlob = pattern[n]._glob 495 , dotOk = this.dot || rawGlob.charAt(0) === "." 496 497 entries = entries.filter(function (e) { 498 return (e.charAt(0) !== "." || dotOk) && 499 e.match(pattern[n]) 500 }) 404 501 405 502 // If n === pattern.length - 1, then there's no need for the extra stat … … 418 515 } 419 516 517 if (process.platform === "win32") 518 e = e.replace(/\\/g, "/") 519 420 520 this.matches[index] = this.matches[index] || {} 421 521 this.matches[index][e] = true … … 443 543 } 444 544 545 function gsKey (pattern) { 546 return '**' + pattern.map(function (p) { 547 return (p === minimatch.GLOBSTAR) ? '**' : (''+p) 548 }).join('/') 549 } 550 445 551 Glob.prototype._stat = function (f, cb) { 446 552 assert(this instanceof Glob) … … 451 557 abs = path.resolve(this.cwd, f) 452 558 } 453 if (this.debug) console.error('stat', [this.cwd, f, '=', abs]) 559 454 560 if (f.length > this.maxLength) { 455 561 var er = new Error("Path name too long") … … 459 565 } 460 566 461 if (this.statCache.hasOwnProperty(f)) { 462 var exists = this.statCache[f] 567 this.log('stat', [this.cwd, f, '=', abs]) 568 569 if (!this.stat && this.cache.hasOwnProperty(f)) { 570 var exists = this.cache[f] 463 571 , isDir = exists && (Array.isArray(exists) || exists === 2) 464 572 if (this.sync) return cb.call(this, !!exists, isDir) … … 466 574 } 467 575 468 if (this.sync) { 469 var er, stat 576 var stat = this.statCache[abs] 577 if (this.sync || stat) { 578 var er 470 579 try { 471 580 stat = fs.statSync(abs) … … 482 591 var exists 483 592 assert(this instanceof Glob) 593 594 if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) { 595 this.log("should be ENOTDIR, fake it") 596 597 er = new Error("ENOTDIR, not a directory '" + abs + "'") 598 er.path = abs 599 er.code = "ENOTDIR" 600 stat = null 601 } 602 603 var emit = !this.statCache[abs] 604 this.statCache[abs] = stat 605 484 606 if (er || !stat) { 485 607 exists = false 486 608 } else { 487 609 exists = stat.isDirectory() ? 2 : 1 488 } 489 this.statCache[f] = this.statCache[f] || exists 610 if (emit) 611 this.emit('stat', f, stat) 612 } 613 this.cache[f] = this.cache[f] || exists 490 614 cb.call(this, !!exists, exists === 2) 491 615 } … … 502 626 } 503 627 504 if (this.debug) console.error('readdir', [this.cwd, f, abs])505 628 if (f.length > this.maxLength) { 506 629 var er = new Error("Path name too long") … … 510 633 } 511 634 512 if (this.statCache.hasOwnProperty(f)) { 513 var c = this.statCache[f] 635 this.log('readdir', [this.cwd, f, abs]) 636 if (this.cache.hasOwnProperty(f)) { 637 var c = this.cache[f] 514 638 if (Array.isArray(c)) { 515 639 if (this.sync) return cb.call(this, null, c) … … 523 647 er.path = f 524 648 er.code = code 525 if (this.debug) console.error(f, er)649 this.log(f, er) 526 650 if (this.sync) return cb.call(this, er) 527 651 return process.nextTick(cb.bind(this, er)) … … 549 673 assert(this instanceof Glob) 550 674 if (entries && !er) { 551 this. statCache[f] = entries675 this.cache[f] = entries 552 676 // if we haven't asked to stat everything for suresies, then just 553 677 // assume that everything in there exists, so we can avoid … … 558 682 if (f === "/") e = f + e 559 683 else e = f + "/" + e 560 this. statCache[e] = true684 this.cache[e] = true 561 685 }, this) 562 686 } … … 568 692 if (er) switch (er.code) { 569 693 case "ENOTDIR": // totally normal. means it *does* exist. 570 this. statCache[f] = 1694 this.cache[f] = 1 571 695 return cb.call(this, er) 572 696 case "ENOENT": // not terribly unusual … … 574 698 case "ENAMETOOLONG": 575 699 case "UNKNOWN": 576 this. statCache[f] = false700 this.cache[f] = false 577 701 return cb.call(this, er) 578 702 default: // some unusual error. Treat as failure. 579 this. statCache[f] = false703 this.cache[f] = false 580 704 if (this.strict) this.emit("error", er) 581 705 if (!this.silent) console.error("glob error", er) … … 591 715 // from node's lib/path.js 592 716 var splitDeviceRe = 593 /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/717 /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ 594 718 , result = splitDeviceRe.exec(p) 595 719 , device = result[1] || '' -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/inherits/README.md
r484 r516 1 A dead simple way to do inheritance in JS. 1 Browser-friendly inheritance fully compatible with standard node.js 2 [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). 2 3 3 var inherits = require("inherits") 4 This package exports standard `inherits` from node.js `util` module in 5 node environment, but also provides alternative browser-friendly 6 implementation through [browser 7 field](https://gist.github.com/shtylman/4339901). Alternative 8 implementation is a literal copy of standard one located in standalone 9 module to avoid requiring of `util`. It also has a shim for old 10 browsers with no `Object.create` support. 4 11 5 function Animal () { 6 this.alive = true 7 } 8 Animal.prototype.say = function (what) { 9 console.log(what) 10 } 12 While keeping you sure you are using standard `inherits` 13 implementation in node.js environment, it allows bundlers such as 14 [browserify](https://github.com/substack/node-browserify) to not 15 include full `util` package to your client code if all you need is 16 just `inherits` function. It worth, because browser shim for `util` 17 package is large and `inherits` is often the single function you need 18 from it. 11 19 12 inherits(Dog, Animal) 13 function Dog () { 14 Dog.super.apply(this) 15 } 16 Dog.prototype.sniff = function () { 17 this.say("sniff sniff") 18 } 19 Dog.prototype.bark = function () { 20 this.say("woof woof") 21 } 20 It's recommended to use this package instead of 21 `require('util').inherits` for any code that has chances to be used 22 not only in node.js but in browser too. 22 23 23 inherits(Chihuahua, Dog) 24 function Chihuahua () { 25 Chihuahua.super.apply(this) 26 } 27 Chihuahua.prototype.bark = function () { 28 this.say("yip yip") 29 } 24 ## usage 30 25 31 // also works 32 function Cat () { 33 Cat.super.apply(this) 34 } 35 Cat.prototype.hiss = function () { 36 this.say("CHSKKSS!!") 37 } 38 inherits(Cat, Animal, { 39 meow: function () { this.say("miao miao") } 40 }) 41 Cat.prototype.purr = function () { 42 this.say("purr purr") 43 } 26 ```js 27 var inherits = require('inherits'); 28 // then use exactly as the standard one 29 ``` 44 30 31 ## note on version ~1.0 45 32 46 var c = new Chihuahua 47 assert(c instanceof Chihuahua) 48 assert(c instanceof Dog) 49 assert(c instanceof Animal) 33 Version ~1.0 had completely different motivation and is not compatible 34 neither with 2.0 nor with standard node.js `inherits`. 50 35 51 The actual function is laughably small. 10-lines small. 36 If you are using version ~1.0 and planning to switch to ~2.0, be 37 careful: 38 39 * new version uses `super_` instead of `super` for referencing 40 superclass 41 * new version overwrites current prototype while old one preserves any 42 existing fields on it -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/inherits/inherits.js
r484 r516 1 module.exports = inherits 2 3 function inherits (c, p, proto) { 4 proto = proto || {} 5 var e = {} 6 ;[c.prototype, proto].forEach(function (s) { 7 Object.getOwnPropertyNames(s).forEach(function (k) { 8 e[k] = Object.getOwnPropertyDescriptor(s, k) 9 }) 10 }) 11 c.prototype = Object.create(p.prototype, e) 12 c.super = p 13 } 14 15 //function Child () { 16 // Child.super.call(this) 17 // console.error([this 18 // ,this.constructor 19 // ,this.constructor === Child 20 // ,this.constructor.super === Parent 21 // ,Object.getPrototypeOf(this) === Child.prototype 22 // ,Object.getPrototypeOf(Object.getPrototypeOf(this)) 23 // === Parent.prototype 24 // ,this instanceof Child 25 // ,this instanceof Parent]) 26 //} 27 //function Parent () {} 28 //inherits(Child, Parent) 29 //new Child 1 module.exports = require('util').inherits -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/inherits/package.json
r484 r516 1 1 { 2 2 "name": "inherits", 3 "description": " A tiny simple way to do classic inheritance in js",4 "version": " 1.0.0",3 "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 4 "version": "2.0.1", 5 5 "keywords": [ 6 6 "inheritance", … … 8 8 "klass", 9 9 "oop", 10 "object-oriented" 10 "object-oriented", 11 "inherits", 12 "browser", 13 "browserify" 11 14 ], 12 15 "main": "./inherits.js", 16 "browser": "./inherits_browser.js", 13 17 "repository": { 14 18 "type": "git", 15 "url": " https://github.com/isaacs/inherits"19 "url": "git://github.com/isaacs/inherits" 16 20 }, 17 "author": { 18 "name": "Isaac Z. Schlueter", 19 "email": "i@izs.me", 20 "url": "http://blog.izs.me/" 21 "license": "ISC", 22 "scripts": { 23 "test": "node test" 21 24 }, 22 "readme": " A dead simple way to do inheritance in JS.\n\n var inherits = require(\"inherits\")\n\n function Animal () {\n this.alive = true\n }\n Animal.prototype.say = function (what) {\n console.log(what)\n }\n\n inherits(Dog, Animal)\n function Dog () {\n Dog.super.apply(this)\n }\n Dog.prototype.sniff = function () {\n this.say(\"sniff sniff\")\n }\n Dog.prototype.bark = function () {\n this.say(\"woof woof\")\n }\n\n inherits(Chihuahua, Dog)\n function Chihuahua () {\n Chihuahua.super.apply(this)\n }\n Chihuahua.prototype.bark = function () {\n this.say(\"yip yip\")\n }\n\n // also works\n function Cat () {\n Cat.super.apply(this)\n }\n Cat.prototype.hiss = function () {\n this.say(\"CHSKKSS!!\")\n }\n inherits(Cat, Animal, {\n meow: function () { this.say(\"miao miao\") }\n })\n Cat.prototype.purr = function () {\n this.say(\"purr purr\")\n }\n\n\n var c = new Chihuahua\n assert(c instanceof Chihuahua)\n assert(c instanceof Dog)\n assert(c instanceof Animal)\n\nThe actual function is laughably small. 10-lines small.\n",25 "readme": "Browser-friendly inheritance fully compatible with standard node.js\n[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor).\n\nThis package exports standard `inherits` from node.js `util` module in\nnode environment, but also provides alternative browser-friendly\nimplementation through [browser\nfield](https://gist.github.com/shtylman/4339901). Alternative\nimplementation is a literal copy of standard one located in standalone\nmodule to avoid requiring of `util`. It also has a shim for old\nbrowsers with no `Object.create` support.\n\nWhile keeping you sure you are using standard `inherits`\nimplementation in node.js environment, it allows bundlers such as\n[browserify](https://github.com/substack/node-browserify) to not\ninclude full `util` package to your client code if all you need is\njust `inherits` function. It worth, because browser shim for `util`\npackage is large and `inherits` is often the single function you need\nfrom it.\n\nIt's recommended to use this package instead of\n`require('util').inherits` for any code that has chances to be used\nnot only in node.js but in browser too.\n\n## usage\n\n```js\nvar inherits = require('inherits');\n// then use exactly as the standard one\n```\n\n## note on version ~1.0\n\nVersion ~1.0 had completely different motivation and is not compatible\nneither with 2.0 nor with standard node.js `inherits`.\n\nIf you are using version ~1.0 and planning to switch to ~2.0, be\ncareful:\n\n* new version uses `super_` instead of `super` for referencing\n superclass\n* new version overwrites current prototype while old one preserves any\n existing fields on it\n", 23 26 "readmeFilename": "README.md", 24 27 "bugs": { … … 26 29 }, 27 30 "homepage": "https://github.com/isaacs/inherits", 28 "_id": "inherits@1.0.0", 29 "dist": { 30 "shasum": "26467026b3b86de1c6f72f00d9a31b1c97077a92" 31 }, 32 "_from": "inherits@1", 33 "_resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz" 31 "_id": "inherits@2.0.1", 32 "_from": "inherits@2" 34 33 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/minimatch/README.md
r484 r516 20 20 minimatch("bar.foo", "*.foo") // true! 21 21 minimatch("bar.foo", "*.bar") // false! 22 minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! 22 23 ``` 23 24 … … 36 37 * `man 3 fnmatch` 37 38 * `man 5 gitignore` 38 39 ### Comparisons to other fnmatch/glob implementations40 41 While strict compliance with the existing standards is a worthwhile42 goal, some discrepancies exist between minimatch and other43 implementations, and are intentional.44 45 If the pattern starts with a `!` character, then it is negated. Set the46 `nonegate` flag to suppress this behavior, and treat leading `!`47 characters normally. This is perhaps relevant if you wish to start the48 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`49 characters at the start of a pattern will negate the pattern multiple50 times.51 52 If a pattern starts with `#`, then it is treated as a comment, and53 will not match anything. Use `\#` to match a literal `#` at the54 start of a line, or set the `nocomment` flag to suppress this behavior.55 56 The double-star character `**` is supported by default, unless the57 `noglobstar` flag is set. This is supported in the manner of bsdglob58 and bash 4.1, where `**` only has special significance if it is the only59 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but60 `a/**b` will not. **Note that this is different from the way that `**` is61 handled by ruby's `Dir` class.**62 63 If an escaped pattern has no matches, and the `nonull` flag is set,64 then minimatch.match returns the pattern as-provided, rather than65 interpreting the character escapes. For example,66 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than67 `"*a?"`. This is akin to setting the `nullglob` option in bash, except68 that it does not resolve escaped pattern characters.69 70 If brace expansion is not disabled, then it is performed before any71 other interpretation of the glob pattern. Thus, a pattern like72 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded73 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are74 checked for validity. Since those two are valid, matching proceeds.75 76 39 77 40 ## Minimatch Class … … 217 180 Returns from negate expressions the same as if they were not negated. 218 181 (Ie, true on a hit, false on a miss.) 182 183 184 ## Comparisons to other fnmatch/glob implementations 185 186 While strict compliance with the existing standards is a worthwhile 187 goal, some discrepancies exist between minimatch and other 188 implementations, and are intentional. 189 190 If the pattern starts with a `!` character, then it is negated. Set the 191 `nonegate` flag to suppress this behavior, and treat leading `!` 192 characters normally. This is perhaps relevant if you wish to start the 193 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` 194 characters at the start of a pattern will negate the pattern multiple 195 times. 196 197 If a pattern starts with `#`, then it is treated as a comment, and 198 will not match anything. Use `\#` to match a literal `#` at the 199 start of a line, or set the `nocomment` flag to suppress this behavior. 200 201 The double-star character `**` is supported by default, unless the 202 `noglobstar` flag is set. This is supported in the manner of bsdglob 203 and bash 4.1, where `**` only has special significance if it is the only 204 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but 205 `a/**b` will not. 206 207 If an escaped pattern has no matches, and the `nonull` flag is set, 208 then minimatch.match returns the pattern as-provided, rather than 209 interpreting the character escapes. For example, 210 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than 211 `"*a?"`. This is akin to setting the `nullglob` option in bash, except 212 that it does not resolve escaped pattern characters. 213 214 If brace expansion is not disabled, then it is performed before any 215 other interpretation of the glob pattern. Thus, a pattern like 216 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded 217 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are 218 checked for validity. Since those two are valid, matching proceeds. -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/minimatch/minimatch.js
r484 r516 69 69 var slashSplit = /\/+/ 70 70 71 minimatch.monkeyPatch = monkeyPatch72 function monkeyPatch () {73 var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")74 var orig = desc.value75 desc.value = function (p) {76 if (p instanceof Minimatch) return p.match(this)77 return orig.call(this, p)78 }79 Object.defineProperty(String.prototype, desc)80 }81 82 71 minimatch.filter = filter 83 72 function filter (pattern, options) { … … 179 168 } 180 169 170 Minimatch.prototype.debug = function() {} 171 181 172 Minimatch.prototype.make = make 182 173 function make () { … … 203 194 var set = this.globSet = this.braceExpand() 204 195 205 if (options.debug) console.error(this.pattern, set) 196 if (options.debug) this.debug = console.error 197 198 this.debug(this.pattern, set) 206 199 207 200 // step 3: now we have a set, so turn each one into a series of path-portion … … 214 207 }) 215 208 216 if (options.debug) console.error(this.pattern, set)209 this.debug(this.pattern, set) 217 210 218 211 // glob --> regexps … … 221 214 }, this) 222 215 223 if (options.debug) console.error(this.pattern, set)216 this.debug(this.pattern, set) 224 217 225 218 // filter out everything that didn't compile properly. … … 228 221 }) 229 222 230 if (options.debug) console.error(this.pattern, set)223 this.debug(this.pattern, set) 231 224 232 225 this.set = set … … 303 296 // and then prepend it to everything we find. 304 297 if (pattern.charAt(0) !== "{") { 305 // console.error(pattern)298 this.debug(pattern) 306 299 var prefix = null 307 300 for (var i = 0, l = pattern.length; i < l; i ++) { 308 301 var c = pattern.charAt(i) 309 // console.error(i, c)302 this.debug(i, c) 310 303 if (c === "\\") { 311 304 escaping = !escaping … … 318 311 // actually no sets, all { were escaped. 319 312 if (prefix === null) { 320 // console.error("no sets")313 this.debug("no sets") 321 314 return [pattern] 322 315 } 323 316 324 var tail = braceExpand(pattern.substr(i), options)317 var tail = braceExpand.call(this, pattern.substr(i), options) 325 318 return tail.map(function (t) { 326 319 return prefix + t … … 337 330 var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) 338 331 if (numset) { 339 // console.error("numset", numset[1], numset[2])340 var suf = braceExpand (pattern.substr(numset[0].length), options)332 this.debug("numset", numset[1], numset[2]) 333 var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) 341 334 , start = +numset[1] 342 335 , end = +numset[2] … … 370 363 } 371 364 372 // console.error("Entering for")365 this.debug("Entering for") 373 366 FOR: for (i = 1, l = pattern.length; i < l; i ++) { 374 367 var c = pattern.charAt(i) 375 // console.error("", i, c)368 this.debug("", i, c) 376 369 377 370 if (escaping) { … … 421 414 // and need to escape the leading brace 422 415 if (depth !== 0) { 423 // console.error("didn't close", pattern)424 return braceExpand ("\\" + pattern, options)416 this.debug("didn't close", pattern) 417 return braceExpand.call(this, "\\" + pattern, options) 425 418 } 426 419 427 420 // x{y,z} -> ["xy", "xz"] 428 // console.error("set", set)429 // console.error("suffix", pattern.substr(i))430 var suf = braceExpand (pattern.substr(i), options)421 this.debug("set", set) 422 this.debug("suffix", pattern.substr(i)) 423 var suf = braceExpand.call(this, pattern.substr(i), options) 431 424 // ["b", "c{d,e}","{f,g}h"] -> 432 425 // [["b"], ["cd", "ce"], ["fh", "gh"]] 433 426 var addBraces = set.length === 1 434 // console.error("set pre-expanded", set)427 this.debug("set pre-expanded", set) 435 428 set = set.map(function (p) { 436 return braceExpand (p, options)437 } )438 // console.error("set expanded", set)429 return braceExpand.call(this, p, options) 430 }, this) 431 this.debug("set expanded", set) 439 432 440 433 … … 482 475 483 476 var re = "" 484 , hasMagic = false477 , hasMagic = !!options.nocase 485 478 , escaping = false 486 479 // ? => one single character … … 497 490 : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" 498 491 : "(?!\\.)" 492 , self = this 499 493 500 494 function clearStateChar () { … … 515 509 break 516 510 } 511 self.debug('clearStateChar %j %j', stateChar, re) 517 512 stateChar = false 518 513 } … … 523 518 ; i ++ ) { 524 519 525 if (options.debug) { 526 console.error("%s\t%s %s %j", pattern, i, re, c) 527 } 520 this.debug("%s\t%s %s %j", pattern, i, re, c) 528 521 529 522 // skip over any that are escaped. … … 552 545 case "@": 553 546 case "!": 554 if (options.debug) { 555 console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 556 } 547 this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 557 548 558 549 // all of those are literals inside a class, except that 559 550 // the glob [!a] means [^a] in regexp 560 551 if (inClass) { 552 this.debug(' in class') 561 553 if (c === "!" && i === classStart + 1) c = "^" 562 554 re += c … … 567 559 // that there was something like ** or +? in there. 568 560 // Handle the stateChar, then proceed with this one. 561 self.debug('call clearStateChar %j', stateChar) 569 562 clearStateChar() 570 563 stateChar = c … … 592 585 // negation is (?:(?!js)[^/]*) 593 586 re += stateChar === "!" ? "(?:(?!" : "(?:" 587 this.debug('plType %j %j', stateChar, re) 594 588 stateChar = false 595 589 continue … … 601 595 } 602 596 597 clearStateChar() 603 598 hasMagic = true 604 599 re += ")" … … 624 619 } 625 620 621 clearStateChar() 626 622 re += "|" 627 623 continue … … 716 712 }) 717 713 718 // console.error("tail=%j\n %s", tail, tail)714 this.debug("tail=%j\n %s", tail, tail) 719 715 var t = pl.type === "*" ? star 720 716 : pl.type === "?" ? qmark … … 805 801 // must match entire pattern 806 802 // ending in a * or ** will make it less strict. 807 re = "^ " + re + "$"803 re = "^(?:" + re + ")$" 808 804 809 805 // can match anything, as long as it's not this. … … 830 826 Minimatch.prototype.match = match 831 827 function match (f, partial) { 832 // console.error("match", f, this.pattern)828 this.debug("match", f, this.pattern) 833 829 // short-circuit in the case of busted things. 834 830 // comments, etc. … … 848 844 // treat the test path as a set of pathparts. 849 845 f = f.split(slashSplit) 850 if (options.debug) { 851 console.error(this.pattern, "split", f) 852 } 846 this.debug(this.pattern, "split", f) 853 847 854 848 // just ONE of the pattern sets in this.set needs to match … … 858 852 859 853 var set = this.set 860 // console.error(this.pattern, "set", set) 854 this.debug(this.pattern, "set", set) 855 856 var splitFile = path.basename(f.join("/")).split("/") 861 857 862 858 for (var i = 0, l = set.length; i < l; i ++) { 863 var pattern = set[i] 864 var hit = this.matchOne(f, pattern, partial) 859 var pattern = set[i], file = f 860 if (options.matchBase && pattern.length === 1) { 861 file = splitFile 862 } 863 var hit = this.matchOne(file, pattern, partial) 865 864 if (hit) { 866 865 if (options.flipNegate) return true … … 883 882 var options = this.options 884 883 885 if (options.debug) { 886 console.error("matchOne", 887 { "this": this 888 , file: file 889 , pattern: pattern }) 890 } 891 892 if (options.matchBase && pattern.length === 1) { 893 file = path.basename(file.join("/")).split("/") 894 } 895 896 if (options.debug) { 897 console.error("matchOne", file.length, pattern.length) 898 } 884 this.debug("matchOne", 885 { "this": this 886 , file: file 887 , pattern: pattern }) 888 889 this.debug("matchOne", file.length, pattern.length) 899 890 900 891 for ( var fi = 0 … … 905 896 ; fi ++, pi ++ ) { 906 897 907 if (options.debug) { 908 console.error("matchOne loop") 909 } 898 this.debug("matchOne loop") 910 899 var p = pattern[pi] 911 900 , f = file[fi] 912 901 913 if (options.debug) { 914 console.error(pattern, p, f) 915 } 902 this.debug(pattern, p, f) 916 903 917 904 // should be impossible. … … 920 907 921 908 if (p === GLOBSTAR) { 922 if (options.debug) 923 console.error('GLOBSTAR', [pattern, p, f]) 909 this.debug('GLOBSTAR', [pattern, p, f]) 924 910 925 911 // "**" … … 948 934 , pr = pi + 1 949 935 if (pr === pl) { 950 if (options.debug) 951 console.error('** at the end') 936 this.debug('** at the end') 952 937 // a ** at the end will just swallow the rest. 953 938 // We have found a match. … … 967 952 var swallowee = file[fr] 968 953 969 if (options.debug) { 970 console.error('\nglobstar while', 971 file, fr, pattern, pr, swallowee) 972 } 954 this.debug('\nglobstar while', 955 file, fr, pattern, pr, swallowee) 973 956 974 957 // XXX remove this slice. Just pass the start index. 975 958 if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { 976 if (options.debug) 977 console.error('globstar found match!', fr, fl, swallowee) 959 this.debug('globstar found match!', fr, fl, swallowee) 978 960 // found a match. 979 961 return true … … 983 965 if (swallowee === "." || swallowee === ".." || 984 966 (!options.dot && swallowee.charAt(0) === ".")) { 985 if (options.debug) 986 console.error("dot detected!", file, fr, pattern, pr) 967 this.debug("dot detected!", file, fr, pattern, pr) 987 968 break WHILE 988 969 } 989 970 990 971 // ** swallows a segment, and continue. 991 if (options.debug) 992 console.error('globstar swallow a segment, and continue') 972 this.debug('globstar swallow a segment, and continue') 993 973 fr ++ 994 974 } … … 999 979 if (partial) { 1000 980 // ran out of file 1001 // console.error("\n>>> no match, partial?", file, fr, pattern, pr)981 this.debug("\n>>> no match, partial?", file, fr, pattern, pr) 1002 982 if (fr === fl) return true 1003 983 } … … 1015 995 hit = f === p 1016 996 } 1017 if (options.debug) { 1018 console.error("string match", p, f, hit) 1019 } 997 this.debug("string match", p, f, hit) 1020 998 } else { 1021 999 hit = f.match(p) 1022 if (options.debug) { 1023 console.error("pattern match", p, f, hit) 1024 } 1000 this.debug("pattern match", p, f, hit) 1025 1001 } 1026 1002 -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/README.md
r484 r516 27 27 ## Options 28 28 29 * `max` The maximum number of items. Not setting this is kind of 29 * `max` The maximum size of the cache, checked by applying the length 30 function to all values in the cache. Not setting this is kind of 30 31 silly, since that's the whole purpose of this lib, but it defaults 31 32 to `Infinity`. … … 45 46 to immediately put it back in, you'll have to do that in a 46 47 `nextTick` or `setTimeout` callback or it won't do anything. 48 * `stale` By default, if you set a `maxAge`, it'll only actually pull 49 stale items out of the cache when you `get(key)`. (That is, it's 50 not pre-emptively doing a `setTimeout` or anything.) If you set 51 `stale:true`, it'll return the stale value before deleting it. If 52 you don't set this, then it'll return `undefined` when you try to 53 get a stale entry, as if it had already been deleted. 54 55 ## API 56 57 * `set(key, value)` 58 * `get(key) => value` 59 60 Both of these will update the "recently used"-ness of the key. 61 They do what you think. 62 63 * `peek(key)` 64 65 Returns the key value (or `undefined` if not found) without 66 updating the "recently used"-ness of the key. 67 68 (If you find yourself using this a lot, you *might* be using the 69 wrong sort of data structure, but there are some use cases where 70 it's handy.) 71 72 * `del(key)` 73 74 Deletes a key out of the cache. 75 76 * `reset()` 77 78 Clear the cache entirely, throwing away all values. 79 80 * `has(key)` 81 82 Check if a key is in the cache, without updating the recent-ness 83 or deleting it for being stale. 84 85 * `forEach(function(value,key,cache), [thisp])` 86 87 Just like `Array.prototype.forEach`. Iterates over all the keys 88 in the cache, in order of recent-ness. (Ie, more recently used 89 items are iterated over first.) 90 91 * `keys()` 92 93 Return an array of the keys in the cache. 94 95 * `values()` 96 97 Return an array of the values in the cache. -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js
r484 r516 15 15 16 16 function LRUCache (options) { 17 if (!(this instanceof LRUCache)) {17 if (!(this instanceof LRUCache)) 18 18 return new LRUCache(options) 19 } 20 21 var max 22 if (typeof options === 'number') { 23 max = options 24 options = { max: max } 25 } 26 max = options.max 27 28 if (!options) options = {} 29 30 var lengthCalculator = options.length || naiveLength 31 32 if (typeof lengthCalculator !== "function") { 33 lengthCalculator = naiveLength 34 } 35 if (!max || !(typeof max === "number") || max <= 0 ) { 36 // a little bit silly. maybe this should throw? 37 max = Infinity 38 } 39 40 var maxAge = options.maxAge || null 41 42 var dispose = options.dispose 43 44 var cache = Object.create(null) // hash of items by key 45 , lruList = Object.create(null) // list of items in order of use recency 46 , mru = 0 // most recently used 47 , length = 0 // number of items in the list 48 , itemCount = 0 49 50 51 // resize the cache when the max changes. 52 Object.defineProperty(this, "max", 53 { set : function (mL) { 54 if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity 55 max = mL 56 // if it gets above double max, trim right away. 57 // otherwise, do it whenever it's convenient. 58 if (length > max) trim() 19 20 if (typeof options === 'number') 21 options = { max: options } 22 23 if (!options) 24 options = {} 25 26 this._max = options.max 27 // Kind of weird to have a default max of Infinity, but oh well. 28 if (!this._max || !(typeof this._max === "number") || this._max <= 0 ) 29 this._max = Infinity 30 31 this._lengthCalculator = options.length || naiveLength 32 if (typeof this._lengthCalculator !== "function") 33 this._lengthCalculator = naiveLength 34 35 this._allowStale = options.stale || false 36 this._maxAge = options.maxAge || null 37 this._dispose = options.dispose 38 this.reset() 39 } 40 41 // resize the cache when the max changes. 42 Object.defineProperty(LRUCache.prototype, "max", 43 { set : function (mL) { 44 if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity 45 this._max = mL 46 if (this._length > this._max) trim(this) 47 } 48 , get : function () { return this._max } 49 , enumerable : true 50 }) 51 52 // resize the cache when the lengthCalculator changes. 53 Object.defineProperty(LRUCache.prototype, "lengthCalculator", 54 { set : function (lC) { 55 if (typeof lC !== "function") { 56 this._lengthCalculator = naiveLength 57 this._length = this._itemCount 58 for (var key in this._cache) { 59 this._cache[key].length = 1 60 } 61 } else { 62 this._lengthCalculator = lC 63 this._length = 0 64 for (var key in this._cache) { 65 this._cache[key].length = this._lengthCalculator(this._cache[key].value) 66 this._length += this._cache[key].length 67 } 59 68 } 60 , get : function () { return max } 61 , enumerable : true 62 }) 63 64 // resize the cache when the lengthCalculator changes. 65 Object.defineProperty(this, "lengthCalculator", 66 { set : function (lC) { 67 if (typeof lC !== "function") { 68 lengthCalculator = naiveLength 69 length = itemCount 70 for (var key in cache) { 71 cache[key].length = 1 72 } 73 } else { 74 lengthCalculator = lC 75 length = 0 76 for (var key in cache) { 77 cache[key].length = lengthCalculator(cache[key].value) 78 length += cache[key].length 79 } 80 } 81 82 if (length > max) trim() 83 } 84 , get : function () { return lengthCalculator } 85 , enumerable : true 86 }) 87 88 Object.defineProperty(this, "length", 89 { get : function () { return length } 90 , enumerable : true 91 }) 92 93 94 Object.defineProperty(this, "itemCount", 95 { get : function () { return itemCount } 96 , enumerable : true 97 }) 98 99 this.reset = function () { 100 if (dispose) { 101 for (var k in cache) { 102 dispose(k, cache[k].value) 103 } 104 } 105 cache = {} 106 lruList = {} 107 mru = 0 108 length = 0 109 itemCount = 0 110 } 111 112 // Provided for debugging/dev purposes only. No promises whatsoever that 113 // this API stays stable. 114 this.dump = function () { 115 return cache 116 } 117 118 this.set = function (key, value) { 119 if (hOP(cache, key)) { 120 // dispose of the old one before overwriting 121 if (dispose) dispose(key, cache[key].value) 122 if (maxAge) cache[key].now = Date.now() 123 cache[key].value = value 124 this.get(key) 125 return true 126 } 127 128 var len = lengthCalculator(value) 129 var age = maxAge ? Date.now() : 0 130 var hit = new Entry(key, value, mru++, len, age) 131 132 // oversized objects fall out of cache automatically. 133 if (hit.length > max) { 134 if (dispose) dispose(key, value) 135 return false 136 } 137 138 length += hit.length 139 lruList[hit.lu] = cache[key] = hit 140 itemCount ++ 141 142 if (length > max) trim() 69 70 if (this._length > this._max) trim(this) 71 } 72 , get : function () { return this._lengthCalculator } 73 , enumerable : true 74 }) 75 76 Object.defineProperty(LRUCache.prototype, "length", 77 { get : function () { return this._length } 78 , enumerable : true 79 }) 80 81 82 Object.defineProperty(LRUCache.prototype, "itemCount", 83 { get : function () { return this._itemCount } 84 , enumerable : true 85 }) 86 87 LRUCache.prototype.forEach = function (fn, thisp) { 88 thisp = thisp || this 89 var i = 0; 90 for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { 91 i++ 92 var hit = this._lruList[k] 93 if (this._maxAge && (Date.now() - hit.now > this._maxAge)) { 94 del(this, hit) 95 if (!this._allowStale) hit = undefined 96 } 97 if (hit) { 98 fn.call(thisp, hit.value, hit.key, this) 99 } 100 } 101 } 102 103 LRUCache.prototype.keys = function () { 104 var keys = new Array(this._itemCount) 105 var i = 0 106 for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { 107 var hit = this._lruList[k] 108 keys[i++] = hit.key 109 } 110 return keys 111 } 112 113 LRUCache.prototype.values = function () { 114 var values = new Array(this._itemCount) 115 var i = 0 116 for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { 117 var hit = this._lruList[k] 118 values[i++] = hit.value 119 } 120 return values 121 } 122 123 LRUCache.prototype.reset = function () { 124 if (this._dispose && this._cache) { 125 for (var k in this._cache) { 126 this._dispose(k, this._cache[k].value) 127 } 128 } 129 130 this._cache = Object.create(null) // hash of items by key 131 this._lruList = Object.create(null) // list of items in order of use recency 132 this._mru = 0 // most recently used 133 this._lru = 0 // least recently used 134 this._length = 0 // number of items in the list 135 this._itemCount = 0 136 } 137 138 // Provided for debugging/dev purposes only. No promises whatsoever that 139 // this API stays stable. 140 LRUCache.prototype.dump = function () { 141 return this._cache 142 } 143 144 LRUCache.prototype.dumpLru = function () { 145 return this._lruList 146 } 147 148 LRUCache.prototype.set = function (key, value) { 149 if (hOP(this._cache, key)) { 150 // dispose of the old one before overwriting 151 if (this._dispose) this._dispose(key, this._cache[key].value) 152 if (this._maxAge) this._cache[key].now = Date.now() 153 this._cache[key].value = value 154 this.get(key) 143 155 return true 144 156 } 145 157 146 this.get = function (key) { 147 if (!hOP(cache, key)) return 148 var hit = cache[key] 149 if (maxAge && (Date.now() - hit.now > maxAge)) { 150 this.del(key) 151 return 152 } 153 delete lruList[hit.lu] 154 hit.lu = mru ++ 155 lruList[hit.lu] = hit 156 return hit.value 157 } 158 159 this.del = function (key) { 160 if (!hOP(cache, key)) return 161 var hit = cache[key] 162 if (dispose) dispose(key, hit.value) 163 delete cache[key] 164 delete lruList[hit.lu] 165 length -= hit.length 166 itemCount -- 167 } 168 169 function trim () { 170 if (length <= max) return 171 for (var k in lruList) { 172 if (length <= max) break; 173 var hit = lruList[k] 174 if (dispose) dispose(hit.key, hit.value) 175 length -= hit.length 176 delete cache[ hit.key ] 177 delete lruList[k] 178 } 158 var len = this._lengthCalculator(value) 159 var age = this._maxAge ? Date.now() : 0 160 var hit = new Entry(key, value, this._mru++, len, age) 161 162 // oversized objects fall out of cache automatically. 163 if (hit.length > this._max) { 164 if (this._dispose) this._dispose(key, value) 165 return false 166 } 167 168 this._length += hit.length 169 this._lruList[hit.lu] = this._cache[key] = hit 170 this._itemCount ++ 171 172 if (this._length > this._max) trim(this) 173 return true 174 } 175 176 LRUCache.prototype.has = function (key) { 177 if (!hOP(this._cache, key)) return false 178 var hit = this._cache[key] 179 if (this._maxAge && (Date.now() - hit.now > this._maxAge)) { 180 return false 181 } 182 return true 183 } 184 185 LRUCache.prototype.get = function (key) { 186 return get(this, key, true) 187 } 188 189 LRUCache.prototype.peek = function (key) { 190 return get(this, key, false) 191 } 192 193 LRUCache.prototype.pop = function () { 194 var hit = this._lruList[this._lru] 195 del(this, hit) 196 return hit || null 197 } 198 199 LRUCache.prototype.del = function (key) { 200 del(this, this._cache[key]) 201 } 202 203 function get (self, key, doUse) { 204 var hit = self._cache[key] 205 if (hit) { 206 if (self._maxAge && (Date.now() - hit.now > self._maxAge)) { 207 del(self, hit) 208 if (!self._allowStale) hit = undefined 209 } else { 210 if (doUse) use(self, hit) 211 } 212 if (hit) hit = hit.value 213 } 214 return hit 215 } 216 217 function use (self, hit) { 218 shiftLU(self, hit) 219 hit.lu = self._mru ++ 220 self._lruList[hit.lu] = hit 221 } 222 223 function trim (self) { 224 while (self._lru < self._mru && self._length > self._max) 225 del(self, self._lruList[self._lru]) 226 } 227 228 function shiftLU (self, hit) { 229 delete self._lruList[ hit.lu ] 230 while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++ 231 } 232 233 function del (self, hit) { 234 if (hit) { 235 if (self._dispose) self._dispose(hit.key, hit.value) 236 self._length -= hit.length 237 self._itemCount -- 238 delete self._cache[ hit.key ] 239 shiftLU(self, hit) 179 240 } 180 241 } 181 242 182 243 // classy, since V8 prefers predictable objects. 183 function Entry (key, value, mru, len, age) {244 function Entry (key, value, lu, length, now) { 184 245 this.key = key 185 246 this.value = value 186 this.lu = mru187 this.length = len 188 this.now = age247 this.lu = lu 248 this.length = length 249 this.now = now 189 250 } 190 251 -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json
r484 r516 2 2 "name": "lru-cache", 3 3 "description": "A cache object that deletes the least-recently-used items.", 4 "version": "2. 0.4",4 "version": "2.5.0", 5 5 "author": { 6 6 "name": "Isaac Z. Schlueter", … … 8 8 }, 9 9 "scripts": { 10 "test": "tap test "10 "test": "tap test --gc" 11 11 }, 12 12 "main": "lib/lru-cache.js", … … 16 16 }, 17 17 "devDependencies": { 18 "tap": "" 18 "tap": "", 19 "weak": "" 19 20 }, 20 21 "license": { … … 22 23 "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE" 23 24 }, 24 "contributors": [ 25 { 26 "name": "Isaac Z. Schlueter", 27 "email": "i@izs.me" 28 }, 29 { 30 "name": "Carlos Brito Lage", 31 "email": "carlos@carloslage.net" 32 }, 33 { 34 "name": "Marko Mikulicic", 35 "email": "marko.mikulicic@isti.cnr.it" 36 }, 37 { 38 "name": "Trent Mick", 39 "email": "trentm@gmail.com" 40 }, 41 { 42 "name": "Kevin O'Hara", 43 "email": "kevinohara80@gmail.com" 44 }, 45 { 46 "name": "Marco Rogers", 47 "email": "marco.rogers@gmail.com" 48 }, 49 { 50 "name": "Jesse Dailey", 51 "email": "jesse.dailey@gmail.com" 52 } 53 ], 54 "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum number of items. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n", 25 "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n", 55 26 "readmeFilename": "README.md", 56 27 "bugs": { … … 58 29 }, 59 30 "homepage": "https://github.com/isaacs/node-lru-cache", 60 "_id": "lru-cache@2.0.4", 61 "dist": { 62 "shasum": "65a440a9ccba331dd1a4cabc937c22dba39bb105" 63 }, 64 "_from": "lru-cache@2.0.4", 65 "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.0.4.tgz" 31 "_id": "lru-cache@2.5.0", 32 "_from": "lru-cache@2" 66 33 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/test/basic.js
r484 r516 266 266 t.end() 267 267 }) 268 269 test("has()", function(t) { 270 var cache = new LRU({ 271 max: 1, 272 maxAge: 10 273 }) 274 275 cache.set('foo', 'bar') 276 t.equal(cache.has('foo'), true) 277 cache.set('blu', 'baz') 278 t.equal(cache.has('foo'), false) 279 t.equal(cache.has('blu'), true) 280 setTimeout(function() { 281 t.equal(cache.has('blu'), false) 282 t.end() 283 }, 15) 284 }) 285 286 test("stale", function(t) { 287 var cache = new LRU({ 288 maxAge: 10, 289 stale: true 290 }) 291 292 cache.set('foo', 'bar') 293 t.equal(cache.get('foo'), 'bar') 294 t.equal(cache.has('foo'), true) 295 setTimeout(function() { 296 t.equal(cache.has('foo'), false) 297 t.equal(cache.get('foo'), 'bar') 298 t.equal(cache.get('foo'), undefined) 299 t.end() 300 }, 15) 301 }) 302 303 test("lru update via set", function(t) { 304 var cache = LRU({ max: 2 }); 305 306 cache.set('foo', 1); 307 cache.set('bar', 2); 308 cache.del('bar'); 309 cache.set('baz', 3); 310 cache.set('qux', 4); 311 312 t.equal(cache.get('foo'), undefined) 313 t.equal(cache.get('bar'), undefined) 314 t.equal(cache.get('baz'), 3) 315 t.equal(cache.get('qux'), 4) 316 t.end() 317 }) 318 319 test("least recently set w/ peek", function (t) { 320 var cache = new LRU(2) 321 cache.set("a", "A") 322 cache.set("b", "B") 323 t.equal(cache.peek("a"), "A") 324 cache.set("c", "C") 325 t.equal(cache.get("c"), "C") 326 t.equal(cache.get("b"), "B") 327 t.equal(cache.get("a"), undefined) 328 t.end() 329 }) 330 331 test("pop the least used item", function (t) { 332 var cache = new LRU(3) 333 , last 334 335 cache.set("a", "A") 336 cache.set("b", "B") 337 cache.set("c", "C") 338 339 t.equal(cache.length, 3) 340 t.equal(cache.max, 3) 341 342 // Ensure we pop a, c, b 343 cache.get("b", "B") 344 345 last = cache.pop() 346 t.equal(last.key, "a") 347 t.equal(last.value, "A") 348 t.equal(cache.length, 2) 349 t.equal(cache.max, 3) 350 351 last = cache.pop() 352 t.equal(last.key, "c") 353 t.equal(last.value, "C") 354 t.equal(cache.length, 1) 355 t.equal(cache.max, 3) 356 357 last = cache.pop() 358 t.equal(last.key, "b") 359 t.equal(last.value, "B") 360 t.equal(cache.length, 0) 361 t.equal(cache.max, 3) 362 363 last = cache.pop() 364 t.equal(last, null) 365 t.equal(cache.length, 0) 366 t.equal(cache.max, 3) 367 368 t.end() 369 }) -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/minimatch/node_modules/sigmund/package.json
r484 r516 39 39 "homepage": "https://github.com/isaacs/sigmund", 40 40 "_id": "sigmund@1.0.0", 41 "_from": "sigmund@1.0.0", 42 "dist": { 43 "shasum": "4d1a782fdcf140509fd8ea166574e0665819b881" 44 }, 45 "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz" 41 "_from": "sigmund@~1.0.0" 46 42 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/minimatch/package.json
r484 r516 7 7 "name": "minimatch", 8 8 "description": "a glob matcher in javascript", 9 "version": "0.2. 9",9 "version": "0.2.14", 10 10 "repository": { 11 11 "type": "git", … … 14 14 "main": "minimatch.js", 15 15 "scripts": { 16 "test": "tap test "16 "test": "tap test/*.js" 17 17 }, 18 18 "engines": { … … 20 20 }, 21 21 "dependencies": { 22 "lru-cache": " ~2.0.0",22 "lru-cache": "2", 23 23 "sigmund": "~1.0.0" 24 24 }, … … 30 30 "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" 31 31 }, 32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n ```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", 33 33 "readmeFilename": "README.md", 34 34 "bugs": { … … 36 36 }, 37 37 "homepage": "https://github.com/isaacs/minimatch", 38 "_id": "minimatch@0.2.9", 39 "dist": { 40 "shasum": "451806a2fb9fdc263b5a2d340bda92d62590b4f4" 41 }, 42 "_from": "minimatch@0.2.9", 43 "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.9.tgz" 38 "_id": "minimatch@0.2.14", 39 "_from": "minimatch@~0.2.11" 44 40 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/node_modules/minimatch/test/basic.js
r484 r516 14 14 , ".x", ".y" ]) 15 15 16 17 var patterns = 18 [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test" 19 , ["a*", ["a", "abc", "abd", "abe"]] 20 , ["X*", ["X*"], {nonull: true}] 21 22 // allow null glob expansion 23 , ["X*", []] 24 25 // isaacs: Slightly different than bash/sh/ksh 26 // \\* is not un-escaped to literal "*" in a failed match, 27 // but it does make it get treated as a literal star 28 , ["\\*", ["\\*"], {nonull: true}] 29 , ["\\**", ["\\**"], {nonull: true}] 30 , ["\\*\\*", ["\\*\\*"], {nonull: true}] 31 32 , ["b*/", ["bdir/"]] 33 , ["c*", ["c", "ca", "cb"]] 34 , ["**", files] 35 36 , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] 37 , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] 38 39 , "legendary larry crashes bashes" 40 , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" 41 , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] 42 , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" 43 , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] 44 45 , "character classes" 46 , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] 47 , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", 48 "bdir/", "ca", "cb", "dd", "de"]] 49 , ["a*[^c]", ["abd", "abe"]] 50 , function () { files.push("a-b", "aXb") } 51 , ["a[X-]b", ["a-b", "aXb"]] 52 , function () { files.push(".x", ".y") } 53 , ["[^a-c]*", ["d", "dd", "de"]] 54 , function () { files.push("a*b/", "a*b/ooo") } 55 , ["a\\*b/*", ["a*b/ooo"]] 56 , ["a\\*?/*", ["a*b/ooo"]] 57 , ["*\\\\!*", [], {null: true}, ["echo !7"]] 58 , ["*\\!*", ["echo !7"], null, ["echo !7"]] 59 , ["*.\\*", ["r.*"], null, ["r.*"]] 60 , ["a[b]c", ["abc"]] 61 , ["a[\\b]c", ["abc"]] 62 , ["a?c", ["abc"]] 63 , ["a\\*c", [], {null: true}, ["abc"]] 64 , ["", [""], { null: true }, [""]] 65 66 , "http://www.opensource.apple.com/source/bash/bash-23/" + 67 "bash/tests/glob-test" 68 , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } 69 , ["*/man*/bash.*", ["man/man1/bash.1"]] 70 , ["man/man1/bash.1", ["man/man1/bash.1"]] 71 , ["a***c", ["abc"], null, ["abc"]] 72 , ["a*****?c", ["abc"], null, ["abc"]] 73 , ["?*****??", ["abc"], null, ["abc"]] 74 , ["*****??", ["abc"], null, ["abc"]] 75 , ["?*****?c", ["abc"], null, ["abc"]] 76 , ["?***?****c", ["abc"], null, ["abc"]] 77 , ["?***?****?", ["abc"], null, ["abc"]] 78 , ["?***?****", ["abc"], null, ["abc"]] 79 , ["*******c", ["abc"], null, ["abc"]] 80 , ["*******?", ["abc"], null, ["abc"]] 81 , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] 82 , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] 83 , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] 84 , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] 85 , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] 86 , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] 87 , ["[-abc]", ["-"], null, ["-"]] 88 , ["[abc-]", ["-"], null, ["-"]] 89 , ["\\", ["\\"], null, ["\\"]] 90 , ["[\\\\]", ["\\"], null, ["\\"]] 91 , ["[[]", ["["], null, ["["]] 92 , ["[", ["["], null, ["["]] 93 , ["[*", ["[abc"], null, ["[abc"]] 94 , "a right bracket shall lose its special meaning and\n" + 95 "represent itself in a bracket expression if it occurs\n" + 96 "first in the list. -- POSIX.2 2.8.3.2" 97 , ["[]]", ["]"], null, ["]"]] 98 , ["[]-]", ["]"], null, ["]"]] 99 , ["[a-\z]", ["p"], null, ["p"]] 100 , ["??**********?****?", [], { null: true }, ["abc"]] 101 , ["??**********?****c", [], { null: true }, ["abc"]] 102 , ["?************c****?****", [], { null: true }, ["abc"]] 103 , ["*c*?**", [], { null: true }, ["abc"]] 104 , ["a*****c*?**", [], { null: true }, ["abc"]] 105 , ["a********???*******", [], { null: true }, ["abc"]] 106 , ["[]", [], { null: true }, ["a"]] 107 , ["[abc", [], { null: true }, ["["]] 108 109 , "nocase tests" 110 , ["XYZ", ["xYz"], { nocase: true, null: true } 111 , ["xYz", "ABC", "IjK"]] 112 , ["ab*", ["ABC"], { nocase: true, null: true } 113 , ["xYz", "ABC", "IjK"]] 114 , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } 115 , ["xYz", "ABC", "IjK"]] 116 117 // [ pattern, [matches], MM opts, files, TAP opts] 118 , "onestar/twostar" 119 , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] 120 , ["{/?,*}", ["/a", "bb"], {null: true} 121 , ["/a", "/b/b", "/a/b/c", "bb"]] 122 123 , "dots should not match unless requested" 124 , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] 125 126 // .. and . can only match patterns starting with ., 127 // even when options.dot is set. 128 , function () { 129 files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] 130 } 131 , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] 132 , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] 133 , ["a/*/b", ["a/c/b"], {dot:false}] 134 , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] 135 136 137 // this also tests that changing the options needs 138 // to change the cache key, even if the pattern is 139 // the same! 140 , ["**", ["a/b","a/.d",".a/.d"], { dot: true } 141 , [ ".a/.d", "a/.d", "a/b"]] 142 143 , "paren sets cannot contain slashes" 144 , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] 145 146 // brace sets trump all else. 147 // 148 // invalid glob pattern. fails on bash4 and bsdglob. 149 // however, in this implementation, it's easier just 150 // to do the intuitive thing, and let brace-expansion 151 // actually come before parsing any extglob patterns, 152 // like the documentation seems to say. 153 // 154 // XXX: if anyone complains about this, either fix it 155 // or tell them to grow up and stop complaining. 156 // 157 // bash/bsdglob says this: 158 // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] 159 // but we do this instead: 160 , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] 161 162 // test partial parsing in the presence of comment/negation chars 163 , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] 164 , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] 165 166 // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. 167 , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" 168 , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] 169 , {} 170 , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] 171 172 173 // crazy nested {,,} and *(||) tests. 174 , function () { 175 files = [ "a", "b", "c", "d" 176 , "ab", "ac", "ad" 177 , "bc", "cb" 178 , "bc,d", "c,db", "c,d" 179 , "d)", "(b|c", "*(b|c" 180 , "b|c", "b|cc", "cb|c" 181 , "x(a|b|c)", "x(a|c)" 182 , "(a|b|c)", "(a|c)"] 183 } 184 , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] 185 , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] 186 // a 187 // *(b|c) 188 // *(b|d) 189 , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] 190 , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] 191 192 193 // test various flag settings. 194 , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] 195 , { noext: true } ] 196 , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} 197 , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] 198 , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] 199 200 201 // begin channelling Boole and deMorgan... 202 , "negation tests" 203 , function () { 204 files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] 205 } 206 207 // anything that is NOT a* matches. 208 , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] 209 210 // anything that IS !a* matches. 211 , ["!a*", ["!ab", "!abc"], {nonegate: true}] 212 213 // anything that IS a* matches 214 , ["!!a*", ["a!b"]] 215 216 // anything that is NOT !a* matches 217 , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] 218 219 // negation nestled within a pattern 220 , function () { 221 files = [ "foo.js" 222 , "foo.bar" 223 // can't match this one without negative lookbehind. 224 , "foo.js.js" 225 , "blar.js" 226 , "foo." 227 , "boo.js.boo" ] 228 } 229 , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] 230 231 // https://github.com/isaacs/minimatch/issues/5 232 , function () { 233 files = [ 'a/b/.x/c' 234 , 'a/b/.x/c/d' 235 , 'a/b/.x/c/d/e' 236 , 'a/b/.x' 237 , 'a/b/.x/' 238 , 'a/.x/b' 239 , '.x' 240 , '.x/' 241 , '.x/a' 242 , '.x/a/b' 243 , 'a/.x/b/.x/c' 244 , '.x/.x' ] 245 } 246 , ["**/.x/**", [ '.x/' 247 , '.x/a' 248 , '.x/a/b' 249 , 'a/.x/b' 250 , 'a/b/.x/' 251 , 'a/b/.x/c' 252 , 'a/b/.x/c/d' 253 , 'a/b/.x/c/d/e' ] ] 254 255 ] 256 257 var regexps = 258 [ '/^(?:(?=.)a[^/]*?)$/', 259 '/^(?:(?=.)X[^/]*?)$/', 260 '/^(?:(?=.)X[^/]*?)$/', 261 '/^(?:\\*)$/', 262 '/^(?:(?=.)\\*[^/]*?)$/', 263 '/^(?:\\*\\*)$/', 264 '/^(?:(?=.)b[^/]*?\\/)$/', 265 '/^(?:(?=.)c[^/]*?)$/', 266 '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', 267 '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/', 268 '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/', 269 '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/', 270 '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/', 271 '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/', 272 '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/', 273 '/^(?:(?=.)a[^/]*?[^c])$/', 274 '/^(?:(?=.)a[X-]b)$/', 275 '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/', 276 '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/', 277 '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/', 278 '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/', 279 '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/', 280 '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/', 281 '/^(?:(?=.)a[b]c)$/', 282 '/^(?:(?=.)a[b]c)$/', 283 '/^(?:(?=.)a[^/]c)$/', 284 '/^(?:a\\*c)$/', 285 'false', 286 '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/', 287 '/^(?:man\\/man1\\/bash\\.1)$/', 288 '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/', 289 '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', 290 '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', 291 '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', 292 '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', 293 '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', 294 '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', 295 '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', 296 '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/', 297 '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', 298 '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', 299 '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', 300 '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/', 301 '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/', 302 '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/', 303 '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', 304 '/^(?:(?!\\.)(?=.)[-abc])$/', 305 '/^(?:(?!\\.)(?=.)[abc-])$/', 306 '/^(?:\\\\)$/', 307 '/^(?:(?!\\.)(?=.)[\\\\])$/', 308 '/^(?:(?!\\.)(?=.)[\\[])$/', 309 '/^(?:\\[)$/', 310 '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/', 311 '/^(?:(?!\\.)(?=.)[\\]])$/', 312 '/^(?:(?!\\.)(?=.)[\\]-])$/', 313 '/^(?:(?!\\.)(?=.)[a-z])$/', 314 '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', 315 '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', 316 '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', 317 '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', 318 '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', 319 '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', 320 '/^(?:\\[\\])$/', 321 '/^(?:\\[abc)$/', 322 '/^(?:(?=.)XYZ)$/i', 323 '/^(?:(?=.)ab[^/]*?)$/i', 324 '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i', 325 '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/', 326 '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/', 327 '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', 328 '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/', 329 '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', 330 '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/', 331 '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', 332 '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/', 333 '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/', 334 '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', 335 '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/', 336 '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/', 337 '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/', 338 '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', 339 '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/', 340 '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/', 341 '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/', 342 '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/', 343 '/^(?:(?=.)a[^/]b)$/', 344 '/^(?:(?=.)#[^/]*?)$/', 345 '/^(?!^(?:(?=.)a[^/]*?)$).*$/', 346 '/^(?:(?=.)\\!a[^/]*?)$/', 347 '/^(?:(?=.)a[^/]*?)$/', 348 '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/', 349 '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/', 350 '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ] 351 var re = 0; 352 16 353 tap.test("basic tests", function (t) { 17 354 var start = Date.now() 18 355 19 356 // [ pattern, [matches], MM opts, files, TAP opts] 20 ; [ "http://www.bashcookbook.com/bashinfo" + 21 "/source/bash-1.14.7/tests/glob-test" 22 , ["a*", ["a", "abc", "abd", "abe"]] 23 , ["X*", ["X*"], {nonull: true}] 24 25 // allow null glob expansion 26 , ["X*", []] 27 28 // isaacs: Slightly different than bash/sh/ksh 29 // \\* is not un-escaped to literal "*" in a failed match, 30 // but it does make it get treated as a literal star 31 , ["\\*", ["\\*"], {nonull: true}] 32 , ["\\**", ["\\**"], {nonull: true}] 33 , ["\\*\\*", ["\\*\\*"], {nonull: true}] 34 35 , ["b*/", ["bdir/"]] 36 , ["c*", ["c", "ca", "cb"]] 37 , ["**", files] 38 39 , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] 40 , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] 41 42 , "legendary larry crashes bashes" 43 , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" 44 , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] 45 , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" 46 , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] 47 48 , "character classes" 49 , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] 50 , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", 51 "bdir/", "ca", "cb", "dd", "de"]] 52 , ["a*[^c]", ["abd", "abe"]] 53 , function () { files.push("a-b", "aXb") } 54 , ["a[X-]b", ["a-b", "aXb"]] 55 , function () { files.push(".x", ".y") } 56 , ["[^a-c]*", ["d", "dd", "de"]] 57 , function () { files.push("a*b/", "a*b/ooo") } 58 , ["a\\*b/*", ["a*b/ooo"]] 59 , ["a\\*?/*", ["a*b/ooo"]] 60 , ["*\\\\!*", [], {null: true}, ["echo !7"]] 61 , ["*\\!*", ["echo !7"], null, ["echo !7"]] 62 , ["*.\\*", ["r.*"], null, ["r.*"]] 63 , ["a[b]c", ["abc"]] 64 , ["a[\\b]c", ["abc"]] 65 , ["a?c", ["abc"]] 66 , ["a\\*c", [], {null: true}, ["abc"]] 67 , ["", [""], { null: true }, [""]] 68 69 , "http://www.opensource.apple.com/source/bash/bash-23/" + 70 "bash/tests/glob-test" 71 , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } 72 , ["*/man*/bash.*", ["man/man1/bash.1"]] 73 , ["man/man1/bash.1", ["man/man1/bash.1"]] 74 , ["a***c", ["abc"], null, ["abc"]] 75 , ["a*****?c", ["abc"], null, ["abc"]] 76 , ["?*****??", ["abc"], null, ["abc"]] 77 , ["*****??", ["abc"], null, ["abc"]] 78 , ["?*****?c", ["abc"], null, ["abc"]] 79 , ["?***?****c", ["abc"], null, ["abc"]] 80 , ["?***?****?", ["abc"], null, ["abc"]] 81 , ["?***?****", ["abc"], null, ["abc"]] 82 , ["*******c", ["abc"], null, ["abc"]] 83 , ["*******?", ["abc"], null, ["abc"]] 84 , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] 85 , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] 86 , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] 87 , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] 88 , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] 89 , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] 90 , ["[-abc]", ["-"], null, ["-"]] 91 , ["[abc-]", ["-"], null, ["-"]] 92 , ["\\", ["\\"], null, ["\\"]] 93 , ["[\\\\]", ["\\"], null, ["\\"]] 94 , ["[[]", ["["], null, ["["]] 95 , ["[", ["["], null, ["["]] 96 , ["[*", ["[abc"], null, ["[abc"]] 97 , "a right bracket shall lose its special meaning and\n" + 98 "represent itself in a bracket expression if it occurs\n" + 99 "first in the list. -- POSIX.2 2.8.3.2" 100 , ["[]]", ["]"], null, ["]"]] 101 , ["[]-]", ["]"], null, ["]"]] 102 , ["[a-\z]", ["p"], null, ["p"]] 103 , ["??**********?****?", [], { null: true }, ["abc"]] 104 , ["??**********?****c", [], { null: true }, ["abc"]] 105 , ["?************c****?****", [], { null: true }, ["abc"]] 106 , ["*c*?**", [], { null: true }, ["abc"]] 107 , ["a*****c*?**", [], { null: true }, ["abc"]] 108 , ["a********???*******", [], { null: true }, ["abc"]] 109 , ["[]", [], { null: true }, ["a"]] 110 , ["[abc", [], { null: true }, ["["]] 111 112 , "nocase tests" 113 , ["XYZ", ["xYz"], { nocase: true, null: true } 114 , ["xYz", "ABC", "IjK"]] 115 , ["ab*", ["ABC"], { nocase: true, null: true } 116 , ["xYz", "ABC", "IjK"]] 117 , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } 118 , ["xYz", "ABC", "IjK"]] 119 120 // [ pattern, [matches], MM opts, files, TAP opts] 121 , "onestar/twostar" 122 , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] 123 , ["{/?,*}", ["/a", "bb"], {null: true} 124 , ["/a", "/b/b", "/a/b/c", "bb"]] 125 126 , "dots should not match unless requested" 127 , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] 128 129 // .. and . can only match patterns starting with ., 130 // even when options.dot is set. 131 , function () { 132 files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] 133 } 134 , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] 135 , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] 136 , ["a/*/b", ["a/c/b"], {dot:false}] 137 , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] 138 139 140 // this also tests that changing the options needs 141 // to change the cache key, even if the pattern is 142 // the same! 143 , ["**", ["a/b","a/.d",".a/.d"], { dot: true } 144 , [ ".a/.d", "a/.d", "a/b"]] 145 146 , "paren sets cannot contain slashes" 147 , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] 148 149 // brace sets trump all else. 150 // 151 // invalid glob pattern. fails on bash4 and bsdglob. 152 // however, in this implementation, it's easier just 153 // to do the intuitive thing, and let brace-expansion 154 // actually come before parsing any extglob patterns, 155 // like the documentation seems to say. 156 // 157 // XXX: if anyone complains about this, either fix it 158 // or tell them to grow up and stop complaining. 159 // 160 // bash/bsdglob says this: 161 // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] 162 // but we do this instead: 163 , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] 164 165 // test partial parsing in the presence of comment/negation chars 166 , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] 167 , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] 168 169 // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. 170 , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" 171 , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] 172 , {} 173 , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] 174 175 176 // crazy nested {,,} and *(||) tests. 177 , function () { 178 files = [ "a", "b", "c", "d" 179 , "ab", "ac", "ad" 180 , "bc", "cb" 181 , "bc,d", "c,db", "c,d" 182 , "d)", "(b|c", "*(b|c" 183 , "b|c", "b|cc", "cb|c" 184 , "x(a|b|c)", "x(a|c)" 185 , "(a|b|c)", "(a|c)"] 186 } 187 , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] 188 , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] 189 // a 190 // *(b|c) 191 // *(b|d) 192 , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] 193 , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] 194 195 196 // test various flag settings. 197 , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] 198 , { noext: true } ] 199 , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} 200 , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] 201 , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] 202 203 204 // begin channelling Boole and deMorgan... 205 , "negation tests" 206 , function () { 207 files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] 208 } 209 210 // anything that is NOT a* matches. 211 , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] 212 213 // anything that IS !a* matches. 214 , ["!a*", ["!ab", "!abc"], {nonegate: true}] 215 216 // anything that IS a* matches 217 , ["!!a*", ["a!b"]] 218 219 // anything that is NOT !a* matches 220 , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] 221 222 // negation nestled within a pattern 223 , function () { 224 files = [ "foo.js" 225 , "foo.bar" 226 // can't match this one without negative lookbehind. 227 , "foo.js.js" 228 , "blar.js" 229 , "foo." 230 , "boo.js.boo" ] 231 } 232 , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] 233 234 // https://github.com/isaacs/minimatch/issues/5 235 , function () { 236 files = [ 'a/b/.x/c' 237 , 'a/b/.x/c/d' 238 , 'a/b/.x/c/d/e' 239 , 'a/b/.x' 240 , 'a/b/.x/' 241 , 'a/.x/b' 242 , '.x' 243 , '.x/' 244 , '.x/a' 245 , '.x/a/b' 246 , 'a/.x/b/.x/c' 247 , '.x/.x' ] 248 } 249 , ["**/.x/**", [ '.x/' 250 , '.x/a' 251 , '.x/a/b' 252 , 'a/.x/b' 253 , 'a/b/.x/' 254 , 'a/b/.x/c' 255 , 'a/b/.x/c/d' 256 , 'a/b/.x/c/d/e' ] ] 257 258 ].forEach(function (c) { 259 if (typeof c === "function") return c() 260 if (typeof c === "string") return t.comment(c) 261 262 var pattern = c[0] 263 , expect = c[1].sort(alpha) 264 , options = c[2] || {} 265 , f = c[3] || files 266 , tapOpts = c[4] || {} 267 268 // options.debug = true 269 var m = new mm.Minimatch(pattern, options) 270 var r = m.makeRe() 271 tapOpts.re = String(r) || JSON.stringify(r) 272 tapOpts.files = JSON.stringify(f) 273 tapOpts.pattern = pattern 274 tapOpts.set = m.set 275 tapOpts.negated = m.negate 276 277 var actual = mm.match(f, pattern, options) 278 actual.sort(alpha) 279 280 t.equivalent( actual, expect 281 , JSON.stringify(pattern) + " " + JSON.stringify(expect) 282 , tapOpts ) 283 }) 357 patterns.forEach(function (c) { 358 if (typeof c === "function") return c() 359 if (typeof c === "string") return t.comment(c) 360 361 var pattern = c[0] 362 , expect = c[1].sort(alpha) 363 , options = c[2] || {} 364 , f = c[3] || files 365 , tapOpts = c[4] || {} 366 367 // options.debug = true 368 var m = new mm.Minimatch(pattern, options) 369 var r = m.makeRe() 370 var expectRe = regexps[re++] 371 tapOpts.re = String(r) || JSON.stringify(r) 372 tapOpts.files = JSON.stringify(f) 373 tapOpts.pattern = pattern 374 tapOpts.set = m.set 375 tapOpts.negated = m.negate 376 377 var actual = mm.match(f, pattern, options) 378 actual.sort(alpha) 379 380 t.equivalent( actual, expect 381 , JSON.stringify(pattern) + " " + JSON.stringify(expect) 382 , tapOpts ) 383 384 t.equal(tapOpts.re, expectRe, tapOpts) 385 }) 284 386 285 387 t.comment("time=" + (Date.now() - start) + "ms") -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/package.json
r484 r516 7 7 "name": "glob", 8 8 "description": "a little globber", 9 "version": "3. 1.14",9 "version": "3.2.9", 10 10 "repository": { 11 11 "type": "git", … … 17 17 }, 18 18 "dependencies": { 19 "minimatch": "0.2", 20 "graceful-fs": "~1.1.2", 21 "inherits": "1" 19 "minimatch": "~0.2.11", 20 "inherits": "2" 22 21 }, 23 22 "devDependencies": { 24 "tap": "~0. 3",23 "tap": "~0.4.0", 25 24 "mkdirp": "0", 26 25 "rimraf": "1" 27 26 }, 28 27 "scripts": { 29 "test": "tap test/*.js" 28 "test": "tap test/*.js", 29 "test-regen": "TEST_REGEN=1 node test/00-setup.js" 30 30 }, 31 31 "license": "BSD", 32 "readme": "# Glob\n\n This is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options]\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the statCache object is reused between glob calls.\n\nUsers are thus advised not to use a glob result as a\nguarantee of filesystem state in the face of rapid changes.\nFor the vast majorityof operations, this is never a problem.\n",32 "readme": "# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `1` - Path exists, and is not a directory\n * `2` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n", 33 33 "readmeFilename": "README.md", 34 34 "bugs": { … … 36 36 }, 37 37 "homepage": "https://github.com/isaacs/node-glob", 38 "_id": "glob@3.1.14", 39 "dist": { 40 "shasum": "d76e8de8f257e1f7409dac971bfd2436b0e444dd" 41 }, 42 "_from": "glob@3.1.14", 43 "_resolved": "https://registry.npmjs.org/glob/-/glob-3.1.14.tgz" 38 "_id": "glob@3.2.9", 39 "_from": "glob@>=3.1.9" 44 40 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/test/00-setup.js
r484 r516 49 49 }) 50 50 51 tap.test("symlinky", function (t) { 52 var d = path.dirname(symlinkTo) 53 console.error("mkdirp", d) 54 mkdirp(d, 0755, function (er) { 55 t.ifError(er) 56 fs.symlink(symlinkFrom, symlinkTo, function (er) { 57 t.ifError(er, "make symlink") 51 if (process.platform !== "win32") { 52 tap.test("symlinky", function (t) { 53 var d = path.dirname(symlinkTo) 54 console.error("mkdirp", d) 55 mkdirp(d, 0755, function (er) { 56 t.ifError(er) 57 fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) { 58 t.ifError(er, "make symlink") 59 t.end() 60 }) 61 }) 62 }) 63 } 64 65 ;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) { 66 w = "/tmp/glob-test/" + w 67 tap.test("create " + w, function (t) { 68 mkdirp(w, function (er) { 69 if (er) 70 throw er 71 t.pass(w) 58 72 t.end() 59 73 }) 60 74 }) 61 75 }) 76 77 78 // generate the bash pattern test-fixtures if possible 79 if (process.platform === "win32" || !process.env.TEST_REGEN) { 80 console.error("Windows, or TEST_REGEN unset. Using cached fixtures.") 81 return 82 } 83 84 var spawn = require("child_process").spawn; 85 var globs = 86 // put more patterns here. 87 // anything that would be directly in / should be in /tmp/glob-test 88 ["test/a/*/+(c|g)/./d" 89 ,"test/a/**/[cg]/../[cg]" 90 ,"test/a/{b,c,d,e,f}/**/g" 91 ,"test/a/b/**" 92 ,"test/**/g" 93 ,"test/a/abc{fed,def}/g/h" 94 ,"test/a/abc{fed/g,def}/**/" 95 ,"test/a/abc{fed/g,def}/**///**/" 96 ,"test/**/a/**/" 97 ,"test/+(a|b|c)/a{/,bc*}/**" 98 ,"test/*/*/*/f" 99 ,"test/**/f" 100 ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**" 101 ,"{./*/*,/tmp/glob-test/*}" 102 ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me! 103 ,"test/a/!(symlink)/**" 104 ] 105 var bashOutput = {} 106 var fs = require("fs") 107 108 globs.forEach(function (pattern) { 109 tap.test("generate fixture " + pattern, function (t) { 110 var cmd = "shopt -s globstar && " + 111 "shopt -s extglob && " + 112 "shopt -s nullglob && " + 113 // "shopt >&2; " + 114 "eval \'for i in " + pattern + "; do echo $i; done\'" 115 var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) }) 116 var out = [] 117 cp.stdout.on("data", function (c) { 118 out.push(c) 119 }) 120 cp.stderr.pipe(process.stderr) 121 cp.on("close", function (code) { 122 out = flatten(out) 123 if (!out) 124 out = [] 125 else 126 out = cleanResults(out.split(/\r*\n/)) 127 128 bashOutput[pattern] = out 129 t.notOk(code, "bash test should finish nicely") 130 t.end() 131 }) 132 }) 133 }) 134 135 tap.test("save fixtures", function (t) { 136 var fname = path.resolve(__dirname, "bash-results.json") 137 var data = JSON.stringify(bashOutput, null, 2) + "\n" 138 fs.writeFile(fname, data, function (er) { 139 t.ifError(er) 140 t.end() 141 }) 142 }) 143 144 function cleanResults (m) { 145 // normalize discrepancies in ordering, duplication, 146 // and ending slashes. 147 return m.map(function (m) { 148 return m.replace(/\/+/g, "/").replace(/\/$/, "") 149 }).sort(alphasort).reduce(function (set, f) { 150 if (f !== set[set.length - 1]) set.push(f) 151 return set 152 }, []).sort(alphasort).map(function (f) { 153 // de-windows 154 return (process.platform !== 'win32') ? f 155 : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') 156 }) 157 } 158 159 function flatten (chunks) { 160 var s = 0 161 chunks.forEach(function (c) { s += c.length }) 162 var out = new Buffer(s) 163 s = 0 164 chunks.forEach(function (c) { 165 c.copy(out, s) 166 s += c.length 167 }) 168 169 return out.toString().trim() 170 } 171 172 function alphasort (a, b) { 173 a = a.toLowerCase() 174 b = b.toLowerCase() 175 return a > b ? 1 : a < b ? -1 : 0 176 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/test/bash-comparison.js
r484 r516 3 3 var tap = require("tap") 4 4 , child_process = require("child_process") 5 6 // put more patterns here. 7 , globs = 8 ["test/a/*/+(c|g)/./d" 9 ,"test/a/**/[cg]/../[cg]" 10 ,"test/a/{b,c,d,e,f}/**/g" 11 ,"test/a/b/**" 12 ,"test/**/g" 13 ,"test/a/abc{fed,def}/g/h" 14 ,"test/a/abc{fed/g,def}/**/" 15 ,"test/a/abc{fed/g,def}/**///**/" 16 ,"test/**/a/**/" 17 ,"test/+(a|b|c)/a{/,bc*}/**" 18 ,"test/*/*/*/f" 19 ,"test/**/f" 20 ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**" 21 ,"{./*/*,/usr/local/*}" 22 ,"{/*,*}" // evil owl face! how you taunt me! 23 ] 5 , bashResults = require("./bash-results.json") 6 , globs = Object.keys(bashResults) 24 7 , glob = require("../") 25 8 , path = require("path") … … 36 19 37 20 globs.forEach(function (pattern) { 38 var echoOutput 21 var expect = bashResults[pattern] 22 // anything regarding the symlink thing will fail on windows, so just skip it 23 if (process.platform === "win32" && 24 expect.some(function (m) { 25 return /\/symlink\//.test(m) 26 })) 27 return 28 39 29 tap.test(pattern, function (t) { 40 var bashPattern = pattern 41 , cmd = "shopt -s globstar && " + 42 "shopt -s extglob && " + 43 "shopt -s nullglob && " + 44 // "shopt >&2; " + 45 "eval \'for i in " + bashPattern + "; do echo $i; done\'" 46 , cp = child_process.spawn("bash", ["-c",cmd]) 47 , out = [] 48 , globResult 49 cp.stdout.on("data", function (c) { 50 out.push(c) 30 glob(pattern, function (er, matches) { 31 if (er) 32 throw er 33 34 // sort and unmark, just to match the shell results 35 matches = cleanResults(matches) 36 37 t.deepEqual(matches, expect, pattern) 38 t.end() 51 39 }) 52 cp.stderr.on("data", function (c) {53 process.stderr.write(c)54 })55 cp.on("close", function () {56 echoOutput = flatten(out)57 if (!echoOutput) echoOutput = []58 else {59 echoOutput = echoOutput.split(/\r*\n/).map(function (m) {60 // Bash is a oddly inconsistent with slashes in the61 // the results. This implementation is a bit more62 // normalized. Account for this in the test results.63 return m.replace(/\/+/g, "/").replace(/\/$/, "")64 }).sort(alphasort).reduce(function (set, f) {65 if (f !== set[set.length - 1]) set.push(f)66 return set67 }, []).sort(alphasort)68 }69 next()70 })71 72 glob(pattern, function (er, matches) {73 // sort and unpark, just to match the shell results74 matches = matches.map(function (m) {75 return m.replace(/\/+/g, "/").replace(/\/$/, "")76 }).sort(alphasort).reduce(function (set, f) {77 if (f !== set[set.length - 1]) set.push(f)78 return set79 }, []).sort(alphasort)80 81 t.ifError(er, pattern + " should not error")82 globResult = matches83 next()84 })85 86 function next () {87 if (!echoOutput || !globResult) return88 89 t.deepEqual(globResult, echoOutput, "should match shell")90 t.end()91 }92 40 }) 93 41 94 42 tap.test(pattern + " sync", function (t) { 95 var matches = glob.sync(pattern).map(function (m) { 96 return m.replace(/\/+/g, "/").replace(/\/$/, "") 97 }).sort(alphasort).reduce(function (set, f) { 98 if (f !== set[set.length - 1]) set.push(f) 99 return set 100 }, []).sort(alphasort) 43 var matches = cleanResults(glob.sync(pattern)) 101 44 102 t.deepEqual(matches, e choOutput, "should match shell")45 t.deepEqual(matches, expect, "should match shell") 103 46 t.end() 104 47 }) 105 48 }) 106 49 107 function flatten (chunks) { 108 var s = 0 109 chunks.forEach(function (c) { s += c.length }) 110 var out = new Buffer(s) 111 s = 0 112 chunks.forEach(function (c) { 113 c.copy(out, s) 114 s += c.length 50 function cleanResults (m) { 51 // normalize discrepancies in ordering, duplication, 52 // and ending slashes. 53 return m.map(function (m) { 54 return m.replace(/\/+/g, "/").replace(/\/$/, "") 55 }).sort(alphasort).reduce(function (set, f) { 56 if (f !== set[set.length - 1]) set.push(f) 57 return set 58 }, []).sort(alphasort).map(function (f) { 59 // de-windows 60 return (process.platform !== 'win32') ? f 61 : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/') 115 62 }) 116 117 return out.toString().trim()118 63 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/test/mark.js
r484 r516 2 2 var glob = require('../') 3 3 process.chdir(__dirname) 4 5 // expose timing issues 6 var lag = 5 7 glob.Glob.prototype._stat = function(o) { return function(f, cb) { 8 var args = arguments 9 setTimeout(function() { 10 o.call(this, f, cb) 11 }.bind(this), lag += 5) 12 }}(glob.Glob.prototype._stat) 13 14 15 test("mark, with **", function (t) { 16 glob("a/*b*/**", {mark: true}, function (er, results) { 17 if (er) 18 throw er 19 var expect = 20 [ 'a/abcdef/', 21 'a/abcdef/g/', 22 'a/abcdef/g/h', 23 'a/abcfed/', 24 'a/abcfed/g/', 25 'a/abcfed/g/h', 26 'a/b/', 27 'a/b/c/', 28 'a/b/c/d', 29 'a/bc/', 30 'a/bc/e/', 31 'a/bc/e/f', 32 'a/cb/', 33 'a/cb/e/', 34 'a/cb/e/f' ] 35 36 t.same(results, expect) 37 t.end() 38 }) 39 }) 4 40 5 41 test("mark, no / on pattern", function (t) { … … 7 43 if (er) 8 44 throw er 9 t.same(results, [ 'a/abcdef/', 10 'a/abcfed/', 11 'a/b/', 12 'a/bc/', 13 'a/c/', 14 'a/cb/', 15 'a/symlink/' ]) 45 var expect = [ 'a/abcdef/', 46 'a/abcfed/', 47 'a/b/', 48 'a/bc/', 49 'a/c/', 50 'a/cb/' ] 51 52 if (process.platform !== "win32") 53 expect.push('a/symlink/') 54 55 t.same(results, expect) 16 56 t.end() 57 }).on('match', function(m) { 58 t.similar(m, /\/$/) 17 59 }) 18 60 }) … … 22 64 if (er) 23 65 throw er 24 t.same(results, [ 'a/abcdef', 25 'a/abcfed', 26 'a/b', 27 'a/bc', 28 'a/c', 29 'a/cb', 30 'a/symlink' ]) 66 var expect = [ 'a/abcdef', 67 'a/abcfed', 68 'a/b', 69 'a/bc', 70 'a/c', 71 'a/cb' ] 72 73 if (process.platform !== "win32") 74 expect.push('a/symlink') 75 t.same(results, expect) 31 76 t.end() 77 }).on('match', function(m) { 78 t.similar(m, /[^\/]$/) 32 79 }) 33 80 }) … … 37 84 if (er) 38 85 throw er 39 t.same(results, [ 'a/abcdef/', 40 'a/abcfed/', 41 'a/b/', 42 'a/bc/', 43 'a/c/', 44 'a/cb/', 45 'a/symlink/' ]) 86 var expect = [ 'a/abcdef/', 87 'a/abcfed/', 88 'a/b/', 89 'a/bc/', 90 'a/c/', 91 'a/cb/' ] 92 if (process.platform !== "win32") 93 expect.push('a/symlink/') 94 t.same(results, expect) 46 95 t.end() 96 }).on('match', function(m) { 97 t.similar(m, /\/$/) 47 98 }) 48 99 }) … … 52 103 if (er) 53 104 throw er 54 t.same(results, [ 'a/abcdef/', 55 'a/abcfed/', 56 'a/b/', 57 'a/bc/', 58 'a/c/', 59 'a/cb/', 60 'a/symlink/' ]) 105 var expect = [ 'a/abcdef/', 106 'a/abcfed/', 107 'a/b/', 108 'a/bc/', 109 'a/c/', 110 'a/cb/' ] 111 if (process.platform !== "win32") 112 expect.push('a/symlink/') 113 t.same(results, expect) 61 114 t.end() 115 }).on('match', function(m) { 116 t.similar(m, /\/$/) 62 117 }) 63 118 }) -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/test/pause-resume.js
r484 r516 4 4 // just some gnarly pattern with lots of matches 5 5 , pattern = "test/a/!(symlink)/**" 6 , bashResults = require("./bash-results.json") 7 , patterns = Object.keys(bashResults) 6 8 , glob = require("../") 7 9 , Glob = glob.Glob … … 26 28 if (f !== set[set.length - 1]) set.push(f) 27 29 return set 28 }, []).sort(alphasort) 30 }, []).sort(alphasort).map(function (f) { 31 // de-windows 32 return (process.platform !== 'win32') ? f 33 : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') 34 }) 29 35 } 30 31 function flatten (chunks) {32 var s = 033 chunks.forEach(function (c) { s += c.length })34 var out = new Buffer(s)35 s = 036 chunks.forEach(function (c) {37 c.copy(out, s)38 s += c.length39 })40 41 return out.toString().trim()42 }43 var bashResults44 tap.test("get bash output", function (t) {45 var bashPattern = pattern46 , cmd = "shopt -s globstar && " +47 "shopt -s extglob && " +48 "shopt -s nullglob && " +49 // "shopt >&2; " +50 "eval \'for i in " + bashPattern + "; do echo $i; done\'"51 , cp = child_process.spawn("bash", ["-c",cmd])52 , out = []53 , globResult54 cp.stdout.on("data", function (c) {55 out.push(c)56 })57 cp.stderr.on("data", function (c) {58 process.stderr.write(c)59 })60 cp.on("close", function () {61 bashResults = flatten(out)62 if (!bashResults) return t.fail("Didn't get results from bash")63 else {64 bashResults = cleanResults(bashResults.split(/\r*\n/))65 }66 t.ok(bashResults.length, "got some results")67 t.end()68 })69 })70 36 71 37 var globResults = [] … … 74 40 , paused = false 75 41 , res = [] 42 , expect = bashResults[pattern] 76 43 77 44 g.on("pause", function () { … … 98 65 "end event matches should be the same as match events") 99 66 100 t.deepEqual(matches, bashResults,67 t.deepEqual(matches, expect, 101 68 "glob matches should be the same as bash results") 102 69 -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/glob/test/root.js
r484 r516 1 var t ap= require("tap")1 var t = require("tap") 2 2 3 3 var origCwd = process.cwd() 4 4 process.chdir(__dirname) 5 5 6 tap.test("changing root and searching for /b*/**", function (t) { 7 var glob = require('../') 8 var path = require('path') 9 t.test('.', function (t) { 10 glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) { 11 t.ifError(er) 12 t.like(matches, []) 13 t.end() 14 }) 15 }) 6 var glob = require('../') 7 var path = require('path') 16 8 17 t.test('a', function (t) { 18 glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) { 19 t.ifError(er) 20 t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) { 21 return path.join(path.resolve('a'), m) 22 })) 23 t.end() 24 }) 25 }) 26 27 t.test('root=a, cwd=a/b', function (t) { 28 glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) { 29 t.ifError(er) 30 t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) { 31 return path.join(path.resolve('a'), m) 32 })) 33 t.end() 34 }) 35 }) 36 37 t.test('cd -', function (t) { 38 process.chdir(origCwd) 9 t.test('.', function (t) { 10 glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) { 11 t.ifError(er) 12 t.like(matches, []) 39 13 t.end() 40 14 }) 15 }) 41 16 17 18 t.test('a', function (t) { 19 console.error("root=" + path.resolve('a')) 20 glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) { 21 t.ifError(er) 22 var wanted = [ 23 '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' 24 ].map(function (m) { 25 return path.join(path.resolve('a'), m).replace(/\\/g, '/') 26 }) 27 28 t.like(matches, wanted) 29 t.end() 30 }) 31 }) 32 33 t.test('root=a, cwd=a/b', function (t) { 34 glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) { 35 t.ifError(er) 36 t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) { 37 return path.join(path.resolve('a'), m).replace(/\\/g, '/') 38 })) 39 t.end() 40 }) 41 }) 42 43 t.test('cd -', function (t) { 44 process.chdir(origCwd) 42 45 t.end() 43 46 }) -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/optimist/.travis.yml
r484 r516 1 1 language: node_js 2 2 node_js: 3 - 0.64 - 0.83 - "0.8" 4 - "0.10" -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/optimist/index.js
r484 r516 1 1 var path = require('path'); 2 var minimist = require('minimist'); 2 3 var wordwrap = require('wordwrap'); 3 4 … … 18 19 19 20 var exports = module.exports = Argv; 20 function Argv ( args, cwd) {21 function Argv (processArgs, cwd) { 21 22 var self = {}; 22 23 if (!cwd) cwd = process.cwd(); … … 32 33 ; 33 34 34 if (process. argv[1] == process.env._) {35 if (process.env._ != undefined && process.argv[1] == process.env._) { 35 36 self.$0 = process.env._.replace( 36 37 path.dirname(process.execPath) + '/', '' … … 38 39 } 39 40 40 var flags = { bools : {}, strings : {} }; 41 var options = { 42 boolean: [], 43 string: [], 44 alias: {}, 45 default: [] 46 }; 41 47 42 48 self.boolean = function (bools) { 43 if (!Array.isArray(bools)) { 44 bools = [].slice.call(arguments); 45 } 46 47 bools.forEach(function (name) { 48 flags.bools[name] = true; 49 }); 50 49 options.boolean.push.apply(options.boolean, [].concat(bools)); 51 50 return self; 52 51 }; 53 52 54 53 self.string = function (strings) { 55 if (!Array.isArray(strings)) { 56 strings = [].slice.call(arguments); 57 } 58 59 strings.forEach(function (name) { 60 flags.strings[name] = true; 61 }); 62 63 return self; 64 }; 65 66 var aliases = {}; 54 options.string.push.apply(options.string, [].concat(strings)); 55 return self; 56 }; 57 58 self.default = function (key, value) { 59 if (typeof key === 'object') { 60 Object.keys(key).forEach(function (k) { 61 self.default(k, key[k]); 62 }); 63 } 64 else { 65 options.default[key] = value; 66 } 67 return self; 68 }; 69 67 70 self.alias = function (x, y) { 68 71 if (typeof x === 'object') { … … 71 74 }); 72 75 } 73 else if (Array.isArray(y)) { 74 y.forEach(function (yy) { 75 self.alias(x, yy); 76 }); 77 } 78 else { 79 var zs = (aliases[x] || []).concat(aliases[y] || []).concat(x, y); 80 aliases[x] = zs.filter(function (z) { return z != x }); 81 aliases[y] = zs.filter(function (z) { return z != y }); 82 } 83 76 else { 77 options.alias[x] = (options.alias[x] || []).concat(y); 78 } 84 79 return self; 85 80 }; … … 129 124 }; 130 125 131 var defaults = {};132 self.default = function (key, value) {133 if (typeof key === 'object') {134 Object.keys(key).forEach(function (k) {135 self.default(k, key[k]);136 });137 }138 else {139 defaults[key] = value;140 }141 142 return self;143 };144 145 126 var descriptions = {}; 146 127 self.describe = function (key, desc) { … … 157 138 158 139 self.parse = function (args) { 159 return Argv(args).argv;140 return parseArgs(args); 160 141 }; 161 142 … … 204 185 Object.keys(descriptions) 205 186 .concat(Object.keys(demanded)) 206 .concat(Object.keys( defaults))187 .concat(Object.keys(options.default)) 207 188 .reduce(function (acc, key) { 208 189 if (key !== '_') acc[key] = true; … … 218 199 219 200 var switches = keys.reduce(function (acc, key) { 220 acc[key] = [ key ].concat( aliases[key] || [])201 acc[key] = [ key ].concat(options.alias[key] || []) 221 202 .map(function (sw) { 222 203 return (sw.length > 1 ? '--' : '-') + sw … … 255 236 var type = null; 256 237 257 if ( flags.bools[key]) type = '[boolean]';258 if ( flags.strings[key]) type = '[string]';238 if (options.boolean[key]) type = '[boolean]'; 239 if (options.string[key]) type = '[string]'; 259 240 260 241 if (!wrap && dpadding.length > 0) { … … 269 250 : null 270 251 , 271 defaults[key] !== undefined272 ? '[default: ' + JSON.stringify( defaults[key]) + ']'252 options.default[key] !== undefined 253 ? '[default: ' + JSON.stringify(options.default[key]) + ']' 273 254 : null 274 255 , … … 299 280 300 281 Object.defineProperty(self, 'argv', { 301 get : parseArgs,282 get : function () { return parseArgs(processArgs) }, 302 283 enumerable : true, 303 284 }); 304 285 305 function parseArgs () { 306 var argv = { _ : [], $0 : self.$0 }; 307 Object.keys(flags.bools).forEach(function (key) { 308 setArg(key, defaults[key] || false); 309 }); 310 311 function setArg (key, val) { 312 var num = Number(val); 313 var value = typeof val !== 'string' || isNaN(num) ? val : num; 314 if (flags.strings[key]) value = val; 315 316 setKey(argv, key.split('.'), value); 317 318 (aliases[key] || []).forEach(function (x) { 319 argv[x] = argv[key]; 320 }); 321 } 322 323 for (var i = 0; i < args.length; i++) { 324 var arg = args[i]; 325 326 if (arg === '--') { 327 argv._.push.apply(argv._, args.slice(i + 1)); 328 break; 329 } 330 else if (arg.match(/^--.+=/)) { 331 var m = arg.match(/^--([^=]+)=(.*)/); 332 setArg(m[1], m[2]); 333 } 334 else if (arg.match(/^--no-.+/)) { 335 var key = arg.match(/^--no-(.+)/)[1]; 336 setArg(key, false); 337 } 338 else if (arg.match(/^--.+/)) { 339 var key = arg.match(/^--(.+)/)[1]; 340 var next = args[i + 1]; 341 if (next !== undefined && !next.match(/^-/) 342 && !flags.bools[key] 343 && (aliases[key] ? !flags.bools[aliases[key]] : true)) { 344 setArg(key, next); 345 i++; 346 } 347 else if (/^(true|false)$/.test(next)) { 348 setArg(key, next === 'true'); 349 i++; 350 } 351 else { 352 setArg(key, true); 353 } 354 } 355 else if (arg.match(/^-[^-]+/)) { 356 var letters = arg.slice(1,-1).split(''); 357 358 var broken = false; 359 for (var j = 0; j < letters.length; j++) { 360 if (letters[j+1] && letters[j+1].match(/\W/)) { 361 setArg(letters[j], arg.slice(j+2)); 362 broken = true; 363 break; 364 } 365 else { 366 setArg(letters[j], true); 367 } 368 } 369 370 if (!broken) { 371 var key = arg.slice(-1)[0]; 372 373 if (args[i+1] && !args[i+1].match(/^-/) 374 && !flags.bools[key] 375 && (aliases[key] ? !flags.bools[aliases[key]] : true)) { 376 setArg(key, args[i+1]); 377 i++; 378 } 379 else if (args[i+1] && /true|false/.test(args[i+1])) { 380 setArg(key, args[i+1] === 'true'); 381 i++; 382 } 383 else { 384 setArg(key, true); 385 } 386 } 387 } 388 else { 389 var n = Number(arg); 390 argv._.push(flags.strings['_'] || isNaN(n) ? arg : n); 391 } 392 } 393 394 Object.keys(defaults).forEach(function (key) { 395 if (!(key in argv)) { 396 argv[key] = defaults[key]; 397 if (key in aliases) { 398 argv[aliases[key]] = defaults[key]; 399 } 400 } 401 }); 286 function parseArgs (args) { 287 var argv = minimist(args, options); 288 argv.$0 = self.$0; 402 289 403 290 if (demanded._ && argv._.length < demanded._) { … … 455 342 return p.match(/^[.\/]/) ? p : './' + p; 456 343 }; 457 458 function setKey (obj, keys, value) {459 var o = obj;460 keys.slice(0,-1).forEach(function (key) {461 if (o[key] === undefined) o[key] = {};462 o = o[key];463 });464 465 var key = keys[keys.length - 1];466 if (o[key] === undefined || typeof o[key] === 'boolean') {467 o[key] = value;468 }469 else if (Array.isArray(o[key])) {470 o[key].push(value);471 }472 else {473 o[key] = [ o[key], value ];474 }475 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/optimist/node_modules/wordwrap/package.json
r484 r516 42 42 "homepage": "https://github.com/substack/node-wordwrap", 43 43 "_id": "wordwrap@0.0.2", 44 "dist": { 45 "shasum": "0e59bfdfda36959a4255195af71166e90abb9a7f" 46 }, 47 "_from": "wordwrap@0.0.2", 48 "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" 44 "_from": "wordwrap@~0.0.2" 49 45 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/optimist/package.json
r484 r516 1 1 { 2 2 "name": "optimist", 3 "version": "0. 3.5",3 "version": "0.6.1", 4 4 "description": "Light-weight option parsing with an argv hash. No optstrings attached.", 5 5 "main": "./index.js", 6 "directories": {7 "lib": ".",8 "test": "test",9 "example": "example"10 },11 6 "dependencies": { 12 "wordwrap": "~0.0.2" 7 "wordwrap": "~0.0.2", 8 "minimist": "~0.0.1" 13 9 }, 14 10 "devDependencies": { 15 11 "hashish": "~0.0.4", 16 "tap": "~0. 2.4"12 "tap": "~0.4.0" 17 13 }, 18 14 "scripts": { … … 41 37 "node": ">=0.4" 42 38 }, 43 "readme": " optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n { _: [],\n '$0': 'node ./examples/reflect.js',\n foo: { bar: { baz: 33 }, quux: 5 }}\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n",44 "readmeFilename": " README.markdown",39 "readme": "# DEPRECATION NOTICE\n\nI don't want to maintain this module anymore since I just use\n[minimist](https://npmjs.org/package/minimist), the argument parsing engine,\ndirectly instead nowadays.\n\nSee [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed\nsuccessor to optimist.\n\n[](https://github.com/chevex/yargs)\n\nYou should also consider [nomnom](https://github.com/harthur/nomnom).\n\noptimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n { _: [],\n '$0': 'node ./examples/reflect.js',\n foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n $ node reflect.js -n123 -m456\n { '3': true,\n '6': true,\n _: [],\n '$0': 'node ./reflect.js',\n n: 123,\n m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n", 40 "readmeFilename": "readme.markdown", 45 41 "bugs": { 46 42 "url": "https://github.com/substack/node-optimist/issues" 47 43 }, 48 44 "homepage": "https://github.com/substack/node-optimist", 49 "_id": "optimist@0. 3.5",45 "_id": "optimist@0.6.1", 50 46 "dist": { 51 "shasum": " 4a95a366d4f292cb5930c16e82ef690885770fa2"47 "shasum": "6ae855b9e52eb22c5af7b5e570013807be575bc3" 52 48 }, 53 "_from": "optimist@ 0.3.5",54 "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0. 3.5.tgz"49 "_from": "optimist@>=0.2.8", 50 "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz" 55 51 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/node_modules/optimist/test/parse.js
r484 r516 245 245 }); 246 246 247 test('newlines in params' , function (t) { 248 var args = optimist.parse([ '-s', "X\nX" ]) 249 t.same(args, { _ : [], s : "X\nX", $0 : $0 }); 250 251 // reproduce in bash: 252 // VALUE="new 253 // line" 254 // node program.js --s="$VALUE" 255 args = optimist.parse([ "--s=X\nX" ]) 256 t.same(args, { _ : [], s : "X\nX", $0 : $0 }); 257 t.end(); 258 }); 259 247 260 test('strings' , function (t) { 248 261 var s = optimist([ '-s', '0001234' ]).string('s').argv.s; -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/package.json
r484 r516 2 2 "name": "coffeelint", 3 3 "description": "Lint your CoffeeScript", 4 "version": " 0.5.7",4 "version": "1.0.8", 5 5 "homepage": "http://www.coffeelint.org", 6 6 "keywords": [ … … 14 14 }, 15 15 "main": "./lib/coffeelint.js", 16 "engines": { 17 "node": ">=0.8.0" 18 }, 16 19 "repository": { 17 20 "type": "git", … … 23 26 "dependencies": { 24 27 "optimist": ">=0.2.8", 25 "coffee-script": " >=1.6.0",28 "coffee-script": "1.6.x", 26 29 "glob": ">=3.1.9" 27 30 }, … … 37 40 ], 38 41 "scripts": { 39 "pretest": " npm runcompile",42 "pretest": "cake compile", 40 43 "test": "vows --spec test/*.coffee test/*.litcoffee", 41 44 "posttest": "npm run lint", 42 "prepublish": " npm run compile",43 " install": "[ -e lib/commandline.js ] || npm run compile",44 "lint": " npm run compile && ./bin/coffeelint -f test/fixtures/coffeelint.json src/*.coffee test/*.coffee test/*.litcoffee",45 "lint-csv": " npm run compile && ./bin/coffeelint --csv -f test/fixtures/coffeelint.json src/*.coffee test/*.coffee",46 "lint-jslint": " npm run compile && ./bin/coffeelint --jslint -f test/fixtures/coffeelint.json src/*.coffee test/*.coffee",47 "compile": "c offee -c -o lib src"45 "prepublish": "cake prepublish", 46 "publish": "cake publish", 47 "lint": "cake compile && ./bin/coffeelint -f coffeelint.json src/*.coffee test/*.coffee test/*.litcoffee", 48 "lint-csv": "cake compile && ./bin/coffeelint --csv -f coffeelint.json src/*.coffee test/*.coffee", 49 "lint-jslint": "cake compile && ./bin/coffeelint --jslint -f coffeelint.json src/*.coffee test/*.coffee", 50 "compile": "cake compile" 48 51 }, 49 52 "readme": "CoffeeLint\n==========\n\nCoffeeLint is a style checker that helps keep CoffeeScript code\nclean and consistent.\n\nFor guides on installing, using and configuring CoffeeLint, head over\n[here](http://www.coffeelint.org).\n\nTo suggest a feature, report a bug, or general discussion, head over\n[here](http://github.com/clutchski/coffeelint/issues/).\n\n[](http://travis-ci.org/clutchski/coffeelint)\n", … … 52 55 "url": "https://github.com/clutchski/coffeelint/issues" 53 56 }, 54 "_id": "coffeelint@ 0.5.7",57 "_id": "coffeelint@1.0.8", 55 58 "dist": { 56 "shasum": " 4464b58e383f9fd3cd1da521b404301bdbc39e05"59 "shasum": "24f415956f9b6dc01d1ee428f2bbe2d200eee9a7" 57 60 }, 58 "_from": "coffeelint@~ 0.5",59 "_resolved": "https://registry.npmjs.org/coffeelint/-/coffeelint- 0.5.7.tgz"61 "_from": "coffeelint@~1.0", 62 "_resolved": "https://registry.npmjs.org/coffeelint/-/coffeelint-1.0.8.tgz" 60 63 } -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/src/coffeelint.coffee
r484 r516 8 8 9 9 # Coffeelint's namespace. 10 coffeelint = {} 11 12 if exports? 13 # If we're running in node, export our module and 14 # load dependencies. 15 coffeelint = exports16 CoffeeScript = require 'coffee-script'10 # Browserify wrapps this file in a UMD that will set window.coffeelint to 11 # exports 12 coffeelint = exports 13 14 if window? 15 # If we're in the browser assume CoffeeScript is already loaded. 16 CoffeeScript = window.CoffeeScript 17 17 else 18 # If we're in the browser, export out module to 19 # global scope. Assume CoffeeScript is already 20 # loaded. 21 this.coffeelint = coffeelint 22 CoffeeScript = this.CoffeeScript 23 18 # By storing this in a variable it prevents browserify from finding this 19 # dependency. If it isn't hidden there is an error attempting to inline 20 # CoffeeScript. if browserify uses `-i` to ignore the dependency it 21 # creates an empty shim which breaks NodeJS 22 # https://github.com/substack/node-browserify/issues/471 23 cs = 'coffee-script' 24 CoffeeScript = require cs 25 26 # Browserify will inline the file at compile time. 27 packageJSON = require('./../package.json') 24 28 25 29 # The current version of Coffeelint. 26 coffeelint.VERSION = "0.5.7"30 coffeelint.VERSION = packageJSON.version 27 31 28 32 … … 32 36 IGNORE = 'ignore' 33 37 34 35 # CoffeeLint's default rule configuration. 36 coffeelint.RULES = RULES = 37 38 no_tabs : 39 level : ERROR 40 message : 'Line contains tab indentation' 41 description: """ 42 This rule forbids tabs in indentation. Enough said. It is enabled by 43 default. 44 """ 45 46 no_trailing_whitespace : 47 level : ERROR 48 message : 'Line ends with trailing whitespace' 49 allowed_in_comments : false 50 description: """ 51 This rule forbids trailing whitespace in your code, since it is 52 needless cruft. It is enabled by default. 53 """ 54 55 max_line_length : 56 value: 80 57 level : ERROR 58 message : 'Line exceeds maximum allowed length' 59 description: """ 60 This rule imposes a maximum line length on your code. <a 61 href="http://www.python.org/dev/peps/pep-0008/">Python's style 62 guide</a> does a good job explaining why you might want to limit the 63 length of your lines, though this is a matter of taste. 64 65 Lines can be no longer than eighty characters by default. 66 """ 67 68 camel_case_classes : 69 level : ERROR 70 message : 'Class names should be camel cased' 71 description: """ 72 This rule mandates that all class names are camel cased. Camel 73 casing class names is a generally accepted way of distinguishing 74 constructor functions - which require the 'new' prefix to behave 75 properly - from plain old functions. 76 <pre> 77 <code># Good! 78 class BoaConstrictor 79 80 # Bad! 81 class boaConstrictor 82 </code> 83 </pre> 84 This rule is enabled by default. 85 """ 86 indentation : 87 value : 2 88 level : ERROR 89 message : 'Line contains inconsistent indentation' 90 description: """ 91 This rule imposes a standard number of spaces to be used for 92 indentation. Since whitespace is significant in CoffeeScript, it's 93 critical that a project chooses a standard indentation format and 94 stays consistent. Other roads lead to darkness. <pre> <code># 95 Enabling this option will prevent this ugly 96 # but otherwise valid CoffeeScript. 97 twoSpaces = () -> 98 fourSpaces = () -> 99 eightSpaces = () -> 100 'this is valid CoffeeScript' 101 102 </code> 103 </pre> 104 Two space indentation is enabled by default. 105 """ 106 107 no_implicit_braces : 108 level : IGNORE 109 message : 'Implicit braces are forbidden' 110 description: """ 111 This rule prohibits implicit braces when declaring object literals. 112 Implicit braces can make code more difficult to understand, 113 especially when used in combination with optional parenthesis. 114 <pre> 115 <code># Do you find this code ambiguous? Is it a 116 # function call with three arguments or four? 117 myFunction a, b, 1:2, 3:4 118 119 # While the same code written in a more 120 # explicit manner has no ambiguity. 121 myFunction(a, b, {1:2, 3:4}) 122 </code> 123 </pre> 124 Implicit braces are permitted by default, since their use is 125 idiomatic CoffeeScript. 126 """ 127 128 no_trailing_semicolons: 129 level : ERROR 130 message : 'Line contains a trailing semicolon' 131 description: """ 132 This rule prohibits trailing semicolons, since they are needless 133 cruft in CoffeeScript. 134 <pre> 135 <code># This semicolon is meaningful. 136 x = '1234'; console.log(x) 137 138 # This semicolon is redundant. 139 alert('end of line'); 140 </code> 141 </pre> 142 Trailing semicolons are forbidden by default. 143 """ 144 145 no_plusplus: 146 level : IGNORE 147 message : 'The increment and decrement operators are forbidden' 148 description: """ 149 This rule forbids the increment and decrement arithmetic operators. 150 Some people believe the <tt>++</tt> and <tt>--</tt> to be cryptic 151 and the cause of bugs due to misunderstandings of their precedence 152 rules. 153 This rule is disabled by default. 154 """ 155 156 no_throwing_strings: 157 level : ERROR 158 message : 'Throwing strings is forbidden' 159 description: """ 160 This rule forbids throwing string literals or interpolations. While 161 JavaScript (and CoffeeScript by extension) allow any expression to 162 be thrown, it is best to only throw <a 163 href="https://developer.mozilla.org 164 /en/JavaScript/Reference/Global_Objects/Error"> Error</a> objects, 165 because they contain valuable debugging information like the stack 166 trace. Because of JavaScript's dynamic nature, CoffeeLint cannot 167 ensure you are always throwing instances of <tt>Error</tt>. It will 168 only catch the simple but real case of throwing literal strings. 169 <pre> 170 <code># CoffeeLint will catch this: 171 throw "i made a boo boo" 172 173 # ... but not this: 174 throw getSomeString() 175 </code> 176 </pre> 177 This rule is enabled by default. 178 """ 179 180 cyclomatic_complexity: 181 value : 10 182 level : IGNORE 183 message : 'The cyclomatic complexity is too damn high' 184 185 no_backticks: 186 level : ERROR 187 message : 'Backticks are forbidden' 188 description: """ 189 Backticks allow snippets of JavaScript to be embedded in 190 CoffeeScript. While some folks consider backticks useful in a few 191 niche circumstances, they should be avoided because so none of 192 JavaScript's "bad parts", like <tt>with</tt> and <tt>eval</tt>, 193 sneak into CoffeeScript. 194 This rule is enabled by default. 195 """ 196 197 line_endings: 198 level : IGNORE 199 value : 'unix' # or 'windows' 200 message : 'Line contains incorrect line endings' 201 description: """ 202 This rule ensures your project uses only <tt>windows</tt> or 203 <tt>unix</tt> line endings. This rule is disabled by default. 204 """ 205 no_implicit_parens : 206 level : IGNORE 207 message : 'Implicit parens are forbidden' 208 description: """ 209 This rule prohibits implicit parens on function calls. 210 <pre> 211 <code># Some folks don't like this style of coding. 212 myFunction a, b, c 213 214 # And would rather it always be written like this: 215 myFunction(a, b, c) 216 </code> 217 </pre> 218 Implicit parens are permitted by default, since their use is 219 idiomatic CoffeeScript. 220 """ 221 222 empty_constructor_needs_parens : 223 level : IGNORE 224 message : 'Invoking a constructor without parens and without arguments' 225 226 non_empty_constructor_needs_parens : 227 level : IGNORE 228 message : 'Invoking a constructor without parens and with arguments' 229 230 no_empty_param_list : 231 level : IGNORE 232 message : 'Empty parameter list is forbidden' 233 description: """ 234 This rule prohibits empty parameter lists in function definitions. 235 <pre> 236 <code># The empty parameter list in here is unnecessary: 237 myFunction = () -> 238 239 # We might favor this instead: 240 myFunction = -> 241 </code> 242 </pre> 243 Empty parameter lists are permitted by default. 244 """ 245 246 247 space_operators : 248 level : IGNORE 249 message : 'Operators must be spaced properly' 250 251 # I don't know of any legitimate reason to define duplicate keys in an 252 # object. It seems to always be a mistake, it's also a syntax error in 253 # strict mode. 254 # See http://jslinterrors.com/duplicate-key-a/ 255 duplicate_key : 256 level : ERROR 257 message : 'Duplicate key defined in object or class' 258 259 newlines_after_classes : 260 value : 3 261 level : IGNORE 262 message : 'Wrong count of newlines between a class and other code' 263 264 no_stand_alone_at : 265 level : IGNORE 266 message : '@ must not be used stand alone' 267 description: """ 268 This rule checks that no stand alone @ are in use, they are 269 discouraged. Further information in CoffeScript issue <a 270 href="https://github.com/jashkenas/coffee-script/issues/1601"> 271 #1601</a> 272 """ 273 274 arrow_spacing : 275 level : IGNORE 276 message : 'Function arrow (->) must be spaced properly' 277 description: """ 278 <p>This rule checks to see that there is spacing before and after 279 the arrow operator that declares a function. This rule is disabled 280 by default.</p> <p>Note that if arrow_spacing is enabled, and you 281 pass an empty function as a parameter, arrow_spacing will accept 282 either a space or no space in-between the arrow operator and the 283 parenthesis</p> 284 <pre><code># Both of this will not trigger an error, 285 # even with arrow_spacing enabled. 286 x(-> 3) 287 x( -> 3) 288 289 # However, this will trigger an error 290 x((a,b)-> 3) 291 </code> 292 </pre> 293 """ 294 295 coffeescript_error : 296 level : ERROR 297 message : '' # The default coffeescript error is fine. 298 299 300 # Some repeatedly used regular expressions. 301 regexes = 302 trailingWhitespace : /[^\s]+[\t ]+\r?$/ 303 lineHasComment : /^\s*[^\#]*\#/ 304 indentation: /\S/ 305 longUrlComment: /// 306 ^\s*\# # indentation, up to comment 307 \s* 308 http[^\s]+$ # Link that takes up the rest of the line without spaces. 309 /// 310 camelCase: /^[A-Z][a-zA-Z\d]*$/ 311 trailingSemicolon: /;\r?$/ 312 configStatement: /coffeelint:\s*(disable|enable)(?:=([\w\s,]*))?/ 313 38 coffeelint.RULES = RULES = require './rules.coffee' 314 39 315 40 # Patch the source properties onto the destination. … … 323 48 extend({}, defaults, source) 324 49 325 326 # Create an error object for the given rule with the given 327 # attributes. 328 createError = (rule, attrs = {}) -> 329 level = attrs.level 330 if level not in [IGNORE, WARN, ERROR] 331 throw new Error("unknown level #{level}") 332 333 if level in [ERROR, WARN] 334 attrs.rule = rule 335 return defaults(attrs, RULES[rule]) 336 else 337 null 338 339 # Store suppressions in the form of { line #: type } 340 block_config = 341 enable: {} 342 disable: {} 343 344 # 345 # A class that performs regex checks on each line of the source. 346 # 347 class LineLinter 348 349 constructor : (source, config, tokensByLine) -> 350 @source = source 351 @config = config 352 @line = null 353 @lineNumber = 0 354 @tokensByLine = tokensByLine 355 @lines = @source.split('\n') 356 @lineCount = @lines.length 357 358 # maintains some contextual information 359 # inClass: bool; in class or not 360 # lastUnemptyLineInClass: null or lineNumber, if the last not-empty 361 # line was in a class it holds its number 362 # classIndents: the number of indents within a class 363 @context = { 364 class: { 365 inClass: false 366 lastUnemptyLineInClass: null 367 classIndents: null 368 } 369 } 370 371 lint : () -> 372 errors = [] 373 for line, lineNumber in @lines 374 @lineNumber = lineNumber 375 @line = line 376 @maintainClassContext() 377 error = @lintLine() 378 errors.push(error) if error 379 errors 380 381 # Return an error if the line contained failed a rule, null otherwise. 382 lintLine : () -> 383 return @checkTabs() or 384 @checkTrailingWhitespace() or 385 @checkLineLength() or 386 @checkTrailingSemicolon() or 387 @checkLineEndings() or 388 @checkComments() or 389 @checkNewlinesAfterClasses() 390 391 checkTabs : () -> 392 # Only check lines that have compiled tokens. This helps 393 # us ignore tabs in the middle of multi line strings, heredocs, etc. 394 # since they are all reduced to a single token whose line number 395 # is the start of the expression. 396 indentation = @line.split(regexes.indentation)[0] 397 if @lineHasToken() and '\t' in indentation 398 @createLineError('no_tabs') 50 # Helper to remove rules from disabled list 51 difference = (a, b) -> 52 j = 0 53 while j < a.length 54 if a[j] in b 55 a.splice(j, 1) 399 56 else 400 null 401 402 checkTrailingWhitespace : () -> 403 if regexes.trailingWhitespace.test(@line) 404 # By default only the regex above is needed. 405 if !@config['no_trailing_whitespace']?.allowed_in_comments 406 return @createLineError('no_trailing_whitespace') 407 408 line = @line 409 tokens = @tokensByLine[@lineNumber] 410 411 # If we're in a block comment there won't be any tokens on this 412 # line. Some previous line holds the token spanning multiple lines. 413 if !tokens 414 return null 415 416 # To avoid confusion when a string might contain a "#", every string 417 # on this line will be removed. before checking for a comment 418 for str in (token[1] for token in tokens when token[0] == 'STRING') 419 line = line.replace(str, 'STRING') 420 421 if !regexes.lineHasComment.test(line) 422 return @createLineError('no_trailing_whitespace') 423 else 424 return null 425 else 426 return null 427 428 checkLineLength : () -> 429 rule = 'max_line_length' 430 max = @config[rule]?.value 431 if max and max < @line.length and not regexes.longUrlComment.test(@line) 432 attrs = 433 context: "Length is #{@line.length}, max is #{max}" 434 @createLineError(rule, attrs) 435 else 436 null 437 438 checkTrailingSemicolon : () -> 439 hasSemicolon = regexes.trailingSemicolon.test(@line) 440 [first..., last] = @getLineTokens() 441 hasNewLine = last and last.newLine? 442 # Don't throw errors when the contents of multiline strings, 443 # regexes and the like end in ";" 444 if hasSemicolon and not hasNewLine and @lineHasToken() 445 @createLineError('no_trailing_semicolons') 446 else 447 return null 448 449 checkLineEndings : () -> 450 rule = 'line_endings' 451 ending = @config[rule]?.value 452 453 return null if not ending or @isLastLine() or not @line 454 455 lastChar = @line[@line.length - 1] 456 valid = if ending == 'windows' 457 lastChar == '\r' 458 else if ending == 'unix' 459 lastChar != '\r' 460 else 461 throw new Error("unknown line ending type: #{ending}") 462 if not valid 463 return @createLineError(rule, {context:"Expected #{ending}"}) 464 else 465 return null 466 467 checkComments : () -> 468 # Check for block config statements enable and disable 469 result = regexes.configStatement.exec(@line) 470 if result? 471 cmd = result[1] 472 rules = [] 473 if result[2]? 474 for r in result[2].split(',') 475 rules.push r.replace(/^\s+|\s+$/g, "") 476 block_config[cmd][@lineNumber] = rules 477 return null 478 479 checkNewlinesAfterClasses : () -> 480 rule = 'newlines_after_classes' 481 ending = @config[rule].value 482 483 return null if not ending or @isLastLine() 484 485 if not @context.class.inClass and 486 @context.class.lastUnemptyLineInClass? and 487 ((@lineNumber - 1) - @context.class.lastUnemptyLineInClass) isnt 488 ending 489 got = (@lineNumber - 1) - @context.class.lastUnemptyLineInClass 490 return @createLineError( rule, { 491 context: "Expected #{ending} got #{got}" 492 } ) 493 494 null 495 496 createLineError : (rule, attrs = {}) -> 497 attrs.lineNumber = @lineNumber + 1 # Lines are indexed by zero. 498 attrs.level = @config[rule]?.level 499 createError(rule, attrs) 500 501 isLastLine : () -> 502 return @lineNumber == @lineCount - 1 503 504 # Return true if the given line actually has tokens. 505 # Optional parameter to check for a specific token type and line number. 506 lineHasToken : (tokenType = null, lineNumber = null) -> 507 lineNumber = lineNumber ? @lineNumber 508 unless tokenType? 509 return @tokensByLine[lineNumber]? 510 else 511 tokens = @tokensByLine[lineNumber] 512 return null unless tokens? 513 for token in tokens 514 return true if token[0] == tokenType 515 return false 516 517 # Return tokens for the given line number. 518 getLineTokens : () -> 519 @tokensByLine[@lineNumber] || [] 520 521 # maintain the contextual information for class-related stuff 522 maintainClassContext: () -> 523 if @context.class.inClass 524 if @lineHasToken 'INDENT' 525 @context.class.classIndents++ 526 else if @lineHasToken 'OUTDENT' 527 @context.class.classIndents-- 528 if @context.class.classIndents is 0 529 @context.class.inClass = false 530 @context.class.classIndents = null 531 532 if @context.class.inClass and not @line.match( /^\s*$/ ) 533 @context.class.lastUnemptyLineInClass = @lineNumber 534 else 535 unless @line.match(/\\s*/) 536 @context.class.lastUnemptyLineInClass = null 537 538 if @lineHasToken 'CLASS' 539 @context.class.inClass = true 540 @context.class.lastUnemptyLineInClass = @lineNumber 541 @context.class.classIndents = 0 542 543 null 544 545 # 546 # A class that performs checks on the output of CoffeeScript's lexer. 547 # 548 class LexicalLinter 549 550 constructor : (source, config) -> 551 @source = source 552 @tokens = CoffeeScript.tokens(source) 553 @config = config 554 @i = 0 # The index of the current token we're linting. 555 @tokensByLine = {} # A map of tokens by line. 556 @arrayTokens = [] # A stack tracking the array token pairs. 557 @parenTokens = [] # A stack tracking the parens token pairs. 558 @callTokens = [] # A stack tracking the call token pairs. 559 @lines = source.split('\n') 560 @braceScopes = [] # A stack tracking keys defined in nexted scopes. 561 562 # Return a list of errors encountered in the given source. 563 lint : () -> 564 errors = [] 565 566 for token, i in @tokens 567 @i = i 568 error = @lintToken(token) 569 errors.push(error) if error 570 errors 571 572 # Return an error if the given token fails a lint check, false otherwise. 573 lintToken : (token) -> 574 [type, value, lineNumber] = token 575 576 if typeof lineNumber == "object" 577 if type == 'OUTDENT' or type == 'INDENT' 578 lineNumber = lineNumber.last_line 579 else 580 lineNumber = lineNumber.first_line 581 @tokensByLine[lineNumber] ?= [] 582 @tokensByLine[lineNumber].push(token) 583 # CoffeeScript loses line numbers of interpolations and multi-line 584 # regexes, so fake it by using the last line number we know. 585 @lineNumber = lineNumber or @lineNumber or 0 586 # Now lint it. 587 switch type 588 when "->" then @lintArrowSpacing(token) 589 when "INDENT" then @lintIndentation(token) 590 when "CLASS" then @lintClass(token) 591 when "UNARY" then @lintUnary(token) 592 when "{","}" then @lintBrace(token) 593 when "IDENTIFIER" then @lintIdentifier(token) 594 when "++", "--" then @lintIncrement(token) 595 when "THROW" then @lintThrow(token) 596 when "[", "]" then @lintArray(token) 597 when "(", ")" then @lintParens(token) 598 when "JS" then @lintJavascript(token) 599 when "CALL_START", "CALL_END" then @lintCall(token) 600 when "PARAM_START" then @lintParam(token) 601 when "@" then @lintStandaloneAt(token) 602 when "+", "-" then @lintPlus(token) 603 when "=", "MATH", "COMPARE", "LOGIC", "COMPOUND_ASSIGN" 604 @lintMath(token) 605 else null 606 607 lintUnary: (token) -> 608 if token[1] is 'new' 609 # Find the last chained identifier, e.g. Bar in new foo.bar.Bar(). 610 identifierIndex = 1 611 loop 612 expectedIdentifier = @peek(identifierIndex) 613 expectedCallStart = @peek(identifierIndex + 1) 614 if expectedIdentifier?[0] is 'IDENTIFIER' 615 if expectedCallStart?[0] is '.' 616 identifierIndex += 2 617 continue 618 break 619 620 # The callStart is generated if your parameters are all on the same 621 # line with implicit parens, and if your parameters start on the 622 # next line, but is missing if there are no params and no parens. 623 if expectedIdentifier?[0] is 'IDENTIFIER' and expectedCallStart? 624 if expectedCallStart[0] is 'CALL_START' 625 if expectedCallStart.generated 626 @createLexError('non_empty_constructor_needs_parens') 627 else 628 @createLexError('empty_constructor_needs_parens') 629 630 # Lint the given array token. 631 lintArray : (token) -> 632 # Track the array token pairs 633 if token[0] == '[' 634 @arrayTokens.push(token) 635 else if token[0] == ']' 636 @arrayTokens.pop() 637 # Return null, since we're not really linting 638 # anything here. 639 null 640 641 lintParens : (token) -> 642 if token[0] == '(' 643 p1 = @peek(-1) 644 n1 = @peek(1) 645 n2 = @peek(2) 646 # String interpolations start with '' + so start the type co-ercion, 647 # so track if we're inside of one. This is most definitely not 648 # 100% true but what else can we do? 649 i = n1 and n2 and n1[0] == 'STRING' and n2[0] == '+' 650 token.isInterpolation = i 651 @parenTokens.push(token) 652 else 653 @parenTokens.pop() 654 # We're not linting, just tracking interpolations. 655 null 656 657 isInInterpolation : () -> 658 for t in @parenTokens 659 return true if t.isInterpolation 660 return false 661 662 isInExtendedRegex : () -> 663 for t in @callTokens 664 return true if t.isRegex 665 return false 666 667 lintPlus : (token) -> 668 # We can't check this inside of interpolations right now, because the 669 # plusses used for the string type co-ercion are marked not spaced. 670 return null if @isInInterpolation() or @isInExtendedRegex() 671 672 p = @peek(-1) 673 unaries = ['TERMINATOR', '(', '=', '-', '+', ',', 'CALL_START', 674 'INDEX_START', '..', '...', 'COMPARE', 'IF', 675 'THROW', 'LOGIC', 'POST_IF', ':', '[', 'INDENT', 676 'COMPOUND_ASSIGN', 'RETURN', 'MATH'] 677 isUnary = if not p then false else p[0] in unaries 678 if (isUnary and token.spaced) or 679 (not isUnary and not token.spaced and not token.newLine) 680 @createLexError('space_operators', {context: token[1]}) 681 else 682 null 683 684 lintMath: (token) -> 685 if not token.spaced and not token.newLine 686 @createLexError('space_operators', {context: token[1]}) 687 else 688 null 689 690 lintCall : (token) -> 691 if token[0] == 'CALL_START' 692 p = @peek(-1) 693 # Track regex calls, to know (approximately) if we're in an 694 # extended regex. 695 token.isRegex = p and p[0] == 'IDENTIFIER' and p[1] == 'RegExp' 696 @callTokens.push(token) 697 if token.generated 698 return @createLexError('no_implicit_parens') 699 else 700 return null 701 else 702 @callTokens.pop() 703 return null 704 705 lintParam : (token) -> 706 nextType = @peek()[0] 707 if nextType == 'PARAM_END' 708 @createLexError('no_empty_param_list') 709 else 710 null 711 712 lintIdentifier: (token) -> 713 key = token[1] 714 715 # Class names might not be in a scope 716 return null if not @currentScope? 717 nextToken = @peek(1) 718 719 # Exit if this identifier isn't being assigned. A and B 720 # are identifiers, but only A should be examined: 721 # A = B 722 return null if nextToken[1] isnt ':' 723 previousToken = @peek(-1) 724 725 # Assigning "@something" and "something" are not the same thing 726 key = "@#{key}" if previousToken[0] == '@' 727 728 # Added a prefix to not interfere with things like "constructor". 729 key = "identifier-#{key}" 730 if @currentScope[key] 731 @createLexError('duplicate_key') 732 else 733 @currentScope[key] = token 734 null 735 736 lintBrace : (token) -> 737 if token[0] == '{' 738 @braceScopes.push @currentScope if @currentScope? 739 @currentScope = {} 740 else 741 @currentScope = @braceScopes.pop() 742 743 if token.generated and token[0] == '{' 744 # Peek back to the last line break. If there is a class 745 # definition, ignore the generated brace. 746 i = -1 747 loop 748 t = @peek(i) 749 if not t? or t[0] == 'TERMINATOR' 750 return @createLexError('no_implicit_braces') 751 if t[0] == 'CLASS' 752 return null 753 i -= 1 754 else 755 return null 756 757 lintJavascript :(token) -> 758 @createLexError('no_backticks') 759 760 lintThrow : (token) -> 761 [n1, n2] = [@peek(), @peek(2)] 762 # Catch literals and string interpolations, which are wrapped in 763 # parens. 764 nextIsString = n1[0] == 'STRING' or (n1[0] == '(' and n2[0] == 'STRING') 765 @createLexError('no_throwing_strings') if nextIsString 766 767 lintIncrement : (token) -> 768 attrs = {context : "found '#{token[0]}'"} 769 @createLexError('no_plusplus', attrs) 770 771 lintStandaloneAt: (token) -> 772 nextToken = @peek() 773 spaced = token.spaced 774 isIdentifier = nextToken[0] == 'IDENTIFIER' 775 isIndexStart = nextToken[0] == 'INDEX_START' 776 isDot = nextToken[0] == '.' 777 778 # https://github.com/jashkenas/coffee-script/issues/1601 779 # @::foo is valid, but @:: behaves inconsistently and is planned for 780 # removal. Technically @:: is a stand alone ::, but I think it makes 781 # sense to group it into no_stand_alone_at 782 if nextToken[0] == '::' 783 protoProperty = @peek(2) 784 isValidProtoProperty = protoProperty[0] == 'IDENTIFIER' 785 786 if spaced or (not isIdentifier and not isIndexStart and 787 not isDot and not isValidProtoProperty) 788 @createLexError('no_stand_alone_at') 789 790 791 # Return an error if the given indentation token is not correct. 792 lintIndentation : (token) -> 793 [type, numIndents, lineNumber] = token 794 795 return null if token.generated? 796 797 # HACK: CoffeeScript's lexer insert indentation in string 798 # interpolations that start with spaces e.g. "#{ 123 }" 799 # so ignore such cases. Are there other times an indentation 800 # could possibly follow a '+'? 801 previous = @peek(-2) 802 isInterpIndent = previous and previous[0] == '+' 803 804 # Ignore the indentation inside of an array, so that 805 # we can allow things like: 806 # x = ["foo", 807 # "bar"] 808 previous = @peek(-1) 809 isArrayIndent = @inArray() and previous?.newLine 810 811 # Ignore indents used to for formatting on multi-line expressions, so 812 # we can allow things like: 813 # a = b = 814 # c = d 815 previousSymbol = @peek(-1)?[0] 816 isMultiline = previousSymbol in ['=', ','] 817 818 # Summarize the indentation conditions we'd like to ignore 819 ignoreIndent = isInterpIndent or isArrayIndent or isMultiline 820 821 # Compensate for indentation in function invocations that span multiple 822 # lines, which can be ignored. 823 if @isChainedCall() 824 currentLine = @lines[@lineNumber] 825 prevNum = 1 826 827 # keep going back until we are not at a comment or a blank line 828 prevNum += 1 while (/^\s*(#|$)/.test(@lines[@lineNumber - prevNum])) 829 previousLine = @lines[@lineNumber - prevNum] 830 831 previousIndentation = previousLine.match(/^(\s*)/)[1].length 832 # I don't know why, but when inside a function, you make a chained 833 # call and define an inline callback as a parameter, the body of 834 # that callback gets the indentation reported higher than it really 835 # is. See issue #88 836 # NOTE: Adding this line moved the cyclomatic complexity over the 837 # limit, I'm not sure why 838 numIndents = currentLine.match(/^(\s*)/)[1].length 839 numIndents -= previousIndentation 840 841 842 # Now check the indentation. 843 expected = @config['indentation'].value 844 if not ignoreIndent and numIndents != expected 845 context = "Expected #{expected} " + 846 "got #{numIndents}" 847 @createLexError('indentation', {context}) 848 else 849 null 850 851 lintClass : (token) -> 852 # TODO: you can do some crazy shit in CoffeeScript, like 853 # class func().ClassName. Don't allow that. 854 855 # Don't try to lint the names of anonymous classes. 856 return null if token.newLine? or @peek()[0] in ['INDENT', 'EXTENDS'] 857 858 # It's common to assign a class to a global namespace, e.g. 859 # exports.MyClassName, so loop through the next tokens until 860 # we find the real identifier. 861 className = null 862 offset = 1 863 until className 864 if @peek(offset + 1)?[0] == '.' 865 offset += 2 866 else if @peek(offset)?[0] == '@' 867 offset += 1 868 else 869 className = @peek(offset)[1] 870 871 # Now check for the error. 872 if not regexes.camelCase.test(className) 873 attrs = {context: "class name: #{className}"} 874 @createLexError('camel_case_classes', attrs) 875 else 876 null 877 878 lintArrowSpacing : (token) -> 879 # Throw error unless the following happens. 880 # 881 # We will take a look at the previous token to see 882 # 1. That the token is properly spaced 883 # 2. Wasn't generated by the CoffeeScript compiler 884 # 3. That it is just indentation 885 # 4. If the function declaration has no parameters 886 # e.g. x(-> 3) 887 # x( -> 3) 888 # 889 # or a statement is wrapped in parentheses 890 # e.g. (-> true)() 891 # 892 # we will accept either having a space or not having a space there. 893 894 pp = @peek(-1) 895 unless (token.spaced? or token.newLine? or @atEof()) and 896 # Throw error unless the previous token... 897 ((pp.spaced? or pp[0] is 'TERMINATOR') or #1 898 pp.generated? or #2 899 pp[0] is "INDENT" or #3 900 (pp[1] is "(" and not pp.generated?)) #4 901 @createLexError('arrow_spacing') 902 else 903 null 904 905 createLexError : (rule, attrs = {}) -> 906 attrs.lineNumber = @lineNumber + 1 907 attrs.level = @config[rule].level 908 attrs.line = @lines[@lineNumber] 909 createError(rule, attrs) 910 911 # Return the token n places away from the current token. 912 peek : (n = 1) -> 913 @tokens[@i + n] || null 914 915 # Return true if the current token is inside of an array. 916 inArray : () -> 917 return @arrayTokens.length > 0 918 919 # Are there any more meaningful tokens following the current one? 920 atEof: -> 921 for token in @tokens.slice(@i + 1) 922 unless token.generated or token[0] in ['OUTDENT', 'TERMINATOR'] 923 return false 924 true 925 926 # Return true if the current token is part of a property access 927 # that is split across lines, for example: 928 # $('body') 929 # .addClass('foo') 930 # .removeClass('bar') 931 isChainedCall : () -> 932 # Get the index of the second most recent new line. 933 lines = (i for token, i in @tokens[..@i] when token.newLine?) 934 935 lastNewLineIndex = if lines then lines[lines.length - 2] else null 936 937 # Bail out if there is no such token. 938 return false if not lastNewLineIndex? 939 940 # Otherwise, figure out if that token or the next is an attribute 941 # look-up. 942 tokens = [@tokens[lastNewLineIndex], @tokens[lastNewLineIndex + 1]] 943 944 return !!(t for t in tokens when t and t[0] == '.').length 945 946 947 # A class that performs static analysis of the abstract 948 # syntax tree. 949 class ASTLinter 950 951 constructor : (source, config) -> 952 @source = source 953 @config = config 954 @errors = [] 955 956 lint : () -> 957 try 958 @node = CoffeeScript.nodes(@source) 959 catch coffeeError 960 @errors.push @_parseCoffeeScriptError(coffeeError) 961 return @errors 962 @lintNode(@node) 963 @errors 964 965 # returns the "complexity" value of the current node. 966 getComplexity : (node) -> 967 name = node.constructor.name 968 complexity = if name in ['If', 'While', 'For', 'Try'] 969 1 970 else if name == 'Op' and node.operator in ['&&', '||'] 971 1 972 else if name == 'Switch' 973 node.cases.length 974 else 975 0 976 return complexity 977 978 # Lint the AST node and return it's cyclomatic complexity. 979 lintNode : (node, line) -> 980 981 # Get the complexity of the current node. 982 name = node.constructor.name 983 complexity = @getComplexity(node) 984 985 # Add the complexity of all child's nodes to this one. 986 node.eachChild (childNode) => 987 nodeLine = childNode.locationData.first_line 988 complexity += @lintNode(childNode, nodeLine) if childNode 989 990 # If the current node is a function, and it's over our limit, add an 991 # error to the list. 992 rule = @config.cyclomatic_complexity 993 994 if name == 'Code' and complexity >= rule.value 995 attrs = { 996 context: complexity + 1 997 level: rule.level 998 lineNumber: line + 1 999 lineNumberEnd: node.locationData.last_line + 1 1000 } 1001 error = createError 'cyclomatic_complexity', attrs 1002 @errors.push error if error 1003 1004 # Return the complexity for the benefit of parent nodes. 1005 return complexity 1006 1007 _parseCoffeeScriptError : (coffeeError) -> 1008 rule = RULES['coffeescript_error'] 1009 1010 message = coffeeError.toString() 1011 1012 # Parse the line number 1013 lineNumber = -1 1014 if coffeeError.location? 1015 lineNumber = coffeeError.location.first_line + 1 1016 else 1017 match = /line (\d+)/.exec message 1018 lineNumber = parseInt match[1], 10 if match?.length > 1 1019 attrs = { 1020 message: message 1021 level: rule.level 1022 lineNumber: lineNumber 1023 } 1024 return createError 'coffeescript_error', attrs 1025 1026 57 j++ 58 59 LineLinter = require './line_linter.coffee' 60 LexicalLinter = require './lexical_linter.coffee' 61 ASTLinter = require './ast_linter.coffee' 1027 62 1028 63 # Merge default and user configuration. … … 1031 66 for rule, ruleConfig of RULES 1032 67 config[rule] = defaults(userConfig[rule], ruleConfig) 68 69 1033 70 return config 1034 71 … … 1050 87 newSource 1051 88 89 _rules = {} 90 coffeelint.registerRule = (RuleConstructor, ruleName = undefined) -> 91 p = new RuleConstructor 92 93 name = p?.rule?.name or "(unknown)" 94 e = (msg) -> throw new Error "Invalid rule: #{name} #{msg}" 95 unless p.rule? 96 e "Rules must provide rule attribute with a default configuration." 97 98 e "Rule defaults require a name" unless p.rule.name? 99 100 if ruleName? and ruleName isnt p.rule.name 101 e "Mismatched rule name: #{ruleName}" 102 103 e "Rule defaults require a message" unless p.rule.message? 104 e "Rule defaults require a description" unless p.rule.description? 105 unless p.rule.level in [ 'ignore', 'warn', 'error' ] 106 e "Default level must be 'ignore', 'warn', or 'error'" 107 108 if typeof p.lintToken is 'function' 109 e "'tokens' is required for 'lintToken'" unless p.tokens 110 else if typeof p.lintLine isnt 'function' and 111 typeof p.lintAST isnt 'function' 112 e "Rules must implement lintToken, lintLine, or lintAST" 113 114 # Capture the default options for the new rule. 115 RULES[p.rule.name] = p.rule 116 _rules[p.rule.name] = RuleConstructor 117 118 # These all need to be explicitly listed so they get picked up by browserify. 119 coffeelint.registerRule require './rules/arrow_spacing.coffee' 120 coffeelint.registerRule require './rules/no_tabs.coffee' 121 coffeelint.registerRule require './rules/no_trailing_whitespace.coffee' 122 coffeelint.registerRule require './rules/max_line_length.coffee' 123 coffeelint.registerRule require './rules/line_endings.coffee' 124 coffeelint.registerRule require './rules/no_trailing_semicolons.coffee' 125 coffeelint.registerRule require './rules/indentation.coffee' 126 coffeelint.registerRule require './rules/camel_case_classes.coffee' 127 coffeelint.registerRule require './rules/colon_assignment_spacing.coffee' 128 coffeelint.registerRule require './rules/no_implicit_braces.coffee' 129 coffeelint.registerRule require './rules/no_plusplus.coffee' 130 coffeelint.registerRule require './rules/no_throwing_strings.coffee' 131 coffeelint.registerRule require './rules/no_backticks.coffee' 132 coffeelint.registerRule require './rules/no_implicit_parens.coffee' 133 coffeelint.registerRule require './rules/no_empty_param_list.coffee' 134 coffeelint.registerRule require './rules/no_stand_alone_at.coffee' 135 coffeelint.registerRule require './rules/space_operators.coffee' 136 coffeelint.registerRule require './rules/duplicate_key.coffee' 137 coffeelint.registerRule require './rules/empty_constructor_needs_parens.coffee' 138 coffeelint.registerRule require './rules/cyclomatic_complexity.coffee' 139 coffeelint.registerRule require './rules/newlines_after_classes.coffee' 140 coffeelint.registerRule require './rules/no_unnecessary_fat_arrows.coffee' 141 coffeelint.registerRule require './rules/missing_fat_arrows.coffee' 142 coffeelint.registerRule( 143 require './rules/non_empty_constructor_needs_parens.coffee' 144 ) 145 146 hasSyntaxError = (source) -> 147 try 148 # If there are syntax errors this will abort the lexical and line 149 # linters. 150 CoffeeScript.tokens(source) 151 return false 152 return true 153 1052 154 # Check the source against the given configuration and return an array 1053 155 # of any errors found. An error is an object with the following … … 1070 172 disabled_initially = [] 1071 173 for l in source.split('\n') 1072 s = regexes.configStatement.exec(l)174 s = LineLinter.configStatement.exec(l) 1073 175 if s?.length > 2 and 'enable' in s 1074 176 for r in s[1..] … … 1079 181 1080 182 # Do AST linting first so all compile errors are caught. 1081 astErrors = new ASTLinter(source, config).lint() 1082 1083 # Do lexical linting. 1084 lexicalLinter = new LexicalLinter(source, config) 1085 lexErrors = lexicalLinter.lint() 1086 1087 # Do line linting. 1088 tokensByLine = lexicalLinter.tokensByLine 1089 lineLinter = new LineLinter(source, config, tokensByLine) 1090 lineErrors = lineLinter.lint() 183 astErrors = new ASTLinter(source, config, _rules, CoffeeScript).lint() 184 errors = [].concat(astErrors) 185 186 # only do further checks if the syntax is okay, otherwise they just fail 187 # with syntax error exceptions 188 unless hasSyntaxError(source) 189 # Do lexical linting. 190 lexicalLinter = new LexicalLinter(source, config, _rules, CoffeeScript) 191 lexErrors = lexicalLinter.lint() 192 errors = errors.concat(lexErrors) 193 194 # Do line linting. 195 tokensByLine = lexicalLinter.tokensByLine 196 lineLinter = new LineLinter(source, config, _rules, tokensByLine, 197 literate) 198 lineErrors = lineLinter.lint() 199 errors = errors.concat(lineErrors) 200 block_config = lineLinter.block_config 201 else 202 # default this so it knows what to do 203 block_config = 204 enable : {} 205 disable : {} 1091 206 1092 207 # Sort by line number and return. 1093 errors = lexErrors.concat(lineErrors, astErrors)1094 208 errors.sort((a, b) -> a.lineNumber - b.lineNumber) 1095 1096 # Helper to remove rules from disabled list1097 difference = (a, b) ->1098 j = 01099 while j < a.length1100 if a[j] in b1101 a.splice(j, 1)1102 else1103 j++1104 209 1105 210 # Disable/enable rules for inline blocks … … 1126 231 errors.push e unless e.rule in disabled 1127 232 1128 block_config =1129 'enable': {}1130 'disable': {}1131 1132 233 errors -
Dev/trunk/node_modules/grunt-coffeelint/node_modules/coffeelint/src/commandline.coffee
r484 r516 12 12 optimist = require("optimist") 13 13 thisdir = path.dirname(fs.realpathSync(__filename)) 14 coffeelint = require(path.join(thisdir, "..", "lib", "coffeelint")) 14 coffeelint = require(path.join(thisdir, "coffeelint")) 15 configfinder = require(path.join(thisdir, "configfinder")) 15 16 CoffeeScript = require 'coffee-script' 16 17 … … 160 161 for path, errors of @errorReport.paths 161 162 for e in errors 163 # Having the context is useful for the cyclomatic_complexity 164 # rule and critical for the undefined_variables rule. 165 e.message += " #{e.context}." if e.context 162 166 f = [ 163 167 path … … 181 185 @print """ 182 186 <issue line="#{e.lineNumber}" 183 lineEnd= #{e.lineNumberEnd ? e.lineNumberEnd}187 lineEnd="#{e.lineNumberEnd ? e.lineNumber}" 184 188 reason="[#{@escape(e.level)}] #{@escape(e.message)}" 185 189 evidence="#{@escape(e.context)}"/> … … 209 213 msg 210 214 215 class CheckstyleReporter extends JSLintReporter 216 217 publish : () -> 218 @print "<?xml version=\"1.0\" encoding=\"utf-8\"?>" 219 @print "<checkstyle version=\"4.3\">" 220 221 for path, errors of @errorReport.paths 222 if errors.length 223 @print "<file name=\"#{path}\">" 224 225 for e in errors 226 level = e.level 227 level = 'warning' if level is 'warn' 228 229 # context is optional, this avoids generating the string 230 # "context: undefined" 231 context = e.context ? "" 232 @print """ 233 <error line="#{e.lineNumber}" 234 severity="#{@escape(level)}" 235 message="#{@escape(e.message+'; context: '+context)}" 236 source="coffeelint"/> 237 """ 238 @print "</file>" 239 240 @print "</checkstyle>" 241 211 242 # Return an error report from linting the given paths. 212 lintFiles = ( paths, config) ->243 lintFiles = (files, config) -> 213 244 errorReport = new ErrorReport() 214 for path in paths 215 source = read(path) 216 literate = CoffeeScript.helpers.isLiterate path 217 218 errorReport.paths[path] = coffeelint.lint(source, config, literate) 245 for file in files 246 source = read(file) 247 literate = CoffeeScript.helpers.isLiterate file 248 249 fileConfig = if config then config else getFallbackConfig(file) 250 251 for ruleName, data of fileConfig 252 if data.module? 253 loadRules(data.module, ruleName) 254 255 errorReport.paths[file] = coffeelint.lint(source, fileConfig, literate) 219 256 return errorReport 220 257 … … 222 259 lintSource = (source, config, literate = false) -> 223 260 errorReport = new ErrorReport() 261 config or= getFallbackConfig() 262 263 for ruleName, data of config 264 if data.module? 265 loadRules(data.module, ruleName) 266 224 267 errorReport.paths["stdin"] = coffeelint.lint(source, config, literate) 225 268 return errorReport 269 270 # Get fallback configuration. With the -F flag found configs in standard places 271 # will be used for each file being linted. Standard places are package.json or 272 # coffeelint.json in a project's root folder or the user's home folder. 273 getFallbackConfig = (filename = null) -> 274 unless options.argv.noconfig 275 configfinder.getConfig(filename) 276 277 # moduleName is a NodeJS module, or a path to a module NodeJS can load. 278 loadRules = (moduleName, ruleName = undefined) -> 279 try 280 try 281 ruleModule = require moduleName 282 catch e 283 # Maybe the user used a relative path from the command line. This 284 # doesn't make much sense from a config file, but seems natural 285 # with the --rules option. 286 ruleModule = require path.resolve(process.cwd(), moduleName) 287 288 # Most rules can export as a single constructor function 289 if typeof ruleModule is 'function' 290 coffeelint.registerRule ruleModule, ruleName 291 else 292 # Or it can export an array of rules to load. 293 for rule in ruleModule 294 coffeelint.registerRule rule 295 catch e 296 console.error "Error loading #{moduleName}" 297 throw e 226 298 227 299 # Publish the error report and exit with the appropriate status. … … 231 303 else if options.argv.csv 232 304 new CSVReporter(errorReport) 305 else if options.argv.checkstyle 306 new CheckstyleReporter(errorReport) 233 307 else 234 308 colorize = not options.argv.nocolor … … 248 322 .alias("q", "quiet") 249 323 .describe("f", "Specify a custom configuration file.") 324 .describe("rules", "Specify a custom rule or directory of rules.") 250 325 .describe("makeconfig", "Prints a default config file") 251 326 .describe("noconfig", … … 253 328 .describe("h", "Print help information.") 254 329 .describe("v", "Print current version number.") 255 .describe("r", " Recursively lint .coffee files in subdirectories.")330 .describe("r", "(not used, but left for backward compatibility)") 256 331 .describe("csv", "Use the csv reporter.") 257 332 .describe("jslint", "Use the JSLint XML reporter.") 333 .describe("checkstyle", "Use the checkstyle XML reporter.") 258 334 .describe("nocolor", "Don't colorize the output") 259 335 .describe("s", "Lint the source from stdin") … … 263 339 .boolean("csv") 264 340 .boolean("jslint") 341 .boolean("checkstyle") 265 342 .boolean("nocolor") 266 343 .boolean("noconfig") … … 286 363 else 287 364 # Load configuration. 288 config = {}365 config = null 289 366 unless options.argv.noconfig 290 # path.existsSync was moved to fs.existsSync node 0.6 -> 0.8291 existsFn = fs.existsSync ? path.existsSync292 367 if options.argv.f 293 368 config = JSON.parse read options.argv.f 294 369 else if (process.env.COFFEELINT_CONFIG and 295 existsFn process.env.COFFEELINT_CONFIG)370 fs.existsSync(process.env.COFFEELINT_CONFIG)) 296 371 config = JSON.parse(read(process.env.COFFEELINT_CONFIG)) 372 373 loadRules(options.argv.rules) if options.argv.rules 297 374 298 375 if options.argv.s … … 308 385 # Find scripts to lint. 309 386 paths = options.argv._ 310 scripts = if options.argv.r then findCoffeeScripts(paths) else paths387 scripts = findCoffeeScripts(paths) 311 388 312 389 # Lint the code. -
Dev/trunk/node_modules/grunt-coffeelint/package.json
r484 r516 2 2 "name": "grunt-coffeelint", 3 3 "description": "Lint your Coffee", 4 "version": "0.0. 7",4 "version": "0.0.8", 5 5 "homepage": "https://github.com/vojtajina/grunt-coffeelint", 6 6 "author": { … … 40 40 }, 41 41 "scripts": { 42 "test": "grunt test"42 "test": "grunt default" 43 43 }, 44 44 "peerDependencies": { … … 46 46 }, 47 47 "dependencies": { 48 "coffeelint": "~ 0.5"48 "coffeelint": "~1.0" 49 49 }, 50 50 "devDependencies": { … … 56 56 "gruntplugin" 57 57 ], 58 "readme": "[](http://travis-ci.org/vojtajina/grunt-coffeelint)\n# grunt-coffeelint\n\n**Lint your CoffeeScript by [CoffeeLint].**\n\n## Installation\n\nInstall npm package, next to your project's `Gruntfile.js` file:\n\n npm install grunt-coffeelint\n\nAdd this line to your project's `Gruntfile.js`:\n\n grunt.loadNpmTasks('grunt-coffeelint');\n\n \n## Configuration\n\n`coffeelint` is a multitask, so you can use it similary to `lint`, `watch` etc...\n\n````javascript\ngrunt.initConfig({\n ...\n coffeelint: {\n app: ['app/*.coffee', 'scripts/*.coffee']\n }\n },\n ...\n});\n````\n\n### Options per target\n\n````javascript\ngrunt.initConfig({\n ...\n coffeelint: {\n app: ['app/*.coffee', 'scripts/*.coffee'],\n tests: {\n files: {\n src: ['tests/*.coffee']\n },\n options: {\n 'no_trailing_whitespace': {\n 'level': 'error'\n }\n }\n }\n },\n ...\n});\n````\n\n### Global - default options\n\n````javascript\ngrunt.initConfig({\n ...\n coffeelint: {\n options: {\n 'no_trailing_whitespace': {\n 'level': 'error'\n }\n }\n },\n ...\n});\n````\n\nFor available options see [example configuration] or [coffeelint homepage].\n\n\n[CoffeeLint]: http://www.coffeelint.org/\n[coffeelint homepage]: http://www.coffeelint.org/\n[example configuration]: https://raw.github.com/clutchski/coffeelint/master/examples/coffeelint.json\n",58 "readme": "[](http://travis-ci.org/vojtajina/grunt-coffeelint)\n# grunt-coffeelint\n\n**Lint your CoffeeScript by [CoffeeLint].**\n\n## Installation\n\nInstall npm package, next to your project's `Gruntfile.js` file:\n\n npm install grunt-coffeelint\n\nAdd this line to your project's `Gruntfile.js`:\n\n grunt.loadNpmTasks('grunt-coffeelint');\n\n## Options\n\nA few additional options are supported:\n\n### force\nType: `Boolean`\nDefault value: `false`\n\nSet `force` to `true` to report CoffeeLint errors but not fail the task.\n\n## Configuration\n\n`coffeelint` is a multitask, so you can use it similary to `lint`, `watch` etc...\n\n````javascript\ngrunt.initConfig({\n ...\n coffeelint: {\n app: ['app/*.coffee', 'scripts/*.coffee']\n }\n },\n ...\n});\n````\n\n### Options per target\n\n````javascript\ngrunt.initConfig({\n ...\n coffeelint: {\n app: ['app/*.coffee', 'scripts/*.coffee'],\n tests: {\n files: {\n src: ['tests/*.coffee']\n },\n options: {\n 'no_trailing_whitespace': {\n 'level': 'error'\n }\n }\n }\n },\n ...\n});\n````\n\n### Global - default options\n\n````javascript\ngrunt.initConfig({\n ...\n coffeelint: {\n options: {\n 'no_trailing_whitespace': {\n 'level': 'error'\n }\n }\n },\n ...\n});\n````\n\nFor available options see [coffeelint homepage].\n\n[CoffeeLint]: http://www.coffeelint.org/\n[coffeelint homepage]: http://www.coffeelint.org/\n", 59 59 "readmeFilename": "README.md", 60 "_id": "grunt-coffeelint@0.0. 7",60 "_id": "grunt-coffeelint@0.0.8", 61 61 "dist": { 62 "shasum": " b782bf05aeb462dce2e566116849d369a1f19f4f"62 "shasum": "149d6c5e8dd78b88a513b94daa274d5e6736fa52" 63 63 }, 64 "_from": "grunt-coffeelint@0.0. 7",65 "_resolved": "https://registry.npmjs.org/grunt-coffeelint/-/grunt-coffeelint-0.0. 7.tgz"64 "_from": "grunt-coffeelint@0.0.8", 65 "_resolved": "https://registry.npmjs.org/grunt-coffeelint/-/grunt-coffeelint-0.0.8.tgz" 66 66 } -
Dev/trunk/node_modules/grunt-coffeelint/tasks/coffeelint.js
r484 r516 4 4 grunt.registerMultiTask('coffeelint', 'Validate files with CoffeeLint', function() { 5 5 6 var errorCount = 0; 7 var warnCount = 0; 6 8 var files = this.filesSrc; 7 9 var options = this.options(); 8 var errorCount = 0; 9 var warnCount = 0; 10 11 if (options.configFile != undefined) { 12 var config = grunt.file.readJSON(options.configFile); 13 options.configFile = undefined; 14 for (var key in options) { 15 config[key] = options[key]; 16 } 17 options = config; 18 } 10 19 11 20 files.forEach(function(file) { 12 21 grunt.verbose.writeln('Linting ' + file + '...'); 13 22 14 var errors = coffeelint.lint(grunt.file.read(file), options); 23 var literate = !!file.match(/\.(litcoffee|coffee\.md)$/i); 24 var errors = coffeelint.lint(grunt.file.read(file), options, literate); 15 25 16 26 if (!errors.length) { … … 40 50 }); 41 51 42 if (errorCount ) {52 if (errorCount && !options.force) { 43 53 return false; 44 54 } 45 55 46 if (!warnCount) { 47 grunt.log.ok(files.length + ' file' + (files.length === 1 ? '' : 's') + 48 ' lint free.'); 56 if (!warnCount && !errorCount) { 57 grunt.log.ok(files.length + ' file' + (files.length === 1 ? '' : 's') + ' lint free.'); 49 58 } 50 59 }); -
Dev/trunk/node_modules/grunt-contrib-clean/node_modules/rimraf/package.json
r484 r516 1 1 { 2 2 "name": "rimraf", 3 "version": "2.2. 4",3 "version": "2.2.6", 4 4 "main": "rimraf.js", 5 5 "description": "A deep deletion module for node (like `rm -rf`)", … … 12 12 "type": "MIT", 13 13 "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" 14 },15 "optionalDependencies": {16 "graceful-fs": "~2"17 14 }, 18 15 "repository": { … … 55 52 }, 56 53 "homepage": "https://github.com/isaacs/rimraf", 57 "dependencies": { 58 "graceful-fs": "~2" 54 "_id": "rimraf@2.2.6", 55 "dist": { 56 "shasum": "c28d4de4cafcd392b82d02729509c65e3502240c" 59 57 }, 60 "_id": "rimraf@2.2.4", 61 "dist": { 62 "shasum": "853b5c60b25a2978dfb1f8d03ef55b667ae68352" 63 }, 64 "_from": "rimraf@2.2.4", 65 "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.4.tgz" 58 "_from": "rimraf@2.2.6", 59 "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" 66 60 } -
Dev/trunk/node_modules/grunt-contrib-clean/node_modules/rimraf/rimraf.js
r484 r516 3 3 4 4 var path = require("path") 5 , fs 6 7 try { 8 // optional dependency 9 fs = require("graceful-fs") 10 } catch (er) { 11 fs = require("fs") 12 } 5 var fs = require("fs") 13 6 14 7 // for EMFILE handling … … 118 111 // raise the original error. 119 112 fs.rmdir(p, function (er) { 120 if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" ))113 if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) 121 114 rmkids(p, cb) 122 115 else if (er && er.code === "ENOTDIR") … … 173 166 if (er.code === "ENOTDIR") 174 167 throw originalEr 175 if (er.code === "ENOTEMPTY" || er.code === "EEXIST" )168 if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") 176 169 rmkidsSync(p) 177 170 } -
Dev/trunk/node_modules/grunt-contrib-clean/package.json
r484 r516 35 35 "grunt-contrib-nodeunit": "~0.1.2", 36 36 "grunt-contrib-internal": "~0.4.4", 37 "grunt": "~0.4.0" 37 "grunt": "~0.4.0", 38 "rimraf": "^2.2.6" 38 39 }, 39 40 "peerDependencies": { -
Dev/trunk/node_modules/grunt-contrib-coffee/package.json
r484 r516 44 44 "gruntplugin" 45 45 ], 46 "readme": "# grunt-contrib-coffee [](http://travis-ci.org/gruntjs/grunt-contrib-coffee)\n\n> Compile CoffeeScript files to JavaScript.\n\n\n\n## Getting Started\nThis plugin requires Grunt `~0.4.0`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-contrib-coffee --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-contrib-coffee');\n```\n\n*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/gruntjs/grunt-contrib-coffee/tree/grunt-0.3-stable).*\n\n\n## Coffee task\n_Run this task with the `grunt coffee` command._\n\nTask targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.\n### Options\n\n#### separator\nType: `String`\nDefault: linefeed\n\nConcatenated files will be joined on this string.\n\n#### bare\nType: `boolean`\n\nCompile the JavaScript without the top-level function safety wrapper.\n\n#### join\nType: `boolean`\nDefault: `false`\n\nWhen compiling multiple .coffee files into a single .js file, concatenate first.\n\n#### sourceMap\nType: `boolean`\nDefault: `false`\n\nCompile JavaScript and create a .map file linking it to the CoffeeScript source. When compiling multiple .coffee files to a single .js file, concatenation occurs as though the 'join' option is enabled. The concatenated CoffeeScript is written into the output directory, and becomes the target for source mapping.\n### Usage Examples\n\n```js\ncoffee: {\n compile: {\n files: {\n 'path/to/result.js': 'path/to/source.coffee', // 1:1 compile\n 'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // compile and concat into single file\n }\n },\n\n compileBare: {\n options: {\n bare: true\n },\n files: {\n 'path/to/result.js': 'path/to/source.coffee', // 1:1 compile\n 'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // compile and concat into single file\n }\n },\n\n compileJoined: {\n options: {\n join: true\n },\n files: {\n 'path/to/result.js': 'path/to/source.coffee', // 1:1 compile, identical output to join = false\n 'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // concat then compile into single file\n }\n },\n\n compileWithMaps: {\n options: {\n sourceMap: true\n },\n files: {\n 'path/to/result.js': 'path/to/source.coffee', // 1:1 compile\n 'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // concat then compile into single file\n }\n },\n\n glob_to_multiple: {\n expand: true,\n flatten: true,\n cwd: 'path/to',\n src: ['*.coffee'],\n dest: 'path/to/dest/',\n ext: '.js'\n }\n}\n```\n\nFor more examples on how to use the `expand` API to manipulate the default dynamic path construction in the `glob_to_multiple` examples, see \"Building the files object dynamically\" in the grunt wiki entry [Configuring Tasks](http://gruntjs.com/configuring-tasks).\n\n## Release History\n\n * 2013-04-19âââv0.7.0âââPlace Sourcemaps at bottom of file Change extension for Sourcemaps from .maps to .js.map\n * 2013-04-18âââv0.6.7âââImproved error reporting\n * 2013-04-08âââv0.6.6âââFix regression with single-file compilation.\n * 2013-04-05âââv0.6.5âââImproved error reporting\n * 2013-03-22âââv0.6.4âââSourcemap support\n * 2013-03-19âââv0.6.3âââIncrease error logging verbosity.\n * 2013-03-18âââv0.6.2âââBump to CoffeeScript 1.6.2\n * 2013-03-18âââv0.6.1âââSupport `join` option\n * 2013-03-06âââv0.6.0âââBump to CoffeeScript 1.6 Support literate CoffeeScript extension coffee.md\n * 2013-02-25âââv0.5.0âââBump to CoffeeScript 1.5 Support literate CoffeeScript (.litcoffee)\n * 2013-02-15âââv0.4.0âââFirst official release for Grunt 0.4.0.\n * 2013-01-23âââv0.4.0rc7âââUpdating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions. Bump coffeescript dependency to 1.4.\n * 2013-01-09âââv0.4.0rc5âââUpdating to work with grunt v0.4.0rc5. Switching to this.filesSrc api.\n * 2012-12-15âââv0.4.0aâââConversion to grunt v0.4 conventions. Remove experimental destination wildcards.\n * 2012-10-12âââv0.3.2âââRename grunt-contrib-lib dep to grunt-lib-contrib.\n * 2012-09-25âââv0.3.1âââDon't fail when there are no files.\n * 2012-09-24âââv0.3.0âââGlobal options depreciated.\n * 2012-09-10âââv0.2.0âââRefactored from grunt-contrib into individual repo.\n\n---\n\nTask submitted by [Eric Woroshow](http://ericw.ca/)\n\n*This file was generated on Fri Apr 19 2013 09:49:08.*\n",47 "readmeFilename": "README.md",48 46 "contributors": [ 49 47 { … … 84 82 } 85 83 ], 84 "readme": "# grunt-contrib-coffee [](http://travis-ci.org/gruntjs/grunt-contrib-coffee)\n\n> Compile CoffeeScript files to JavaScript.\n\n\n\n## Getting Started\nThis plugin requires Grunt `~0.4.0`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-contrib-coffee --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-contrib-coffee');\n```\n\n*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/gruntjs/grunt-contrib-coffee/tree/grunt-0.3-stable).*\n\n\n## Coffee task\n_Run this task with the `grunt coffee` command._\n\nTask targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.\n### Options\n\n#### separator\nType: `String`\nDefault: linefeed\n\nConcatenated files will be joined on this string.\n\n#### bare\nType: `boolean`\n\nCompile the JavaScript without the top-level function safety wrapper.\n\n#### join\nType: `boolean`\nDefault: `false`\n\nWhen compiling multiple .coffee files into a single .js file, concatenate first.\n\n#### sourceMap\nType: `boolean`\nDefault: `false`\n\nCompile JavaScript and create a .map file linking it to the CoffeeScript source. When compiling multiple .coffee files to a single .js file, concatenation occurs as though the 'join' option is enabled. The concatenated CoffeeScript is written into the output directory, and becomes the target for source mapping.\n### Usage Examples\n\n```js\ncoffee: {\n compile: {\n files: {\n 'path/to/result.js': 'path/to/source.coffee', // 1:1 compile\n 'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // compile and concat into single file\n }\n },\n\n compileBare: {\n options: {\n bare: true\n },\n files: {\n 'path/to/result.js': 'path/to/source.coffee', // 1:1 compile\n 'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // compile and concat into single file\n }\n },\n\n compileJoined: {\n options: {\n join: true\n },\n files: {\n 'path/to/result.js': 'path/to/source.coffee', // 1:1 compile, identical output to join = false\n 'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // concat then compile into single file\n }\n },\n\n compileWithMaps: {\n options: {\n sourceMap: true\n },\n files: {\n 'path/to/result.js': 'path/to/source.coffee', // 1:1 compile\n 'path/to/another.js': ['path/to/sources/*.coffee', 'path/to/more/*.coffee'] // concat then compile into single file\n }\n },\n\n glob_to_multiple: {\n expand: true,\n flatten: true,\n cwd: 'path/to',\n src: ['*.coffee'],\n dest: 'path/to/dest/',\n ext: '.js'\n }\n}\n```\n\nFor more examples on how to use the `expand` API to manipulate the default dynamic path construction in the `glob_to_multiple` examples, see \"Building the files object dynamically\" in the grunt wiki entry [Configuring Tasks](http://gruntjs.com/configuring-tasks).\n\n## Release History\n\n * 2013-04-19âââv0.7.0âââPlace Sourcemaps at bottom of file Change extension for Sourcemaps from .maps to .js.map\n * 2013-04-18âââv0.6.7âââImproved error reporting\n * 2013-04-08âââv0.6.6âââFix regression with single-file compilation.\n * 2013-04-05âââv0.6.5âââImproved error reporting\n * 2013-03-22âââv0.6.4âââSourcemap support\n * 2013-03-19âââv0.6.3âââIncrease error logging verbosity.\n * 2013-03-18âââv0.6.2âââBump to CoffeeScript 1.6.2\n * 2013-03-18âââv0.6.1âââSupport `join` option\n * 2013-03-06âââv0.6.0âââBump to CoffeeScript 1.6 Support literate CoffeeScript extension coffee.md\n * 2013-02-25âââv0.5.0âââBump to CoffeeScript 1.5 Support literate CoffeeScript (.litcoffee)\n * 2013-02-15âââv0.4.0âââFirst official release for Grunt 0.4.0.\n * 2013-01-23âââv0.4.0rc7âââUpdating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions. Bump coffeescript dependency to 1.4.\n * 2013-01-09âââv0.4.0rc5âââUpdating to work with grunt v0.4.0rc5. Switching to this.filesSrc api.\n * 2012-12-15âââv0.4.0aâââConversion to grunt v0.4 conventions. Remove experimental destination wildcards.\n * 2012-10-12âââv0.3.2âââRename grunt-contrib-lib dep to grunt-lib-contrib.\n * 2012-09-25âââv0.3.1âââDon't fail when there are no files.\n * 2012-09-24âââv0.3.0âââGlobal options depreciated.\n * 2012-09-10âââv0.2.0âââRefactored from grunt-contrib into individual repo.\n\n---\n\nTask submitted by [Eric Woroshow](http://ericw.ca/)\n\n*This file was generated on Fri Apr 19 2013 09:49:08.*\n", 85 "readmeFilename": "README.md", 86 86 "_id": "grunt-contrib-coffee@0.7.0", 87 "_from": "grunt-contrib-coffee@~0.7.0" 87 "dist": { 88 "shasum": "9eac2d9460fa3c8962c38cb83cfe658a2fc1c8c9" 89 }, 90 "_from": "grunt-contrib-coffee@0.7.0", 91 "_resolved": "https://registry.npmjs.org/grunt-contrib-coffee/-/grunt-contrib-coffee-0.7.0.tgz" 88 92 } -
Dev/trunk/node_modules/grunt-contrib-copy/package.json
r484 r516 41 41 "gruntplugin" 42 42 ], 43 "readme": "# grunt-contrib-copy [](http://travis-ci.org/gruntjs/grunt-contrib-copy)\n\n> Copy files and folders.\n\n\n\n## Getting Started\nThis plugin requires Grunt `~0.4.0`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-contrib-copy --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-contrib-copy');\n```\n\n*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/gruntjs/grunt-contrib-copy/tree/grunt-0.3-stable).*\n\n\n\n## Copy task\n_Run this task with the `grunt copy` command._\n\nTask targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.\n### Options\n\n#### processContent\nType: `Function(content, srcpath)`\n\nThis option is passed to `grunt.file.copy` as an advanced way to control the file contents that are copied.\n\n#### processContentExclude\nType: `String`\n\nThis option is passed to `grunt.file.copy` as an advanced way to control which file contents are processed.\n\n### Usage Examples\n\n```js\ncopy: {\n main: {\n files: [\n {src: ['path/*'], dest: 'dest/', filter: 'isFile'}, // includes files in path\n {src: ['path/**'], dest: 'dest/'}, // includes files in path and its subdirs\n {expand: true, cwd: 'path/', src: ['**'], dest: 'dest/'}, // makes all src relative to cwd\n {expand: true, flatten: true, src: ['path/**'], dest: 'dest/', filter: 'isFile'} // flattens results to a single level\n ]\n }\n}\n```\n\n\n## Release History\n\n * 2013-02-14âââv0.4.0âââFirst official release for Grunt 0.4.0.\n * 2013-01-22âââv0.4.0rc7âââUpdating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.\n * 2013-01-13âââv0.4.0rc5âââUpdating to work with grunt v0.4.0rc5. Conversion to grunt v0.4 conventions. Replace basePath with cwd. Empty directory support.\n * 2012-10-17âââv0.3.2âââPass copyOptions on single file copy.\n * 2012-10-11âââv0.3.1âââRename grunt-contrib-lib dep to grunt-lib-contrib.\n * 2012-09-23âââv0.3.0âââGeneral cleanup and consolidation. Global options depreciated.\n * 2012-09-17âââv0.2.4âââNo valid source check.\n * 2012-09-16âââv0.2.3âââPath.sep fallback for node <= 0.7.9.\n * 2012-09-16âââv0.2.2âââSingle file copy support. Test refactoring.\n * 2012-09-06âââv0.2.0âââRefactored from grunt-contrib into individual repo.\n\n---\n\nTask submitted by [Chris Talkington](http://christalkington.com/)\n\n*This file was generated on Fri Feb 22 2013 09:26:58.*\n",44 "readmeFilename": "README.md",45 43 "contributors": [ 46 44 { … … 65 63 } 66 64 ], 65 "readme": "# grunt-contrib-copy [](http://travis-ci.org/gruntjs/grunt-contrib-copy)\n\n> Copy files and folders.\n\n\n\n## Getting Started\nThis plugin requires Grunt `~0.4.0`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-contrib-copy --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-contrib-copy');\n```\n\n*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/gruntjs/grunt-contrib-copy/tree/grunt-0.3-stable).*\n\n\n\n## Copy task\n_Run this task with the `grunt copy` command._\n\nTask targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.\n### Options\n\n#### processContent\nType: `Function(content, srcpath)`\n\nThis option is passed to `grunt.file.copy` as an advanced way to control the file contents that are copied.\n\n#### processContentExclude\nType: `String`\n\nThis option is passed to `grunt.file.copy` as an advanced way to control which file contents are processed.\n\n### Usage Examples\n\n```js\ncopy: {\n main: {\n files: [\n {src: ['path/*'], dest: 'dest/', filter: 'isFile'}, // includes files in path\n {src: ['path/**'], dest: 'dest/'}, // includes files in path and its subdirs\n {expand: true, cwd: 'path/', src: ['**'], dest: 'dest/'}, // makes all src relative to cwd\n {expand: true, flatten: true, src: ['path/**'], dest: 'dest/', filter: 'isFile'} // flattens results to a single level\n ]\n }\n}\n```\n\n\n## Release History\n\n * 2013-02-14âââv0.4.0âââFirst official release for Grunt 0.4.0.\n * 2013-01-22âââv0.4.0rc7âââUpdating grunt/gruntplugin dependencies to rc7. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.\n * 2013-01-13âââv0.4.0rc5âââUpdating to work with grunt v0.4.0rc5. Conversion to grunt v0.4 conventions. Replace basePath with cwd. Empty directory support.\n * 2012-10-17âââv0.3.2âââPass copyOptions on single file copy.\n * 2012-10-11âââv0.3.1âââRename grunt-contrib-lib dep to grunt-lib-contrib.\n * 2012-09-23âââv0.3.0âââGeneral cleanup and consolidation. Global options depreciated.\n * 2012-09-17âââv0.2.4âââNo valid source check.\n * 2012-09-16âââv0.2.3âââPath.sep fallback for node <= 0.7.9.\n * 2012-09-16âââv0.2.2âââSingle file copy support. Test refactoring.\n * 2012-09-06âââv0.2.0âââRefactored from grunt-contrib into individual repo.\n\n---\n\nTask submitted by [Chris Talkington](http://christalkington.com/)\n\n*This file was generated on Fri Feb 22 2013 09:26:58.*\n", 66 "readmeFilename": "README.md", 67 67 "_id": "grunt-contrib-copy@0.4.1", 68 "_from": "grunt-contrib-copy@~0.4.1" 68 "dist": { 69 "shasum": "16b97c94a6f0853ff18fa34e6a1364233f28e8e6" 70 }, 71 "_from": "grunt-contrib-copy@0.4.1", 72 "_resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-0.4.1.tgz" 69 73 } -
Dev/trunk/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob/glob.js
r484 r516 77 77 } 78 78 79 this._processingEmitQueue = false 79 80 80 81 glob.Glob = Glob … … 99 100 options = options || {} 100 101 102 this._endEmitted = false 101 103 this.EOF = {} 102 104 this._emitQueue = [] 105 106 this.paused = false 107 this._processingEmitQueue = false 103 108 104 109 this.maxDepth = options.maxDepth || 1000 … … 217 222 if (this.mark) { 218 223 // at *some* point we statted all of these 219 all = all.map(function (m) { 220 var sc = this.cache[m] 221 if (!sc) 222 return m 223 var isDir = (Array.isArray(sc) || sc === 2) 224 if (isDir && m.slice(-1) !== "/") { 225 return m + "/" 226 } 227 if (!isDir && m.slice(-1) === "/") { 228 return m.replace(/\/+$/, "") 229 } 230 return m 231 }, this) 224 all = all.map(this._mark, this) 232 225 } 233 226 … … 246 239 function alphasort (a, b) { 247 240 return a > b ? 1 : a < b ? -1 : 0 241 } 242 243 Glob.prototype._mark = function (p) { 244 var c = this.cache[p] 245 var m = p 246 if (c) { 247 var isDir = c === 2 || Array.isArray(c) 248 var slash = p.slice(-1) === '/' 249 250 if (isDir && !slash) 251 m += '/' 252 else if (!isDir && slash) 253 m = m.slice(0, -1) 254 255 if (m !== p) { 256 this.statCache[m] = this.statCache[p] 257 this.cache[m] = this.cache[p] 258 } 259 } 260 261 return m 248 262 } 249 263 … … 272 286 273 287 Glob.prototype.emitMatch = function (m) { 274 if (!this.stat || this.statCache[m] || m === this.EOF) { 275 this._emitQueue.push(m) 276 this._processEmitQueue() 277 } else { 278 this._stat(m, function(exists, isDir) { 279 if (exists) { 280 this._emitQueue.push(m) 281 this._processEmitQueue() 282 } 283 }) 284 } 288 this.log('emitMatch', m) 289 this._emitQueue.push(m) 290 this._processEmitQueue() 285 291 } 286 292 287 293 Glob.prototype._processEmitQueue = function (m) { 294 this.log("pEQ paused=%j processing=%j m=%j", this.paused, 295 this._processingEmitQueue, m) 296 var done = false 288 297 while (!this._processingEmitQueue && 289 298 !this.paused) { 290 299 this._processingEmitQueue = true 291 300 var m = this._emitQueue.shift() 301 this.log(">processEmitQueue", m === this.EOF ? ":EOF:" : m) 292 302 if (!m) { 303 this.log(">processEmitQueue, falsey m") 293 304 this._processingEmitQueue = false 294 305 break 295 306 } 296 307 297 this.log('emit!', m === this.EOF ? "end" : "match") 298 299 this.emit(m === this.EOF ? "end" : "match", m) 300 this._processingEmitQueue = false 301 } 308 if (m === this.EOF || !(this.mark && !this.stat)) { 309 this.log("peq: unmarked, or eof") 310 next.call(this, 0, false) 311 } else if (this.statCache[m]) { 312 var sc = this.statCache[m] 313 var exists 314 if (sc) 315 exists = sc.isDirectory() ? 2 : 1 316 this.log("peq: stat cached") 317 next.call(this, exists, exists === 2) 318 } else { 319 this.log("peq: _stat, then next") 320 this._stat(m, next) 321 } 322 323 function next(exists, isDir) { 324 this.log("next", m, exists, isDir) 325 var ev = m === this.EOF ? "end" : "match" 326 327 // "end" can only happen once. 328 assert(!this._endEmitted) 329 if (ev === "end") 330 this._endEmitted = true 331 332 if (exists) { 333 // Doesn't mean it necessarily doesn't exist, it's possible 334 // we just didn't check because we don't care that much, or 335 // this is EOF anyway. 336 if (isDir && !m.match(/\/$/)) { 337 m = m + "/" 338 } else if (!isDir && m.match(/\/$/)) { 339 m = m.replace(/\/+$/, "") 340 } 341 } 342 this.log("emit", ev, m) 343 this.emit(ev, m) 344 this._processingEmitQueue = false 345 if (done && m !== this.EOF && !this.paused) 346 this._processEmitQueue() 347 } 348 } 349 done = true 302 350 } 303 351 -
Dev/trunk/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob/package.json
r484 r516 7 7 "name": "glob", 8 8 "description": "a little globber", 9 "version": "3.2. 7",9 "version": "3.2.9", 10 10 "repository": { 11 11 "type": "git", … … 26 26 }, 27 27 "scripts": { 28 "test": "tap test/*.js" 28 "test": "tap test/*.js", 29 "test-regen": "TEST_REGEN=1 node test/00-setup.js" 29 30 }, 30 31 "license": "BSD", … … 35 36 }, 36 37 "homepage": "https://github.com/isaacs/node-glob", 37 "_id": "glob@3.2.7", 38 "dist": { 39 "shasum": "cd490a505ff7f2aef7a29ce0e4ce83d995ddbfc6" 40 }, 41 "_from": "glob@>= 3.1.4", 42 "_resolved": "https://registry.npmjs.org/glob/-/glob-3.2.7.tgz" 38 "_id": "glob@3.2.9", 39 "_from": "glob@>= 3.1.4" 43 40 } -
Dev/trunk/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob/test/bash-results.json
r484 r516 299 299 "./test/nocase-nomagic.js", 300 300 "./test/pause-resume.js", 301 "./test/readme-issue.js", 301 302 "./test/root-nomount.js", 302 303 "./test/root.js", -
Dev/trunk/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/node_modules/glob/test/mark.js
r484 r516 2 2 var glob = require('../') 3 3 process.chdir(__dirname) 4 5 // expose timing issues 6 var lag = 5 7 glob.Glob.prototype._stat = function(o) { return function(f, cb) { 8 var args = arguments 9 setTimeout(function() { 10 o.call(this, f, cb) 11 }.bind(this), lag += 5) 12 }}(glob.Glob.prototype._stat) 13 14 15 test("mark, with **", function (t) { 16 glob("a/*b*/**", {mark: true}, function (er, results) { 17 if (er) 18 throw er 19 var expect = 20 [ 'a/abcdef/', 21 'a/abcdef/g/', 22 'a/abcdef/g/h', 23 'a/abcfed/', 24 'a/abcfed/g/', 25 'a/abcfed/g/h', 26 'a/b/', 27 'a/b/c/', 28 'a/b/c/d', 29 'a/bc/', 30 'a/bc/e/', 31 'a/bc/e/f', 32 'a/cb/', 33 'a/cb/e/', 34 'a/cb/e/f' ] 35 36 t.same(results, expect) 37 t.end() 38 }) 39 }) 4 40 5 41 test("mark, no / on pattern", function (t) { … … 19 55 t.same(results, expect) 20 56 t.end() 57 }).on('match', function(m) { 58 t.similar(m, /\/$/) 21 59 }) 22 60 }) … … 37 75 t.same(results, expect) 38 76 t.end() 77 }).on('match', function(m) { 78 t.similar(m, /[^\/]$/) 39 79 }) 40 80 }) … … 54 94 t.same(results, expect) 55 95 t.end() 96 }).on('match', function(m) { 97 t.similar(m, /\/$/) 56 98 }) 57 99 }) … … 71 113 t.same(results, expect) 72 114 t.end() 115 }).on('match', function(m) { 116 t.similar(m, /\/$/) 73 117 }) 74 118 }) -
Dev/trunk/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/cli/package.json
r484 r516 50 50 "readmeFilename": "README.md", 51 51 "_id": "cli@0.4.5", 52 "dist": { 53 "shasum": "e4be7ec0a35b5ce30039b58f9382fc4f4b881810" 54 }, 55 "_from": "cli@0.4.x", 56 "_resolved": "https://registry.npmjs.org/cli/-/cli-0.4.5.tgz" 52 "_from": "cli@0.4.x" 57 53 } -
Dev/trunk/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/minimatch/README.md
r484 r516 20 20 minimatch("bar.foo", "*.foo") // true! 21 21 minimatch("bar.foo", "*.bar") // false! 22 minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! 22 23 ``` 23 24 … … 36 37 * `man 3 fnmatch` 37 38 * `man 5 gitignore` 38 39 ### Comparisons to other fnmatch/glob implementations40 41 While strict compliance with the existing standards is a worthwhile42 goal, some discrepancies exist between minimatch and other43 implementations, and are intentional.44 45 If the pattern starts with a `!` character, then it is negated. Set the46 `nonegate` flag to suppress this behavior, and treat leading `!`47 characters normally. This is perhaps relevant if you wish to start the48 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`49 characters at the start of a pattern will negate the pattern multiple50 times.51 52 If a pattern starts with `#`, then it is treated as a comment, and53 will not match anything. Use `\#` to match a literal `#` at the54 start of a line, or set the `nocomment` flag to suppress this behavior.55 56 The double-star character `**` is supported by default, unless the57 `noglobstar` flag is set. This is supported in the manner of bsdglob58 and bash 4.1, where `**` only has special significance if it is the only59 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but60 `a/**b` will not. **Note that this is different from the way that `**` is61 handled by ruby's `Dir` class.**62 63 If an escaped pattern has no matches, and the `nonull` flag is set,64 then minimatch.match returns the pattern as-provided, rather than65 interpreting the character escapes. For example,66 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than67 `"*a?"`. This is akin to setting the `nullglob` option in bash, except68 that it does not resolve escaped pattern characters.69 70 If brace expansion is not disabled, then it is performed before any71 other interpretation of the glob pattern. Thus, a pattern like72 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded73 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are74 checked for validity. Since those two are valid, matching proceeds.75 76 39 77 40 ## Minimatch Class … … 217 180 Returns from negate expressions the same as if they were not negated. 218 181 (Ie, true on a hit, false on a miss.) 182 183 184 ## Comparisons to other fnmatch/glob implementations 185 186 While strict compliance with the existing standards is a worthwhile 187 goal, some discrepancies exist between minimatch and other 188 implementations, and are intentional. 189 190 If the pattern starts with a `!` character, then it is negated. Set the 191 `nonegate` flag to suppress this behavior, and treat leading `!` 192 characters normally. This is perhaps relevant if you wish to start the 193 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` 194 characters at the start of a pattern will negate the pattern multiple 195 times. 196 197 If a pattern starts with `#`, then it is treated as a comment, and 198 will not match anything. Use `\#` to match a literal `#` at the 199 start of a line, or set the `nocomment` flag to suppress this behavior. 200 201 The double-star character `**` is supported by default, unless the 202 `noglobstar` flag is set. This is supported in the manner of bsdglob 203 and bash 4.1, where `**` only has special significance if it is the only 204 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but 205 `a/**b` will not. 206 207 If an escaped pattern has no matches, and the `nonull` flag is set, 208 then minimatch.match returns the pattern as-provided, rather than 209 interpreting the character escapes. For example, 210 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than 211 `"*a?"`. This is akin to setting the `nullglob` option in bash, except 212 that it does not resolve escaped pattern characters. 213 214 If brace expansion is not disabled, then it is performed before any 215 other interpretation of the glob pattern. Thus, a pattern like 216 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded 217 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are 218 checked for validity. Since those two are valid, matching proceeds. -
Dev/trunk/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/minimatch/minimatch.js
r484 r516 69 69 var slashSplit = /\/+/ 70 70 71 minimatch.monkeyPatch = monkeyPatch72 function monkeyPatch () {73 var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")74 var orig = desc.value75 desc.value = function (p) {76 if (p instanceof Minimatch) return p.match(this)77 return orig.call(this, p)78 }79 Object.defineProperty(String.prototype, desc)80 }81 82 71 minimatch.filter = filter 83 72 function filter (pattern, options) { … … 179 168 } 180 169 170 Minimatch.prototype.debug = function() {} 171 181 172 Minimatch.prototype.make = make 182 173 function make () { … … 203 194 var set = this.globSet = this.braceExpand() 204 195 205 if (options.debug) console.error(this.pattern, set) 196 if (options.debug) this.debug = console.error 197 198 this.debug(this.pattern, set) 206 199 207 200 // step 3: now we have a set, so turn each one into a series of path-portion … … 214 207 }) 215 208 216 if (options.debug) console.error(this.pattern, set)209 this.debug(this.pattern, set) 217 210 218 211 // glob --> regexps … … 221 214 }, this) 222 215 223 if (options.debug) console.error(this.pattern, set)216 this.debug(this.pattern, set) 224 217 225 218 // filter out everything that didn't compile properly. … … 228 221 }) 229 222 230 if (options.debug) console.error(this.pattern, set)223 this.debug(this.pattern, set) 231 224 232 225 this.set = set … … 303 296 // and then prepend it to everything we find. 304 297 if (pattern.charAt(0) !== "{") { 305 // console.error(pattern)298 this.debug(pattern) 306 299 var prefix = null 307 300 for (var i = 0, l = pattern.length; i < l; i ++) { 308 301 var c = pattern.charAt(i) 309 // console.error(i, c)302 this.debug(i, c) 310 303 if (c === "\\") { 311 304 escaping = !escaping … … 318 311 // actually no sets, all { were escaped. 319 312 if (prefix === null) { 320 // console.error("no sets")313 this.debug("no sets") 321 314 return [pattern] 322 315 } 323 316 324 var tail = braceExpand(pattern.substr(i), options)317 var tail = braceExpand.call(this, pattern.substr(i), options) 325 318 return tail.map(function (t) { 326 319 return prefix + t … … 337 330 var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) 338 331 if (numset) { 339 // console.error("numset", numset[1], numset[2])340 var suf = braceExpand (pattern.substr(numset[0].length), options)332 this.debug("numset", numset[1], numset[2]) 333 var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) 341 334 , start = +numset[1] 342 335 , end = +numset[2] … … 370 363 } 371 364 372 // console.error("Entering for")365 this.debug("Entering for") 373 366 FOR: for (i = 1, l = pattern.length; i < l; i ++) { 374 367 var c = pattern.charAt(i) 375 // console.error("", i, c)368 this.debug("", i, c) 376 369 377 370 if (escaping) { … … 421 414 // and need to escape the leading brace 422 415 if (depth !== 0) { 423 // console.error("didn't close", pattern)424 return braceExpand ("\\" + pattern, options)416 this.debug("didn't close", pattern) 417 return braceExpand.call(this, "\\" + pattern, options) 425 418 } 426 419 427 420 // x{y,z} -> ["xy", "xz"] 428 // console.error("set", set)429 // console.error("suffix", pattern.substr(i))430 var suf = braceExpand (pattern.substr(i), options)421 this.debug("set", set) 422 this.debug("suffix", pattern.substr(i)) 423 var suf = braceExpand.call(this, pattern.substr(i), options) 431 424 // ["b", "c{d,e}","{f,g}h"] -> 432 425 // [["b"], ["cd", "ce"], ["fh", "gh"]] 433 426 var addBraces = set.length === 1 434 // console.error("set pre-expanded", set)427 this.debug("set pre-expanded", set) 435 428 set = set.map(function (p) { 436 return braceExpand (p, options)437 } )438 // console.error("set expanded", set)429 return braceExpand.call(this, p, options) 430 }, this) 431 this.debug("set expanded", set) 439 432 440 433 … … 497 490 : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" 498 491 : "(?!\\.)" 492 , self = this 499 493 500 494 function clearStateChar () { … … 515 509 break 516 510 } 511 self.debug('clearStateChar %j %j', stateChar, re) 517 512 stateChar = false 518 513 } … … 523 518 ; i ++ ) { 524 519 525 if (options.debug) { 526 console.error("%s\t%s %s %j", pattern, i, re, c) 527 } 520 this.debug("%s\t%s %s %j", pattern, i, re, c) 528 521 529 522 // skip over any that are escaped. … … 552 545 case "@": 553 546 case "!": 554 if (options.debug) { 555 console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 556 } 547 this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 557 548 558 549 // all of those are literals inside a class, except that 559 550 // the glob [!a] means [^a] in regexp 560 551 if (inClass) { 552 this.debug(' in class') 561 553 if (c === "!" && i === classStart + 1) c = "^" 562 554 re += c … … 567 559 // that there was something like ** or +? in there. 568 560 // Handle the stateChar, then proceed with this one. 561 self.debug('call clearStateChar %j', stateChar) 569 562 clearStateChar() 570 563 stateChar = c … … 592 585 // negation is (?:(?!js)[^/]*) 593 586 re += stateChar === "!" ? "(?:(?!" : "(?:" 587 this.debug('plType %j %j', stateChar, re) 594 588 stateChar = false 595 589 continue … … 601 595 } 602 596 597 clearStateChar() 603 598 hasMagic = true 604 599 re += ")" … … 624 619 } 625 620 621 clearStateChar() 626 622 re += "|" 627 623 continue … … 716 712 }) 717 713 718 // console.error("tail=%j\n %s", tail, tail)714 this.debug("tail=%j\n %s", tail, tail) 719 715 var t = pl.type === "*" ? star 720 716 : pl.type === "?" ? qmark … … 830 826 Minimatch.prototype.match = match 831 827 function match (f, partial) { 832 // console.error("match", f, this.pattern)828 this.debug("match", f, this.pattern) 833 829 // short-circuit in the case of busted things. 834 830 // comments, etc. … … 848 844 // treat the test path as a set of pathparts. 849 845 f = f.split(slashSplit) 850 if (options.debug) { 851 console.error(this.pattern, "split", f) 852 } 846 this.debug(this.pattern, "split", f) 853 847 854 848 // just ONE of the pattern sets in this.set needs to match … … 858 852 859 853 var set = this.set 860 // console.error(this.pattern, "set", set) 854 this.debug(this.pattern, "set", set) 855 856 var splitFile = path.basename(f.join("/")).split("/") 861 857 862 858 for (var i = 0, l = set.length; i < l; i ++) { 863 var pattern = set[i] 864 var hit = this.matchOne(f, pattern, partial) 859 var pattern = set[i], file = f 860 if (options.matchBase && pattern.length === 1) { 861 file = splitFile 862 } 863 var hit = this.matchOne(file, pattern, partial) 865 864 if (hit) { 866 865 if (options.flipNegate) return true … … 883 882 var options = this.options 884 883 885 if (options.debug) { 886 console.error("matchOne", 887 { "this": this 888 , file: file 889 , pattern: pattern }) 890 } 891 892 if (options.matchBase && pattern.length === 1) { 893 file = path.basename(file.join("/")).split("/") 894 } 895 896 if (options.debug) { 897 console.error("matchOne", file.length, pattern.length) 898 } 884 this.debug("matchOne", 885 { "this": this 886 , file: file 887 , pattern: pattern }) 888 889 this.debug("matchOne", file.length, pattern.length) 899 890 900 891 for ( var fi = 0 … … 905 896 ; fi ++, pi ++ ) { 906 897 907 if (options.debug) { 908 console.error("matchOne loop") 909 } 898 this.debug("matchOne loop") 910 899 var p = pattern[pi] 911 900 , f = file[fi] 912 901 913 if (options.debug) { 914 console.error(pattern, p, f) 915 } 902 this.debug(pattern, p, f) 916 903 917 904 // should be impossible. … … 920 907 921 908 if (p === GLOBSTAR) { 922 if (options.debug) 923 console.error('GLOBSTAR', [pattern, p, f]) 909 this.debug('GLOBSTAR', [pattern, p, f]) 924 910 925 911 // "**" … … 948 934 , pr = pi + 1 949 935 if (pr === pl) { 950 if (options.debug) 951 console.error('** at the end') 936 this.debug('** at the end') 952 937 // a ** at the end will just swallow the rest. 953 938 // We have found a match. … … 967 952 var swallowee = file[fr] 968 953 969 if (options.debug) { 970 console.error('\nglobstar while', 971 file, fr, pattern, pr, swallowee) 972 } 954 this.debug('\nglobstar while', 955 file, fr, pattern, pr, swallowee) 973 956 974 957 // XXX remove this slice. Just pass the start index. 975 958 if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { 976 if (options.debug) 977 console.error('globstar found match!', fr, fl, swallowee) 959 this.debug('globstar found match!', fr, fl, swallowee) 978 960 // found a match. 979 961 return true … … 983 965 if (swallowee === "." || swallowee === ".." || 984 966 (!options.dot && swallowee.charAt(0) === ".")) { 985 if (options.debug) 986 console.error("dot detected!", file, fr, pattern, pr) 967 this.debug("dot detected!", file, fr, pattern, pr) 987 968 break WHILE 988 969 } 989 970 990 971 // ** swallows a segment, and continue. 991 if (options.debug) 992 console.error('globstar swallow a segment, and continue') 972 this.debug('globstar swallow a segment, and continue') 993 973 fr ++ 994 974 } … … 999 979 if (partial) { 1000 980 // ran out of file 1001 // console.error("\n>>> no match, partial?", file, fr, pattern, pr)981 this.debug("\n>>> no match, partial?", file, fr, pattern, pr) 1002 982 if (fr === fl) return true 1003 983 } … … 1015 995 hit = f === p 1016 996 } 1017 if (options.debug) { 1018 console.error("string match", p, f, hit) 1019 } 997 this.debug("string match", p, f, hit) 1020 998 } else { 1021 999 hit = f.match(p) 1022 if (options.debug) { 1023 console.error("pattern match", p, f, hit) 1024 } 1000 this.debug("pattern match", p, f, hit) 1025 1001 } 1026 1002 -
Dev/trunk/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/package.json
r484 r516 30 30 "homepage": "https://github.com/isaacs/node-lru-cache", 31 31 "_id": "lru-cache@2.5.0", 32 "dist": { 33 "shasum": "be07d09e5b05f10b83d0cf01d4891a7729288c69" 34 }, 35 "_from": "lru-cache@2", 36 "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz" 32 "_from": "lru-cache@2" 37 33 } -
Dev/trunk/node_modules/grunt-contrib-jshint/node_modules/jshint/node_modules/minimatch/package.json
r484 r516 7 7 "name": "minimatch", 8 8 "description": "a glob matcher in javascript", 9 "version": "0.2.1 2",9 "version": "0.2.14", 10 10 "repository": { 11 11 "type": "git", … … 14 14 "main": "minimatch.js", 15 15 "scripts": { 16 "test": "tap test "16 "test": "tap test/*.js" 17 17 }, 18 18 "engines": { … … 30 30 "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" 31 31 }, 32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n ```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", 33 33 "readmeFilename": "README.md", 34 34 "bugs": { … … 36 36 }, 37 37 "homepage": "https://github.com/isaacs/minimatch", 38 "_id": "minimatch@0.2.1 2",39 "_from": "minimatch@ 0.x.x"38 "_id": "minimatch@0.2.14", 39 "_from": "minimatch@~0.2.12" 40 40 } -
Dev/trunk/node_modules/grunt-contrib-jshint/node_modules/jshint/package.json
r484 r516 67 67 "readmeFilename": "README.md", 68 68 "_id": "jshint@2.1.11", 69 "dist": { 70 "shasum": "489758eda8a6b0059179f2314afa39d34a5bc333" 71 }, 72 "_from": "jshint@~2.1.10", 73 "_resolved": "https://registry.npmjs.org/jshint/-/jshint-2.1.11.tgz" 69 "_from": "jshint@~2.1.10" 74 70 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/grunt-lib-contrib/package.json
r484 r516 36 36 "zlib-browserify": "0.0.1" 37 37 }, 38 "readme": "# grunt-lib-contrib [](http://travis-ci.org/gruntjs/grunt-lib-contrib)\n\n> Common functionality shared across grunt-contrib tasks.\n\nThe purpose of grunt-lib-contrib is to explore solutions to common problems task writers encounter, and to ease the upgrade path for contrib tasks.\n\n**These APIs should be considered highly unstable. Depend on them at your own risk!**\n\n_Over time, some of the functionality provided here may be incorporated directly into grunt for mainstream use. Until then, you may require `grunt-lib-contrib` as a dependency in your projects, but be very careful to specify an exact version number instead of a range, as backwards-incompatible changes are likely to be introduced._\n\n### Helper Functions\n\n#### getNamespaceDeclaration(ns)\n\nThis helper is used to build JS namespace declarations.\n\n#### optsToArgs(options)\n\nConvert an object to an array of CLI arguments, which can be used with `child_process.spawn()`.\n\n```js\n// Example\n{\n fooBar: 'a', // ['--foo-bar', 'a']\n fooBar: 1, // ['--foo-bar', '1']\n fooBar: true, // ['--foo-bar']\n fooBar: false, //\n fooBar: ['a', 'b'] // ['--foo-bar', 'a', '--foo-bar', 'b']\n}\n```\n\n#### stripPath(pth, strip)\n\nStrip a path from a path. normalize both paths for best results.\n\n#### minMaxInfo(min, max, report)\n\nHelper for logging compressed, uncompressed and gzipped sizes of strings.\n\n#### report\nChoices: `false`, `'min'`, `'gzip'`\nDefault: `false`\n\nEither do not report anything, report only minification result, or report minification and gzip results.\n\n**Important** Including `'gzip'` results can make this task 5-10x slower depending on the size of the file.\n\n\n```js\nvar max = grunt.file.read('max.js');\nvar min = minify(max);\nminMaxInfo(min, max, 'gzip');\n```\n\nWould print:\n\n```\nOriginal: 495 bytes.\nMinified: 396 bytes.\nGzipped: 36 bytes.\n```\n\n--\n\n*Lib submitted by [Tyler Kellen](https://goingslowly.com/).*", 39 "readmeFilename": "README.md", 38 40 "contributors": [ 39 41 { … … 54 56 } 55 57 ], 56 "readme": "# grunt-lib-contrib [](http://travis-ci.org/gruntjs/grunt-lib-contrib)\n\n> Common functionality shared across grunt-contrib tasks.\n\nThe purpose of grunt-lib-contrib is to explore solutions to common problems task writers encounter, and to ease the upgrade path for contrib tasks.\n\n**These APIs should be considered highly unstable. Depend on them at your own risk!**\n\n_Over time, some of the functionality provided here may be incorporated directly into grunt for mainstream use. Until then, you may require `grunt-lib-contrib` as a dependency in your projects, but be very careful to specify an exact version number instead of a range, as backwards-incompatible changes are likely to be introduced._\n\n### Helper Functions\n\n#### getNamespaceDeclaration(ns)\n\nThis helper is used to build JS namespace declarations.\n\n#### optsToArgs(options)\n\nConvert an object to an array of CLI arguments, which can be used with `child_process.spawn()`.\n\n```js\n// Example\n{\n fooBar: 'a', // ['--foo-bar', 'a']\n fooBar: 1, // ['--foo-bar', '1']\n fooBar: true, // ['--foo-bar']\n fooBar: false, //\n fooBar: ['a', 'b'] // ['--foo-bar', 'a', '--foo-bar', 'b']\n}\n```\n\n#### stripPath(pth, strip)\n\nStrip a path from a path. normalize both paths for best results.\n\n#### minMaxInfo(min, max, report)\n\nHelper for logging compressed, uncompressed and gzipped sizes of strings.\n\n#### report\nChoices: `false`, `'min'`, `'gzip'`\nDefault: `false`\n\nEither do not report anything, report only minification result, or report minification and gzip results.\n\n**Important** Including `'gzip'` results can make this task 5-10x slower depending on the size of the file.\n\n\n```js\nvar max = grunt.file.read('max.js');\nvar min = minify(max);\nminMaxInfo(min, max, 'gzip');\n```\n\nWould print:\n\n```\nOriginal: 495 bytes.\nMinified: 396 bytes.\nGzipped: 36 bytes.\n```\n\n--\n\n*Lib submitted by [Tyler Kellen](https://goingslowly.com/).*",57 "readmeFilename": "README.md",58 58 "_id": "grunt-lib-contrib@0.6.1", 59 59 "_from": "grunt-lib-contrib@~0.6.1" -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/mime/package.json
r484 r516 33 33 "homepage": "https://github.com/broofa/node-mime", 34 34 "_id": "mime@1.2.11", 35 "_from": "mime@1.2.x" 35 "_from": "mime@1.2.x", 36 "scripts": {} 36 37 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/mkdirp/package.json
r484 r516 31 31 "homepage": "https://github.com/substack/node-mkdirp", 32 32 "_id": "mkdirp@0.3.5", 33 "dist": { 34 "shasum": "7d4fee48c751e68eddf5903038ad25370cd80618" 35 }, 36 "_from": "mkdirp@~0.3.4", 37 "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz" 33 "_from": "mkdirp@~0.3.4" 38 34 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/.npmignore
r484 r516 1 tests 1 2 node_modules -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/README.md
r484 r516 24 24 ``` 25 25 26 You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types , in this case `application/json`, and use the proper content-type in the PUT request if one is not already provided in the headers.26 You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers donât already provide one). 27 27 28 28 ```javascript … … 30 30 ``` 31 31 32 Request can also pipe to itself. When doing so the content-type and content-length will be preserved in the PUT headers.32 Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers. 33 33 34 34 ```javascript … … 36 36 ``` 37 37 38 Now let 's get fancy.38 Now letâs get fancy. 39 39 40 40 ```javascript … … 50 50 ``` 51 51 52 You can also pipe() from a http.ServerRequest instance and to a http.ServerResponse instance. The HTTP method and headers will be sent as well as the entity-body data. Which means that, if you don't really care about security, you can do:52 You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do: 53 53 54 54 ```javascript … … 62 62 ``` 63 63 64 And since pipe() returns the destination stream in node 0.5.x you can do one line proxying:)64 And since `pipe()` returns the destination stream in ⥠Node 0.5.x you can do one line proxying. :) 65 65 66 66 ```javascript … … 79 79 }) 80 80 ``` 81 81 82 You can still use intermediate proxies, the requests will still follow HTTP forwards, etc. 82 83 84 ## UNIX Socket 85 86 `request` supports the `unix://` protocol for all requests. The path is assumed to be absolute to the root of the host file system. 87 88 HTTP paths are extracted from the supplied URL by testing each level of the full URL against net.connect for a socket response. 89 90 Thus the following request will GET `/httppath` from the HTTP server listening on `/tmp/unix.socket` 91 92 ```javascript 93 request.get('unix://tmp/unix.socket/httppath') 94 ``` 95 83 96 ## Forms 84 97 85 98 `request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API. 86 99 87 U rl encoded forms are simple100 URL-encoded forms are simple. 88 101 89 102 ```javascript … … 93 106 ``` 94 107 95 For `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don 't need to worry about piping the form object or setting the headers, `request` will handle that for you.108 For `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You donât need to worry about piping the form object or setting the headers, `request` will handle that for you. 96 109 97 110 ```javascript … … 120 133 If passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`. 121 134 122 `sendImmediately` defaults to true, which will cause a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a 401response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).123 124 Digest authentication is supported, but it only works with `sendImmediately` set to `false` (otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail).135 `sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method). 136 137 Digest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail. 125 138 126 139 ## OAuth Signing … … 158 171 , token_secret: perm_token.oauth_token_secret 159 172 } 160 , url = 'https://api.twitter.com/1 /users/show.json?'173 , url = 'https://api.twitter.com/1.1/users/show.json?' 161 174 , params = 162 175 { screen_name: perm_token.screen_name … … 172 185 ``` 173 186 174 187 ### Custom HTTP Headers 188 189 HTTP Headers, such as `User-Agent`, can be set in the `options` object. 190 In the example below, we call the github API to find out the number 191 of stars and forks for the request repository. This requires a 192 custom `User-Agent` header as well as https. 193 194 ```javascript 195 var request = require('request'); 196 197 var options = { 198 url: 'https://api.github.com/repos/mikeal/request', 199 headers: { 200 'User-Agent': 'request' 201 } 202 }; 203 204 function callback(error, response, body) { 205 if (!error && response.statusCode == 200) { 206 var info = JSON.parse(body); 207 console.log(info.stargazers_count + " Stars"); 208 console.log(info.forks_count + " Forks"); 209 } 210 } 211 212 request(options, callback); 213 ``` 175 214 176 215 ### request(options, callback) 177 216 178 The first argument can be either a url or an options object. The only required option is uri,all others are optional.179 180 * `uri` || `url` - fully qualified uri or a parsed url object from url.parse()181 * `qs` - object containing querystring values to be appended to the uri182 * `method` - http method , defaults to GET183 * `headers` - http headers , defaults to {}184 * `body` - entity body for PATCH, POST and PUT requests. Must be buffer or string.185 * `form` - when passed an object this will set `body` but to a querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no option a FormData instance is returned that will be piped to request.217 The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional. 218 219 * `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()` 220 * `qs` - object containing querystring values to be appended to the `uri` 221 * `method` - http method (default: `"GET"`) 222 * `headers` - http headers (default: `{}`) 223 * `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`. 224 * `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request). 186 225 * `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above. 187 * `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as json.226 * `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. 188 227 * `multipart` - (experimental) array of objects which contains their own headers and `body` attribute. Sends `multipart/related` request. See example below. 189 * `followRedirect` - follow HTTP 3xx responses as redirects . defaults to true.190 * `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects . defaults to false.191 * `maxRedirects` - the maximum number of redirects to follow , defaults to 10.192 * `encoding` - Encoding to be used on `setEncoding` of response data. If set to `null`, the body is returned as a Buffer.193 * `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.228 * `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`) 229 * `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`) 230 * `maxRedirects` - the maximum number of redirects to follow (default: `10`) 231 * `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. 232 * `pool` - A hash object containing the agents for these requests. If omitted, the request will use the global pool (which is set to node's default `maxSockets`) 194 233 * `pool.maxSockets` - Integer containing the maximum amount of sockets in the pool. 195 234 * `timeout` - Integer containing the number of milliseconds to wait for a request to respond before aborting the request 196 * `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.197 * `oauth` - Options for OAuth HMAC-SHA1 signing , see documentation above.235 * `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`) 236 * `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above. 198 237 * `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). 199 * `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 caas an option.200 * `jar` - Set to `true` if you want cookies to be remembered for future use, or define your custom cookie jar (see examples section)201 * `aws` - object containing aws signing information, should have the properties `key` and `secret` as well as `bucket` unless you're specifying your bucket as part of the path, or you are making a request that doesn't use a bucket (i.e. GET Services)238 * `strictSSL` - If `true`, requires 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. 239 * `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section) 240 * `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless youâre specifying your `bucket` as part of the path, or the request doesnât use a bucket (i.e. GET Services) 202 241 * `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. 203 242 * `localAddress` - Local interface to bind for network connections. 204 243 205 244 206 The callback argument gets 3 arguments. The first is an error when applicable (usually from the http.Client option not the http.ClientRequest object). The second is an http.ClientResponse object. The third is the response body String or Buffer. 245 The callback argument gets 3 arguments: 246 247 1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object) 248 2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object 249 3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied) 207 250 208 251 ## Convenience methods … … 216 259 ### request.put 217 260 218 Same as request()but defaults to `method: "PUT"`.261 Same as `request()`, but defaults to `method: "PUT"`. 219 262 220 263 ```javascript … … 224 267 ### request.patch 225 268 226 Same as request()but defaults to `method: "PATCH"`.269 Same as `request()`, but defaults to `method: "PATCH"`. 227 270 228 271 ```javascript … … 232 275 ### request.post 233 276 234 Same as request()but defaults to `method: "POST"`.277 Same as `request()`, but defaults to `method: "POST"`. 235 278 236 279 ```javascript … … 248 291 ### request.del 249 292 250 Same as request()but defaults to `method: "DELETE"`.293 Same as `request()`, but defaults to `method: "DELETE"`. 251 294 252 295 ```javascript … … 256 299 ### request.get 257 300 258 Alias to normal request method for uniformity.301 Same as `request()` (for uniformity). 259 302 260 303 ```javascript … … 303 346 ) 304 347 ``` 305 Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies set jar to true (either in defaults or in the options sent). 348 349 Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). 306 350 307 351 ```javascript … … 312 356 ``` 313 357 314 If you to use a custom cookie jar (instead of letting request use its own global cookie jar) you do so by setting the jar default or by specifying it as an option: 358 To use a custom cookie jar (instead `request`âs global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) 315 359 316 360 ```javascript … … 321 365 }) 322 366 ``` 367 323 368 OR 324 369 … … 326 371 var j = request.jar() 327 372 var cookie = request.cookie('your_cookie_here') 328 j. add(cookie)373 j.setCookie(cookie, uri); 329 374 request({url: 'http://www.google.com', jar: j}, function () { 330 375 request('http://images.google.com') -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/index.js
r484 r516 13 13 // limitations under the License. 14 14 15 var Cookie = require('cookie-jar') 16 , CookieJar = Cookie.Jar 17 , cookieJar = new CookieJar 18 15 var cookies = require('./lib/cookies') 19 16 , copy = require('./lib/copy') 20 17 , Request = require('./request') … … 93 90 } 94 91 92 function requester(params) { 93 if(typeof params.options._requester === 'function') { 94 return params.options._requester 95 } else { 96 return request 97 } 98 } 99 95 100 request.forever = function (agentOptions, optionsArg) { 96 101 var options = {} 97 102 if (optionsArg) { 98 for ( option in optionsArg) {103 for (var option in optionsArg) { 99 104 options[option] = optionsArg[option] 100 105 } … … 109 114 var params = initParams(uri, options, callback) 110 115 params.options.method = 'POST' 111 return request (params.uri || null, params.options, params.callback)116 return requester(params)(params.uri || null, params.options, params.callback) 112 117 } 113 118 request.put = function (uri, options, callback) { 114 119 var params = initParams(uri, options, callback) 115 120 params.options.method = 'PUT' 116 return request (params.uri || null, params.options, params.callback)121 return requester(params)(params.uri || null, params.options, params.callback) 117 122 } 118 123 request.patch = function (uri, options, callback) { 119 124 var params = initParams(uri, options, callback) 120 125 params.options.method = 'PATCH' 121 return request (params.uri || null, params.options, params.callback)126 return requester(params)(params.uri || null, params.options, params.callback) 122 127 } 123 128 request.head = function (uri, options, callback) { … … 130 135 throw new Error("HTTP HEAD requests MUST NOT include a request body.") 131 136 } 132 return request(params.uri || null, params.options, params.callback) 137 138 return requester(params)(params.uri || null, params.options, params.callback) 133 139 } 134 140 request.del = function (uri, options, callback) { 135 141 var params = initParams(uri, options, callback) 136 142 params.options.method = 'DELETE' 137 if(typeof params.options._requester === 'function') { 138 request = params.options._requester 139 } 140 return request(params.uri || null, params.options, params.callback) 143 return requester(params)(params.uri || null, params.options, params.callback) 141 144 } 142 145 request.jar = function () { 143 return new CookieJar146 return cookies.jar(); 144 147 } 145 148 request.cookie = function (str) { 146 if (str && str.uri) str = str.uri 147 if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param") 148 return new Cookie(str) 149 return cookies.parse(str); 149 150 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/lib/debug.js
r484 r516 1 var util = require('util') 2 1 3 module.exports = 2 4 function debug () { -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/forever-agent/index.js
r484 r516 25 25 26 26 // if an error happens while we don't use the socket anyway, meh, throw the socket away 27 function onIdleError() {27 var onIdleError = function() { 28 28 socket.destroy() 29 29 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/forever-agent/package.json
r484 r516 7 7 "name": "forever-agent", 8 8 "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.", 9 "version": "0.5. 0",9 "version": "0.5.2", 10 10 "repository": { 11 11 "url": "https://github.com/mikeal/forever-agent" … … 24 24 }, 25 25 "homepage": "https://github.com/mikeal/forever-agent", 26 "_id": "forever-agent@0.5.0", 27 "_from": "forever-agent@~0.5.0" 26 "_id": "forever-agent@0.5.2", 27 "_from": "forever-agent@~0.5.0", 28 "scripts": {} 28 29 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/form-data/node_modules/async/README.md
r484 r516 105 105 106 106 * [each](#each) 107 * [eachSeries](#eachSeries) 108 * [eachLimit](#eachLimit) 107 109 * [map](#map) 110 * [mapSeries](#mapSeries) 111 * [mapLimit](#mapLimit) 108 112 * [filter](#filter) 113 * [filterSeries](#filterSeries) 109 114 * [reject](#reject) 115 * [rejectSeries](#rejectSeries) 110 116 * [reduce](#reduce) 117 * [reduceRight](#reduceRight) 111 118 * [detect](#detect) 119 * [detectSeries](#detectSeries) 112 120 * [sortBy](#sortBy) 113 121 * [some](#some) 114 122 * [every](#every) 115 123 * [concat](#concat) 124 * [concatSeries](#concatSeries) 116 125 117 126 ### Control Flow … … 119 128 * [series](#series) 120 129 * [parallel](#parallel) 130 * [parallelLimit](#parallellimittasks-limit-callback) 121 131 * [whilst](#whilst) 122 132 * [doWhilst](#doWhilst) … … 127 137 * [compose](#compose) 128 138 * [applyEach](#applyEach) 139 * [applyEachSeries](#applyEachSeries) 129 140 * [queue](#queue) 130 141 * [cargo](#cargo) … … 296 307 297 308 ```js 298 async.map (['file1','file2','file3'], 1, fs.stat, function(err, results){309 async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){ 299 310 // results is now an array of stats for each file 300 311 }); … … 1063 1074 ```js 1064 1075 async.auto({ 1065 readData: async.apply(fs.readFile, 'data.txt', 'utf-8') ;1076 readData: async.apply(fs.readFile, 'data.txt', 'utf-8') 1066 1077 }, callback); 1067 1078 ``` -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
r484 r516 92 92 async.nextTick = process.nextTick; 93 93 if (typeof setImmediate !== 'undefined') { 94 async.setImmediate = setImmediate; 94 async.setImmediate = function (fn) { 95 // not a direct alias for IE10 compatibility 96 setImmediate(fn); 97 }; 95 98 } 96 99 else { -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/form-data/node_modules/async/package.json
r484 r516 6 6 "name": "Caolan McMahon" 7 7 }, 8 "version": "0.2. 9",8 "version": "0.2.10", 9 9 "repository": { 10 10 "type": "git", … … 36 36 "test": "nodeunit test/test-async.js" 37 37 }, 38 "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, eachâŠ) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfallâŠ). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about bind, not about async. If you are wondering how to\nmake async execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n```html\n<script type=\"text/javascript\" src=\"async.js\"></script>\n<script type=\"text/javascript\">\n\n async.map(data, asyncProcess, function(err, results){\n alert(results);\n });\n\n</script>\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [ map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n<a name=\"forEach\" />\n<a name=\"each\" />\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"forEachSeries\" />\n<a name=\"eachSeries\" />\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n<a name=\"forEachLimit\" />\n<a name=\"eachLimit\" />\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"map\" />\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"mapSeries\" />\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n<a name=\"mapLimit\" />\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"filter\" />\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n<a name=\"filterSeries\" />\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n<a name=\"reject\" />\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n<a name=\"rejectSeries\" />\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n<a name=\"reduce\" />\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n<a name=\"reduceRight\" />\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n<a name=\"detect\" />\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n<a name=\"detectSeries\" />\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n<a name=\"sortBy\" />\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n<a name=\"some\" />\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n<a name=\"every\" />\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n<a name=\"concat\" />\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n<a name=\"concatSeries\" />\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n<a name=\"series\" />\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n<a name=\"whilst\" />\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n<a name=\"doWhilst\" />\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n<a name=\"until\" />\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n<a name=\"doUntil\" />\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n<a name=\"forever\" />\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n<a name=\"waterfall\" />\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n<a name=\"compose\" />\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n<a name=\"applyEach\" />\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n<a name=\"applyEachSeries\" />\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n<a name=\"queue\" />\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n<a name=\"cargo\" />\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i<tasks.length; i++){\n console.log('hello ' + tasks[i].name);\n }\n callback();\n}, 2);\n\n\n// add some items\n\ncargo.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\ncargo.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\ncargo.push({name: 'baz'}, function (err) {\n console.log('finished processing baz');\n});\n```\n\n---------------------------------------\n\n<a name=\"auto\" />\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8');\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n<a name=\"iterator\" />\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n<a name=\"apply\" />\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n<a name=\"nextTick\" />\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n<a name=\"times\" />\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n<a name=\"timesSeries\" />\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n<a name=\"memoize\" />\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n<a name=\"unmemoize\" />\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n<a name=\"log\" />\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n<a name=\"dir\" />\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n<a name=\"noConflict\" />\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n",38 "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser. Also supports [component](https://github.com/component/component).\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, eachâŠ) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfallâŠ). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n```javascript\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n\nasync.parallel([\n function(){ ... },\n function(){ ... }\n], callback);\n\nasync.series([\n function(){ ... },\n function(){ ... }\n]);\n```\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n## Common Pitfalls\n\n### Binding a context to an iterator\n\nThis section is really about bind, not about async. If you are wondering how to\nmake async execute your iterators in a given context, or are confused as to why\na method of another library isn't working as an iterator, study this example:\n\n```js\n// Here is a simple object with an (unnecessarily roundabout) squaring method\nvar AsyncSquaringLibrary = {\n squareExponent: 2,\n square: function(number, callback){ \n var result = Math.pow(number, this.squareExponent);\n setTimeout(function(){\n callback(null, result);\n }, 200);\n }\n};\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){\n // result is [NaN, NaN, NaN]\n // This fails because the `this.squareExponent` expression in the square\n // function is not evaluated in the context of AsyncSquaringLibrary, and is\n // therefore undefined.\n});\n\nasync.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){\n // result is [1, 4, 9]\n // With the help of bind we can attach a context to the iterator before\n // passing it to async. Now the square function will be executed in its \n // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`\n // will be as expected.\n});\n```\n\n## Download\n\nThe source is available for download from\n[GitHub](http://github.com/caolan/async).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed\n\n## In the Browser\n\nSo far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n```html\n<script type=\"text/javascript\" src=\"async.js\"></script>\n<script type=\"text/javascript\">\n\n async.map(data, asyncProcess, function(err, results){\n alert(results);\n });\n\n</script>\n```\n\n## Documentation\n\n### Collections\n\n* [each](#each)\n* [eachSeries](#eachSeries)\n* [eachLimit](#eachLimit)\n* [map](#map)\n* [mapSeries](#mapSeries)\n* [mapLimit](#mapLimit)\n* [filter](#filter)\n* [filterSeries](#filterSeries)\n* [reject](#reject)\n* [rejectSeries](#rejectSeries)\n* [reduce](#reduce)\n* [reduceRight](#reduceRight)\n* [detect](#detect)\n* [detectSeries](#detectSeries)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n* [concatSeries](#concatSeries)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [parallelLimit](#parallellimittasks-limit-callback)\n* [whilst](#whilst)\n* [doWhilst](#doWhilst)\n* [until](#until)\n* [doUntil](#doUntil)\n* [forever](#forever)\n* [waterfall](#waterfall)\n* [compose](#compose)\n* [applyEach](#applyEach)\n* [applyEachSeries](#applyEachSeries)\n* [queue](#queue)\n* [cargo](#cargo)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n* [times](#times)\n* [timesSeries](#timesSeries)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n<a name=\"forEach\" />\n<a name=\"each\" />\n### each(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the each function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// assuming openFiles is an array of file names and saveFile is a function\n// to save the modified contents of that file:\n\nasync.each(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"forEachSeries\" />\n<a name=\"eachSeries\" />\n### eachSeries(arr, iterator, callback)\n\nThe same as each only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n<a name=\"forEachLimit\" />\n<a name=\"eachLimit\" />\n### eachLimit(arr, limit, iterator, callback)\n\nThe same as each only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err) which must be called once it has \n completed. If no error has occured, the callback should be run without \n arguments or with an explicit null argument.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n```js\n// Assume documents is an array of JSON objects and requestApi is a\n// function that interacts with a rate-limited REST api.\n\nasync.eachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n});\n```\n\n---------------------------------------\n\n<a name=\"map\" />\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"mapSeries\" />\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n<a name=\"mapLimit\" />\n### mapLimit(arr, limit, iterator, callback)\n\nThe same as map only no more than \"limit\" iterators will be simultaneously \nrunning at any time.\n\nNote that the items are not processed in batches, so there is no guarantee that\n the first \"limit\" iterator functions will complete before any others are \nstarted.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - The maximum number of iterators to run at any time.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, transformed) which must be called once \n it has completed with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n```js\nasync.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){\n // results is now an array of stats for each file\n});\n```\n\n---------------------------------------\n\n<a name=\"filter\" />\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n```js\nasync.filter(['file1','file2','file3'], fs.exists, function(results){\n // results now equals an array of the existing files\n});\n```\n\n---------------------------------------\n\n<a name=\"filterSeries\" />\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n<a name=\"reject\" />\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n<a name=\"rejectSeries\" />\n### rejectSeries(arr, iterator, callback)\n\nThe same as reject, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n<a name=\"reduce\" />\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then it's probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback(err, reduction) which accepts an optional error as its first \n argument, and the state of the reduction as the second. If an error is \n passed to the callback, the reduction is stopped and the main callback is \n immediately called with the error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n```js\nasync.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n}, function(err, result){\n // result is now equal to the last value of memo, which is 6\n});\n```\n\n---------------------------------------\n\n<a name=\"reduceRight\" />\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n<a name=\"detect\" />\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n```js\nasync.detect(['file1','file2','file3'], fs.exists, function(result){\n // result now equals the first file in the list that exists\n});\n```\n\n---------------------------------------\n\n<a name=\"detectSeries\" />\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n<a name=\"sortBy\" />\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, sortValue) which must be called once it\n has completed with an error (which can be null) and a value to use as the sort\n criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n```js\nasync.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n}, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n});\n```\n\n---------------------------------------\n\n<a name=\"some\" />\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n```js\nasync.some(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then at least one of the files exists\n});\n```\n\n---------------------------------------\n\n<a name=\"every\" />\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like fs.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback(truthValue) which must be called with a \n boolean argument once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n```js\nasync.every(['file1','file2','file3'], fs.exists, function(result){\n // if result is true then every file exists\n});\n```\n\n---------------------------------------\n\n<a name=\"concat\" />\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback(err, results) which must be called once it \n has completed with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n```js\nasync.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n});\n```\n\n---------------------------------------\n\n<a name=\"concatSeries\" />\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n<a name=\"series\" />\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n }\n],\n// optional callback\nfunction(err, results){\n // results is now equal to ['one', 'two']\n});\n\n\n// an example using an object instead of an array\nasync.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equal to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n__Example__\n\n```js\nasync.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n }\n],\n// optional callback\nfunction(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n});\n\n\n// an example using an object instead of an array\nasync.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n }\n},\nfunction(err, results) {\n // results is now equals to: {one: 1, two: 2}\n});\n```\n\n---------------------------------------\n\n<a name=\"parallel\" />\n### parallelLimit(tasks, limit, [callback])\n\nThe same as parallel only the tasks are executed in parallel with a maximum of \"limit\" \ntasks executing at any time.\n\nNote that the tasks are not executed in batches, so there is no guarantee that \nthe first \"limit\" tasks will complete before any others are started.\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed \n a callback(err, result) it must call on completion with an error (which can\n be null) and an optional result value.\n* limit - The maximum number of tasks to run at any time.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets a results array (or object) containing all \n the result arguments passed to the task callbacks.\n\n---------------------------------------\n\n<a name=\"whilst\" />\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback(err) which must be called once it has completed with an \n optional error argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n```js\nvar count = 0;\n\nasync.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n);\n```\n\n---------------------------------------\n\n<a name=\"doWhilst\" />\n### doWhilst(fn, test, callback)\n\nThe post check version of whilst. To reflect the difference in the order of operations `test` and `fn` arguments are switched. `doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript.\n\n---------------------------------------\n\n<a name=\"until\" />\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n---------------------------------------\n\n<a name=\"doUntil\" />\n### doUntil(fn, test, callback)\n\nLike doWhilst except the test is inverted. Note the argument ordering differs from `until`.\n\n---------------------------------------\n\n<a name=\"forever\" />\n### forever(fn, callback)\n\nCalls the asynchronous function 'fn' repeatedly, in series, indefinitely.\nIf an error is passed to fn's callback then 'callback' is called with the\nerror, otherwise it will never be called.\n\n---------------------------------------\n\n<a name=\"waterfall\" />\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a \n callback(err, result1, result2, ...) it must call on completion. The first\n argument is an error (which can be null) and any further arguments will be \n passed as arguments in order to the next task.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n```js\nasync.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n], function (err, result) {\n // result now equals 'done' \n});\n```\n\n---------------------------------------\n<a name=\"compose\" />\n### compose(fn1, fn2...)\n\nCreates a function which is a composition of the passed asynchronous\nfunctions. Each function consumes the return value of the function that\nfollows. Composing functions f(), g() and h() would produce the result of\nf(g(h())), only this version uses callbacks to obtain the return values.\n\nEach function is executed with the `this` binding of the composed function.\n\n__Arguments__\n\n* functions... - the asynchronous functions to compose\n\n\n__Example__\n\n```js\nfunction add1(n, callback) {\n setTimeout(function () {\n callback(null, n + 1);\n }, 10);\n}\n\nfunction mul3(n, callback) {\n setTimeout(function () {\n callback(null, n * 3);\n }, 10);\n}\n\nvar add1mul3 = async.compose(mul3, add1);\n\nadd1mul3(4, function (err, result) {\n // result now equals 15\n});\n```\n\n---------------------------------------\n<a name=\"applyEach\" />\n### applyEach(fns, args..., callback)\n\nApplies the provided arguments to each function in the array, calling the\ncallback after all functions have completed. If you only provide the first\nargument then it will return a function which lets you pass in the\narguments as if it were a single function call.\n\n__Arguments__\n\n* fns - the asynchronous functions to all call with the same arguments\n* args... - any number of separate arguments to pass to the function\n* callback - the final argument should be the callback, called when all\n functions have completed processing\n\n\n__Example__\n\n```js\nasync.applyEach([enableSearch, updateSchema], 'bucket', callback);\n\n// partial application example:\nasync.each(\n buckets,\n async.applyEach([enableSearch, updateSchema]),\n callback\n);\n```\n\n---------------------------------------\n\n<a name=\"applyEachSeries\" />\n### applyEachSeries(arr, iterator, callback)\n\nThe same as applyEach only the functions are applied in series.\n\n---------------------------------------\n\n<a name=\"queue\" />\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task, which must call its callback(err) argument when finished, with an \n optional error as an argument.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* unshift(task, [callback]) - add a new task to the front of the queue.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a queue object with concurrency 2\n\nvar q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n}, 2);\n\n\n// assign a callback\nq.drain = function() {\n console.log('all items have been processed');\n}\n\n// add some items to the queue\n\nq.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\nq.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the queue (batch-wise)\n\nq.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n});\n\n// add some items to the front of the queue\n\nq.unshift({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\n```\n\n---------------------------------------\n\n<a name=\"cargo\" />\n### cargo(worker, [payload])\n\nCreates a cargo object with the specified payload. Tasks added to the\ncargo will be processed altogether (up to the payload limit). If the\nworker is in progress, the task is queued until it is available. Once\nthe worker has completed some tasks, each callback of those tasks is called.\n\n__Arguments__\n\n* worker(tasks, callback) - An asynchronous function for processing an array of\n queued tasks, which must call its callback(err) argument when finished, with \n an optional error as an argument.\n* payload - An optional integer for determining how many tasks should be\n processed per round; if omitted, the default is unlimited.\n\n__Cargo objects__\n\nThe cargo object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* payload - an integer for determining how many tasks should be\n process per round. This property can be changed after a cargo is created to\n alter the payload on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n```js\n// create a cargo object with payload 2\n\nvar cargo = async.cargo(function (tasks, callback) {\n for(var i=0; i<tasks.length; i++){\n console.log('hello ' + tasks[i].name);\n }\n callback();\n}, 2);\n\n\n// add some items\n\ncargo.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n});\ncargo.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n});\ncargo.push({name: 'baz'}, function (err) {\n console.log('finished processing baz');\n});\n```\n\n---------------------------------------\n\n<a name=\"auto\" />\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\nNote, all functions are called with a results object as a second argument, \nso it is unsafe to pass functions in the tasks object which cannot handle the\nextra argument. For example, this snippet of code:\n\n```js\nasync.auto({\n readData: async.apply(fs.readFile, 'data.txt', 'utf-8')\n}, callback);\n```\n\nwill have the effect of calling readFile with the results object as the last\nargument, which will fail:\n\n```js\nfs.readFile('data.txt', 'utf-8', cb, {});\n```\n\nInstead, wrap the call to readFile in a function which does not forward the \nresults object:\n\n```js\nasync.auto({\n readData: function(cb, results){\n fs.readFile('data.txt', 'utf-8', cb);\n }\n}, callback);\n```\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The \n function receives two arguments: (1) a callback(err, result) which must be \n called when finished, passing an error (which can be null) and the result of \n the function's execution, and (2) a results object, containing the results of\n the previously executed functions.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. Results will always be passed\n\tbut if an error occurred, no other tasks will be performed, and the results\n\tobject will only contain partial results.\n \n\n__Example__\n\n```js\nasync.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n});\n```\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n```js\nasync.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n],\nfunction(err, results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n});\n```\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n<a name=\"iterator\" />\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. It's also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run.\n\n__Example__\n\n```js\nvar iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n]);\n\nnode> var iterator2 = iterator();\n'one'\nnode> var iterator3 = iterator2();\n'two'\nnode> iterator3();\n'three'\nnode> var nextfn = iterator2.next();\nnode> nextfn();\n'three'\n```\n\n---------------------------------------\n\n<a name=\"apply\" />\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n```js\n// using apply\n\nasync.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n]);\n\n\n// the same process without using apply\n\nasync.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n }\n]);\n```\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n```js\nnode> var fn = async.apply(sys.puts, 'one');\nnode> fn('two', 'three');\none\ntwo\nthree\n```\n\n---------------------------------------\n\n<a name=\"nextTick\" />\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setImmediate(callback)\nif available, otherwise setTimeout(callback, 0), which means other higher priority\nevents may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n```js\nvar call_order = [];\nasync.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two']\n});\ncall_order.push('one')\n```\n\n<a name=\"times\" />\n### times(n, callback)\n\nCalls the callback n times and accumulates results in the same manner\nyou would use with async.map.\n\n__Arguments__\n\n* n - The number of times to run the function.\n* callback - The function to call n times.\n\n__Example__\n\n```js\n// Pretend this is some complicated async factory\nvar createUser = function(id, callback) {\n callback(null, {\n id: 'user' + id\n })\n}\n// generate 5 users\nasync.times(5, function(n, next){\n createUser(n, function(err, user) {\n next(err, user)\n })\n}, function(err, users) {\n // we should now have 5 users\n});\n```\n\n<a name=\"timesSeries\" />\n### timesSeries(n, callback)\n\nThe same as times only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n## Utils\n\n<a name=\"memoize\" />\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\nThe cache of results is exposed as the `memo` property of the function returned\nby `memoize`.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n```js\nvar slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n};\nvar fn = async.memoize(slow_fn);\n\n// fn can now be used as if it were slow_fn\nfn('some name', function () {\n // callback\n});\n```\n\n<a name=\"unmemoize\" />\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n<a name=\"log\" />\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n};\n```\n```js\nnode> async.log(hello, 'world');\n'hello world'\n```\n\n---------------------------------------\n\n<a name=\"dir\" />\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n```js\nvar hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n};\n```\n```js\nnode> async.dir(hello, 'world');\n{hello: 'world'}\n```\n\n---------------------------------------\n\n<a name=\"noConflict\" />\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", 39 39 "readmeFilename": "README.md", 40 40 "homepage": "https://github.com/caolan/async", 41 "_id": "async@0.2. 9",41 "_id": "async@0.2.10", 42 42 "_from": "async@~0.2.9" 43 43 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
r484 r516 28 28 }, 29 29 "_id": "delayed-stream@0.0.5", 30 "_from": "delayed-stream@0.0.5" 30 "_from": "delayed-stream@0.0.5", 31 "scripts": {} 31 32 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/form-data/node_modules/combined-stream/package.json
r484 r516 29 29 }, 30 30 "_id": "combined-stream@0.0.4", 31 "_from": "combined-stream@~0.0.4" 31 "_from": "combined-stream@~0.0.4", 32 "scripts": {} 32 33 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/form-data/package.json
r484 r516 43 43 "homepage": "https://github.com/felixge/node-form-data", 44 44 "_id": "form-data@0.1.2", 45 "dist": { 46 "shasum": "19a6c063cb6fd24a82ba888616a6105495eda491" 47 }, 48 "_from": "form-data@~0.1.0", 49 "_resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.2.tgz" 45 "_from": "form-data@~0.1.0" 50 46 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/hawk/package.json
r484 r516 50 50 "homepage": "https://github.com/hueniverse/hawk", 51 51 "_id": "hawk@1.0.0", 52 "dist": { 53 "shasum": "e938be8d133181ca7b5e05ac7fc6fa5df66be372" 54 }, 55 "_from": "hawk@~1.0.0", 56 "_resolved": "https://registry.npmjs.org/hawk/-/hawk-1.0.0.tgz" 52 "_from": "hawk@~1.0.0" 57 53 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
r484 r516 31 31 "scripts": { 32 32 "pretest": "which gjslint; if [[ \"$?\" = 0 ]] ; then gjslint --nojsdoc -r lib -r tst; else echo \"Missing gjslint. Skipping lint\"; fi", 33 "test": " ./node_modules/.bin/tap ./tst"33 "test": "tap ./tst" 34 34 }, 35 35 "readme": "node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS.\nCurrently BER encoding is supported; at some point I'll likely have to do DER.\n\n## Usage\n\nMostly, if you're *actually* needing to read and write ASN.1, you probably don't\nneed this readme to explain what and why. If you have no idea what ASN.1 is,\nsee this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc\n\nThe source is pretty much self-explanatory, and has read/write methods for the\ncommon types out there.\n\n### Decoding\n\nThe following reads an ASN.1 sequence with a boolean.\n\n var Ber = require('asn1').Ber;\n\n var reader = new Ber.Reader(new Buffer([0x30, 0x03, 0x01, 0x01, 0xff]));\n\n reader.readSequence();\n console.log('Sequence len: ' + reader.length);\n if (reader.peek() === Ber.Boolean)\n console.log(reader.readBoolean());\n\n### Encoding\n\nThe following generates the same payload as above.\n\n var Ber = require('asn1').Ber;\n\n var writer = new Ber.Writer();\n\n writer.startSequence();\n writer.writeBoolean(true);\n writer.endSequence();\n\n console.log(writer.buffer);\n\n## Installation\n\n npm install asn1\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/mcavage/node-asn1/issues>.\n", -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
r484 r516 17 17 "readmeFilename": "README.md", 18 18 "_id": "assert-plus@0.1.2", 19 "dist": {20 "shasum": "45a89f54ea7c2d3462aba816e3387f5723659c1e"21 },22 19 "_from": "assert-plus@0.1.2", 23 " _resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz"20 "scripts": {} 24 21 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
r484 r516 15 15 "readmeFilename": "README", 16 16 "_id": "ctype@0.5.2", 17 "_from": "ctype@0.5.2" 17 "_from": "ctype@0.5.2", 18 "scripts": {} 18 19 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/http-signature/package.json
r484 r516 15 15 "main": "lib/index.js", 16 16 "scripts": { 17 "test": " ./node_modules/.bin/tap tst/*.js"17 "test": "tap tst/*.js" 18 18 }, 19 19 "dependencies": { -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/json-stringify-safe/package.json
r484 r516 30 30 "homepage": "https://github.com/isaacs/json-stringify-safe", 31 31 "_id": "json-stringify-safe@5.0.0", 32 "dist": { 33 "shasum": "80bbe7752a7e12735356aeb2dded57a790bc3ec1" 34 }, 35 "_from": "json-stringify-safe@~5.0.0", 36 "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.0.tgz" 32 "_from": "json-stringify-safe@~5.0.0" 37 33 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/node-uuid/package.json
r484 r516 32 32 "homepage": "https://github.com/broofa/node-uuid", 33 33 "_id": "node-uuid@1.4.1", 34 "_from": "node-uuid@~1.4.0" 34 "_from": "node-uuid@~1.4.0", 35 "scripts": {} 35 36 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/qs/index.js
r484 r516 38 38 var objectKeys = Object.keys || function(obj) { 39 39 var ret = []; 40 for (var key in obj) ret.push(key); 40 for (var key in obj) { 41 if (obj.hasOwnProperty(key)) { 42 ret.push(key); 43 } 44 } 41 45 return ret; 42 46 }; … … 64 68 65 69 /** 66 * Create a nullary object if possible67 */68 69 function createObject() {70 return Object.create71 ? Object.create(null)72 : {};73 }74 75 /**76 70 * Cache non-integer test regexp. 77 71 */ … … 80 74 81 75 function promote(parent, key) { 82 if (parent[key].length == 0) return parent[key] = createObject();83 var t = createObject();76 if (parent[key].length == 0) return parent[key] = {} 77 var t = {}; 84 78 for (var i in parent[key]) { 85 79 if (hasOwnProperty.call(parent[key], i)) { … … 93 87 function parse(parts, parent, key, val) { 94 88 var part = parts.shift(); 89 90 // illegal 91 if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; 92 95 93 // end 96 94 if (!part) { … … 141 139 } else { 142 140 if (!isint.test(key) && isArray(parent.base)) { 143 var t = createObject();141 var t = {}; 144 142 for (var k in parent.base) t[k] = parent.base[k]; 145 143 parent.base = t; … … 174 172 } 175 173 176 return obj;177 }178 179 /**180 * Restore Object.prototype.181 * see pull-request #58182 */183 184 function restoreProto(obj) {185 if (!Object.create) return obj;186 if (isArray(obj)) return obj;187 if (obj && 'object' != typeof obj) return obj;188 189 for (var key in obj) {190 if (hasOwnProperty.call(obj, key)) {191 obj[key] = restoreProto(obj[key]);192 }193 }194 195 obj.__proto__ = Object.prototype;196 174 return obj; 197 175 } … … 228 206 229 207 return merge(ret, decode(key), decode(val)); 230 }, { base: createObject()}).base;231 232 return restoreProto(compact(ret));208 }, { base: {} }).base; 209 210 return compact(ret); 233 211 } 234 212 … … 342 320 function set(obj, key, val) { 343 321 var v = obj[key]; 322 if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; 344 323 if (undefined === v) { 345 324 obj[key] = val; -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/qs/package.json
r484 r516 2 2 "name": "qs", 3 3 "description": "querystring parser", 4 "version": "0.6. 5",4 "version": "0.6.6", 5 5 "keywords": [ 6 6 "query string", … … 34 34 }, 35 35 "homepage": "https://github.com/visionmedia/node-querystring", 36 "_id": "qs@0.6. 5",36 "_id": "qs@0.6.6", 37 37 "_from": "qs@~0.6.0" 38 38 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/node_modules/tunnel-agent/package.json
r484 r516 25 25 "homepage": "https://github.com/mikeal/tunnel-agent", 26 26 "_id": "tunnel-agent@0.3.0", 27 "_from": "tunnel-agent@~0.3.0" 27 "_from": "tunnel-agent@~0.3.0", 28 "scripts": {} 28 29 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/package.json
r484 r516 8 8 "utility" 9 9 ], 10 "version": "2. 27.0",10 "version": "2.34.0", 11 11 "author": { 12 12 "name": "Mikeal Rogers", … … 20 20 "url": "http://github.com/mikeal/request/issues" 21 21 }, 22 "license": "Apache, Version 2.0", 22 23 "engines": [ 23 24 "node >= 0.8.0" … … 28 29 "json-stringify-safe": "~5.0.0", 29 30 "forever-agent": "~0.5.0", 31 "node-uuid": "~1.4.0", 32 "mime": "~1.2.9", 33 "tough-cookie": ">=0.12.0", 34 "form-data": "~0.1.0", 30 35 "tunnel-agent": "~0.3.0", 31 36 "http-signature": "~0.10.0", 37 "oauth-sign": "~0.3.0", 32 38 "hawk": "~1.0.0", 33 "aws-sign": "~0.3.0", 39 "aws-sign2": "~0.5.0" 40 }, 41 "optionalDependencies": { 42 "tough-cookie": ">=0.12.0", 43 "form-data": "~0.1.0", 44 "tunnel-agent": "~0.3.0", 45 "http-signature": "~0.10.0", 34 46 "oauth-sign": "~0.3.0", 35 "cookie-jar": "~0.3.0", 36 "node-uuid": "~1.4.0", 37 "mime": "~1.2.9", 38 "form-data": "~0.1.0" 47 "hawk": "~1.0.0", 48 "aws-sign2": "~0.5.0" 39 49 }, 40 50 "scripts": { 41 51 "test": "node tests/run.js" 42 52 }, 43 "readme": "# Request -- Simplified HTTP client\n\n[](https://nodei.co/npm/request/)\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```\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nUrl encoded forms are simple\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You don't need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to true, which will cause a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a 401 response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false` (otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail).\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 // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\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: access_token.oauth_verifier\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 PATCH, POST and PUT requests. Must be buffer or string.\n* `form` - when passed an object this will set `body` but to a querystring representation of value and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no option a FormData instance is returned that will be piped to request.\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\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\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* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\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 `true` if you want cookies to be remembered for future use, or define your custom cookie jar (see examples section)\n* `aws` - object containing aws signing information, should have the properties `key` and `secret` as well as `bucket` unless you're specifying your bucket as part of the path, or you are making a request that doesn't use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\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 is 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.patch\n\nSame as request() but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(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 disabled by default (else, they would be used in subsequent requests). To enable cookies set jar to true (either in defaults or in the options sent).\n\n```javascript\nvar request = request.defaults({jar: true})\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",53 "readme": "# Request -- Simplified HTTP client\n\n[](https://nodei.co/npm/request/)\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 the headers donât already provide one).\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, `content-type` and `content-length` are 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 `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. 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## UNIX Socket \n\n`request` supports the `unix://` protocol for all requests. The path is assumed to be absolute to the root of the host file system. \n\nHTTP paths are extracted from the supplied URL by testing each level of the full URL against net.connect for a socket response.\n\nThus the following request will GET `/httppath` from the HTTP server listening on `/tmp/unix.socket`\n\n```javascript\nrequest.get('unix://tmp/unix.socket/httppath')\n```\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\nURL-encoded forms are simple.\n\n```javascript\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n```\n\nFor `multipart/form-data` we use the [form-data](https://github.com/felixge/node-form-data) library by [@felixge](https://github.com/felixge). You donât need to worry about piping the form object or setting the headers, `request` will handle that for you.\n\n```javascript\nvar r = request.post('http://service.com/upload')\nvar form = r.form()\nform.append('my_field', 'my_value')\nform.append('my_buffer', new Buffer([1, 2, 3]))\nform.append('my_file', fs.createReadStream(path.join(__dirname, 'doodle.png'))\nform.append('remote_file', request('http://google.com/doodle.png'))\n```\n\n## HTTP Authentication\n\n```javascript\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). The method form takes parameters `auth(username, password, sendImmediately)`.\n\n`sendImmediately` defaults to `true`, which causes a basic authentication header to be sent. If `sendImmediately` is `false`, then `request` will retry with a proper authentication header after receiving a `401` response from the server (which must contain a `WWW-Authenticate` header indicating the required authentication method).\n\nDigest authentication is supported, but it only works with `sendImmediately` set to `false`; otherwise `request` will send basic authentication on the initial request, which will probably cause the request to fail.\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 // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\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: access_token.oauth_verifier\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.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### Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```javascript\nvar request = require('request');\n\nvar options = {\n\turl: 'https://api.github.com/repos/mikeal/request',\n\theaders: {\n\t\t'User-Agent': 'request'\n\t}\n};\n\nfunction callback(error, response, body) {\n\tif (!error && response.statusCode == 200) {\n\t\tvar info = JSON.parse(body);\n\t\tconsole.log(info.stargazers_count + \" Stars\");\n\t\tconsole.log(info.forks_count + \" Forks\");\n\t}\n}\n\nrequest(options, callback);\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 (default: `\"GET\"`)\n* `headers` - http headers (default: `{}`)\n* `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`.\n* `form` - when passed an object, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded; charset=utf-8` header. When passed no options, a `FormData` instance is returned (and is piped to request).\n* `auth` - A hash containing values `user` || `username`, `password` || `pass`, and `sendImmediately` (optional). See documentation above.\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 (default: `true`)\n* `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n* `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n* `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`.\n* `pool` - A hash object containing the agents for these requests. If omitted, the 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\n* `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n* `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n* `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n* `strictSSL` - If `true`, requires 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` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n* `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless youâre specifying your `bucket` as part of the path, or the request doesnât use a bucket (i.e. GET Services)\n* `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n* `localAddress` - Local interface to bind for network connections.\n\n\nThe callback argument gets 3 arguments: \n\n1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object\n3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\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.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```javascript\nrequest.patch(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\nSame as `request()` (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```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```javascript\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead `request`âs global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\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```\n\nOR\n\n```javascript\nvar j = request.jar()\nvar cookie = request.cookie('your_cookie_here')\nj.setCookie(cookie, uri);\nrequest({url: 'http://www.google.com', jar: j}, function () {\n request('http://images.google.com')\n})\n```\n", 44 54 "readmeFilename": "README.md", 45 55 "homepage": "https://github.com/mikeal/request", 46 "_id": "request@2. 27.0",56 "_id": "request@2.34.0", 47 57 "dist": { 48 "shasum": " b7f67055f69980e50629f486c4f511f73503644e"58 "shasum": "fd3b7ba1c3598ca8b8a9173ed5bd33546104f8bb" 49 59 }, 50 60 "_from": "request@>=2.12.0", 51 "_resolved": "https://registry.npmjs.org/request/-/request-2. 27.0.tgz"61 "_resolved": "https://registry.npmjs.org/request/-/request-2.34.0.tgz" 52 62 } -
Dev/trunk/node_modules/grunt-contrib-less/node_modules/less/node_modules/request/request.js
r484 r516 1 var http = require('http') 2 , https = false 3 , tls = false 1 var optional = require('./lib/optional') 2 , http = require('http') 3 , https = optional('https') 4 , tls = optional('tls') 4 5 , url = require('url') 5 6 , util = require('util') … … 9 10 , crypto = require('crypto') 10 11 11 , oauth = require('oauth-sign')12 , hawk = require('hawk')13 , aws = require('aws-sign')14 , httpSignature = require('http-signature')12 , oauth = optional('oauth-sign') 13 , hawk = optional('hawk') 14 , aws = optional('aws-sign2') 15 , httpSignature = optional('http-signature') 15 16 , uuid = require('node-uuid') 16 17 , mime = require('mime') 17 , tunnel = require('tunnel-agent')18 , tunnel = optional('tunnel-agent') 18 19 , _safeStringify = require('json-stringify-safe') 19 20 20 21 , ForeverAgent = require('forever-agent') 21 , FormData = require('form-data') 22 23 , Cookie = require('cookie-jar') 24 , CookieJar = Cookie.Jar 25 , cookieJar = new CookieJar 22 , FormData = optional('form-data') 23 24 , cookies = require('./lib/cookies') 25 , globalCookieJar = cookies.jar() 26 26 27 27 , copy = require('./lib/copy') 28 28 , debug = require('./lib/debug') 29 29 , getSafe = require('./lib/getSafe') 30 , net = require('net') 30 31 ; 31 32 … … 38 39 39 40 var globalPool = {} 40 var isUrl = /^https?:/i 41 42 try { 43 https = require('https') 44 } catch (e) {} 45 46 try { 47 tls = require('tls') 48 } catch (e) {} 49 41 var isUrl = /^https?:|^unix:/ 50 42 51 43 … … 66 58 67 59 function isReadStream (rs) { 68 if (rs.readable && rs.path && rs.mode) { 69 return true 70 } 60 return rs.readable && rs.path && rs.mode; 71 61 } 72 62 … … 103 93 } 104 94 95 this.canTunnel = options.tunnel !== false && tunnel; 96 105 97 this.init(options) 106 98 } … … 154 146 155 147 // do the HTTP CONNECT dance using koichik/node-tunnel 156 if (http.globalAgent && self.uri.protocol === "https:" ) {148 if (http.globalAgent && self.uri.protocol === "https:" && self.canTunnel) { 157 149 var tunnelFn = self.proxy.protocol === "http:" 158 150 ? tunnel.httpsOverHttp : tunnel.httpsOverHttps … … 173 165 if (!self.uri.pathname) {self.uri.pathname = '/'} 174 166 175 if (!self.uri.host ) {167 if (!self.uri.host && !self.protocol=='unix:') { 176 168 // Invalid URI: it may generate lot of bad errors, like "TypeError: Cannot call method 'indexOf' of undefined" in CookieJar 177 169 // Detect and reject it as soon as possible … … 180 172 if (Object.keys(options).length === 0) { 181 173 // No option ? This can be the sign of a redirect 182 // As this is a case where the user cannot do anything ( hedidn't call request directly with this URL)183 // heshould be warned that it can be caused by a redirection (can save some hair)174 // As this is a case where the user cannot do anything (they didn't call request directly with this URL) 175 // they should be warned that it can be caused by a redirection (can save some hair) 184 176 message += '. This can be caused by a crappy redirection.' 185 177 } … … 225 217 self.clientErrorHandler = function (error) { 226 218 if (self._aborted) return 227 228 219 if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' 229 220 && self.agent.addRequestNoreuse) { … … 252 243 } 253 244 254 if (options.form) { 255 self.form(options.form) 256 } 257 258 if (options.qs) self.qs(options.qs) 259 260 if (self.uri.path) { 261 self.path = self.uri.path 245 self._buildRequest = function(){ 246 var self = this; 247 248 if (options.form) { 249 self.form(options.form) 250 } 251 252 if (options.qs) self.qs(options.qs) 253 254 if (self.uri.path) { 255 self.path = self.uri.path 256 } else { 257 self.path = self.uri.pathname + (self.uri.search || "") 258 } 259 260 if (self.path.length === 0) self.path = '/' 261 262 263 // Auth must happen last in case signing is dependent on other headers 264 if (options.oauth) { 265 self.oauth(options.oauth) 266 } 267 268 if (options.aws) { 269 self.aws(options.aws) 270 } 271 272 if (options.hawk) { 273 self.hawk(options.hawk) 274 } 275 276 if (options.httpSignature) { 277 self.httpSignature(options.httpSignature) 278 } 279 280 if (options.auth) { 281 if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) options.auth.user = options.auth.username 282 if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) options.auth.pass = options.auth.password 283 284 self.auth( 285 options.auth.user, 286 options.auth.pass, 287 options.auth.sendImmediately 288 ) 289 } 290 291 if (self.uri.auth && !self.hasHeader('authorization')) { 292 var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) }) 293 self.auth(authPieces[0], authPieces.slice(1).join(':'), true) 294 } 295 if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) { 296 self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))) 297 } 298 299 300 if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path) 301 302 if (options.json) { 303 self.json(options.json) 304 } else if (options.multipart) { 305 self.boundary = uuid() 306 self.multipart(options.multipart) 307 } 308 309 if (self.body) { 310 var length = 0 311 if (!Buffer.isBuffer(self.body)) { 312 if (Array.isArray(self.body)) { 313 for (var i = 0; i < self.body.length; i++) { 314 length += self.body[i].length 315 } 316 } else { 317 self.body = new Buffer(self.body) 318 length = self.body.length 319 } 320 } else { 321 length = self.body.length 322 } 323 if (length) { 324 if (!self.hasHeader('content-length')) self.setHeader('content-length', length) 325 } else { 326 throw new Error('Argument error, options.body.') 327 } 328 } 329 330 var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol 331 , defaultModules = {'http:':http, 'https:':https, 'unix:':http} 332 , httpModules = self.httpModules || {} 333 ; 334 self.httpModule = httpModules[protocol] || defaultModules[protocol] 335 336 if (!self.httpModule) return this.emit('error', new Error("Invalid protocol")) 337 338 if (options.ca) self.ca = options.ca 339 340 if (!self.agent) { 341 if (options.agentOptions) self.agentOptions = options.agentOptions 342 343 if (options.agentClass) { 344 self.agentClass = options.agentClass 345 } else if (options.forever) { 346 self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL 347 } else { 348 self.agentClass = self.httpModule.Agent 349 } 350 } 351 352 if (self.pool === false) { 353 self.agent = false 354 } else { 355 self.agent = self.agent || self.getAgent() 356 if (self.maxSockets) { 357 // Don't use our pooling if node has the refactored client 358 self.agent.maxSockets = self.maxSockets 359 } 360 if (self.pool.maxSockets) { 361 // Don't use our pooling if node has the refactored client 362 self.agent.maxSockets = self.pool.maxSockets 363 } 364 } 365 366 self.on('pipe', function (src) { 367 if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") 368 self.src = src 369 if (isReadStream(src)) { 370 if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path)) 371 } else { 372 if (src.headers) { 373 for (var i in src.headers) { 374 if (!self.hasHeader(i)) { 375 self.setHeader(i, src.headers[i]) 376 } 377 } 378 } 379 if (self._json && !self.hasHeader('content-type')) 380 self.setHeader('content-type', 'application/json') 381 if (src.method && !self.explicitMethod) { 382 self.method = src.method 383 } 384 } 385 386 // self.on('pipe', function () { 387 // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") 388 // }) 389 }) 390 391 process.nextTick(function () { 392 if (self._aborted) return 393 394 if (self._form) { 395 self.setHeaders(self._form.getHeaders()) 396 try { 397 var length = self._form.getLengthSync() 398 self.setHeader('content-length', length) 399 } catch(e){} 400 self._form.pipe(self) 401 } 402 if (self.body) { 403 if (Array.isArray(self.body)) { 404 self.body.forEach(function (part) { 405 self.write(part) 406 }) 407 } else { 408 self.write(self.body) 409 } 410 self.end() 411 } else if (self.requestBodyStream) { 412 console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") 413 self.requestBodyStream.pipe(self) 414 } else if (!self.src) { 415 if (self.method !== 'GET' && typeof self.method !== 'undefined') { 416 self.setHeader('content-length', 0) 417 } 418 self.end() 419 } 420 self.ntick = true 421 }) 422 423 } // End _buildRequest 424 425 self._handleUnixSocketURI = function(self){ 426 // Parse URI and extract a socket path (tested as a valid socket using net.connect), and a http style path suffix 427 // Thus http requests can be made to a socket using the uri unix://tmp/my.socket/urlpath 428 // and a request for '/urlpath' will be sent to the unix socket at /tmp/my.socket 429 430 self.unixsocket = true; 431 432 var full_path = self.uri.href.replace(self.uri.protocol+'/', ''); 433 434 var lookup = full_path.split('/'); 435 var error_connecting = true; 436 437 var lookup_table = {}; 438 do { lookup_table[lookup.join('/')]={} } while(lookup.pop()) 439 for (r in lookup_table){ 440 try_next(r); 441 } 442 443 function try_next(table_row){ 444 var client = net.connect( table_row ); 445 client.path = table_row 446 client.on('error', function(){ lookup_table[this.path].error_connecting=true; this.end(); }); 447 client.on('connect', function(){ lookup_table[this.path].error_connecting=false; this.end(); }); 448 table_row.client = client; 449 } 450 451 wait_for_socket_response(); 452 453 response_counter = 0; 454 455 function wait_for_socket_response(){ 456 var detach; 457 if('undefined' == typeof setImmediate ) detach = process.nextTick 458 else detach = setImmediate; 459 detach(function(){ 460 // counter to prevent infinite blocking waiting for an open socket to be found. 461 response_counter++; 462 var trying = false; 463 for (r in lookup_table){ 464 //console.log(r, lookup_table[r], lookup_table[r].error_connecting) 465 if('undefined' == typeof lookup_table[r].error_connecting) 466 trying = true; 467 } 468 if(trying && response_counter<1000) 469 wait_for_socket_response() 470 else 471 set_socket_properties(); 472 }) 473 } 474 475 function set_socket_properties(){ 476 var host; 477 for (r in lookup_table){ 478 if(lookup_table[r].error_connecting === false){ 479 host = r 480 } 481 } 482 if(!host){ 483 self.emit('error', new Error("Failed to connect to any socket in "+full_path)) 484 } 485 var path = full_path.replace(host, '') 486 487 self.socketPath = host 488 self.uri.pathname = path 489 self.uri.href = path 490 self.uri.path = path 491 self.host = '' 492 self.hostname = '' 493 delete self.host 494 delete self.hostname 495 self._buildRequest(); 496 } 497 } 498 499 // Intercept UNIX protocol requests to change properties to match socket 500 if(/^unix:/.test(self.uri.protocol)){ 501 self._handleUnixSocketURI(self); 262 502 } else { 263 self.path = self.uri.pathname + (self.uri.search || "") 264 } 265 266 if (self.path.length === 0) self.path = '/' 267 268 269 // Auth must happen last in case signing is dependent on other headers 270 if (options.oauth) { 271 self.oauth(options.oauth) 272 } 273 274 if (options.aws) { 275 self.aws(options.aws) 276 } 277 278 if (options.hawk) { 279 self.hawk(options.hawk) 280 } 281 282 if (options.httpSignature) { 283 self.httpSignature(options.httpSignature) 284 } 285 286 if (options.auth) { 287 self.auth( 288 (options.auth.user==="") ? options.auth.user : (options.auth.user || options.auth.username ), 289 options.auth.pass || options.auth.password, 290 options.auth.sendImmediately) 291 } 292 293 if (self.uri.auth && !self.hasHeader('authorization')) { 294 var authPieces = self.uri.auth.split(':').map(function(item){ return querystring.unescape(item) }) 295 self.auth(authPieces[0], authPieces.slice(1).join(':'), true) 296 } 297 if (self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization') && !self.tunnel) { 298 self.setHeader('proxy-authorization', "Basic " + toBase64(self.proxy.auth.split(':').map(function(item){ return querystring.unescape(item)}).join(':'))) 299 } 300 301 302 if (self.proxy && !self.tunnel) self.path = (self.uri.protocol + '//' + self.uri.host + self.path) 303 304 if (options.json) { 305 self.json(options.json) 306 } else if (options.multipart) { 307 self.boundary = uuid() 308 self.multipart(options.multipart) 309 } 310 311 if (self.body) { 312 var length = 0 313 if (!Buffer.isBuffer(self.body)) { 314 if (Array.isArray(self.body)) { 315 for (var i = 0; i < self.body.length; i++) { 316 length += self.body[i].length 317 } 318 } else { 319 self.body = new Buffer(self.body) 320 length = self.body.length 321 } 322 } else { 323 length = self.body.length 324 } 325 if (length) { 326 if (!self.hasHeader('content-length')) self.setHeader('content-length', length) 327 } else { 328 throw new Error('Argument error, options.body.') 329 } 330 } 331 332 var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol 333 , defaultModules = {'http:':http, 'https:':https} 334 , httpModules = self.httpModules || {} 335 ; 336 self.httpModule = httpModules[protocol] || defaultModules[protocol] 337 338 if (!self.httpModule) return this.emit('error', new Error("Invalid protocol")) 339 340 if (options.ca) self.ca = options.ca 341 342 if (!self.agent) { 343 if (options.agentOptions) self.agentOptions = options.agentOptions 344 345 if (options.agentClass) { 346 self.agentClass = options.agentClass 347 } else if (options.forever) { 348 self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL 349 } else { 350 self.agentClass = self.httpModule.Agent 351 } 352 } 353 354 if (self.pool === false) { 355 self.agent = false 356 } else { 357 self.agent = self.agent || self.getAgent() 358 if (self.maxSockets) { 359 // Don't use our pooling if node has the refactored client 360 self.agent.maxSockets = self.maxSockets 361 } 362 if (self.pool.maxSockets) { 363 // Don't use our pooling if node has the refactored client 364 self.agent.maxSockets = self.pool.maxSockets 365 } 366 } 367 368 self.on('pipe', function (src) { 369 if (self.ntick && self._started) throw new Error("You cannot pipe to this stream after the outbound request has started.") 370 self.src = src 371 if (isReadStream(src)) { 372 if (!self.hasHeader('content-type')) self.setHeader('content-type', mime.lookup(src.path)) 373 } else { 374 if (src.headers) { 375 for (var i in src.headers) { 376 if (!self.hasHeader(i)) { 377 self.setHeader(i, src.headers[i]) 378 } 379 } 380 } 381 if (self._json && !self.hasHeader('content-type')) 382 self.setHeader('content-type', 'application/json') 383 if (src.method && !self.explicitMethod) { 384 self.method = src.method 385 } 386 } 387 388 // self.on('pipe', function () { 389 // console.error("You have already piped to this stream. Pipeing twice is likely to break the request.") 390 // }) 391 }) 392 393 process.nextTick(function () { 394 if (self._aborted) return 395 396 if (self._form) { 397 self.setHeaders(self._form.getHeaders()) 398 self._form.pipe(self) 399 } 400 if (self.body) { 401 if (Array.isArray(self.body)) { 402 self.body.forEach(function (part) { 403 self.write(part) 404 }) 405 } else { 406 self.write(self.body) 407 } 408 self.end() 409 } else if (self.requestBodyStream) { 410 console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe.") 411 self.requestBodyStream.pipe(self) 412 } else if (!self.src) { 413 if (self.method !== 'GET' && typeof self.method !== 'undefined') { 414 self.setHeader('content-length', 0) 415 } 416 self.end() 417 } 418 self.ntick = true 419 }) 503 self._buildRequest(); 504 } 505 420 506 } 421 507 … … 430 516 // previously was doing http, now doing https 431 517 // if it's https, then we might need to tunnel now. 432 if (self.proxy ) {518 if (self.proxy && self.canTunnel) { 433 519 self.tunnel = true 434 520 var tunnelFn = self.proxy.protocol === 'http:' … … 493 579 } 494 580 if (this.ca) options.ca = this.ca 581 if (this.ciphers) options.ciphers = this.ciphers 582 if (this.secureProtocol) options.secureProtocol = this.secureProtocol 495 583 if (typeof this.rejectUnauthorized !== 'undefined') options.rejectUnauthorized = this.rejectUnauthorized 496 584 … … 538 626 } 539 627 540 if (options.secure Options) {628 if (options.secureProtocol) { 541 629 if (poolKey) poolKey += ':' 542 poolKey += options.secure Options630 poolKey += options.secureProtocol 543 631 } 544 632 } … … 653 741 } 654 742 743 var targetCookieJar = (self._jar && self._jar.setCookie)?self._jar:globalCookieJar; 655 744 var addCookie = function (cookie) { 656 if (self._jar){ 657 if(self._jar.add){ 658 self._jar.add(new Cookie(cookie)) 659 } 660 else cookieJar.add(new Cookie(cookie)) 661 } 662 745 //set the cookie if it's domain in the href's domain. 746 try { 747 targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true}); 748 } catch (e) { 749 self.emit('error', e); 750 } 663 751 } 664 752 … … 691 779 } else if (response.statusCode == 401 && self._hasAuth && !self._sentAuth) { 692 780 var authHeader = response.headers[hasHeader('www-authenticate', response.headers)] 693 var authVerb = authHeader && authHeader.split(' ')[0] 781 var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase() 694 782 debug('reauth', authVerb) 695 783 696 784 switch (authVerb) { 697 case ' Basic':785 case 'basic': 698 786 self.auth(self._user, self._pass, true) 699 787 redirectTo = self.uri 700 788 break 701 789 702 case 'Digest': 703 // TODO: More complete implementation of RFC 2617. For reference: 790 case 'digest': 791 // TODO: More complete implementation of RFC 2617. 792 // - check challenge.algorithm 793 // - support algorithm="MD5-sess" 794 // - handle challenge.domain 795 // - support qop="auth-int" only 796 // - handle Authentication-Info (not necessarily?) 797 // - check challenge.stale (not necessarily?) 798 // - increase nc (not necessarily?) 799 // For reference: 704 800 // http://tools.ietf.org/html/rfc2617#section-3 705 801 // https://github.com/bagder/curl/blob/master/lib/http_digest.c 706 802 707 var matches = authHeader.match(/([a-z0-9_-]+)="([^"]+)"/gi)708 803 var challenge = {} 709 710 for (var i = 0; i < matches.length; i++) { 711 var eqPos = matches[i].indexOf('=') 712 var key = matches[i].substring(0, eqPos) 713 var quotedValue = matches[i].substring(eqPos + 1) 714 challenge[key] = quotedValue.substring(1, quotedValue.length - 1) 804 var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi 805 for (;;) { 806 var match = re.exec(authHeader) 807 if (!match) break 808 challenge[match[1]] = match[2] || match[3]; 715 809 } 716 810 717 811 var ha1 = md5(self._user + ':' + challenge.realm + ':' + self._pass) 718 812 var ha2 = md5(self.method + ':' + self.uri.path) 719 var digestResponse = md5(ha1 + ':' + challenge.nonce + ':1::auth:' + ha2) 813 var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' 814 var nc = qop && '00000001' 815 var cnonce = qop && uuid().replace(/-/g, '') 816 var digestResponse = qop ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) : md5(ha1 + ':' + challenge.nonce + ':' + ha2) 720 817 var authValues = { 721 818 username: self._user, … … 723 820 nonce: challenge.nonce, 724 821 uri: self.uri.path, 725 qop: challenge.qop,822 qop: qop, 726 823 response: digestResponse, 727 nc: 1, 728 cnonce: '' 824 nc: nc, 825 cnonce: cnonce, 826 algorithm: challenge.algorithm, 827 opaque: challenge.opaque 729 828 } 730 829 731 830 authHeader = [] 732 831 for (var k in authValues) { 733 authHeader.push(k + '="' + authValues[k] + '"') 832 if (!authValues[k]) { 833 //ignore 834 } else if (k === 'qop' || k === 'nc' || k === 'algorithm') { 835 authHeader.push(k + '=' + authValues[k]) 836 } else { 837 authHeader.push(k + '="' + authValues[k] + '"') 838 } 734 839 } 735 840 authHeader = 'Digest ' + authHeader.join(', ') … … 986 1091 self.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) 987 1092 } else { 988 self.setHeader('content-type', self.headers['content-type'].split(';')[0] + '; boundary=' + self.boundary) 1093 var headerName = self.hasHeader('content-type'); 1094 self.setHeader(headerName, self.headers[headerName].split(';')[0] + '; boundary=' + self.boundary) 989 1095 } 990 1096 … … 1020 1126 if (typeof this.body === 'object') { 1021 1127 this.body = safeStringify(this.body) 1022 self.setHeader('content-type', 'application/json') 1128 if (!self.hasHeader('content-type')) 1129 self.setHeader('content-type', 'application/json') 1023 1130 } 1024 1131 } else { 1025 1132 this.body = safeStringify(val) 1026 self.setHeader('content-type', 'application/json') 1027 } 1133 if (!self.hasHeader('content-type')) 1134 self.setHeader('content-type', 'application/json') 1135 } 1136 1028 1137 return this 1029 1138 } … … 1161 1270 cookies = false 1162 1271 this._disableCookies = true 1163 } else if (jar && jar.get) {1164 // fetch cookie from the user defined cookie jar1165 cookies = jar.get({ url: this.uri.href })1166 1272 } else { 1167 // fetch cookie from the global cookie jar 1168 cookies = cookieJar.get({ url: this.uri.href }) 1169 } 1170 1273 var targetCookieJar = (jar && jar.getCookieString)?jar:globalCookieJar; 1274 var urihref = this.uri.href 1275 //fetch cookie in the Specified host 1276 if (targetCookieJar) { 1277 cookies = targetCookieJar.getCookieString(urihref); 1278 } 1279 } 1280 1281 //if need cookie and cookie is not empty 1171 1282 if (cookies && cookies.length) { 1172 var cookieString = cookies.map(function (c) {1173 return c.name + "=" + c.value1174 }).join("; ")1175 1176 1283 if (this.originalCookieHeader) { 1177 1284 // Don't overwrite existing Cookie header 1178 this.setHeader('cookie', this.originalCookieHeader + '; ' + cookie String)1285 this.setHeader('cookie', this.originalCookieHeader + '; ' + cookies) 1179 1286 } else { 1180 this.setHeader('cookie', cookie String)1287 this.setHeader('cookie', cookies) 1181 1288 } 1182 1289 } -
Dev/trunk/node_modules/grunt-exec/.travis.yml
r484 r516 1 1 language: node_js 2 2 node_js: 3 - 0.8 3 - "0.8" 4 - "0.10" -
Dev/trunk/node_modules/grunt-exec/Gruntfile.js
r484 r516 10 10 cmd: 'ls -l **' 11 11 } 12 , list_all_files: 'ls -la' 12 13 , echo_grunt_version: { 13 14 cmd: function() { return 'echo ' + this.version; } -
Dev/trunk/node_modules/grunt-exec/README.md
r484 r516 23 23 ----- 24 24 25 This plugin is a [multi task][types_of_tasks], meaning that grunt will automatically iterate over all exec targets if a target is not specified. 25 This plugin is a [multi task][types_of_tasks], meaning that grunt will 26 automatically iterate over all exec targets if a target is not specified. 26 27 27 If the exit code generated by the specified shell command is greater than 0, grunt-exec will assume an error has occurred and will abort grunt immediately. 28 If the exit code generated by the specified shell command is greater than 0, 29 grunt-exec will assume an error has occurred and will abort grunt immediately. 28 30 29 [types_of_tasks]: http s://github.com/gruntjs/grunt/blob/master/docs/types_of_tasks.md#multi-tasks31 [types_of_tasks]: http://gruntjs.com/configuring-tasks#task-configuration-and-targets 30 32 31 33 ### Properties 32 34 33 * __command__: The shell command to be executed. Must be a string or a function that returns a string. (alias: __cmd__) 34 * __stdout__: If `true`, stdout will be printed. Defaults to `true`. 35 * __stderr__: If `true`, stderr will be printed. Defaults to `true`. 36 * __cwd__: Current working directory of the shell command. Defaults to the directory containing your Gruntfile. 37 * __exitCode__: The expected exit code, task will fail if the actual exit code doesn't match. Defaults to `0`. 38 * __callback__: The callback function passed `child_process.exec`. Defaults to a noop. 35 * __command__ (alias: __cmd__): The shell command to be executed. Must be a 36 string or a function that returns a string. 37 * __stdout__: If `true`, stdout will be printed. Defaults to `true`. 38 * __stderr__: If `true`, stderr will be printed. Defaults to `true`. 39 * __cwd__: Current working directory of the shell command. Defaults to the 40 directory containing your Gruntfile. 41 * __exitCode__ (alias: __exitCodes__): The expected exit code(s), task will 42 fail if the actual exit code doesn't match. Defaults to `0`. Can be an array 43 for multiple allowed exit codes. 44 * __callback__: The callback function passed `child_process.exec`. Defaults to 45 a noop. 46 47 If the configuration is instead a simple `string`, it will be 48 interpreted as a full command itself: 49 50 ```javascript 51 exec: { 52 echo_something: 'echo "This is something"' 53 } 54 ``` 39 55 40 56 ### Command Functions 41 57 42 If you plan on doing advanced stuff with grunt-exec, you'll most likely be using functions for the `command` property of your exec targets. This section details a couple of helpful tips about command functions that could help make your life easier. 58 If you plan on doing advanced stuff with grunt-exec, you'll most likely be using 59 functions for the `command` property of your exec targets. This section details 60 a couple of helpful tips about command functions that could help make your life 61 easier. 43 62 44 63 #### Passing arguments from the command line 45 64 46 Command functions can be called with arbitrary arguments. Let's say we have the following exec target that echoes a formatted name: 65 Command functions can be called with arbitrary arguments. Let's say we have the 66 following exec target that echoes a formatted name: 47 67 48 68 ```javascript … … 61 81 ``` 62 82 63 In order to get `SIMPSON, HOMER` echoed, you'd run `grunt exec:echo_name:homer:simpson` from the command line. 83 In order to get `SIMPSON, HOMER` echoed, you'd run 84 `grunt exec:echo_name:homer:simpson` from the command line. 64 85 65 86 ### Accessing `grunt` object 66 87 67 All command functions are called in the context of the `grunt` object that they are being ran with. This means you can access the `grunt` object through `this`. 88 All command functions are called in the context of the `grunt` object that they 89 are being ran with. This means you can access the `grunt` object through `this`. 68 90 69 91 ### Example … … 82 104 cmd: 'ls -l **' 83 105 }, 106 list_all_files: 'ls -la', 84 107 echo_grunt_version: { 85 108 cmd: function() { return 'echo ' + this.version; } … … 117 140 ---------- 118 141 119 For transparency and insight into the release cycle, releases will be numbered with the follow format: 142 For transparency and insight into the release cycle, releases will be numbered 143 with the follow format: 120 144 121 145 `<major>.<minor>.<patch>` -
Dev/trunk/node_modules/grunt-exec/package.json
r484 r516 2 2 "name": "grunt-exec", 3 3 "description": "Grunt task for executing shell commands.", 4 "version": "0.4. 2",4 "version": "0.4.5", 5 5 "homepage": "https://github.com/jharding/grunt-exec", 6 6 "author": { … … 40 40 "shell" 41 41 ], 42 "readme": "[](http://travis-ci.org/jharding/grunt-exec)\ngrunt-exec\n==========\n\nGrunt plugin for executing shell commands.\n\nInstallation\n------------\n\nInstall grunt-exec using npm:\n\n```\n$ npm install grunt-exec\n```\n\nThen add this line to your project's *Gruntfile.js*:\n\n```javascript\ngrunt.loadNpmTasks('grunt-exec');\n```\n\nUsage\n-----\n\nThis plugin is a [multi task][types_of_tasks], meaning that grunt will automatically iterate over all exec targets if a target is not specified.\n\nIf the exit code generated by the specified shell command is greater than 0, grunt-exec will assume an error has occurred and will abort grunt immediately.\n\n[types_of_tasks]: https://github.com/gruntjs/grunt/blob/master/docs/types_of_tasks.md#multi-tasks\n\n### Properties\n\n* __command__: The shell command to be executed. Must be a string or a function that returns a string. (alias: __cmd__)\n* __stdout__: If `true`, stdout will be printed. Defaults to `true`.\n* __stderr__: If `true`, stderr will be printed. Defaults to `true`.\n* __cwd__: Current working directory of the shell command. Defaults to the directory containing your Gruntfile.\n* __exitCode__: The expected exit code, task will fail if the actual exit code doesn't match. Defaults to `0`.\n* __callback__: The callback function passed `child_process.exec`. Defaults to a noop.\n\n### Command Functions\n\nIf you plan on doing advanced stuff with grunt-exec, you'll most likely be using functions for the `command` property of your exec targets. This section details a couple of helpful tips about command functions that could help make your life easier.\n\n#### Passing arguments from the command line\n\nCommand functions can be called with arbitrary arguments. Let's say we have the following exec target that echoes a formatted name:\n\n```javascript\nexec: {\n echo_name: {\n cmd: function(firstName, lastName) {\n var formattedName = [\n lastName.toUpperCase(),\n firstName.toUpperCase()\n ].join(', ');\n\n return 'echo ' + formattedName;\n }\n }\n}\n```\n\nIn order to get `SIMPSON, HOMER` echoed, you'd run `grunt exec:echo_name:homer:simpson` from the command line.\n\n### Accessing `grunt` object\n\nAll command functions are called in the context of the `grunt` object that they are being ran with. This means you can access the `grunt` object through `this`.\n\n### Example\n\nThe following examples are available in grunt-exec's Gruntfile.\n\n```javascript\ngrunt.initConfig({\n exec: {\n remove_logs: {\n command: 'rm -f *.log',\n stdout: false,\n stderr: false\n },\n list_files: {\n cmd: 'ls -l **'\n },\n echo_grunt_version: {\n cmd: function() { return 'echo ' + this.version; }\n },\n echo_name: {\n cmd: function(firstName, lastName) {\n var formattedName = [\n lastName.toUpperCase(),\n firstName.toUpperCase()\n ].join(', ');\n\n return 'echo ' + formattedName;\n }\n }\n }\n});\n```\n\nTesting\n-------\n\n```\n$ cd grunt-exec\n$ npm test\n```\n\nIssues\n------\n\nFound a bug? Create an issue on GitHub.\n\nhttps://github.com/jharding/grunt-exec/issues\n\nVersioning\n----------\n\nFor transparency and insight into the release cycle, releases will be numberedwith the follow format:\n\n`<major>.<minor>.<patch>`\n\nAnd constructed with the following guidelines:\n\n* Breaking backwards compatibility bumps the major\n* New additions without breaking backwards compatibility bumps the minor\n* Bug fixes and misc changes bump the patch\n\nFor more information on semantic versioning, please visit http://semver.org/.\n\nLicense\n-------\n\nCopyright (c) 2012 [Jake Harding](http://thejakeharding.com) \nLicensed under the MIT License.\n",42 "readme": "[](http://travis-ci.org/jharding/grunt-exec)\ngrunt-exec\n==========\n\nGrunt plugin for executing shell commands.\n\nInstallation\n------------\n\nInstall grunt-exec using npm:\n\n```\n$ npm install grunt-exec\n```\n\nThen add this line to your project's *Gruntfile.js*:\n\n```javascript\ngrunt.loadNpmTasks('grunt-exec');\n```\n\nUsage\n-----\n\nThis plugin is a [multi task][types_of_tasks], meaning that grunt will \nautomatically iterate over all exec targets if a target is not specified.\n\nIf the exit code generated by the specified shell command is greater than 0, \ngrunt-exec will assume an error has occurred and will abort grunt immediately.\n\n[types_of_tasks]: http://gruntjs.com/configuring-tasks#task-configuration-and-targets\n\n### Properties\n\n* __command__ (alias: __cmd__): The shell command to be executed. Must be a \n string or a function that returns a string.\n* __stdout__: If `true`, stdout will be printed. Defaults to `true`.\n* __stderr__: If `true`, stderr will be printed. Defaults to `true`.\n* __cwd__: Current working directory of the shell command. Defaults to the \n directory containing your Gruntfile.\n* __exitCode__ (alias: __exitCodes__): The expected exit code(s), task will \n fail if the actual exit code doesn't match. Defaults to `0`. Can be an array \n for multiple allowed exit codes.\n* __callback__: The callback function passed `child_process.exec`. Defaults to \n a noop.\n\nIf the configuration is instead a simple `string`, it will be\ninterpreted as a full command itself:\n\n```javascript\nexec: {\n echo_something: 'echo \"This is something\"'\n}\n```\n\n### Command Functions\n\nIf you plan on doing advanced stuff with grunt-exec, you'll most likely be using \nfunctions for the `command` property of your exec targets. This section details \na couple of helpful tips about command functions that could help make your life \neasier.\n\n#### Passing arguments from the command line\n\nCommand functions can be called with arbitrary arguments. Let's say we have the \nfollowing exec target that echoes a formatted name:\n\n```javascript\nexec: {\n echo_name: {\n cmd: function(firstName, lastName) {\n var formattedName = [\n lastName.toUpperCase(),\n firstName.toUpperCase()\n ].join(', ');\n\n return 'echo ' + formattedName;\n }\n }\n}\n```\n\nIn order to get `SIMPSON, HOMER` echoed, you'd run \n`grunt exec:echo_name:homer:simpson` from the command line.\n\n### Accessing `grunt` object\n\nAll command functions are called in the context of the `grunt` object that they \nare being ran with. This means you can access the `grunt` object through `this`.\n\n### Example\n\nThe following examples are available in grunt-exec's Gruntfile.\n\n```javascript\ngrunt.initConfig({\n exec: {\n remove_logs: {\n command: 'rm -f *.log',\n stdout: false,\n stderr: false\n },\n list_files: {\n cmd: 'ls -l **'\n },\n list_all_files: 'ls -la',\n echo_grunt_version: {\n cmd: function() { return 'echo ' + this.version; }\n },\n echo_name: {\n cmd: function(firstName, lastName) {\n var formattedName = [\n lastName.toUpperCase(),\n firstName.toUpperCase()\n ].join(', ');\n\n return 'echo ' + formattedName;\n }\n }\n }\n});\n```\n\nTesting\n-------\n\n```\n$ cd grunt-exec\n$ npm test\n```\n\nIssues\n------\n\nFound a bug? Create an issue on GitHub.\n\nhttps://github.com/jharding/grunt-exec/issues\n\nVersioning\n----------\n\nFor transparency and insight into the release cycle, releases will be numbered \nwith the follow format:\n\n`<major>.<minor>.<patch>`\n\nAnd constructed with the following guidelines:\n\n* Breaking backwards compatibility bumps the major\n* New additions without breaking backwards compatibility bumps the minor\n* Bug fixes and misc changes bump the patch\n\nFor more information on semantic versioning, please visit http://semver.org/.\n\nLicense\n-------\n\nCopyright (c) 2012 [Jake Harding](http://thejakeharding.com) \nLicensed under the MIT License.\n", 43 43 "readmeFilename": "README.md", 44 "_id": "grunt-exec@0.4. 2",44 "_id": "grunt-exec@0.4.5", 45 45 "dist": { 46 "shasum": " 021f0dddaeef00cc4d83dff9d0d8c47a64917dbd"46 "shasum": "2848b5f9ed0a096b459a637aad35cc89098b7958" 47 47 }, 48 "_from": "grunt-exec@0.4. 2",49 "_resolved": "https://registry.npmjs.org/grunt-exec/-/grunt-exec-0.4. 2.tgz"48 "_from": "grunt-exec@0.4.5", 49 "_resolved": "https://registry.npmjs.org/grunt-exec/-/grunt-exec-0.4.5.tgz" 50 50 } -
Dev/trunk/node_modules/grunt-exec/tasks/exec.js
r484 r516 18 18 , stderr = data.stderr !== undefined ? data.stderr : true 19 19 , callback = _.isFunction(data.callback) ? data.callback : function() {} 20 , exitCode = data.exitCode|| 020 , exitCodes = data.exitCode || data.exitCodes || 0 21 21 , command 22 22 , childProcess … … 24 24 , done = this.async(); 25 25 26 // https://github.com/jharding/grunt-exec/pull/30 27 exitCodes = _.isArray(exitCodes) ? exitCodes : [exitCodes]; 28 26 29 // allow for command to be specified in either 27 // 'command' or 'cmd' property 28 command = data.command || data.cmd ;30 // 'command' or 'cmd' property, or as a string. 31 command = data.command || data.cmd || (_.isString(data) && data); 29 32 30 33 data.cwd && (execOptions.cwd = data.cwd); … … 46 49 47 50 verbose.subhead(command); 48 verbose.writeln(f('Expecting exit code % d', exitCode));51 verbose.writeln(f('Expecting exit code %s', exitCodes.join(' or '))); 49 52 50 53 childProcess = cp.exec(command, execOptions, callback); … … 54 57 55 58 childProcess.on('exit', function(code) { 56 if ( code !== exitCode) {59 if (exitCodes.indexOf(code) < 0) { 57 60 log.error(f('Exited with code: %d.', code)); 58 61 return done(false); -
Dev/trunk/node_modules/grunt-exec/test/Gruntfile.js
r484 r516 21 21 cmd: function(){ 22 22 return 'echo "you can use callback, and error, stdout, stderr can be used as arguments"'; 23 }, 24 callback: function(error, stdout, stderr){ 25 var fs = require('fs'); 26 var path = require('path'); 27 var outputPath = path.resolve(process.cwd(), 'test4'); 23 } 24 , callback: function(error, stdout, stderr){ 25 var fs = require('fs') 26 , path = require('path') 27 , outputPath = path.resolve(process.cwd(), 'test4'); 28 28 29 console.log('outputPath : ' + outputPath); 29 30 fs.writeFileSync(outputPath, stdout, 'utf-8'); 30 31 } 31 32 } 33 , test5: { 34 cmd: 'exit 8' 35 , exitCodes: 8 36 } 37 , test6: { 38 cmd: 'exit 9' 39 , exitCodes: [8, 9] 40 } 41 , test7: 'echo "you don\'t even need an object" > test7' 32 42 } 33 43 }); -
Dev/trunk/node_modules/grunt-exec/test/test.js
r484 r516 5 5 , testDir = path.join(process.cwd(), 'test') 6 6 , opts = { gruntfile: path.join(testDir, 'Gruntfile.js') } 7 , tasks = ['exec:test1', 'exec:test2', 'exec:test3:42:love', 'exec:test4']; 7 , tasks = [ 8 'exec:test1' 9 , 'exec:test2' 10 , 'exec:test3:42:love' 11 , 'exec:test4' 12 , 'exec:test5' 13 , 'exec:test6' 14 , 'exec:test7' 15 ]; 8 16 9 17 grunt.tasks(tasks, opts, function() { … … 21 29 , expected:'you can use callback, and error, stdout, stderr can be used as arguments\n' 22 30 } 31 , { name: 'test7', expected: 'you don\'t even need an object\n' } 23 32 ] 24 33 , outputPath; -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/commander/package.json
r484 r516 38 38 "homepage": "https://github.com/visionmedia/commander.js", 39 39 "_id": "commander@1.1.1", 40 "_from": "commander@1.1.1", 41 "dist": { 42 "shasum": "3b3219c6eb9dd58595193f8fad0c4347e62a5df7" 43 }, 44 "_resolved": "https://registry.npmjs.org/commander/-/commander-1.1.1.tgz" 40 "_from": "commander@1.1.1" 45 41 } -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/csslint/package.json
r484 r516 42 42 "homepage": "https://github.com/stubbornella/csslint", 43 43 "_id": "csslint@0.9.10", 44 "_from": "csslint@0.9.10",45 44 "dist": { 46 45 "shasum": "532edf42f35158c9aaaa90590d97c3de8c9487d4" 47 46 }, 47 "_from": "csslint@0.9.10", 48 48 "_resolved": "https://registry.npmjs.org/csslint/-/csslint-0.9.10.tgz" 49 49 } -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/cli/node_modules/glob/glob.js
r484 r516 77 77 } 78 78 79 this._processingEmitQueue = false 79 80 80 81 glob.Glob = Glob … … 99 100 options = options || {} 100 101 102 this._endEmitted = false 101 103 this.EOF = {} 102 104 this._emitQueue = [] 105 106 this.paused = false 107 this._processingEmitQueue = false 103 108 104 109 this.maxDepth = options.maxDepth || 1000 … … 217 222 if (this.mark) { 218 223 // at *some* point we statted all of these 219 all = all.map(function (m) { 220 var sc = this.cache[m] 221 if (!sc) 222 return m 223 var isDir = (Array.isArray(sc) || sc === 2) 224 if (isDir && m.slice(-1) !== "/") { 225 return m + "/" 226 } 227 if (!isDir && m.slice(-1) === "/") { 228 return m.replace(/\/+$/, "") 229 } 230 return m 231 }, this) 224 all = all.map(this._mark, this) 232 225 } 233 226 … … 246 239 function alphasort (a, b) { 247 240 return a > b ? 1 : a < b ? -1 : 0 241 } 242 243 Glob.prototype._mark = function (p) { 244 var c = this.cache[p] 245 var m = p 246 if (c) { 247 var isDir = c === 2 || Array.isArray(c) 248 var slash = p.slice(-1) === '/' 249 250 if (isDir && !slash) 251 m += '/' 252 else if (!isDir && slash) 253 m = m.slice(0, -1) 254 255 if (m !== p) { 256 this.statCache[m] = this.statCache[p] 257 this.cache[m] = this.cache[p] 258 } 259 } 260 261 return m 248 262 } 249 263 … … 272 286 273 287 Glob.prototype.emitMatch = function (m) { 274 if (!this.stat || this.statCache[m] || m === this.EOF) { 275 this._emitQueue.push(m) 276 this._processEmitQueue() 277 } else { 278 this._stat(m, function(exists, isDir) { 279 if (exists) { 280 this._emitQueue.push(m) 281 this._processEmitQueue() 282 } 283 }) 284 } 288 this.log('emitMatch', m) 289 this._emitQueue.push(m) 290 this._processEmitQueue() 285 291 } 286 292 287 293 Glob.prototype._processEmitQueue = function (m) { 294 this.log("pEQ paused=%j processing=%j m=%j", this.paused, 295 this._processingEmitQueue, m) 296 var done = false 288 297 while (!this._processingEmitQueue && 289 298 !this.paused) { 290 299 this._processingEmitQueue = true 291 300 var m = this._emitQueue.shift() 301 this.log(">processEmitQueue", m === this.EOF ? ":EOF:" : m) 292 302 if (!m) { 303 this.log(">processEmitQueue, falsey m") 293 304 this._processingEmitQueue = false 294 305 break 295 306 } 296 307 297 this.log('emit!', m === this.EOF ? "end" : "match") 298 299 this.emit(m === this.EOF ? "end" : "match", m) 300 this._processingEmitQueue = false 301 } 308 if (m === this.EOF || !(this.mark && !this.stat)) { 309 this.log("peq: unmarked, or eof") 310 next.call(this, 0, false) 311 } else if (this.statCache[m]) { 312 var sc = this.statCache[m] 313 var exists 314 if (sc) 315 exists = sc.isDirectory() ? 2 : 1 316 this.log("peq: stat cached") 317 next.call(this, exists, exists === 2) 318 } else { 319 this.log("peq: _stat, then next") 320 this._stat(m, next) 321 } 322 323 function next(exists, isDir) { 324 this.log("next", m, exists, isDir) 325 var ev = m === this.EOF ? "end" : "match" 326 327 // "end" can only happen once. 328 assert(!this._endEmitted) 329 if (ev === "end") 330 this._endEmitted = true 331 332 if (exists) { 333 // Doesn't mean it necessarily doesn't exist, it's possible 334 // we just didn't check because we don't care that much, or 335 // this is EOF anyway. 336 if (isDir && !m.match(/\/$/)) { 337 m = m + "/" 338 } else if (!isDir && m.match(/\/$/)) { 339 m = m.replace(/\/+$/, "") 340 } 341 } 342 this.log("emit", ev, m) 343 this.emit(ev, m) 344 this._processingEmitQueue = false 345 if (done && m !== this.EOF && !this.paused) 346 this._processEmitQueue() 347 } 348 } 349 done = true 302 350 } 303 351 -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/cli/node_modules/glob/package.json
r484 r516 7 7 "name": "glob", 8 8 "description": "a little globber", 9 "version": "3.2. 7",9 "version": "3.2.9", 10 10 "repository": { 11 11 "type": "git", … … 26 26 }, 27 27 "scripts": { 28 "test": "tap test/*.js" 28 "test": "tap test/*.js", 29 "test-regen": "TEST_REGEN=1 node test/00-setup.js" 29 30 }, 30 31 "license": "BSD", … … 35 36 }, 36 37 "homepage": "https://github.com/isaacs/node-glob", 37 "_id": "glob@3.2.7", 38 "dist": { 39 "shasum": "cd490a505ff7f2aef7a29ce0e4ce83d995ddbfc6" 40 }, 41 "_from": "glob@>= 3.1.4", 42 "_resolved": "https://registry.npmjs.org/glob/-/glob-3.2.7.tgz" 38 "_id": "glob@3.2.9", 39 "_from": "glob@>= 3.1.4" 43 40 } -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/cli/node_modules/glob/test/bash-results.json
r484 r516 299 299 "./test/nocase-nomagic.js", 300 300 "./test/pause-resume.js", 301 "./test/readme-issue.js", 301 302 "./test/root-nomount.js", 302 303 "./test/root.js", -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/cli/node_modules/glob/test/mark.js
r484 r516 2 2 var glob = require('../') 3 3 process.chdir(__dirname) 4 5 // expose timing issues 6 var lag = 5 7 glob.Glob.prototype._stat = function(o) { return function(f, cb) { 8 var args = arguments 9 setTimeout(function() { 10 o.call(this, f, cb) 11 }.bind(this), lag += 5) 12 }}(glob.Glob.prototype._stat) 13 14 15 test("mark, with **", function (t) { 16 glob("a/*b*/**", {mark: true}, function (er, results) { 17 if (er) 18 throw er 19 var expect = 20 [ 'a/abcdef/', 21 'a/abcdef/g/', 22 'a/abcdef/g/h', 23 'a/abcfed/', 24 'a/abcfed/g/', 25 'a/abcfed/g/h', 26 'a/b/', 27 'a/b/c/', 28 'a/b/c/d', 29 'a/bc/', 30 'a/bc/e/', 31 'a/bc/e/f', 32 'a/cb/', 33 'a/cb/e/', 34 'a/cb/e/f' ] 35 36 t.same(results, expect) 37 t.end() 38 }) 39 }) 4 40 5 41 test("mark, no / on pattern", function (t) { … … 19 55 t.same(results, expect) 20 56 t.end() 57 }).on('match', function(m) { 58 t.similar(m, /\/$/) 21 59 }) 22 60 }) … … 37 75 t.same(results, expect) 38 76 t.end() 77 }).on('match', function(m) { 78 t.similar(m, /[^\/]$/) 39 79 }) 40 80 }) … … 54 94 t.same(results, expect) 55 95 t.end() 96 }).on('match', function(m) { 97 t.similar(m, /\/$/) 56 98 }) 57 99 }) … … 71 113 t.same(results, expect) 72 114 t.end() 115 }).on('match', function(m) { 116 t.similar(m, /\/$/) 73 117 }) 74 118 }) -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/cli/package.json
r484 r516 50 50 "readmeFilename": "README.md", 51 51 "_id": "cli@0.4.5", 52 "dist": {53 "shasum": "e4be7ec0a35b5ce30039b58f9382fc4f4b881810"54 },55 52 "_from": "cli@0.4.x", 56 "_resolved": "https://registry.npmjs.org/cli/-/cli-0.4.5.tgz",57 53 "scripts": {} 58 54 } -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/esprima/esprima.js
r484 r516 243 243 244 244 function isIdentifierStart(ch) { 245 return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)246 (ch >= 65 && ch <= 90) || // A..Z247 (ch >= 97 && ch <= 122) ||// a..z248 (ch === 92) ||// \ (backslash)245 return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) 246 (ch >= 0x41 && ch <= 0x5A) || // A..Z 247 (ch >= 0x61 && ch <= 0x7A) || // a..z 248 (ch === 0x5C) || // \ (backslash) 249 249 ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))); 250 250 } 251 251 252 252 function isIdentifierPart(ch) { 253 return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)254 (ch >= 65 && ch <= 90) || // A..Z255 (ch >= 97 && ch <= 122) ||// a..z256 (ch >= 48 && ch <= 57) || // 0..9257 (ch === 92) ||// \ (backslash)253 return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) 254 (ch >= 0x41 && ch <= 0x5A) || // A..Z 255 (ch >= 0x61 && ch <= 0x7A) || // a..z 256 (ch >= 0x30 && ch <= 0x39) || // 0..9 257 (ch === 0x5C) || // \ (backslash) 258 258 ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))); 259 259 } … … 431 431 ch = source.charCodeAt(index); 432 432 if (isLineTerminator(ch)) { 433 if (ch === 13 && source.charCodeAt(index + 1) === 10) {433 if (ch === 0x0D && source.charCodeAt(index + 1) === 0x0A) { 434 434 ++index; 435 435 } … … 440 440 throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); 441 441 } 442 } else if (ch === 42) {443 // Block comment ends with '*/' (char #42, char #47).444 if (source.charCodeAt(index + 1) === 47) {442 } else if (ch === 0x2A) { 443 // Block comment ends with '*/'. 444 if (source.charCodeAt(index + 1) === 0x2F) { 445 445 ++index; 446 446 ++index; … … 475 475 } else if (isLineTerminator(ch)) { 476 476 ++index; 477 if (ch === 13 && source.charCodeAt(index) === 10) {477 if (ch === 0x0D && source.charCodeAt(index) === 0x0A) { 478 478 ++index; 479 479 } … … 481 481 lineStart = index; 482 482 start = true; 483 } else if (ch === 47) { // 47is '/'483 } else if (ch === 0x2F) { // U+002F is '/' 484 484 ch = source.charCodeAt(index + 1); 485 if (ch === 47) {485 if (ch === 0x2F) { 486 486 ++index; 487 487 ++index; 488 488 skipSingleLineComment(); 489 489 start = true; 490 } else if (ch === 42) { // 42is '*'490 } else if (ch === 0x2A) { // U+002A is '*' 491 491 ++index; 492 492 ++index; … … 495 495 break; 496 496 } 497 } else if (start && ch === 45) { // 45is '-'498 // 62is '>'499 if ((source.charCodeAt(index + 1) === 45) && (source.charCodeAt(index + 2) === 62)) {497 } else if (start && ch === 0x2D) { // U+002D is '-' 498 // U+003E is '>' 499 if ((source.charCodeAt(index + 1) === 0x2D) && (source.charCodeAt(index + 2) === 0x3E)) { 500 500 // '-->' is a single-line comment 501 501 index += 3; … … 504 504 break; 505 505 } 506 } else if (ch === 60) { // 60is '<'506 } else if (ch === 0x3C) { // U+003C is '<' 507 507 if (source.slice(index + 1, index + 4) === '!--') { 508 508 ++index; // `<` … … 541 541 id = String.fromCharCode(ch); 542 542 543 // '\u' ( char #92, char #117) denotes an escaped character.544 if (ch === 92) {545 if (source.charCodeAt(index) !== 117) {543 // '\u' (U+005C, U+0075) denotes an escaped character. 544 if (ch === 0x5C) { 545 if (source.charCodeAt(index) !== 0x75) { 546 546 throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); 547 547 } … … 562 562 id += String.fromCharCode(ch); 563 563 564 // '\u' ( char #92, char #117) denotes an escaped character.565 if (ch === 92) {564 // '\u' (U+005C, U+0075) denotes an escaped character. 565 if (ch === 0x5C) { 566 566 id = id.substr(0, id.length - 1); 567 if (source.charCodeAt(index) !== 117) {567 if (source.charCodeAt(index) !== 0x75) { 568 568 throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); 569 569 } … … 586 586 while (index < length) { 587 587 ch = source.charCodeAt(index); 588 if (ch === 92) {589 // Blackslash ( char #92) marks Unicode escape sequence.588 if (ch === 0x5C) { 589 // Blackslash (U+005C) marks Unicode escape sequence. 590 590 index = start; 591 591 return getEscapedIdentifier(); … … 606 606 start = index; 607 607 608 // Backslash ( char #92) starts an escaped character.609 id = (source.charCodeAt(index) === 92) ? getEscapedIdentifier() : getIdentifier();608 // Backslash (U+005C) starts an escaped character. 609 id = (source.charCodeAt(index) === 0x5C) ? getEscapedIdentifier() : getIdentifier(); 610 610 611 611 // There is no keyword or literal with only one character. … … 647 647 648 648 // Check for most common single-character punctuators. 649 case 46:// . dot650 case 40:// ( open bracket651 case 41:// ) close bracket652 case 59:// ; semicolon653 case 44:// , comma654 case 123: // { open curly brace655 case 125: // } close curly brace656 case 91:// [657 case 93:// ]658 case 58:// :659 case 63:// ?660 case 126: // ~649 case 0x2E: // . dot 650 case 0x28: // ( open bracket 651 case 0x29: // ) close bracket 652 case 0x3B: // ; semicolon 653 case 0x2C: // , comma 654 case 0x7B: // { open curly brace 655 case 0x7D: // } close curly brace 656 case 0x5B: // [ 657 case 0x5D: // ] 658 case 0x3A: // : 659 case 0x3F: // ? 660 case 0x7E: // ~ 661 661 ++index; 662 662 if (extra.tokenize) { 663 if (code === 40) {663 if (code === 0x28) { 664 664 extra.openParenToken = extra.tokens.length; 665 } else if (code === 123) {665 } else if (code === 0x7B) { 666 666 extra.openCurlyToken = extra.tokens.length; 667 667 } … … 678 678 code2 = source.charCodeAt(index + 1); 679 679 680 // '=' ( char #61) marks an assignment or comparison operator.681 if (code2 === 61) {680 // '=' (U+003D) marks an assignment or comparison operator. 681 if (code2 === 0x3D) { 682 682 switch (code) { 683 case 37: // %684 case 38: // &685 case 42: // *:686 case 43: // +687 case 45: // -688 case 47: // /689 case 60: // <690 case 62: // >691 case 94: // ^692 case 124:// |683 case 0x25: // % 684 case 0x26: // & 685 case 0x2A: // *: 686 case 0x2B: // + 687 case 0x2D: // - 688 case 0x2F: // / 689 case 0x3C: // < 690 case 0x3E: // > 691 case 0x5E: // ^ 692 case 0x7C: // | 693 693 index += 2; 694 694 return { … … 700 700 }; 701 701 702 case 33: // !703 case 61: // =702 case 0x21: // ! 703 case 0x3D: // = 704 704 index += 2; 705 705 706 706 // !== and === 707 if (source.charCodeAt(index) === 61) {707 if (source.charCodeAt(index) === 0x3D) { 708 708 ++index; 709 709 } … … 1262 1262 1263 1263 // Very common: ( and ) and ; 1264 if (ch === 40 || ch === 41 || ch === 58) {1264 if (ch === 0x28 || ch === 0x29 || ch === 0x3A) { 1265 1265 return scanPunctuator(); 1266 1266 } 1267 1267 1268 // String literal starts with single quote ( #39) or double quote (#34).1269 if (ch === 39 || ch === 34) {1268 // String literal starts with single quote (U+0027) or double quote (U+0022). 1269 if (ch === 0x27 || ch === 0x22) { 1270 1270 return scanStringLiteral(); 1271 1271 } … … 1275 1275 } 1276 1276 1277 // Dot (.) char #46can also start a floating-point number, hence the need1277 // Dot (.) U+002E can also start a floating-point number, hence the need 1278 1278 // to check the next character. 1279 if (ch === 46) {1279 if (ch === 0x2E) { 1280 1280 if (isDecimalDigit(source.charCodeAt(index + 1))) { 1281 1281 return scanNumericLiteral(); … … 1288 1288 } 1289 1289 1290 // Slash (/) char #47can also start a regex.1291 if (extra.tokenize && ch === 47) {1290 // Slash (/) U+002F can also start a regex. 1291 if (extra.tokenize && ch === 0x2F) { 1292 1292 return advanceSlash(); 1293 1293 } … … 1935 1935 var line; 1936 1936 1937 // Catch the very common case first: immediately a semicolon ( char #59).1938 if (source.charCodeAt(index) === 59) {1937 // Catch the very common case first: immediately a semicolon (U+003B). 1938 if (source.charCodeAt(index) === 0x3B) { 1939 1939 lex(); 1940 1940 return; … … 2893 2893 2894 2894 // Optimize the most common form: 'continue;'. 2895 if (source.charCodeAt(index) === 59) {2895 if (source.charCodeAt(index) === 0x3B) { 2896 2896 lex(); 2897 2897 … … 2936 2936 expectKeyword('break'); 2937 2937 2938 // Catch the very common case first: immediately a semicolon ( char #59).2939 if (source.charCodeAt(index) === 59) {2938 // Catch the very common case first: immediately a semicolon (U+003B). 2939 if (source.charCodeAt(index) === 0x3B) { 2940 2940 lex(); 2941 2941 … … 2985 2985 2986 2986 // 'return' followed by a space and an identifier is very common. 2987 if (source.charCodeAt(index) === 32) {2987 if (source.charCodeAt(index) === 0x20) { 2988 2988 if (isIdentifierStart(source.charCodeAt(index + 1))) { 2989 2989 argument = parseExpression(); -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/esprima/package.json
r484 r516 23 23 "url": "http://github.com/ariya/esprima.git" 24 24 }, 25 "bugs": { 26 "url": "http://issues.esprima.org" 27 }, 25 28 "licenses": [ 26 29 { … … 31 34 "devDependencies": { 32 35 "jslint": "~0.1.9", 33 "eslint": "~0.1.0", 36 "eslint": "~0.3.0", 37 "jscs": "~1.2.4", 34 38 "istanbul": "~0.1.27", 35 39 "complexity-report": "~0.6.1", 36 40 "regenerate": "~0.5.4", 37 "unicode-6.3.0": "~0.1.0" 41 "unicode-6.3.0": "~0.1.0", 42 "json-diff": "~0.3.1", 43 "optimist": "~0.6.0" 38 44 }, 39 45 "keywords": [ … … 47 53 "generate-regex": "node tools/generate-identifier-regex.js", 48 54 "test": "npm run-script lint && node test/run.js && npm run-script coverage && npm run-script complexity", 49 "lint": "node tools/check-version.js && node_modules/eslint/bin/eslint.js esprima.js && node_modules/jslint/bin/jslint.js esprima.js", 55 "lint": "npm run-script check-version && npm run-script eslint && npm run-script jscs && npm run-script jslint", 56 "check-version": "node tools/check-version.js", 57 "eslint": "node node_modules/eslint/bin/eslint.js esprima.js", 58 "jscs": "node node_modules/.bin/jscs esprima.js", 59 "jslint": "node node_modules/jslint/bin/jslint.js esprima.js", 50 60 "coverage": "npm run-script analyze-coverage && npm run-script check-coverage", 51 61 "analyze-coverage": "node node_modules/istanbul/lib/cli.js cover test/runner.js", … … 59 69 "readme": "**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance,\nstandard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\nparser written in ECMAScript (also popularly known as\n[JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)).\nEsprima is created and maintained by [Ariya Hidayat](http://twitter.com/ariyahidayat),\nwith the help of [many contributors](https://github.com/ariya/esprima/contributors).\n\n### Features\n\n- Full support for ECMAScript 5.1 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm))\n- Sensible [syntax tree format](http://esprima.org/doc/index.html#ast) compatible with Mozilla\n[Parser AST](https://developer.mozilla.org/en/SpiderMonkey/Parser_API)\n- Optional tracking of syntax node location (index-based and line-column)\n- Heavily tested (> 600 [unit tests](http://esprima.org/test/) with solid statement and branch coverage)\n- Experimental support for ES6/Harmony (module, class, destructuring, ...)\n\nEsprima serves as a **building block** for some JavaScript\nlanguage tools, from [code instrumentation](http://esprima.org/demo/functiontrace.html)\nto [editor autocompletion](http://esprima.org/demo/autocomplete.html).\n\nEsprima runs on many popular web browsers, as well as other ECMAScript platforms such as\n[Rhino](http://www.mozilla.org/rhino) and [Node.js](https://npmjs.org/package/esprima).\n\nFor more information, check the web site [esprima.org](http://esprima.org).\n", 60 70 "readmeFilename": "README.md", 61 "bugs": {62 "url": "https://github.com/ariya/esprima/issues"63 },64 71 "_id": "esprima@1.1.0-dev", 65 72 "dist": { 66 "shasum": " ae2e2124f41c4b23d858b820ebc75fccb1982219"73 "shasum": "b2624b515cd299ba33f1f2499fbf40b742ead616" 67 74 }, 68 75 "_from": "https://github.com/ariya/esprima/tarball/master", -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/esprima/test/benchmarks.js
r484 r516 33 33 fullFixture = [ 34 34 'Underscore 1.5.2', 35 'Backbone 1. 0.0',35 'Backbone 1.1.0', 36 36 'MooTools 1.4.5', 37 37 'jQuery 1.9.1', 38 38 'YUI 3.12.0', 39 39 'jQuery.Mobile 1.3.2', 40 'Angular 1. 0.8'40 'Angular 1.2.5' 41 41 ]; 42 42 43 43 quickFixture = [ 44 'Backbone 1. 0.0',44 'Backbone 1.1.0', 45 45 'jQuery 1.9.1', 46 'Angular 1. 0.6'46 'Angular 1.2.5' 47 47 ]; 48 48 -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/esprima/test/compare.js
r484 r516 40 40 fixtureList = [ 41 41 'Underscore 1.5.2', 42 'Backbone 1. 0.0',42 'Backbone 1.1.0', 43 43 'jQuery 1.9.1' 44 44 ]; -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/esprima/test/parselibs.js
r484 r516 30 30 fixture = [ 31 31 'Underscore 1.5.2', 32 'Backbone 1. 0.0',32 'Backbone 1.1.0', 33 33 'MooTools 1.4.5', 34 34 'jQuery 1.9.1', 35 35 'YUI 3.12.0', 36 36 'jQuery.Mobile 1.3.2', 37 'Angular 1. 0.8'37 'Angular 1.2.5' 38 38 ]; 39 39 -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/esprima/test/runner.js
r484 r516 418 418 vm = require('vm'), 419 419 fs = require('fs'), 420 diff = require('json-diff').diffString, 420 421 total = 0, 421 422 failures = [], … … 445 446 console.error(header); 446 447 failures.forEach(function (failure) { 447 console.error(failure.source + ': Expected\n ' + 448 failure.expected.split('\n').join('\n ') + 449 '\nto match\n ' + failure.actual); 448 try { 449 var expectedObject = JSON.parse(failure.expected); 450 var actualObject = JSON.parse(failure.actual); 451 452 console.error(failure.source + ': Expected\n ' + 453 failure.expected.split('\n').join('\n ') + 454 '\nto match\n ' + failure.actual + '\nDiff:\n' + 455 diff(expectedObject, actualObject)); 456 } catch (ex) { 457 console.error(failure.source + ': Expected\n ' + 458 failure.expected.split('\n').join('\n ') + 459 '\nto match\n ' + failure.actual); 460 } 450 461 }); 451 462 } else { -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/minimatch/README.md
r484 r516 20 20 minimatch("bar.foo", "*.foo") // true! 21 21 minimatch("bar.foo", "*.bar") // false! 22 minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! 22 23 ``` 23 24 … … 36 37 * `man 3 fnmatch` 37 38 * `man 5 gitignore` 38 39 ### Comparisons to other fnmatch/glob implementations40 41 While strict compliance with the existing standards is a worthwhile42 goal, some discrepancies exist between minimatch and other43 implementations, and are intentional.44 45 If the pattern starts with a `!` character, then it is negated. Set the46 `nonegate` flag to suppress this behavior, and treat leading `!`47 characters normally. This is perhaps relevant if you wish to start the48 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`49 characters at the start of a pattern will negate the pattern multiple50 times.51 52 If a pattern starts with `#`, then it is treated as a comment, and53 will not match anything. Use `\#` to match a literal `#` at the54 start of a line, or set the `nocomment` flag to suppress this behavior.55 56 The double-star character `**` is supported by default, unless the57 `noglobstar` flag is set. This is supported in the manner of bsdglob58 and bash 4.1, where `**` only has special significance if it is the only59 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but60 `a/**b` will not. **Note that this is different from the way that `**` is61 handled by ruby's `Dir` class.**62 63 If an escaped pattern has no matches, and the `nonull` flag is set,64 then minimatch.match returns the pattern as-provided, rather than65 interpreting the character escapes. For example,66 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than67 `"*a?"`. This is akin to setting the `nullglob` option in bash, except68 that it does not resolve escaped pattern characters.69 70 If brace expansion is not disabled, then it is performed before any71 other interpretation of the glob pattern. Thus, a pattern like72 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded73 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are74 checked for validity. Since those two are valid, matching proceeds.75 76 39 77 40 ## Minimatch Class … … 217 180 Returns from negate expressions the same as if they were not negated. 218 181 (Ie, true on a hit, false on a miss.) 182 183 184 ## Comparisons to other fnmatch/glob implementations 185 186 While strict compliance with the existing standards is a worthwhile 187 goal, some discrepancies exist between minimatch and other 188 implementations, and are intentional. 189 190 If the pattern starts with a `!` character, then it is negated. Set the 191 `nonegate` flag to suppress this behavior, and treat leading `!` 192 characters normally. This is perhaps relevant if you wish to start the 193 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` 194 characters at the start of a pattern will negate the pattern multiple 195 times. 196 197 If a pattern starts with `#`, then it is treated as a comment, and 198 will not match anything. Use `\#` to match a literal `#` at the 199 start of a line, or set the `nocomment` flag to suppress this behavior. 200 201 The double-star character `**` is supported by default, unless the 202 `noglobstar` flag is set. This is supported in the manner of bsdglob 203 and bash 4.1, where `**` only has special significance if it is the only 204 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but 205 `a/**b` will not. 206 207 If an escaped pattern has no matches, and the `nonull` flag is set, 208 then minimatch.match returns the pattern as-provided, rather than 209 interpreting the character escapes. For example, 210 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than 211 `"*a?"`. This is akin to setting the `nullglob` option in bash, except 212 that it does not resolve escaped pattern characters. 213 214 If brace expansion is not disabled, then it is performed before any 215 other interpretation of the glob pattern. Thus, a pattern like 216 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded 217 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are 218 checked for validity. Since those two are valid, matching proceeds. -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/minimatch/minimatch.js
r484 r516 69 69 var slashSplit = /\/+/ 70 70 71 minimatch.monkeyPatch = monkeyPatch72 function monkeyPatch () {73 var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")74 var orig = desc.value75 desc.value = function (p) {76 if (p instanceof Minimatch) return p.match(this)77 return orig.call(this, p)78 }79 Object.defineProperty(String.prototype, desc)80 }81 82 71 minimatch.filter = filter 83 72 function filter (pattern, options) { … … 179 168 } 180 169 170 Minimatch.prototype.debug = function() {} 171 181 172 Minimatch.prototype.make = make 182 173 function make () { … … 203 194 var set = this.globSet = this.braceExpand() 204 195 205 if (options.debug) console.error(this.pattern, set) 196 if (options.debug) this.debug = console.error 197 198 this.debug(this.pattern, set) 206 199 207 200 // step 3: now we have a set, so turn each one into a series of path-portion … … 214 207 }) 215 208 216 if (options.debug) console.error(this.pattern, set)209 this.debug(this.pattern, set) 217 210 218 211 // glob --> regexps … … 221 214 }, this) 222 215 223 if (options.debug) console.error(this.pattern, set)216 this.debug(this.pattern, set) 224 217 225 218 // filter out everything that didn't compile properly. … … 228 221 }) 229 222 230 if (options.debug) console.error(this.pattern, set)223 this.debug(this.pattern, set) 231 224 232 225 this.set = set … … 303 296 // and then prepend it to everything we find. 304 297 if (pattern.charAt(0) !== "{") { 305 // console.error(pattern)298 this.debug(pattern) 306 299 var prefix = null 307 300 for (var i = 0, l = pattern.length; i < l; i ++) { 308 301 var c = pattern.charAt(i) 309 // console.error(i, c)302 this.debug(i, c) 310 303 if (c === "\\") { 311 304 escaping = !escaping … … 318 311 // actually no sets, all { were escaped. 319 312 if (prefix === null) { 320 // console.error("no sets")313 this.debug("no sets") 321 314 return [pattern] 322 315 } 323 316 324 var tail = braceExpand(pattern.substr(i), options)317 var tail = braceExpand.call(this, pattern.substr(i), options) 325 318 return tail.map(function (t) { 326 319 return prefix + t … … 337 330 var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) 338 331 if (numset) { 339 // console.error("numset", numset[1], numset[2])340 var suf = braceExpand (pattern.substr(numset[0].length), options)332 this.debug("numset", numset[1], numset[2]) 333 var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) 341 334 , start = +numset[1] 342 335 , end = +numset[2] … … 370 363 } 371 364 372 // console.error("Entering for")365 this.debug("Entering for") 373 366 FOR: for (i = 1, l = pattern.length; i < l; i ++) { 374 367 var c = pattern.charAt(i) 375 // console.error("", i, c)368 this.debug("", i, c) 376 369 377 370 if (escaping) { … … 421 414 // and need to escape the leading brace 422 415 if (depth !== 0) { 423 // console.error("didn't close", pattern)424 return braceExpand ("\\" + pattern, options)416 this.debug("didn't close", pattern) 417 return braceExpand.call(this, "\\" + pattern, options) 425 418 } 426 419 427 420 // x{y,z} -> ["xy", "xz"] 428 // console.error("set", set)429 // console.error("suffix", pattern.substr(i))430 var suf = braceExpand (pattern.substr(i), options)421 this.debug("set", set) 422 this.debug("suffix", pattern.substr(i)) 423 var suf = braceExpand.call(this, pattern.substr(i), options) 431 424 // ["b", "c{d,e}","{f,g}h"] -> 432 425 // [["b"], ["cd", "ce"], ["fh", "gh"]] 433 426 var addBraces = set.length === 1 434 // console.error("set pre-expanded", set)427 this.debug("set pre-expanded", set) 435 428 set = set.map(function (p) { 436 return braceExpand (p, options)437 } )438 // console.error("set expanded", set)429 return braceExpand.call(this, p, options) 430 }, this) 431 this.debug("set expanded", set) 439 432 440 433 … … 497 490 : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" 498 491 : "(?!\\.)" 492 , self = this 499 493 500 494 function clearStateChar () { … … 515 509 break 516 510 } 511 self.debug('clearStateChar %j %j', stateChar, re) 517 512 stateChar = false 518 513 } … … 523 518 ; i ++ ) { 524 519 525 if (options.debug) { 526 console.error("%s\t%s %s %j", pattern, i, re, c) 527 } 520 this.debug("%s\t%s %s %j", pattern, i, re, c) 528 521 529 522 // skip over any that are escaped. … … 552 545 case "@": 553 546 case "!": 554 if (options.debug) { 555 console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 556 } 547 this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 557 548 558 549 // all of those are literals inside a class, except that 559 550 // the glob [!a] means [^a] in regexp 560 551 if (inClass) { 552 this.debug(' in class') 561 553 if (c === "!" && i === classStart + 1) c = "^" 562 554 re += c … … 567 559 // that there was something like ** or +? in there. 568 560 // Handle the stateChar, then proceed with this one. 561 self.debug('call clearStateChar %j', stateChar) 569 562 clearStateChar() 570 563 stateChar = c … … 592 585 // negation is (?:(?!js)[^/]*) 593 586 re += stateChar === "!" ? "(?:(?!" : "(?:" 587 this.debug('plType %j %j', stateChar, re) 594 588 stateChar = false 595 589 continue … … 601 595 } 602 596 597 clearStateChar() 603 598 hasMagic = true 604 599 re += ")" … … 624 619 } 625 620 621 clearStateChar() 626 622 re += "|" 627 623 continue … … 716 712 }) 717 713 718 // console.error("tail=%j\n %s", tail, tail)714 this.debug("tail=%j\n %s", tail, tail) 719 715 var t = pl.type === "*" ? star 720 716 : pl.type === "?" ? qmark … … 830 826 Minimatch.prototype.match = match 831 827 function match (f, partial) { 832 // console.error("match", f, this.pattern)828 this.debug("match", f, this.pattern) 833 829 // short-circuit in the case of busted things. 834 830 // comments, etc. … … 848 844 // treat the test path as a set of pathparts. 849 845 f = f.split(slashSplit) 850 if (options.debug) { 851 console.error(this.pattern, "split", f) 852 } 846 this.debug(this.pattern, "split", f) 853 847 854 848 // just ONE of the pattern sets in this.set needs to match … … 858 852 859 853 var set = this.set 860 // console.error(this.pattern, "set", set) 854 this.debug(this.pattern, "set", set) 855 856 var splitFile = path.basename(f.join("/")).split("/") 861 857 862 858 for (var i = 0, l = set.length; i < l; i ++) { 863 var pattern = set[i] 864 var hit = this.matchOne(f, pattern, partial) 859 var pattern = set[i], file = f 860 if (options.matchBase && pattern.length === 1) { 861 file = splitFile 862 } 863 var hit = this.matchOne(file, pattern, partial) 865 864 if (hit) { 866 865 if (options.flipNegate) return true … … 883 882 var options = this.options 884 883 885 if (options.debug) { 886 console.error("matchOne", 887 { "this": this 888 , file: file 889 , pattern: pattern }) 890 } 891 892 if (options.matchBase && pattern.length === 1) { 893 file = path.basename(file.join("/")).split("/") 894 } 895 896 if (options.debug) { 897 console.error("matchOne", file.length, pattern.length) 898 } 884 this.debug("matchOne", 885 { "this": this 886 , file: file 887 , pattern: pattern }) 888 889 this.debug("matchOne", file.length, pattern.length) 899 890 900 891 for ( var fi = 0 … … 905 896 ; fi ++, pi ++ ) { 906 897 907 if (options.debug) { 908 console.error("matchOne loop") 909 } 898 this.debug("matchOne loop") 910 899 var p = pattern[pi] 911 900 , f = file[fi] 912 901 913 if (options.debug) { 914 console.error(pattern, p, f) 915 } 902 this.debug(pattern, p, f) 916 903 917 904 // should be impossible. … … 920 907 921 908 if (p === GLOBSTAR) { 922 if (options.debug) 923 console.error('GLOBSTAR', [pattern, p, f]) 909 this.debug('GLOBSTAR', [pattern, p, f]) 924 910 925 911 // "**" … … 948 934 , pr = pi + 1 949 935 if (pr === pl) { 950 if (options.debug) 951 console.error('** at the end') 936 this.debug('** at the end') 952 937 // a ** at the end will just swallow the rest. 953 938 // We have found a match. … … 967 952 var swallowee = file[fr] 968 953 969 if (options.debug) { 970 console.error('\nglobstar while', 971 file, fr, pattern, pr, swallowee) 972 } 954 this.debug('\nglobstar while', 955 file, fr, pattern, pr, swallowee) 973 956 974 957 // XXX remove this slice. Just pass the start index. 975 958 if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { 976 if (options.debug) 977 console.error('globstar found match!', fr, fl, swallowee) 959 this.debug('globstar found match!', fr, fl, swallowee) 978 960 // found a match. 979 961 return true … … 983 965 if (swallowee === "." || swallowee === ".." || 984 966 (!options.dot && swallowee.charAt(0) === ".")) { 985 if (options.debug) 986 console.error("dot detected!", file, fr, pattern, pr) 967 this.debug("dot detected!", file, fr, pattern, pr) 987 968 break WHILE 988 969 } 989 970 990 971 // ** swallows a segment, and continue. 991 if (options.debug) 992 console.error('globstar swallow a segment, and continue') 972 this.debug('globstar swallow a segment, and continue') 993 973 fr ++ 994 974 } … … 999 979 if (partial) { 1000 980 // ran out of file 1001 // console.error("\n>>> no match, partial?", file, fr, pattern, pr)981 this.debug("\n>>> no match, partial?", file, fr, pattern, pr) 1002 982 if (fr === fl) return true 1003 983 } … … 1015 995 hit = f === p 1016 996 } 1017 if (options.debug) { 1018 console.error("string match", p, f, hit) 1019 } 997 this.debug("string match", p, f, hit) 1020 998 } else { 1021 999 hit = f.match(p) 1022 if (options.debug) { 1023 console.error("pattern match", p, f, hit) 1024 } 1000 this.debug("pattern match", p, f, hit) 1025 1001 } 1026 1002 -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/package.json
r484 r516 30 30 "homepage": "https://github.com/isaacs/node-lru-cache", 31 31 "_id": "lru-cache@2.5.0", 32 "dist": { 33 "shasum": "be07d09e5b05f10b83d0cf01d4891a7729288c69" 34 }, 35 "_from": "lru-cache@2", 36 "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz" 32 "_from": "lru-cache@2" 37 33 } -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/package.json
r484 r516 39 39 "homepage": "https://github.com/isaacs/sigmund", 40 40 "_id": "sigmund@1.0.0", 41 "_from": "sigmund@~1.0.0", 42 "dist": { 43 "shasum": "4d1a782fdcf140509fd8ea166574e0665819b881" 44 }, 45 "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz" 41 "_from": "sigmund@~1.0.0" 46 42 } -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/minimatch/package.json
r484 r516 7 7 "name": "minimatch", 8 8 "description": "a glob matcher in javascript", 9 "version": "0.2.1 2",9 "version": "0.2.14", 10 10 "repository": { 11 11 "type": "git", … … 14 14 "main": "minimatch.js", 15 15 "scripts": { 16 "test": "tap test "16 "test": "tap test/*.js" 17 17 }, 18 18 "engines": { … … 30 30 "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" 31 31 }, 32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n ```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", 33 33 "readmeFilename": "README.md", 34 34 "bugs": { … … 36 36 }, 37 37 "homepage": "https://github.com/isaacs/minimatch", 38 "_id": "minimatch@0.2.1 2",38 "_id": "minimatch@0.2.14", 39 39 "_from": "minimatch@0.x.x" 40 40 } -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/node_modules/underscore/package.json
r484 r516 32 32 }, 33 33 "_id": "underscore@1.4.4", 34 "_from": "underscore@~1.4.3", 35 "dist": { 36 "shasum": "3e7ceb21f205bc19964685e1fdd52c8f77773674" 37 }, 38 "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz" 34 "_from": "underscore@1.4.x" 39 35 } -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/node_modules/jshint/package.json
r484 r516 37 37 "readmeFilename": "README.md", 38 38 "_id": "jshint@1.1.0", 39 "_from": "jshint@1.1.0",40 39 "dist": { 41 40 "shasum": "1db32329c9bb70ca4e80720113d8a1a90d4d3abb" 42 41 }, 42 "_from": "jshint@1.1.0", 43 43 "_resolved": "https://registry.npmjs.org/jshint/-/jshint-1.1.0.tgz" 44 44 } -
Dev/trunk/node_modules/grunt-htmlhint/node_modules/htmlhint/package.json
r484 r516 23 23 "mocha": "~1.8.2", 24 24 "expect.js": "~0.2.0", 25 "jscover": "~0.2.4" 25 "jscover": "~0.2.4", 26 "commander": "^1.1.1", 27 "csslint": "^0.9.10", 28 "jshint": "^1.1.0" 26 29 }, 27 30 "bin": { -
Dev/trunk/node_modules/grunt-jsonlint/node_modules/jsonlint/node_modules/nomnom/node_modules/colors/package.json
r505 r516 21 21 "homepage": "https://github.com/Marak/colors.js", 22 22 "_id": "colors@0.5.1", 23 "_from": "colors@0.5.x" 23 "dist": { 24 "shasum": "bb0880ff34d4cccbe4a7704aafa04d5bd64a3494" 25 }, 26 "_from": "colors@0.5.1", 27 "_resolved": "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz" 24 28 } -
Dev/trunk/node_modules/grunt-jsonlint/node_modules/jsonlint/node_modules/nomnom/package.json
r505 r516 27 27 }, 28 28 "devDependencies": { 29 "nodeunit": "~0.7.4" 29 "nodeunit": "~0.7.4", 30 "colors": "^0.5.1", 31 "underscore": "^1.4.4" 30 32 }, 31 33 "readme": "# nomnom\nnomnom is an option parser for node. It noms your args and gives them back to you in a hash.\n\n```javascript\nvar opts = require(\"nomnom\")\n .option('debug', {\n abbr: 'd',\n flag: true,\n help: 'Print debugging info'\n })\n .option('config', {\n abbr: 'c',\n default: 'config.json',\n help: 'JSON file with tests to run'\n })\n .option('version', {\n flag: true,\n help: 'print version and exit',\n callback: function() {\n return \"version 1.2.4\";\n }\n })\n .parse();\n\nif (opts.debug)\n // do stuff\n```\n\nYou don't have to specify anything if you don't want to:\n\n```javascript\nvar opts = require(\"nomnom\").parse();\n\nvar url = opts[0]; // get the first positional arg\nvar file = opts.file // see if --file was specified\nvar verbose = opts.v // see if -v was specified\nvar extras = opts._ // get an array of the unmatched, positional args\n```\n\n# Install\nfor [node.js](http://nodejs.org/) and [npm](http://github.com/isaacs/npm):\n\n\tnpm install nomnom\n\n# More Details\nNomnom supports args like `-d`, `--debug`, `--no-debug`, `--file=test.txt`, `--file test.txt`, `-f test.txt`, `-xvf`, and positionals. Positionals are arguments that don't fit the `-a` or `--atomic` format and aren't attached to an option.\n\nValues are JSON parsed, so `--debug=true --count=3 --file=log.txt` would give you:\n\n```\n{\n \"debug\": true,\n \"count\": 3,\n \"file\": \"log.txt\"\n}\n```\n\n# Commands\nNomnom supports command-based interfaces (e.g. with git: `git add -p` and `git rebase -i` where `add` and `rebase` are the commands):\n\n```javascript\nvar parser = require(\"nomnom\");\n\nparser.command('browser')\n .callback(function(opts) {\n runBrowser(opts.url);\n })\n .help(\"run browser tests\");\n\nparser.command('sanity')\n .option('outfile', {\n abbr: 'o',\n help: \"file to write results to\"\n })\n .option('config', {\n abbr: 'c',\n default: 'config.json',\n help: \"json manifest of tests to run\"\n })\n .callback(function(opts) {\n runSanity(opts.filename);\n })\n .help(\"run the sanity tests\")\n\nparser.parse();\n```\n\nEach command generates its own usage message when `-h` or `--help` is specified with the command.\n\n# Usage\nNomnom prints out a usage message if `--help` or `-h` is an argument. Usage for these options in `test.js`:\n\n```javascript\nvar opts = require(\"nomnom\")\n .script(\"runtests\")\n .options({\n path: {\n position: 0,\n help: \"Test file to run\",\n list: true\n },\n config: {\n abbr: 'c',\n metavar: 'FILE',\n help: \"Config file with tests to run\"\n },\n debug: {\n abbr: 'd',\n flag: true,\n help: \"Print debugging info\"\n }\n }).parse();\n```\n\n...would look like this:\n\n\tusage: runtests <path>... [options]\n\n\tpath Test file to run\n\n\toptions:\n\t -c FILE, --config FILE Config file with tests to run\n\t -d, --debug Print debugging info\n\n# Options\nYou can either add a specification for an option with `nomnom.option('name', spec)` or pass the specifications to `nomnom.options()` as a hash keyed on option name. Each option specification can have the following fields:\n\n#### abbr and full\n`abbr` is the single character string to match to this option, `full` is the full-length string (defaults to the name of the option).\n\nThis option matches `-d` and `--debug` on the command line:\n\n```javascript\nnomnom.option('debug', {\n abbr: 'd'\n})\n```\n\nThis option matches `-n 3`, `--num-lines 12` on the command line:\n\n```javascript\nnomnom.option('numLines', {\n abbr: 'n',\n full: 'num-lines'\n})\n```\n\n#### flag\n\nIf this is set to true, the option acts as a flag and doesn't swallow the next value on the command line. Default is `false`, so normally if you had a command line `--config test.js`, `config` would get a value of `test.js` in the options hash. Whereas if you specify:\n\n```javascript\nnomnom.option('config', {\n flag: true\n})\n```\n\n`config` would get a value of `true` in the options hash, and `test.js` would be a free positional arg.\n\n#### metavar\n\n`metavar` is used in the usage printout e.g. `\"PATH\"` in `\"-f PATH, --file PATH\"`.\n\n#### string\n\nA shorthand for `abbr`, `full`, and `metavar`. For example, to attach an option to `-c` and `--config` use a `string: \"-c FILE, --config=FILE\"`\n\n#### help\n\nA string description of the option for the usage printout.\n\n#### default\n\nThe value to give the option if it's not specified in the arguments.\n\n#### callback\n\nA callback that will be executed as soon as the option is encountered. If the callback returns a string it will print the string and exit:\n\n```javascript\nnomnom.option('count', {\n callback: function(count) {\n if (count != parseInt(count))\n return \"count must be an integer\";\n }\n})\n```\n\n#### position\n\nThe position of the option if it's a positional argument. If the option should be matched to the first positional arg use position `0`, etc.\n\n#### list\n\nSpecifies that the option is a list. Appending can be achieved by specifying the arg more than once on the command line:\n\n\tnode test.js --file=test1.js --file=test2.js\n\nIf the option has a `position` and `list` is `true`, all positional args including and after `position` will be appended to the array.\n\n#### required\n\nIf this is set to `true` and the option isn't in the args, a message will be printed and the program will exit.\n\n#### choices\n\nA list of the possible values for the option (e.g. `['run', 'test', 'open']`). If the parsed value isn't in the list a message will be printed and the program will exit.\n\n#### type\n\nIf you don't want the option JSON-parsed, specify type `\"string\"`.\n\n#### hidden\n\nOption won't be printed in the usage\n\n\n# Parser interface\n`require(\"nomnom\")` will give you the option parser. You can also make an instance of a parser with `require(\"nomnom\")()`. You can chain any of these functions off of a parser:\n\n#### option\n\nAdd an option specification with the given name:\n\n```javascript\nnomnom.option('debug', {\n abbr: 'd',\n flag: true,\n help: \"Print debugging info\"\n})\n```\n\n#### options\n\nAdd options as a hash keyed by option name, good for a cli with tons of options like [this example](http://github.com/harthur/replace/blob/master/bin/replace.js):\n\n```javascript\nnomnom.options({\n debug: {\n abbr: 'd',\n flag: true,\n help: \"Print debugging info\"\n },\n fruit: {\n help: \"Fruit to buy\"\n }\n})\n```\n\n#### usage\n\nThe string that will override the default generated usage message.\n\n#### help\n\nA string that is appended to the usage.\n\n#### script\n\nNomnom can't detect the alias used to run your script. You can use `script` to provide the correct name for the usage printout instead of e.g. `node test.js`.\n\n#### printer\n\nOverrides the usage printing function.\n\n#### command\n\nTakes a command name and gives you a command object on which you can chain command options.\n\n#### nocommand\n\nGives a command object that will be used when no command is called.\n\n#### parse\n\nParses node's `process.argv` and returns the parsed options hash. You can also provide argv:\n\n```javascript\nvar opts = nomnom.parse([\"-xvf\", \"--atomic=true\"])\n```\n\n#### nom\n\nThe same as `parse()`.\n\n# Command interface\nA command is specified with `nomnom.command('name')`. All these functions can be chained on a command:\n\n#### option\n\nAdd an option specifically for this command.\n\n#### options\n\nAdd options for this command as a hash of options keyed by name.\n\n#### callback\n\nA callback that will be called with the parsed options when the command is used.\n\n#### help\n\nA help string describing the function of this command.\n\n#### usage\n\nOverride the default generated usage string for this command.\n", -
Dev/trunk/node_modules/grunt-tv4/node_modules/request/node_modules/forever-agent/package.json
r487 r516 25 25 "homepage": "https://github.com/mikeal/forever-agent", 26 26 "_id": "forever-agent@0.5.2", 27 "dist": { 28 "shasum": "30e8bcea70478fa57599fc40b09a4a45c0710443" 29 }, 30 "_from": "forever-agent@~0.5.0", 31 "_resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz" 27 "_from": "forever-agent@~0.5.0" 32 28 } -
Dev/trunk/node_modules/grunt-tv4/node_modules/request/node_modules/form-data/node_modules/async/package.json
r487 r516 40 40 "homepage": "https://github.com/caolan/async", 41 41 "_id": "async@0.2.10", 42 "dist": { 43 "shasum": "7c691f5d6d8c59427796e198d4a5f5acf0e76417" 44 }, 45 "_from": "async@~0.2.9", 46 "_resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz" 42 "_from": "async@~0.2.9" 47 43 } -
Dev/trunk/node_modules/grunt-tv4/node_modules/request/node_modules/form-data/node_modules/combined-stream/node_modules/delayed-stream/package.json
r487 r516 28 28 }, 29 29 "_id": "delayed-stream@0.0.5", 30 "dist": { 31 "shasum": "65fc527ce0503b527205f943369177a48e8932fd" 32 }, 33 "_from": "delayed-stream@0.0.5", 34 "_resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz" 30 "_from": "delayed-stream@0.0.5" 35 31 } -
Dev/trunk/node_modules/grunt-tv4/node_modules/request/node_modules/http-signature/node_modules/asn1/package.json
r487 r516 40 40 "homepage": "https://github.com/mcavage/node-asn1", 41 41 "_id": "asn1@0.1.11", 42 "dist": { 43 "shasum": "fbbb4e0c892ea47308ff4a0e90cc4aac37e44a38" 44 }, 45 "_from": "asn1@0.1.11", 46 "_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz" 42 "_from": "asn1@0.1.11" 47 43 } -
Dev/trunk/node_modules/grunt-tv4/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
r487 r516 17 17 "readmeFilename": "README.md", 18 18 "_id": "assert-plus@0.1.2", 19 "dist": { 20 "shasum": "45a89f54ea7c2d3462aba816e3387f5723659c1e" 21 }, 22 "_from": "assert-plus@0.1.2", 23 "_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz" 19 "_from": "assert-plus@0.1.2" 24 20 } -
Dev/trunk/node_modules/grunt-tv4/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json
r487 r516 15 15 "readmeFilename": "README", 16 16 "_id": "ctype@0.5.2", 17 "dist": { 18 "shasum": "f4d4f9aa7e3086e282e40d78cfa6f4e3543c3bbf" 19 }, 20 "_from": "ctype@0.5.2", 21 "_resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz" 17 "_from": "ctype@0.5.2" 22 18 } -
Dev/trunk/node_modules/grunt-tv4/node_modules/request/node_modules/qs/package.json
r487 r516 35 35 "homepage": "https://github.com/visionmedia/node-querystring", 36 36 "_id": "qs@0.6.6", 37 "dist": { 38 "shasum": "9273308fc9b808b041bb75e632cbf82fe83b45fd" 39 }, 40 "_from": "qs@~0.6.0", 41 "_resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz" 37 "_from": "qs@~0.6.0" 42 38 } -
Dev/trunk/node_modules/grunt-tv4/package.json
r487 r516 52 52 "grunt-contrib-jshint": "~0.7.2", 53 53 "jshint-path-reporter": "~0.1.3", 54 "package.json-schema": "~0.1.2" 54 "package.json-schema": "~0.1.2", 55 "request": "^2.25.0" 55 56 }, 56 57 "peerDependencies": { -
Dev/trunk/node_modules/grunt/.npmignore
r484 r516 4 4 AUTHORS 5 5 CHANGELOG 6 CONTRIBUTING. MD6 CONTRIBUTING.md 7 7 custom-gruntfile.js 8 8 Gruntfile.js -
Dev/trunk/node_modules/grunt/LICENSE-MIT
r484 r516 1 Copyright (c) 201 3"Cowboy" Ben Alman1 Copyright (c) 2014 "Cowboy" Ben Alman 2 2 3 3 Permission is hereby granted, free of charge, to any person -
Dev/trunk/node_modules/grunt/README.md
r484 r516 1 # Grunt: The JavaScript Task Runner [](http://travis-ci.org/gruntjs/grunt) 1 # Grunt: The JavaScript Task Runner 2 3 [](http://travis-ci.org/gruntjs/grunt) 4 [](http://gruntjs.com/) 2 5 3 6 <img align="right" height="260" src="http://gruntjs.com/img/grunt-logo-no-wordmark.svg"> -
Dev/trunk/node_modules/grunt/internal-tasks/bump.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman, contributors5 * Copyright (c) 2014 "Cowboy" Ben Alman, contributors 6 6 * Licensed under the MIT license. 7 7 */ -
Dev/trunk/node_modules/grunt/internal-tasks/subgrunt.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt/lib/grunt.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 23 23 return grunt[name] = require('./grunt/' + name); 24 24 } 25 var util = gRequire('util'); 25 26 var util = require('grunt-legacy-util'); 27 grunt.util = util; 28 grunt.util.task = require('./util/task'); 29 26 30 gRequire('template'); 27 31 gRequire('event'); … … 153 157 // allows the error callback to execute multiple times. 154 158 tasks.forEach(function(name) { task.run(name); }); 155 task.start(); 159 // Run tasks async internally to reduce call-stack, per: 160 // https://github.com/gruntjs/grunt/pull/1026 161 task.start({asyncDone:true}); 156 162 }; -
Dev/trunk/node_modules/grunt/lib/grunt/cli.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 22 22 // CLI-parsed options override any passed-in "default" options. 23 23 if (options) { 24 // For each def ult option...24 // For each default option... 25 25 Object.keys(options).forEach(function(key) { 26 26 if (!(key in cli.options)) { … … 62 62 short: 'd', 63 63 info: 'Enable debugging mode for tasks that support it.', 64 type: Number64 type: [Number, Boolean] 65 65 }, 66 66 stack: { -
Dev/trunk/node_modules/grunt/lib/grunt/config.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt/lib/grunt/event.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt/lib/grunt/fail.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt/lib/grunt/file.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 134 134 var pathSeparatorRe = /[\/\\]/g; 135 135 136 // The "ext" option refers to either everything after the first dot (default) 137 // or everything after the last dot. 138 var extDotRe = { 139 first: /(\.[^\/]*)?$/, 140 last: /(\.[^\/\.]*)?$/, 141 }; 142 136 143 // Build a multi task "files" object dynamically. 137 144 file.expandMapping = function(patterns, destBase, options) { 138 145 options = grunt.util._.defaults({}, options, { 146 extDot: 'first', 139 147 rename: function(destBase, destPath) { 140 148 return path.join(destBase || '', destPath); … … 151 159 } 152 160 // Change the extension? 153 if ( options.ext) {154 destPath = destPath.replace( /(\.[^\/]*)?$/, options.ext);161 if ('ext' in options) { 162 destPath = destPath.replace(extDotRe[options.extDot], options.ext); 155 163 } 156 164 // Generate destination filename. -
Dev/trunk/node_modules/grunt/lib/grunt/help.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt/lib/grunt/log.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt/lib/grunt/option.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt/lib/grunt/task.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 108 108 } 109 109 } else if (Array.isArray(data.files)) { 110 data.files.forEach(function(obj) {110 grunt.util._.flatten(data.files).forEach(function(obj) { 111 111 var prop; 112 112 if ('src' in obj || 'dest' in obj) { … … 245 245 return options; 246 246 }; 247 // Expose the current target. 248 this.target = target; 249 // Recreate flags object so that the target isn't set as a flag. 250 this.flags = {}; 251 this.args.forEach(function(arg) { this.flags[arg] = true; }, this); 247 252 // Expose data on `this` (as well as task.current). 248 253 this.data = grunt.config([name, target]); … … 256 261 }.bind(this) 257 262 }); 258 // Expose the current target.259 this.target = target;260 // Recreate flags object so that the target isn't set as a flag.261 this.flags = {};262 this.args.forEach(function(arg) { this.flags[arg] = true; }, this);263 263 // Call original task function, passing in the target and any other args. 264 264 return fn.apply(this, this.args); … … 278 278 // Override built-in renameTask to use the registry. 279 279 task.renameTask = function(oldname, newname) { 280 // Add and remove task. 281 registry.untasks.push(oldname); 282 registry.tasks.push(newname); 283 // Actually rename task. 284 return parent.renameTask.apply(task, arguments); 280 var result; 281 try { 282 // Actually rename task. 283 result = parent.renameTask.apply(task, arguments); 284 // Add and remove task. 285 registry.untasks.push(oldname); 286 registry.tasks.push(newname); 287 // Return result. 288 return result; 289 } catch(e) { 290 grunt.log.error(e.message); 291 } 285 292 }; 286 293 -
Dev/trunk/node_modules/grunt/lib/grunt/template.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT -
Dev/trunk/node_modules/grunt/lib/util/task.js
r484 r516 3 3 * http://gruntjs.com/ 4 4 * 5 * Copyright (c) 201 3"Cowboy" Ben Alman5 * Copyright (c) 2014 "Cowboy" Ben Alman 6 6 * Licensed under the MIT license. 7 7 * https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT … … 90 90 // easier to implement than some kind of in-task "super" functionality. 91 91 Task.prototype.renameTask = function(oldname, newname) { 92 if (!this._tasks[oldname]) { 93 throw new Error('Cannot rename missing "' + oldname + '" task.'); 94 } 92 95 // Rename task. 93 96 this._tasks[newname] = this._tasks[oldname]; … … 186 189 187 190 // Run a task function, handling this.async / return value. 188 Task.prototype.runTaskFn = function(context, fn, done ) {191 Task.prototype.runTaskFn = function(context, fn, done, asyncDone) { 189 192 // Async flag. 190 193 var async = false; … … 213 216 this._options.error.call({name: context.name, nameArgs: context.nameArgs}, err); 214 217 } 215 done(err, success); 218 // only call done async if explicitly requested to 219 // see: https://github.com/gruntjs/grunt/pull/1026 220 if (asyncDone) { 221 process.nextTick(function () { 222 done(err, success); 223 }); 224 } else { 225 done(err, success); 226 } 216 227 }.bind(this); 217 228 … … 244 255 245 256 // Begin task queue processing. Ie. run all tasks. 246 Task.prototype.start = function() { 257 Task.prototype.start = function(opts) { 258 if (!opts) { 259 opts = {}; 260 } 247 261 // Abort if already running. 248 262 if (this._running) { return false; } … … 281 295 this.runTaskFn(context, function() { 282 296 return thing.task.fn.apply(this, this.args); 283 }, nextTask );297 }, nextTask, !!opts.asyncDone); 284 298 285 299 }.bind(this); -
Dev/trunk/node_modules/grunt/node_modules/colors/package.json
r484 r516 26 26 "readmeFilename": "ReadMe.md", 27 27 "_id": "colors@0.6.2", 28 "dist": { 29 "shasum": "57915cf80820c121e254ec8b7819ab808d2beae5" 30 }, 31 "_from": "colors@~0.6.2", 32 "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", 33 "scripts": {} 28 "_from": "colors@~0.6.2" 34 29 } -
Dev/trunk/node_modules/grunt/node_modules/eventemitter2/package.json
r484 r516 59 59 "homepage": "https://github.com/hij1nx/EventEmitter2", 60 60 "_id": "eventemitter2@0.4.13", 61 "dist": { 62 "shasum": "2a03bdff50bda6586cf2e27c71feeaf6d37c383c" 63 }, 64 "_from": "eventemitter2@~0.4.13", 65 "_resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.13.tgz" 61 "_from": "eventemitter2@~0.4.13" 66 62 } -
Dev/trunk/node_modules/grunt/node_modules/exit/package.json
r484 r516 48 48 "readmeFilename": "README.md", 49 49 "_id": "exit@0.1.2", 50 "dist": { 51 "shasum": "2a1f6b7dd67aedcf9544e948cc817113b64012a5" 52 }, 53 "_from": "exit@~0.1.1", 54 "_resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz" 50 "_from": "exit@~0.1.1" 55 51 } -
Dev/trunk/node_modules/grunt/node_modules/getobject/package.json
r484 r516 45 45 "readmeFilename": "README.md", 46 46 "_id": "getobject@0.1.0", 47 "dist": { 48 "shasum": "4563bd9ebffaa0790ee7eec6e2d74523b7e852a6" 49 }, 50 "_from": "getobject@~0.1.0", 51 "_resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz" 47 "_from": "getobject@~0.1.0" 52 48 } -
Dev/trunk/node_modules/grunt/node_modules/glob/node_modules/inherits/package.json
r484 r516 27 27 "homepage": "https://github.com/isaacs/inherits", 28 28 "_id": "inherits@1.0.0", 29 "dist": {30 "shasum": "26467026b3b86de1c6f72f00d9a31b1c97077a92"31 },32 29 "_from": "inherits@1", 33 " _resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz"30 "scripts": {} 34 31 } -
Dev/trunk/node_modules/grunt/node_modules/iconv-lite/package.json
r484 r516 77 77 }, 78 78 "_id": "iconv-lite@0.2.11", 79 "dist": { 80 "shasum": "1827821f46962889765690b557c045f5cc3976eb" 81 }, 82 "_from": "iconv-lite@~0.2.11", 83 "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz" 79 "_from": "iconv-lite@~0.2.11" 84 80 } -
Dev/trunk/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json
r484 r516 70 70 "readmeFilename": "README.markdown", 71 71 "_id": "underscore.string@2.3.3", 72 "dist": { 73 "shasum": "a7cea3b9aa84d24cf1363ccbddd02ee10abee0c0" 74 }, 75 "_from": "underscore.string@~2.3.1", 76 "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz" 72 "_from": "underscore.string@~2.3.1" 77 73 } -
Dev/trunk/node_modules/grunt/node_modules/minimatch/README.md
r484 r516 20 20 minimatch("bar.foo", "*.foo") // true! 21 21 minimatch("bar.foo", "*.bar") // false! 22 minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! 22 23 ``` 23 24 … … 36 37 * `man 3 fnmatch` 37 38 * `man 5 gitignore` 38 39 ### Comparisons to other fnmatch/glob implementations40 41 While strict compliance with the existing standards is a worthwhile42 goal, some discrepancies exist between minimatch and other43 implementations, and are intentional.44 45 If the pattern starts with a `!` character, then it is negated. Set the46 `nonegate` flag to suppress this behavior, and treat leading `!`47 characters normally. This is perhaps relevant if you wish to start the48 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`49 characters at the start of a pattern will negate the pattern multiple50 times.51 52 If a pattern starts with `#`, then it is treated as a comment, and53 will not match anything. Use `\#` to match a literal `#` at the54 start of a line, or set the `nocomment` flag to suppress this behavior.55 56 The double-star character `**` is supported by default, unless the57 `noglobstar` flag is set. This is supported in the manner of bsdglob58 and bash 4.1, where `**` only has special significance if it is the only59 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but60 `a/**b` will not. **Note that this is different from the way that `**` is61 handled by ruby's `Dir` class.**62 63 If an escaped pattern has no matches, and the `nonull` flag is set,64 then minimatch.match returns the pattern as-provided, rather than65 interpreting the character escapes. For example,66 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than67 `"*a?"`. This is akin to setting the `nullglob` option in bash, except68 that it does not resolve escaped pattern characters.69 70 If brace expansion is not disabled, then it is performed before any71 other interpretation of the glob pattern. Thus, a pattern like72 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded73 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are74 checked for validity. Since those two are valid, matching proceeds.75 76 39 77 40 ## Minimatch Class … … 217 180 Returns from negate expressions the same as if they were not negated. 218 181 (Ie, true on a hit, false on a miss.) 182 183 184 ## Comparisons to other fnmatch/glob implementations 185 186 While strict compliance with the existing standards is a worthwhile 187 goal, some discrepancies exist between minimatch and other 188 implementations, and are intentional. 189 190 If the pattern starts with a `!` character, then it is negated. Set the 191 `nonegate` flag to suppress this behavior, and treat leading `!` 192 characters normally. This is perhaps relevant if you wish to start the 193 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` 194 characters at the start of a pattern will negate the pattern multiple 195 times. 196 197 If a pattern starts with `#`, then it is treated as a comment, and 198 will not match anything. Use `\#` to match a literal `#` at the 199 start of a line, or set the `nocomment` flag to suppress this behavior. 200 201 The double-star character `**` is supported by default, unless the 202 `noglobstar` flag is set. This is supported in the manner of bsdglob 203 and bash 4.1, where `**` only has special significance if it is the only 204 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but 205 `a/**b` will not. 206 207 If an escaped pattern has no matches, and the `nonull` flag is set, 208 then minimatch.match returns the pattern as-provided, rather than 209 interpreting the character escapes. For example, 210 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than 211 `"*a?"`. This is akin to setting the `nullglob` option in bash, except 212 that it does not resolve escaped pattern characters. 213 214 If brace expansion is not disabled, then it is performed before any 215 other interpretation of the glob pattern. Thus, a pattern like 216 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded 217 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are 218 checked for validity. Since those two are valid, matching proceeds. -
Dev/trunk/node_modules/grunt/node_modules/minimatch/minimatch.js
r484 r516 69 69 var slashSplit = /\/+/ 70 70 71 minimatch.monkeyPatch = monkeyPatch72 function monkeyPatch () {73 var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")74 var orig = desc.value75 desc.value = function (p) {76 if (p instanceof Minimatch) return p.match(this)77 return orig.call(this, p)78 }79 Object.defineProperty(String.prototype, desc)80 }81 82 71 minimatch.filter = filter 83 72 function filter (pattern, options) { … … 179 168 } 180 169 170 Minimatch.prototype.debug = function() {} 171 181 172 Minimatch.prototype.make = make 182 173 function make () { … … 203 194 var set = this.globSet = this.braceExpand() 204 195 205 if (options.debug) console.error(this.pattern, set) 196 if (options.debug) this.debug = console.error 197 198 this.debug(this.pattern, set) 206 199 207 200 // step 3: now we have a set, so turn each one into a series of path-portion … … 214 207 }) 215 208 216 if (options.debug) console.error(this.pattern, set)209 this.debug(this.pattern, set) 217 210 218 211 // glob --> regexps … … 221 214 }, this) 222 215 223 if (options.debug) console.error(this.pattern, set)216 this.debug(this.pattern, set) 224 217 225 218 // filter out everything that didn't compile properly. … … 228 221 }) 229 222 230 if (options.debug) console.error(this.pattern, set)223 this.debug(this.pattern, set) 231 224 232 225 this.set = set … … 303 296 // and then prepend it to everything we find. 304 297 if (pattern.charAt(0) !== "{") { 305 // console.error(pattern)298 this.debug(pattern) 306 299 var prefix = null 307 300 for (var i = 0, l = pattern.length; i < l; i ++) { 308 301 var c = pattern.charAt(i) 309 // console.error(i, c)302 this.debug(i, c) 310 303 if (c === "\\") { 311 304 escaping = !escaping … … 318 311 // actually no sets, all { were escaped. 319 312 if (prefix === null) { 320 // console.error("no sets")313 this.debug("no sets") 321 314 return [pattern] 322 315 } 323 316 324 var tail = braceExpand(pattern.substr(i), options)317 var tail = braceExpand.call(this, pattern.substr(i), options) 325 318 return tail.map(function (t) { 326 319 return prefix + t … … 337 330 var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) 338 331 if (numset) { 339 // console.error("numset", numset[1], numset[2])340 var suf = braceExpand (pattern.substr(numset[0].length), options)332 this.debug("numset", numset[1], numset[2]) 333 var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) 341 334 , start = +numset[1] 342 335 , end = +numset[2] … … 370 363 } 371 364 372 // console.error("Entering for")365 this.debug("Entering for") 373 366 FOR: for (i = 1, l = pattern.length; i < l; i ++) { 374 367 var c = pattern.charAt(i) 375 // console.error("", i, c)368 this.debug("", i, c) 376 369 377 370 if (escaping) { … … 421 414 // and need to escape the leading brace 422 415 if (depth !== 0) { 423 // console.error("didn't close", pattern)424 return braceExpand ("\\" + pattern, options)416 this.debug("didn't close", pattern) 417 return braceExpand.call(this, "\\" + pattern, options) 425 418 } 426 419 427 420 // x{y,z} -> ["xy", "xz"] 428 // console.error("set", set)429 // console.error("suffix", pattern.substr(i))430 var suf = braceExpand (pattern.substr(i), options)421 this.debug("set", set) 422 this.debug("suffix", pattern.substr(i)) 423 var suf = braceExpand.call(this, pattern.substr(i), options) 431 424 // ["b", "c{d,e}","{f,g}h"] -> 432 425 // [["b"], ["cd", "ce"], ["fh", "gh"]] 433 426 var addBraces = set.length === 1 434 // console.error("set pre-expanded", set)427 this.debug("set pre-expanded", set) 435 428 set = set.map(function (p) { 436 return braceExpand (p, options)437 } )438 // console.error("set expanded", set)429 return braceExpand.call(this, p, options) 430 }, this) 431 this.debug("set expanded", set) 439 432 440 433 … … 497 490 : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" 498 491 : "(?!\\.)" 492 , self = this 499 493 500 494 function clearStateChar () { … … 515 509 break 516 510 } 511 self.debug('clearStateChar %j %j', stateChar, re) 517 512 stateChar = false 518 513 } … … 523 518 ; i ++ ) { 524 519 525 if (options.debug) { 526 console.error("%s\t%s %s %j", pattern, i, re, c) 527 } 520 this.debug("%s\t%s %s %j", pattern, i, re, c) 528 521 529 522 // skip over any that are escaped. … … 552 545 case "@": 553 546 case "!": 554 if (options.debug) { 555 console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 556 } 547 this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 557 548 558 549 // all of those are literals inside a class, except that 559 550 // the glob [!a] means [^a] in regexp 560 551 if (inClass) { 552 this.debug(' in class') 561 553 if (c === "!" && i === classStart + 1) c = "^" 562 554 re += c … … 567 559 // that there was something like ** or +? in there. 568 560 // Handle the stateChar, then proceed with this one. 561 self.debug('call clearStateChar %j', stateChar) 569 562 clearStateChar() 570 563 stateChar = c … … 592 585 // negation is (?:(?!js)[^/]*) 593 586 re += stateChar === "!" ? "(?:(?!" : "(?:" 587 this.debug('plType %j %j', stateChar, re) 594 588 stateChar = false 595 589 continue … … 601 595 } 602 596 597 clearStateChar() 603 598 hasMagic = true 604 599 re += ")" … … 624 619 } 625 620 621 clearStateChar() 626 622 re += "|" 627 623 continue … … 716 712 }) 717 713 718 // console.error("tail=%j\n %s", tail, tail)714 this.debug("tail=%j\n %s", tail, tail) 719 715 var t = pl.type === "*" ? star 720 716 : pl.type === "?" ? qmark … … 830 826 Minimatch.prototype.match = match 831 827 function match (f, partial) { 832 // console.error("match", f, this.pattern)828 this.debug("match", f, this.pattern) 833 829 // short-circuit in the case of busted things. 834 830 // comments, etc. … … 848 844 // treat the test path as a set of pathparts. 849 845 f = f.split(slashSplit) 850 if (options.debug) { 851 console.error(this.pattern, "split", f) 852 } 846 this.debug(this.pattern, "split", f) 853 847 854 848 // just ONE of the pattern sets in this.set needs to match … … 858 852 859 853 var set = this.set 860 // console.error(this.pattern, "set", set) 854 this.debug(this.pattern, "set", set) 855 856 var splitFile = path.basename(f.join("/")).split("/") 861 857 862 858 for (var i = 0, l = set.length; i < l; i ++) { 863 var pattern = set[i] 864 var hit = this.matchOne(f, pattern, partial) 859 var pattern = set[i], file = f 860 if (options.matchBase && pattern.length === 1) { 861 file = splitFile 862 } 863 var hit = this.matchOne(file, pattern, partial) 865 864 if (hit) { 866 865 if (options.flipNegate) return true … … 883 882 var options = this.options 884 883 885 if (options.debug) { 886 console.error("matchOne", 887 { "this": this 888 , file: file 889 , pattern: pattern }) 890 } 891 892 if (options.matchBase && pattern.length === 1) { 893 file = path.basename(file.join("/")).split("/") 894 } 895 896 if (options.debug) { 897 console.error("matchOne", file.length, pattern.length) 898 } 884 this.debug("matchOne", 885 { "this": this 886 , file: file 887 , pattern: pattern }) 888 889 this.debug("matchOne", file.length, pattern.length) 899 890 900 891 for ( var fi = 0 … … 905 896 ; fi ++, pi ++ ) { 906 897 907 if (options.debug) { 908 console.error("matchOne loop") 909 } 898 this.debug("matchOne loop") 910 899 var p = pattern[pi] 911 900 , f = file[fi] 912 901 913 if (options.debug) { 914 console.error(pattern, p, f) 915 } 902 this.debug(pattern, p, f) 916 903 917 904 // should be impossible. … … 920 907 921 908 if (p === GLOBSTAR) { 922 if (options.debug) 923 console.error('GLOBSTAR', [pattern, p, f]) 909 this.debug('GLOBSTAR', [pattern, p, f]) 924 910 925 911 // "**" … … 948 934 , pr = pi + 1 949 935 if (pr === pl) { 950 if (options.debug) 951 console.error('** at the end') 936 this.debug('** at the end') 952 937 // a ** at the end will just swallow the rest. 953 938 // We have found a match. … … 967 952 var swallowee = file[fr] 968 953 969 if (options.debug) { 970 console.error('\nglobstar while', 971 file, fr, pattern, pr, swallowee) 972 } 954 this.debug('\nglobstar while', 955 file, fr, pattern, pr, swallowee) 973 956 974 957 // XXX remove this slice. Just pass the start index. 975 958 if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { 976 if (options.debug) 977 console.error('globstar found match!', fr, fl, swallowee) 959 this.debug('globstar found match!', fr, fl, swallowee) 978 960 // found a match. 979 961 return true … … 983 965 if (swallowee === "." || swallowee === ".." || 984 966 (!options.dot && swallowee.charAt(0) === ".")) { 985 if (options.debug) 986 console.error("dot detected!", file, fr, pattern, pr) 967 this.debug("dot detected!", file, fr, pattern, pr) 987 968 break WHILE 988 969 } 989 970 990 971 // ** swallows a segment, and continue. 991 if (options.debug) 992 console.error('globstar swallow a segment, and continue') 972 this.debug('globstar swallow a segment, and continue') 993 973 fr ++ 994 974 } … … 999 979 if (partial) { 1000 980 // ran out of file 1001 // console.error("\n>>> no match, partial?", file, fr, pattern, pr)981 this.debug("\n>>> no match, partial?", file, fr, pattern, pr) 1002 982 if (fr === fl) return true 1003 983 } … … 1015 995 hit = f === p 1016 996 } 1017 if (options.debug) { 1018 console.error("string match", p, f, hit) 1019 } 997 this.debug("string match", p, f, hit) 1020 998 } else { 1021 999 hit = f.match(p) 1022 if (options.debug) { 1023 console.error("pattern match", p, f, hit) 1024 } 1000 this.debug("pattern match", p, f, hit) 1025 1001 } 1026 1002 -
Dev/trunk/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json
r484 r516 30 30 "homepage": "https://github.com/isaacs/node-lru-cache", 31 31 "_id": "lru-cache@2.5.0", 32 "dist": { 33 "shasum": "be07d09e5b05f10b83d0cf01d4891a7729288c69" 34 }, 35 "_from": "lru-cache@2", 36 "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz" 32 "_from": "lru-cache@2" 37 33 } -
Dev/trunk/node_modules/grunt/node_modules/minimatch/package.json
r484 r516 7 7 "name": "minimatch", 8 8 "description": "a glob matcher in javascript", 9 "version": "0.2.1 2",9 "version": "0.2.14", 10 10 "repository": { 11 11 "type": "git", … … 14 14 "main": "minimatch.js", 15 15 "scripts": { 16 "test": "tap test "16 "test": "tap test/*.js" 17 17 }, 18 18 "engines": { … … 30 30 "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" 31 31 }, 32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n ```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", 33 33 "readmeFilename": "README.md", 34 34 "bugs": { … … 36 36 }, 37 37 "homepage": "https://github.com/isaacs/minimatch", 38 "_id": "minimatch@0.2.1 2",39 "_from": "minimatch@ 0.x.x"38 "_id": "minimatch@0.2.14", 39 "_from": "minimatch@~0.2.12" 40 40 } -
Dev/trunk/node_modules/grunt/node_modules/rimraf/README.md
r484 r516 1 A`rm -rf` for node.1 `rm -rf` for node. 2 2 3 3 Install with `npm install rimraf`, or just drop rimraf.js somewhere. … … 10 10 errors are handled for you: 11 11 12 * `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times 13 before giving up. 14 * `EMFILE` - If too many file descriptors get opened, rimraf will 15 patiently wait until more become available. 16 12 * Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of 13 `opts.maxBusyTries` times before giving up. 14 * `ENOENT` - If the file doesn't exist, rimraf will return 15 successfully, since your desired outcome is already the case. 17 16 18 17 ## rimraf.sync … … 20 19 It can remove stuff synchronously, too. But that's not so good. Use 21 20 the async API. It's better. 21 22 ## CLI 23 24 If installed with `npm install rimraf -g` it can be used as a global 25 command `rimraf <path>` which is useful for cross platform support. 26 27 ## mkdirp 28 29 If you need to create a directory recursively, check out 30 [mkdirp](https://github.com/substack/node-mkdirp). -
Dev/trunk/node_modules/grunt/node_modules/rimraf/package.json
r484 r516 1 1 { 2 2 "name": "rimraf", 3 "version": "2. 0.3",3 "version": "2.2.6", 4 4 "main": "rimraf.js", 5 5 "description": "A deep deletion module for node (like `rm -rf`)", … … 13 13 "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" 14 14 }, 15 "optionalDependencies": {16 "graceful-fs": "~1.1"17 },18 15 "repository": { 19 16 "type": "git", … … 22 19 "scripts": { 23 20 "test": "cd test && bash run.sh" 21 }, 22 "bin": { 23 "rimraf": "./bin.js" 24 24 }, 25 25 "contributors": [ … … 46 46 } 47 47 ], 48 "readme": " A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times\n before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n patiently wait until more become available.\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n",48 "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", 49 49 "readmeFilename": "README.md", 50 50 "bugs": { … … 52 52 }, 53 53 "homepage": "https://github.com/isaacs/rimraf", 54 "dependencies": { 55 "graceful-fs": "~1.1" 54 "_id": "rimraf@2.2.6", 55 "dist": { 56 "shasum": "c28d4de4cafcd392b82d02729509c65e3502240c" 56 57 }, 57 "_ id": "rimraf@2.0.3",58 "_ from": "rimraf@~2.0.3"58 "_from": "rimraf@~2.2.6", 59 "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.6.tgz" 59 60 } -
Dev/trunk/node_modules/grunt/node_modules/rimraf/rimraf.js
r484 r516 3 3 4 4 var path = require("path") 5 , fs 6 7 try { 8 // optional dependency 9 fs = require("graceful-fs") 10 } catch (er) { 11 fs = require("fs") 12 } 13 14 var lstat = "lstat" 15 if (process.platform === "win32") { 16 // not reliable on windows prior to 0.7.9 17 var v = process.version.replace(/^v/, '').split(/\.|-/).map(Number) 18 if (v[0] === 0 && (v[1] < 7 || v[1] == 7 && v[2] < 9)) { 19 lstat = "stat" 20 } 21 } 22 if (!fs[lstat]) lstat = "stat" 23 var lstatSync = lstat + "Sync" 5 var fs = require("fs") 24 6 25 7 // for EMFILE handling … … 28 10 exports.BUSYTRIES_MAX = 3 29 11 12 var isWindows = (process.platform === "win32") 13 30 14 function rimraf (p, cb) { 31 32 15 if (!cb) throw new Error("No callback passed to rimraf()") 33 16 34 17 var busyTries = 0 35 36 18 rimraf_(p, function CB (er) { 37 19 if (er) { 38 if (er.code === "EBUSY" && busyTries < exports.BUSYTRIES_MAX) { 20 if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && 21 busyTries < exports.BUSYTRIES_MAX) { 39 22 busyTries ++ 40 23 var time = busyTries * 100 … … 61 44 } 62 45 46 // Two possible strategies. 47 // 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR 48 // 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR 49 // 50 // Both result in an extra syscall when you guess wrong. However, there 51 // are likely far more normal files in the world than directories. This 52 // is based on the assumption that a the average number of files per 53 // directory is >= 1. 54 // 55 // If anyone ever complains about this, then I guess the strategy could 56 // be made configurable somehow. But until then, YAGNI. 63 57 function rimraf_ (p, cb) { 64 fs [lstat](p, function (er, s) {58 fs.unlink(p, function (er) { 65 59 if (er) { 66 // already gone 67 if (er.code === "ENOENT") return cb() 68 // some other kind of error, permissions, etc. 69 return cb(er) 60 if (er.code === "ENOENT") 61 return cb(null) 62 if (er.code === "EPERM") 63 return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) 64 if (er.code === "EISDIR") 65 return rmdir(p, er, cb) 70 66 } 71 72 return rm_(p, s, false, cb) 67 return cb(er) 73 68 }) 74 69 } 75 70 76 77 var myGid = function myGid () { 78 var g = process.getgid && process.getgid() 79 myGid = function myGid () { return g } 80 return g 71 function fixWinEPERM (p, er, cb) { 72 fs.chmod(p, 666, function (er2) { 73 if (er2) 74 cb(er2.code === "ENOENT" ? null : er) 75 else 76 fs.stat(p, function(er3, stats) { 77 if (er3) 78 cb(er3.code === "ENOENT" ? null : er) 79 else if (stats.isDirectory()) 80 rmdir(p, er, cb) 81 else 82 fs.unlink(p, cb) 83 }) 84 }) 81 85 } 82 86 83 var myUid = function myUid () { 84 var u = process.getuid && process.getuid() 85 myUid = function myUid () { return u } 86 return u 87 function fixWinEPERMSync (p, er, cb) { 88 try { 89 fs.chmodSync(p, 666) 90 } catch (er2) { 91 if (er2.code !== "ENOENT") 92 throw er 93 } 94 95 try { 96 var stats = fs.statSync(p) 97 } catch (er3) { 98 if (er3 !== "ENOENT") 99 throw er 100 } 101 102 if (stats.isDirectory()) 103 rmdirSync(p, er) 104 else 105 fs.unlinkSync(p) 87 106 } 88 107 89 90 function writable (s) { 91 var mode = s.mode || 0777 92 , uid = myUid() 93 , gid = myGid() 94 return (mode & 0002) 95 || (gid === s.gid && (mode & 0020)) 96 || (uid === s.uid && (mode & 0200)) 108 function rmdir (p, originalEr, cb) { 109 // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) 110 // if we guessed wrong, and it's not a directory, then 111 // raise the original error. 112 fs.rmdir(p, function (er) { 113 if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) 114 rmkids(p, cb) 115 else if (er && er.code === "ENOTDIR") 116 cb(originalEr) 117 else 118 cb(er) 119 }) 97 120 } 98 121 99 function rm_ (p, s, didWritableCheck, cb) { 100 if (!didWritableCheck && !writable(s)) { 101 // make file writable 102 // user/group/world, doesn't matter at this point 103 // since it's about to get nuked. 104 return fs.chmod(p, s.mode | 0222, function (er) { 105 if (er) return cb(er) 106 rm_(p, s, true, cb) 107 }) 108 } 109 110 if (!s.isDirectory()) { 111 return fs.unlink(p, cb) 112 } 113 114 // directory 122 function rmkids(p, cb) { 115 123 fs.readdir(p, function (er, files) { 116 if (er) return cb(er) 117 asyncForEach(files.map(function (f) { 118 return path.join(p, f) 119 }), function (file, cb) { 120 rimraf(file, cb) 121 }, function (er) { 122 if (er) return cb(er) 123 fs.rmdir(p, cb) 124 if (er) 125 return cb(er) 126 var n = files.length 127 if (n === 0) 128 return fs.rmdir(p, cb) 129 var errState 130 files.forEach(function (f) { 131 rimraf(path.join(p, f), function (er) { 132 if (errState) 133 return 134 if (er) 135 return cb(errState = er) 136 if (--n === 0) 137 fs.rmdir(p, cb) 138 }) 124 139 }) 125 140 }) 126 141 } 127 142 128 function asyncForEach (list, fn, cb) { 129 if (!list.length) cb() 130 var c = list.length 131 , errState = null 132 list.forEach(function (item, i, list) { 133 fn(item, function (er) { 134 if (errState) return 135 if (er) return cb(errState = er) 136 if (-- c === 0) return cb() 137 }) 138 }) 143 // this looks simpler, and is strictly *faster*, but will 144 // tie up the JavaScript thread and fail on excessively 145 // deep directory trees. 146 function rimrafSync (p) { 147 try { 148 fs.unlinkSync(p) 149 } catch (er) { 150 if (er.code === "ENOENT") 151 return 152 if (er.code === "EPERM") 153 return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) 154 if (er.code !== "EISDIR") 155 throw er 156 rmdirSync(p, er) 157 } 139 158 } 140 159 141 // this looks simpler, but it will fail with big directory trees, 142 // or on slow stupid awful cygwin filesystems 143 function rimrafSync (p) { 160 function rmdirSync (p, originalEr) { 144 161 try { 145 var s = fs[lstatSync](p)162 fs.rmdirSync(p) 146 163 } catch (er) { 147 if (er.code === "ENOENT") return 148 throw er 164 if (er.code === "ENOENT") 165 return 166 if (er.code === "ENOTDIR") 167 throw originalEr 168 if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") 169 rmkidsSync(p) 149 170 } 171 } 150 172 151 if (!writable(s)) { 152 fs.chmodSync(p, s.mode | 0222) 153 } 154 155 if (!s.isDirectory()) return fs.unlinkSync(p) 156 173 function rmkidsSync (p) { 157 174 fs.readdirSync(p).forEach(function (f) { 158 175 rimrafSync(path.join(p, f)) -
Dev/trunk/node_modules/grunt/node_modules/underscore.string/package.json
r484 r516 69 69 "readmeFilename": "README.markdown", 70 70 "_id": "underscore.string@2.2.1", 71 "dist": { 72 "shasum": "2aa155e7c49bcbfd88ec69b8c9694d885385c717" 73 }, 74 "_from": "underscore.string@~2.2.1", 75 "_resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz" 71 "_from": "underscore.string@~2.2.1" 76 72 } -
Dev/trunk/node_modules/grunt/package.json
r484 r516 2 2 "name": "grunt", 3 3 "description": "The JavaScript Task Runner", 4 "version": "0.4. 2",4 "version": "0.4.4", 5 5 "author": { 6 6 "name": "\"Cowboy\" Ben Alman", … … 59 59 "minimatch": "~0.2.12", 60 60 "nopt": "~1.0.10", 61 "rimraf": "~2. 0.3",61 "rimraf": "~2.2.6", 62 62 "lodash": "~0.9.2", 63 63 "underscore.string": "~2.2.1", … … 65 65 "js-yaml": "~2.0.5", 66 66 "exit": "~0.1.1", 67 "getobject": "~0.1.0" 67 "getobject": "~0.1.0", 68 "grunt-legacy-util": "~0.1.2" 68 69 }, 69 70 "devDependencies": { … … 76 77 "shelljs": "~0.2.5" 77 78 }, 78 "readme": "# Grunt: The JavaScript Task Runner [](http://travis-ci.org/gruntjs/grunt)\n\n<img align=\"right\" height=\"260\" src=\"http://gruntjs.com/img/grunt-logo-no-wordmark.svg\">\n\n\n### Documentation\n\nVisit the [gruntjs.com](http://gruntjs.com/) website for all the things.\n\n### Support / Contributing\nBefore you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.\n\nYou can find the grunt team in [#grunt on irc.freenode.net](http://webchat.freenode.net/?channels=grunt).\n\n### Release History\nSee the [CHANGELOG](CHANGELOG).\n",79 "readme": "# Grunt: The JavaScript Task Runner\n\n[](http://travis-ci.org/gruntjs/grunt)\n[](http://gruntjs.com/)\n\n<img align=\"right\" height=\"260\" src=\"http://gruntjs.com/img/grunt-logo-no-wordmark.svg\">\n\n\n### Documentation\n\nVisit the [gruntjs.com](http://gruntjs.com/) website for all the things.\n\n### Support / Contributing\nBefore you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.\n\nYou can find the grunt team in [#grunt on irc.freenode.net](http://webchat.freenode.net/?channels=grunt).\n\n### Release History\nSee the [CHANGELOG](CHANGELOG).\n", 79 80 "readmeFilename": "README.md", 80 "_id": "grunt@0.4. 2",81 "_id": "grunt@0.4.4", 81 82 "dist": { 82 "shasum": " 1f6804f00e977dd90b9f97b1faed480215db0857"83 "shasum": "64f477fef801475ab92f1819a691c6c71b72902e" 83 84 }, 84 "_from": "grunt@0.4. 2",85 "_resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4. 2.tgz"85 "_from": "grunt@0.4.4", 86 "_resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.4.tgz" 86 87 } -
Dev/trunk/node_modules/mocha/node_modules/commander/package.json
r484 r516 35 35 "homepage": "https://github.com/visionmedia/commander.js", 36 36 "_id": "commander@2.0.0", 37 "dist": { 38 "shasum": "45ba4f69d428bc6178e81d200893e6c3d103eb8b" 39 }, 40 "_from": "commander@2.0.0", 41 "_resolved": "https://registry.npmjs.org/commander/-/commander-2.0.0.tgz" 37 "_from": "commander@2.0.0" 42 38 } -
Dev/trunk/node_modules/mocha/node_modules/debug/package.json
r484 r516 43 43 "homepage": "https://github.com/visionmedia/debug", 44 44 "_id": "debug@0.7.4", 45 "dist": { 46 "shasum": "6283150882c46779d1f025aa25cf9953001b33b8" 47 }, 48 "_from": "debug@*", 49 "_resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz" 45 "_from": "debug@*" 50 46 } -
Dev/trunk/node_modules/mocha/node_modules/diff/package.json
r484 r516 33 33 "main": "./diff", 34 34 "scripts": { 35 "test": " node_modules/.bin/mocha test/*.js"35 "test": "mocha test/*.js" 36 36 }, 37 37 "dependencies": {}, … … 48 48 "homepage": "https://github.com/kpdecker/jsdiff", 49 49 "_id": "diff@1.0.7", 50 "dist": { 51 "shasum": "bc32d3a6173e197f3eff7fe82ab81b821da8909a" 52 }, 53 "_from": "diff@1.0.7", 54 "_resolved": "https://registry.npmjs.org/diff/-/diff-1.0.7.tgz" 50 "_from": "diff@1.0.7" 55 51 } -
Dev/trunk/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/graceful-fs.js
r484 r516 87 87 88 88 ReaddirReq.prototype.done = function(er, files) { 89 if (files && files.sort) 90 files = files.sort() 89 91 Req.prototype.done.call(this, er, files) 90 92 onclose() -
Dev/trunk/node_modules/mocha/node_modules/glob/node_modules/graceful-fs/package.json
r484 r516 7 7 "name": "graceful-fs", 8 8 "description": "A drop-in replacement for fs, making various improvements.", 9 "version": "2.0. 1",9 "version": "2.0.2", 10 10 "repository": { 11 11 "type": "git", … … 45 45 }, 46 46 "homepage": "https://github.com/isaacs/node-graceful-fs", 47 "_id": "graceful-fs@2.0. 1",48 "_from": "graceful-fs@~2 "47 "_id": "graceful-fs@2.0.2", 48 "_from": "graceful-fs@~2.0.0" 49 49 } -
Dev/trunk/node_modules/mocha/node_modules/glob/node_modules/minimatch/README.md
r484 r516 20 20 minimatch("bar.foo", "*.foo") // true! 21 21 minimatch("bar.foo", "*.bar") // false! 22 minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! 22 23 ``` 23 24 … … 36 37 * `man 3 fnmatch` 37 38 * `man 5 gitignore` 38 39 ### Comparisons to other fnmatch/glob implementations40 41 While strict compliance with the existing standards is a worthwhile42 goal, some discrepancies exist between minimatch and other43 implementations, and are intentional.44 45 If the pattern starts with a `!` character, then it is negated. Set the46 `nonegate` flag to suppress this behavior, and treat leading `!`47 characters normally. This is perhaps relevant if you wish to start the48 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!`49 characters at the start of a pattern will negate the pattern multiple50 times.51 52 If a pattern starts with `#`, then it is treated as a comment, and53 will not match anything. Use `\#` to match a literal `#` at the54 start of a line, or set the `nocomment` flag to suppress this behavior.55 56 The double-star character `**` is supported by default, unless the57 `noglobstar` flag is set. This is supported in the manner of bsdglob58 and bash 4.1, where `**` only has special significance if it is the only59 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but60 `a/**b` will not. **Note that this is different from the way that `**` is61 handled by ruby's `Dir` class.**62 63 If an escaped pattern has no matches, and the `nonull` flag is set,64 then minimatch.match returns the pattern as-provided, rather than65 interpreting the character escapes. For example,66 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than67 `"*a?"`. This is akin to setting the `nullglob` option in bash, except68 that it does not resolve escaped pattern characters.69 70 If brace expansion is not disabled, then it is performed before any71 other interpretation of the glob pattern. Thus, a pattern like72 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded73 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are74 checked for validity. Since those two are valid, matching proceeds.75 76 39 77 40 ## Minimatch Class … … 217 180 Returns from negate expressions the same as if they were not negated. 218 181 (Ie, true on a hit, false on a miss.) 182 183 184 ## Comparisons to other fnmatch/glob implementations 185 186 While strict compliance with the existing standards is a worthwhile 187 goal, some discrepancies exist between minimatch and other 188 implementations, and are intentional. 189 190 If the pattern starts with a `!` character, then it is negated. Set the 191 `nonegate` flag to suppress this behavior, and treat leading `!` 192 characters normally. This is perhaps relevant if you wish to start the 193 pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` 194 characters at the start of a pattern will negate the pattern multiple 195 times. 196 197 If a pattern starts with `#`, then it is treated as a comment, and 198 will not match anything. Use `\#` to match a literal `#` at the 199 start of a line, or set the `nocomment` flag to suppress this behavior. 200 201 The double-star character `**` is supported by default, unless the 202 `noglobstar` flag is set. This is supported in the manner of bsdglob 203 and bash 4.1, where `**` only has special significance if it is the only 204 thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but 205 `a/**b` will not. 206 207 If an escaped pattern has no matches, and the `nonull` flag is set, 208 then minimatch.match returns the pattern as-provided, rather than 209 interpreting the character escapes. For example, 210 `minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than 211 `"*a?"`. This is akin to setting the `nullglob` option in bash, except 212 that it does not resolve escaped pattern characters. 213 214 If brace expansion is not disabled, then it is performed before any 215 other interpretation of the glob pattern. Thus, a pattern like 216 `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded 217 **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are 218 checked for validity. Since those two are valid, matching proceeds. -
Dev/trunk/node_modules/mocha/node_modules/glob/node_modules/minimatch/minimatch.js
r484 r516 69 69 var slashSplit = /\/+/ 70 70 71 minimatch.monkeyPatch = monkeyPatch72 function monkeyPatch () {73 var desc = Object.getOwnPropertyDescriptor(String.prototype, "match")74 var orig = desc.value75 desc.value = function (p) {76 if (p instanceof Minimatch) return p.match(this)77 return orig.call(this, p)78 }79 Object.defineProperty(String.prototype, desc)80 }81 82 71 minimatch.filter = filter 83 72 function filter (pattern, options) { … … 179 168 } 180 169 170 Minimatch.prototype.debug = function() {} 171 181 172 Minimatch.prototype.make = make 182 173 function make () { … … 203 194 var set = this.globSet = this.braceExpand() 204 195 205 if (options.debug) console.error(this.pattern, set) 196 if (options.debug) this.debug = console.error 197 198 this.debug(this.pattern, set) 206 199 207 200 // step 3: now we have a set, so turn each one into a series of path-portion … … 214 207 }) 215 208 216 if (options.debug) console.error(this.pattern, set)209 this.debug(this.pattern, set) 217 210 218 211 // glob --> regexps … … 221 214 }, this) 222 215 223 if (options.debug) console.error(this.pattern, set)216 this.debug(this.pattern, set) 224 217 225 218 // filter out everything that didn't compile properly. … … 228 221 }) 229 222 230 if (options.debug) console.error(this.pattern, set)223 this.debug(this.pattern, set) 231 224 232 225 this.set = set … … 303 296 // and then prepend it to everything we find. 304 297 if (pattern.charAt(0) !== "{") { 305 // console.error(pattern)298 this.debug(pattern) 306 299 var prefix = null 307 300 for (var i = 0, l = pattern.length; i < l; i ++) { 308 301 var c = pattern.charAt(i) 309 // console.error(i, c)302 this.debug(i, c) 310 303 if (c === "\\") { 311 304 escaping = !escaping … … 318 311 // actually no sets, all { were escaped. 319 312 if (prefix === null) { 320 // console.error("no sets")313 this.debug("no sets") 321 314 return [pattern] 322 315 } 323 316 324 var tail = braceExpand(pattern.substr(i), options)317 var tail = braceExpand.call(this, pattern.substr(i), options) 325 318 return tail.map(function (t) { 326 319 return prefix + t … … 337 330 var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) 338 331 if (numset) { 339 // console.error("numset", numset[1], numset[2])340 var suf = braceExpand (pattern.substr(numset[0].length), options)332 this.debug("numset", numset[1], numset[2]) 333 var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) 341 334 , start = +numset[1] 342 335 , end = +numset[2] … … 370 363 } 371 364 372 // console.error("Entering for")365 this.debug("Entering for") 373 366 FOR: for (i = 1, l = pattern.length; i < l; i ++) { 374 367 var c = pattern.charAt(i) 375 // console.error("", i, c)368 this.debug("", i, c) 376 369 377 370 if (escaping) { … … 421 414 // and need to escape the leading brace 422 415 if (depth !== 0) { 423 // console.error("didn't close", pattern)424 return braceExpand ("\\" + pattern, options)416 this.debug("didn't close", pattern) 417 return braceExpand.call(this, "\\" + pattern, options) 425 418 } 426 419 427 420 // x{y,z} -> ["xy", "xz"] 428 // console.error("set", set)429 // console.error("suffix", pattern.substr(i))430 var suf = braceExpand (pattern.substr(i), options)421 this.debug("set", set) 422 this.debug("suffix", pattern.substr(i)) 423 var suf = braceExpand.call(this, pattern.substr(i), options) 431 424 // ["b", "c{d,e}","{f,g}h"] -> 432 425 // [["b"], ["cd", "ce"], ["fh", "gh"]] 433 426 var addBraces = set.length === 1 434 // console.error("set pre-expanded", set)427 this.debug("set pre-expanded", set) 435 428 set = set.map(function (p) { 436 return braceExpand (p, options)437 } )438 // console.error("set expanded", set)429 return braceExpand.call(this, p, options) 430 }, this) 431 this.debug("set expanded", set) 439 432 440 433 … … 497 490 : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" 498 491 : "(?!\\.)" 492 , self = this 499 493 500 494 function clearStateChar () { … … 515 509 break 516 510 } 511 self.debug('clearStateChar %j %j', stateChar, re) 517 512 stateChar = false 518 513 } … … 523 518 ; i ++ ) { 524 519 525 if (options.debug) { 526 console.error("%s\t%s %s %j", pattern, i, re, c) 527 } 520 this.debug("%s\t%s %s %j", pattern, i, re, c) 528 521 529 522 // skip over any that are escaped. … … 552 545 case "@": 553 546 case "!": 554 if (options.debug) { 555 console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 556 } 547 this.debug("%s\t%s %s %j <-- stateChar", pattern, i, re, c) 557 548 558 549 // all of those are literals inside a class, except that 559 550 // the glob [!a] means [^a] in regexp 560 551 if (inClass) { 552 this.debug(' in class') 561 553 if (c === "!" && i === classStart + 1) c = "^" 562 554 re += c … … 567 559 // that there was something like ** or +? in there. 568 560 // Handle the stateChar, then proceed with this one. 561 self.debug('call clearStateChar %j', stateChar) 569 562 clearStateChar() 570 563 stateChar = c … … 592 585 // negation is (?:(?!js)[^/]*) 593 586 re += stateChar === "!" ? "(?:(?!" : "(?:" 587 this.debug('plType %j %j', stateChar, re) 594 588 stateChar = false 595 589 continue … … 601 595 } 602 596 597 clearStateChar() 603 598 hasMagic = true 604 599 re += ")" … … 624 619 } 625 620 621 clearStateChar() 626 622 re += "|" 627 623 continue … … 716 712 }) 717 713 718 // console.error("tail=%j\n %s", tail, tail)714 this.debug("tail=%j\n %s", tail, tail) 719 715 var t = pl.type === "*" ? star 720 716 : pl.type === "?" ? qmark … … 830 826 Minimatch.prototype.match = match 831 827 function match (f, partial) { 832 // console.error("match", f, this.pattern)828 this.debug("match", f, this.pattern) 833 829 // short-circuit in the case of busted things. 834 830 // comments, etc. … … 848 844 // treat the test path as a set of pathparts. 849 845 f = f.split(slashSplit) 850 if (options.debug) { 851 console.error(this.pattern, "split", f) 852 } 846 this.debug(this.pattern, "split", f) 853 847 854 848 // just ONE of the pattern sets in this.set needs to match … … 858 852 859 853 var set = this.set 860 // console.error(this.pattern, "set", set) 854 this.debug(this.pattern, "set", set) 855 856 var splitFile = path.basename(f.join("/")).split("/") 861 857 862 858 for (var i = 0, l = set.length; i < l; i ++) { 863 var pattern = set[i] 864 var hit = this.matchOne(f, pattern, partial) 859 var pattern = set[i], file = f 860 if (options.matchBase && pattern.length === 1) { 861 file = splitFile 862 } 863 var hit = this.matchOne(file, pattern, partial) 865 864 if (hit) { 866 865 if (options.flipNegate) return true … … 883 882 var options = this.options 884 883 885 if (options.debug) { 886 console.error("matchOne", 887 { "this": this 888 , file: file 889 , pattern: pattern }) 890 } 891 892 if (options.matchBase && pattern.length === 1) { 893 file = path.basename(file.join("/")).split("/") 894 } 895 896 if (options.debug) { 897 console.error("matchOne", file.length, pattern.length) 898 } 884 this.debug("matchOne", 885 { "this": this 886 , file: file 887 , pattern: pattern }) 888 889 this.debug("matchOne", file.length, pattern.length) 899 890 900 891 for ( var fi = 0 … … 905 896 ; fi ++, pi ++ ) { 906 897 907 if (options.debug) { 908 console.error("matchOne loop") 909 } 898 this.debug("matchOne loop") 910 899 var p = pattern[pi] 911 900 , f = file[fi] 912 901 913 if (options.debug) { 914 console.error(pattern, p, f) 915 } 902 this.debug(pattern, p, f) 916 903 917 904 // should be impossible. … … 920 907 921 908 if (p === GLOBSTAR) { 922 if (options.debug) 923 console.error('GLOBSTAR', [pattern, p, f]) 909 this.debug('GLOBSTAR', [pattern, p, f]) 924 910 925 911 // "**" … … 948 934 , pr = pi + 1 949 935 if (pr === pl) { 950 if (options.debug) 951 console.error('** at the end') 936 this.debug('** at the end') 952 937 // a ** at the end will just swallow the rest. 953 938 // We have found a match. … … 967 952 var swallowee = file[fr] 968 953 969 if (options.debug) { 970 console.error('\nglobstar while', 971 file, fr, pattern, pr, swallowee) 972 } 954 this.debug('\nglobstar while', 955 file, fr, pattern, pr, swallowee) 973 956 974 957 // XXX remove this slice. Just pass the start index. 975 958 if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { 976 if (options.debug) 977 console.error('globstar found match!', fr, fl, swallowee) 959 this.debug('globstar found match!', fr, fl, swallowee) 978 960 // found a match. 979 961 return true … … 983 965 if (swallowee === "." || swallowee === ".." || 984 966 (!options.dot && swallowee.charAt(0) === ".")) { 985 if (options.debug) 986 console.error("dot detected!", file, fr, pattern, pr) 967 this.debug("dot detected!", file, fr, pattern, pr) 987 968 break WHILE 988 969 } 989 970 990 971 // ** swallows a segment, and continue. 991 if (options.debug) 992 console.error('globstar swallow a segment, and continue') 972 this.debug('globstar swallow a segment, and continue') 993 973 fr ++ 994 974 } … … 999 979 if (partial) { 1000 980 // ran out of file 1001 // console.error("\n>>> no match, partial?", file, fr, pattern, pr)981 this.debug("\n>>> no match, partial?", file, fr, pattern, pr) 1002 982 if (fr === fl) return true 1003 983 } … … 1015 995 hit = f === p 1016 996 } 1017 if (options.debug) { 1018 console.error("string match", p, f, hit) 1019 } 997 this.debug("string match", p, f, hit) 1020 998 } else { 1021 999 hit = f.match(p) 1022 if (options.debug) { 1023 console.error("pattern match", p, f, hit) 1024 } 1000 this.debug("pattern match", p, f, hit) 1025 1001 } 1026 1002 -
Dev/trunk/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/lru-cache/package.json
r484 r516 30 30 "homepage": "https://github.com/isaacs/node-lru-cache", 31 31 "_id": "lru-cache@2.5.0", 32 "dist": { 33 "shasum": "be07d09e5b05f10b83d0cf01d4891a7729288c69" 34 }, 35 "_from": "lru-cache@2", 36 "_resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.5.0.tgz" 32 "_from": "lru-cache@2" 37 33 } -
Dev/trunk/node_modules/mocha/node_modules/glob/node_modules/minimatch/package.json
r484 r516 7 7 "name": "minimatch", 8 8 "description": "a glob matcher in javascript", 9 "version": "0.2.1 2",9 "version": "0.2.14", 10 10 "repository": { 11 11 "type": "git", … … 14 14 "main": "minimatch.js", 15 15 "scripts": { 16 "test": "tap test "16 "test": "tap test/*.js" 17 17 }, 18 18 "engines": { … … 30 30 "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" 31 31 }, 32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n ```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n",32 "readme": "# minimatch\n\nA minimal matching utility.\n\n[](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\nminimatch(\"bar.foo\", \"*.+(bar|foo)\", { debug: true }) // true, and noisy!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n", 33 33 "readmeFilename": "README.md", 34 34 "bugs": { … … 36 36 }, 37 37 "homepage": "https://github.com/isaacs/minimatch", 38 "_id": "minimatch@0.2.1 2",38 "_id": "minimatch@0.2.14", 39 39 "_from": "minimatch@~0.2.11" 40 40 } -
Dev/trunk/node_modules/mocha/node_modules/glob/package.json
r484 r516 37 37 "homepage": "https://github.com/isaacs/node-glob", 38 38 "_id": "glob@3.2.3", 39 "_from": "glob@3.2.3" 39 "dist": { 40 "shasum": "bb766eb21bf5e312976269aa9a97ae6a1952e404" 41 }, 42 "_from": "glob@3.2.3", 43 "_resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz" 40 44 } -
Dev/trunk/node_modules/mocha/node_modules/jade/node_modules/commander/package.json
r484 r516 36 36 "homepage": "https://github.com/visionmedia/commander.js", 37 37 "_id": "commander@0.6.1", 38 "dist": { 39 "shasum": "c725ed5e9b2bf532b3fe3cba4f81b552cecf0550" 40 }, 41 "_from": "commander@0.6.1", 42 "_resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz" 38 "_from": "commander@0.6.1" 43 39 } -
Dev/trunk/node_modules/mocha/node_modules/jade/node_modules/mkdirp/package.json
r484 r516 34 34 "homepage": "https://github.com/substack/node-mkdirp", 35 35 "_id": "mkdirp@0.3.0", 36 "dist": { 37 "shasum": "03e1756c8f2160b57caad091908d67ff928d0664" 38 }, 39 "_from": "mkdirp@0.3.0", 40 "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz" 36 "_from": "mkdirp@0.3.0" 41 37 } -
Dev/trunk/node_modules/mocha/node_modules/jade/package.json
r484 r516 45 45 "homepage": "https://github.com/visionmedia/jade", 46 46 "_id": "jade@0.26.3", 47 "dist": { 48 "shasum": "43c0b6da7fd794b3d7a28db08c37407ab90bd1ad" 49 }, 50 "_from": "jade@0.26.3", 51 "_resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz" 47 "_from": "jade@0.26.3" 52 48 } -
Dev/trunk/node_modules/mocha/node_modules/mkdirp/package.json
r484 r516 31 31 "homepage": "https://github.com/substack/node-mkdirp", 32 32 "_id": "mkdirp@0.3.5", 33 "dist": { 34 "shasum": "7d4fee48c751e68eddf5903038ad25370cd80618" 35 }, 36 "_from": "mkdirp@0.3.5", 37 "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz" 33 "_from": "mkdirp@0.3.5" 38 34 } -
Dev/trunk/node_modules/mocha/package.json
r484 r516 60 60 "shasum": "d904d1c3635c491f4c0adc6afe8cd8b2580dbae7" 61 61 }, 62 "_from": "mocha@ ",62 "_from": "mocha@1.14.0", 63 63 "_resolved": "https://registry.npmjs.org/mocha/-/mocha-1.14.0.tgz" 64 64 } -
Dev/trunk/node_modules/should/.idea/workspace.xml
r484 r516 5 5 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/History.md" afterPath="$PROJECT_DIR$/History.md" /> 6 6 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" /> 7 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/should.js" afterPath="$PROJECT_DIR$/should.js" /> 7 8 </list> 8 9 <ignored path="should.js.iws" /> … … 39 40 <entry file="file://$PROJECT_DIR$/lib/should.js"> 40 41 <provider selected="true" editor-type-id="text-editor"> 41 <state line="2 7" column="84" selection-start="644" selection-end="644" vertical-scroll-proportion="0.0" vertical-offset="1045" max-vertical-offset="19019">42 <state line="29" column="88" selection-start="656" selection-end="656" vertical-scroll-proportion="-8.796296" vertical-offset="0" max-vertical-offset="19057"> 42 43 <folding /> 43 44 </state> … … 48 49 <entry file="file://$PROJECT_DIR$/Readme.md"> 49 50 <provider selected="true" editor-type-id="text-editor"> 50 <state line="4 19" column="0" selection-start="10358" selection-end="10358" vertical-scroll-proportion="0.0" vertical-offset="7961" max-vertical-offset="8702">51 <folding /> 52 </state> 53 </provider> 54 </entry> 55 </file> 56 <file leaf-file-name="package.json" pinned="false" current=" true" current-in-tab="true">51 <state line="420" column="0" selection-start="10380" selection-end="10380" vertical-scroll-proportion="0.0" vertical-offset="7980" max-vertical-offset="8702"> 52 <folding /> 53 </state> 54 </provider> 55 </entry> 56 </file> 57 <file leaf-file-name="package.json" pinned="false" current="false" current-in-tab="false"> 57 58 <entry file="file://$PROJECT_DIR$/package.json"> 58 59 <provider selected="true" editor-type-id="text-editor"> 59 <state line="2" column="21" selection-start="108" selection-end="108" vertical-scroll-proportion=" 0.0479798" vertical-offset="0" max-vertical-offset="792">60 <state line="2" column="21" selection-start="108" selection-end="108" vertical-scroll-proportion="-1.52" vertical-offset="0" max-vertical-offset="399"> 60 61 <folding /> 61 62 </state> … … 66 67 <entry file="file://$PROJECT_DIR$/test/should.test.js"> 67 68 <provider selected="true" editor-type-id="text-editor"> 68 <state line="913" column=" 62" selection-start="25161" selection-end="25161" vertical-scroll-proportion="0.0" vertical-offset="16720" max-vertical-offset="17537">69 <state line="913" column="59" selection-start="25150" selection-end="25150" vertical-scroll-proportion="0.0" vertical-offset="16720" max-vertical-offset="17537"> 69 70 <folding> 70 <marker date="138 4152632000" expanded="true" signature="24476:24735" placeholder="{...}" />71 <marker date="1386247488000" expanded="true" signature="24476:24735" placeholder="{...}" /> 71 72 </folding> 72 73 </state> … … 74 75 </entry> 75 76 </file> 76 <file leaf-file-name="History.md" pinned="false" current=" false" current-in-tab="false">77 <file leaf-file-name="History.md" pinned="false" current="true" current-in-tab="true"> 77 78 <entry file="file://$PROJECT_DIR$/History.md"> 78 79 <provider selected="true" editor-type-id="text-editor"> 79 <state line="3" column=" 60" selection-start="99" selection-end="99" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="3572">80 <state line="3" column="45" selection-start="84" selection-end="84" vertical-scroll-proportion="0.069767445" vertical-offset="0" max-vertical-offset="3667"> 80 81 <folding /> 81 82 </state> … … 131 132 <option value="$PROJECT_DIR$/lib/should.js" /> 132 133 <option value="$PROJECT_DIR$/test/should.test.js" /> 134 <option value="$PROJECT_DIR$/package.json" /> 133 135 <option value="$PROJECT_DIR$/History.md" /> 134 <option value="$PROJECT_DIR$/package.json" />135 136 </list> 136 137 </option> … … 201 202 </PATH_ELEMENT> 202 203 </PATH> 204 <PATH> 205 <PATH_ELEMENT> 206 <option name="myItemId" value="should.js" /> 207 <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> 208 </PATH_ELEMENT> 209 <PATH_ELEMENT> 210 <option name="myItemId" value="should.js" /> 211 <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> 212 </PATH_ELEMENT> 213 <PATH_ELEMENT> 214 <option name="myItemId" value="lib" /> 215 <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> 216 </PATH_ELEMENT> 217 </PATH> 203 218 </subPane> 204 219 </pane> … … 212 227 <property name="FullScreen" value="false" /> 213 228 <property name="DefaultHtmlFileTemplate" value="Html5" /> 229 <property name="options.splitter.details.proportions" value="0.2" /> 214 230 <property name="options.searchVisible" value="true" /> 215 <property name="options.splitter.details.proportions" value="0.2" />216 231 </component> 217 232 <component name="RunManager"> 218 <configuration default="true" type="DartUnitRunConfigurationType" factoryName="DartUnit">219 <option name="VMOptions" />220 <option name="arguments" />221 <option name="filePath" />222 <option name="scope" value="ALL" />223 <option name="testName" />224 <method />225 </configuration>226 233 <configuration default="true" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application"> 227 234 <option name="VMOptions" /> … … 232 239 <option name="showConsoleOnStdErr" value="false" /> 233 240 <option name="showConsoleOnStdOut" value="false" /> 241 <method /> 242 </configuration> 243 <configuration default="true" type="DartUnitRunConfigurationType" factoryName="DartUnit"> 244 <option name="VMOptions" /> 245 <option name="arguments" /> 246 <option name="filePath" /> 247 <option name="scope" value="ALL" /> 248 <option name="testName" /> 234 249 <method /> 235 250 </configuration> … … 354 369 <entry file="file://$PROJECT_DIR$/Readme.md"> 355 370 <provider selected="true" editor-type-id="text-editor"> 356 <state line="4 19" column="0" selection-start="10358" selection-end="10358" vertical-scroll-proportion="0.0" vertical-offset="7961" max-vertical-offset="8702">371 <state line="420" column="0" selection-start="10380" selection-end="10380" vertical-scroll-proportion="0.0" vertical-offset="7980" max-vertical-offset="8702"> 357 372 <folding /> 358 373 </state> … … 368 383 <entry file="file://$PROJECT_DIR$/.npmignore"> 369 384 <provider selected="true" editor-type-id="text-editor"> 370 <state line="1" column="4" selection-start="13" selection-end="13" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="105"> 371 <folding /> 385 <state line="1" column="4" selection-start="13" selection-end="13" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="105" /> 386 </provider> 387 </entry> 388 <entry file="file://$PROJECT_DIR$/lib/should.js"> 389 <provider selected="true" editor-type-id="text-editor"> 390 <state line="29" column="88" selection-start="656" selection-end="656" vertical-scroll-proportion="-8.796296" vertical-offset="0" max-vertical-offset="19057"> 391 <folding /> 392 </state> 393 </provider> 394 </entry> 395 <entry file="file://$PROJECT_DIR$/test/should.test.js"> 396 <provider selected="true" editor-type-id="text-editor"> 397 <state line="913" column="59" selection-start="25150" selection-end="25150" vertical-scroll-proportion="0.0" vertical-offset="16720" max-vertical-offset="17537"> 398 <folding> 399 <marker date="1386247488000" expanded="true" signature="24476:24735" placeholder="{...}" /> 400 </folding> 372 401 </state> 373 402 </provider> … … 375 404 <entry file="file://$PROJECT_DIR$/Makefile"> 376 405 <provider selected="true" editor-type-id="text-editor"> 377 <state line="6" column="5" selection-start="64" selection-end="64" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="210"> 378 <folding /> 379 </state> 380 </provider> 381 </entry> 382 <entry file="file://$PROJECT_DIR$/lib/should.js"> 383 <provider selected="true" editor-type-id="text-editor"> 384 <state line="27" column="84" selection-start="644" selection-end="644" vertical-scroll-proportion="0.0" vertical-offset="57" max-vertical-offset="19019"> 385 <folding /> 386 </state> 387 </provider> 388 </entry> 389 <entry file="file://$PROJECT_DIR$/test/should.test.js"> 390 <provider selected="true" editor-type-id="text-editor"> 391 <state line="913" column="62" selection-start="25161" selection-end="25161" vertical-scroll-proportion="0.0" vertical-offset="16720" max-vertical-offset="17537"> 392 <folding> 393 <marker date="1384152632000" expanded="true" signature="24476:24735" placeholder="{...}" /> 394 </folding> 406 <state line="6" column="5" selection-start="64" selection-end="64" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="266"> 407 <folding /> 408 </state> 409 </provider> 410 </entry> 411 <entry file="file://$PROJECT_DIR$/package.json"> 412 <provider selected="true" editor-type-id="text-editor"> 413 <state line="2" column="21" selection-start="108" selection-end="108" vertical-scroll-proportion="-1.52" vertical-offset="0" max-vertical-offset="399"> 414 <folding /> 395 415 </state> 396 416 </provider> … … 398 418 <entry file="file://$PROJECT_DIR$/History.md"> 399 419 <provider selected="true" editor-type-id="text-editor"> 400 <state line="3" column="60" selection-start="99" selection-end="99" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="3572"> 401 <folding /> 402 </state> 403 </provider> 404 </entry> 405 <entry file="file://$PROJECT_DIR$/package.json"> 406 <provider selected="true" editor-type-id="text-editor"> 407 <state line="2" column="21" selection-start="108" selection-end="108" vertical-scroll-proportion="0.0479798" vertical-offset="0" max-vertical-offset="792"> 420 <state line="3" column="45" selection-start="84" selection-end="84" vertical-scroll-proportion="0.069767445" vertical-offset="0" max-vertical-offset="3667"> 408 421 <folding /> 409 422 </state> -
Dev/trunk/node_modules/should/History.md
r484 r516 1 2.1.1 / 2013-12-05 2 ================== 3 4 * Move date formatting out of should.inspect 5 1 6 2.1.0 / 2013-11-11 2 7 ================== -
Dev/trunk/node_modules/should/Readme.md
r484 r516 223 223 ## property 224 224 225 Assert property exists and has optional value :225 Assert property exists and has optional value(compare using `===`): 226 226 ```javascript 227 227 user.should.have.property('name') -
Dev/trunk/node_modules/should/lib/should.js
r484 r516 25 25 }; 26 26 27 should.inspect = function(obj, opts) { 28 if(util.isDate(obj) && typeof obj.inspect !== 'function') obj = obj.toISOString(); 29 return inspect(obj, opts); 30 }; 27 should.inspect = inspect; 28 29 function i(value) { 30 if(util.isDate(value) && typeof value.inspect !== 'function') return value.toISOString(); //show millis in dates 31 return should.inspect(value); 32 } 31 33 32 34 /** … … 52 54 if(null == obj) { 53 55 throw new AssertionError({ 54 message: msg || ('expected ' + should.inspect(obj) + ' to exist')56 message: msg || ('expected ' + i(obj) + ' to exist') 55 57 , stackStartFunction: should.exist 56 58 }); … … 70 72 if (null != obj) { 71 73 throw new AssertionError({ 72 message: msg || ('expected ' + should.inspect(obj) + ' to not exist')74 message: msg || ('expected ' + i(obj) + ' to not exist') 73 75 , stackStartFunction: should.not.exist 74 76 }); … … 238 240 239 241 get inspect() { 240 return should.inspect(this.obj);242 return i(this.obj); 241 243 }, 242 244 … … 368 370 this.assert( 369 371 eql(val, this.obj) 370 , function(){ return 'expected ' + this.inspect + ' to equal ' + should.inspect(val) + (description ? " | " + description : "") }371 , function(){ return 'expected ' + this.inspect + ' to not equal ' + should.inspect(val) + (description ? " | " + description : "") }372 , function(){ return 'expected ' + this.inspect + ' to equal ' + i(val) + (description ? " | " + description : "") } 373 , function(){ return 'expected ' + this.inspect + ' to not equal ' + i(val) + (description ? " | " + description : "") } 372 374 , val 373 375 , true … … 387 389 this.assert( 388 390 val === this.obj 389 , function(){ return 'expected ' + this.inspect + ' to equal ' + should.inspect(val) + (description ? " | " + description : "") }390 , function(){ return 'expected ' + this.inspect + ' to not equal ' + should.inspect(val) + (description ? " | " + description : "") }391 , function(){ return 'expected ' + this.inspect + ' to equal ' + i(val) + (description ? " | " + description : "") } 392 , function(){ return 'expected ' + this.inspect + ' to not equal ' + i(val) + (description ? " | " + description : "") } 391 393 , val 392 394 , void 0 … … 640 642 if (this.negate && undefined !== val) { 641 643 if (undefined === this.obj[name]) { 642 throw new Error(this.inspect + ' has no property ' + should.inspect(name) + (description ? " | " + description : ""));644 throw new Error(this.inspect + ' has no property ' + i(name) + (description ? " | " + description : "")); 643 645 } 644 646 } else { 645 647 this.assert( 646 648 undefined !== this.obj[name] 647 , function(){ return 'expected ' + this.inspect + ' to have a property ' + should.inspect(name) + (description ? " | " + description : "") }648 , function(){ return 'expected ' + this.inspect + ' to not have a property ' + should.inspect(name) + (description ? " | " + description : "") }649 , function(){ return 'expected ' + this.inspect + ' to have a property ' + i(name) + (description ? " | " + description : "") } 650 , function(){ return 'expected ' + this.inspect + ' to not have a property ' + i(name) + (description ? " | " + description : "") } 649 651 , void 0 650 652 , void 0 … … 655 657 this.assert( 656 658 val === this.obj[name] 657 , function(){ return 'expected ' + this.inspect + ' to have a property ' + should.inspect(name)658 + ' of ' + should.inspect(val) + ', but got ' + should.inspect(this.obj[name]) + (description ? " | " + description : "") }659 , function(){ return 'expected ' + this.inspect + ' to not have a property ' + should.inspect(name) + ' of ' + should.inspect(val) + (description ? " | " + description : "") }659 , function(){ return 'expected ' + this.inspect + ' to have a property ' + i(name) 660 + ' of ' + i(val) + ', but got ' + i(this.obj[name]) + (description ? " | " + description : "") } 661 , function(){ return 'expected ' + this.inspect + ' to not have a property ' + i(name) + ' of ' + i(val) + (description ? " | " + description : "") } 660 662 , void 0 661 663 , void 0 … … 691 693 if (len > 1) { 692 694 names = names.map(function(name){ 693 return should.inspect(name);695 return i(name); 694 696 }); 695 697 var last = names.pop(); 696 698 str = names.join(', ') + ', and ' + last; 697 699 } else { 698 str = should.inspect(names[0]);700 str = i(names[0]); 699 701 } 700 702 … … 721 723 this.assert( 722 724 hasOwnProperty.call(this.obj, name) 723 , function(){ return 'expected ' + this.inspect + ' to have own property ' + should.inspect(name) + (description ? " | " + description : "") }724 , function(){ return 'expected ' + this.inspect + ' to not have own property ' + should.inspect(name) + (description ? " | " + description : "") }725 , function(){ return 'expected ' + this.inspect + ' to have own property ' + i(name) + (description ? " | " + description : "") } 726 , function(){ return 'expected ' + this.inspect + ' to not have own property ' + i(name) + (description ? " | " + description : "") } 725 727 , void 0 726 728 , void 0 … … 739 741 startWith: function(str, description) { 740 742 this.assert(0 === this.obj.indexOf(str) 741 , function() { return 'expected ' + this.inspect + ' to start with ' + should.inspect(str) + (description ? " | " + description : "") }742 , function() { return 'expected ' + this.inspect + ' to not start with ' + should.inspect(str) + (description ? " | " + description : "") }743 , function() { return 'expected ' + this.inspect + ' to start with ' + i(str) + (description ? " | " + description : "") } 744 , function() { return 'expected ' + this.inspect + ' to not start with ' + i(str) + (description ? " | " + description : "") } 743 745 , void 0 744 746 , void 0 … … 756 758 endWith: function(str, description) { 757 759 this.assert(-1 !== this.obj.indexOf(str, this.obj.length - str.length) 758 , function() { return 'expected ' + this.inspect + ' to end with ' + should.inspect(str) + (description ? " | " + description : "") }759 , function() { return 'expected ' + this.inspect + ' to not end with ' + should.inspect(str) + (description ? " | " + description : "") }760 , function() { return 'expected ' + this.inspect + ' to end with ' + i(str) + (description ? " | " + description : "") } 761 , function() { return 'expected ' + this.inspect + ' to not end with ' + i(str) + (description ? " | " + description : "") } 760 762 , void 0 761 763 , void 0 … … 778 780 this.assert( 779 781 eql(cmp, obj) 780 , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }781 , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }782 , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + i(obj) + (description ? " | " + description : "") } 783 , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + i(obj) + (description ? " | " + description : "") } 782 784 , void 0 783 785 , void 0 … … 786 788 this.assert( 787 789 ~this.obj.indexOf(obj) 788 , function(){ return 'expected ' + this.inspect + ' to include ' + should.inspect(obj) + (description ? " | " + description : "") }789 , function(){ return 'expected ' + this.inspect + ' to not include ' + should.inspect(obj) + (description ? " | " + description : "") }790 , function(){ return 'expected ' + this.inspect + ' to include ' + i(obj) + (description ? " | " + description : "") } 791 , function(){ return 'expected ' + this.inspect + ' to not include ' + i(obj) + (description ? " | " + description : "") } 790 792 , void 0 791 793 , void 0 … … 806 808 this.assert( 807 809 this.obj.some(function(item) { return eql(obj, item); }) 808 , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }809 , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }810 , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + i(obj) + (description ? " | " + description : "") } 811 , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + i(obj) + (description ? " | " + description : "") } 810 812 , void 0 811 813 , void 0 … … 846 848 if (len > 1) { 847 849 keys = keys.map(function(key){ 848 return should.inspect(key);850 return i(key); 849 851 }); 850 852 var last = keys.pop(); 851 853 str = keys.join(', ') + ', and ' + last; 852 854 } else { 853 str = should.inspect(keys[0]);855 str = i(keys[0]); 854 856 } 855 857 … … 895 897 this.assert( 896 898 code == status 897 , function(){ return 'expected response code of ' + code + ' ' + should.inspect(statusCodes[code])898 + ', but got ' + status + ' ' + should.inspect(statusCodes[status]) }899 , function(){ return 'expected to not respond with ' + code + ' ' + should.inspect(statusCodes[code]) });899 , function(){ return 'expected response code of ' + code + ' ' + i(statusCodes[code]) 900 + ', but got ' + status + ' ' + i(statusCodes[status]) } 901 , function(){ return 'expected to not respond with ' + code + ' ' + i(statusCodes[code]) }); 900 902 901 903 return this; -
Dev/trunk/node_modules/should/package.json
r484 r516 2 2 "name": "should", 3 3 "description": "test framework agnostic BDD-style assertions", 4 "version": "2.1. 0",4 "version": "2.1.1", 5 5 "author": { 6 6 "name": "TJ Holowaychuk", … … 33 33 "node": ">= 0.2.0" 34 34 }, 35 "readme": "# should.js\n\n_should_ is an expressive, readable, test framework agnostic, assertion library for [node](http://nodejs.org).\n\nIt extends the Object prototype with a single non-enumerable getter that allows you to express how that object should behave.\n\n## Example\n```javascript\nvar should = require('should');\n\nvar user = {\n name: 'tj'\n , pets: ['tobi', 'loki', 'jane', 'bandit']\n};\n\nuser.should.have.property('name', 'tj');\nuser.should.have.property('pets').with.lengthOf(4);\n\n// or without Object.prototype, for guys how did Object.create(null)\nshould(user).have.property('name', 'tj');\nshould(true).ok;\n\nsomeAsyncTask(foo, function(err, result){\n should.not.exist(err);\n should.exist(result);\n result.bar.should.equal(foo);\n});\n```\n## Installation\n\n $ npm install should --save-dev\n\n## In browser\n\nIf you want to use _should_ in browser, use version that is in root of repository. It is build with browserify (see [Makefile](https://github.com/visionmedia/should.js/blob/master/Makefile) about how it is build). To build fresh version:\n\n```bash\n# you should have browserify\nnpm install -g browserify\nmake browser\n```\n\n## chaining assertions\n\nEvery assertion will return a should.js-wraped Object, so assertions can be chained. For example:\n\n```js\nuser.should.be.an.instanceOf(Object).and.have.property('name', 'tj');\nuser.pets.should.be.instanceof(Array).and.have.lengthOf(4);\n```\n\nAll assertions return themselves but not `property` and `ownProperty`. They two would return the property value.\n\nfor example if a property is volatile we can first assert property existence:\n```javascript\n// `user.should.have.property('pets')` returned `should(user.pets)` but not `should(user)`\nuser.should.have.property('pets').with.lengthOf(4)\n```\nwhich is essentially equivalent to below, however the property may not exist:\n```javascript\nuser.pets.should.have.lengthOf(4)\n```\n\nour dummy getters such as _a_, _an_, _be_, _of_ and _have_ make tests more readable while the getters _and_ and _with_ helps express chaining:\n```javascript\nuser.should.be.an.instanceOf(Object).and.have.property('name', 'tj')\nuser.should.have.property('pets').with.a.lengthOf(4)\n```\nThose getters don't have any actual effect, just for readability.\n\n## static\n\nFor some rare cases should can be used statically, without `Object.prototype`.\nIt can be replacement for node assert module (and it uses the same `AssertionError`):\n\n```javascript\nassert.fail(actual, expected, message, operator) // just write wrong should assertion\nassert(value, message), assert.ok(value, [message]) // should(value).ok\nassert.equal(actual, expected, [message]) // should(actual).eql(expected, [message])\nassert.notEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])\nassert.deepEqual(actual, expected, [message]) // should(actual).eql(expected, [message])\nassert.notDeepEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])\nassert.strictEqual(actual, expected, [message]) // should(actual).equal(expected, [message])\nassert.notStrictEqual(actual, expected, [message]) // should(actual).not.equal(expected, [message])\nassert.throws(block, [error], [message]) // should(block).throw([error])\nassert.doesNotThrow(block, [message]) // should(block).not.throw([error])\nassert.ifError(value) // should(value).Error (to check if it is error) or should(value).not.ok (to check that it is falsy)\n```\n\n## ok\n\nAssert truthfulness:\n```javascript\ntrue.should.be.ok\n'yay'.should.be.ok\n(1).should.be.ok\n```\nor negated:\n```javascript\nfalse.should.not.be.ok\n''.should.not.be.ok\n(0).should.not.be.ok\n```\n## true\n\nAssert === true:\n```javascript\ntrue.should.be.true\n'1'.should.not.be.true\n```\n## false\n\nAssert === false:\n```javascript\nfalse.should.be.false\n(0).should.not.be.false\n```\n## arguments\n\nAssert `Arguments`:\n```javascript\nvar args = (function(){ return arguments; })(1,2,3);\nargs.should.be.arguments;\n[].should.not.be.arguments;\n```\n## empty\n\nAsserts that given object is empty\n```javascript\n[].should.be.empty\n''.should.be.empty\n({}).should.be.empty\n(function() {\n arguments.should.be.empty;\n})()\n```\n## eql\n\nequality:\n```javascript\n({ foo: 'bar' }).should.eql({ foo: 'bar' })\n[1,2,3].should.eql([1,2,3])\n```\n## equal and exactly\n\nstrict equality:\n```javascript\nshould.strictEqual(undefined, value)\nshould.strictEqual(false, value)\n(4).should.equal(4)\n'test'.should.equal('test')\n[1,2,3].should.not.equal([1,2,3])\n(4).should.be.exactly(4)\n```\n## within\n\nAssert inclusive numeric range:\n```javascript\nuser.age.should.be.within(5, 50)\n```\n## approximately\n\nAssert floating point number:\n```javascript\n(99.99).should.be.approximately(100, 0.1);\n```\n## type\n\nAssert __typeof__:\n```javascript\nuser.should.be.type('object')\n'test'.should.be.type('string')\n```\n## instanceof and instanceOf\n\nAssert __instanceof__ or __instanceOf__:\n```javascript\nuser.should.be.an.instanceof(User)\n[].should.be.an.instanceOf(Array)\n```\n## above\n\nAssert numeric value above the given value:\n```javascript\nuser.age.should.be.above(5)\nuser.age.should.not.be.above(100)\n```\n## below\n\nAssert numeric value below the given value:\n```javascript\nuser.age.should.be.below(100)\nuser.age.should.not.be.below(5)\n```\n## NaN\n\nAssert numeric valus is NaN:\n```javascript\n(undefined + 0).should.be.NaN;\n```\n## Infinity\n\nAssert numeric valus is Infinity:\n```javascript\n(1/0).should.be.Infinity;\n```\n## match\n\nAssert regexp match:\n```javascript\nusername.should.match(/^\\w+$/)\n```\n## length\n\nAssert _length_ property exists and has a value of the given number:\n```javascript\nuser.pets.should.have.length(5)\nuser.pets.should.have.a.lengthOf(5)\n({ length: 10}).should.have.length(10);\n```\nAliases: _lengthOf_\n\n## property\n\nAssert property exists and has optional value :\n```javascript\nuser.should.have.property('name')\nuser.should.have.property('age', 15)\nuser.should.not.have.property('rawr')\nuser.should.not.have.property('age', 0)\n```\n\n## properties\n\nAssert given properties exists:\n```javascript\nuser.should.have.properties('name', 'age');\nuser.should.have.properties(['name', 'age']);\n```\n## ownProperty\n\nAssert own property (on the immediate object):\n```javascript\n({ foo: 'bar' }).should.have.ownProperty('foo')\n```\n## status(code)\n\n Asserts that `.statusCode` is `code`:\n```javascript\nres.should.have.status(200);\n```\n## header(field[, value])\n\n Asserts that a `.headers` object with `field` and optional `value` are present:\n```javascript\nres.should.have.header('content-length');\nres.should.have.header('Content-Length', '123');\nres.should.have.header('content-length', '123');\n```\n## json\n\n Assert that Content-Type is \"application/json; charset=utf-8\"\n```javascript\nres.should.be.json\n```\n## html\n\n Assert that Content-Type is \"text/html; charset=utf-8\"\n```javascript\nres.should.be.html\n```\n\n## include(obj) or contain(obj)\n\nAssert that the given `obj` is present via `indexOf()`, so this works for strings, arrays, or custom objects implementing indexOf. Also it can assert if given object will have some sub-object.\n\nAssert array value:\n```javascript\n[1,2,3].should.include(3)\n[1,2,3].should.include(2)\n[1,2,3].should.not.include(4)\n```\nAssert substring:\n```javascript\n'foo bar baz'.should.include('foo')\n'foo bar baz'.should.include('bar')\n'foo bar baz'.should.include('baz')\n'foo bar baz'.should.not.include('FOO')\n```\nAssert object includes another object:\n```javascript\nvar tobi = { name: 'Tobi', age: 1 };\nvar jane = { name: 'Jane', age: 5 };\nvar user = { name: 'TJ', pet: tobi };\n\nuser.should.include({ pet: tobi });\nuser.should.include({ pet: tobi, name: 'TJ' });\nuser.should.not.include({ pet: jane });\nuser.should.not.include({ name: 'Someone' });\n```\n## includeEql(obj)\n\nAssert that an object equal to the given `obj` is present in an Array:\n```javascript\n[[1],[2],[3]].should.includeEql([3])\n[[1],[2],[3]].should.includeEql([2])\n[[1],[2],[3]].should.not.includeEql([4])\n```\n## throw()\n\nAssert an exception is thrown:\n\n```js\n(function(){\n throw new Error('fail');\n}).should.throw();\n```\n\nAssert an exception is not thrown:\n\n```js\n(function(){\n\n}).should.not.throw();\n```\nAssert exception message matches string:\n\n```js\n(function(){\n throw new Error('fail');\n}).should.throw('fail');\n```\n\nAssert exepection message matches regexp:\n\n```js\n(function(){\n throw new Error('failed to foo');\n}).should.throw(/^fail/);\n```\n\n## throwError()\n\nAn alias of `throw`, its purpose is to be an option for those who run\n[jshint](https://github.com/jshint/node-jshint/) in strict mode.\n\n```js\n(function(){\n throw new Error('failed to baz');\n}).should.throwError(/^fail.*/);\n```\n\n## startWith(str)\n\nAssert that string starts with `str`.\n\n```javascript\n'foobar'.should.startWith('foo')\n'foobar'.should.not.startWith('bar')\n```\n## endWith(str)\n\nAssert that string ends with `str`.\n\n```javascript\n'foobar'.should.endWith('bar')\n'foobar'.should.not.endWith('foo')\n```\n\n## keys\n\nAssert own object keys, which must match _exactly_,\nand will fail if you omit a key or two:\n\n var obj = { foo: 'bar', baz: 'raz' };\n obj.should.have.keys('foo', 'baz');\n obj.should.have.keys(['foo', 'baz']);\n\n## type assertions\n\n```javascript\n({}).should.be.an.Object;\n(1).should.be.an.Number;\n[].should.be.an.Array;\n(true).should.be.a.Boolean;\n''.should.be.a.String;\n```\n\n## Optional Error description\n\nAs it can often be difficult to ascertain exactly where failed assertions are coming from in your tests, an optional description parameter can be passed to several should matchers. The description will follow the failed assertion in the error:\n\n (1).should.eql(0, 'some useful description')\n\n AssertionError: expected 1 to equal 0 | some useful description\n at Object.eql (/Users/swift/code/should.js/node_modules/should/lib/should.js:280:10)\n ...\n\nThe methods that support this optional description are: `eql`, `equal`, `within`, `a`, `instanceof`, `above`, `below`, `match`, `length`, `property`, `ownProperty`, `include`, and `includeEql`.\n\n## Mocha example\n\nFor example you can use should with the [Mocha test framework](http://visionmedia.github.io/mocha/) by simply including it:\n\n```javascript\nvar should = require('should');\nvar mylib = require('mylib');\n\n\ndescribe('mylib', function () {\n it('should have a version with the format #.#.#', function() {\n lib.version.should.match(/^\\d+\\.\\d+\\.\\d+$/);\n }\n});\n```\n\n## Running tests\n\nTo run the tests for _should_ simply run:\n\n $ make test\n\n## OMG IT EXTENDS OBJECT???!?!@\n\nYes, yes it does, with a single getter _should_, and no it won't break your code, because it does this **properly** with a non-enumerable property.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010-2011 TJ Holowaychuk <tj@vision-media.ca>\n\nCopyright (c) 2011 Aseem Kishore <aseem.kishore@gmail.com>\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",35 "readme": "# should.js\n\n_should_ is an expressive, readable, test framework agnostic, assertion library for [node](http://nodejs.org).\n\nIt extends the Object prototype with a single non-enumerable getter that allows you to express how that object should behave.\n\n## Example\n```javascript\nvar should = require('should');\n\nvar user = {\n name: 'tj'\n , pets: ['tobi', 'loki', 'jane', 'bandit']\n};\n\nuser.should.have.property('name', 'tj');\nuser.should.have.property('pets').with.lengthOf(4);\n\n// or without Object.prototype, for guys how did Object.create(null)\nshould(user).have.property('name', 'tj');\nshould(true).ok;\n\nsomeAsyncTask(foo, function(err, result){\n should.not.exist(err);\n should.exist(result);\n result.bar.should.equal(foo);\n});\n```\n## Installation\n\n $ npm install should --save-dev\n\n## In browser\n\nIf you want to use _should_ in browser, use version that is in root of repository. It is build with browserify (see [Makefile](https://github.com/visionmedia/should.js/blob/master/Makefile) about how it is build). To build fresh version:\n\n```bash\n# you should have browserify\nnpm install -g browserify\nmake browser\n```\n\n## chaining assertions\n\nEvery assertion will return a should.js-wraped Object, so assertions can be chained. For example:\n\n```js\nuser.should.be.an.instanceOf(Object).and.have.property('name', 'tj');\nuser.pets.should.be.instanceof(Array).and.have.lengthOf(4);\n```\n\nAll assertions return themselves but not `property` and `ownProperty`. They two would return the property value.\n\nfor example if a property is volatile we can first assert property existence:\n```javascript\n// `user.should.have.property('pets')` returned `should(user.pets)` but not `should(user)`\nuser.should.have.property('pets').with.lengthOf(4)\n```\nwhich is essentially equivalent to below, however the property may not exist:\n```javascript\nuser.pets.should.have.lengthOf(4)\n```\n\nour dummy getters such as _a_, _an_, _be_, _of_ and _have_ make tests more readable while the getters _and_ and _with_ helps express chaining:\n```javascript\nuser.should.be.an.instanceOf(Object).and.have.property('name', 'tj')\nuser.should.have.property('pets').with.a.lengthOf(4)\n```\nThose getters don't have any actual effect, just for readability.\n\n## static\n\nFor some rare cases should can be used statically, without `Object.prototype`.\nIt can be replacement for node assert module (and it uses the same `AssertionError`):\n\n```javascript\nassert.fail(actual, expected, message, operator) // just write wrong should assertion\nassert(value, message), assert.ok(value, [message]) // should(value).ok\nassert.equal(actual, expected, [message]) // should(actual).eql(expected, [message])\nassert.notEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])\nassert.deepEqual(actual, expected, [message]) // should(actual).eql(expected, [message])\nassert.notDeepEqual(actual, expected, [message]) // should(actual).not.eql(expected, [message])\nassert.strictEqual(actual, expected, [message]) // should(actual).equal(expected, [message])\nassert.notStrictEqual(actual, expected, [message]) // should(actual).not.equal(expected, [message])\nassert.throws(block, [error], [message]) // should(block).throw([error])\nassert.doesNotThrow(block, [message]) // should(block).not.throw([error])\nassert.ifError(value) // should(value).Error (to check if it is error) or should(value).not.ok (to check that it is falsy)\n```\n\n## ok\n\nAssert truthfulness:\n```javascript\ntrue.should.be.ok\n'yay'.should.be.ok\n(1).should.be.ok\n```\nor negated:\n```javascript\nfalse.should.not.be.ok\n''.should.not.be.ok\n(0).should.not.be.ok\n```\n## true\n\nAssert === true:\n```javascript\ntrue.should.be.true\n'1'.should.not.be.true\n```\n## false\n\nAssert === false:\n```javascript\nfalse.should.be.false\n(0).should.not.be.false\n```\n## arguments\n\nAssert `Arguments`:\n```javascript\nvar args = (function(){ return arguments; })(1,2,3);\nargs.should.be.arguments;\n[].should.not.be.arguments;\n```\n## empty\n\nAsserts that given object is empty\n```javascript\n[].should.be.empty\n''.should.be.empty\n({}).should.be.empty\n(function() {\n arguments.should.be.empty;\n})()\n```\n## eql\n\nequality:\n```javascript\n({ foo: 'bar' }).should.eql({ foo: 'bar' })\n[1,2,3].should.eql([1,2,3])\n```\n## equal and exactly\n\nstrict equality:\n```javascript\nshould.strictEqual(undefined, value)\nshould.strictEqual(false, value)\n(4).should.equal(4)\n'test'.should.equal('test')\n[1,2,3].should.not.equal([1,2,3])\n(4).should.be.exactly(4)\n```\n## within\n\nAssert inclusive numeric range:\n```javascript\nuser.age.should.be.within(5, 50)\n```\n## approximately\n\nAssert floating point number:\n```javascript\n(99.99).should.be.approximately(100, 0.1);\n```\n## type\n\nAssert __typeof__:\n```javascript\nuser.should.be.type('object')\n'test'.should.be.type('string')\n```\n## instanceof and instanceOf\n\nAssert __instanceof__ or __instanceOf__:\n```javascript\nuser.should.be.an.instanceof(User)\n[].should.be.an.instanceOf(Array)\n```\n## above\n\nAssert numeric value above the given value:\n```javascript\nuser.age.should.be.above(5)\nuser.age.should.not.be.above(100)\n```\n## below\n\nAssert numeric value below the given value:\n```javascript\nuser.age.should.be.below(100)\nuser.age.should.not.be.below(5)\n```\n## NaN\n\nAssert numeric valus is NaN:\n```javascript\n(undefined + 0).should.be.NaN;\n```\n## Infinity\n\nAssert numeric valus is Infinity:\n```javascript\n(1/0).should.be.Infinity;\n```\n## match\n\nAssert regexp match:\n```javascript\nusername.should.match(/^\\w+$/)\n```\n## length\n\nAssert _length_ property exists and has a value of the given number:\n```javascript\nuser.pets.should.have.length(5)\nuser.pets.should.have.a.lengthOf(5)\n({ length: 10}).should.have.length(10);\n```\nAliases: _lengthOf_\n\n## property\n\nAssert property exists and has optional value(compare using `===`):\n```javascript\nuser.should.have.property('name')\nuser.should.have.property('age', 15)\nuser.should.not.have.property('rawr')\nuser.should.not.have.property('age', 0)\n```\n\n## properties\n\nAssert given properties exists:\n```javascript\nuser.should.have.properties('name', 'age');\nuser.should.have.properties(['name', 'age']);\n```\n## ownProperty\n\nAssert own property (on the immediate object):\n```javascript\n({ foo: 'bar' }).should.have.ownProperty('foo')\n```\n## status(code)\n\n Asserts that `.statusCode` is `code`:\n```javascript\nres.should.have.status(200);\n```\n## header(field[, value])\n\n Asserts that a `.headers` object with `field` and optional `value` are present:\n```javascript\nres.should.have.header('content-length');\nres.should.have.header('Content-Length', '123');\nres.should.have.header('content-length', '123');\n```\n## json\n\n Assert that Content-Type is \"application/json; charset=utf-8\"\n```javascript\nres.should.be.json\n```\n## html\n\n Assert that Content-Type is \"text/html; charset=utf-8\"\n```javascript\nres.should.be.html\n```\n\n## include(obj) or contain(obj)\n\nAssert that the given `obj` is present via `indexOf()`, so this works for strings, arrays, or custom objects implementing indexOf. Also it can assert if given object will have some sub-object.\n\nAssert array value:\n```javascript\n[1,2,3].should.include(3)\n[1,2,3].should.include(2)\n[1,2,3].should.not.include(4)\n```\nAssert substring:\n```javascript\n'foo bar baz'.should.include('foo')\n'foo bar baz'.should.include('bar')\n'foo bar baz'.should.include('baz')\n'foo bar baz'.should.not.include('FOO')\n```\nAssert object includes another object:\n```javascript\nvar tobi = { name: 'Tobi', age: 1 };\nvar jane = { name: 'Jane', age: 5 };\nvar user = { name: 'TJ', pet: tobi };\n\nuser.should.include({ pet: tobi });\nuser.should.include({ pet: tobi, name: 'TJ' });\nuser.should.not.include({ pet: jane });\nuser.should.not.include({ name: 'Someone' });\n```\n## includeEql(obj)\n\nAssert that an object equal to the given `obj` is present in an Array:\n```javascript\n[[1],[2],[3]].should.includeEql([3])\n[[1],[2],[3]].should.includeEql([2])\n[[1],[2],[3]].should.not.includeEql([4])\n```\n## throw()\n\nAssert an exception is thrown:\n\n```js\n(function(){\n throw new Error('fail');\n}).should.throw();\n```\n\nAssert an exception is not thrown:\n\n```js\n(function(){\n\n}).should.not.throw();\n```\nAssert exception message matches string:\n\n```js\n(function(){\n throw new Error('fail');\n}).should.throw('fail');\n```\n\nAssert exepection message matches regexp:\n\n```js\n(function(){\n throw new Error('failed to foo');\n}).should.throw(/^fail/);\n```\n\n## throwError()\n\nAn alias of `throw`, its purpose is to be an option for those who run\n[jshint](https://github.com/jshint/node-jshint/) in strict mode.\n\n```js\n(function(){\n throw new Error('failed to baz');\n}).should.throwError(/^fail.*/);\n```\n\n## startWith(str)\n\nAssert that string starts with `str`.\n\n```javascript\n'foobar'.should.startWith('foo')\n'foobar'.should.not.startWith('bar')\n```\n## endWith(str)\n\nAssert that string ends with `str`.\n\n```javascript\n'foobar'.should.endWith('bar')\n'foobar'.should.not.endWith('foo')\n```\n\n## keys\n\nAssert own object keys, which must match _exactly_,\nand will fail if you omit a key or two:\n\n var obj = { foo: 'bar', baz: 'raz' };\n obj.should.have.keys('foo', 'baz');\n obj.should.have.keys(['foo', 'baz']);\n\n## type assertions\n\n```javascript\n({}).should.be.an.Object;\n(1).should.be.an.Number;\n[].should.be.an.Array;\n(true).should.be.a.Boolean;\n''.should.be.a.String;\n```\n\n## Optional Error description\n\nAs it can often be difficult to ascertain exactly where failed assertions are coming from in your tests, an optional description parameter can be passed to several should matchers. The description will follow the failed assertion in the error:\n\n (1).should.eql(0, 'some useful description')\n\n AssertionError: expected 1 to equal 0 | some useful description\n at Object.eql (/Users/swift/code/should.js/node_modules/should/lib/should.js:280:10)\n ...\n\nThe methods that support this optional description are: `eql`, `equal`, `within`, `a`, `instanceof`, `above`, `below`, `match`, `length`, `property`, `ownProperty`, `include`, and `includeEql`.\n\n## Mocha example\n\nFor example you can use should with the [Mocha test framework](http://visionmedia.github.io/mocha/) by simply including it:\n\n```javascript\nvar should = require('should');\nvar mylib = require('mylib');\n\n\ndescribe('mylib', function () {\n it('should have a version with the format #.#.#', function() {\n lib.version.should.match(/^\\d+\\.\\d+\\.\\d+$/);\n }\n});\n```\n\n## Running tests\n\nTo run the tests for _should_ simply run:\n\n $ make test\n\n## OMG IT EXTENDS OBJECT???!?!@\n\nYes, yes it does, with a single getter _should_, and no it won't break your code, because it does this **properly** with a non-enumerable property.\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2010-2011 TJ Holowaychuk <tj@vision-media.ca>\n\nCopyright (c) 2011 Aseem Kishore <aseem.kishore@gmail.com>\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", 36 36 "readmeFilename": "Readme.md", 37 37 "bugs": { 38 38 "url": "https://github.com/visionmedia/should.js/issues" 39 39 }, 40 "_id": "should@2.1. 0",40 "_id": "should@2.1.1", 41 41 "dist": { 42 "shasum": " 7bceb94366f4e87672f3ced74cc9f1561f234336"42 "shasum": "4a86e19fe38285785031d253938daedb169f72e5" 43 43 }, 44 "_from": "should@ ",45 "_resolved": "https://registry.npmjs.org/should/-/should-2.1. 0.tgz"44 "_from": "should@2.1.1", 45 "_resolved": "https://registry.npmjs.org/should/-/should-2.1.1.tgz" 46 46 } -
Dev/trunk/node_modules/should/should.js
r484 r516 189 189 }; 190 190 191 should.inspect = function(obj, opts) { 192 if(util.isDate(obj) && typeof obj.inspect !== 'function') obj = obj.toISOString(); 193 return inspect(obj, opts); 194 }; 191 should.inspect = inspect; 192 193 function i(value) { 194 if(util.isDate(value) && typeof value.inspect !== 'function') return value.toISOString(); //show millis in dates 195 return should.inspect(value); 196 } 195 197 196 198 /** … … 216 218 if(null == obj) { 217 219 throw new AssertionError({ 218 message: msg || ('expected ' + should.inspect(obj) + ' to exist')220 message: msg || ('expected ' + i(obj) + ' to exist') 219 221 , stackStartFunction: should.exist 220 222 }); … … 234 236 if (null != obj) { 235 237 throw new AssertionError({ 236 message: msg || ('expected ' + should.inspect(obj) + ' to not exist')238 message: msg || ('expected ' + i(obj) + ' to not exist') 237 239 , stackStartFunction: should.not.exist 238 240 }); … … 402 404 403 405 get inspect() { 404 return should.inspect(this.obj);406 return i(this.obj); 405 407 }, 406 408 … … 532 534 this.assert( 533 535 eql(val, this.obj) 534 , function(){ return 'expected ' + this.inspect + ' to equal ' + should.inspect(val) + (description ? " | " + description : "") }535 , function(){ return 'expected ' + this.inspect + ' to not equal ' + should.inspect(val) + (description ? " | " + description : "") }536 , function(){ return 'expected ' + this.inspect + ' to equal ' + i(val) + (description ? " | " + description : "") } 537 , function(){ return 'expected ' + this.inspect + ' to not equal ' + i(val) + (description ? " | " + description : "") } 536 538 , val 537 539 , true … … 551 553 this.assert( 552 554 val === this.obj 553 , function(){ return 'expected ' + this.inspect + ' to equal ' + should.inspect(val) + (description ? " | " + description : "") }554 , function(){ return 'expected ' + this.inspect + ' to not equal ' + should.inspect(val) + (description ? " | " + description : "") }555 , function(){ return 'expected ' + this.inspect + ' to equal ' + i(val) + (description ? " | " + description : "") } 556 , function(){ return 'expected ' + this.inspect + ' to not equal ' + i(val) + (description ? " | " + description : "") } 555 557 , val 556 558 , void 0 … … 804 806 if (this.negate && undefined !== val) { 805 807 if (undefined === this.obj[name]) { 806 throw new Error(this.inspect + ' has no property ' + should.inspect(name) + (description ? " | " + description : ""));808 throw new Error(this.inspect + ' has no property ' + i(name) + (description ? " | " + description : "")); 807 809 } 808 810 } else { 809 811 this.assert( 810 812 undefined !== this.obj[name] 811 , function(){ return 'expected ' + this.inspect + ' to have a property ' + should.inspect(name) + (description ? " | " + description : "") }812 , function(){ return 'expected ' + this.inspect + ' to not have a property ' + should.inspect(name) + (description ? " | " + description : "") }813 , function(){ return 'expected ' + this.inspect + ' to have a property ' + i(name) + (description ? " | " + description : "") } 814 , function(){ return 'expected ' + this.inspect + ' to not have a property ' + i(name) + (description ? " | " + description : "") } 813 815 , void 0 814 816 , void 0 … … 819 821 this.assert( 820 822 val === this.obj[name] 821 , function(){ return 'expected ' + this.inspect + ' to have a property ' + should.inspect(name)822 + ' of ' + should.inspect(val) + ', but got ' + should.inspect(this.obj[name]) + (description ? " | " + description : "") }823 , function(){ return 'expected ' + this.inspect + ' to not have a property ' + should.inspect(name) + ' of ' + should.inspect(val) + (description ? " | " + description : "") }823 , function(){ return 'expected ' + this.inspect + ' to have a property ' + i(name) 824 + ' of ' + i(val) + ', but got ' + i(this.obj[name]) + (description ? " | " + description : "") } 825 , function(){ return 'expected ' + this.inspect + ' to not have a property ' + i(name) + ' of ' + i(val) + (description ? " | " + description : "") } 824 826 , void 0 825 827 , void 0 … … 855 857 if (len > 1) { 856 858 names = names.map(function(name){ 857 return should.inspect(name);859 return i(name); 858 860 }); 859 861 var last = names.pop(); 860 862 str = names.join(', ') + ', and ' + last; 861 863 } else { 862 str = should.inspect(names[0]);864 str = i(names[0]); 863 865 } 864 866 … … 885 887 this.assert( 886 888 hasOwnProperty.call(this.obj, name) 887 , function(){ return 'expected ' + this.inspect + ' to have own property ' + should.inspect(name) + (description ? " | " + description : "") }888 , function(){ return 'expected ' + this.inspect + ' to not have own property ' + should.inspect(name) + (description ? " | " + description : "") }889 , function(){ return 'expected ' + this.inspect + ' to have own property ' + i(name) + (description ? " | " + description : "") } 890 , function(){ return 'expected ' + this.inspect + ' to not have own property ' + i(name) + (description ? " | " + description : "") } 889 891 , void 0 890 892 , void 0 … … 903 905 startWith: function(str, description) { 904 906 this.assert(0 === this.obj.indexOf(str) 905 , function() { return 'expected ' + this.inspect + ' to start with ' + should.inspect(str) + (description ? " | " + description : "") }906 , function() { return 'expected ' + this.inspect + ' to not start with ' + should.inspect(str) + (description ? " | " + description : "") }907 , function() { return 'expected ' + this.inspect + ' to start with ' + i(str) + (description ? " | " + description : "") } 908 , function() { return 'expected ' + this.inspect + ' to not start with ' + i(str) + (description ? " | " + description : "") } 907 909 , void 0 908 910 , void 0 … … 920 922 endWith: function(str, description) { 921 923 this.assert(-1 !== this.obj.indexOf(str, this.obj.length - str.length) 922 , function() { return 'expected ' + this.inspect + ' to end with ' + should.inspect(str) + (description ? " | " + description : "") }923 , function() { return 'expected ' + this.inspect + ' to not end with ' + should.inspect(str) + (description ? " | " + description : "") }924 , function() { return 'expected ' + this.inspect + ' to end with ' + i(str) + (description ? " | " + description : "") } 925 , function() { return 'expected ' + this.inspect + ' to not end with ' + i(str) + (description ? " | " + description : "") } 924 926 , void 0 925 927 , void 0 … … 942 944 this.assert( 943 945 eql(cmp, obj) 944 , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }945 , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }946 , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + i(obj) + (description ? " | " + description : "") } 947 , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + i(obj) + (description ? " | " + description : "") } 946 948 , void 0 947 949 , void 0 … … 950 952 this.assert( 951 953 ~this.obj.indexOf(obj) 952 , function(){ return 'expected ' + this.inspect + ' to include ' + should.inspect(obj) + (description ? " | " + description : "") }953 , function(){ return 'expected ' + this.inspect + ' to not include ' + should.inspect(obj) + (description ? " | " + description : "") }954 , function(){ return 'expected ' + this.inspect + ' to include ' + i(obj) + (description ? " | " + description : "") } 955 , function(){ return 'expected ' + this.inspect + ' to not include ' + i(obj) + (description ? " | " + description : "") } 954 956 , void 0 955 957 , void 0 … … 970 972 this.assert( 971 973 this.obj.some(function(item) { return eql(obj, item); }) 972 , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }973 , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + should.inspect(obj) + (description ? " | " + description : "") }974 , function(){ return 'expected ' + this.inspect + ' to include an object equal to ' + i(obj) + (description ? " | " + description : "") } 975 , function(){ return 'expected ' + this.inspect + ' to not include an object equal to ' + i(obj) + (description ? " | " + description : "") } 974 976 , void 0 975 977 , void 0 … … 1010 1012 if (len > 1) { 1011 1013 keys = keys.map(function(key){ 1012 return should.inspect(key);1014 return i(key); 1013 1015 }); 1014 1016 var last = keys.pop(); 1015 1017 str = keys.join(', ') + ', and ' + last; 1016 1018 } else { 1017 str = should.inspect(keys[0]);1019 str = i(keys[0]); 1018 1020 } 1019 1021 … … 1059 1061 this.assert( 1060 1062 code == status 1061 , function(){ return 'expected response code of ' + code + ' ' + should.inspect(statusCodes[code])1062 + ', but got ' + status + ' ' + should.inspect(statusCodes[status]) }1063 , function(){ return 'expected to not respond with ' + code + ' ' + should.inspect(statusCodes[code]) });1063 , function(){ return 'expected response code of ' + code + ' ' + i(statusCodes[code]) 1064 + ', but got ' + status + ' ' + i(statusCodes[status]) } 1065 , function(){ return 'expected to not respond with ' + code + ' ' + i(statusCodes[code]) }); 1064 1066 1065 1067 return this; -
Dev/trunk/node_modules/underscore/package.json
r484 r516 32 32 }, 33 33 "_id": "underscore@1.4.4", 34 "_from": "underscore@1.4.4", 35 "dist": { 36 "shasum": "3e7ceb21f205bc19964685e1fdd52c8f77773674" 37 }, 38 "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz" 34 "_from": "underscore@1.4.4" 39 35 } -
Dev/trunk/package.json
r505 r516 4 4 "description": "QED Full", 5 5 "devDependencies": { 6 "grunt": " ~0.4.0",7 "grunt-contrib-copy": " ~0.4.1",8 "grunt-contrib-jshint": " ~0.6.0",9 "grunt-contrib-less": " ~0.6.4",6 "grunt": "^0.4.4", 7 "grunt-contrib-copy": "^0.4.1", 8 "grunt-contrib-jshint": "^0.6.5", 9 "grunt-contrib-less": "^0.6.5", 10 10 "grunt-dojo": "~0.2.3", 11 "grunt-exec": " ~0.4.1",11 "grunt-exec": "^0.4.5", 12 12 "grunt-htmlhint": "~0.4.0", 13 13 "grunt-contrib-clean": "~0.5.0", 14 "grunt-contrib-coffee": " ~0.7.0",15 "underscore": " ~1.4.4",16 "grunt-coffeelint": " ~0.0.6",17 "grunt-banner": " ~0.1.4",14 "grunt-contrib-coffee": "^0.7.0", 15 "underscore": "^1.4.4", 16 "grunt-coffeelint": "0.0.8", 17 "grunt-banner": "^0.1.4", 18 18 "grunt-amd-check": "~0.5.2", 19 "mocha": "~1.14.0", 20 "should": "~2.1.0", 21 "grunt-tv4": "^0.4.0", 22 "grunt-jsonlint": "^1.0.4" 19 "mocha": "^1.14.0", 20 "should": "^2.1.1", 21 "grunt-tv4": "~0.4.0", 22 "grunt-jsonlint": "~1.0.4", 23 "grunt-path-check": "~0.9.3", 24 "grunt-git-deploy": "~0.1.1", 25 "grunt-svninfo": "~0.1.4" 23 26 }, 24 27 "dependencies": {} -
Dev/trunk/src/server/config/couchdb-design-docs.js
r508 r516 26 26 }, 27 27 28 "qed/_design/ default": {28 "qed/_design/protectPublished": { 29 29 __configAction: "replace", 30 _id: "_design/ default",30 _id: "_design/protectPublished", 31 31 language: "javascript", 32 32 validate_doc_update: function(newDoc, oldDoc, userCtx, secObj) { … … 34 34 throw({forbidden:'Published documents cannot be modified.'}); 35 35 } 36 }, 36 } 37 }, 38 39 "qed/_design/default": { 40 __configAction: "replace", 41 _id: "_design/default", 42 language: "javascript", 37 43 views: { 38 44 by_type: { -
Dev/trunk/src/server/config/couchdb-upgrade-design-docs.js
r487 r516 5 5 }, 6 6 7 "qed/_design/default": { 8 __configAction: "replace" 7 "qed/_design/protectPublished": { 8 __configAction: "replace", 9 _id: "_design/protectPublished" 9 10 } 10 11
Note: See TracChangeset
for help on using the changeset viewer.