Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
12119192cf | |||
ed0f497ac9 | |||
7f7c4a28ee | |||
4ee78554a4 | |||
34b90b438c | |||
40dcedf585 | |||
d630bd90a4 | |||
56d9072996 | |||
ed1c977387 |
@ -5,7 +5,7 @@
|
|||||||
"githost": "code.foss.global",
|
"githost": "code.foss.global",
|
||||||
"gitscope": "push.rocks",
|
"gitscope": "push.rocks",
|
||||||
"gitrepo": "webstore",
|
"gitrepo": "webstore",
|
||||||
"description": "high performance storage in the browser using indexed db",
|
"description": "A high-performance storage solution for web applications using IndexedDB.",
|
||||||
"npmPackagename": "@push.rocks/webstore",
|
"npmPackagename": "@push.rocks/webstore",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "push.rocks",
|
"projectDomain": "push.rocks",
|
||||||
@ -19,7 +19,9 @@
|
|||||||
"data persistence",
|
"data persistence",
|
||||||
"storage solution",
|
"storage solution",
|
||||||
"typed requests",
|
"typed requests",
|
||||||
"performance optimization"
|
"performance optimization",
|
||||||
|
"API caching",
|
||||||
|
"efficient data management"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
25
package.json
25
package.json
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/webstore",
|
"name": "@push.rocks/webstore",
|
||||||
"version": "2.0.16",
|
"version": "2.0.20",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "high performance storage in the browser using indexed db",
|
"description": "A high-performance storage solution for web applications using IndexedDB.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"typings": "dist_ts/index.d.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@ -14,7 +14,7 @@
|
|||||||
"buildDocs": "tsdoc"
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^2.1.76",
|
"@git.zone/tsbuild": "^2.1.80",
|
||||||
"@git.zone/tsrun": "^1.2.46",
|
"@git.zone/tsrun": "^1.2.46",
|
||||||
"@git.zone/tstest": "^1.0.90",
|
"@git.zone/tstest": "^1.0.90",
|
||||||
"@push.rocks/smartntml": "^2.0.4",
|
"@push.rocks/smartntml": "^2.0.4",
|
||||||
@ -22,14 +22,14 @@
|
|||||||
"@types/node": "^20.12.12"
|
"@types/node": "^20.12.12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apiglobal/typedrequest-interfaces": "^2.0.1",
|
"@api.global/typedrequest-interfaces": "^3.0.19",
|
||||||
"@push.rocks/lik": "^6.0.15",
|
"@push.rocks/lik": "^6.0.15",
|
||||||
"@push.rocks/smartenv": "^5.0.12",
|
"@push.rocks/smartenv": "^5.0.12",
|
||||||
"@push.rocks/smartjson": "^5.0.19",
|
"@push.rocks/smartjson": "^5.0.19",
|
||||||
"@push.rocks/smartpromise": "^4.0.3",
|
"@push.rocks/smartpromise": "^4.0.3",
|
||||||
"@push.rocks/smartrx": "^3.0.7",
|
"@push.rocks/smartrx": "^3.0.7",
|
||||||
"fake-indexeddb": "^5.0.2",
|
"@tempfix/idb": "^8.0.3",
|
||||||
"@tempfix/idb": "^8.0.3"
|
"fake-indexeddb": "^5.0.2"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
@ -56,6 +56,13 @@
|
|||||||
"data persistence",
|
"data persistence",
|
||||||
"storage solution",
|
"storage solution",
|
||||||
"typed requests",
|
"typed requests",
|
||||||
"performance optimization"
|
"performance optimization",
|
||||||
]
|
"API caching",
|
||||||
}
|
"efficient data management"
|
||||||
|
],
|
||||||
|
"homepage": "https://code.foss.global/push.rocks/webstore",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://code.foss.global/push.rocks/webstore.git"
|
||||||
|
}
|
||||||
|
}
|
120
pnpm-lock.yaml
generated
120
pnpm-lock.yaml
generated
@ -8,9 +8,9 @@ importers:
|
|||||||
|
|
||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@apiglobal/typedrequest-interfaces':
|
'@api.global/typedrequest-interfaces':
|
||||||
specifier: ^2.0.1
|
specifier: ^3.0.19
|
||||||
version: 2.0.1
|
version: 3.0.19
|
||||||
'@push.rocks/lik':
|
'@push.rocks/lik':
|
||||||
specifier: ^6.0.15
|
specifier: ^6.0.15
|
||||||
version: 6.0.15
|
version: 6.0.15
|
||||||
@ -34,8 +34,8 @@ importers:
|
|||||||
version: 5.0.2
|
version: 5.0.2
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@git.zone/tsbuild':
|
'@git.zone/tsbuild':
|
||||||
specifier: ^2.1.76
|
specifier: ^2.1.80
|
||||||
version: 2.1.76
|
version: 2.1.80
|
||||||
'@git.zone/tsrun':
|
'@git.zone/tsrun':
|
||||||
specifier: ^1.2.46
|
specifier: ^1.2.46
|
||||||
version: 1.2.46(@types/node@20.12.12)
|
version: 1.2.46(@types/node@20.12.12)
|
||||||
@ -54,8 +54,8 @@ importers:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
|
|
||||||
'@api.global/typedrequest-interfaces@3.0.18':
|
'@api.global/typedrequest-interfaces@3.0.19':
|
||||||
resolution: {integrity: sha512-O/AdHnk9NDcBfb/Qcpi3Bq/7I6uAJHXfIT5peeKODvLUYysmuxG/c3t9NWQvfSOXQUKnVKb0WrCGjraOL7Pyww==}
|
resolution: {integrity: sha512-uuHUXJeOy/inWSDrwD0Cwax2rovpxYllDhM2RWh+6mVpQuNmZ3uw6IVg6dA2G1rOe24Ebs+Y9SzEogo+jYN7vw==}
|
||||||
|
|
||||||
'@api.global/typedrequest@3.0.21':
|
'@api.global/typedrequest@3.0.21':
|
||||||
resolution: {integrity: sha512-iZ0+EzdaeRI6ExlN32RLM8YENCWzVOj26qaSVT5w1o0HbKH/xOOLCohsK2VhwI0nKVnOK4A6AfZV4WwqueIrrw==}
|
resolution: {integrity: sha512-iZ0+EzdaeRI6ExlN32RLM8YENCWzVOj26qaSVT5w1o0HbKH/xOOLCohsK2VhwI0nKVnOK4A6AfZV4WwqueIrrw==}
|
||||||
@ -243,8 +243,8 @@ packages:
|
|||||||
'@esm-bundle/chai@4.3.4-fix.0':
|
'@esm-bundle/chai@4.3.4-fix.0':
|
||||||
resolution: {integrity: sha512-26SKdM4uvDWlY8/OOOxSB1AqQWeBosCX3wRYUZO7enTAj03CtVxIiCimYVG2WpULcyV51qapK4qTovwkUr5Mlw==}
|
resolution: {integrity: sha512-26SKdM4uvDWlY8/OOOxSB1AqQWeBosCX3wRYUZO7enTAj03CtVxIiCimYVG2WpULcyV51qapK4qTovwkUr5Mlw==}
|
||||||
|
|
||||||
'@git.zone/tsbuild@2.1.76':
|
'@git.zone/tsbuild@2.1.80':
|
||||||
resolution: {integrity: sha512-NmADGzasHm7p7lfCG/PGhfc2u7o/aWMhvlAIY7N/hNLD3ROkEjAzj78IUW8I0QANj13v/o11v18/IOGfSqVVRg==}
|
resolution: {integrity: sha512-jAChzcBFhzDKN32TzZv94l0/zegMoJnq9fvdiWV0lysRAHUjQttgwY0dFndGy3VUdlO27r0VgkNZOjiU1eB0Jg==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
'@git.zone/tsbundle@2.0.15':
|
'@git.zone/tsbundle@2.0.15':
|
||||||
@ -373,6 +373,9 @@ packages:
|
|||||||
'@push.rocks/smartfile@11.0.14':
|
'@push.rocks/smartfile@11.0.14':
|
||||||
resolution: {integrity: sha512-Y768CKzmSCHoi7di29FAHT5F4TGQqPIh5YdBNdEH0CJLkwQYsbJO98mXow3Ya7SLmL5guPhgOuSNfn7IKs5C/Q==}
|
resolution: {integrity: sha512-Y768CKzmSCHoi7di29FAHT5F4TGQqPIh5YdBNdEH0CJLkwQYsbJO98mXow3Ya7SLmL5guPhgOuSNfn7IKs5C/Q==}
|
||||||
|
|
||||||
|
'@push.rocks/smartfile@11.0.15':
|
||||||
|
resolution: {integrity: sha512-6qalAzdFTsWrx7hLBI9/a6RxpdMnRFJ8HMAGsQWeSUIIS8FxuvE357T9u89U0UM6pt0g1FUVZfks3MMd4uW8Fw==}
|
||||||
|
|
||||||
'@push.rocks/smarthash@3.0.4':
|
'@push.rocks/smarthash@3.0.4':
|
||||||
resolution: {integrity: sha512-HJ/fSx41jm0CvSaqMLa6b2nuNK5rHAqAeAq3dAB7Sq9BCPm2M0J5ZVDTzEAH8pS91XYniUiwuE0jwPERNn9hmw==}
|
resolution: {integrity: sha512-HJ/fSx41jm0CvSaqMLa6b2nuNK5rHAqAeAq3dAB7Sq9BCPm2M0J5ZVDTzEAH8pS91XYniUiwuE0jwPERNn9hmw==}
|
||||||
|
|
||||||
@ -391,6 +394,9 @@ packages:
|
|||||||
'@push.rocks/smartlog@3.0.3':
|
'@push.rocks/smartlog@3.0.3':
|
||||||
resolution: {integrity: sha512-E4UUSdbrf0TdSqI7LrUa3jgYQGKT6+ybSHuRcopFDt0W2/tBpY+/vPyAApJIa8iGFKJoi3oSTgYJbK90SwQwKg==}
|
resolution: {integrity: sha512-E4UUSdbrf0TdSqI7LrUa3jgYQGKT6+ybSHuRcopFDt0W2/tBpY+/vPyAApJIa8iGFKJoi3oSTgYJbK90SwQwKg==}
|
||||||
|
|
||||||
|
'@push.rocks/smartlog@3.0.6':
|
||||||
|
resolution: {integrity: sha512-HvZtgur6PY+n6skw5Jx+KWwHciCiWNm+WNLkqRreuLXJrWKknwYvy/Ea+f61RqJBHEkOYTYxRoddBuC+6HAoWw==}
|
||||||
|
|
||||||
'@push.rocks/smartmanifest@2.0.2':
|
'@push.rocks/smartmanifest@2.0.2':
|
||||||
resolution: {integrity: sha512-QGc5C9vunjfUbYsPGz5bynV/mVmPHkrQDkWp8ZO8VJtK1GZe+njgbrNyxn2SUHR0IhSAbSXl1j4JvBqYf5eTVg==}
|
resolution: {integrity: sha512-QGc5C9vunjfUbYsPGz5bynV/mVmPHkrQDkWp8ZO8VJtK1GZe+njgbrNyxn2SUHR0IhSAbSXl1j4JvBqYf5eTVg==}
|
||||||
|
|
||||||
@ -461,6 +467,9 @@ packages:
|
|||||||
'@push.rocks/smartstream@3.0.34':
|
'@push.rocks/smartstream@3.0.34':
|
||||||
resolution: {integrity: sha512-fiCcIlh3Ydduv7NAjmO5hrslZXzdJ3XQqC59WWnc3T3dqwedj7FoLjl1JfY8pWUJ0bwiikLLpKOTknJ1gSmKhA==}
|
resolution: {integrity: sha512-fiCcIlh3Ydduv7NAjmO5hrslZXzdJ3XQqC59WWnc3T3dqwedj7FoLjl1JfY8pWUJ0bwiikLLpKOTknJ1gSmKhA==}
|
||||||
|
|
||||||
|
'@push.rocks/smartstream@3.0.38':
|
||||||
|
resolution: {integrity: sha512-Sk9esPURWXldS0ZvgClCtrEyvELjvFnbQgUAelwoXWMfM8pXuB9BX1tE+Z1iBkB9Xyw2p1d9jYelO6waSXg0BQ==}
|
||||||
|
|
||||||
'@push.rocks/smartstring@4.0.15':
|
'@push.rocks/smartstring@4.0.15':
|
||||||
resolution: {integrity: sha512-NTNeOjWyg+aHtBTiQEyXamr7oTvYZ3wS1fudHo9ua7CLrykpK+i+RxFyJaLg1zB5x9xQF3NLEQecB14HPFX8Cg==}
|
resolution: {integrity: sha512-NTNeOjWyg+aHtBTiQEyXamr7oTvYZ3wS1fudHo9ua7CLrykpK+i+RxFyJaLg1zB5x9xQF3NLEQecB14HPFX8Cg==}
|
||||||
|
|
||||||
@ -1496,6 +1505,11 @@ packages:
|
|||||||
engines: {node: '>=16 || 14 >=14.17'}
|
engines: {node: '>=16 || 14 >=14.17'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
glob@10.4.1:
|
||||||
|
resolution: {integrity: sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==}
|
||||||
|
engines: {node: '>=16 || 14 >=14.18'}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
glob@7.2.3:
|
glob@7.2.3:
|
||||||
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
||||||
|
|
||||||
@ -1756,6 +1770,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
|
resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
|
|
||||||
|
jackspeak@3.1.2:
|
||||||
|
resolution: {integrity: sha512-kWmLKn2tRtfYMF/BakihVVRzBKOxz4gJMiL2Rj91WnAB5TPZumSH99R/Yf1qE1u4uRimvCSJfm6hnxohXeEXjQ==}
|
||||||
|
engines: {node: '>=14'}
|
||||||
|
|
||||||
js-base64@3.7.7:
|
js-base64@3.7.7:
|
||||||
resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==}
|
resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==}
|
||||||
|
|
||||||
@ -1891,6 +1909,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==}
|
resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==}
|
||||||
engines: {node: 14 || >=16.14}
|
engines: {node: 14 || >=16.14}
|
||||||
|
|
||||||
|
lru-cache@10.2.2:
|
||||||
|
resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==}
|
||||||
|
engines: {node: 14 || >=16.14}
|
||||||
|
|
||||||
lru-cache@6.0.0:
|
lru-cache@6.0.0:
|
||||||
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
|
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
@ -2115,6 +2137,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==}
|
resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==}
|
||||||
engines: {node: '>=16 || 14 >=14.17'}
|
engines: {node: '>=16 || 14 >=14.17'}
|
||||||
|
|
||||||
|
minipass@7.1.2:
|
||||||
|
resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
|
||||||
|
engines: {node: '>=16 || 14 >=14.17'}
|
||||||
|
|
||||||
mkdirp-classic@0.5.3:
|
mkdirp-classic@0.5.3:
|
||||||
resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}
|
resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}
|
||||||
|
|
||||||
@ -2284,6 +2310,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==}
|
resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==}
|
||||||
engines: {node: '>=16 || 14 >=14.17'}
|
engines: {node: '>=16 || 14 >=14.17'}
|
||||||
|
|
||||||
|
path-scurry@1.11.1:
|
||||||
|
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
|
||||||
|
engines: {node: '>=16 || 14 >=14.18'}
|
||||||
|
|
||||||
path-to-regexp@0.1.7:
|
path-to-regexp@0.1.7:
|
||||||
resolution: {integrity: sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=}
|
resolution: {integrity: sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=}
|
||||||
|
|
||||||
@ -2978,11 +3008,11 @@ packages:
|
|||||||
|
|
||||||
snapshots:
|
snapshots:
|
||||||
|
|
||||||
'@api.global/typedrequest-interfaces@3.0.18': {}
|
'@api.global/typedrequest-interfaces@3.0.19': {}
|
||||||
|
|
||||||
'@api.global/typedrequest@3.0.21':
|
'@api.global/typedrequest@3.0.21':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@api.global/typedrequest-interfaces': 3.0.18
|
'@api.global/typedrequest-interfaces': 3.0.19
|
||||||
'@push.rocks/isounique': 1.0.5
|
'@push.rocks/isounique': 1.0.5
|
||||||
'@push.rocks/lik': 6.0.15
|
'@push.rocks/lik': 6.0.15
|
||||||
'@push.rocks/smartbuffer': 3.0.2
|
'@push.rocks/smartbuffer': 3.0.2
|
||||||
@ -2994,7 +3024,7 @@ snapshots:
|
|||||||
'@api.global/typedserver@3.0.27':
|
'@api.global/typedserver@3.0.27':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@api.global/typedrequest': 3.0.21
|
'@api.global/typedrequest': 3.0.21
|
||||||
'@api.global/typedrequest-interfaces': 3.0.18
|
'@api.global/typedrequest-interfaces': 3.0.19
|
||||||
'@api.global/typedsocket': 3.0.0
|
'@api.global/typedsocket': 3.0.0
|
||||||
'@push.rocks/lik': 6.0.15
|
'@push.rocks/lik': 6.0.15
|
||||||
'@push.rocks/smartchok': 1.0.33
|
'@push.rocks/smartchok': 1.0.33
|
||||||
@ -3031,7 +3061,7 @@ snapshots:
|
|||||||
'@api.global/typedsocket@3.0.0':
|
'@api.global/typedsocket@3.0.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@api.global/typedrequest': 3.0.21
|
'@api.global/typedrequest': 3.0.21
|
||||||
'@api.global/typedrequest-interfaces': 3.0.18
|
'@api.global/typedrequest-interfaces': 3.0.19
|
||||||
'@push.rocks/isohash': 2.0.1
|
'@push.rocks/isohash': 2.0.1
|
||||||
'@push.rocks/smartjson': 5.0.19
|
'@push.rocks/smartjson': 5.0.19
|
||||||
'@push.rocks/smartrx': 3.0.7
|
'@push.rocks/smartrx': 3.0.7
|
||||||
@ -3072,7 +3102,7 @@ snapshots:
|
|||||||
'@design.estate/dees-comms@1.0.24':
|
'@design.estate/dees-comms@1.0.24':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@api.global/typedrequest': 3.0.21
|
'@api.global/typedrequest': 3.0.21
|
||||||
'@api.global/typedrequest-interfaces': 3.0.18
|
'@api.global/typedrequest-interfaces': 3.0.19
|
||||||
'@push.rocks/smartdelay': 3.0.5
|
'@push.rocks/smartdelay': 3.0.5
|
||||||
broadcast-channel: 3.7.0
|
broadcast-channel: 3.7.0
|
||||||
|
|
||||||
@ -3180,13 +3210,13 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@types/chai': 4.3.14
|
'@types/chai': 4.3.14
|
||||||
|
|
||||||
'@git.zone/tsbuild@2.1.76':
|
'@git.zone/tsbuild@2.1.80':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@push.rocks/early': 4.0.4
|
'@push.rocks/early': 4.0.4
|
||||||
'@push.rocks/smartcli': 4.0.10
|
'@push.rocks/smartcli': 4.0.10
|
||||||
'@push.rocks/smartdelay': 3.0.5
|
'@push.rocks/smartdelay': 3.0.5
|
||||||
'@push.rocks/smartfile': 11.0.14
|
'@push.rocks/smartfile': 11.0.15
|
||||||
'@push.rocks/smartlog': 3.0.3
|
'@push.rocks/smartlog': 3.0.6
|
||||||
'@push.rocks/smartpath': 5.0.18
|
'@push.rocks/smartpath': 5.0.18
|
||||||
'@push.rocks/smartpromise': 4.0.3
|
'@push.rocks/smartpromise': 4.0.3
|
||||||
typescript: 5.4.5
|
typescript: 5.4.5
|
||||||
@ -3465,6 +3495,25 @@ snapshots:
|
|||||||
glob: 10.3.12
|
glob: 10.3.12
|
||||||
js-yaml: 4.1.0
|
js-yaml: 4.1.0
|
||||||
|
|
||||||
|
'@push.rocks/smartfile@11.0.15':
|
||||||
|
dependencies:
|
||||||
|
'@push.rocks/lik': 6.0.15
|
||||||
|
'@push.rocks/smartdelay': 3.0.5
|
||||||
|
'@push.rocks/smartfile-interfaces': 1.0.7
|
||||||
|
'@push.rocks/smarthash': 3.0.4
|
||||||
|
'@push.rocks/smartjson': 5.0.19
|
||||||
|
'@push.rocks/smartmime': 1.0.6
|
||||||
|
'@push.rocks/smartpath': 5.0.18
|
||||||
|
'@push.rocks/smartpromise': 4.0.3
|
||||||
|
'@push.rocks/smartrequest': 2.0.22
|
||||||
|
'@push.rocks/smartstream': 3.0.38
|
||||||
|
'@types/fs-extra': 11.0.4
|
||||||
|
'@types/glob': 8.1.0
|
||||||
|
'@types/js-yaml': 4.0.9
|
||||||
|
fs-extra: 11.2.0
|
||||||
|
glob: 10.4.1
|
||||||
|
js-yaml: 4.1.0
|
||||||
|
|
||||||
'@push.rocks/smarthash@3.0.4':
|
'@push.rocks/smarthash@3.0.4':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@push.rocks/smartjson': 5.0.19
|
'@push.rocks/smartjson': 5.0.19
|
||||||
@ -3498,6 +3547,11 @@ snapshots:
|
|||||||
'@push.rocks/isounique': 1.0.5
|
'@push.rocks/isounique': 1.0.5
|
||||||
'@push.rocks/smartlog-interfaces': 3.0.0
|
'@push.rocks/smartlog-interfaces': 3.0.0
|
||||||
|
|
||||||
|
'@push.rocks/smartlog@3.0.6':
|
||||||
|
dependencies:
|
||||||
|
'@push.rocks/isounique': 1.0.5
|
||||||
|
'@push.rocks/smartlog-interfaces': 3.0.0
|
||||||
|
|
||||||
'@push.rocks/smartmanifest@2.0.2': {}
|
'@push.rocks/smartmanifest@2.0.2': {}
|
||||||
|
|
||||||
'@push.rocks/smartmarkdown@3.0.3':
|
'@push.rocks/smartmarkdown@3.0.3':
|
||||||
@ -3627,7 +3681,7 @@ snapshots:
|
|||||||
|
|
||||||
'@push.rocks/smartsocket@2.0.25':
|
'@push.rocks/smartsocket@2.0.25':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@api.global/typedrequest-interfaces': 3.0.18
|
'@api.global/typedrequest-interfaces': 3.0.19
|
||||||
'@api.global/typedserver': 3.0.27
|
'@api.global/typedserver': 3.0.27
|
||||||
'@push.rocks/isohash': 2.0.1
|
'@push.rocks/isohash': 2.0.1
|
||||||
'@push.rocks/isounique': 1.0.5
|
'@push.rocks/isounique': 1.0.5
|
||||||
@ -3680,6 +3734,13 @@ snapshots:
|
|||||||
'@push.rocks/smartpromise': 4.0.3
|
'@push.rocks/smartpromise': 4.0.3
|
||||||
'@push.rocks/smartrx': 3.0.7
|
'@push.rocks/smartrx': 3.0.7
|
||||||
|
|
||||||
|
'@push.rocks/smartstream@3.0.38':
|
||||||
|
dependencies:
|
||||||
|
'@push.rocks/lik': 6.0.15
|
||||||
|
'@push.rocks/smartpromise': 4.0.3
|
||||||
|
'@push.rocks/smartrx': 3.0.7
|
||||||
|
'@push.rocks/webstream': 1.0.8
|
||||||
|
|
||||||
'@push.rocks/smartstring@4.0.15':
|
'@push.rocks/smartstring@4.0.15':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@push.rocks/isounique': 1.0.5
|
'@push.rocks/isounique': 1.0.5
|
||||||
@ -4924,6 +4985,14 @@ snapshots:
|
|||||||
minipass: 7.0.4
|
minipass: 7.0.4
|
||||||
path-scurry: 1.10.2
|
path-scurry: 1.10.2
|
||||||
|
|
||||||
|
glob@10.4.1:
|
||||||
|
dependencies:
|
||||||
|
foreground-child: 3.1.1
|
||||||
|
jackspeak: 3.1.2
|
||||||
|
minimatch: 9.0.4
|
||||||
|
minipass: 7.1.2
|
||||||
|
path-scurry: 1.11.1
|
||||||
|
|
||||||
glob@7.2.3:
|
glob@7.2.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
fs.realpath: 1.0.0
|
fs.realpath: 1.0.0
|
||||||
@ -5237,6 +5306,12 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@pkgjs/parseargs': 0.11.0
|
'@pkgjs/parseargs': 0.11.0
|
||||||
|
|
||||||
|
jackspeak@3.1.2:
|
||||||
|
dependencies:
|
||||||
|
'@isaacs/cliui': 8.0.2
|
||||||
|
optionalDependencies:
|
||||||
|
'@pkgjs/parseargs': 0.11.0
|
||||||
|
|
||||||
js-base64@3.7.7: {}
|
js-base64@3.7.7: {}
|
||||||
|
|
||||||
js-sha3@0.8.0: {}
|
js-sha3@0.8.0: {}
|
||||||
@ -5416,6 +5491,8 @@ snapshots:
|
|||||||
|
|
||||||
lru-cache@10.2.0: {}
|
lru-cache@10.2.0: {}
|
||||||
|
|
||||||
|
lru-cache@10.2.2: {}
|
||||||
|
|
||||||
lru-cache@6.0.0:
|
lru-cache@6.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
yallist: 4.0.0
|
yallist: 4.0.0
|
||||||
@ -5811,6 +5888,8 @@ snapshots:
|
|||||||
|
|
||||||
minipass@7.0.4: {}
|
minipass@7.0.4: {}
|
||||||
|
|
||||||
|
minipass@7.1.2: {}
|
||||||
|
|
||||||
mkdirp-classic@0.5.3: {}
|
mkdirp-classic@0.5.3: {}
|
||||||
|
|
||||||
mkdirp@1.0.4: {}
|
mkdirp@1.0.4: {}
|
||||||
@ -5931,6 +6010,11 @@ snapshots:
|
|||||||
lru-cache: 10.2.0
|
lru-cache: 10.2.0
|
||||||
minipass: 7.0.4
|
minipass: 7.0.4
|
||||||
|
|
||||||
|
path-scurry@1.11.1:
|
||||||
|
dependencies:
|
||||||
|
lru-cache: 10.2.2
|
||||||
|
minipass: 7.1.2
|
||||||
|
|
||||||
path-to-regexp@0.1.7: {}
|
path-to-regexp@0.1.7: {}
|
||||||
|
|
||||||
path-to-regexp@6.2.2: {}
|
path-to-regexp@6.2.2: {}
|
||||||
|
106
readme.md
106
readme.md
@ -1,5 +1,5 @@
|
|||||||
# @push.rocks/webstore
|
# @push.rocks/webstore
|
||||||
high performance storage in the browser using indexed db
|
High performance storage in the browser using IndexedDB.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
To install `@push.rocks/webstore`, use the following npm command:
|
To install `@push.rocks/webstore`, use the following npm command:
|
||||||
@ -13,7 +13,7 @@ This will add it to your project's dependencies.
|
|||||||
## Usage
|
## Usage
|
||||||
The `@push.rocks/webstore` module provides a high-performance storage solution for web applications, leveraging IndexedDB. This guide demonstrates how to use `@push.rocks/webstore` to store, retrieve, check, and manage data in the browser efficiently.
|
The `@push.rocks/webstore` module provides a high-performance storage solution for web applications, leveraging IndexedDB. This guide demonstrates how to use `@push.rocks/webstore` to store, retrieve, check, and manage data in the browser efficiently.
|
||||||
|
|
||||||
### Setting Up
|
### Basic Setup
|
||||||
Before using `@push.rocks/webstore`, you must import and instantiate a `WebStore` class. Specify a database name (`dbName`) and a store name (`storeName`) in the options:
|
Before using `@push.rocks/webstore`, you must import and instantiate a `WebStore` class. Specify a database name (`dbName`) and a store name (`storeName`) in the options:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -27,8 +27,8 @@ const myStore = new WebStore<{
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
### Initializing the Store
|
### Initialization
|
||||||
To ensure the IndexedDB is set up correctly, call the `init` method before executing CRUD operations:
|
To ensure that IndexedDB is set up correctly, call the `init` method before executing any CRUD operations:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
await myStore.init();
|
await myStore.init();
|
||||||
@ -79,9 +79,31 @@ const allKeys = await myStore.keys();
|
|||||||
console.log(allKeys); // ['myKey', ...]
|
console.log(allKeys); // ['myKey', ...]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Typed Request Caching
|
### Error Handling
|
||||||
|
One of the strengths of `WebStore` is its built-in error handling using `smartpromise`. All the asynchronous operations (`init`, `get`, `set`, `delete`, `clear`, `keys`) inherently handle errors gracefully by catching them and allowing you to handle them with standard JavaScript try-catch or using `.catch` on the promises.
|
||||||
|
|
||||||
|
#### Error Handling Example
|
||||||
|
In TypeScript, you can write try-catch blocks to handle errors:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
try {
|
||||||
|
await myStore.set('myKey', { some: 'data' });
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error storing data:', error);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const myData = await myStore.get('myKey');
|
||||||
|
console.log(myData);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error retrieving data:', error);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Advanced Features: Typed Request Caching
|
||||||
`@push.rocks/webstore` also includes a feature for caching typed requests using the `TypedrequestCache` class. This is particularly useful for caching API requests and their responses.
|
`@push.rocks/webstore` also includes a feature for caching typed requests using the `TypedrequestCache` class. This is particularly useful for caching API requests and their responses.
|
||||||
|
|
||||||
|
#### Setting Up a Typed Request Cache
|
||||||
To set up a `TypedrequestCache`:
|
To set up a `TypedrequestCache`:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -90,6 +112,7 @@ import { TypedrequestCache } from '@push.rocks/webstore';
|
|||||||
const myCache = new TypedrequestCache('domainIdentifier');
|
const myCache = new TypedrequestCache('domainIdentifier');
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Storing a Request and Its Response
|
||||||
Store a request and its response:
|
Store a request and its response:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -100,6 +123,7 @@ await myCache.setByRequest({
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Retrieving a Cached Request
|
||||||
Retrieve a cached request by making a partial request:
|
Retrieve a cached request by making a partial request:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -110,7 +134,77 @@ const cachedResponse = await myCache.getByRequest({
|
|||||||
console.log(cachedResponse); // { data: 'response data' }
|
console.log(cachedResponse); // { data: 'response data' }
|
||||||
```
|
```
|
||||||
|
|
||||||
`@push.rocks/webstore` provides a comprehensive API to leverage browser storage efficiently while maintaining high performance.
|
### Comprehensive Usage Example
|
||||||
|
Here is a comprehensive example that covers initialization, data manipulation, and error handling:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { WebStore, TypedrequestCache } from '@push.rocks/webstore';
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const myStore = new WebStore<{
|
||||||
|
[key: string]: any;
|
||||||
|
}>({
|
||||||
|
dbName: 'myDatabase',
|
||||||
|
storeName: 'myStore',
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
await myStore.init();
|
||||||
|
|
||||||
|
// Set data
|
||||||
|
await myStore.set('myKey', { some: 'data' });
|
||||||
|
console.log('Data set successfully.');
|
||||||
|
|
||||||
|
// Get data
|
||||||
|
const myData = await myStore.get('myKey');
|
||||||
|
console.log('Retrieved data:', myData); // { some: 'data' }
|
||||||
|
|
||||||
|
// Check data existence
|
||||||
|
const exists = await myStore.check('myKey');
|
||||||
|
console.log('Key exists:', exists); // true
|
||||||
|
|
||||||
|
// Delete data
|
||||||
|
await myStore.delete('myKey');
|
||||||
|
console.log('Data deleted.');
|
||||||
|
|
||||||
|
// Clear store
|
||||||
|
await myStore.clear();
|
||||||
|
console.log('Store cleared.');
|
||||||
|
|
||||||
|
// Fetch all keys
|
||||||
|
const allKeys = await myStore.keys();
|
||||||
|
console.log('All keys:', allKeys); // []
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error during storage operations:', error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Typed Request Caching
|
||||||
|
const myCache = new TypedrequestCache('exampleDomain');
|
||||||
|
|
||||||
|
try {
|
||||||
|
await myCache.setByRequest({
|
||||||
|
method: 'GET',
|
||||||
|
request: 'https://example.com/api/data',
|
||||||
|
response: { data: 'response data' }
|
||||||
|
});
|
||||||
|
console.log('Typed request cached.');
|
||||||
|
|
||||||
|
const cachedResponse = await myCache.getByRequest({
|
||||||
|
method: 'GET',
|
||||||
|
request: 'https://example.com/api/data'
|
||||||
|
});
|
||||||
|
console.log('Cached response:', cachedResponse); // { data: 'response data' }
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error during typed request caching operations:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Conclusion
|
||||||
|
The `@push.rocks/webstore` package provides a flexible and efficient way to handle browser storage and caching. With features like error handling, typed request caching, and easy-to-use APIs, it can significantly improve performance and maintainability in web applications. For further exploration, feel free to explore the source code and tests provided in the repository.
|
||||||
|
|
||||||
## License and Legal Information
|
## License and Legal Information
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/webstore',
|
name: '@push.rocks/webstore',
|
||||||
version: '2.0.16',
|
version: '2.0.20',
|
||||||
description: 'high performance storage in the browser using indexed db'
|
description: 'A high-performance storage solution for web applications using IndexedDB.'
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import * as smartrx from '@push.rocks/smartrx';
|
|||||||
export { lik, smartenv, smartjson, smartpromise, smartrx };
|
export { lik, smartenv, smartjson, smartpromise, smartrx };
|
||||||
|
|
||||||
// apiglobal scope
|
// apiglobal scope
|
||||||
import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces';
|
import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
|
||||||
|
|
||||||
export { typedrequestInterfaces };
|
export { typedrequestInterfaces };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user