pompelmi 1.19.0 → 1.20.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/package.json +3 -2
- package/scripts/postinstall.js +10 -0
- package/src/index.js +17 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pompelmi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"description": "ClamAV for humans — scan any file and get back Clean, Malicious, or ScanError. No daemons. No cloud. No native bindings.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "pompelmi contributors",
|
|
@@ -48,7 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"test": "node --test test/unit.test.js && node --test test/esm.test.mjs && node --test packages/nestjs/test/index.test.js && node --test packages/fastify/test/index.test.js && node --test packages/nextjs/test/index.test.js && node --test packages/hono/test/index.test.js && node --test packages/testing/test/index.test.js && node --test packages/remix/test/index.test.js && node --test packages/sveltekit/test/index.test.js && node --test packages/cloudflare/test/index.test.mjs && node test/scan.test.js",
|
|
51
|
-
"lint": "eslint src/"
|
|
51
|
+
"lint": "eslint src/",
|
|
52
|
+
"postinstall": "node scripts/postinstall.js"
|
|
52
53
|
},
|
|
53
54
|
"publishConfig": {
|
|
54
55
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
try {
|
|
2
|
+
if (process.stdout.isTTY && !process.env.CI) {
|
|
3
|
+
console.log('');
|
|
4
|
+
console.log('⭐ If pompelmi is useful, star it on GitHub:');
|
|
5
|
+
console.log(' https://github.com/pompelmi/pompelmi');
|
|
6
|
+
console.log('');
|
|
7
|
+
}
|
|
8
|
+
} catch (e) {
|
|
9
|
+
// silently fail — never break the install
|
|
10
|
+
}
|
package/src/index.js
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
try {
|
|
2
|
+
if (process.stderr.isTTY && !process.env.CI) {
|
|
3
|
+
const os = require('os');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const markerDir = path.join(os.homedir(), '.pompelmi');
|
|
7
|
+
const markerFile = path.join(markerDir, '.starred');
|
|
8
|
+
if (!fs.existsSync(markerFile)) {
|
|
9
|
+
process.stderr.write('⭐ Enjoying pompelmi? Star it → https://github.com/pompelmi/pompelmi\n');
|
|
10
|
+
fs.mkdirSync(markerDir, { recursive: true });
|
|
11
|
+
fs.writeFileSync(markerFile, '');
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
} catch (e) {
|
|
15
|
+
// silently fail — never break existing functionality
|
|
16
|
+
}
|
|
17
|
+
|
|
1
18
|
const { scan, scanBuffer, scanStream, scanDirectory } = require('./ClamAVScanner.js');
|
|
2
19
|
const { Verdict } = require('./verdicts.js');
|
|
3
20
|
const { middleware } = require('./middleware.js');
|