diff --git a/assets/components/filters/filter-bar.vue b/assets/components/filters/filter-bar.vue index 2b6551db..3fd6a4fd 100755 --- a/assets/components/filters/filter-bar.vue +++ b/assets/components/filters/filter-bar.vue @@ -15,7 +15,10 @@ class="total" >{{ itemsTotal }} -
+
=8.6" } }, + "node_modules/@graphile/pg-aggregates": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@graphile/pg-aggregates/-/pg-aggregates-0.1.1.tgz", + "integrity": "sha512-bPfniRw4oN9nNP8tkRlbBslNMA38fhVWNhhaReODhPVEshwquzUmSmSCtSVhS4J+StEFgrP7Z+z1IN0/ror2XA==", + "dependencies": { + "@types/debug": "^4.1.5", + "@types/graphql": "^14.5.0", + "debug": "^4.3.1", + "graphile-utils": "^4.12.0-alpha.0" + }, + "peerDependencies": { + "graphile-build": "^4.12.0-alpha.0", + "graphile-build-pg": "^4.12.0-alpha.0", + "graphql": ">0.6.0 <16" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", @@ -3237,6 +3254,15 @@ "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", "dev": true }, + "node_modules/@types/graphql": { + "version": "14.5.0", + "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.5.0.tgz", + "integrity": "sha512-MOkzsEp1Jk5bXuAsHsUi6BVv0zCO+7/2PTiZMXWDSsMXvNU6w/PLMQT2vHn8hy2i0JqojPz1Sz6rsFjHtsU0lA==", + "deprecated": "This is a stub types definition. graphql provides its own type definitions, so you do not need this installed.", + "dependencies": { + "graphql": "*" + } + }, "node_modules/@types/json-schema": { "version": "7.0.9", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", @@ -3249,9 +3275,9 @@ "integrity": "sha512-sqm9g7mHlPY/43fcSNrCYfOeX9zkTTK+euO5E6+CVijSMm5tTjkVdwdqRkY3ljjIAf8679vps5jKUoJBCLsMDA==" }, "node_modules/@types/jsonwebtoken": { - "version": "8.5.5", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.5.tgz", - "integrity": "sha512-OGqtHQ7N5/Ap/TUwO6IgHDuLiAoTmHhGpNvgkCm/F4N6pKzx/RBSfr2OXZSwC6vkfnsEdb6+7DNZVtiXiwdwFw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", + "integrity": "sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==", "dependencies": { "@types/node": "*" } @@ -4873,7 +4899,7 @@ "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, "node_modules/buffer-from": { "version": "1.1.2", @@ -9123,14 +9149,14 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" }, "node_modules/graphile-build": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/graphile-build/-/graphile-build-4.12.2.tgz", - "integrity": "sha512-UqomiSnWPj4pjO6Q6PzT1YeH96k7e0JzCBI3X8kkELG+PP2BOQCNE5e+xLJvohJmUr0YBTgflPQo7P1ZESPwww==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/graphile-build/-/graphile-build-4.13.0.tgz", + "integrity": "sha512-KPBrHgRw5fury6l9WEQH6ys1UtnxrRrG+Ehnr68NvfNELp4T+QsekTSVFi5LWoJOaXvdYMqP2L8MFBRQP2vKsw==", "dependencies": { "@graphile/lru": "4.11.0", "chalk": "^2.4.2", "debug": "^4.1.1", - "graphql-parse-resolve-info": "4.12.0", + "graphql-parse-resolve-info": "4.13.0", "iterall": "^1.2.2", "lodash": ">=4 <5", "lru-cache": "^5.0.0", @@ -9145,18 +9171,18 @@ } }, "node_modules/graphile-build-pg": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/graphile-build-pg/-/graphile-build-pg-4.12.2.tgz", - "integrity": "sha512-4zWS7yb2L3afNpzADX9iBc2do4UOd3abiHd/WG0ao8lharU4YxEDS5qKlE2/2s+gSNqW2okKXEuI1/ci9DXVbw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/graphile-build-pg/-/graphile-build-pg-4.13.0.tgz", + "integrity": "sha512-1FD+3wjCdK1lbICY1QVO26A7s8efSjR522LarL9Bx1M1iBJHNIpCEW2PK+LkulQjY1l5LGQ1A93GQFqi6cZ6bg==", "dependencies": { "@graphile/lru": "4.11.0", "chalk": "^2.4.2", "debug": "^4.1.1", - "graphile-build": "4.12.2", - "jsonwebtoken": "^8.5.1", + "graphile-build": "4.13.0", + "jsonwebtoken": "^9.0.0", "lodash": ">=4 <5", "lru-cache": ">=4 <5", - "pg-sql2": "4.12.1" + "pg-sql2": "4.13.0" }, "engines": { "node": ">=8.6" @@ -9180,9 +9206,9 @@ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, "node_modules/graphile-utils": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/graphile-utils/-/graphile-utils-4.12.2.tgz", - "integrity": "sha512-2UcTWWMFLFkKwbDLqlN0mF5sxLqz9y0p7I3zNOJpXtHVjrHyp7oQZsWComPsit/PWIrIgtDUagP+HPkypBRrqA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/graphile-utils/-/graphile-utils-4.13.0.tgz", + "integrity": "sha512-6nzlCNeJB1qV9AaPyJ/iHU+CDfs8jxpcmQ47Fmrgmp8r5VwKdL/uDt0LW8IuXu2VZrbM1GGyZ8rQtcdVmQYZ+g==", "dependencies": { "debug": "^4.1.1", "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0", @@ -9205,9 +9231,9 @@ } }, "node_modules/graphql-parse-resolve-info": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.12.0.tgz", - "integrity": "sha512-sQyJeWCzFQwLj8SdgrWeAQG46Nc+VLxof91/AtvEVdbvFCvb+S6OoA4OtIp5OpWBrFo+JzW6LIKifNHXtRKPpA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.13.0.tgz", + "integrity": "sha512-VVJ1DdHYcR7hwOGQKNH+QTzuNgsLA8l/y436HtP9YHoX6nmwXRWq3xWthU3autMysXdm0fQUbhTZCx0W9ICozw==", "dependencies": { "debug": "^4.1.1", "tslib": "^2.0.1" @@ -9216,13 +9242,13 @@ "node": ">=8.6" }, "peerDependencies": { - "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0" + "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0 || ^16.3.0" } }, "node_modules/graphql-ws": { - "version": "5.5.5", - "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.5.5.tgz", - "integrity": "sha512-hvyIS71vs4Tu/yUYHPvGXsTgo0t3arU820+lT5VjZS2go0ewp2LqyCgxEN56CzOG7Iys52eRhHBiD1gGRdiQtw==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.12.0.tgz", + "integrity": "sha512-PA3ImUp8utrpEjoxBMhvxsjkStvFEdU0E1gEBREt8HZIWkxOUymwJBhFnBL7t/iHhUq1GVPeZevPinkZFENxTw==", "engines": { "node": ">=10" }, @@ -10571,34 +10597,50 @@ } }, "node_modules/jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", "dependencies": { "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", + "lodash": "^4.17.21", "ms": "^2.1.1", - "semver": "^5.6.0" + "semver": "^7.3.8" }, "engines": { - "node": ">=4", - "npm": ">=1.4.28" + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jsonwebtoken/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, "node_modules/jsonwebtoken/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, + "node_modules/jsonwebtoken/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -10942,11 +10984,6 @@ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" }, - "node_modules/lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" - }, "node_modules/lodash.isdate": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isdate/-/lodash.isdate-4.0.1.tgz", @@ -10964,26 +11001,11 @@ "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", "dev": true }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" - }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" - }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" - }, "node_modules/lodash.kebabcase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", @@ -10995,11 +11017,6 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" - }, "node_modules/lodash.pad": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz", @@ -13106,9 +13123,9 @@ "integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==" }, "node_modules/pg-sql2": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/pg-sql2/-/pg-sql2-4.12.1.tgz", - "integrity": "sha512-3N6i0EIBYc3uKpGGJntZA7HG2cyphC2R3d00kOoc0H7MxeAP+5dN1VfHJjj9vFGlrUy40Ttq8z3UkNtWR6ySAA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/pg-sql2/-/pg-sql2-4.13.0.tgz", + "integrity": "sha512-9sUlAR+FCuOPezS+2cQCSRUEmnyYrT929DiceZIsINk4R54hCGSh1OTWIP4gbAZeUMTYeEXnwTfnnEOupLYTRQ==", "dependencies": { "@graphile/lru": "4.11.0", "@types/pg": ">=6 <9", @@ -13369,13 +13386,13 @@ "dev": true }, "node_modules/postgraphile": { - "version": "4.12.5", - "resolved": "https://registry.npmjs.org/postgraphile/-/postgraphile-4.12.5.tgz", - "integrity": "sha512-4KLEv4IV8ROhzc6Qb6rpzXuCEs/ifIf9mZlq99sB00T7OWYax7PqfDHXPlpnI0SZNYG2YYFWJu0A0sWQY3Ty/A==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/postgraphile/-/postgraphile-4.13.0.tgz", + "integrity": "sha512-p2VqUnsECd1XrucylK1iosvKEn96J8CWeMVWzxF7b6G21jmaETvFe2CO2q4+dKY5DFCVEF2O9pEfmUfYCKl5+A==", "dependencies": { "@graphile/lru": "4.11.0", "@types/json5": "^0.0.30", - "@types/jsonwebtoken": "^8.3.2", + "@types/jsonwebtoken": "^9.0.1", "@types/pg": ">=6 <9", "@types/ws": "^7.4.0", "body-parser": "^1.15.2", @@ -13383,20 +13400,20 @@ "commander": "^2.19.0", "debug": "^4.1.1", "finalhandler": "^1.0.6", - "graphile-build": "4.12.2", - "graphile-build-pg": "4.12.2", - "graphile-utils": "^4.12.2", + "graphile-build": "4.13.0", + "graphile-build-pg": "4.13.0", + "graphile-utils": "^4.13.0", "graphql": "^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.2 || ^15.0.0", - "graphql-ws": "^5.1.2", + "graphql-ws": "^5.6.2", "http-errors": "^1.5.1", "iterall": "^1.0.2", "json5": "^2.1.1", - "jsonwebtoken": "^8.0.0", + "jsonwebtoken": "^9.0.0", "parseurl": "^1.3.2", "pg": ">=6.1.0 <9", "pg-connection-string": "^2.0.0", - "pg-sql2": "4.12.1", - "postgraphile-core": "4.12.2", + "pg-sql2": "4.13.0", + "postgraphile-core": "4.13.0", "subscriptions-transport-ws": "^0.9.18", "tslib": "^2.1.0", "ws": "^7.4.2" @@ -13409,12 +13426,12 @@ } }, "node_modules/postgraphile-core": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/postgraphile-core/-/postgraphile-core-4.12.2.tgz", - "integrity": "sha512-+2OWlPVsMAVjYRMBSI/CT4GUB0mkSmPKGopKapfvhW40SCUBiPB/kqTylX2viRRnN8FuZtS3cRaTPiWr1K+DIg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/postgraphile-core/-/postgraphile-core-4.13.0.tgz", + "integrity": "sha512-8O7xVKZ20K1dTw4KO0jNAfZPNrxNsGG2VrG3Q0IO70ki/OswE6kz/WBZnWFeGxX0sHSEOGWQa4NSrj9EYsSNuw==", "dependencies": { - "graphile-build": "4.12.2", - "graphile-build-pg": "4.12.2", + "graphile-build": "4.13.0", + "graphile-build-pg": "4.13.0", "tslib": "^2.0.1" }, "engines": { @@ -20742,6 +20759,17 @@ "tslib": "^2.0.1" } }, + "@graphile/pg-aggregates": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@graphile/pg-aggregates/-/pg-aggregates-0.1.1.tgz", + "integrity": "sha512-bPfniRw4oN9nNP8tkRlbBslNMA38fhVWNhhaReODhPVEshwquzUmSmSCtSVhS4J+StEFgrP7Z+z1IN0/ror2XA==", + "requires": { + "@types/debug": "^4.1.5", + "@types/graphql": "^14.5.0", + "debug": "^4.3.1", + "graphile-utils": "^4.12.0-alpha.0" + } + }, "@humanwhocodes/config-array": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.6.0.tgz", @@ -20915,6 +20943,14 @@ "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", "dev": true }, + "@types/graphql": { + "version": "14.5.0", + "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.5.0.tgz", + "integrity": "sha512-MOkzsEp1Jk5bXuAsHsUi6BVv0zCO+7/2PTiZMXWDSsMXvNU6w/PLMQT2vHn8hy2i0JqojPz1Sz6rsFjHtsU0lA==", + "requires": { + "graphql": "*" + } + }, "@types/json-schema": { "version": "7.0.9", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", @@ -20927,9 +20963,9 @@ "integrity": "sha512-sqm9g7mHlPY/43fcSNrCYfOeX9zkTTK+euO5E6+CVijSMm5tTjkVdwdqRkY3ljjIAf8679vps5jKUoJBCLsMDA==" }, "@types/jsonwebtoken": { - "version": "8.5.5", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.5.tgz", - "integrity": "sha512-OGqtHQ7N5/Ap/TUwO6IgHDuLiAoTmHhGpNvgkCm/F4N6pKzx/RBSfr2OXZSwC6vkfnsEdb6+7DNZVtiXiwdwFw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", + "integrity": "sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==", "requires": { "@types/node": "*" } @@ -22262,7 +22298,7 @@ "buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" }, "buffer-from": { "version": "1.1.2", @@ -25525,14 +25561,14 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" }, "graphile-build": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/graphile-build/-/graphile-build-4.12.2.tgz", - "integrity": "sha512-UqomiSnWPj4pjO6Q6PzT1YeH96k7e0JzCBI3X8kkELG+PP2BOQCNE5e+xLJvohJmUr0YBTgflPQo7P1ZESPwww==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/graphile-build/-/graphile-build-4.13.0.tgz", + "integrity": "sha512-KPBrHgRw5fury6l9WEQH6ys1UtnxrRrG+Ehnr68NvfNELp4T+QsekTSVFi5LWoJOaXvdYMqP2L8MFBRQP2vKsw==", "requires": { "@graphile/lru": "4.11.0", "chalk": "^2.4.2", "debug": "^4.1.1", - "graphql-parse-resolve-info": "4.12.0", + "graphql-parse-resolve-info": "4.13.0", "iterall": "^1.2.2", "lodash": ">=4 <5", "lru-cache": "^5.0.0", @@ -25541,18 +25577,18 @@ } }, "graphile-build-pg": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/graphile-build-pg/-/graphile-build-pg-4.12.2.tgz", - "integrity": "sha512-4zWS7yb2L3afNpzADX9iBc2do4UOd3abiHd/WG0ao8lharU4YxEDS5qKlE2/2s+gSNqW2okKXEuI1/ci9DXVbw==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/graphile-build-pg/-/graphile-build-pg-4.13.0.tgz", + "integrity": "sha512-1FD+3wjCdK1lbICY1QVO26A7s8efSjR522LarL9Bx1M1iBJHNIpCEW2PK+LkulQjY1l5LGQ1A93GQFqi6cZ6bg==", "requires": { "@graphile/lru": "4.11.0", "chalk": "^2.4.2", "debug": "^4.1.1", - "graphile-build": "4.12.2", - "jsonwebtoken": "^8.5.1", + "graphile-build": "4.13.0", + "jsonwebtoken": "^9.0.0", "lodash": ">=4 <5", "lru-cache": ">=4 <5", - "pg-sql2": "4.12.1" + "pg-sql2": "4.13.0" }, "dependencies": { "lru-cache": { @@ -25572,9 +25608,9 @@ } }, "graphile-utils": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/graphile-utils/-/graphile-utils-4.12.2.tgz", - "integrity": "sha512-2UcTWWMFLFkKwbDLqlN0mF5sxLqz9y0p7I3zNOJpXtHVjrHyp7oQZsWComPsit/PWIrIgtDUagP+HPkypBRrqA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/graphile-utils/-/graphile-utils-4.13.0.tgz", + "integrity": "sha512-6nzlCNeJB1qV9AaPyJ/iHU+CDfs8jxpcmQ47Fmrgmp8r5VwKdL/uDt0LW8IuXu2VZrbM1GGyZ8rQtcdVmQYZ+g==", "requires": { "debug": "^4.1.1", "graphql": ">=0.9 <0.14 || ^14.0.2 || ^15.4.0", @@ -25587,18 +25623,18 @@ "integrity": "sha512-AnnKk7hFQFmU/2I9YSQf3xw44ctnSFCfp3zE0N6W174gqe9fWG/2rKaKxROK7CcI3XtERpjEKFqts8o319Kf7A==" }, "graphql-parse-resolve-info": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.12.0.tgz", - "integrity": "sha512-sQyJeWCzFQwLj8SdgrWeAQG46Nc+VLxof91/AtvEVdbvFCvb+S6OoA4OtIp5OpWBrFo+JzW6LIKifNHXtRKPpA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/graphql-parse-resolve-info/-/graphql-parse-resolve-info-4.13.0.tgz", + "integrity": "sha512-VVJ1DdHYcR7hwOGQKNH+QTzuNgsLA8l/y436HtP9YHoX6nmwXRWq3xWthU3autMysXdm0fQUbhTZCx0W9ICozw==", "requires": { "debug": "^4.1.1", "tslib": "^2.0.1" } }, "graphql-ws": { - "version": "5.5.5", - "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.5.5.tgz", - "integrity": "sha512-hvyIS71vs4Tu/yUYHPvGXsTgo0t3arU820+lT5VjZS2go0ewp2LqyCgxEN56CzOG7Iys52eRhHBiD1gGRdiQtw==", + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/graphql-ws/-/graphql-ws-5.12.0.tgz", + "integrity": "sha512-PA3ImUp8utrpEjoxBMhvxsjkStvFEdU0E1gEBREt8HZIWkxOUymwJBhFnBL7t/iHhUq1GVPeZevPinkZFENxTw==", "requires": {} }, "har-schema": { @@ -26587,26 +26623,36 @@ } }, "jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", "requires": { "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", + "lodash": "^4.17.21", "ms": "^2.1.1", - "semver": "^5.6.0" + "semver": "^7.3.8" }, "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, @@ -26873,11 +26919,6 @@ "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" }, - "lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" - }, "lodash.isdate": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isdate/-/lodash.isdate-4.0.1.tgz", @@ -26895,26 +26936,11 @@ "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", "dev": true }, - "lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" - }, - "lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" - }, "lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" - }, "lodash.kebabcase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", @@ -26926,11 +26952,6 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" - }, "lodash.pad": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/lodash.pad/-/lodash.pad-4.5.1.tgz", @@ -28533,9 +28554,9 @@ "integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==" }, "pg-sql2": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/pg-sql2/-/pg-sql2-4.12.1.tgz", - "integrity": "sha512-3N6i0EIBYc3uKpGGJntZA7HG2cyphC2R3d00kOoc0H7MxeAP+5dN1VfHJjj9vFGlrUy40Ttq8z3UkNtWR6ySAA==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/pg-sql2/-/pg-sql2-4.13.0.tgz", + "integrity": "sha512-9sUlAR+FCuOPezS+2cQCSRUEmnyYrT929DiceZIsINk4R54hCGSh1OTWIP4gbAZeUMTYeEXnwTfnnEOupLYTRQ==", "requires": { "@graphile/lru": "4.11.0", "@types/pg": ">=6 <9", @@ -28710,13 +28731,13 @@ "dev": true }, "postgraphile": { - "version": "4.12.5", - "resolved": "https://registry.npmjs.org/postgraphile/-/postgraphile-4.12.5.tgz", - "integrity": "sha512-4KLEv4IV8ROhzc6Qb6rpzXuCEs/ifIf9mZlq99sB00T7OWYax7PqfDHXPlpnI0SZNYG2YYFWJu0A0sWQY3Ty/A==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/postgraphile/-/postgraphile-4.13.0.tgz", + "integrity": "sha512-p2VqUnsECd1XrucylK1iosvKEn96J8CWeMVWzxF7b6G21jmaETvFe2CO2q4+dKY5DFCVEF2O9pEfmUfYCKl5+A==", "requires": { "@graphile/lru": "4.11.0", "@types/json5": "^0.0.30", - "@types/jsonwebtoken": "^8.3.2", + "@types/jsonwebtoken": "^9.0.1", "@types/pg": ">=6 <9", "@types/ws": "^7.4.0", "body-parser": "^1.15.2", @@ -28724,20 +28745,20 @@ "commander": "^2.19.0", "debug": "^4.1.1", "finalhandler": "^1.0.6", - "graphile-build": "4.12.2", - "graphile-build-pg": "4.12.2", - "graphile-utils": "^4.12.2", + "graphile-build": "4.13.0", + "graphile-build-pg": "4.13.0", + "graphile-utils": "^4.13.0", "graphql": "^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.2 || ^15.0.0", - "graphql-ws": "^5.1.2", + "graphql-ws": "^5.6.2", "http-errors": "^1.5.1", "iterall": "^1.0.2", "json5": "^2.1.1", - "jsonwebtoken": "^8.0.0", + "jsonwebtoken": "^9.0.0", "parseurl": "^1.3.2", "pg": ">=6.1.0 <9", "pg-connection-string": "^2.0.0", - "pg-sql2": "4.12.1", - "postgraphile-core": "4.12.2", + "pg-sql2": "4.13.0", + "postgraphile-core": "4.13.0", "subscriptions-transport-ws": "^0.9.18", "tslib": "^2.1.0", "ws": "^7.4.2" @@ -28757,12 +28778,12 @@ } }, "postgraphile-core": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/postgraphile-core/-/postgraphile-core-4.12.2.tgz", - "integrity": "sha512-+2OWlPVsMAVjYRMBSI/CT4GUB0mkSmPKGopKapfvhW40SCUBiPB/kqTylX2viRRnN8FuZtS3cRaTPiWr1K+DIg==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/postgraphile-core/-/postgraphile-core-4.13.0.tgz", + "integrity": "sha512-8O7xVKZ20K1dTw4KO0jNAfZPNrxNsGG2VrG3Q0IO70ki/OswE6kz/WBZnWFeGxX0sHSEOGWQa4NSrj9EYsSNuw==", "requires": { - "graphile-build": "4.12.2", - "graphile-build-pg": "4.12.2", + "graphile-build": "4.13.0", + "graphile-build-pg": "4.13.0", "tslib": "^2.0.1" } }, diff --git a/package.json b/package.json index ae12a27a..4acb76a9 100755 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "@casl/ability": "^5.2.2", "@graphile-contrib/pg-order-by-related": "^1.0.0-beta.6", "@graphile-contrib/pg-simplify-inflector": "^6.1.0", + "@graphile/pg-aggregates": "^0.1.1", "acorn": "^8.0.4", "array-equal": "^1.0.0", "aws-sdk": "^2.847.0", @@ -121,7 +122,7 @@ "object.omit": "^3.0.0", "opn": "^6.0.0", "pg": "^8.5.1", - "postgraphile": "^4.10.0", + "postgraphile": "^4.13.0", "postgraphile-plugin-connection-filter": "^2.2.2", "promise-task-queue": "^1.2.0", "prop-types": "^15.7.2", diff --git a/public/img/logos/mindgeek/lazy/favicon.png b/public/img/logos/mindgeek/lazy/favicon.png old mode 100755 new mode 100644 index 01f8b39c..8a7e30d9 Binary files a/public/img/logos/mindgeek/lazy/favicon.png and b/public/img/logos/mindgeek/lazy/favicon.png differ diff --git a/public/img/logos/mindgeek/lazy/favicon_dark.png b/public/img/logos/mindgeek/lazy/favicon_dark.png new file mode 100644 index 00000000..8a7e30d9 Binary files /dev/null and b/public/img/logos/mindgeek/lazy/favicon_dark.png differ diff --git a/public/img/logos/mindgeek/lazy/favicon_light.png b/public/img/logos/mindgeek/lazy/favicon_light.png new file mode 100644 index 00000000..8a7e30d9 Binary files /dev/null and b/public/img/logos/mindgeek/lazy/favicon_light.png differ diff --git a/public/img/logos/mindgeek/lazy/network.png b/public/img/logos/mindgeek/lazy/network.png old mode 100755 new mode 100644 index 1098751c..a5ae99e2 Binary files a/public/img/logos/mindgeek/lazy/network.png and b/public/img/logos/mindgeek/lazy/network.png differ diff --git a/public/img/logos/mindgeek/lazy/pornhub.png b/public/img/logos/mindgeek/lazy/pornhub.png old mode 100755 new mode 100644 index d8669df3..efcf5d2c Binary files a/public/img/logos/mindgeek/lazy/pornhub.png and b/public/img/logos/mindgeek/lazy/pornhub.png differ diff --git a/public/img/logos/mindgeek/lazy/propertysex.png b/public/img/logos/mindgeek/lazy/propertysex.png old mode 100755 new mode 100644 index 65a1fa17..0cfc6f60 Binary files a/public/img/logos/mindgeek/lazy/propertysex.png and b/public/img/logos/mindgeek/lazy/propertysex.png differ diff --git a/public/img/logos/mindgeek/lazy/squirted.png b/public/img/logos/mindgeek/lazy/squirted.png new file mode 100644 index 00000000..7dcc0309 Binary files /dev/null and b/public/img/logos/mindgeek/lazy/squirted.png differ diff --git a/public/img/logos/mindgeek/lazy/transangels.png b/public/img/logos/mindgeek/lazy/transangels.png old mode 100755 new mode 100644 index 4866992d..ba6085a7 Binary files a/public/img/logos/mindgeek/lazy/transangels.png and b/public/img/logos/mindgeek/lazy/transangels.png differ diff --git a/public/img/logos/mindgeek/lazy/trueamateurs.png b/public/img/logos/mindgeek/lazy/trueamateurs.png old mode 100755 new mode 100644 index 57e4e62a..1f7b3477 Binary files a/public/img/logos/mindgeek/lazy/trueamateurs.png and b/public/img/logos/mindgeek/lazy/trueamateurs.png differ diff --git a/public/img/logos/mindgeek/lazy/tube8vip.png b/public/img/logos/mindgeek/lazy/tube8vip.png old mode 100755 new mode 100644 index 1ec5c496..8a479edb Binary files a/public/img/logos/mindgeek/lazy/tube8vip.png and b/public/img/logos/mindgeek/lazy/tube8vip.png differ diff --git a/public/img/logos/mindgeek/squirted.png b/public/img/logos/mindgeek/squirted.png new file mode 100644 index 00000000..821e7bd0 Binary files /dev/null and b/public/img/logos/mindgeek/squirted.png differ diff --git a/public/img/logos/mindgeek/thumbs/favicon.png b/public/img/logos/mindgeek/thumbs/favicon.png old mode 100755 new mode 100644 index 01f8b39c..55525b6d Binary files a/public/img/logos/mindgeek/thumbs/favicon.png and b/public/img/logos/mindgeek/thumbs/favicon.png differ diff --git a/public/img/logos/mindgeek/thumbs/favicon_dark.png b/public/img/logos/mindgeek/thumbs/favicon_dark.png new file mode 100644 index 00000000..55525b6d Binary files /dev/null and b/public/img/logos/mindgeek/thumbs/favicon_dark.png differ diff --git a/public/img/logos/mindgeek/thumbs/favicon_light.png b/public/img/logos/mindgeek/thumbs/favicon_light.png new file mode 100644 index 00000000..55525b6d Binary files /dev/null and b/public/img/logos/mindgeek/thumbs/favicon_light.png differ diff --git a/public/img/logos/mindgeek/thumbs/network.png b/public/img/logos/mindgeek/thumbs/network.png old mode 100755 new mode 100644 index 1433cef1..62fe365f Binary files a/public/img/logos/mindgeek/thumbs/network.png and b/public/img/logos/mindgeek/thumbs/network.png differ diff --git a/public/img/logos/mindgeek/thumbs/pornhub.png b/public/img/logos/mindgeek/thumbs/pornhub.png old mode 100755 new mode 100644 index ad2fd552..dbe3e36b Binary files a/public/img/logos/mindgeek/thumbs/pornhub.png and b/public/img/logos/mindgeek/thumbs/pornhub.png differ diff --git a/public/img/logos/mindgeek/thumbs/propertysex.png b/public/img/logos/mindgeek/thumbs/propertysex.png old mode 100755 new mode 100644 index 75d9e3c6..ba0940eb Binary files a/public/img/logos/mindgeek/thumbs/propertysex.png and b/public/img/logos/mindgeek/thumbs/propertysex.png differ diff --git a/public/img/logos/mindgeek/thumbs/squirted.png b/public/img/logos/mindgeek/thumbs/squirted.png new file mode 100644 index 00000000..4b076a9d Binary files /dev/null and b/public/img/logos/mindgeek/thumbs/squirted.png differ diff --git a/public/img/logos/mindgeek/thumbs/transangels.png b/public/img/logos/mindgeek/thumbs/transangels.png old mode 100755 new mode 100644 index bc016870..1b0c4c31 Binary files a/public/img/logos/mindgeek/thumbs/transangels.png and b/public/img/logos/mindgeek/thumbs/transangels.png differ diff --git a/public/img/logos/mindgeek/thumbs/trueamateurs.png b/public/img/logos/mindgeek/thumbs/trueamateurs.png old mode 100755 new mode 100644 index ed7e324d..8240f240 Binary files a/public/img/logos/mindgeek/thumbs/trueamateurs.png and b/public/img/logos/mindgeek/thumbs/trueamateurs.png differ diff --git a/public/img/logos/mindgeek/thumbs/tube8vip.png b/public/img/logos/mindgeek/thumbs/tube8vip.png old mode 100755 new mode 100644 index 357e0a28..fb0993fe Binary files a/public/img/logos/mindgeek/thumbs/tube8vip.png and b/public/img/logos/mindgeek/thumbs/tube8vip.png differ diff --git a/seeds/02_sites.js b/seeds/02_sites.js index 6ebbee54..74fd9e89 100755 --- a/seeds/02_sites.js +++ b/seeds/02_sites.js @@ -5686,6 +5686,13 @@ const sites = [ parameters: { native: true }, parent: 'mindgeek', }, + { + slug: 'squirted', + name: 'Squirted', + url: 'https://www.squirted.com', + parameters: { native: true }, + parent: 'mindgeek', + }, // MIKE ADRIANO { slug: 'trueanal', diff --git a/src/scrapers/kink.js b/src/scrapers/kink.js index 18cf0a91..9b698bfb 100755 --- a/src/scrapers/kink.js +++ b/src/scrapers/kink.js @@ -2,7 +2,6 @@ const unprint = require('unprint'); -const qu = require('../utils/qu'); const http = require('../utils/http'); const slugify = require('../utils/slugify'); diff --git a/src/scrapers/mindgeek.js b/src/scrapers/mindgeek.js index 72e61a20..5686b843 100755 --- a/src/scrapers/mindgeek.js +++ b/src/scrapers/mindgeek.js @@ -185,10 +185,10 @@ function scrapeRelease(data, url, channel, networkName) { } function getUrl(site) { - const { searchParams } = new URL(site.url); + const { searchParams, pathname } = new URL(site.url); // if (search.match(/\?site=\d+/)) { - if (searchParams.has('site')) { + if (searchParams.has('site') || /\/site\/\d+/.test(pathname)) { return site.url; } @@ -290,8 +290,12 @@ function scrapeProfile(data, releases = [], networkName) { async function fetchLatest(site, page = 1, options) { const url = getUrl(site); - const { searchParams } = new URL(url); - const siteId = searchParams.get('site'); + const { searchParams, pathname } = new URL(url); + const siteId = searchParams.get('site') || Number(pathname.match(/\/site\/(\d+)\//)?.[1]); + + if (!siteId && !site.parameters?.native && !site.parameters?.extract) { + return null; + } const { session, instanceToken } = options.beforeNetwork?.headers?.Instance ? options.beforeNetwork diff --git a/src/tools/analvids.js b/src/tools/analvids.js index 94187d10..a5ea5b62 100755 --- a/src/tools/analvids.js +++ b/src/tools/analvids.js @@ -5,9 +5,11 @@ const bhttp = require('bhttp'); const slugify = require('../utils/slugify'); const { studios: oldStudios } = require('../../seeds/03_studios'); +/* const slugMap = { thay_ksada: 'thayksada2', }; +*/ async function init() { const res = await bhttp.get('https://pornbox.com/studio/list'); diff --git a/src/web/postgraphile.js b/src/web/postgraphile.js index 331ed9e5..c5194cd2 100755 --- a/src/web/postgraphile.js +++ b/src/web/postgraphile.js @@ -7,6 +7,7 @@ const { postgraphile } = require('postgraphile'); const PgConnectionFilterPlugin = require('postgraphile-plugin-connection-filter'); const PgSimplifyInflectorPlugin = require('@graphile-contrib/pg-simplify-inflector'); const PgOrderByRelatedPlugin = require('@graphile-contrib/pg-order-by-related'); +const PgAggregatesPlugin = require('@graphile/pg-aggregates').default; const { ActorPlugins, SitePlugins, ReleasePlugins, MediaPlugins } = require('./plugins/plugins'); @@ -18,6 +19,30 @@ async function pgSettings(req) { }; } +// console.log(PgAggregatesPlugin); + +const TagsAggregatePlugin = (builder) => { + builder.hook('build', (build) => { + const pgAggregateSpecs = [ + { + id: 'tags', + humanLabel: 'tags', + HumanLabel: 'Tags', + sqlAggregateWrap: (sqlFrag) => { + console.log('sql frag', sqlFrag); + return build.pgSql.fragment`sum(${sqlFrag})`; + }, + isSuitableType: (pgType) => { + // console.log('pg type', pgType); + return pgType.category === 'N'; + }, + }, + ]; + + build.pgAggregateSpecs = pgAggregateSpecs; // eslint-disable-line no-param-reassign + }); +}; + module.exports = postgraphile( connectionString, 'public', @@ -38,11 +63,13 @@ module.exports = postgraphile( appendPlugins: [ PgSimplifyInflectorPlugin, PgConnectionFilterPlugin, + PgAggregatesPlugin, PgOrderByRelatedPlugin, ...ActorPlugins, ...SitePlugins, ...ReleasePlugins, ...MediaPlugins, + TagsAggregatePlugin, ], pgSettings, },