feat(laws,opendata): add local law storage and migrate OpenData persistence to smartdb-backed local storage
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
// node native scope
|
||||
import * as fs from 'node:fs/promises';
|
||||
import * as path from 'node:path';
|
||||
|
||||
export {
|
||||
fs,
|
||||
path,
|
||||
}
|
||||
|
||||
@@ -14,23 +16,40 @@ import * as smartbrowser from '@push.rocks/smartbrowser';
|
||||
import * as smartdata from '@push.rocks/smartdata';
|
||||
import * as smartdelay from '@push.rocks/smartdelay';
|
||||
import * as smartfile from '@push.rocks/smartfile';
|
||||
import { SmartFs, SmartFsProviderNode } from '@push.rocks/smartfs';
|
||||
import * as smartlog from '@push.rocks/smartlog';
|
||||
import * as smartpath from '@push.rocks/smartpath';
|
||||
import * as smartpromise from '@push.rocks/smartpromise';
|
||||
import * as smartrequest from '@push.rocks/smartrequest';
|
||||
import * as smartdb from '@push.rocks/smartdb';
|
||||
import * as smartstream from '@push.rocks/smartstream';
|
||||
import * as smartunique from '@push.rocks/smartunique';
|
||||
import * as smartxml from '@push.rocks/smartxml';
|
||||
|
||||
const smartfs = new SmartFs(new SmartFsProviderNode());
|
||||
const smartfileFactory = new smartfile.SmartFileFactory(smartfs);
|
||||
|
||||
const getErrorMessage = (error: unknown) => {
|
||||
if (error instanceof Error) {
|
||||
return error.message;
|
||||
}
|
||||
|
||||
return String(error);
|
||||
};
|
||||
|
||||
export {
|
||||
getErrorMessage,
|
||||
lik,
|
||||
qenv,
|
||||
smartarchive,
|
||||
smartarray,
|
||||
smartbrowser,
|
||||
smartdb,
|
||||
smartdata,
|
||||
smartdelay,
|
||||
smartfile,
|
||||
smartfileFactory,
|
||||
smartfs,
|
||||
smartlog,
|
||||
smartpath,
|
||||
smartpromise,
|
||||
|
||||
Reference in New Issue
Block a user