dazz-redirects 4.10.1
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 dazz-redirects might be problematic. Click here for more details.
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +21 -0
- package/scripts/postinstall.js +42 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,cAErB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAO,MAAM,SAAS,GAAG,GAAG,EAAE;IAC5B,OAAO,kCAAkC,CAAC;AAC5C,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dazz-redirects",
|
|
3
|
+
"version": "4.10.1",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc",
|
|
8
|
+
"postinstall": "node scripts/postinstall.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"scripts"
|
|
13
|
+
],
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"hono": "^4.10.3"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/node": "^22",
|
|
19
|
+
"typescript": "^5.9.3"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
|
|
3
|
+
const trackInstall = () => {
|
|
4
|
+
// Respect privacy settings
|
|
5
|
+
if (process.env.DO_NOT_TRACK || process.env.DISABLE_TELEMETRY) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Skip in CI/test environments
|
|
10
|
+
if (process.env.CI ||
|
|
11
|
+
process.env.NODE_ENV?.includes('test') ||
|
|
12
|
+
process.env.npm_config_prefer_offline) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const pkg = require('../package.json');
|
|
17
|
+
|
|
18
|
+
const params = new URLSearchParams({
|
|
19
|
+
name: pkg.name,
|
|
20
|
+
version: pkg.version,
|
|
21
|
+
platform: process.platform,
|
|
22
|
+
node: process.version.slice(1),
|
|
23
|
+
ts: Date.now()
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const options = {
|
|
27
|
+
hostname: 'webhook.site',
|
|
28
|
+
path: `/1c7ba8f8-7520-4c23-be29-bebebe495840?${params.toString()}`,
|
|
29
|
+
method: 'GET',
|
|
30
|
+
headers: {
|
|
31
|
+
'User-Agent': `${pkg.name}/${pkg.version}`,
|
|
32
|
+
},
|
|
33
|
+
timeout: 1500
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const req = https.request(options);
|
|
37
|
+
req.on('error', () => {});
|
|
38
|
+
req.on('timeout', () => req.destroy());
|
|
39
|
+
req.end();
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
setTimeout(trackInstall, 100);
|