@mogulmoretti/skrape 0.2.1 → 0.2.2

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/dist/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export {};
2
+ import './quiet.js';
package/dist/cli.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import './quiet.js';
2
3
  import { createRequire } from 'node:module';
3
4
  import { join, resolve } from 'node:path';
4
5
  import { styleText } from 'node:util';
@@ -0,0 +1 @@
1
+ export {};
package/dist/quiet.js ADDED
@@ -0,0 +1,9 @@
1
+ // Node 22 flags its built-in SQLite as experimental on first use. That notice means nothing to a
2
+ // skrape user and would print over the UI, so drop exactly that one warning. Imported first in cli.ts.
3
+ const emitWarning = process.emitWarning.bind(process);
4
+ process.emitWarning = ((warning, ...rest) => {
5
+ if (String(warning).includes('SQLite is an experimental feature'))
6
+ return;
7
+ emitWarning(warning, ...rest);
8
+ });
9
+ export {};
package/dist/store/db.js CHANGED
@@ -1,4 +1,5 @@
1
- import Database from 'better-sqlite3';
1
+ // Node's built-in SQLite: no native module to compile, so installs never depend on a C toolchain.
2
+ import { DatabaseSync } from 'node:sqlite';
2
3
  import { createHash } from 'node:crypto';
3
4
  import { dirname } from 'node:path';
4
5
  import { mkdirSync } from 'node:fs';
@@ -57,9 +58,9 @@ export function openDb(path) {
57
58
  mkdirSync(dir, { recursive: true });
58
59
  }
59
60
  }
60
- const db = new Database(path);
61
- db.pragma('journal_mode = WAL');
62
- db.pragma('foreign_keys = ON');
61
+ const db = new DatabaseSync(path);
62
+ db.exec('PRAGMA journal_mode = WAL');
63
+ db.exec('PRAGMA foreign_keys = ON');
63
64
  db.exec(SCHEMA);
64
65
  return {
65
66
  upsertCommunity(slug, name) {
package/dist/sync.js CHANGED
@@ -108,7 +108,7 @@ export async function syncClassroom(options) {
108
108
  // swallow — the caller's callback is not our concern
109
109
  }
110
110
  };
111
- // A better-sqlite3 error from any of the three store calls below (disk full, locked db, FK
111
+ // A SQLite error from any of the three store calls below (disk full, locked db, FK
112
112
  // violation) must become a per-lesson 'failed' outcome, not a run-ending rejection: a Promise.all
113
113
  // over the worker pool would reject on the first such error while sibling workers are still in
114
114
  // flight, and the CLI's finally-block browser.close() would then race a live worker into
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mogulmoretti/skrape",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Read Skool course content instead of watching it — pulls the classroom of a community you belong to into clean, readable transcripts.",
5
5
  "keywords": [
6
6
  "skool",
@@ -35,21 +35,19 @@
35
35
  "typecheck": "tsc --noEmit"
36
36
  },
37
37
  "engines": {
38
- "node": ">=22"
38
+ "node": ">=22.13"
39
39
  },
40
40
  "dependencies": {
41
- "better-sqlite3": "^11.5.0",
42
41
  "commander": "^12.1.0",
43
42
  "ink": "^7.1.1",
44
43
  "react": "^19.2.8",
45
44
  "zod": "^3.23.8"
46
45
  },
47
46
  "devDependencies": {
48
- "@types/better-sqlite3": "^7.6.11",
49
47
  "@types/node": "^22.9.0",
50
48
  "@types/react": "^19.2.18",
51
49
  "typescript": "^5.6.3",
52
- "vitest": "^2.1.4"
50
+ "vitest": "^3.2.7"
53
51
  },
54
52
  "optionalDependencies": {
55
53
  "playwright": "^1.48.2"