Comparing version 2017.3.16 to 2017.3.17
{ | ||
"author": "kai zhu <kaizhu256@gmail.com>", | ||
"description": "this zero-dependency package will provide a persistent, in-browser database", | ||
"author": { | ||
"name": "kai zhu", | ||
"email": "kaizhu256@gmail.com" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/kaizhu256/node-db-lite/issues" | ||
}, | ||
"dependencies": {}, | ||
"description": "this package is deprecated and superseded by [db-lite](https://www.npmjs.com/package/db-lite)", | ||
"devDependencies": { | ||
"electron-lite": "kaizhu256/node-electron-lite#alpha", | ||
"utility2": "kaizhu256/node-utility2#alpha" | ||
"electron-lite": "github:kaizhu256/node-electron-lite#alpha", | ||
"utility2": "github:kaizhu256/node-utility2#alpha" | ||
}, | ||
"directories": {}, | ||
"dist": { | ||
"shasum": "a43a9f2f3c0ca8c54892c8053737d23602689aa5", | ||
"tarball": "https://registry.npmjs.org/browserdb/-/browserdb-2017.3.16.tgz" | ||
}, | ||
"engines": { | ||
@@ -32,5 +44,12 @@ "node": ">=4.0" | ||
"main": "lib.db.js", | ||
"maintainers": [ | ||
{ | ||
"name": "kaizhu", | ||
"email": "kaizhu256@gmail.com" | ||
} | ||
], | ||
"name": "browserdb", | ||
"nameAlias": "db", | ||
"nameOriginal": "db-lite", | ||
"optionalDependencies": {}, | ||
"os": [ | ||
@@ -40,6 +59,7 @@ "darwin", | ||
], | ||
"readme": "ERROR: No README data found!", | ||
"readmeParse": "1", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/kaizhu256/node-db-lite.git" | ||
"url": "git+https://github.com/kaizhu256/node-db-lite.git" | ||
}, | ||
@@ -55,3 +75,3 @@ "scripts": { | ||
}, | ||
"version": "2017.3.16" | ||
"version": "2017.3.17" | ||
} |
636
README.md
@@ -1,635 +0,1 @@ | ||
# db-lite | ||
this zero-dependency package will provide a persistent, in-browser database | ||
[](https://travis-ci.org/kaizhu256/node-db-lite) [](https://kaizhu256.github.io/node-db-lite/build/coverage.html/index.html) | ||
[](https://www.npmjs.com/package/db-lite) | ||
[](https://github.com/kaizhu256/node-db-lite) | ||
# cdn download | ||
- [https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/app/assets.db.rollup.js](https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/app/assets.db.rollup.js) | ||
# live demo | ||
- [https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/app/index.html](https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/app/index.html) | ||
[](https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/app/index.html) | ||
# documentation | ||
#### apidoc | ||
- [https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/apidoc.html](https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/apidoc.html) | ||
[](https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/apidoc.html) | ||
#### todo | ||
- add remote http-api | ||
- rename to nedb-lite | ||
- none | ||
#### change since 44610aca | ||
- npm publish 2017.3.16 | ||
- remove build-function shBuildCiTestPre | ||
- rename name api-doc -> apidoc | ||
- none | ||
#### this package requires | ||
- darwin or linux os | ||
# build status [](https://travis-ci.org/kaizhu256/node-db-lite) | ||
[](https://travis-ci.org/kaizhu256/node-db-lite) | ||
| git-branch : | [master](https://github.com/kaizhu256/node-db-lite/tree/master) | [beta](https://github.com/kaizhu256/node-db-lite/tree/beta) | [alpha](https://github.com/kaizhu256/node-db-lite/tree/alpha)| | ||
|--:|:--|:--|:--| | ||
| test-server-github : | [](https://kaizhu256.github.io/node-db-lite/build..master..travis-ci.org/app/index.html) | [](https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/app/index.html) | [](https://kaizhu256.github.io/node-db-lite/build..alpha..travis-ci.org/app/index.html)| | ||
| test-server-heroku : | [](https://h1-db-master.herokuapp.com) | [](https://h1-db-beta.herokuapp.com) | [](https://h1-db-alpha.herokuapp.com)| | ||
| test-report : | [](https://kaizhu256.github.io/node-db-lite/build..master..travis-ci.org/test-report.html) | [](https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/test-report.html) | [](https://kaizhu256.github.io/node-db-lite/build..alpha..travis-ci.org/test-report.html)| | ||
| coverage : | [](https://kaizhu256.github.io/node-db-lite/build..master..travis-ci.org/coverage.html/index.html) | [](https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/coverage.html/index.html) | [](https://kaizhu256.github.io/node-db-lite/build..alpha..travis-ci.org/coverage.html/index.html)| | ||
| build-artifacts : | [](https://github.com/kaizhu256/node-db-lite/tree/gh-pages/build..master..travis-ci.org) | [](https://github.com/kaizhu256/node-db-lite/tree/gh-pages/build..beta..travis-ci.org) | [](https://github.com/kaizhu256/node-db-lite/tree/gh-pages/build..alpha..travis-ci.org)| | ||
#### master branch | ||
- stable branch | ||
- HEAD should be tagged, npm-published package | ||
#### beta branch | ||
- semi-stable branch | ||
- HEAD should be latest, npm-published package | ||
#### alpha branch | ||
- unstable branch | ||
- HEAD is arbitrary | ||
- commit history may be rewritten | ||
# quickstart web example | ||
 | ||
#### to run this example, follow the instruction in the script below | ||
- [example.js](https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/example.js) | ||
```javascript | ||
/* | ||
example.js | ||
this script will demo the browser-version of db-lite | ||
instruction | ||
1. save this script as example.js | ||
2. run the shell command: | ||
$ npm install db-lite && PORT=8081 node example.js | ||
3. play with the browser-demo on http://127.0.0.1:8081 | ||
*/ | ||
/* istanbul instrument in package db */ | ||
/*jslint | ||
bitwise: true, | ||
browser: true, | ||
maxerr: 8, | ||
maxlen: 96, | ||
node: true, | ||
nomen: true, | ||
regexp: true, | ||
stupid: true | ||
*/ | ||
(function () { | ||
'use strict'; | ||
var local; | ||
// run shared js-env code - pre-init | ||
(function () { | ||
// init local | ||
local = {}; | ||
// init modeJs | ||
local.modeJs = (function () { | ||
try { | ||
return typeof navigator.userAgent === 'string' && | ||
typeof document.querySelector('body') === 'object' && | ||
typeof XMLHttpRequest.prototype.open === 'function' && | ||
'browser'; | ||
} catch (errorCaughtBrowser) { | ||
return module.exports && | ||
typeof process.versions.node === 'string' && | ||
typeof require('http').createServer === 'function' && | ||
'node'; | ||
} | ||
}()); | ||
// init global | ||
local.global = local.modeJs === 'browser' | ||
? window | ||
: global; | ||
// init utility2_rollup | ||
local = local.global.utility2_rollup || (local.modeJs === 'browser' | ||
? local.global.utility2_db | ||
: require('db-lite')); | ||
// export local | ||
local.global.local = local; | ||
// load db | ||
local.db.dbLoad(function () { | ||
console.log('db loaded from ' + local.storageDir); | ||
}); | ||
// coverage-hack | ||
[null, local.global.utility2].forEach(function (element) { | ||
if (!element) { | ||
return; | ||
} | ||
element._testRunBefore = function () { | ||
local.onReadyBefore.counter += 1; | ||
local.db.dbDrop(local.onReadyBefore); | ||
}; | ||
}); | ||
}()); | ||
switch (local.modeJs) { | ||
// post-init | ||
// run browser js-env code - post-init | ||
/* istanbul ignore next */ | ||
case 'browser': | ||
local.testRunBrowser = function (event) { | ||
var reader, tmp; | ||
if (!event || (event && | ||
event.currentTarget && | ||
event.currentTarget.className && | ||
event.currentTarget.className.includes && | ||
event.currentTarget.className.includes('onreset'))) { | ||
// reset output | ||
Array.from( | ||
document.querySelectorAll('body > .resettable') | ||
).forEach(function (element) { | ||
switch (element.tagName) { | ||
case 'INPUT': | ||
case 'TEXTAREA': | ||
element.value = ''; | ||
break; | ||
default: | ||
element.textContent = ''; | ||
} | ||
}); | ||
} | ||
switch (event && event.currentTarget && event.currentTarget.id) { | ||
case 'testRunButton1': | ||
// show tests | ||
if (document.querySelector('#testReportDiv1').style.display === 'none') { | ||
document.querySelector('#testReportDiv1').style.display = 'block'; | ||
document.querySelector('#testRunButton1').textContent = | ||
'hide internal test'; | ||
local.modeTest = true; | ||
local.testRunDefault(local); | ||
// hide tests | ||
} else { | ||
document.querySelector('#testReportDiv1').style.display = 'none'; | ||
document.querySelector('#testRunButton1').textContent = 'run internal test'; | ||
} | ||
break; | ||
// custom-case | ||
case 'dbExportButton1': | ||
tmp = window.URL.createObjectURL(new window.Blob([local.db.dbExport()])); | ||
document.querySelector('#dbExportA1').href = tmp; | ||
document.querySelector('#dbExportA1').click(); | ||
setTimeout(function () { | ||
window.URL.revokeObjectURL(tmp); | ||
}, 30000); | ||
break; | ||
case 'dbImportButton1': | ||
document.querySelector('#dbImportInput1').click(); | ||
break; | ||
case 'dbImportInput1': | ||
console.log('importing db-lite database ...'); | ||
reader = new window.FileReader(); | ||
tmp = document.querySelector('#dbImportInput1').files[0]; | ||
if (!tmp) { | ||
return; | ||
} | ||
reader.addEventListener('load', function () { | ||
local.db.dbImport(reader.result); | ||
console.log('... imported db-lite database'); | ||
}); | ||
reader.readAsText(tmp); | ||
break; | ||
case 'dbResetButton1': | ||
console.log('resetting db-lite database ...'); | ||
local.db.dbDrop(function () { | ||
console.log('... resetted db-lite database'); | ||
}); | ||
break; | ||
} | ||
if (document.querySelector('#inputTextareaEval1') && (!event || (event && | ||
event.currentTarget && | ||
event.currentTarget.className && | ||
event.currentTarget.className.includes && | ||
event.currentTarget.className.includes('oneval')))) { | ||
// try to eval input-code | ||
try { | ||
/*jslint evil: true*/ | ||
eval(document.querySelector('#inputTextareaEval1').value); | ||
} catch (errorCaught) { | ||
console.error(errorCaught.stack); | ||
} | ||
} | ||
}; | ||
// log stderr and stdout to #outputTextareaStdout1 | ||
['error', 'log'].forEach(function (key) { | ||
console[key + '_original'] = console[key]; | ||
console[key] = function () { | ||
var element; | ||
console[key + '_original'].apply(console, arguments); | ||
element = document.querySelector('#outputTextareaStdout1'); | ||
if (!element) { | ||
return; | ||
} | ||
// append text to #outputTextareaStdout1 | ||
element.value += Array.from(arguments).map(function (arg) { | ||
return typeof arg === 'string' | ||
? arg | ||
: JSON.stringify(arg, null, 4); | ||
}).join(' ') + '\n'; | ||
// scroll textarea to bottom | ||
element.scrollTop = element.scrollHeight; | ||
}; | ||
}); | ||
// init event-handling | ||
['change', 'click', 'keyup'].forEach(function (event) { | ||
Array.from(document.querySelectorAll('.on' + event)).forEach(function (element) { | ||
element.addEventListener(event, local.testRunBrowser); | ||
}); | ||
}); | ||
// run tests | ||
local.testRunBrowser(); | ||
break; | ||
// run node js-env code - post-init | ||
/* istanbul ignore next */ | ||
case 'node': | ||
// export local | ||
module.exports = local; | ||
// require modules | ||
local.fs = require('fs'); | ||
local.http = require('http'); | ||
local.url = require('url'); | ||
// init assets | ||
local.assetsDict = local.assetsDict || {}; | ||
/* jslint-ignore-begin */ | ||
local.assetsDict['/assets.index.template.html'] = '\ | ||
<!doctype html>\n\ | ||
<html lang="en">\n\ | ||
<head>\n\ | ||
<meta charset="UTF-8">\n\ | ||
<meta name="viewport" content="width=device-width, initial-scale=1">\n\ | ||
<title>{{env.npm_package_name}} (v{{env.npm_package_version}})</title>\n\ | ||
<style>\n\ | ||
/*csslint\n\ | ||
box-sizing: false,\n\ | ||
universal-selector: false\n\ | ||
*/\n\ | ||
* {\n\ | ||
box-sizing: border-box;\n\ | ||
}\n\ | ||
body {\n\ | ||
background: #dde;\n\ | ||
font-family: Arial, Helvetica, sans-serif;\n\ | ||
margin: 2rem;\n\ | ||
}\n\ | ||
body > * {\n\ | ||
margin-bottom: 1rem;\n\ | ||
}\n\ | ||
.utility2FooterDiv {\n\ | ||
margin-top: 20px;\n\ | ||
text-align: center;\n\ | ||
}\n\ | ||
</style>\n\ | ||
<style>\n\ | ||
/*csslint\n\ | ||
adjoining-classes: false,\n\ | ||
box-model: false,\n\ | ||
box-sizing: false,\n\ | ||
universal-selector: false\n\ | ||
*/\n\ | ||
body > button {\n\ | ||
width: 15rem;\n\ | ||
}\n\ | ||
textarea {\n\ | ||
font-family: monospace;\n\ | ||
height: 10rem;\n\ | ||
width: 100%;\n\ | ||
}\n\ | ||
textarea[readonly] {\n\ | ||
background: #ddd;\n\ | ||
}\n\ | ||
.zeroPixel {\n\ | ||
border: 0;\n\ | ||
height: 0;\n\ | ||
margin: 0;\n\ | ||
padding: 0;\n\ | ||
width: 0;\n\ | ||
}\n\ | ||
</style>\n\ | ||
</head>\n\ | ||
<body>\n\ | ||
<!-- utility2-comment\n\ | ||
<div id="ajaxProgressDiv1" style="background: #d00; height: 2px; left: 0; margin: 0; padding: 0; position: fixed; top: 0; transition: background 0.5s, width 1.5s; width: 25%;"></div>\n\ | ||
utility2-comment -->\n\ | ||
<h1>\n\ | ||
<!-- utility2-comment\n\ | ||
<a\n\ | ||
{{#if env.npm_package_homepage}}\n\ | ||
href="{{env.npm_package_homepage}}"\n\ | ||
{{/if env.npm_package_homepage}}\n\ | ||
target="_blank"\n\ | ||
>\n\ | ||
utility2-comment -->\n\ | ||
{{env.npm_package_name}} (v{{env.npm_package_version}})\n\ | ||
<!-- utility2-comment\n\ | ||
</a>\n\ | ||
utility2-comment -->\n\ | ||
</h1>\n\ | ||
<h3>{{env.npm_package_description}}</h3>\n\ | ||
<!-- utility2-comment\n\ | ||
<h4><a download href="assets.app.js">download standalone app</a></h4>\n\ | ||
<button class="onclick onreset" id="testRunButton1">run internal test</button><br>\n\ | ||
<div id="testReportDiv1" style="display: none;"></div>\n\ | ||
utility2-comment -->\n\ | ||
\n\ | ||
\n\ | ||
\n\ | ||
<button class="onclick onreset" id="dbResetButton1">reset database</button><br>\n\ | ||
<button class="onclick" id="dbExportButton1">export database -> file</button><br>\n\ | ||
<a download="db.persistence.json" href="" id="dbExportA1"></a>\n\ | ||
<button class="onclick" id="dbImportButton1">import database <- file</button><br>\n\ | ||
<input class="onchange onreset zeroPixel" type="file" id="dbImportInput1">\n\ | ||
<label>edit or paste script below to\n\ | ||
<a\n\ | ||
href="https://kaizhu256.github.io/node-db-lite/build..beta..travis-ci.org/apidoc.html"\n\ | ||
target="_blank"\n\ | ||
>eval</a>\n\ | ||
</label>\n\ | ||
<textarea id="inputTextareaEval1">\n\ | ||
/*jslint browser: true, node: true*/\n\ | ||
"use strict";\n\ | ||
var dbTable1, modeNext, onNext;\n\ | ||
modeNext = 0;\n\ | ||
onNext = function (error, data) {\n\ | ||
modeNext = error\n\ | ||
? Infinity\n\ | ||
: modeNext + 1;\n\ | ||
switch (modeNext) {\n\ | ||
case 1:\n\ | ||
dbTable1 = window.dbTable1 = window.utility2_db.dbTableCreateOne({\n\ | ||
name: "dbTable1"\n\ | ||
}, onNext);\n\ | ||
break;\n\ | ||
case 2:\n\ | ||
dbTable1.idIndexCreate({ name: "field1" }, onNext);\n\ | ||
break;\n\ | ||
case 3:\n\ | ||
dbTable1.crudSetOneById({ field1: "aa", field2: 1, field3: "foo" }, onNext);\n\ | ||
break;\n\ | ||
case 4:\n\ | ||
dbTable1.crudSetOneById({ field1: "bb", field2: 2, field3: "bar" }, onNext);\n\ | ||
break;\n\ | ||
case 5:\n\ | ||
dbTable1.crudSetOneById({ field1: "cc", field2: 3, field3: "baz" }, onNext);\n\ | ||
break;\n\ | ||
case 6:\n\ | ||
dbTable1.crudRemoveOneById({ field1: "aa" }, onNext);\n\ | ||
break;\n\ | ||
case 7:\n\ | ||
dbTable1.crudUpdateOneById({ field1: "bb", field2: -1 }, onNext);\n\ | ||
break;\n\ | ||
case 8:\n\ | ||
dbTable1.crudSetOneById({ field2: Math.random() }, onNext);\n\ | ||
break;\n\ | ||
case 9:\n\ | ||
dbTable1.crudGetManyByQuery({\n\ | ||
limit: Infinity,\n\ | ||
query: { field2: { $gte: -Infinity, $lte: Infinity } },\n\ | ||
skip: 0,\n\ | ||
sort: [{ fieldName: "_timeUpdated", idDescending: true }]\n\ | ||
}, onNext);\n\ | ||
break;\n\ | ||
case 10:\n\ | ||
console.log(data);\n\ | ||
dbTable1.crudCountAll(onNext);\n\ | ||
break;\n\ | ||
case 11:\n\ | ||
console.log("number of rows: " + data);\n\ | ||
break;\n\ | ||
default:\n\ | ||
console.error(error.stack);\n\ | ||
}\n\ | ||
};\n\ | ||
onNext();\n\ | ||
</textarea>\n\ | ||
<button class="onclick oneval onreset" id="dbEvalButton1">eval script</button><br>\n\ | ||
<label>stderr and stdout</label>\n\ | ||
<textarea class="resettable" id="outputTextareaStdout1" readonly></textarea>\n\ | ||
<!-- utility2-comment\n\ | ||
{{#if isRollup}}\n\ | ||
<script src="assets.app.js"></script>\n\ | ||
{{#unless isRollup}}\n\ | ||
utility2-comment -->\n\ | ||
<script src="assets.utility2.rollup.js"></script>\n\ | ||
<script src="jsonp.utility2._stateInit?callback=window.utility2._stateInit"></script>\n\ | ||
<script src="assets.{{env.npm_package_nameAlias}}.rollup.js"></script>\n\ | ||
<script src="assets.example.js"></script>\n\ | ||
<script src="assets.test.js"></script>\n\ | ||
<!-- utility2-comment\n\ | ||
{{/if isRollup}}\n\ | ||
utility2-comment -->\n\ | ||
<div class="utility2FooterDiv">\n\ | ||
[ this app was created with\n\ | ||
<a href="https://github.com/kaizhu256/node-utility2" target="_blank">utility2</a>\n\ | ||
]\n\ | ||
</div>\n\ | ||
</body>\n\ | ||
</html>\n\ | ||
'; | ||
/* jslint-ignore-end */ | ||
if (local.templateRender) { | ||
local.assetsDict['/'] = local.templateRender( | ||
local.assetsDict['/assets.index.template.html'], | ||
{ | ||
env: local.objectSetDefault(local.env, { | ||
npm_package_description: 'example module', | ||
npm_package_name: 'example', | ||
npm_package_nameAlias: 'example', | ||
npm_package_version: '0.0.1' | ||
}) | ||
} | ||
); | ||
} else { | ||
local.assetsDict['/'] = local.assetsDict['/assets.index.template.html'] | ||
.replace((/\{\{env\.(\w+?)\}\}/g), function (match0, match1) { | ||
// jslint-hack | ||
String(match0); | ||
switch (match1) { | ||
case 'npm_package_description': | ||
return 'example module'; | ||
case 'npm_package_name': | ||
return 'example'; | ||
case 'npm_package_nameAlias': | ||
return 'example'; | ||
case 'npm_package_version': | ||
return '0.0.1'; | ||
} | ||
}); | ||
} | ||
// run the cli | ||
if (local.global.utility2_rollup || module !== require.main) { | ||
break; | ||
} | ||
local.assetsDict['/assets.example.js'] = local.assetsDict['/assets.example.js'] || | ||
local.fs.readFileSync(__filename, 'utf8'); | ||
local.assetsDict['/assets.db.rollup.js'] = | ||
local.assetsDict['/assets.db.rollup.js'] || local.fs.readFileSync( | ||
local.db.__dirname + '/lib.db.js', | ||
'utf8' | ||
).replace((/^#!/), '//'); | ||
local.assetsDict['/favicon.ico'] = local.assetsDict['/favicon.ico'] || ''; | ||
// if $npm_config_timeout_exit exists, | ||
// then exit this process after $npm_config_timeout_exit ms | ||
if (Number(process.env.npm_config_timeout_exit)) { | ||
setTimeout(process.exit, Number(process.env.npm_config_timeout_exit)); | ||
} | ||
// start server | ||
if (local.global.utility2_serverHttp1) { | ||
break; | ||
} | ||
process.env.PORT = process.env.PORT || '8081'; | ||
console.log('server starting on port ' + process.env.PORT); | ||
local.http.createServer(function (request, response) { | ||
request.urlParsed = local.url.parse(request.url); | ||
if (local.assetsDict[request.urlParsed.pathname] !== undefined) { | ||
response.end(local.assetsDict[request.urlParsed.pathname]); | ||
return; | ||
} | ||
response.statusCode = 404; | ||
response.end(); | ||
}).listen(process.env.PORT); | ||
break; | ||
} | ||
}()); | ||
``` | ||
#### output from browser | ||
 | ||
#### output from shell | ||
 | ||
# package.json | ||
```json | ||
{ | ||
"author": "kai zhu <kaizhu256@gmail.com>", | ||
"description": "this zero-dependency package will provide a persistent, in-browser database", | ||
"devDependencies": { | ||
"electron-lite": "kaizhu256/node-electron-lite#alpha", | ||
"utility2": "kaizhu256/node-utility2#alpha" | ||
}, | ||
"engines": { | ||
"node": ">=4.0" | ||
}, | ||
"homepage": "https://github.com/kaizhu256/node-db-lite", | ||
"keywords": [ | ||
"browser", | ||
"db", | ||
"indexeddb", | ||
"localstorage", | ||
"mongo", | ||
"mongodb", | ||
"nedb", | ||
"no-sql", | ||
"nosql", | ||
"persist", | ||
"persistence", | ||
"persistent", | ||
"ttl", | ||
"ttl-cache", | ||
"web-sql", | ||
"websql" | ||
], | ||
"license": "MIT", | ||
"main": "lib.db.js", | ||
"name": "db-lite", | ||
"nameAlias": "db", | ||
"nameOriginal": "db-lite", | ||
"os": [ | ||
"darwin", | ||
"linux" | ||
], | ||
"readmeParse": "1", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/kaizhu256/node-db-lite.git" | ||
}, | ||
"scripts": { | ||
"build-ci": "utility2 shReadmeTest build_ci.sh", | ||
"env": "env", | ||
"heroku-postbuild": "(set -e; npm install 'kaizhu256/node-utility2#alpha'; utility2 shDeployHeroku)", | ||
"postinstall": "if [ -f lib.db-lite.npm_scripts.sh ]; then ./lib.db-lite.npm_scripts.sh postinstall; fi", | ||
"publish-alias": "VERSION=$(npm info $npm_package_name version); for ALIAS in browser-db browserdb cachedb db_lite microdb nanodb netdb swaggerdb swggdb udb; do utility2 shNpmPublishAs . $ALIAS $VERSION; eval utility2 shNpmTestPublished $ALIAS || exit $?; done", | ||
"start": "(set -e; export PORT=${PORT:-8080}; utility2 start test.js)", | ||
"test": "(set -e; export PORT=$(utility2 shServerPortRandom); utility2 test test.js)" | ||
}, | ||
"version": "2017.3.16" | ||
} | ||
``` | ||
# changelog of last 50 commits | ||
[](https://github.com/kaizhu256/node-db-lite/commits) | ||
# internal build-script | ||
- build_ci.sh | ||
```shell | ||
# build_ci.sh | ||
# this shell script will run the build for this package | ||
shBuildCiInternalPost() {(set -e | ||
shDeployGithub | ||
shDeployHeroku | ||
shReadmeBuildLinkVerify | ||
)} | ||
shBuildCiInternalPre() {(set -e | ||
shReadmeTest example.js | ||
shReadmeTest example.sh | ||
shNpmTestPublished | ||
)} | ||
shBuildCiPost() {(set -e | ||
return | ||
)} | ||
shBuildCiPre() {(set -e | ||
return | ||
)} | ||
# run shBuildCi | ||
eval $(utility2 source) | ||
shBuildCi | ||
``` | ||
# misc | ||
- this package was created with [utility2](https://github.com/kaizhu256/node-utility2) | ||
this package is deprecated and superseded by [db-lite](https://www.npmjs.com/package/db-lite) |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
1
168644
2
8