0.0.11-alpha: allow cache loading from zip

Signed-off-by: T-Hax <>
This commit is contained in:
T-Hax 2023-05-13 19:30:21 +00:00
parent 30f6f2186a
commit d1d23f252a
46 changed files with 228 additions and 394 deletions

View file

@ -1,3 +1,3 @@
build
dist
node_modules
package-log.json

View file

@ -44,7 +44,7 @@ pids
typings/
node_modules
build
dist
sandbox
sand\ box
debug.log

View file

@ -1,3 +1,3 @@
build
dist
node_modules
package-log.json

View file

@ -13,13 +13,13 @@
"crypto",
"zk"
],
"version": "0.0.10-alpha",
"version": "0.0.11-alpha",
"engines": {
"node": "^18"
},
"main": "./build/index.js",
"main": "./dist/index.js",
"files": [
"build/**/*"
"dist/**/*"
],
"dependencies": {
"@ethersproject/abi": "^5.7.0",
@ -65,16 +65,10 @@
"typescript": "^5.0.4"
},
"scripts": {
"test": "npm run build && mocha --inspect --require source-map-support/register --bail ./build/test/",
"typechain": "typechain --target \"ethers-v5\" --discriminate-types --glob \"./src/resources/abis/*.json\" --out-dir=\"./src/types/deth\"",
"build": "rimraf build && tsc && tsc-alias",
"preversion": "npm run lint && npm run build && npm test",
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && npm run format && git add -A",
"postversion": "git push --follow-tags && npm publish",
"lint": "eslint --ext ts,js --fix src",
"build-live": "tsc -w && tsc-alias -w",
"clean": "rm -rf --interactive=never docs/*",
"format": "prettier src/**/*.ts -w"
"build": "rimraf dist && tsc",
"format": "prettier src/**/*.ts -w",
"build-live": "rimraf dist && tsc -w",
"lint": "eslint --ext ts,js --fix src"
},
"publishConfig": {
"access": "public"

View file

@ -701,9 +701,10 @@ export class Core extends Synchronizer {
release()
}
async exportAsArchive(cacheName: string, outDirPath?: string, debug?: boolean): Promise<void> {
async exportCacheZip(cacheName: string, outDirPath?: string, close?: boolean): Promise<void> {
const cache = this.loadCache<Cache.Base<Docs.Base>>(cacheName)
await cache.exportAsArchive(outDirPath, debug)
await cache.zip(outDirPath, close)
if (close) this.caches.delete(cacheName)
}
loadDepositCache(name: string, options?: Options.Sync): DepositCache {

View file

@ -16,7 +16,7 @@
"moduleResolution": "node",
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"preserveSymlinks": true,
"outDir": "./build",
"outDir": "./dist",
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,