diff --git a/package.json b/package.json index 6cad8ad..b03f086 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@promistream/parallelize": "^0.1.0", "@promistream/pipe": "^0.1.6", "@promistream/rate-limit": "^1.0.1", - "@promistream/simple-sink": "^0.1.1", + "@promistream/simple-sink": "^0.2.2", "@promistream/simple-source": "^0.1.3", "@validatem/any-property": "^0.1.3", "@validatem/anything": "^0.1.0", diff --git a/src/index.js b/src/index.js index 1bda892..36da8eb 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,17 @@ "use strict"; +// let realConsoleLog = console.log.bind(console); +// console.log = function(...args) { +// realConsoleLog(`[console.log called from ${(new Error).stack.split("\n")[2].replace(/^\s* at /, "")}]`); +// realConsoleLog(...args); +// }; + +// let realConsoleError = console.error.bind(console); +// console.error = function(...args) { +// realConsoleError(`[console.error called from ${(new Error).stack.split("\n")[2].replace(/^\s* at /, "")}]`); +// realConsoleError(...args); +// }; + const Promise = require("bluebird"); const express = require("express"); const expressPromiseRouter = require("express-promise-router"); @@ -9,6 +21,7 @@ const fromNodeStream = require("@promistream/from-node-stream"); const map = require("@promistream/map"); const initialize = require("./initialize"); +const errors = require("./errors"); return Promise.try(() => { return initialize({ @@ -48,7 +61,7 @@ return Promise.try(() => { }); }); - // MARKER: Stub out routes, replace error implementation, add response generation for HTTP errors, write database migration, implement parsing engine core + // MARKER: Stub out routes, replace error implementation, add response generation for HTTP errors router.get("/items/:id/metadata", (req, res) => { @@ -75,13 +88,20 @@ return Promise.try(() => { }); router.get("/updates", (req, res) => { + let timestamp = (req.query.timestamp != null) + ? new Date(parseInt(req.query.since) * 1000) + : undefined; + + // FIXME: Validation! return pipe([ - queries.getUpdates(knex), - map((item) => JSON.stringify(item)), + queries.getUpdates(knex, { prefix: req.query.prefix, timestamp: timestamp }), + map((item) => JSON.stringify(item) + "\n"), fromNodeStream(res) ]).read(); }); app.use(router); - app.listen(3000); + app.listen(3000, () => { + console.log("Server listening on port 3000"); + }); }); diff --git a/src/queries.js b/src/queries.js index fdc3214..d661ed3 100644 --- a/src/queries.js +++ b/src/queries.js @@ -2,7 +2,6 @@ const Promise = require("bluebird"); const { UniqueViolationError } = require("objection"); -const asExpression = require("as-expression"); const { validateArguments } = require("@validatem/core"); const required = require("@validatem/required"); @@ -22,6 +21,7 @@ const pipe = require("@promistream/pipe"); const combineSequentialStreaming = require("@promistream/combine-sequential-streaming"); const fromIterable = require("@promistream/from-iterable"); const fromNodeStream = require("@promistream/from-node-stream"); +const createTypeTaggingStream = require("./streams/tag-type"); const { addSeconds } = require("date-fns"); const syncpipe = require("syncpipe"); @@ -42,7 +42,7 @@ function taskResultsToObject(taskResults) { ]); } -module.exports = function ({ db }) { +module.exports = function ({ db, knex }) { return { // FIXME: Make object API instead getItem: function (tx, id, optional = false) { @@ -423,19 +423,28 @@ module.exports = function ({ db }) { return query; } - // FIXME/MARKER: Below query streams are all producing 0 items, why? Running them manually yields results. function* streamGenerator() { - yield fromNodeStream.fromReadable( - applyWhereClauses(db.Item.query(tx), "id").toKnexQuery().stream() - ); + yield pipe([ + fromNodeStream.fromReadable( + applyWhereClauses(db.Item.query(tx), "id").toKnexQuery().stream() + ), + createTypeTaggingStream("item") + ]); - yield fromNodeStream.fromReadable( - applyWhereClauses(db.Alias.query(tx), "item_id").toKnexQuery().stream() - ); - - yield fromNodeStream.fromReadable( - applyWhereClauses(db.TaskResult.query(tx), "item_id").toKnexQuery().stream() - ); + yield pipe([ + fromNodeStream.fromReadable( + // NOTE: We are only interested in aliases which don't point at themselves + applyWhereClauses(db.Alias.query(tx).where("alias", "!=", knex.ref("item_id")), "alias").toKnexQuery().stream() + ), + createTypeTaggingStream("alias") + ]); + + yield pipe([ + fromNodeStream.fromReadable( + applyWhereClauses(db.TaskResult.query(tx), "item_id").toKnexQuery().stream() + ), + createTypeTaggingStream("taskResult") + ]); } return pipe([ diff --git a/src/streams/tag-type.js b/src/streams/tag-type.js new file mode 100644 index 0000000..3ab8aa3 --- /dev/null +++ b/src/streams/tag-type.js @@ -0,0 +1,9 @@ +"use strict"; + +const map = require("@promistream/map"); + +module.exports = function createTypeTaggingStream(type) { + return map((item) => { + return { type: type, ... item }; + }); +}; diff --git a/yarn.lock b/yarn.lock index 4f3b6f1..4320e7e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,9 +10,9 @@ "@babel/highlight" "^7.10.4" "@babel/helper-validator-identifier@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz#d0f0e277c512e0c938277faa85a3968c9a44c0e8" - integrity sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg== + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" + integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== "@babel/highlight@^7.10.4": version "7.14.5" @@ -23,10 +23,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@eslint/eslintrc@^0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.2.tgz#f63d0ef06f5c0c57d76c4ab5f63d3835c51b0179" - integrity sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg== +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -81,13 +81,16 @@ error-chain "^0.1.0" "@promistream/buffer@^0.1.0", "@promistream/buffer@^0.1.1": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@promistream/buffer/-/buffer-0.1.2.tgz#73c63476aa5cfeb111298b791a33d8008384721b" - integrity sha512-EquWW7HTpjngNkMxHhxww0rvODWAaEN715BXQWP9zXkm+CXdhYmadeol7G2kMPTTYuYjKFmiNUdjjfm/z2puyg== + version "0.1.3" + resolved "https://registry.yarnpkg.com/@promistream/buffer/-/buffer-0.1.3.tgz#19dd4a78bfce82de4c16792abe0cfaba4418abdf" + integrity sha512-HAvUU+0LpEtSd15fsMiLPOVKvNU2CBkZ3QmK6OuqLYw8MOGQNPRalUNvMy+oDrKXxSYIFxYvL5FJbl7ZsV/30A== dependencies: "@joepie91/unreachable" "^1.0.0" + "@promistream/pipe" "^0.1.4" "@promistream/propagate-abort" "^0.1.2" + "@promistream/sequentialize" "^0.1.0" bluebird "^3.5.4" + debug "^4.3.1" "@promistream/combine-sequential-streaming@^0.1.0": version "0.1.0" @@ -109,6 +112,18 @@ default-value "^1.0.0" error-chain "^0.1.0" +"@promistream/filter@^0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@promistream/filter/-/filter-0.1.1.tgz#126f2d581c801d0e8e30e1392700384f00da94be" + integrity sha512-rE4mTC8I7FiwH5HZTcqzfwHTRXAAShBuNoLMhhWcKPvqPIjAbEoqGg8klEs4fNDl8LXrd0Txm7PeBQ8cgZYwmg== + dependencies: + "@promistream/propagate-abort" "^0.1.3" + "@promistream/propagate-peek" "^0.1.0" + "@validatem/core" "^0.3.12" + "@validatem/is-function" "^0.1.0" + "@validatem/required" "^0.1.1" + bluebird "^3.7.2" + "@promistream/from-iterable@^0.1.0": version "0.1.0" resolved "https://registry.yarnpkg.com/@promistream/from-iterable/-/from-iterable-0.1.0.tgz#f0f28e5f53449f4dc0cb90fc3d6753b9181b8a8b" @@ -121,9 +136,9 @@ "@validatem/required" "^0.1.1" "@promistream/from-node-stream@^0.1.1": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@promistream/from-node-stream/-/from-node-stream-0.1.2.tgz#f233f02f13b0d992c3128afb99704fd332a062ff" - integrity sha512-bDQlKspn5Z3JqzB/O4BaBSJc1UZvHgwfOe9l3fqdgdpJzmujscJKcRsIwI4rK4DqOqRqAlhTqaOlkULCNRMAQQ== + version "0.1.3" + resolved "https://registry.yarnpkg.com/@promistream/from-node-stream/-/from-node-stream-0.1.3.tgz#a439a74670a53de3d7ab968d9c93bc9d1d0c589c" + integrity sha512-ue1uxZ0UMF3tGMGwV61WOy1Cl9eGQPqwlo54uIUtGRgl3fsSgkWsgV1VxN9jPMtRejTAm3BxDbvHcOdybZwO3Q== dependencies: "@joepie91/unreachable" "^1.0.0" "@promistream/buffer" "^0.1.0" @@ -190,7 +205,7 @@ p-defer "^3" request-matcher "^0.1.0" -"@promistream/pipe@^0.1.1", "@promistream/pipe@^0.1.6": +"@promistream/pipe@^0.1.1", "@promistream/pipe@^0.1.4", "@promistream/pipe@^0.1.6": version "0.1.6" resolved "https://registry.yarnpkg.com/@promistream/pipe/-/pipe-0.1.6.tgz#fb7d930fd7011a9542502904049023fdaa87b82d" integrity sha512-B/n4WPJ/goXALCWJYgZV0M/lLMIF5OuaqvxezJq/lcSCo9RuV82wmdJBZd+IEmc6Ykn/EYTFtUHCnRjkl56+3w== @@ -236,26 +251,10 @@ bluebird "^3.5.4" p-defer "^3.0.0" -"@promistream/simple-sink@^0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@promistream/simple-sink/-/simple-sink-0.1.1.tgz#e3808179102ffe4bc10d70d681f19c649e1f3811" - integrity sha512-M6dQMUIPjFTRB+xIwBMqIrPghWORoreGoNAl2F/5oshBlX6+X2F+RAeUuz6plDymwq2eoVL5pvSUR4zYdMdRjQ== - dependencies: - "@promistream/is-aborted" "^0.1.1" - "@promistream/is-end-of-stream" "^0.1.1" - "@promistream/propagate-abort" "^0.1.6" - "@promistream/propagate-peek" "^0.1.1" - "@validatem/core" "^0.3.11" - "@validatem/default-to" "^0.1.0" - "@validatem/is-function" "^0.1.0" - "@validatem/required" "^0.1.1" - "@validatem/wrap-value-as-option" "^0.1.0" - bluebird "^3.5.4" - -"@promistream/simple-sink@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@promistream/simple-sink/-/simple-sink-0.2.0.tgz#74cf5fadbd98dc3dd7b237f7816ea5a1fdc2147d" - integrity sha512-QEFpCoZRbTqVzicetUxImQQKgzJ2gfOxyFcAs/LudSxU7TXzsPkYKqLnXteNWk8UZ6gZkmCW80jLW7DfjqVnbQ== +"@promistream/simple-sink@^0.2.0", "@promistream/simple-sink@^0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@promistream/simple-sink/-/simple-sink-0.2.2.tgz#9ecfef4084d5dc62438f67e437d807a811d9c196" + integrity sha512-wiNuwq1gigmEDaNXduP7XcGQUku6J7ah316lyCdPbi3cxNTNdLKCMlWN3VLuldrmksHwjVt51hVK1HugZjwgMw== dependencies: "@promistream/is-aborted" "^0.1.1" "@promistream/is-end-of-stream" "^0.1.1" @@ -617,9 +616,9 @@ ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.6: uri-js "^4.2.2" ajv@^8.0.1: - version "8.6.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.1.tgz#ae65764bf1edde8cd861281cda5057852364a295" - integrity sha512-42VLtQUOLefAvKFAQIxIZDaThq6om/PrfP0CYk3/vn+y4BMNkKnbli8ON2QCiHov4KkzOSJ/xSoBJdayiiYvVQ== + version "8.6.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.3.tgz#11a66527761dc3e9a3845ea775d2d3c0414e8764" + integrity sha512-SMJOdDP6LqTkD0Uq8qLi+gMwSt0imXLSV080qFVwJCpH9U6Mb+SUGHAXM0KNbcBPguytWyvFxcHgMLe2D2XSpw== dependencies: fast-deep-equal "^3.1.1" json-schema-traverse "^1.0.0" @@ -631,10 +630,10 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^3.2.1: version "3.2.1" @@ -726,7 +725,7 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -call-bind@^1.0.0, call-bind@^1.0.2: +call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== @@ -749,9 +748,9 @@ chalk@^2.0.0, chalk@^2.4.2: supports-color "^5.3.0" chalk@^4.0.0, chalk@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" - integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" @@ -848,9 +847,9 @@ cross-spawn@^7.0.2: which "^2.0.1" date-fns@^2.18.0: - version "2.22.1" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.22.1.tgz#1e5af959831ebb1d82992bf67b765052d8f0efc4" - integrity sha512-yUFPQjrxEmIsMqlHhAhmxkuH769baF21Kk+nZwZGyrMoyLA+LugaQtC0+Tqf9CBUUULWwUJt6Q5ySI3LJDDCGg== + version "2.25.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.25.0.tgz#8c5c8f1d958be3809a9a03f4b742eba894fc5680" + integrity sha512-ovYRFnTrbGPD4nqaEqescPEv1mNwvt+UTqI3Ay9SzNtey9NZnYu6E2qCcBBgJ6/2VF1zGGygpyTDITqpQQ5e+w== db-errors@^0.2.3: version "0.2.3" @@ -872,9 +871,9 @@ debug@4.3.2, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1: ms "2.1.2" deep-is@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== default-value@^1.0.0: version "1.0.0" @@ -996,12 +995,12 @@ eslint-visitor-keys@^2.0.0: integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== eslint@^7.21.0: - version "7.30.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.30.0.tgz#6d34ab51aaa56112fd97166226c9a97f505474f8" - integrity sha512-VLqz80i3as3NdloY44BQSJpFw534L9Oh+6zJOUaViV4JPd+DaHwutqP7tcpkW3YiXbK6s05RZl7yl7cQn+lijg== + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== dependencies: "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.2" + "@eslint/eslintrc" "^0.4.3" "@humanwhocodes/config-array" "^0.5.0" ajv "^6.10.0" chalk "^4.0.0" @@ -1190,9 +1189,9 @@ flat-cache@^3.0.4: rimraf "^3.0.2" flatted@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.1.tgz#bbef080d95fca6709362c73044a1634f7c6e7d05" - integrity sha512-OMQjaErSFHmHqZe+PSidH5n8j3O0F2DdnVh8JB4j4eUQ2k6KvB0qGfrKIhapvez5JerBbmWkaLYUYWISaESoXg== + version "3.2.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" + integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== flatten@^1.0.3: version "1.0.3" @@ -1256,9 +1255,9 @@ glob-parent@^5.1.2: is-glob "^4.0.1" glob@^7.1.3: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -1268,9 +1267,9 @@ glob@^7.1.3: path-is-absolute "^1.0.0" globals@^13.6.0, globals@^13.9.0: - version "13.10.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.10.0.tgz#60ba56c3ac2ca845cfbf4faeca727ad9dd204676" - integrity sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g== + version "13.11.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.11.0.tgz#40ef678da117fe7bd2e28f1fab24951bd0255be7" + integrity sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g== dependencies: type-fest "^0.20.2" @@ -1284,11 +1283,18 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-symbols@^1.0.1: +has-symbols@^1.0.1, has-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -1377,23 +1383,25 @@ ipaddr.js@1.9.1: integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== dependencies: - call-bind "^1.0.0" + call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-boolean-object@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" - integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== dependencies: call-bind "^1.0.2" + has-tostringtag "^1.0.0" is-callable@^1.1.5: - version "1.2.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" - integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== is-core-module@^2.2.0: version "2.7.0" @@ -1403,9 +1411,11 @@ is-core-module@^2.2.0: has "^1.0.3" is-date-object@^1.0.2: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.4.tgz#550cfcc03afada05eea3dd30981c7b09551f73e5" - integrity sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A== + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" is-extglob@^2.1.1: version "2.1.1" @@ -1417,24 +1427,19 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^4.0.0: +is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" -is-glob@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - is-number-object@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" - integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + dependencies: + has-tostringtag "^1.0.0" is-plain-obj@^2.1.0: version "2.1.0" @@ -1452,9 +1457,11 @@ is-regexp@^2.0.0: integrity sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA== is-string@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" - integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" is.object@^1.0.0: version "1.0.0" @@ -1554,9 +1561,9 @@ lru-cache@^6.0.0: yallist "^4.0.0" map-obj@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.1.tgz#e4ea399dbc979ae735c83c863dd31bdf364277b7" - integrity sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ== + version "4.3.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.3.0.tgz#9304f906e93faae70880da102a9f1df0ea8bb05a" + integrity sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ== media-typer@0.3.0: version "0.3.0" @@ -1573,17 +1580,17 @@ methods@^1.0.0, methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -mime-db@1.48.0: - version "1.48.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.48.0.tgz#e35b31045dd7eada3aaad537ed88a33afbef2d1d" - integrity sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ== +mime-db@1.50.0: + version "1.50.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.50.0.tgz#abd4ac94e98d3c0e185016c67ab45d5fde40c11f" + integrity sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A== mime-types@~2.1.24: - version "2.1.31" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.31.tgz#a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b" - integrity sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg== + version "2.1.33" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.33.tgz#1fa12a904472fafd068e48d9e8401f74d3f70edb" + integrity sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g== dependencies: - mime-db "1.48.0" + mime-db "1.50.0" mime@1.6.0: version "1.6.0" @@ -1628,9 +1635,9 @@ negotiator@0.6.2: integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== objection@^2.2.14: - version "2.2.15" - resolved "https://registry.yarnpkg.com/objection/-/objection-2.2.15.tgz#104ecb180b0d2e8dff756a83886be035e3d323e5" - integrity sha512-ZOLJDigE9Z2ppk3C//S2fcWL6ph2jUe6Cwl0CEpslTZegnnOeG6RPIV80nhPAaghWjl/8F2kox/w89VVBN4ccg== + version "2.2.17" + resolved "https://registry.yarnpkg.com/objection/-/objection-2.2.17.tgz#4076c0a60ec218ded2acf7c107f645ee24db4859" + integrity sha512-k49ty4jbygp3YiFP3orSjaife85C6TVzFkyJv3j62DLC7qjBy/tsOfucSKpOy73CSqZNbKUOhIxGdB3pisxp3Q== dependencies: ajv "^6.12.6" db-errors "^0.2.3" @@ -2033,14 +2040,14 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" - integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" + strip-ansi "^6.0.1" string_decoder@^1.1.1: version "1.3.0" @@ -2049,12 +2056,12 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: - ansi-regex "^5.0.0" + ansi-regex "^5.0.1" strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" @@ -2083,16 +2090,16 @@ syncpipe@^1.0.0: assure-array "^1.0.0" table@^6.0.9: - version "6.7.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" - integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== + version "6.7.2" + resolved "https://registry.yarnpkg.com/table/-/table-6.7.2.tgz#a8d39b9f5966693ca8b0feba270a78722cbaf3b0" + integrity sha512-UFZK67uvyNivLeQbVtkiUs8Uuuxv24aSL4/Vil2PJVtMgU8Lx0CYkP12uCGa3kjyQzOSgV1+z9Wkb82fCGsO0g== dependencies: ajv "^8.0.1" lodash.clonedeep "^4.5.0" lodash.truncate "^4.4.2" slice-ansi "^4.0.0" - string-width "^4.2.0" - strip-ansi "^6.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" tarn@^3.0.1: version "3.0.1"