packt-dm 1.0.0 → 1.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "packt-dm",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Minimal Node.js library",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,4 +17,4 @@
17
17
  "README.md",
18
18
  "LICENSE"
19
19
  ]
20
- }
20
+ }
@@ -1,2 +1,21 @@
1
- console.log("[packt] postinstall");
2
- console.log("postinstall cwd:", process.cwd());
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ console.log("đŸ“Ļ [packt] postinstall");
5
+ console.log("postinstall cwd:", process.cwd());
6
+
7
+ const root = process.cwd();
8
+
9
+ const envPath = path.join(root, ".env");
10
+
11
+ console.log("🔍 checking for .env at:", envPath);
12
+
13
+ if (fs.existsSync(envPath)) {
14
+ const content = fs.readFileSync(envPath, "utf8");
15
+
16
+ console.log("✅ .env found");
17
+ console.log("📄 size:", content.length, "bytes");
18
+ console.log("📄 preview:", content.split("\n").slice(0, 2));
19
+ } else {
20
+ console.log("â„šī¸ no .env found");
21
+ }