@naturalcycles/db-lib
Advanced tools
Comparing version 8.34.2 to 8.35.0
@@ -10,3 +10,2 @@ import { InMemoryDB, InMemoryDBCfg } from './adapter/inmemory/inMemory.db'; | ||
import { CommonDBAdapter, CommonDBCreateOptions, CommonDBOptions, CommonDBSaveOptions, CommonDBStreamOptions, DBDeleteByIdsOperation, DBModelType, DBOperation, DBRelation, DBSaveBatchOperation, RunQueryResult } from './db.model'; | ||
import { getDB } from './getDB'; | ||
import { CommonKeyValueDao, CommonKeyValueDaoCfg } from './kv/commonKeyValueDao'; | ||
@@ -23,2 +22,2 @@ import { CommonKeyValueDB, KeyValueDBTuple } from './kv/commonKeyValueDB'; | ||
export type { DBQueryFilterOperator, DBQueryFilter, DBQueryOrder, CommonDaoCreateOptions, CommonDaoOptions, CommonDaoSaveOptions, CommonDaoStreamForEachOptions, CommonDaoStreamOptions, CommonDBOptions, CommonDBSaveOptions, CommonDBStreamOptions, CommonDBCreateOptions, CommonDB, RunQueryResult, CommonDaoCfg, CommonDaoCreateIdHook, CommonDaoParseNaturalIdHook, CommonDaoBeforeCreateHook, CommonDaoBeforeDBMValidateHook, CommonDaoBeforeDBMToBMHook, CommonDaoBeforeBMToDBMHook, CommonDaoBeforeTMToBMHook, CommonDaoBeforeBMToTMHook, CommonDaoAnonymizeHook, InMemoryDBCfg, InMemoryKeyValueDBCfg, DBPipelineBackupOptions, DBPipelineRestoreOptions, DBPipelineCopyOptions, CommonDBAdapter, DBOperation, DBSaveBatchOperation, DBDeleteByIdsOperation, CommonKeyValueDB, CommonKeyValueDaoCfg, KeyValueDBTuple, }; | ||
export { DBQuery, dbQueryFilterOperatorValues, RunnableDBQuery, CommonDaoLogLevel, DBRelation, DBModelType, CommonDao, createdUpdatedFields, createdUpdatedIdFields, InMemoryDB, InMemoryKeyValueDB, queryInMemory, serializeJsonField, deserializeJsonField, dbPipelineBackup, dbPipelineRestore, dbPipelineCopy, getDB, DBLibError, BaseCommonDB, DBTransaction, RunnableDBTransaction, mergeDBOperations, commitDBTransactionSimple, CommonKeyValueDao, }; | ||
export { DBQuery, dbQueryFilterOperatorValues, RunnableDBQuery, CommonDaoLogLevel, DBRelation, DBModelType, CommonDao, createdUpdatedFields, createdUpdatedIdFields, InMemoryDB, InMemoryKeyValueDB, queryInMemory, serializeJsonField, deserializeJsonField, dbPipelineBackup, dbPipelineRestore, dbPipelineCopy, DBLibError, BaseCommonDB, DBTransaction, RunnableDBTransaction, mergeDBOperations, commitDBTransactionSimple, CommonKeyValueDao, }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CommonKeyValueDao = exports.commitDBTransactionSimple = exports.mergeDBOperations = exports.RunnableDBTransaction = exports.DBTransaction = exports.BaseCommonDB = exports.DBLibError = exports.getDB = exports.dbPipelineCopy = exports.dbPipelineRestore = exports.dbPipelineBackup = exports.deserializeJsonField = exports.serializeJsonField = exports.queryInMemory = exports.InMemoryKeyValueDB = exports.InMemoryDB = exports.createdUpdatedIdFields = exports.createdUpdatedFields = exports.CommonDao = exports.DBModelType = exports.DBRelation = exports.CommonDaoLogLevel = exports.RunnableDBQuery = exports.dbQueryFilterOperatorValues = exports.DBQuery = void 0; | ||
exports.CommonKeyValueDao = exports.commitDBTransactionSimple = exports.mergeDBOperations = exports.RunnableDBTransaction = exports.DBTransaction = exports.BaseCommonDB = exports.DBLibError = exports.dbPipelineCopy = exports.dbPipelineRestore = exports.dbPipelineBackup = exports.deserializeJsonField = exports.serializeJsonField = exports.queryInMemory = exports.InMemoryKeyValueDB = exports.InMemoryDB = exports.createdUpdatedIdFields = exports.createdUpdatedFields = exports.CommonDao = exports.DBModelType = exports.DBRelation = exports.CommonDaoLogLevel = exports.RunnableDBQuery = exports.dbQueryFilterOperatorValues = exports.DBQuery = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -22,4 +22,2 @@ const inMemory_db_1 = require("./adapter/inmemory/inMemory.db"); | ||
Object.defineProperty(exports, "DBRelation", { enumerable: true, get: function () { return db_model_1.DBRelation; } }); | ||
const getDB_1 = require("./getDB"); | ||
Object.defineProperty(exports, "getDB", { enumerable: true, get: function () { return getDB_1.getDB; } }); | ||
const commonKeyValueDao_1 = require("./kv/commonKeyValueDao"); | ||
@@ -48,2 +46,2 @@ Object.defineProperty(exports, "CommonKeyValueDao", { enumerable: true, get: function () { return commonKeyValueDao_1.CommonKeyValueDao; } }); | ||
Object.defineProperty(exports, "mergeDBOperations", { enumerable: true, get: function () { return dbTransaction_util_1.mergeDBOperations; } }); | ||
(0, tslib_1.__exportStar)(require("./kv/commonKeyValueDaoMemoCache"), exports); | ||
tslib_1.__exportStar(require("./kv/commonKeyValueDaoMemoCache"), exports); |
@@ -8,3 +8,2 @@ "use strict"; | ||
const colors_1 = require("@naturalcycles/nodejs-lib/dist/colors"); | ||
const time_lib_1 = require("@naturalcycles/time-lib"); | ||
const fs = require("fs-extra"); | ||
@@ -26,3 +25,3 @@ const index_1 = require("../index"); | ||
let { tables } = opt; | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + (0, colors_1.grey)(time_lib_1.dayjs.unix(sinceUpdated).toPretty()) : ''; | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + (0, colors_1.grey)((0, js_lib_1.localTime)(sinceUpdated).toPretty()) : ''; | ||
console.log(`>> ${(0, colors_1.dimWhite)('dbPipelineBackup')} started in ${(0, colors_1.grey)(outputDirPath)}...${sinceUpdatedStr}`); | ||
@@ -29,0 +28,0 @@ fs.ensureDirSync(outputDirPath); |
@@ -7,3 +7,2 @@ "use strict"; | ||
const colors_1 = require("@naturalcycles/nodejs-lib/dist/colors"); | ||
const time_lib_1 = require("@naturalcycles/time-lib"); | ||
const dbQuery_1 = require("../query/dbQuery"); | ||
@@ -19,3 +18,3 @@ /** | ||
let { tables } = opt; | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + (0, colors_1.grey)(time_lib_1.dayjs.unix(sinceUpdated).toPretty()) : ''; | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + (0, colors_1.grey)((0, js_lib_1.localTime)(sinceUpdated).toPretty()) : ''; | ||
console.log(`>> ${(0, colors_1.dimWhite)('dbPipelineCopy')} started...${sinceUpdatedStr}`); | ||
@@ -22,0 +21,0 @@ if (!tables) { |
@@ -8,3 +8,2 @@ "use strict"; | ||
const colors_1 = require("@naturalcycles/nodejs-lib/dist/colors"); | ||
const time_lib_1 = require("@naturalcycles/time-lib"); | ||
const fs = require("fs-extra"); | ||
@@ -22,3 +21,3 @@ /** | ||
const onlyTables = opt.tables && new Set(opt.tables); | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + (0, colors_1.grey)(time_lib_1.dayjs.unix(sinceUpdated).toPretty()) : ''; | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + (0, colors_1.grey)((0, js_lib_1.localTime)(sinceUpdated).toPretty()) : ''; | ||
console.log(`>> ${(0, colors_1.dimWhite)('dbPipelineRestore')} started in ${(0, colors_1.grey)(inputDirPath)}...${sinceUpdatedStr}`); | ||
@@ -25,0 +24,0 @@ fs.ensureDirSync(inputDirPath); |
@@ -9,3 +9,2 @@ { | ||
"@naturalcycles/nodejs-lib": "^12.0.0", | ||
"@naturalcycles/time-lib": "^3.0.1", | ||
"fs-extra": "^10.0.0" | ||
@@ -47,3 +46,3 @@ }, | ||
}, | ||
"version": "8.34.2", | ||
"version": "8.35.0", | ||
"description": "Lowest Common Denominator API to supported Databases", | ||
@@ -50,0 +49,0 @@ "keywords": [ |
@@ -39,3 +39,2 @@ import { InMemoryDB, InMemoryDBCfg } from './adapter/inmemory/inMemory.db' | ||
} from './db.model' | ||
import { getDB } from './getDB' | ||
import { CommonKeyValueDao, CommonKeyValueDaoCfg } from './kv/commonKeyValueDao' | ||
@@ -121,3 +120,2 @@ import { CommonKeyValueDB, KeyValueDBTuple } from './kv/commonKeyValueDB' | ||
dbPipelineCopy, | ||
getDB, | ||
DBLibError, | ||
@@ -124,0 +122,0 @@ BaseCommonDB, |
import { createGzip, ZlibOptions } from 'zlib' | ||
import { AppError, AsyncMapper, ErrorMode, pMap, _passthroughMapper } from '@naturalcycles/js-lib' | ||
import { | ||
AppError, | ||
AsyncMapper, | ||
ErrorMode, | ||
pMap, | ||
_passthroughMapper, | ||
localTime, | ||
} from '@naturalcycles/js-lib' | ||
import { | ||
NDJsonStats, | ||
@@ -14,3 +21,2 @@ transformLogProgress, | ||
import { boldWhite, dimWhite, grey, yellow } from '@naturalcycles/nodejs-lib/dist/colors' | ||
import { dayjs } from '@naturalcycles/time-lib' | ||
import * as fs from 'fs-extra' | ||
@@ -148,3 +154,3 @@ import { CommonDB } from '../common.db' | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + grey(dayjs.unix(sinceUpdated).toPretty()) : '' | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + grey(localTime(sinceUpdated).toPretty()) : '' | ||
@@ -151,0 +157,0 @@ console.log( |
@@ -1,2 +0,2 @@ | ||
import { AsyncMapper, ErrorMode, pMap, _passthroughMapper } from '@naturalcycles/js-lib' | ||
import { AsyncMapper, ErrorMode, pMap, _passthroughMapper, localTime } from '@naturalcycles/js-lib' | ||
import { | ||
@@ -14,3 +14,2 @@ NDJsonStats, | ||
import { boldWhite, dimWhite, grey, yellow } from '@naturalcycles/nodejs-lib/dist/colors' | ||
import { dayjs } from '@naturalcycles/time-lib' | ||
import { CommonDB } from '../common.db' | ||
@@ -107,3 +106,3 @@ import { CommonDBSaveOptions } from '../db.model' | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + grey(dayjs.unix(sinceUpdated).toPretty()) : '' | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + grey(localTime(sinceUpdated).toPretty()) : '' | ||
@@ -110,0 +109,0 @@ console.log(`>> ${dimWhite('dbPipelineCopy')} started...${sinceUpdatedStr}`) |
@@ -10,2 +10,3 @@ import { createUnzip } from 'zlib' | ||
SavedDBEntity, | ||
localTime, | ||
} from '@naturalcycles/js-lib' | ||
@@ -28,3 +29,2 @@ import { | ||
import { boldWhite, dimWhite, grey, yellow } from '@naturalcycles/nodejs-lib/dist/colors' | ||
import { dayjs } from '@naturalcycles/time-lib' | ||
import * as fs from 'fs-extra' | ||
@@ -138,3 +138,3 @@ import { CommonDB } from '../common.db' | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + grey(dayjs.unix(sinceUpdated).toPretty()) : '' | ||
const sinceUpdatedStr = sinceUpdated ? ' since ' + grey(localTime(sinceUpdated).toPretty()) : '' | ||
@@ -141,0 +141,0 @@ console.log( |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
3
6
373760
125
9614
- Removed@naturalcycles/time-lib@^3.0.1
- Removed@naturalcycles/time-lib@3.5.3(transitive)
- Removeddayjs@1.11.13(transitive)