diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-03 15:35:00 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-03 15:35:00 +0200 |
commit | de98e0b232509d5f40c135d540a70e415272ff85 (patch) | |
tree | a79222a5b58484ab3b80d18efcaaa7ccc4769b33 /node_modules/domain-browser | |
parent | e0c9d480a73fa629c1e4a47d3e721f1d2d345406 (diff) |
node_modules
Diffstat (limited to 'node_modules/domain-browser')
-rw-r--r-- | node_modules/domain-browser/.eslintrc.js | 701 | ||||
-rw-r--r-- | node_modules/domain-browser/.npmignore | 44 | ||||
-rw-r--r-- | node_modules/domain-browser/HISTORY.md | 42 | ||||
-rw-r--r-- | node_modules/domain-browser/LICENSE.md | 23 | ||||
-rw-r--r-- | node_modules/domain-browser/README.md | 111 | ||||
-rw-r--r-- | node_modules/domain-browser/index.js | 69 | ||||
-rw-r--r-- | node_modules/domain-browser/package.json | 97 | ||||
-rw-r--r-- | node_modules/domain-browser/test.js | 100 |
8 files changed, 1187 insertions, 0 deletions
diff --git a/node_modules/domain-browser/.eslintrc.js b/node_modules/domain-browser/.eslintrc.js new file mode 100644 index 000000000..b62388610 --- /dev/null +++ b/node_modules/domain-browser/.eslintrc.js @@ -0,0 +1,701 @@ +// 2015 December 1 +// https://github.com/bevry/base +// http://eslint.org +/* eslint no-warning-comments: 0 */ +'use strict' + +const IGNORE = 0, WARN = 1, ERROR = 2, MAX_PARAMS = 4 + +module.exports = { + // parser: 'babel-eslint', + // ^ the bundled ESLINT parser is now actually quite good, and supports the ecmaFeatures property + ecmaFeatures: { + // this property only works with the bundled ESLINT parser, not babel-eslint + arrowFunctions: true, + binaryLiterals: true, + blockBindings: true, + classes: true, + defaultParams: true, + destructuring: true, + forOf: true, + generators: true, + modules: false, // Disabled due to https://twitter.com/balupton/status/671519915795345410 + objectLiteralComputedProperties: true, + objectLiteralDuplicateProperties: true, + objectLiteralShorthandMethods: true, + objectLiteralShorthandProperties: true, + octalLiterals: true, + regexUFlag: true, + regexYFlag: true, + restParams: true, + spread: true, + superInFunctions: true, + templateStrings: true, + unicodeCodePointEscapes: true, + globalReturn: true, + jsx: true, + experimentalObjectRestSpread: true + }, + env: { + browser: true, + node: true, + es6: true, + commonjs: true, + amd: true + }, + rules: { + // ---------------------------- + // Problems with these rules + // If we can figure out how to enable the following, that would be great + + // Two spaces after one line if or else: + // if ( blah ) return + // Insead of one space: + // if ( blah ) return + + // No spaces on embedded function: + // .forEach(function(key, value){ + // instead of: + // .forEach(function (key, value) { + + // Else and catch statements on the same line as closing brace: + // } else { + // } catch (e) { + // instead of: + // } + // else { + + + // -------------------------------------- + // Possible Errors + // The following rules point out areas where you might have made mistakes. + + // ES6 supports dangling commas + 'comma-dangle': IGNORE, + + // Don't allow assignments in conditional statements (if, while, etc.) + 'no-cond-assign': [ERROR, 'always'], + + // Warn but don't error about console statements + 'no-console': WARN, + + // Allow while(true) loops + 'no-constant-condition': IGNORE, + + // Seems like a good idea to error about this + 'no-control-regex': ERROR, + + // Warn but don't error about console statements + 'no-debugger': WARN, + + // Don't allow duplicate arguments in a function, they can cause errors + 'no-dupe-args': ERROR, + + // Disallow duplicate keys in an object, they can cause errors + 'no-dupe-keys': ERROR, + + // Disallow duplicate case statements in a switch + 'no-duplicate-case': ERROR, + + // Disallow empty [] in regular expressions as they cause unexpected behaviour + 'no-empty-character-class': ERROR, + + // Allow empty block statements, they are useful for clarity + 'no-empty': IGNORE, + + // Overwriting the exception argument in a catch statement can cause memory leaks in some browsers + 'no-ex-assign': ERROR, + + // Disallow superflous boolean casts, they offer no value + 'no-extra-boolean-cast': ERROR, + + // Allow superflous parenthesis as they offer clarity in some cases + 'no-extra-parens': IGNORE, + + // Disallow superflous semicolons, they offer no value + 'no-extra-semi': IGNORE, + + // Seems like a good idea to error about this + 'no-func-assign': ERROR, + + // Seems like a good idea to error about this + 'no-inner-declarations': ERROR, + + // Seems like a good idea to error about this + 'no-invalid-regexp': ERROR, + + // Seems like a good idea to error about this + 'no-irregular-whitespace': ERROR, + + // Seems like a good idea to error about this + 'no-negated-in-lhs': ERROR, + + // Seems like a good idea to error about this + 'no-obj-calls': ERROR, + + // Seems like a good idea to error about this + // Instead of / / used / {ERROR}/ instead + 'no-regex-spaces': ERROR, + + // Seems like a good idea to error about this + 'no-sparse-arrays': ERROR, + + // Seems like a good idea to error about this + 'no-unexpected-multiline': ERROR, + + // Seems like a good idea to error about this + 'no-unreachable': ERROR, + + // Seems like a good idea to error about this + 'use-isnan': ERROR, + + // We use YUIdoc, not JSDoc + 'valid-jsdoc': IGNORE, + + // Seems like a good idea to error about this + 'valid-typeof': ERROR, + + + // -------------------------------------- + // Best Practices + // These are rules designed to prevent you from making mistakes. They either prescribe a better way of doing something or help you avoid footguns. + + // Meh + 'accessor-pairs': IGNORE, + + // This rule seems buggy + 'block-scoped-var': IGNORE, + + // Disable complexity checks, they are annoying and not that useful in detecting actual complexity + 'complexity': IGNORE, + + // We use blank returns for break statements + 'consistent-return': IGNORE, + + // Always require curly braces unless the statement is all on a single line + 'curly': [ERROR, 'multi-line'], + + // If we don't have a default cause, it probably means we should throw an error + 'default-case': ERROR, + + // Dots should be on the newlines + // chainableThingy + // .doSomething() + // .doSomethingElse() + 'dot-location': [ERROR, 'property'], + + // Use dot notation where possible + 'dot-notation': ERROR, + + // Unless you are doing == null, then force === to avoid truthy/falsey mistakes + 'eqeqeq': [ERROR, 'allow-null'], + + // Always use hasOwnProperty when doing for in + 'guard-for-in': ERROR, + + // Warn about alert statements in our code + // Use one of the suggested alternatives instead + // Reasoning is they could be mistaken for left over debugging statements + 'no-alert': WARN, + + // They are very slow + 'no-caller': ERROR, + + // Wow... + 'no-case-declarations': ERROR, + + // Seems like a good idea to error about this + 'no-div-regex': ERROR, + + // Returns in else statements offer code clarity, so disable this rule + 'no-else-return': IGNORE, + + // Seems like a good idea to error about this + 'no-empty-label': ERROR, + + // Seems sensible + 'no-empty-pattern': ERROR, + + // We know that == null is a null and undefined check + 'no-eq-null': IGNORE, + + // Eval is slow and unsafe, use vm's instead + 'no-eval': ERROR, + + // There is never a good reason for this + 'no-extend-native': ERROR, + + // Don't allow useless binds + 'no-extra-bind': ERROR, + + // Don't allow switch case statements to follow through, use continue keyword instead + 'no-fallthrough': ERROR, + + // Use zero when doing decimals, otherwise it is confusing + 'no-floating-decimal': ERROR, + + // Cleverness is unclear + 'no-implicit-coercion': ERROR, + + // A sneaky way to do evals + 'no-implied-eval': ERROR, + + // This throws for a lot of senseless things, like chainy functions + 'no-invalid-this': IGNORE, + + // Use proper iterators instead + 'no-iterator': ERROR, + + // We never use this, it seems silly to allow this + 'no-labels': ERROR, + + // We never use this, it seems silly to allow this + 'no-lone-blocks': ERROR, + + // Loop functions always cause problems, as the scope isn't clear through iterations + 'no-loop-func': ERROR, + + // This is a great idea + // Although ignore -1 and 0 as it is common with indexOf + 'no-magic-numbers': [WARN, { ignore: [-1, 0] }], + + // We like multi spaces for clarity + // E.g. We like + // if ( blah ) return foo + // Instead of: + // if ( blah ) return foo + // @TODO would be great to enforce the above + 'no-multi-spaces': IGNORE, + + // Use ES6 template strings instead + 'no-multi-str': ERROR, + + // Would be silly to allow this + 'no-native-reassign': ERROR, + + // We never use this, it seems silly to allow this + 'no-new-func': ERROR, + + // We never use this, it seems silly to allow this + 'no-new-wrappers': ERROR, + + // We never use this, it seems silly to allow this + 'no-new': ERROR, + + // We never use this, it seems silly to allow this + 'no-octal-escape': ERROR, + + // We never use this, it seems silly to allow this + 'no-octal': ERROR, + + // We got to be pretty silly if we don't realise we are doing this + // As such, take any usage as intentional and aware + 'no-param-reassign': IGNORE, + + // We use process.env wisely + 'no-process-env': IGNORE, + + // We never use this, it seems silly to allow this + 'no-proto': ERROR, + + // We never use this, it seems silly to allow this + 'no-redeclare': ERROR, + + // We never use this, it seems silly to allow this + 'no-return-assign': ERROR, + + // We never use this, it seems silly to allow this + 'no-script-url': ERROR, + + // We never use this, it seems silly to allow this + 'no-self-compare': ERROR, + + // We never use this, it seems silly to allow this + 'no-sequences': ERROR, + + // We always want proper error objects as they have stack traces and respond to instanceof Error checks + 'no-throw-literal': ERROR, + + // We never use this, it seems silly to allow this + 'no-unused-expressions': ERROR, + + // Seems sensible + 'no-useless-call': ERROR, + + // Seems sensible + 'no-useless-concat': ERROR, + + // We never use this, it seems silly to allow this + 'no-void': ERROR, + + // Warn about todos + 'no-warning-comments': [WARN, { terms: ['todo', 'fixme'], location: 'anywhere' }], + + // We never use this, it seems silly to allow this + 'no-with': ERROR, + + // Always specify a radix to avoid errors + 'radix': ERROR, + + // We appreciate the clarity late defines offer + 'vars-on-top': IGNORE, + + // Wrap instant called functions in parenthesis for clearer intent + 'wrap-iife': ERROR, + + // Because we force === and never allow assignments in conditions + // we have no need for yoda statements, so disable them + 'yoda': [ERROR, 'never'], + + + // -------------------------------------- + // Strict Mode + // These rules relate to using strict mode. + + // Ensure that use strict is specified to prevent the runtime erorr: + // SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode + 'strict': [ERROR, 'global'], + + + // -------------------------------------- + // Variables + // These rules have to do with variable declarations. + + // We don't care + 'init-declaration': IGNORE, + + // Don't allow the catch method to shadow objects as browsers handle this differently + // Update: We don't care for IE8 + 'no-catch-shadow': IGNORE, + + // Don't use delete, it disables optimisations + 'no-delete-var': ERROR, + + // We never use this, it seems silly to allow this + 'no-label-var': ERROR, + + // We never use this, it seems silly to allow this + 'no-shadow-restricted-names': ERROR, + + // We use shadowing + 'no-shadow': IGNORE, + + // Makes sense + 'no-undef-init': ERROR, + + // Error when an undefined variable is used + 'no-undef': ERROR, + + // typeof blah === 'undefined' should always be used + 'no-undefined': ERROR, + + // Warn us when we don't use something + 'no-unused-vars': WARN, + + // Error when we try and use something before it is defined + 'no-use-before-define': ERROR, + + + // -------------------------------------- + // Node.js and CommonJS + // These rules are specific to JavaScript running on Node.js or using CommonJS in the browser. + + // Seems to difficult to enforce + 'callback-return': IGNORE, + + // We use require where it is appropriate to use it + 'global-require': IGNORE, + + // Force handling of callback errors + 'handle-callback-err': ERROR, + + // @TODO decide if this is good or not + 'no-mixed-requires': ERROR, + + // Disallow error prone syntax + 'no-new-require': ERROR, + + // Always use path.join for windows support + 'no-path-concat': ERROR, + + // We know what we are doing + 'no-process-exit': IGNORE, + + // No need to disallow any modules + 'no-restricted-modules': IGNORE, + + // Sometimes sync methods are useful, so warn but don't error + 'no-sync': WARN, + + + // -------------------------------------- + // Stylistic + // These rules are purely matters of style and are quite subjective. + + // We don't use spaces with brackets + 'array-bracket-spacing': [ERROR, 'never'], + + // Disallow or enforce spaces inside of single line blocks + 'block-spacing': [ERROR, 'always'], + + // Opening brace on same line, closing brace on its own line, except when statement is a single line + 'brace-style': [ERROR, 'stroustrup', { allowSingleLine: true }], + + // Use camel case + 'camelcase': ERROR, + + // Require a comma after always + 'comma-spacing': [ERROR, { before: false, after: true }], + + // Commas go last, we have tooling to detect if we forget a comma + 'comma-style': [ERROR, 'last'], + + // Require or disallow padding inside computed properties + 'computed-property-spacing': [ERROR, 'never'], + + // Enabling this was incredibly annoying when doing layers of nesting + 'consistent-this': IGNORE, + + // Enable to make UNIX people's lives easier + 'eol-last': ERROR, + + // We like anonymous functions + 'func-names': IGNORE, + + // Prefer to define functions via variables + 'func-style': [WARN, 'declaration'], + + // Sometimes short names are appropriate + 'id-length': IGNORE, + + // Camel case handles this for us + 'id-match': IGNORE, + + // Use tabs and indent case blocks + 'indent': [ERROR, 'tab', { SwitchCase: WARN }], + + // Prefer double qoutes for JSX properties: <a b="c" />, <a b='"' /> + 'jsx-quotes': [ERROR, 'prefer-double'], + + // Space after the colon + 'key-spacing': [ERROR, { + beforeColon: false, + afterColon: true + }], + + // Enforce unix line breaks + 'linebreak-style': [ERROR, 'unix'], + + // Enforce new lines before block comments + 'lines-around-comment': [ERROR, { beforeBlockComment: true, allowBlockStart: true }], + + // Disabled to ensure consistency with complexity option + 'max-depth': IGNORE, + + // We use soft wrap + 'max-len': IGNORE, + + // We are smart enough to know if this is bad or not + 'max-nested-callbacks': IGNORE, + + // Sometimes we have no control over this for compat reasons, so just warn + 'max-params': [WARN, MAX_PARAMS], + + // We should be able to use whatever feels right + 'max-statements': IGNORE, + + // Constructors should be CamelCase + 'new-cap': ERROR, + + // Always use parens when instantiating a class + 'new-parens': ERROR, + + // Too difficult to enforce correctly as too many edge-cases + 'newline-after-var': IGNORE, + + // Don't use the array constructor when it is not needed + 'no-array-constructor': ERROR, + + // We never use bitwise, they are too clever + 'no-bitwise': ERROR, + + // We use continue + 'no-continue': IGNORE, + + // We like inline comments + 'no-inline-comments': IGNORE, + + // The code could be optimised if this error occurs + 'no-lonely-if': ERROR, + + // Don't mix spaces and tabs + // @TODO maybe [ERROR, 'smart-tabs'] will be better, we will see + 'no-mixed-spaces-and-tabs': ERROR, + + // We use multiple empty lines for styling + 'no-multiple-empty-lines': IGNORE, + + // Sometimes it is more understandable with a negated condition + 'no-negated-condition': IGNORE, + + // Sometimes these are useful + 'no-nested-ternary': IGNORE, + + // Use {} instead of new Object() + 'no-new-object': ERROR, + + // We use plus plus + 'no-plusplus': IGNORE, + + // Handled by other rules + 'no-restricted-syntax': IGNORE, + + // We never use this, it seems silly to allow this + 'no-spaced-func': ERROR, + + // Sometimes ternaries are useful + 'no-ternary': IGNORE, + + // Disallow trailing spaces + 'no-trailing-spaces': ERROR, + + // Sometimes this is useful when avoiding shadowing + 'no-underscore-dangle': IGNORE, + + // Sensible + 'no-unneeded-ternary': ERROR, + + // Desirable, but too many edge cases it turns out where it is actually preferred + 'object-curly-spacing': IGNORE, // [ERROR, 'always'], + + // We like multiple var statements + 'one-var': IGNORE, + + // Force use of shorthands when available + 'operator-assignment': [ERROR, 'always'], + + // Should be before, but not with =, *=, /=, += lines + // @TODO figure out how to enforce + 'operator-linebreak': IGNORE, + + // This rule doesn't appear to work correclty + 'padded-blocks': IGNORE, + + // Seems like a good idea to error about this + 'quote-props': [ERROR, 'consistent-as-needed'], + + // Use single quotes where escaping isn't needed + 'quotes': [ERROR, 'single', 'avoid-escape'], + + // We use YUIdoc + 'require-jsdoc': IGNORE, + + // If semi's are used, then add spacing after + 'semi-spacing': [ERROR, { before: false, after: true }], + + // Never use semicolons + 'semi': [ERROR, 'never'], + + // We don't care if our vars are alphabetical + 'sort-vars': IGNORE, + + // Always force a space after a keyword + 'space-after-keywords': [ERROR, 'always'], + + // Always force a space before a { + 'space-before-blocks': [ERROR, 'always'], + + // function () {, get blah () { + 'space-before-function-paren': [ERROR, 'always'], + + // We do this + 'space-before-keywords': [ERROR, 'always'], + + // This is for spacing between [], so [ WARN, ERROR, 3 ] which we don't want + 'space-in-brackets': IGNORE, + + // This is for spacing between (), so doSomething( WARN, ERROR, 3 ) or if ( WARN === 3 ) + // which we want for ifs, but don't want for calls + 'space-in-parens': IGNORE, + + // We use this + 'space-infix-ops': ERROR, + + // We use this + 'space-return-throw-case': ERROR, + + // We use this + 'space-unary-ops': ERROR, + + // We use this + // 'spaced-line-comment': ERROR, + 'spaced-comment': ERROR, + + // We use this + // @TODO revise this + 'wrap-regex': ERROR, + + + // -------------------------------------- + // ECMAScript 6 + + // Sensible to create more informed and clear code + 'arrow-body-style': [ERROR, 'as-needed'], + + // We do this, no reason why, just what we do + 'arrow-parens': [ERROR, 'always'], + + // Require consistent spacing for arrow functions + 'arrow-spacing': ERROR, + + // Makes sense as otherwise runtime error will occur + 'constructor-super': ERROR, + + // Seems the most consistent location for it + 'generator-star-spacing': [ERROR, 'before'], + + // Seems sensible + 'no-arrow-condition': ERROR, + + // Seems sensible + 'no-class-assign': ERROR, + + // Makes sense as otherwise runtime error will occur + 'no-const-assign': ERROR, + + // Makes sense as otherwise runtime error will occur + 'no-dupe-class-members': ERROR, + + // Makes sense as otherwise runtime error will occur + 'no-this-before-super': ERROR, + + // @TODO This probably should be an error + // however it is useful for: for ( var key in obj ) { + // which hopefully is more performant than let (@TODO check if it actually is more performant) + 'no-var': WARN, + + // Enforce ES6 object shorthand + 'object-shorthand': ERROR, + + // Better performance when running native + // but horrible performance if not running native as could fallback to bind + // https://travis-ci.org/bevry/es6-benchmarks + 'prefer-arrow-callback': IGNORE, + + // Sure, why not + 'prefer-const': WARN, + + // Controversial change, but makes sense to move towards to reduce the risk of bad people overwriting apply and call + // https://github.com/eslint/eslint/issues/ERROR939 + 'prefer-reflect': WARN, + + // Sure, why not + 'prefer-spread': ERROR, + + // Too annoying to enforce + 'prefer-template': IGNORE, + + // Makes sense + 'require-yield': ERROR + } +} diff --git a/node_modules/domain-browser/.npmignore b/node_modules/domain-browser/.npmignore new file mode 100644 index 000000000..27859c144 --- /dev/null +++ b/node_modules/domain-browser/.npmignore @@ -0,0 +1,44 @@ +# 2015 September 18 +# https://github.com/bevry/base + +# Temp Files +**/.docpad.db +**/out.* +**/*.log +**/*.cpuprofile +**/*.heapsnapshot + +# Build Files +build/ +components/ +bower_components/ +node_modules/ + +# Private Files +.env + +# Development Files +.editorconfig +.eslintrc +.jshintrc +.jscrc +coffeelint.json +.travis* +nakefile.js +Cakefile +Makefile +BACKERS.md +CONTRIBUTING.md +HISTORY.md +**/src/ +**/test/ + +# Other Package Definitions +template.js +component.json +bower.json + +# ===================================== +# CUSTOM MODIFICATIONS + +# None diff --git a/node_modules/domain-browser/HISTORY.md b/node_modules/domain-browser/HISTORY.md new file mode 100644 index 000000000..758a44fcf --- /dev/null +++ b/node_modules/domain-browser/HISTORY.md @@ -0,0 +1,42 @@ +# History + +## v1.1.7 2015 December 12 +- Revert minimum node version from 0.12 back to 0.4 + - Thanks to [Alexander Sorokin](https://github.com/syrnick) for [this comment](https://github.com/bevry/domain-browser/commit/c66ee3445e87955e70d0d60d4515f2d26a81b9c4#commitcomment-14938325) + +## v1.1.6 2015 December 12 +- Fixed `assert-helpers` sneaking into `dependencies` + - Thanks to [Bogdan Chadkin](https://github.com/TrySound) for [Pull Request #8](https://github.com/bevry/domain-browser/pull/8) + +## v1.1.5 2015 December 9 +- Updated internal conventions +- Added better jspm support + - Thanks to [Guy Bedford](https://github.com/guybedford) for [Pull Request #7](https://github.com/bevry/domain-browser/pull/7) + +## v1.1.4 2015 February 3 +- Added + - `domain.enter()` + - `domain.exit()` + - `domain.bind()` + - `domain.intercept()` + +## v1.1.3 2014 October 10 +- Added + - `domain.add()` + - `domain.remove()` + +## v1.1.2 2014 June 8 +- Added `domain.createDomain()` alias + - Thanks to [James Halliday](https://github.com/substack) for [Pull Request #1](https://github.com/bevry/domain-browser/pull/1) + +## v1.1.1 2013 December 27 +- Fixed `domain.create()` not returning anything + +## v1.1.0 2013 November 1 +- Dropped component.io and bower support, just use ender or browserify + +## v1.0.1 2013 September 18 +- Now called `domain-browser` everywhere + +## v1.0.0 2013 September 18 +- Initial release diff --git a/node_modules/domain-browser/LICENSE.md b/node_modules/domain-browser/LICENSE.md new file mode 100644 index 000000000..08d8802ab --- /dev/null +++ b/node_modules/domain-browser/LICENSE.md @@ -0,0 +1,23 @@ +<!-- LICENSEFILE/ --> + +<h1>License</h1> + +Unless stated otherwise all works are: + +<ul><li>Copyright © 2013+ <a href="http://bevry.me">Bevry Pty Ltd</a></li></ul> + +and licensed under: + +<ul><li><a href="http://spdx.org/licenses/MIT.html">MIT License</a></li></ul> + +<h2>MIT License</h2> + +<pre> +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +</pre> + +<!-- /LICENSEFILE --> diff --git a/node_modules/domain-browser/README.md b/node_modules/domain-browser/README.md new file mode 100644 index 000000000..43502effc --- /dev/null +++ b/node_modules/domain-browser/README.md @@ -0,0 +1,111 @@ +<!-- TITLE/ --> + +<h1>domain-browser</h1> + +<!-- /TITLE --> + + +<!-- BADGES/ --> + +<span class="badge-travisci"><a href="http://travis-ci.org/bevry/domain-browser" title="Check this project's build status on TravisCI"><img src="https://img.shields.io/travis/bevry/domain-browser/master.svg" alt="Travis CI Build Status" /></a></span> +<span class="badge-npmversion"><a href="https://npmjs.org/package/domain-browser" title="View this project on NPM"><img src="https://img.shields.io/npm/v/domain-browser.svg" alt="NPM version" /></a></span> +<span class="badge-npmdownloads"><a href="https://npmjs.org/package/domain-browser" title="View this project on NPM"><img src="https://img.shields.io/npm/dm/domain-browser.svg" alt="NPM downloads" /></a></span> +<span class="badge-daviddm"><a href="https://david-dm.org/bevry/domain-browser" title="View the status of this project's dependencies on DavidDM"><img src="https://img.shields.io/david/bevry/domain-browser.svg" alt="Dependency Status" /></a></span> +<span class="badge-daviddmdev"><a href="https://david-dm.org/bevry/domain-browser#info=devDependencies" title="View the status of this project's development dependencies on DavidDM"><img src="https://img.shields.io/david/dev/bevry/domain-browser.svg" alt="Dev Dependency Status" /></a></span> +<br class="badge-separator" /> +<span class="badge-slackin"><a href="https://slack.bevry.me" title="Join this project's slack community"><img src="https://slack.bevry.me/badge.svg" alt="Slack community badge" /></a></span> +<span class="badge-patreon"><a href="http://patreon.com/bevry" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span> +<span class="badge-gratipay"><a href="https://www.gratipay.com/bevry" title="Donate weekly to this project using Gratipay"><img src="https://img.shields.io/badge/gratipay-donate-yellow.svg" alt="Gratipay donate button" /></a></span> +<span class="badge-flattr"><a href="http://flattr.com/thing/344188/balupton-on-Flattr" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span> +<span class="badge-paypal"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span> +<span class="badge-bitcoin"><a href="https://bevry.me/bitcoin" title="Donate once-off to this project using Bitcoin"><img src="https://img.shields.io/badge/bitcoin-donate-yellow.svg" alt="Bitcoin donate button" /></a></span> +<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span> + +<!-- /BADGES --> + + +<!-- DESCRIPTION/ --> + +Node's domain module for the web browser. This is merely an evented try...catch with the same API as node, nothing more. + +<!-- /DESCRIPTION --> + + +<!-- INSTALL/ --> + +<h2>Install</h2> + +<a href="https://npmjs.com" title="npm is a package manager for javascript"><h3>NPM</h3></a><ul> +<li>Install: <code>npm install --save domain-browser</code></li> +<li>Use: <code>require('domain-browser')</code></li></ul> + +<a href="http://browserify.org" title="Browserify lets you require('modules') in the browser by bundling up all of your dependencies"><h3>Browserify</h3></a><ul> +<li>Install: <code>npm install --save domain-browser</code></li> +<li>Use: <code>require('domain-browser')</code></li> +<li>CDN URL: <code>//wzrd.in/bundle/domain-browser@1.1.7</code></li></ul> + +<a href="http://enderjs.com" title="Ender is a full featured package manager for your browser"><h3>Ender</h3></a><ul> +<li>Install: <code>ender add domain-browser</code></li> +<li>Use: <code>require('domain-browser')</code></li></ul> + +<!-- /INSTALL --> + + +<!-- HISTORY/ --> + +<h2>History</h2> + +<a href="https://github.com/bevry/domain-browser/blob/master/HISTORY.md#files">Discover the release history by heading on over to the <code>HISTORY.md</code> file.</a> + +<!-- /HISTORY --> + + +<!-- BACKERS/ --> + +<h2>Backers</h2> + +<h3>Maintainers</h3> + +These amazing people are maintaining this project: + +<ul><li><a href="http://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/bevry/domain-browser/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/domain-browser">view contributions</a></li></ul> + +<h3>Sponsors</h3> + +No sponsors yet! Will you be the first? + +<span class="badge-patreon"><a href="http://patreon.com/bevry" title="Donate to this project using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a></span> +<span class="badge-gratipay"><a href="https://www.gratipay.com/bevry" title="Donate weekly to this project using Gratipay"><img src="https://img.shields.io/badge/gratipay-donate-yellow.svg" alt="Gratipay donate button" /></a></span> +<span class="badge-flattr"><a href="http://flattr.com/thing/344188/balupton-on-Flattr" title="Donate to this project using Flattr"><img src="https://img.shields.io/badge/flattr-donate-yellow.svg" alt="Flattr donate button" /></a></span> +<span class="badge-paypal"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6" title="Donate to this project using Paypal"><img src="https://img.shields.io/badge/paypal-donate-yellow.svg" alt="PayPal donate button" /></a></span> +<span class="badge-bitcoin"><a href="https://bevry.me/bitcoin" title="Donate once-off to this project using Bitcoin"><img src="https://img.shields.io/badge/bitcoin-donate-yellow.svg" alt="Bitcoin donate button" /></a></span> +<span class="badge-wishlist"><a href="https://bevry.me/wishlist" title="Buy an item on our wishlist for us"><img src="https://img.shields.io/badge/wishlist-donate-yellow.svg" alt="Wishlist browse button" /></a></span> + +<h3>Contributors</h3> + +These amazing people have contributed code to this project: + +<ul><li><a href="http://balupton.com">Benjamin Lupton</a> — <a href="https://github.com/bevry/domain-browser/commits?author=balupton" title="View the GitHub contributions of Benjamin Lupton on repository bevry/domain-browser">view contributions</a></li> +<li><a href="http://evansolomon.me">Evan Solomon</a> — <a href="https://github.com/bevry/domain-browser/commits?author=evansolomon" title="View the GitHub contributions of Evan Solomon on repository bevry/domain-browser">view contributions</a></li> +<li><a href="http://substack.net/">James Halliday</a> — <a href="https://github.com/bevry/domain-browser/commits?author=substack" title="View the GitHub contributions of James Halliday on repository bevry/domain-browser">view contributions</a></li> +<li><a href="twitter.com/guybedford">Guy Bedford</a> — <a href="https://github.com/bevry/domain-browser/commits?author=guybedford" title="View the GitHub contributions of Guy Bedford on repository bevry/domain-browser">view contributions</a></li> +<li><a href="https://github.com/TrySound">Bogdan Chadkin</a> — <a href="https://github.com/bevry/domain-browser/commits?author=TrySound" title="View the GitHub contributions of Bogdan Chadkin on repository bevry/domain-browser">view contributions</a></li></ul> + +<a href="https://github.com/bevry/domain-browser/blob/master/CONTRIBUTING.md#files">Discover how you can contribute by heading on over to the <code>CONTRIBUTING.md</code> file.</a> + +<!-- /BACKERS --> + + +<!-- LICENSE/ --> + +<h2>License</h2> + +Unless stated otherwise all works are: + +<ul><li>Copyright © 2013+ <a href="http://bevry.me">Bevry Pty Ltd</a></li></ul> + +and licensed under: + +<ul><li><a href="http://spdx.org/licenses/MIT.html">MIT License</a></li></ul> + +<!-- /LICENSE --> diff --git a/node_modules/domain-browser/index.js b/node_modules/domain-browser/index.js new file mode 100644 index 000000000..f6cd7f7d7 --- /dev/null +++ b/node_modules/domain-browser/index.js @@ -0,0 +1,69 @@ +// This file should be ES5 compatible +/* eslint prefer-spread:0, no-var:0, prefer-reflect:0, no-magic-numbers:0 */ +'use strict' +module.exports = (function () { + // Import Events + var events = require('events') + + // Export Domain + var domain = {} + domain.createDomain = domain.create = function () { + var d = new events.EventEmitter() + + function emitError (e) { + d.emit('error', e) + } + + d.add = function (emitter) { + emitter.on('error', emitError) + } + d.remove = function (emitter) { + emitter.removeListener('error', emitError) + } + d.bind = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments) + try { + fn.apply(null, args) + } + catch (err) { + emitError(err) + } + } + } + d.intercept = function (fn) { + return function (err) { + if ( err ) { + emitError(err) + } + else { + var args = Array.prototype.slice.call(arguments, 1) + try { + fn.apply(null, args) + } + catch (err) { + emitError(err) + } + } + } + } + d.run = function (fn) { + try { + fn() + } + catch (err) { + emitError(err) + } + return this + } + d.dispose = function () { + this.removeAllListeners() + return this + } + d.enter = d.exit = function () { + return this + } + return d + } + return domain +}).call(this) diff --git a/node_modules/domain-browser/package.json b/node_modules/domain-browser/package.json new file mode 100644 index 000000000..c2795e95c --- /dev/null +++ b/node_modules/domain-browser/package.json @@ -0,0 +1,97 @@ +{ + "name": "domain-browser", + "version": "1.1.7", + "description": "Node's domain module for the web browser. This is merely an evented try...catch with the same API as node, nothing more.", + "homepage": "https://github.com/bevry/domain-browser", + "license": "MIT", + "badges": { + "list": [ + "travisci", + "npmversion", + "npmdownloads", + "daviddm", + "daviddmdev", + "---", + "slackin", + "patreon", + "gratipay", + "flattr", + "paypal", + "bitcoin", + "wishlist" + ], + "config": { + "patreonUsername": "bevry", + "gratipayUsername": "bevry", + "flattrCode": "344188/balupton-on-Flattr", + "paypalButtonID": "QB8GQPZAH84N6", + "bitcoinURL": "https://bevry.me/bitcoin", + "wishlistURL": "https://bevry.me/wishlist", + "slackinURL": "https://slack.bevry.me" + } + }, + "keywords": [ + "domain", + "trycatch", + "try", + "catch", + "node-compat", + "ender.js", + "component", + "component.io", + "umd", + "amd", + "require.js", + "browser" + ], + "author": "2013+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me)", + "maintainers": [ + "Benjamin Lupton <b@lupton.cc> (http://balupton.com)" + ], + "contributors": [ + "Benjamin Lupton <b@lupton.cc> (http://balupton.com)", + "Evan Solomon (http://evansolomon.me)", + "James Halliday <substack@gmail.com> (http://substack.net/)", + "Guy Bedford <guybedford@gmail.com> (twitter.com/guybedford)", + "Bogdan Chadkin <trysound@yandex.ru> (https://github.com/TrySound)" + ], + "bugs": { + "url": "https://github.com/bevry/domain-browser/issues" + }, + "repository": { + "type": "git", + "url": "http://github.com/bevry/domain-browser.git" + }, + "engines": { + "node": ">=0.4", + "npm": ">=1.2" + }, + "browsers": true, + "main": "./index.js", + "jspm": { + "map": { + "./index.js": { + "node": "@node/domain" + } + } + }, + "dependencies": {}, + "devDependencies": { + "assert-helpers": "^4.1.0", + "eslint": "^1.10.3", + "joe": "^1.6.0", + "joe-reporter-console": "^1.2.1", + "projectz": "^1.0.8" + }, + "scripts": { + "clean": "node --harmony nakefile.js clean", + "setup": "node --harmony nakefile.js setup", + "compile": "node --harmony nakefile.js compile", + "watch": "node --harmony nakefile.js watch", + "verify": "node --harmony nakefile.js verify", + "meta": "node --harmony nakefile.js meta", + "prepare": "node --harmony nakefile.js prepare", + "release": "node --harmony nakefile.js release", + "test": "node --harmony ./test.js" + } +} diff --git a/node_modules/domain-browser/test.js b/node_modules/domain-browser/test.js new file mode 100644 index 000000000..70efcfcf5 --- /dev/null +++ b/node_modules/domain-browser/test.js @@ -0,0 +1,100 @@ +/* eslint handle-callback-err:0, no-magic-numbers:0, no-unused-vars:0 */ +'use strict' + +// Import +const events = require('events') +const equal = require('assert-helpers').equal +const joe = require('joe') +const domain = require('./') + +// ===================================== +// Tests + +joe.describe('domain-browser', function (describe, it) { + it('should work on throws', function (done) { + const d = domain.create() + d.on('error', function (err) { + equal(err && err.message, 'a thrown error', 'error message') + done() + }) + d.run(function () { + throw new Error('a thrown error') + }) + }) + + it('should be able to add emitters', function (done) { + const d = domain.create() + const emitter = new events.EventEmitter() + + d.add(emitter) + d.on('error', function (err) { + equal(err && err.message, 'an emitted error', 'error message') + done() + }) + + emitter.emit('error', new Error('an emitted error')) + }) + + it('should be able to remove emitters', function (done) { + const emitter = new events.EventEmitter() + const d = domain.create() + let domainGotError = false + + d.add(emitter) + d.on('error', function (err) { + domainGotError = true + }) + + emitter.on('error', function (err) { + equal(err && err.message, 'This error should not go to the domain', 'error message') + + // Make sure nothing race condition-y is happening + setTimeout(function () { + equal(domainGotError, false, 'no domain error') + done() + }, 0) + }) + + d.remove(emitter) + emitter.emit('error', new Error('This error should not go to the domain')) + }) + + it('bind should work', function (done) { + const d = domain.create() + d.on('error', function (err) { + equal(err && err.message, 'a thrown error', 'error message') + done() + }) + d.bind(function (err, a, b) { + equal(err && err.message, 'a passed error', 'error message') + equal(a, 2, 'value of a') + equal(b, 3, 'value of b') + throw new Error('a thrown error') + })(new Error('a passed error'), 2, 3) + }) + + it('intercept should work', function (done) { + const d = domain.create() + let count = 0 + d.on('error', function (err) { + if ( count === 0 ) { + equal(err && err.message, 'a thrown error', 'error message') + } + else if ( count === 1 ) { + equal(err && err.message, 'a passed error', 'error message') + done() + } + count++ + }) + + d.intercept(function (a, b) { + equal(a, 2, 'value of a') + equal(b, 3, 'value of b') + throw new Error('a thrown error') + })(null, 2, 3) + + d.intercept(function (a, b) { + throw new Error('should never reach here') + })(new Error('a passed error'), 2, 3) + }) +}) |