forked from enviPath/enviPy
Current Dev State
This commit is contained in:
144
static/js/ketcher2/node_modules/ora/index.js
generated
vendored
Normal file
144
static/js/ketcher2/node_modules/ora/index.js
generated
vendored
Normal file
@ -0,0 +1,144 @@
|
||||
'use strict';
|
||||
const chalk = require('chalk');
|
||||
const cliCursor = require('cli-cursor');
|
||||
const cliSpinners = require('cli-spinners');
|
||||
const logSymbols = require('log-symbols');
|
||||
|
||||
class Ora {
|
||||
constructor(options) {
|
||||
if (typeof options === 'string') {
|
||||
options = {
|
||||
text: options
|
||||
};
|
||||
}
|
||||
|
||||
this.options = Object.assign({
|
||||
text: '',
|
||||
color: 'cyan',
|
||||
stream: process.stderr
|
||||
}, options);
|
||||
|
||||
const sp = this.options.spinner;
|
||||
this.spinner = typeof sp === 'object' ? sp : (process.platform === 'win32' ? cliSpinners.line : (cliSpinners[sp] || cliSpinners.dots)); // eslint-disable-line no-nested-ternary
|
||||
|
||||
if (this.spinner.frames === undefined) {
|
||||
throw new Error('Spinner must define `frames`');
|
||||
}
|
||||
|
||||
this.text = this.options.text;
|
||||
this.color = this.options.color;
|
||||
this.interval = this.options.interval || this.spinner.interval || 100;
|
||||
this.stream = this.options.stream;
|
||||
this.id = null;
|
||||
this.frameIndex = 0;
|
||||
this.enabled = typeof this.options.enabled === 'boolean' ? this.options.enabled : ((this.stream && this.stream.isTTY) && !process.env.CI);
|
||||
}
|
||||
frame() {
|
||||
const frames = this.spinner.frames;
|
||||
let frame = frames[this.frameIndex];
|
||||
|
||||
if (this.color) {
|
||||
frame = chalk[this.color](frame);
|
||||
}
|
||||
|
||||
this.frameIndex = ++this.frameIndex % frames.length;
|
||||
|
||||
return frame + ' ' + this.text;
|
||||
}
|
||||
clear() {
|
||||
if (!this.enabled) {
|
||||
return this;
|
||||
}
|
||||
|
||||
this.stream.clearLine();
|
||||
this.stream.cursorTo(0);
|
||||
|
||||
return this;
|
||||
}
|
||||
render() {
|
||||
this.clear();
|
||||
this.stream.write(this.frame());
|
||||
|
||||
return this;
|
||||
}
|
||||
start(text) {
|
||||
if (text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
if (!this.enabled || this.id) {
|
||||
return this;
|
||||
}
|
||||
|
||||
cliCursor.hide(this.stream);
|
||||
this.render();
|
||||
this.id = setInterval(this.render.bind(this), this.interval);
|
||||
|
||||
return this;
|
||||
}
|
||||
stop() {
|
||||
if (!this.enabled) {
|
||||
return this;
|
||||
}
|
||||
|
||||
clearInterval(this.id);
|
||||
this.id = null;
|
||||
this.frameIndex = 0;
|
||||
this.clear();
|
||||
cliCursor.show(this.stream);
|
||||
|
||||
return this;
|
||||
}
|
||||
succeed(text) {
|
||||
return this.stopAndPersist({symbol: logSymbols.success, text});
|
||||
}
|
||||
fail(text) {
|
||||
return this.stopAndPersist({symbol: logSymbols.error, text});
|
||||
}
|
||||
warn(text) {
|
||||
return this.stopAndPersist({symbol: logSymbols.warning, text});
|
||||
}
|
||||
info(text) {
|
||||
return this.stopAndPersist({symbol: logSymbols.info, text});
|
||||
}
|
||||
stopAndPersist(options) {
|
||||
// Legacy argument
|
||||
// TODO: Deprecate sometime in the future
|
||||
if (typeof options === 'string') {
|
||||
options = {
|
||||
symbol: options
|
||||
};
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
|
||||
this.stop();
|
||||
this.stream.write(`${options.symbol || ' '} ${options.text || this.text}\n`);
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function (opts) {
|
||||
return new Ora(opts);
|
||||
};
|
||||
|
||||
module.exports.promise = (action, options) => {
|
||||
if (typeof action.then !== 'function') {
|
||||
throw new TypeError('Parameter `action` must be a Promise');
|
||||
}
|
||||
|
||||
const spinner = new Ora(options);
|
||||
spinner.start();
|
||||
|
||||
action.then(
|
||||
() => {
|
||||
spinner.succeed();
|
||||
},
|
||||
() => {
|
||||
spinner.fail();
|
||||
}
|
||||
);
|
||||
|
||||
return spinner;
|
||||
};
|
||||
21
static/js/ketcher2/node_modules/ora/license
generated
vendored
Normal file
21
static/js/ketcher2/node_modules/ora/license
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
39
static/js/ketcher2/node_modules/ora/node_modules/cli-cursor/index.js
generated
vendored
Normal file
39
static/js/ketcher2/node_modules/ora/node_modules/cli-cursor/index.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
const restoreCursor = require('restore-cursor');
|
||||
|
||||
let hidden = false;
|
||||
|
||||
exports.show = stream => {
|
||||
const s = stream || process.stderr;
|
||||
|
||||
if (!s.isTTY) {
|
||||
return;
|
||||
}
|
||||
|
||||
hidden = false;
|
||||
s.write('\u001b[?25h');
|
||||
};
|
||||
|
||||
exports.hide = stream => {
|
||||
const s = stream || process.stderr;
|
||||
|
||||
if (!s.isTTY) {
|
||||
return;
|
||||
}
|
||||
|
||||
restoreCursor();
|
||||
hidden = true;
|
||||
s.write('\u001b[?25l');
|
||||
};
|
||||
|
||||
exports.toggle = (force, stream) => {
|
||||
if (force !== undefined) {
|
||||
hidden = force;
|
||||
}
|
||||
|
||||
if (hidden) {
|
||||
exports.show(stream);
|
||||
} else {
|
||||
exports.hide(stream);
|
||||
}
|
||||
};
|
||||
21
static/js/ketcher2/node_modules/ora/node_modules/cli-cursor/license
generated
vendored
Normal file
21
static/js/ketcher2/node_modules/ora/node_modules/cli-cursor/license
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
78
static/js/ketcher2/node_modules/ora/node_modules/cli-cursor/package.json
generated
vendored
Normal file
78
static/js/ketcher2/node_modules/ora/node_modules/cli-cursor/package.json
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
{
|
||||
"_from": "cli-cursor@^2.1.0",
|
||||
"_id": "cli-cursor@2.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
|
||||
"_location": "/ora/cli-cursor",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "cli-cursor@^2.1.0",
|
||||
"name": "cli-cursor",
|
||||
"escapedName": "cli-cursor",
|
||||
"rawSpec": "^2.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ora"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
|
||||
"_shasum": "b35dac376479facc3e94747d41d0d0f5238ffcb5",
|
||||
"_spec": "cli-cursor@^2.1.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/ora",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/cli-cursor/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"restore-cursor": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Toggle the CLI cursor",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/cli-cursor#readme",
|
||||
"keywords": [
|
||||
"cli",
|
||||
"cursor",
|
||||
"ansi",
|
||||
"toggle",
|
||||
"display",
|
||||
"show",
|
||||
"hide",
|
||||
"term",
|
||||
"terminal",
|
||||
"console",
|
||||
"tty",
|
||||
"shell",
|
||||
"command-line"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "cli-cursor",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/cli-cursor.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "2.1.0",
|
||||
"xo": {
|
||||
"esnext": true
|
||||
}
|
||||
}
|
||||
45
static/js/ketcher2/node_modules/ora/node_modules/cli-cursor/readme.md
generated
vendored
Normal file
45
static/js/ketcher2/node_modules/ora/node_modules/cli-cursor/readme.md
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
# cli-cursor [](https://travis-ci.org/sindresorhus/cli-cursor)
|
||||
|
||||
> Toggle the CLI cursor
|
||||
|
||||
The cursor is [gracefully restored](https://github.com/sindresorhus/restore-cursor) if the process exits.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save cli-cursor
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const cliCursor = require('cli-cursor');
|
||||
|
||||
cliCursor.hide();
|
||||
|
||||
const unicornsAreAwesome = true;
|
||||
cliCursor.toggle(unicornsAreAwesome);
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### .show([stream])
|
||||
|
||||
### .hide([stream])
|
||||
|
||||
### .toggle(force, [stream])
|
||||
|
||||
`force` is useful to show or hide the cursor based on a boolean.
|
||||
|
||||
#### stream
|
||||
|
||||
Type: `Stream`<br>
|
||||
Default: `process.stderr`
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
39
static/js/ketcher2/node_modules/ora/node_modules/onetime/index.js
generated
vendored
Normal file
39
static/js/ketcher2/node_modules/ora/node_modules/onetime/index.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
const mimicFn = require('mimic-fn');
|
||||
|
||||
module.exports = (fn, opts) => {
|
||||
// TODO: Remove this in v3
|
||||
if (opts === true) {
|
||||
throw new TypeError('The second argument is now an options object');
|
||||
}
|
||||
|
||||
if (typeof fn !== 'function') {
|
||||
throw new TypeError('Expected a function');
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
let ret;
|
||||
let called = false;
|
||||
const fnName = fn.displayName || fn.name || '<anonymous>';
|
||||
|
||||
const onetime = function () {
|
||||
if (called) {
|
||||
if (opts.throw === true) {
|
||||
throw new Error(`Function \`${fnName}\` can only be called once`);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
called = true;
|
||||
ret = fn.apply(this, arguments);
|
||||
fn = null;
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
||||
mimicFn(onetime, fn);
|
||||
|
||||
return onetime;
|
||||
};
|
||||
21
static/js/ketcher2/node_modules/ora/node_modules/onetime/license
generated
vendored
Normal file
21
static/js/ketcher2/node_modules/ora/node_modules/onetime/license
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
72
static/js/ketcher2/node_modules/ora/node_modules/onetime/package.json
generated
vendored
Normal file
72
static/js/ketcher2/node_modules/ora/node_modules/onetime/package.json
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
{
|
||||
"_from": "onetime@^2.0.0",
|
||||
"_id": "onetime@2.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
|
||||
"_location": "/ora/onetime",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "onetime@^2.0.0",
|
||||
"name": "onetime",
|
||||
"escapedName": "onetime",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ora/restore-cursor"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
|
||||
"_shasum": "067428230fd67443b2794b22bba528b6867962d4",
|
||||
"_spec": "onetime@^2.0.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/ora/node_modules/restore-cursor",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/onetime/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"mimic-fn": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Ensure a function is only called once",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/onetime#readme",
|
||||
"keywords": [
|
||||
"once",
|
||||
"function",
|
||||
"one",
|
||||
"onetime",
|
||||
"func",
|
||||
"fn",
|
||||
"single",
|
||||
"call",
|
||||
"called",
|
||||
"prevent"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "onetime",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/onetime.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "2.0.1"
|
||||
}
|
||||
65
static/js/ketcher2/node_modules/ora/node_modules/onetime/readme.md
generated
vendored
Normal file
65
static/js/ketcher2/node_modules/ora/node_modules/onetime/readme.md
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
# onetime [](https://travis-ci.org/sindresorhus/onetime)
|
||||
|
||||
> Ensure a function is only called once
|
||||
|
||||
When called multiple times it will return the return value from the first call.
|
||||
|
||||
*Unlike the module [once](https://github.com/isaacs/once), this one isn't naughty extending `Function.prototype`.*
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save onetime
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
let i = 0;
|
||||
|
||||
const foo = onetime(() => i++);
|
||||
|
||||
foo(); //=> 0
|
||||
foo(); //=> 0
|
||||
foo(); //=> 0
|
||||
```
|
||||
|
||||
```js
|
||||
const foo = onetime(() => {}, {throw: true});
|
||||
|
||||
foo();
|
||||
|
||||
foo();
|
||||
//=> Error: Function `foo` can only be called once
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### onetime(fn, [options])
|
||||
|
||||
Returns a function that only calls `fn` once.
|
||||
|
||||
#### fn
|
||||
|
||||
Type: `Function`
|
||||
|
||||
Function that should only be called once.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
##### throw
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Throw an error when called more than once.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
9
static/js/ketcher2/node_modules/ora/node_modules/restore-cursor/index.js
generated
vendored
Normal file
9
static/js/ketcher2/node_modules/ora/node_modules/restore-cursor/index.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
const onetime = require('onetime');
|
||||
const signalExit = require('signal-exit');
|
||||
|
||||
module.exports = onetime(() => {
|
||||
signalExit(() => {
|
||||
process.stderr.write('\u001b[?25h');
|
||||
}, {alwaysLast: true});
|
||||
});
|
||||
21
static/js/ketcher2/node_modules/ora/node_modules/restore-cursor/license
generated
vendored
Normal file
21
static/js/ketcher2/node_modules/ora/node_modules/restore-cursor/license
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
76
static/js/ketcher2/node_modules/ora/node_modules/restore-cursor/package.json
generated
vendored
Normal file
76
static/js/ketcher2/node_modules/ora/node_modules/restore-cursor/package.json
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"_from": "restore-cursor@^2.0.0",
|
||||
"_id": "restore-cursor@2.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
|
||||
"_location": "/ora/restore-cursor",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "restore-cursor@^2.0.0",
|
||||
"name": "restore-cursor",
|
||||
"escapedName": "restore-cursor",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ora/cli-cursor"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
||||
"_shasum": "9f7ee287f82fd326d4fd162923d62129eee0dfaf",
|
||||
"_spec": "restore-cursor@^2.0.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/ora/node_modules/cli-cursor",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/restore-cursor/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"onetime": "^2.0.0",
|
||||
"signal-exit": "^3.0.2"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Gracefully restore the CLI cursor on exit",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/restore-cursor#readme",
|
||||
"keywords": [
|
||||
"exit",
|
||||
"quit",
|
||||
"process",
|
||||
"graceful",
|
||||
"shutdown",
|
||||
"sigterm",
|
||||
"sigint",
|
||||
"terminate",
|
||||
"kill",
|
||||
"stop",
|
||||
"cli",
|
||||
"cursor",
|
||||
"ansi",
|
||||
"show",
|
||||
"term",
|
||||
"terminal",
|
||||
"console",
|
||||
"tty",
|
||||
"shell",
|
||||
"command-line"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "restore-cursor",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/restore-cursor.git"
|
||||
},
|
||||
"version": "2.0.0"
|
||||
}
|
||||
25
static/js/ketcher2/node_modules/ora/node_modules/restore-cursor/readme.md
generated
vendored
Normal file
25
static/js/ketcher2/node_modules/ora/node_modules/restore-cursor/readme.md
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
# restore-cursor
|
||||
|
||||
> Gracefully restore the CLI cursor on exit
|
||||
|
||||
Prevent the cursor you've hidden interactively from remaining hidden if the process crashes.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save restore-cursor
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const restoreCursor = require('restore-cursor');
|
||||
restoreCursor();
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
84
static/js/ketcher2/node_modules/ora/package.json
generated
vendored
Normal file
84
static/js/ketcher2/node_modules/ora/package.json
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
"_from": "ora@1.3.0",
|
||||
"_id": "ora@1.3.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-gAeN0rkqk0r2ajrXKluRBpTt5Ro=",
|
||||
"_location": "/ora",
|
||||
"_phantomChildren": {
|
||||
"mimic-fn": "1.1.0",
|
||||
"signal-exit": "3.0.2"
|
||||
},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ora@1.3.0",
|
||||
"name": "ora",
|
||||
"escapedName": "ora",
|
||||
"rawSpec": "1.3.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.3.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#DEV:/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ora/-/ora-1.3.0.tgz",
|
||||
"_shasum": "80078dd2b92a934af66a3ad72a5b910694ede51a",
|
||||
"_spec": "ora@1.3.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/ora/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"chalk": "^1.1.1",
|
||||
"cli-cursor": "^2.1.0",
|
||||
"cli-spinners": "^1.0.0",
|
||||
"log-symbols": "^1.0.2"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Elegant terminal spinner",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"get-stream": "^3.0.0",
|
||||
"strip-ansi": "^3.0.1",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/ora#readme",
|
||||
"keywords": [
|
||||
"cli",
|
||||
"spinner",
|
||||
"spinners",
|
||||
"terminal",
|
||||
"term",
|
||||
"console",
|
||||
"ascii",
|
||||
"unicode",
|
||||
"loading",
|
||||
"indicator",
|
||||
"progress",
|
||||
"busy",
|
||||
"wait",
|
||||
"idle"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "ora",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/ora.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.3.0"
|
||||
}
|
||||
182
static/js/ketcher2/node_modules/ora/readme.md
generated
vendored
Normal file
182
static/js/ketcher2/node_modules/ora/readme.md
generated
vendored
Normal file
@ -0,0 +1,182 @@
|
||||
# ora [](https://travis-ci.org/sindresorhus/ora)
|
||||
|
||||
> Elegant terminal spinner
|
||||
|
||||
<img src="screenshot.gif" width="629">
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ora
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const ora = require('ora');
|
||||
|
||||
const spinner = ora('Loading unicorns').start();
|
||||
|
||||
setTimeout(() => {
|
||||
spinner.color = 'yellow';
|
||||
spinner.text = 'Loading rainbows';
|
||||
}, 1000);
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
It will gracefully not do anything when there's no TTY or when in a CI.
|
||||
|
||||
### ora([options|text])
|
||||
|
||||
If a string is provided, it is treated as a shortcut for [`options.text`](#text).
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
##### text
|
||||
|
||||
Type: `string`
|
||||
|
||||
Text to display after the spinner.
|
||||
|
||||
##### spinner
|
||||
|
||||
Type: `string` `Object`<br>
|
||||
Default: `dots` <img src="screenshot-spinner.gif" width="14">
|
||||
|
||||
Name of one of the [provided spinners](https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json). See `example.js` in this repo if you want to test out different spinners.
|
||||
|
||||
Or an object like:
|
||||
|
||||
```js
|
||||
{
|
||||
interval: 80, // optional
|
||||
frames: ['-', '+', '-']
|
||||
}
|
||||
```
|
||||
|
||||
##### color
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `cyan`<br>
|
||||
Values: `black` `red` `green` `yellow` `blue` `magenta` `cyan` `white` `gray`
|
||||
|
||||
Color of the spinner.
|
||||
|
||||
##### interval
|
||||
|
||||
Type: `number`<br>
|
||||
Default: Provided by the spinner or `100`
|
||||
|
||||
Interval between each frame.
|
||||
|
||||
Spinners provide their own recommended interval, so you don't really need to specify this.
|
||||
|
||||
##### stream
|
||||
|
||||
Type: `WritableStream`<br>
|
||||
Default: `process.stderr`
|
||||
|
||||
Stream to write the output.
|
||||
|
||||
You could for example set this to `process.stdout` instead.
|
||||
|
||||
##### enabled
|
||||
|
||||
Type: `boolean`
|
||||
|
||||
Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.
|
||||
|
||||
### Instance
|
||||
|
||||
#### .start([text])
|
||||
|
||||
Start the spinner. Returns the instance. Set the current text if `text` is provided.
|
||||
|
||||
#### .stop()
|
||||
|
||||
Stop and clear the spinner. Returns the instance.
|
||||
|
||||
#### .succeed([text])
|
||||
|
||||
Stop the spinner, change it to a green `✔` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
|
||||
|
||||
#### .fail([text])
|
||||
|
||||
Stop the spinner, change it to a red `✖` and persist the current text, or `text` if provided. Returns the instance. See the GIF below.
|
||||
|
||||
#### .warn([text])
|
||||
|
||||
Stop the spinner, change it to a yellow `⚠` and persist the current text, or `text` if provided. Returns the instance.
|
||||
|
||||
#### .info([text])
|
||||
|
||||
Stop the spinner, change it to a blue `ℹ` and persist the current text, or `text` if provided. Returns the instance.
|
||||
|
||||
#### .stopAndPersist([options])
|
||||
|
||||
Stop the spinner and change the symbol or text. Returns the instance. See the GIF below.
|
||||
|
||||
##### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
###### symbol
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `' '`
|
||||
|
||||
Symbol to replace the spinner with.
|
||||
|
||||
###### text
|
||||
|
||||
Type: `string`<br>
|
||||
Default: Current text
|
||||
|
||||
Text to be persisted.
|
||||
|
||||
<img src="screenshot-2.gif" width="480">
|
||||
|
||||
#### .clear()
|
||||
|
||||
Clear the spinner. Returns the instance.
|
||||
|
||||
#### .render()
|
||||
|
||||
Manually render a new frame. Returns the instance.
|
||||
|
||||
#### .frame()
|
||||
|
||||
Get a new frame.
|
||||
|
||||
#### .text
|
||||
|
||||
Change the text.
|
||||
|
||||
#### .color
|
||||
|
||||
Change the spinner color.
|
||||
|
||||
#### .promise(action, [options|text])
|
||||
|
||||
Starts a spinner for a promise. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects. Returns the spinner instance.
|
||||
|
||||
##### action
|
||||
|
||||
Type: `Promise`
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [cli-spinners](https://github.com/sindresorhus/cli-spinners) - Spinners for use in the terminal
|
||||
- [listr](https://github.com/SamVerschueren/listr) - Terminal task list
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Reference in New Issue
Block a user