react-doctor-cli-dev 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.
Files changed (2) hide show
  1. package/backend/dist/db.js +25 -0
  2. package/package.json +2 -8
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const better_sqlite3_1 = __importDefault(require("better-sqlite3"));
7
+ const path_1 = __importDefault(require("path"));
8
+ const fs_1 = __importDefault(require("fs"));
9
+ const dotenv_1 = __importDefault(require("dotenv"));
10
+ dotenv_1.default.config();
11
+ const dbPath = process.env.DB_PATH || "./data/reports.db";
12
+ fs_1.default.mkdirSync(path_1.default.dirname(dbPath), { recursive: true });
13
+ const db = new better_sqlite3_1.default(dbPath);
14
+ db.exec(`
15
+ CREATE TABLE IF NOT EXISTS reports (
16
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
17
+ project TEXT NOT NULL,
18
+ score INTEGER NOT NULL,
19
+ grade TEXT NOT NULL,
20
+ analyzed_at TEXT NOT NULL,
21
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
22
+ payload TEXT NOT NULL
23
+ );
24
+ `);
25
+ exports.default = db;
package/package.json CHANGED
@@ -1,16 +1,13 @@
1
1
  {
2
2
  "name": "react-doctor-cli-dev",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "React performance analyzer with static analysis, runtime profiling, rule engine, and dashboard upload",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
-
8
7
  "bin": {
9
8
  "react-doctor": "./cli/bin/react-doctor.js"
10
9
  },
11
-
12
10
  "scripts": {},
13
-
14
11
  "keywords": [
15
12
  "react",
16
13
  "performance",
@@ -18,10 +15,8 @@
18
15
  "cli",
19
16
  "analyzer"
20
17
  ],
21
-
22
18
  "author": "Ozma",
23
19
  "license": "ISC",
24
-
25
20
  "dependencies": {
26
21
  "@babel/parser": "^7.29.0",
27
22
  "@babel/traverse": "^7.29.0",
@@ -42,7 +37,6 @@
42
37
  "typescript": "^5.0.0",
43
38
  "web-vitals": "^5.1.0"
44
39
  },
45
-
46
40
  "devDependencies": {
47
41
  "@types/babel__traverse": "^7.28.0",
48
42
  "@types/better-sqlite3": "^7.6.13",
@@ -52,4 +46,4 @@
52
46
  "@types/node": "^25.9.1",
53
47
  "nodemon": "^3.1.14"
54
48
  }
55
- }
49
+ }