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

21
static/js/ketcher2/node_modules/fined/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Blaine Bublitz, Tyler Kellen and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

68
static/js/ketcher2/node_modules/fined/README.md generated vendored Normal file
View File

@ -0,0 +1,68 @@
# Fined [![Build Status][travis-img]][travis-url] [![Build Status][appveyor-img]][appveyor-url] [![Coverage][coveralls-img]][coveralls-url]
> Find a file given a declaration of locations
[![NPM][npm-img]][npm-url]
## Usage
```js
var fined = require('fined');
fined({ path: 'path/to/file', extensions: ['.js', '.json'] });
// => { path: '/absolute/path/to/file.js', extension: '.js' } (if file exists)
// => null (if file does not exist)
var opts = {
name: '.app',
cwd: '.',
extensions: {
'rc': 'default-rc-loader',
'.yml': 'default-yml-loader',
},
};
fined({ path: '.' }, opts);
// => { path: '/absolute/of/cwd/.app.yml', extension: { '.yml': 'default-yml-loader' } }
fined({ path: '~', extensions: { 'rc': 'some-special-rc-loader' } }, opts);
// => { path: '/User/home/.apprc', extension: { 'rc': 'some-special-rc-loader' } }
```
## API
### fined(pathObj, opts) => object | null
#### Arguments:
* **pathObj** [string | object] : a path setting for finding a file.
* **opts** [object] : a plain object supplements `pathObj`.
`pathObj` and `opts` can have same properties:
* **path** [string] : a path string.
* **name** [string] : a basename.
* **extensions**: [string | array | object] : extensions.
* **cwd**: a base directory of `path` and for finding up.
* **findUp**: [boolean] : a flag to find up.
#### Return:
This function returns a plain object which consists of following properties if a file exists otherwise null.
* **path** : an absolute path
* **extension** : a string or a plain object of extension.
## License
MIT
[npm-img]: https://nodei.co/npm/fined.png
[npm-url]: https://nodei.co/npm/fined/
[travis-img]: https://travis-ci.org/js-cli/fined.svg?branch=master
[travis-url]: https://travis-ci.org/js-cli/fined
[appveyor-img]: https://ci.appveyor.com/api/projects/status/github/js-cli/fined?branch=master&svg=true
[appveyor-url]: https://ci.appveyor.com/project/js-cli/fined
[coveralls-img]: https://coveralls.io/repos/github/js-cli/fined/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/github/js-cli/fined?branch=master

166
static/js/ketcher2/node_modules/fined/index.js generated vendored Normal file
View File

@ -0,0 +1,166 @@
'use strict';
var fs = require('fs');
var path = require('path');
var isPlainObject = require('is-plain-object');
var pick = require('object.pick');
var defaults = require('object.defaults/immutable');
var expandTilde = require('expand-tilde');
var parsePath = require('parse-filepath');
function fined(pathObj, defaultObj) {
var expandedPath = expandPath(pathObj, defaultObj);
return expandedPath ? findWithExpandedPath(expandedPath) : null;
}
function expandPath(pathObj, defaultObj) {
if (!isPlainObject(defaultObj)) {
defaultObj = {};
}
if (isString(pathObj)) {
pathObj = { path: pathObj };
}
if (!isPlainObject(pathObj)) {
pathObj = {};
}
pathObj = defaults(pathObj, defaultObj);
var filePath;
if (!isString(pathObj.path)) {
return null;
}
// Execution of toString is for a String object.
if (isString(pathObj.name) && pathObj.name) {
if (pathObj.path) {
filePath = expandTilde(pathObj.path.toString());
filePath = path.join(filePath, pathObj.name.toString());
} else {
filePath = pathObj.name.toString();
}
} else {
filePath = expandTilde(pathObj.path.toString());
}
var extArr = createExtensionArray(pathObj.extensions);
var extMap = createExtensionMap(pathObj.extensions);
var basedir = isString(pathObj.cwd) ? pathObj.cwd.toString() : '.';
basedir = path.resolve(expandTilde(basedir));
var findUp = !!pathObj.findUp;
var parsed = parsePath(filePath);
if (parsed.isAbsolute) {
filePath = filePath.slice(parsed.root.length);
findUp = false;
basedir = parsed.root;
/* istanbul ignore if */
} else if (parsed.root) { // Expanded path has a drive letter on Windows.
filePath = filePath.slice(parsed.root.length);
basedir = path.resolve(parsed.root);
}
return {
path: filePath,
basedir: basedir,
findUp: findUp,
extArr: extArr,
extMap: extMap,
};
}
function findWithExpandedPath(expanded) {
var found = expanded.findUp ?
findUpFile(expanded.basedir, expanded.path, expanded.extArr) :
findFile(expanded.basedir, expanded.path, expanded.extArr);
if (!found) {
return null;
}
if (expanded.extMap) {
found.extension = pick(expanded.extMap, found.extension);
}
return found;
}
function findFile(basedir, relpath, extArr) {
var noExtPath = path.resolve(basedir, relpath);
for (var i = 0, n = extArr.length; i < n; i++) {
var filepath = noExtPath + extArr[i];
try {
fs.statSync(filepath);
return { path: filepath, extension: extArr[i] };
} catch (e) {}
}
return null;
}
function findUpFile(basedir, filepath, extArr) {
var lastdir;
do {
var found = findFile(basedir, filepath, extArr);
if (found) {
return found;
}
lastdir = basedir;
basedir = path.dirname(basedir);
} while (lastdir !== basedir);
return null;
}
function createExtensionArray(exts) {
if (isString(exts)) {
return [exts];
}
if (Array.isArray(exts)) {
exts = exts.filter(isString);
return (exts.length > 0) ? exts : [''];
}
if (isPlainObject(exts)) {
exts = Object.keys(exts);
return (exts.length > 0) ? exts : [''];
}
return [''];
}
function createExtensionMap(exts) {
if (!isPlainObject(exts)) {
return null;
}
if (isEmpty(exts)) {
return { '': null };
}
return exts;
}
function isEmpty(object) {
return !Object.keys(object).length;
}
function isString(value) {
if (typeof value === 'string') {
return true;
}
if (Object.prototype.toString.call(value) === '[object String]') {
return true;
}
return false;
}
module.exports = fined;

View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-2016, Jon Schlinkert.
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.

View File

@ -0,0 +1,80 @@
# expand-tilde [![NPM version](https://img.shields.io/npm/v/expand-tilde.svg?style=flat)](https://www.npmjs.com/package/expand-tilde) [![NPM downloads](https://img.shields.io/npm/dm/expand-tilde.svg?style=flat)](https://npmjs.org/package/expand-tilde) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/expand-tilde.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/expand-tilde)
> Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save expand-tilde
```
## Usage
See the [Bash documentation for Tilde Expansion](https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html).
```js
var expandTilde = require('expand-tilde');
expandTilde('~')
//=> '/Users/jonschlinkert'
expandTilde('~+')
//=> process.cwd()
```
## Run tests
Install dev dependencies:
```bash
npm i -d && npm test
```
## About
### Related projects
* [braces](https://www.npmjs.com/package/braces): Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces… [more](https://github.com/jonschlinkert/braces) | [homepage](https://github.com/jonschlinkert/braces "Fast, comprehensive, bash-like brace expansion implemented in JavaScript. Complete support for the Bash 4.3 braces specification, without sacrificing speed.")
* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.")
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Building docs
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
```sh
$ npm install -g verb verb-generate-readme && verb
```
### Running tests
Install dev dependencies:
```sh
$ npm install -d && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
### License
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 08, 2016._

View File

@ -0,0 +1,22 @@
/*!
* expand-tilde <https://github.com/jonschlinkert/expand-tilde>
*
* Copyright (c) 2015 Jon Schlinkert.
* Licensed under the MIT license.
*/
var homedir = require('homedir-polyfill');
var path = require('path');
module.exports = function expandTilde(filepath) {
var home = homedir();
if (filepath.charCodeAt(0) === 126 /* ~ */) {
if (filepath.charCodeAt(1) === 43 /* + */) {
return path.join(process.cwd(), filepath.slice(2));
}
return home ? path.join(home, filepath.slice(1)) : filepath;
}
return filepath;
};

View File

@ -0,0 +1,98 @@
{
"_from": "expand-tilde@^2.0.2",
"_id": "expand-tilde@2.0.2",
"_inBundle": false,
"_integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
"_location": "/fined/expand-tilde",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "expand-tilde@^2.0.2",
"name": "expand-tilde",
"escapedName": "expand-tilde",
"rawSpec": "^2.0.2",
"saveSpec": null,
"fetchSpec": "^2.0.2"
},
"_requiredBy": [
"/fined"
],
"_resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
"_shasum": "97e801aa052df02454de46b02bf621642cdc8502",
"_spec": "expand-tilde@^2.0.2",
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/fined",
"author": {
"name": "Jon Schlinkert",
"url": "https://github.com/jonschlinkert"
},
"bugs": {
"url": "https://github.com/jonschlinkert/expand-tilde/issues"
},
"bundleDependencies": false,
"dependencies": {
"homedir-polyfill": "^1.0.1"
},
"deprecated": false,
"description": "Bash-like tilde expansion for node.js. Expands a leading tilde in a file path to the user home directory, or `~+` to the cwd.",
"devDependencies": {
"gulp-format-md": "^0.1.9",
"is-windows": "^0.2.0",
"mocha": "^2.5.3"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/jonschlinkert/expand-tilde",
"keywords": [
"cwd",
"expand",
"expansion",
"filepath",
"home",
"path",
"pwd",
"tilde",
"user",
"userhome"
],
"license": "MIT",
"main": "index.js",
"name": "expand-tilde",
"repository": {
"type": "git",
"url": "git+https://github.com/jonschlinkert/expand-tilde.git"
},
"scripts": {
"test": "mocha"
},
"verb": {
"run": true,
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"braces",
"expand-brackets",
"is-glob",
"micromatch"
]
},
"reflinks": [
"verb"
],
"lint": {
"reflinks": true
}
},
"version": "2.0.2"
}

88
static/js/ketcher2/node_modules/fined/package.json generated vendored Normal file
View File

@ -0,0 +1,88 @@
{
"_from": "fined@^1.0.1",
"_id": "fined@1.1.0",
"_inBundle": false,
"_integrity": "sha1-s33IRLdqL15wgeiE98CuNE8VNHY=",
"_location": "/fined",
"_phantomChildren": {
"homedir-polyfill": "1.0.1"
},
"_requested": {
"type": "range",
"registry": true,
"raw": "fined@^1.0.1",
"name": "fined",
"escapedName": "fined",
"rawSpec": "^1.0.1",
"saveSpec": null,
"fetchSpec": "^1.0.1"
},
"_requiredBy": [
"/liftoff"
],
"_resolved": "https://registry.npmjs.org/fined/-/fined-1.1.0.tgz",
"_shasum": "b37dc844b76a2f5e7081e884f7c0ae344f153476",
"_spec": "fined@^1.0.1",
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/liftoff",
"author": {
"name": "JS CLI Team",
"url": "https://github.com/js-cli"
},
"bugs": {
"url": "https://github.com/js-cli/fined/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Takayuki Sato",
"email": "sttk.xslet@gmail.com"
},
{
"name": "Blaine Bublitz",
"email": "blaine.bublitz@gmail.com"
}
],
"dependencies": {
"expand-tilde": "^2.0.2",
"is-plain-object": "^2.0.3",
"object.defaults": "^1.1.0",
"object.pick": "^1.2.0",
"parse-filepath": "^1.0.1"
},
"deprecated": false,
"description": "Find a file given a declaration of locations",
"devDependencies": {
"eslint": "^1.7.3",
"eslint-config-gulp": "^2.0.0",
"expect": "^1.19.0",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"jscs": "^2.3.5",
"jscs-preset-gulp": "^1.0.0",
"mocha": "^2.4.5"
},
"engines": {
"node": ">= 0.10"
},
"files": [
"index.js",
"LICENSE"
],
"homepage": "https://github.com/js-cli/fined#readme",
"keywords": [],
"license": "MIT",
"main": "index.js",
"name": "fined",
"repository": {
"type": "git",
"url": "git+https://github.com/js-cli/fined.git"
},
"scripts": {
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls",
"lint": "eslint . && jscs .",
"pretest": "npm run lint",
"test": "mocha --async-only"
},
"version": "1.1.0"
}