bexxcv 1.0.0 → 1.0.3
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.
|
Binary file
|
package/dist/webgl/sample.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
1
2
|
import path from "node:path";
|
|
2
3
|
import { fileURLToPath } from "node:url";
|
|
3
4
|
import { OS_ARCH_MATRIX } from "../pkgman.js";
|
|
4
5
|
let DatabaseConstructor = null;
|
|
5
6
|
async function openDatabase(pathName) {
|
|
7
|
+
if (!fs.existsSync(pathName) || fs.statSync(pathName).size === 0) {
|
|
8
|
+
throw new Error(`WebGL database not found or empty at ${pathName}. Place a valid webgl_data.db in src/data-files and rebuild.`);
|
|
9
|
+
}
|
|
6
10
|
if (!DatabaseConstructor) {
|
|
7
11
|
if (typeof Bun !== "undefined") {
|
|
8
12
|
const { Database: BunDatabase } = await import("bun:sqlite");
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bexxcv",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "rimraf dist && tsc && pnpm copy-files",
|
|
8
8
|
"test": "vitest",
|
|
9
|
-
"copy-files": "cp -r src/data-files dist/data-files",
|
|
9
|
+
"copy-files": "mkdir -p dist/data-files && cp -r src/data-files/. dist/data-files/",
|
|
10
|
+
"prepack": "pnpm build && node scripts/verify-package.mjs",
|
|
10
11
|
"check": "biome check",
|
|
11
12
|
"fetch": "node dist/__main__.js fetch"
|
|
12
13
|
},
|