Current Dev State

This commit is contained in:
Tim Lorsbach
2025-06-23 20:13:54 +02:00
parent b4f9bb277d
commit ded50edaa2
22617 changed files with 4345095 additions and 174 deletions

View File

@ -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

View File

@ -0,0 +1,23 @@
<!-- LICENSEFILE/ -->
<h1>License</h1>
Unless stated otherwise all works are:
<ul><li>Copyright &copy; 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 -->

View File

@ -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&amp;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&amp;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 &copy; 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 -->

View File

@ -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)

View File

@ -0,0 +1,149 @@
{
"_from": "domain-browser@~1.1.0",
"_id": "domain-browser@1.1.7",
"_inBundle": false,
"_integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=",
"_location": "/domain-browser",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "domain-browser@~1.1.0",
"name": "domain-browser",
"escapedName": "domain-browser",
"rawSpec": "~1.1.0",
"saveSpec": null,
"fetchSpec": "~1.1.0"
},
"_requiredBy": [
"/browserify"
],
"_resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz",
"_shasum": "867aa4b093faa05f1de08c06f4d7b21fdf8698bc",
"_spec": "domain-browser@~1.1.0",
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/browserify",
"author": {
"name": "2013+ Bevry Pty Ltd",
"email": "us@bevry.me",
"url": "http://bevry.me"
},
"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"
}
},
"browsers": true,
"bugs": {
"url": "https://github.com/bevry/domain-browser/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Benjamin Lupton",
"email": "b@lupton.cc",
"url": "http://balupton.com"
},
{
"name": "Evan Solomon",
"url": "http://evansolomon.me"
},
{
"name": "James Halliday",
"email": "substack@gmail.com",
"url": "http://substack.net/"
},
{
"name": "Guy Bedford",
"email": "guybedford@gmail.com",
"url": "twitter.com/guybedford"
},
{
"name": "Bogdan Chadkin",
"email": "trysound@yandex.ru",
"url": "https://github.com/TrySound"
}
],
"dependencies": {},
"deprecated": false,
"description": "Node's domain module for the web browser. This is merely an evented try...catch with the same API as node, nothing more.",
"devDependencies": {
"assert-helpers": "^4.1.0",
"eslint": "^1.10.3",
"joe": "^1.6.0",
"joe-reporter-console": "^1.2.1",
"projectz": "^1.0.8"
},
"engines": {
"node": ">=0.4",
"npm": ">=1.2"
},
"homepage": "https://github.com/bevry/domain-browser",
"jspm": {
"map": {
"./index.js": {
"node": "@node/domain"
}
}
},
"keywords": [
"domain",
"trycatch",
"try",
"catch",
"node-compat",
"ender.js",
"component",
"component.io",
"umd",
"amd",
"require.js",
"browser"
],
"license": "MIT",
"main": "./index.js",
"maintainers": [
{
"name": "Benjamin Lupton",
"email": "b@lupton.cc",
"url": "http://balupton.com"
}
],
"name": "domain-browser",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/bevry/domain-browser.git"
},
"scripts": {
"clean": "node --harmony nakefile.js clean",
"compile": "node --harmony nakefile.js compile",
"meta": "node --harmony nakefile.js meta",
"prepare": "node --harmony nakefile.js prepare",
"release": "node --harmony nakefile.js release",
"setup": "node --harmony nakefile.js setup",
"test": "node --harmony ./test.js",
"verify": "node --harmony nakefile.js verify",
"watch": "node --harmony nakefile.js watch"
},
"version": "1.1.7"
}

100
static/js/ketcher2/node_modules/domain-browser/test.js generated vendored Normal file
View File

@ -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)
})
})