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

31
static/js/ketcher2/node_modules/parent-module/index.js generated vendored Normal file
View File

@ -0,0 +1,31 @@
'use strict';
var callsites = require('callsites');
module.exports = function (filepath) {
var stacks = callsites();
if (!filepath) {
return stacks[2].getFileName();
}
var seenVal = false;
// skip the first stack as it's this function
for (var i = 1; i < stacks.length; i++) {
var parentFilepath = stacks[i].getFileName();
if (parentFilepath === filepath) {
seenVal = true;
continue;
}
// skip native modules
if (parentFilepath === 'module.js') {
continue;
}
if (seenVal && parentFilepath !== filepath) {
return parentFilepath;
}
}
};

21
static/js/ketcher2/node_modules/parent-module/license generated vendored Normal file
View 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.

View File

@ -0,0 +1,10 @@
'use strict';
module.exports = function () {
var _ = Error.prepareStackTrace;
Error.prepareStackTrace = function (_, stack) {
return stack;
};
var stack = new Error().stack.slice(1);
Error.prepareStackTrace = _;
return stack;
};

View 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.

View File

@ -0,0 +1,69 @@
{
"_from": "callsites@^1.0.0",
"_id": "callsites@1.0.1",
"_inBundle": false,
"_integrity": "sha1-wUwkGIzo4dagMLTDyULmuolbaho=",
"_location": "/parent-module/callsites",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "callsites@^1.0.0",
"name": "callsites",
"escapedName": "callsites",
"rawSpec": "^1.0.0",
"saveSpec": null,
"fetchSpec": "^1.0.0"
},
"_requiredBy": [
"/parent-module"
],
"_resolved": "https://registry.npmjs.org/callsites/-/callsites-1.0.1.tgz",
"_shasum": "c14c24188ce8e1d6a030b4c3c942e6ba895b6a1a",
"_spec": "callsites@^1.0.0",
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/parent-module",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/callsites/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Get callsites from the V8 stack trace API",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"engines": {
"node": ">=0.10"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/callsites#readme",
"keywords": [
"stacktrace",
"v8",
"callsite",
"callsites",
"stack",
"trace",
"function",
"file",
"line",
"debug"
],
"license": "MIT",
"name": "callsites",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/callsites.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "1.0.1"
}

View File

@ -0,0 +1,46 @@
# callsites [![Build Status](https://travis-ci.org/sindresorhus/callsites.svg?branch=master)](https://travis-ci.org/sindresorhus/callsites)
> Get callsites from the [V8 stack trace API](https://github.com/v8/v8/wiki/Stack-Trace-API)
## Install
```
$ npm install --save callsites
```
## Usage
```js
const callsites = require('callsites');
function unicorn() {
console.log(callsites()[0].getFileName());
//=> '/Users/sindresorhus/dev/callsites/test.js'
}
unicorn();
```
## API
Returns an array of callsite objects with the following methods:
- `getTypeName`: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.
- `getFunctionName`: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.
- `getMethodName`: returns the name of the property of this or one of its prototypes that holds the current function
- `getFileName`: if this function was defined in a script returns the name of the script
- `getLineNumber`: if this function was defined in a script returns the current line number
- `getColumnNumber`: if this function was defined in a script returns the current column number
- `getEvalOrigin`: if this function was created using a call to eval returns a CallSite object representing the location where eval was called
- `isToplevel`: is this a top-level invocation, that is, is this the global object?
- `isEval`: does this call take place in code defined by a call to eval?
- `isNative`: is this call in native V8 code?
- `isConstructor`: is this a constructor call?
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

View File

@ -0,0 +1,78 @@
{
"_from": "parent-module@^0.1.0",
"_id": "parent-module@0.1.0",
"_inBundle": false,
"_integrity": "sha1-tSkoY6HoxHbs+Ffn11yYkgskuKY=",
"_location": "/parent-module",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "parent-module@^0.1.0",
"name": "parent-module",
"escapedName": "parent-module",
"rawSpec": "^0.1.0",
"saveSpec": null,
"fetchSpec": "^0.1.0"
},
"_requiredBy": [
"/require-glob"
],
"_resolved": "https://registry.npmjs.org/parent-module/-/parent-module-0.1.0.tgz",
"_shasum": "b5292863a1e8c476ecf857e7d75c98920b24b8a6",
"_spec": "parent-module@^0.1.0",
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/require-glob",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/parent-module/issues"
},
"bundleDependencies": false,
"dependencies": {
"callsites": "^1.0.0"
},
"deprecated": false,
"description": "Get the path of the parent module",
"devDependencies": {
"ava": "*",
"execa": "^0.2.2",
"xo": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/parent-module#readme",
"keywords": [
"parent",
"module",
"package",
"pkg",
"caller",
"calling",
"module",
"path",
"callsites",
"callsite",
"stacktrace",
"stack",
"trace",
"function",
"file"
],
"license": "MIT",
"name": "parent-module",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/parent-module.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "0.1.0"
}

View File

@ -0,0 +1,66 @@
# parent-module [![Build Status](https://travis-ci.org/sindresorhus/parent-module.svg?branch=master)](https://travis-ci.org/sindresorhus/parent-module)
> Get the path of the parent module
Node.js exposes `module.parent`, but it only gives you the first cached parent, which is not necessarily the actual parent.
## Install
```
$ npm install --save parent-module
```
## Usage
```js
// bar.js
const parentModule = require('parent-module');
module.exports = () => {
console.log(parentModule());
//=> '/Users/sindresorhus/dev/unicorn/foo.js'
}
```
```js
// foo.js
const bar = require('./bar');
bar();
```
## API
### parentModule([filepath])
By default it will return the path of the immediate parent.
#### filepath
Type: `string`<br>
Default: [`__filename`](https://nodejs.org/api/globals.html#globals_filename)
Filepath of the module of which to get the parent path.
Useful if you want it to work [multiple module levels down](https://github.com/sindresorhus/parent-module/tree/master/fixtures/filepath).
## Tip
Combine it with [`read-pkg-up`](https://github.com/sindresorhus/read-pkg-up) to read the package.json of the parent module.
```js
const path = require('path');
const readPkgUp = require('read-pkg-up');
const parentModule = require('parent-module');
console.log(readPkgUp.sync({cwd: path.dirname(parentModule)}).pkg);
//=> {name: 'chalk', version: '1.0.0', ...}
```
## License
MIT © [Sindre Sorhus](http://sindresorhus.com)