- 参数化查询 db.query(sql, params):词法层 ? 绑定 + SQL 字面量安全编码 ('' 转义/注入防护);参数计数不匹配 PARAM_ERROR;对象参数显式拒绝 - KVStoreEngine 事务增量 flush:行级变更追踪,commit 仅写改动行 (1000 行表改 1 行:日志 1 条目 vs 整表 1000 条目);级联影响表漏写修复 (txFullTables 同步加入 txDirtyTables);移除每次 commit 全量 checkpoint (阈值自动 checkpoint + close 统一截断) - 复合主键显式拒绝:createSchema 校验期 SCHEMA_ERROR + ALTER ADD 主键列防护 (此前静默取第一个主键,其余标记失效) - EXPLAIN usingIndex 真实命中信息:pk / index:col / none 测试 1126 → 1147(72 套件);行覆盖率 89.8%;版本 0.7.0
99 lines
2.7 KiB
JSON
99 lines
2.7 KiB
JSON
{
|
|
"name": "@metona-team/metona-sqlark",
|
|
"version": "0.7.0",
|
|
"description": "Frontend SQL database with in-memory and disk dual-mode storage",
|
|
"type": "module",
|
|
"main": "dist/metona-sqlark.cjs",
|
|
"module": "dist/metona-sqlark.esm.js",
|
|
"unpkg": "dist/metona-sqlark.min.js",
|
|
"jsdelivr": "dist/metona-sqlark.min.js",
|
|
"types": "dist/metona-sqlark.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"import": "./dist/metona-sqlark.esm.js",
|
|
"require": "./dist/metona-sqlark.cjs",
|
|
"types": "./dist/metona-sqlark.d.ts"
|
|
},
|
|
"./react": {
|
|
"import": "./src/integrations/react.ts",
|
|
"types": "./dist/metona-sqlark.d.ts"
|
|
},
|
|
"./vue": {
|
|
"import": "./src/integrations/vue.ts",
|
|
"types": "./dist/metona-sqlark.d.ts"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist/",
|
|
"src/",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"build": "rollup -c",
|
|
"dev": "rollup -c -w",
|
|
"test": "jest",
|
|
"test:coverage": "jest --coverage",
|
|
"test:watch": "jest --watch",
|
|
"test:e2e": "playwright test",
|
|
"lint": "eslint \"src/**/*.ts\"",
|
|
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
"typecheck": "tsc --noEmit",
|
|
"prepublishOnly": "npm run typecheck && npm test && npm run build"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://git.metona.cn/MetonaTeam/MetonaSqlark.git"
|
|
},
|
|
"keywords": [
|
|
"database",
|
|
"sql",
|
|
"frontend",
|
|
"indexeddb",
|
|
"opfs",
|
|
"memory",
|
|
"browser",
|
|
"typescript"
|
|
],
|
|
"author": "thzxx",
|
|
"license": "MIT",
|
|
"bugs": {
|
|
"url": "https://git.metona.cn/MetonaTeam/MetonaSqlark/issues"
|
|
},
|
|
"homepage": "https://git.metona.cn/MetonaTeam/MetonaSqlark#readme",
|
|
"devDependencies": {
|
|
"@babel/core": "^7.22.0",
|
|
"@babel/plugin-transform-modules-commonjs": "^7.22.0",
|
|
"@babel/preset-env": "^7.22.0",
|
|
"@babel/preset-typescript": "^7.22.0",
|
|
"@playwright/test": "^1.62.1",
|
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
"@rollup/plugin-terser": "^0.4.0",
|
|
"@rollup/plugin-typescript": "^11.1.0",
|
|
"@types/jest": "^29.5.0",
|
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
"@typescript-eslint/parser": "^8.0.0",
|
|
"babel-jest": "^29.5.0",
|
|
"eslint": "^8.40.0",
|
|
"fake-indexeddb": "^6.2.5",
|
|
"jest": "^29.5.0",
|
|
"jest-environment-jsdom": "^29.5.0",
|
|
"playwright": "^1.62.1",
|
|
"prettier": "^2.8.0",
|
|
"rollup": "^3.20.0",
|
|
"rollup-plugin-dts": "^5.3.0",
|
|
"rollup-plugin-livereload": "^2.0.5",
|
|
"rollup-plugin-serve": "^2.0.1",
|
|
"tslib": "^2.6.0",
|
|
"typescript": "^5.0.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=16.0.0"
|
|
},
|
|
"publishConfig": {
|
|
"registry": "https://git.metona.cn/api/packages/MetonaTeam/npm/"
|
|
}
|
|
}
|