diff --git a/lerna.json b/lerna.json index 17a93e7a05..3f4bf5ad60 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.1.46-alpha.14", + "version": "2.2.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 3e625813c0..cc58fc13e9 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "2.1.46-alpha.14", + "version": "2.2.3", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,8 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "2.1.46-alpha.14", + "@budibase/nano": "10.1.1", + "@budibase/types": "^2.2.3", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-cloudfront-sign": "2.2.0", @@ -36,7 +37,6 @@ "koa-passport": "4.1.4", "lodash": "4.17.21", "lodash.isarguments": "3.1.0", - "nano": "^10.1.0", "node-fetch": "2.6.7", "passport-google-oauth": "2.0.0", "passport-jwt": "4.0.0", diff --git a/packages/backend-core/src/db/couch/DatabaseImpl.ts b/packages/backend-core/src/db/couch/DatabaseImpl.ts index de06b4e8ee..9b4761d961 100644 --- a/packages/backend-core/src/db/couch/DatabaseImpl.ts +++ b/packages/backend-core/src/db/couch/DatabaseImpl.ts @@ -1,4 +1,4 @@ -import Nano from "nano" +import Nano from "@budibase/nano" import { AllDocsResponse, AnyDocument, diff --git a/packages/backend-core/yarn.lock b/packages/backend-core/yarn.lock index 5115a44095..249c614d82 100644 --- a/packages/backend-core/yarn.lock +++ b/packages/backend-core/yarn.lock @@ -470,6 +470,18 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@budibase/nano@10.1.1": + version "10.1.1" + resolved "https://registry.yarnpkg.com/@budibase/nano/-/nano-10.1.1.tgz#36ccda4d9bb64b5ee14dd2b27a295b40739b1038" + integrity sha512-kbMIzMkjVtl+xI0UPwVU0/pn8/ccxTyfzwBz6Z+ZiN2oUSb0fJCe0qwA6o8dxwSa8nZu4MbGAeMJl3CJndmWtA== + dependencies: + "@types/tough-cookie" "^4.0.2" + axios "^1.1.3" + http-cookie-agent "^4.0.2" + node-abort-controller "^3.0.1" + qs "^6.11.0" + tough-cookie "^4.1.2" + "@cspotcode/source-map-support@^0.8.0": version "0.8.1" resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" @@ -4034,18 +4046,6 @@ msgpackr@^1.5.2: optionalDependencies: msgpackr-extract "^2.1.2" -nano@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/nano/-/nano-10.1.0.tgz#afdd5a7440e62f09a8e23f41fcea328d27383922" - integrity sha512-COeN2TpLcHuSN44QLnPmfZCoCsKAg8/aelPOVqqm/2/MvRHDEA11/Kld5C4sLzDlWlhFZ3SO2WGJGevCsvcEzQ== - dependencies: - "@types/tough-cookie" "^4.0.2" - axios "^1.1.3" - http-cookie-agent "^4.0.2" - node-abort-controller "^3.0.1" - qs "^6.11.0" - tough-cookie "^4.1.2" - napi-macros@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" diff --git a/packages/bbui/package.json b/packages/bbui/package.json index c5b50b49a1..dbf07e74f5 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "2.1.46-alpha.14", + "version": "2.2.3", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "1.2.1", - "@budibase/string-templates": "2.1.46-alpha.14", + "@budibase/string-templates": "^2.2.3", "@spectrum-css/actionbutton": "1.0.1", "@spectrum-css/actiongroup": "1.0.1", "@spectrum-css/avatar": "3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index eff8b54d13..f1dafbb2a5 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "2.1.46-alpha.14", + "version": "2.2.3", "license": "GPL-3.0", "private": true, "scripts": { @@ -71,10 +71,10 @@ } }, "dependencies": { - "@budibase/bbui": "2.1.46-alpha.14", - "@budibase/client": "2.1.46-alpha.14", - "@budibase/frontend-core": "2.1.46-alpha.14", - "@budibase/string-templates": "2.1.46-alpha.14", + "@budibase/bbui": "^2.2.3", + "@budibase/client": "^2.2.3", + "@budibase/frontend-core": "^2.2.3", + "@budibase/string-templates": "^2.2.3", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte index d09faa34c9..a73db5648b 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte @@ -232,6 +232,7 @@ {filters} {bindings} {schemaFields} + datasource={{ type: "table", tableId }} panel={AutomationBindingPanel} fillWidth on:change={e => (tempFilters = e.detail)} diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index 4f5c3375bd..bdf2f46b2c 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -190,6 +190,7 @@ {filters} on:change={onFilter} disabled={!hasCols} + tableId={id} /> {/key} diff --git a/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte index be9c6259c6..5db4eb5288 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/TableFilterButton.svelte @@ -6,6 +6,7 @@ export let schema export let filters export let disabled = false + export let tableId const dispatch = createEventDispatcher() @@ -37,6 +38,7 @@ allowBindings={false} {filters} {schemaFields} + datasource={{ type: "table", tableId }} on:change={e => (tempValue = e.detail)} /> diff --git a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte index d495e37216..629e2024e7 100644 --- a/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte +++ b/packages/builder/src/components/design/settings/controls/FilterEditor/FilterDrawer.svelte @@ -25,7 +25,7 @@ export let panel = ClientBindingPanel export let allowBindings = true export let fillWidth = false - export let tableId + export let datasource const dispatch = createEventDispatcher() const { OperatorOptions } = Constants @@ -41,11 +41,7 @@ $: parseFilters(filters) $: dispatch("change", enrichFilters(rawFilters, matchAny)) - $: enrichedSchemaFields = getFields( - schemaFields || [], - { allowLinks: true }, - tableId - ) + $: enrichedSchemaFields = getFields(schemaFields || [], { allowLinks: true }) $: fieldOptions = enrichedSchemaFields.map(field => field.name) || [] $: valueTypeOptions = allowBindings ? ["Value", "Binding"] : ["Value"] @@ -119,7 +115,11 @@ const santizeOperator = filter => { // Ensure a valid operator is selected - const operators = getValidOperatorsForType(filter.type).map(x => x.value) + const operators = getValidOperatorsForType( + filter.type, + filter.field, + datasource + ).map(x => x.value) if (!operators.includes(filter.operator)) { filter.operator = operators[0] ?? OperatorOptions.Equals.value } @@ -201,7 +201,11 @@ /> onOperatorChange(filter, e.detail)} placeholder={null} diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index e1a7b73eaa..9f623143aa 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "2.1.46-alpha.14", + "version": "2.2.3", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "2.1.46-alpha.14", + "@budibase/bbui": "^2.2.3", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/frontend-core/src/utils/lucene.js b/packages/frontend-core/src/utils/lucene.js index 774ddbd834..427d8f8b97 100644 --- a/packages/frontend-core/src/utils/lucene.js +++ b/packages/frontend-core/src/utils/lucene.js @@ -7,7 +7,7 @@ const HBS_REGEX = /{{([^{].*?)}}/g * Returns the valid operator options for a certain data type * @param type the data type */ -export const getValidOperatorsForType = type => { +export const getValidOperatorsForType = (type, field, datasource) => { const Op = OperatorOptions const stringOps = [ Op.Equals, @@ -27,24 +27,37 @@ export const getValidOperatorsForType = type => { Op.NotEmpty, Op.In, ] + let ops = [] if (type === "string") { - return stringOps + ops = stringOps } else if (type === "number") { - return numOps + ops = numOps } else if (type === "options") { - return [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty, Op.In] + ops = [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty, Op.In] } else if (type === "array") { - return [Op.Contains, Op.NotContains, Op.Empty, Op.NotEmpty, Op.ContainsAny] + ops = [Op.Contains, Op.NotContains, Op.Empty, Op.NotEmpty, Op.ContainsAny] } else if (type === "boolean") { - return [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty] + ops = [Op.Equals, Op.NotEquals, Op.Empty, Op.NotEmpty] } else if (type === "longform") { - return stringOps + ops = stringOps } else if (type === "datetime") { - return numOps + ops = numOps } else if (type === "formula") { - return stringOps.concat([Op.MoreThan, Op.LessThan]) + ops = stringOps.concat([Op.MoreThan, Op.LessThan]) } - return [] + + // Filter out "like" for internal tables + const externalTable = datasource?.tableId?.includes("datasource_plus") + if (datasource?.type === "table" && !externalTable) { + ops = ops.filter(x => x !== Op.Like) + } + + // Only allow equal/not equal for _id in SQL tables + if (field === "_id" && externalTable) { + ops = [Op.Equals, Op.NotEquals] + } + + return ops } /** diff --git a/packages/sdk/package.json b/packages/sdk/package.json index c0bc2c5223..31249b8a7d 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/sdk", - "version": "2.1.46-alpha.14", + "version": "2.2.3", "description": "Budibase Public API SDK", "author": "Budibase", "license": "MPL-2.0", diff --git a/packages/server/package.json b/packages/server/package.json index e07ae269e0..bce3119a2e 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "2.1.46-alpha.14", + "version": "2.2.3", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -43,11 +43,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "2.1.46-alpha.14", - "@budibase/client": "2.1.46-alpha.14", - "@budibase/pro": "2.1.46-alpha.14", - "@budibase/string-templates": "2.1.46-alpha.14", - "@budibase/types": "2.1.46-alpha.14", + "@budibase/backend-core": "^2.2.3", + "@budibase/client": "^2.2.3", + "@budibase/pro": "2.2.3", + "@budibase/string-templates": "^2.2.3", + "@budibase/types": "^2.2.3", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/server/specs/resources/query.js b/packages/server/specs/resources/query.js index 1442e46a04..10544ee7eb 100644 --- a/packages/server/specs/resources/query.js +++ b/packages/server/specs/resources/query.js @@ -1,6 +1,6 @@ const Resource = require("./utils/Resource") const { object } = require("./utils") -const { BaseQueryVerbs } = require("../../src/constants") +const { BaseQueryVerbs } = require("../../dist/constants") const query = { _id: "query_datasource_plus_4d8be0c506b9465daf4bf84d890fdab6_454854487c574d45bc4029b1e153219e", diff --git a/packages/server/specs/resources/table.js b/packages/server/specs/resources/table.js index 523a3a9dfd..9bc57daf42 100644 --- a/packages/server/specs/resources/table.js +++ b/packages/server/specs/resources/table.js @@ -2,7 +2,7 @@ const { FieldTypes, RelationshipTypes, FormulaTypes, -} = require("../../src/constants") +} = require("../../dist/constants") const { object } = require("./utils") const Resource = require("./utils/Resource") diff --git a/packages/server/src/api/controllers/row/ExternalRequest.ts b/packages/server/src/api/controllers/row/ExternalRequest.ts index 8eb1ce8263..80ba4fd808 100644 --- a/packages/server/src/api/controllers/row/ExternalRequest.ts +++ b/packages/server/src/api/controllers/row/ExternalRequest.ts @@ -24,6 +24,7 @@ import { processObjectSync } from "@budibase/string-templates" import { cloneDeep } from "lodash/fp" import { processFormulas, processDates } from "../../../utilities/rowProcessor" import { context } from "@budibase/backend-core" +import { removeKeyNumbering } from "./utils" export interface ManyRelationship { tableId?: string @@ -54,15 +55,21 @@ function buildFilters( let idCopy: undefined | string | any[] = cloneDeep(id) if (filters) { // need to map over the filters and make sure the _id field isn't present - for (let filter of Object.values(filters)) { - if (filter._id && primary) { - const parts = breakRowIdField(filter._id) - for (let field of primary) { - filter[field] = parts.shift() + let prefix = 1 + for (let operator of Object.values(filters)) { + for (let field of Object.keys(operator || {})) { + if (removeKeyNumbering(field) === "_id") { + if (primary) { + const parts = breakRowIdField(operator[field]) + for (let field of primary) { + operator[`${prefix}:${field}`] = parts.shift() + } + prefix++ + } + // make sure this field doesn't exist on any filter + delete operator[field] } } - // make sure this field doesn't exist on any filter - delete filter._id } } // there is no id, just use the user provided filters diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index ba710d05d5..d40ab069ad 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1273,15 +1273,15 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.46-alpha.14": - version "2.1.46-alpha.14" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.46-alpha.14.tgz#825ba57d92c69133530d15dacb20b9f17d293886" - integrity sha512-shPf4ZgI222gKGCn7u/MgxPmFVsP7YLREpbzkyxnoxjBoXcRTrlgT51sG+VfUcFrX4LEOn13wraBrxxaNyixSg== +"@budibase/backend-core@2.2.3": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.3.tgz#e2c3214bdbd6fa5cc95038816ecc40a9a0538be9" + integrity sha512-vGOWkQ8Xk6p6Lcvbtj6Z4UMoZoZlllMwmnWkwBbwr0am9bVFBF9k65Ca/vioA1egsvmM9hKCCQV6xeDcUz8qaQ== dependencies: - "@budibase/types" "2.1.46-alpha.14" + "@budibase/nano" "10.1.1" + "@budibase/types" "^2.2.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" - aws-cloudfront-sign "2.2.0" aws-sdk "2.1030.0" bcrypt "5.0.1" bcryptjs "2.4.3" @@ -1294,7 +1294,6 @@ koa-passport "4.1.4" lodash "4.17.21" lodash.isarguments "3.1.0" - nano "^10.1.0" node-fetch "2.6.7" passport-google-oauth "2.0.0" passport-jwt "4.0.0" @@ -1361,17 +1360,28 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@2.1.46-alpha.14": - version "2.1.46-alpha.14" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.46-alpha.14.tgz#d6f08e9b3b68a57be75b8576dde99109b390ae8d" - integrity sha512-B8mtvC/Wpr/phFotDAdm9hHRLFUAFwA1g2TRNnocTmUzKUpcw/JMSNc7pxtdOgvWMsaY375l3z5Y/tySSKndpg== +"@budibase/nano@10.1.1": + version "10.1.1" + resolved "https://registry.yarnpkg.com/@budibase/nano/-/nano-10.1.1.tgz#36ccda4d9bb64b5ee14dd2b27a295b40739b1038" + integrity sha512-kbMIzMkjVtl+xI0UPwVU0/pn8/ccxTyfzwBz6Z+ZiN2oUSb0fJCe0qwA6o8dxwSa8nZu4MbGAeMJl3CJndmWtA== dependencies: - "@budibase/backend-core" "2.1.46-alpha.14" - "@budibase/types" "2.1.46-alpha.14" + "@types/tough-cookie" "^4.0.2" + axios "^1.1.3" + http-cookie-agent "^4.0.2" + node-abort-controller "^3.0.1" + qs "^6.11.0" + tough-cookie "^4.1.2" + +"@budibase/pro@2.2.3": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.3.tgz#2e307353597e36df74f80d8affe4ba5686f895fb" + integrity sha512-o93ara4THEzMLyNyym+BzcPfB0S8XL4ayRnwbaUnF1cqwbJbiFUv4QR9PC2mrRW7f2EuyVdG2CiCh8EGi05f/A== + dependencies: + "@budibase/backend-core" "2.2.3" + "@budibase/types" "2.2.3" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" - jsonwebtoken "8.5.1" node-fetch "^2.6.1" "@budibase/standard-components@^0.9.139": @@ -1392,10 +1402,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@2.1.46-alpha.14": - version "2.1.46-alpha.14" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.46-alpha.14.tgz#d3f90cd28dce19989206ee7dacad6ba1ae764d61" - integrity sha512-FXLE9XFCaA87jf7lXatGtSiSIiMIhIYGXJS2O5DhpYTYMCdT528DZs8h7R+5CuMsDwEF8WO1IlHTQ7Zw09jZZA== +"@budibase/types@2.2.3", "@budibase/types@^2.2.3": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.3.tgz#81ecc4d04cf74698bcd7ea77cee226b0dfd9d949" + integrity sha512-+LnzJvxbsUtFnSvd9uki6N7OPwmqu4R8nLXuLzDJyknHVdrLgkAduv+0AZ6WIqjgl6ADVcvk48Et40s0wotZxw== "@bull-board/api@3.7.0": version "3.7.0" @@ -4234,13 +4244,6 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -aws-cloudfront-sign@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/aws-cloudfront-sign/-/aws-cloudfront-sign-2.2.0.tgz#3910f5a6d0d90fec07f2b4ef8ab07f3eefb5625d" - integrity sha512-qG+rwZMP3KRTPPbVmWY8DlrT56AkA4iVOeo23vkdK2EXeW/brJFN2haSNKzVz+oYhFMEIzVVloeAcrEzuRkuVQ== - dependencies: - lodash "^3.6.0" - aws-sdk@2.1030.0: version "2.1030.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1030.0.tgz#24a856af3d2b8b37c14a8f59974993661c66fd82" @@ -10221,11 +10224,6 @@ lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17. resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -lodash@^3.6.0: - version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - integrity sha512-9mDDwqVIma6OZX79ZlDACZl8sBm0TEnkf99zV3iMA4GzkIT/9hiqP5mY0HoT1iNLCrKc/R1HByV+yJfRWVJryQ== - logform@^2.3.2, logform@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/logform/-/logform-2.4.0.tgz#131651715a17d50f09c2a2c1a524ff1a4164bcfe" @@ -10756,18 +10754,6 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA== -nano@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/nano/-/nano-10.1.0.tgz#afdd5a7440e62f09a8e23f41fcea328d27383922" - integrity sha512-COeN2TpLcHuSN44QLnPmfZCoCsKAg8/aelPOVqqm/2/MvRHDEA11/Kld5C4sLzDlWlhFZ3SO2WGJGevCsvcEzQ== - dependencies: - "@types/tough-cookie" "^4.0.2" - axios "^1.1.3" - http-cookie-agent "^4.0.2" - node-abort-controller "^3.0.1" - qs "^6.11.0" - tough-cookie "^4.1.2" - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index d7be07c1d1..6d878f4df8 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "2.1.46-alpha.14", + "version": "2.2.3", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 9f88f75a28..f090f0a2af 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "2.1.46-alpha.14", + "version": "2.2.3", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -13,12 +13,12 @@ }, "jest": {}, "devDependencies": { - "@types/json5": "^2.2.0", + "@budibase/nano": "10.1.1", + "@types/json5": "2.2.0", "@types/koa": "2.13.4", + "koa-body": "4.2.0", "@types/node": "14.18.20", "@types/pouchdb": "6.4.0", - "koa-body": "4.2.0", - "nano": "10.1.0", "rimraf": "3.0.2", "typescript": "4.7.3" } diff --git a/packages/types/src/sdk/db.ts b/packages/types/src/sdk/db.ts index 84daed0f90..50078ed6cc 100644 --- a/packages/types/src/sdk/db.ts +++ b/packages/types/src/sdk/db.ts @@ -1,5 +1,5 @@ import PouchDB from "pouchdb" -import Nano from "nano" +import Nano from "@budibase/nano" import { AllDocsResponse, AnyDocument, Document } from "../" export type PouchOptions = { diff --git a/packages/types/yarn.lock b/packages/types/yarn.lock index 9ba7015888..4acf3737a0 100644 --- a/packages/types/yarn.lock +++ b/packages/types/yarn.lock @@ -2,6 +2,18 @@ # yarn lockfile v1 +"@budibase/nano@10.1.1": + version "10.1.1" + resolved "https://registry.yarnpkg.com/@budibase/nano/-/nano-10.1.1.tgz#36ccda4d9bb64b5ee14dd2b27a295b40739b1038" + integrity sha512-kbMIzMkjVtl+xI0UPwVU0/pn8/ccxTyfzwBz6Z+ZiN2oUSb0fJCe0qwA6o8dxwSa8nZu4MbGAeMJl3CJndmWtA== + dependencies: + "@types/tough-cookie" "^4.0.2" + axios "^1.1.3" + http-cookie-agent "^4.0.2" + node-abort-controller "^3.0.1" + qs "^6.11.0" + tough-cookie "^4.1.2" + "@types/accepts@*": version "1.3.5" resolved "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz#c34bec115cfc746e04fe5a059df4ce7e7b391575" @@ -82,7 +94,7 @@ resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-1.8.2.tgz#7315b4c4c54f82d13fa61c228ec5c2ea5cc9e0e1" integrity sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w== -"@types/json5@^2.2.0": +"@types/json5@2.2.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-2.2.0.tgz#afff29abf9182a7d4a7e39105ca051f11c603d13" integrity sha512-NrVug5woqbvNZ0WX+Gv4R+L4TGddtmFek2u8RtccAgFZWtS9QXF2xCXY22/M4nzkaKF0q9Fc6M/5rxLDhfwc/A== @@ -552,18 +564,6 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -nano@10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/nano/-/nano-10.1.0.tgz#afdd5a7440e62f09a8e23f41fcea328d27383922" - integrity sha512-COeN2TpLcHuSN44QLnPmfZCoCsKAg8/aelPOVqqm/2/MvRHDEA11/Kld5C4sLzDlWlhFZ3SO2WGJGevCsvcEzQ== - dependencies: - "@types/tough-cookie" "^4.0.2" - axios "^1.1.3" - http-cookie-agent "^4.0.2" - node-abort-controller "^3.0.1" - qs "^6.11.0" - tough-cookie "^4.1.2" - node-abort-controller@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.0.1.tgz#f91fa50b1dee3f909afabb7e261b1e1d6b0cb74e" diff --git a/packages/worker/package.json b/packages/worker/package.json index 2cf0819a48..62bb22ec6e 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "2.1.46-alpha.14", + "version": "2.2.3", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -36,10 +36,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "2.1.46-alpha.14", - "@budibase/pro": "2.1.46-alpha.14", - "@budibase/string-templates": "2.1.46-alpha.14", - "@budibase/types": "2.1.46-alpha.14", + "@budibase/backend-core": "^2.2.3", + "@budibase/pro": "2.2.3", + "@budibase/string-templates": "^2.2.3", + "@budibase/types": "^2.2.3", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", @@ -77,9 +77,9 @@ "@types/node": "14.18.20", "@types/node-fetch": "2.6.1", "@types/pouchdb": "6.4.0", - "@types/server-destroy": "1.0.1", "@types/uuid": "8.3.4", "@typescript-eslint/parser": "5.45.0", + "@types/server-destroy": "1.0.1", "copyfiles": "2.4.1", "eslint": "6.8.0", "jest": "28.1.1", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 562574a7d0..4d5602339f 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -470,15 +470,15 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@2.1.46-alpha.14": - version "2.1.46-alpha.14" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.1.46-alpha.14.tgz#825ba57d92c69133530d15dacb20b9f17d293886" - integrity sha512-shPf4ZgI222gKGCn7u/MgxPmFVsP7YLREpbzkyxnoxjBoXcRTrlgT51sG+VfUcFrX4LEOn13wraBrxxaNyixSg== +"@budibase/backend-core@2.2.3": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-2.2.3.tgz#e2c3214bdbd6fa5cc95038816ecc40a9a0538be9" + integrity sha512-vGOWkQ8Xk6p6Lcvbtj6Z4UMoZoZlllMwmnWkwBbwr0am9bVFBF9k65Ca/vioA1egsvmM9hKCCQV6xeDcUz8qaQ== dependencies: - "@budibase/types" "2.1.46-alpha.14" + "@budibase/nano" "10.1.1" + "@budibase/types" "^2.2.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" - aws-cloudfront-sign "2.2.0" aws-sdk "2.1030.0" bcrypt "5.0.1" bcryptjs "2.4.3" @@ -491,7 +491,6 @@ koa-passport "4.1.4" lodash "4.17.21" lodash.isarguments "3.1.0" - nano "^10.1.0" node-fetch "2.6.7" passport-google-oauth "2.0.0" passport-jwt "4.0.0" @@ -508,23 +507,34 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@2.1.46-alpha.14": - version "2.1.46-alpha.14" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.1.46-alpha.14.tgz#d6f08e9b3b68a57be75b8576dde99109b390ae8d" - integrity sha512-B8mtvC/Wpr/phFotDAdm9hHRLFUAFwA1g2TRNnocTmUzKUpcw/JMSNc7pxtdOgvWMsaY375l3z5Y/tySSKndpg== +"@budibase/nano@10.1.1": + version "10.1.1" + resolved "https://registry.yarnpkg.com/@budibase/nano/-/nano-10.1.1.tgz#36ccda4d9bb64b5ee14dd2b27a295b40739b1038" + integrity sha512-kbMIzMkjVtl+xI0UPwVU0/pn8/ccxTyfzwBz6Z+ZiN2oUSb0fJCe0qwA6o8dxwSa8nZu4MbGAeMJl3CJndmWtA== dependencies: - "@budibase/backend-core" "2.1.46-alpha.14" - "@budibase/types" "2.1.46-alpha.14" + "@types/tough-cookie" "^4.0.2" + axios "^1.1.3" + http-cookie-agent "^4.0.2" + node-abort-controller "^3.0.1" + qs "^6.11.0" + tough-cookie "^4.1.2" + +"@budibase/pro@2.2.3": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-2.2.3.tgz#2e307353597e36df74f80d8affe4ba5686f895fb" + integrity sha512-o93ara4THEzMLyNyym+BzcPfB0S8XL4ayRnwbaUnF1cqwbJbiFUv4QR9PC2mrRW7f2EuyVdG2CiCh8EGi05f/A== + dependencies: + "@budibase/backend-core" "2.2.3" + "@budibase/types" "2.2.3" "@koa/router" "8.0.8" bull "4.10.1" joi "17.6.0" - jsonwebtoken "8.5.1" node-fetch "^2.6.1" -"@budibase/types@2.1.46-alpha.14": - version "2.1.46-alpha.14" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.1.46-alpha.14.tgz#d3f90cd28dce19989206ee7dacad6ba1ae764d61" - integrity sha512-FXLE9XFCaA87jf7lXatGtSiSIiMIhIYGXJS2O5DhpYTYMCdT528DZs8h7R+5CuMsDwEF8WO1IlHTQ7Zw09jZZA== +"@budibase/types@2.2.3", "@budibase/types@^2.2.3": + version "2.2.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.3.tgz#81ecc4d04cf74698bcd7ea77cee226b0dfd9d949" + integrity sha512-+LnzJvxbsUtFnSvd9uki6N7OPwmqu4R8nLXuLzDJyknHVdrLgkAduv+0AZ6WIqjgl6ADVcvk48Et40s0wotZxw== "@cspotcode/source-map-support@^0.8.0": version "0.8.1" @@ -1884,13 +1894,6 @@ atomic-sleep@^1.0.0: resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== -aws-cloudfront-sign@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/aws-cloudfront-sign/-/aws-cloudfront-sign-2.2.0.tgz#3910f5a6d0d90fec07f2b4ef8ab07f3eefb5625d" - integrity sha512-qG+rwZMP3KRTPPbVmWY8DlrT56AkA4iVOeo23vkdK2EXeW/brJFN2haSNKzVz+oYhFMEIzVVloeAcrEzuRkuVQ== - dependencies: - lodash "^3.6.0" - aws-sdk@2.1030.0: version "2.1030.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1030.0.tgz#24a856af3d2b8b37c14a8f59974993661c66fd82" @@ -5234,11 +5237,6 @@ lodash@4.17.21, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -lodash@^3.6.0: - version "3.10.1" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" - integrity sha512-9mDDwqVIma6OZX79ZlDACZl8sBm0TEnkf99zV3iMA4GzkIT/9hiqP5mY0HoT1iNLCrKc/R1HByV+yJfRWVJryQ== - lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" @@ -5514,18 +5512,6 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nano@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/nano/-/nano-10.1.0.tgz#afdd5a7440e62f09a8e23f41fcea328d27383922" - integrity sha512-COeN2TpLcHuSN44QLnPmfZCoCsKAg8/aelPOVqqm/2/MvRHDEA11/Kld5C4sLzDlWlhFZ3SO2WGJGevCsvcEzQ== - dependencies: - "@types/tough-cookie" "^4.0.2" - axios "^1.1.3" - http-cookie-agent "^4.0.2" - node-abort-controller "^3.0.1" - qs "^6.11.0" - tough-cookie "^4.1.2" - napi-macros@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b"