From ac82658d80bf6f7b3d0ffaa546ac650834f15968 Mon Sep 17 00:00:00 2001 From: kirillgroshkov Date: Wed, 17 Jan 2024 22:07:33 +0100 Subject: [PATCH] fix: deps --- .github/workflows/release.yml | 2 +- cfg/tsconfig.json | 4 +- package.json | 2 +- scripts/tsconfig.json | 4 +- src/db/httpDB.test.ts | 20 ++------ src/db/httpDB.ts | 15 +++++- tsconfig.json | 4 +- yarn.lock | 88 +++++++++++++++++++++-------------- 8 files changed, 78 insertions(+), 61 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72fbef9..42da9d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } } # Cache for npm/npx in ~/.npm - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.npm key: npm-v1-${{ runner.os }} diff --git a/cfg/tsconfig.json b/cfg/tsconfig.json index a9c66c1..5231f15 100644 --- a/cfg/tsconfig.json +++ b/cfg/tsconfig.json @@ -59,8 +59,8 @@ // Other "pretty": true, "newLine": "lf", - "experimentalDecorators": true - } + "experimentalDecorators": true, + }, // Need to be specified in the project tsconfig // "include": ["src"], // "exclude": ["**/__exclude"] diff --git a/package.json b/package.json index c9059a9..19952e8 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@sentry/node": "^7.0.0" }, "dependencies": { - "@naturalcycles/db-lib": "^8.0.2", + "@naturalcycles/db-lib": "^9.1.0", "@naturalcycles/js-lib": "^14.27.0", "@naturalcycles/nodejs-lib": "^13.1.0", "@types/cookie-parser": "^1.4.1", diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index 677f643..c352ace 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -4,7 +4,7 @@ { "extends": "@naturalcycles/dev-lib/scripts/tsconfig.json", "compilerOptions": { - "skipLibCheck": true // because of https://github.com/dcodeIO/long.js/issues/109 + "skipLibCheck": true, // because of https://github.com/dcodeIO/long.js/issues/109 }, - "exclude": ["**/__exclude"] + "exclude": ["**/__exclude"], } diff --git a/src/db/httpDB.test.ts b/src/db/httpDB.test.ts index 2b31e4a..97d6674 100644 --- a/src/db/httpDB.test.ts +++ b/src/db/httpDB.test.ts @@ -1,9 +1,5 @@ import { InMemoryDB } from '@naturalcycles/db-lib' -import { - CommonDBImplementationFeatures, - runCommonDaoTest, - runCommonDBTest, -} from '@naturalcycles/db-lib/dist/testing' +import { runCommonDaoTest, runCommonDBTest } from '@naturalcycles/db-lib/dist/testing' import { expressTestService } from '../testing' import { HttpDB } from './httpDB' import { httpDBRequestHandler } from './httpDBRequestHandler' @@ -21,17 +17,7 @@ afterAll(async () => { await app.close() }) -const features: CommonDBImplementationFeatures = { - streaming: false, - createTable: false, - bufferSupport: false, - update: false, - insert: false, - transactions: false, - updateByQuery: false, -} - -describe('runCommonDBTest', () => runCommonDBTest(db, features)) +describe('runCommonDBTest', () => runCommonDBTest(db)) // todo: unskip and figure it out -describe.skip('runCommonDaoTest', () => runCommonDaoTest(db, features)) +describe.skip('runCommonDaoTest', () => runCommonDaoTest(db)) diff --git a/src/db/httpDB.ts b/src/db/httpDB.ts index 0e2fb24..4368b7a 100644 --- a/src/db/httpDB.ts +++ b/src/db/httpDB.ts @@ -2,9 +2,11 @@ import { Readable } from 'node:stream' import { BaseCommonDB, CommonDB, + commonDBFullSupport, CommonDBOptions, CommonDBSaveOptions, CommonDBStreamOptions, + CommonDBSupport, DBQuery, RunQueryResult, } from '@naturalcycles/db-lib' @@ -25,6 +27,17 @@ export interface HttpDBCfg extends FetcherOptions { * Implementation of CommonDB that proxies all requests via HTTP to "httpDBRequestHandler". */ export class HttpDB extends BaseCommonDB implements CommonDB { + override support: CommonDBSupport = { + ...commonDBFullSupport, + streaming: false, + createTable: false, + bufferValues: false, + updateSaveMethod: false, + insertSaveMethod: false, + transactions: false, + updateByQuery: false, + } + constructor(public cfg: HttpDBCfg) { super() this.setCfg(cfg) @@ -106,7 +119,7 @@ export class HttpDB extends BaseCommonDB implements CommonDB { }) } - async deleteByIds(table: string, ids: string[], opt?: CommonDBOptions): Promise { + override async deleteByIds(table: string, ids: string[], opt?: CommonDBOptions): Promise { return await this.fetcher.put(`deleteByIds`, { json: { table, diff --git a/tsconfig.json b/tsconfig.json index fd7faac..e353a14 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,8 +2,8 @@ "extends": "@naturalcycles/dev-lib/cfg/tsconfig.json", "compilerOptions": { "skipLibCheck": true, // because of https://github.com/dcodeIO/long.js/issues/109 - "outDir": "./dist" + "outDir": "./dist", }, "include": ["src"], - "exclude": ["**/__exclude"] + "exclude": ["**/__exclude"], } diff --git a/yarn.lock b/yarn.lock index 3347be8..4e3c50e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -621,9 +621,9 @@ tslib "^2.1.0" "@google-cloud/firestore@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-7.1.0.tgz#917b618cadb6cf01deb7438dfcf4f7afab2fed49" - integrity sha512-kkTC0Sb9r2lONuFF8Tr2wFfBfk0DT1/EKcTKOhsuoXUVClv3jCqGYVPtHgQsHFjdOsubS+tx9G5D5WG+obB2DA== + version "7.2.0" + resolved "https://registry.yarnpkg.com/@google-cloud/firestore/-/firestore-7.2.0.tgz#73acaf48057dd01863dac7d68d8f3f2832543ece" + integrity sha512-rBIiy3o+OxWwUT0EMAAq0OZUduF1l0/GQ9WTnUyiHxixsLR1qU5Y6pC4BOIsYPnup1OESMhFSX0EEx6oriT0pw== dependencies: fast-deep-equal "^3.1.1" functional-red-black-tree "^1.0.1" @@ -672,9 +672,9 @@ uuid "^8.0.0" "@grpc/grpc-js@~1.9.6": - version "1.9.13" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.9.13.tgz#ad9b7dbb6089c462469653c809996f13e46aa1cd" - integrity sha512-OEZZu9v9AA+7/tghMDE8o5DAMD5THVnwSqDWuh7PPYO5287rTyqy0xEHT6/e4pbqSrhyLPdQFsam4TwFQVVIIw== + version "1.9.14" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.9.14.tgz#236378822876cbf7903f9d61a0330410e8dcc5a1" + integrity sha512-nOpuzZ2G3IuMFN+UPPpKrC6NsLmWsTqSsm66IRfnBt1D4pwTqE27lmbpcPM+l2Ua4gE7PfjRHI6uedAy7hoXUw== dependencies: "@grpc/proto-loader" "^0.7.8" "@types/node" ">=12.12.47" @@ -981,9 +981,9 @@ integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== "@naturalcycles/bench-lib@^1.0.7": - version "1.6.7" - resolved "https://registry.yarnpkg.com/@naturalcycles/bench-lib/-/bench-lib-1.6.7.tgz#b5e25ec0a6ffe86b999e5beb94e9dff7bbd6a7c1" - integrity sha512-886s+4bygr+FR9DTRAreAvptRjDjM2Qb8JLGA3/0r4+47OAKHQsgF+DnwlYU2yVBMXZDUkKsLrGZPVDMiGOaeQ== + version "1.6.8" + resolved "https://registry.yarnpkg.com/@naturalcycles/bench-lib/-/bench-lib-1.6.8.tgz#5d27f4b9e1b429e6190d4b15a2e47df2c2f386b0" + integrity sha512-m27jOq1V2OYEdL2iIsVrc7m0FB/uLNg8ulDPq4Pyt+g3dTkscfQzcClQEC+O+hAG1zSvhswM+xoLaOZgmi2CLQ== dependencies: "@naturalcycles/js-lib" "^14.0.0" "@naturalcycles/nodejs-lib" "^13.0.2" @@ -1006,10 +1006,10 @@ tslib "^2.6.2" typescript "^5.0.2" -"@naturalcycles/db-lib@^8.0.2": - version "8.60.0" - resolved "https://registry.yarnpkg.com/@naturalcycles/db-lib/-/db-lib-8.60.0.tgz#320af2c5fb0a65f7b545cd949b6e24e42eb51d9e" - integrity sha512-57zb4y9nC8itKp5VkcCHxESTU6Oil3vQJ6rqmlfdSEL4UXrN6Nu/+wt7NuP4ZDQq57OmFpXbA1vnG6scCCwdoA== +"@naturalcycles/db-lib@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@naturalcycles/db-lib/-/db-lib-9.1.0.tgz#4c2d206301caeb67381713566d1945df91435a1f" + integrity sha512-qAJai7bRWY37+Wo/p8KyxaJ+d1UE2XIgIZoc8dcdYtB3XyEUjz3ZNNA4GeurgtxOBqeD5U0UxcOHbijJaHyzCg== dependencies: "@naturalcycles/js-lib" "^14.116.0" "@naturalcycles/nodejs-lib" "^13.1.1" @@ -1058,9 +1058,9 @@ zod "^3.20.2" "@naturalcycles/nodejs-lib@^13.0.1", "@naturalcycles/nodejs-lib@^13.0.2", "@naturalcycles/nodejs-lib@^13.1.0", "@naturalcycles/nodejs-lib@^13.1.1": - version "13.6.0" - resolved "https://registry.yarnpkg.com/@naturalcycles/nodejs-lib/-/nodejs-lib-13.6.0.tgz#33acd08d9104499ad37ffdafbac208f774ee4493" - integrity sha512-9Ol32xy24dmP38qhWCfZM8QkgLCsRRki+GFZjJeJQh0q42WhACahAwac9TF8XWCAEXQkOm1ft8zw/PQknEVNfw== + version "13.7.0" + resolved "https://registry.yarnpkg.com/@naturalcycles/nodejs-lib/-/nodejs-lib-13.7.0.tgz#8d49d85d9c3165f20a9bbc08024bc213f5318cae" + integrity sha512-mPGMLS5pBP8U9ToVwM91+7ydir+fCUqYE3NVDotvfQW6jYf+LExKqnyMDGCEnwkGZhkafvGHbHBh5eqluyXsWA== dependencies: "@naturalcycles/js-lib" "^14.0.0" "@types/js-yaml" "^4.0.9" @@ -1441,9 +1441,9 @@ integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== "@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@^20.1.0", "@types/node@^20.10.3": - version "20.11.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.4.tgz#c724a5d6723182af758b91b994209336f4439cb7" - integrity sha512-6I0fMH8Aoy2lOejL3s4LhyIYX34DPwY8bl5xlNjBvUEk8OHrcuzsFt+Ied4LvJihbtXPM+8zUqdydfIti86v9g== + version "20.11.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.5.tgz#be10c622ca7fcaa3cf226cf80166abc31389d86e" + integrity sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w== dependencies: undici-types "~5.26.4" @@ -2242,9 +2242,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001565: - version "1.0.30001577" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001577.tgz#a24991eb4ad67324ba8b96716340d53151f2f6f8" - integrity sha512-rs2ZygrG1PNXMfmncM0B5H1hndY5ZCC9b5TkFaVNfZ+AUlyqcMyVIQtc3fsezi0NUCk5XZfDf9WS6WxMxnfdrg== + version "1.0.30001578" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001578.tgz#11741580434ce60aae4b4a9abee9f9f8d7bf5be5" + integrity sha512-J/jkFgsQ3NEl4w2lCoM9ZPxrD+FoBNJ7uJUpGVjIg/j0OwJosWM36EPDv+Yyi0V4twBk9pPmlFS+PLykgEvUmg== chalk@5.3.0: version "5.3.0" @@ -2871,9 +2871,9 @@ ejs@^3.0.1: jake "^10.8.5" electron-to-chromium@^1.4.601: - version "1.4.632" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.632.tgz#df6253483b802eb83eee2fdc0e5067bd46f36f11" - integrity sha512-JGmudTwg7yxMYvR/gWbalqqQiyu7WTFv2Xu3vw4cJHXPFxNgAk0oy8UHaer8nLF4lZJa+rNoj6GsrKIVJTV6Tw== + version "1.4.636" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.636.tgz#302cf4c3016d9d714ba246243a7c97b528e22fe7" + integrity sha512-NLE0GIy1OL9wRiKL20h9TkctBEYZuc99tquSS9MVdTahnuHputoETHeqDzgqGqyOY9NUH0g9wjfEuw5OD+wRcQ== emittery@^0.13.1: version "0.13.1" @@ -5373,9 +5373,9 @@ node-releases@^2.0.14: integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== nodemon@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.2.tgz#222dd0de79fc7b7b3eedba422d2b9e5fc678621e" - integrity sha512-9qIN2LNTrEzpOPBaWHTm4Asy1LxXLSickZStAQ4IZe7zsoIpD/A7LWxhZV3t4Zu352uBcqVnRsDXSMR2Sc3lTA== + version "3.0.3" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.3.tgz#244a62d1c690eece3f6165c6cdb0db03ebd80b76" + integrity sha512-7jH/NXbFPxVaMwmBCC2B9F/V6X1VkEdNgx3iu9jji8WxWcvhMWkmhNWhI5077zknOnZnBzba9hZP6bCPJLSReQ== dependencies: chokidar "^3.5.2" debug "^4" @@ -5725,9 +5725,9 @@ prelude-ls@^1.2.1: integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== prettier@^3.0.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.2.tgz#96e580f7ca9c96090ad054616c0c4597e2844b65" - integrity sha512-HTByuKZzw7utPiDO523Tt2pLtEyK7OibUD9suEJQrPUCYQqrHr74GGX6VidMrovbf/I50mPqr8j/II6oBAuc5A== + version "3.2.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.4.tgz#4723cadeac2ce7c9227de758e5ff9b14e075f283" + integrity sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ== pretty-bytes@^5.4.1: version "5.6.0" @@ -5783,7 +5783,7 @@ proto3-json-serializer@^2.0.0: dependencies: protobufjs "^7.2.5" -protobufjs@7.2.5, protobufjs@^7.2.4, protobufjs@^7.2.5: +protobufjs@7.2.5: version "7.2.5" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.5.tgz#45d5c57387a6d29a17aab6846dcc283f9b8e7f2d" integrity sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A== @@ -5801,6 +5801,24 @@ protobufjs@7.2.5, protobufjs@^7.2.4, protobufjs@^7.2.5: "@types/node" ">=13.7.0" long "^5.0.0" +protobufjs@^7.2.4, protobufjs@^7.2.5: + version "7.2.6" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.6.tgz#4a0ccd79eb292717aacf07530a07e0ed20278215" + integrity sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/node" ">=13.7.0" + long "^5.0.0" + proxy-addr@^2.0.7, proxy-addr@~2.0.7: version "2.0.7" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" @@ -6375,9 +6393,9 @@ stream-events@^1.0.5: stubs "^3.0.0" stream-shift@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.2.tgz#548bff71c92322e1ade886979f7f67c0723eb9e4" - integrity sha512-rV4Bovi9xx0BFzOb/X0B2GqoIjvqPCttZdu0Wgtx2Dxkj7ETyWl9gmqJ4EutWRLvtZWm8dxE+InQZX1IryZn/w== + version "1.0.3" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" + integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== string-argv@0.3.2: version "0.3.2"