From 25d0f3f518af8c0d3eaab8e254b9cc59f7eea99f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 28 Jun 2023 11:59:53 +0100 Subject: [PATCH 01/22] Adding settings tab for SQL datasources. --- .../data/datasource/[datasourceId]/index.svelte | 7 +++++++ packages/server/src/integrations/utils.ts | 14 ++------------ packages/shared-core/src/helpers/integrations.ts | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/index.svelte index 5b1715c46f..837cd7f675 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/index.svelte @@ -10,6 +10,7 @@ import RestAuthenticationPanel from "./_components/panels/Authentication/index.svelte" import RestVariablesPanel from "./_components/panels/Variables/index.svelte" import PromptQueryModal from "./_components/PromptQueryModal.svelte" + import { helpers } from "@budibase/shared-core" let selectedPanel = null let panelOptions = [] @@ -39,6 +40,10 @@ panelOptions = ["Queries"] selectedPanel = "Queries" } + // always the last option for SQL + if (helpers.isSQL(datasource)) { + panelOptions.push("Settings") + } } @@ -82,6 +87,8 @@ {:else if selectedPanel === "Variables"} + {:else if selectedPanel === "Settings"} + Settings {:else} Something went wrong {/if} diff --git a/packages/server/src/integrations/utils.ts b/packages/server/src/integrations/utils.ts index cc3caa6d5b..75deaf7f30 100644 --- a/packages/server/src/integrations/utils.ts +++ b/packages/server/src/integrations/utils.ts @@ -1,6 +1,7 @@ import { SourceName, SqlQuery, Datasource, Table } from "@budibase/types" import { DocumentType, SEPARATOR } from "../db/utils" import { FieldTypes, BuildSchemaErrors, InvalidColumns } from "../constants" +import { helpers } from "@budibase/shared-core" const DOUBLE_SEPARATOR = `${SEPARATOR}${SEPARATOR}` const ROW_ID_REGEX = /^\[.*]$/g @@ -178,18 +179,7 @@ export function getSqlQuery(query: SqlQuery | string): SqlQuery { } } -export function isSQL(datasource: Datasource): boolean { - if (!datasource || !datasource.source) { - return false - } - const SQL = [ - SourceName.POSTGRES, - SourceName.SQL_SERVER, - SourceName.MYSQL, - SourceName.ORACLE, - ] - return SQL.indexOf(datasource.source) !== -1 -} +export const isSQL = helpers.isSQL export function isIsoDateString(str: string) { if (!/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(str)) { diff --git a/packages/shared-core/src/helpers/integrations.ts b/packages/shared-core/src/helpers/integrations.ts index a7b74885d8..b8c220c6a5 100644 --- a/packages/shared-core/src/helpers/integrations.ts +++ b/packages/shared-core/src/helpers/integrations.ts @@ -1,5 +1,18 @@ -import { SourceName } from "@budibase/types" +import { Datasource, SourceName } from "@budibase/types" export function isGoogleSheets(type: SourceName) { return type === SourceName.GOOGLE_SHEETS } + +export function isSQL(datasource: Datasource): boolean { + if (!datasource || !datasource.source) { + return false + } + const SQL = [ + SourceName.POSTGRES, + SourceName.SQL_SERVER, + SourceName.MYSQL, + SourceName.ORACLE, + ] + return SQL.indexOf(datasource.source) !== -1 +} From 1e5492b18ddfc5e4c19b068ef72a5f815d31aebf Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 21 Jun 2023 12:01:42 +0100 Subject: [PATCH 02/22] Type mssql --- packages/server/package.json | 1 + .../src/integrations/microsoftSqlServer.ts | 14 +++---- yarn.lock | 42 +++++++++++++++---- 3 files changed, 41 insertions(+), 16 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 08234bda4c..1ee420e1f2 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -143,6 +143,7 @@ "@types/koa": "2.13.4", "@types/koa__router": "8.0.8", "@types/lodash": "4.14.180", + "@types/mssql": "6.0.7", "@types/node": "14.18.20", "@types/node-fetch": "2.6.1", "@types/oracledb": "5.2.2", diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 151b30d65f..ee4cc968c9 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -20,7 +20,7 @@ import { } from "./utils" import Sql from "./base/sql" import { MSSQLTablesResponse, MSSQLColumn } from "./base/types" -const sqlServer = require("mssql") +import sqlServer from "mssql" const DEFAULT_SCHEMA = "dbo" interface MSSQLConfig { @@ -96,8 +96,8 @@ const SCHEMA: Integration = { class SqlServerIntegration extends Sql implements DatasourcePlus { private readonly config: MSSQLConfig private index: number = 0 - private readonly pool: any - private client: any + private readonly pool: sqlServer.ConnectionPool + private client?: sqlServer.ConnectionPool public tables: Record = {} public schemaErrors: Record = {} @@ -116,15 +116,15 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { this.config = config const clientCfg = { ...this.config, + port: +this.config, options: { encrypt: this.config.encrypt, enableArithAbort: true, }, } delete clientCfg.encrypt - if (!this.pool) { - this.pool = new sqlServer.ConnectionPool(clientCfg) - } + + this.pool = new sqlServer.ConnectionPool(clientCfg) } async testConnection() { @@ -161,7 +161,7 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { query: SqlQuery, operation: string | undefined = undefined ) { - const client = this.client + const client = this.client! const request = client.request() this.index = 0 try { diff --git a/yarn.lock b/yarn.lock index 4c02b28ac2..49622000e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -149,9 +149,9 @@ integrity sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw== "@azure/ms-rest-js@^2.0.4": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@azure/ms-rest-js/-/ms-rest-js-2.6.4.tgz#b0a0f89841434471adf757d09e7e39e8ecfcd650" - integrity sha512-2sbOpGhlBfv9itWdF7Qlk0CmoQCARxe5unwjNOprU7OdgEgabQncZ35L5u1A+zgdkVtNYF9Eo6XAhXzTweIhag== + version "2.6.6" + resolved "https://registry.yarnpkg.com/@azure/ms-rest-js/-/ms-rest-js-2.6.6.tgz#a2ae4a515565ae1b73729b52b25875853bb3240a" + integrity sha512-WYIda8VvrkZE68xHgOxUXvjThxNf1nnGPPe0rAljqK5HJHIZ12Pi3YhEDOn3Ge7UnwaaM3eFO0VtAy4nGVI27Q== dependencies: "@azure/core-auth" "^1.1.4" abort-controller "^3.0.0" @@ -161,7 +161,7 @@ tslib "^1.10.0" tunnel "0.0.6" uuid "^8.3.2" - xml2js "^0.4.19" + xml2js "^0.5.0" "@azure/ms-rest-nodeauth@^3.0.10": version "3.1.1" @@ -5755,6 +5755,14 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== +"@types/mssql@6.0.7": + version "6.0.7" + resolved "https://registry.yarnpkg.com/@types/mssql/-/mssql-6.0.7.tgz#47202e4d782a7414f4b51c8de22f0dc7a76d2469" + integrity sha512-OWu9DNlRrbSz/cCn5RbYxm9S/Y+tiFHNEQXfSnZzyJKGeEo4edA1JDgVvu90RKPc+d703RsbllyXkZ8MNjNOSA== + dependencies: + "@types/node" "*" + "@types/tedious" "*" + "@types/node-fetch@2.6.1": version "2.6.1" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975" @@ -6123,6 +6131,13 @@ "@types/node" "*" minipass "^4.0.0" +"@types/tedious@*": + version "4.0.9" + resolved "https://registry.yarnpkg.com/@types/tedious/-/tedious-4.0.9.tgz#baa3892e45c63d7aac54d7bf5b01385d210ff19e" + integrity sha512-ipwFvfy9b2m0gjHsIX0D6NAAwGCKokzf5zJqUZHUGt+7uWVlBIy6n2eyMgiKQ8ChLFVxic/zwQUhjLYNzbHDRA== + dependencies: + "@types/node" "*" + "@types/tern@*": version "0.23.4" resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.4.tgz#03926eb13dbeaf3ae0d390caf706b2643a0127fb" @@ -6475,9 +6490,9 @@ integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== "@xmldom/xmldom@^0.8.3": - version "0.8.6" - resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.6.tgz#8a1524eb5bd5e965c1e3735476f0262469f71440" - integrity sha512-uRjjusqpoqfmRkTaNuLJ2VohVr67Q5YwDATW3VU7PfzTj6IRaihGrYI7zckGZjxQPBIp63nfvJbM+Yu5ICh0Bg== + version "0.8.8" + resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.8.tgz#d0d11511cbc1de77e53342ad1546a4d487d6ea72" + integrity sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q== "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -21444,7 +21459,16 @@ readable-stream@^2.1.4, readable-stream@^2.3.0, readable-stream@^2.3.5: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.1, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.5.0, readable-stream@^3.6.0: +readable-stream@^3.0.1: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.5.0, readable-stream@^3.6.0: version "3.6.1" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.1.tgz#f9f9b5f536920253b3d26e7660e7da4ccff9bb62" integrity sha512-+rQmrWMYGA90yenhTYsLWAsLsqVC8osOw6PKE1HDYiO0gdPeKe/xDHNzIAIn4C91YQ6oenEhfYqqc1883qHbjQ== @@ -25846,7 +25870,7 @@ xml2js@0.4.19: sax ">=0.6.0" xmlbuilder "~9.0.1" -xml2js@0.5.0: +xml2js@0.5.0, xml2js@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7" integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA== From 94b084a24517370d18c8020cfeccd26e1513bc9e Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 21 Jun 2023 12:06:34 +0100 Subject: [PATCH 03/22] Update mssql to latest --- packages/server/package.json | 4 ++-- yarn.lock | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 1ee420e1f2..4aeec94cf6 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -99,7 +99,7 @@ "lodash": "4.17.21", "memorystream": "0.3.1", "mongodb": "5.6", - "mssql": "6.2.3", + "mssql": "9.1.1", "mysql2": "2.3.3", "node-fetch": "2.6.7", "object-sizeof": "2.6.1", @@ -143,7 +143,7 @@ "@types/koa": "2.13.4", "@types/koa__router": "8.0.8", "@types/lodash": "4.14.180", - "@types/mssql": "6.0.7", + "@types/mssql": "8.1.2", "@types/node": "14.18.20", "@types/node-fetch": "2.6.1", "@types/oracledb": "5.2.2", diff --git a/yarn.lock b/yarn.lock index 49622000e4..5c5edf6f25 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5755,13 +5755,14 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== -"@types/mssql@6.0.7": - version "6.0.7" - resolved "https://registry.yarnpkg.com/@types/mssql/-/mssql-6.0.7.tgz#47202e4d782a7414f4b51c8de22f0dc7a76d2469" - integrity sha512-OWu9DNlRrbSz/cCn5RbYxm9S/Y+tiFHNEQXfSnZzyJKGeEo4edA1JDgVvu90RKPc+d703RsbllyXkZ8MNjNOSA== +"@types/mssql@8.1.2": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@types/mssql/-/mssql-8.1.2.tgz#00cbe3ce95586e40b47e3744ba02a54695c62de8" + integrity sha512-hoDM+mZUClfXu0J1pyVdbhv2Ve0dl0TdagAE3M5rd1slqoVEEHuNObPD+giwtJgyo99CcS58qbF9ektVKdxSfQ== dependencies: "@types/node" "*" "@types/tedious" "*" + tarn "^3.0.1" "@types/node-fetch@2.6.1": version "2.6.1" @@ -23996,7 +23997,7 @@ tarn@^1.1.5: resolved "https://registry.yarnpkg.com/tarn/-/tarn-1.1.5.tgz#7be88622e951738b9fa3fb77477309242cdddc2d" integrity sha512-PMtJ3HCLAZeedWjJPgGnCvcphbCOMbtZpjKgLq3qM5Qq9aQud+XHrL0WlrlgnTyS8U+jrjGbEXprFcQrxPy52g== -tarn@^3.0.2: +tarn@^3.0.1, tarn@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.2.tgz#73b6140fbb881b71559c4f8bfde3d9a4b3d27693" integrity sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ== From b075f4db1b4e3a98c62be9a34b1387e2e003b0ef Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 21 Jun 2023 14:56:15 +0100 Subject: [PATCH 04/22] Yarn.lock --- yarn.lock | 343 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 193 insertions(+), 150 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5c5edf6f25..40753102e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -69,14 +69,14 @@ call-me-maybe "^1.0.1" z-schema "^5.0.1" -"@azure/abort-controller@^1.0.0": +"@azure/abort-controller@^1.0.0", "@azure/abort-controller@^1.0.4": version "1.1.0" resolved "https://registry.yarnpkg.com/@azure/abort-controller/-/abort-controller-1.1.0.tgz#788ee78457a55af8a1ad342acb182383d2119249" integrity sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw== dependencies: tslib "^2.2.0" -"@azure/core-auth@^1.1.4", "@azure/core-auth@^1.3.0": +"@azure/core-auth@^1.3.0", "@azure/core-auth@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.4.0.tgz#6fa9661c1705857820dbc216df5ba5665ac36a9e" integrity sha512-HFrcTgmuSuukRf/EdPmqBrc5l6Q5Uu+2TbuhaKbgaCpP2TfAeiNaQPAadxO+CYBRHGUzIDteMAjFspFLDLnKVQ== @@ -84,6 +84,28 @@ "@azure/abort-controller" "^1.0.0" tslib "^2.2.0" +"@azure/core-client@^1.3.0", "@azure/core-client@^1.4.0", "@azure/core-client@^1.5.0": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@azure/core-client/-/core-client-1.7.3.tgz#f8cb2a1f91e8bc4921fa2e745cfdfda3e6e491a3" + integrity sha512-kleJ1iUTxcO32Y06dH9Pfi9K4U+Tlb111WXEnbt7R/ne+NLRwppZiTGJuTD5VVoxTMK5NTbEtm5t2vcdNCFe2g== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-auth" "^1.4.0" + "@azure/core-rest-pipeline" "^1.9.1" + "@azure/core-tracing" "^1.0.0" + "@azure/core-util" "^1.0.0" + "@azure/logger" "^1.0.0" + tslib "^2.2.0" + +"@azure/core-http-compat@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@azure/core-http-compat/-/core-http-compat-1.3.0.tgz#bf3d8ae1e310103f2b82550f36fd2a99c9b4d3f4" + integrity sha512-ZN9avruqbQ5TxopzG3ih3KRy52n8OAbitX3fnZT5go4hzu0J+KVPSzkL+Wt3hpJpdG8WIfg1sBD1tWkgUdEpBA== + dependencies: + "@azure/abort-controller" "^1.0.4" + "@azure/core-client" "^1.3.0" + "@azure/core-rest-pipeline" "^1.3.0" + "@azure/core-http@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@azure/core-http/-/core-http-3.0.0.tgz#345845f9ba479a5ee41efc3fd7a13e82d2a0ec47" @@ -120,6 +142,21 @@ dependencies: tslib "^2.2.0" +"@azure/core-rest-pipeline@^1.1.0", "@azure/core-rest-pipeline@^1.3.0", "@azure/core-rest-pipeline@^1.8.0", "@azure/core-rest-pipeline@^1.9.1": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@azure/core-rest-pipeline/-/core-rest-pipeline-1.11.0.tgz#fc0e8f56caac08a9d4ac91c07a6c5a360ea31c82" + integrity sha512-nB4KXl6qAyJmBVLWA7SakT4tzpYZTCk4pvRBeI+Ye0WYSOrlTqlMhc4MSS/8atD3ufeYWdkN380LLoXlUUzThw== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-auth" "^1.4.0" + "@azure/core-tracing" "^1.0.1" + "@azure/core-util" "^1.3.0" + "@azure/logger" "^1.0.0" + form-data "^4.0.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.0" + tslib "^2.2.0" + "@azure/core-tracing@1.0.0-preview.13": version "1.0.0-preview.13" resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz#55883d40ae2042f6f1e12b17dd0c0d34c536d644" @@ -128,6 +165,21 @@ "@opentelemetry/api" "^1.0.1" tslib "^2.2.0" +"@azure/core-tracing@^1.0.0", "@azure/core-tracing@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@azure/core-tracing/-/core-tracing-1.0.1.tgz#352a38cbea438c4a83c86b314f48017d70ba9503" + integrity sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw== + dependencies: + tslib "^2.2.0" + +"@azure/core-util@^1.0.0", "@azure/core-util@^1.3.0": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.3.2.tgz#3f8cfda1e87fac0ce84f8c1a42fcd6d2a986632d" + integrity sha512-2bECOUh88RvL1pMZTcc6OzfobBeWDBf5oBbhjIhT1MV9otMVWCzpOJkkiKtrnO88y5GGBelgY8At73KGAdbkeQ== + dependencies: + "@azure/abort-controller" "^1.0.0" + tslib "^2.2.0" + "@azure/core-util@^1.1.1": version "1.2.0" resolved "https://registry.yarnpkg.com/@azure/core-util/-/core-util-1.2.0.tgz#3499deba1fc36dda6f1912b791809b6f15d4a392" @@ -136,6 +188,45 @@ "@azure/abort-controller" "^1.0.0" tslib "^2.2.0" +"@azure/identity@^2.0.4": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@azure/identity/-/identity-2.1.0.tgz#89f0bfc1d1264dfd3d0cb19837c33a9c6706d548" + integrity sha512-BPDz1sK7Ul9t0l9YKLEa8PHqWU4iCfhGJ+ELJl6c8CP3TpJt2urNCbm0ZHsthmxRsYoMPbz2Dvzj30zXZVmAFw== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-auth" "^1.3.0" + "@azure/core-client" "^1.4.0" + "@azure/core-rest-pipeline" "^1.1.0" + "@azure/core-tracing" "^1.0.0" + "@azure/core-util" "^1.0.0" + "@azure/logger" "^1.0.0" + "@azure/msal-browser" "^2.26.0" + "@azure/msal-common" "^7.0.0" + "@azure/msal-node" "^1.10.0" + events "^3.0.0" + jws "^4.0.0" + open "^8.0.0" + stoppable "^1.1.0" + tslib "^2.2.0" + uuid "^8.3.0" + +"@azure/keyvault-keys@^4.4.0": + version "4.7.1" + resolved "https://registry.yarnpkg.com/@azure/keyvault-keys/-/keyvault-keys-4.7.1.tgz#c35415610ca5301f92e2ad7b30fd569609d4b32d" + integrity sha512-zfmlZQCw1Yz+aPhgZmWOYBUzaKmfBzR2yceAE4S6hKDl7YZraTguuXmtFbCqjRvpz+pIMKAK25fENay9mFy1hQ== + dependencies: + "@azure/abort-controller" "^1.0.0" + "@azure/core-auth" "^1.3.0" + "@azure/core-client" "^1.5.0" + "@azure/core-http-compat" "^1.3.0" + "@azure/core-lro" "^2.2.0" + "@azure/core-paging" "^1.1.1" + "@azure/core-rest-pipeline" "^1.8.0" + "@azure/core-tracing" "^1.0.0" + "@azure/core-util" "^1.0.0" + "@azure/logger" "^1.0.0" + tslib "^2.2.0" + "@azure/logger@^1.0.0": version "1.0.4" resolved "https://registry.yarnpkg.com/@azure/logger/-/logger-1.0.4.tgz#28bc6d0e5b3c38ef29296b32d35da4e483593fa1" @@ -143,34 +234,31 @@ dependencies: tslib "^2.2.0" -"@azure/ms-rest-azure-env@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@azure/ms-rest-azure-env/-/ms-rest-azure-env-2.0.0.tgz#45809f89763a480924e21d3c620cd40866771625" - integrity sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw== - -"@azure/ms-rest-js@^2.0.4": - version "2.6.6" - resolved "https://registry.yarnpkg.com/@azure/ms-rest-js/-/ms-rest-js-2.6.6.tgz#a2ae4a515565ae1b73729b52b25875853bb3240a" - integrity sha512-WYIda8VvrkZE68xHgOxUXvjThxNf1nnGPPe0rAljqK5HJHIZ12Pi3YhEDOn3Ge7UnwaaM3eFO0VtAy4nGVI27Q== +"@azure/msal-browser@^2.26.0": + version "2.37.1" + resolved "https://registry.yarnpkg.com/@azure/msal-browser/-/msal-browser-2.37.1.tgz#7e3fa7df9c6e74eb1fb640e73ef3b5b4407ee98d" + integrity sha512-EoKQISEpIY39Ru1OpWkeFZBcwp6Y0bG81bVmdyy4QJebPPDdVzfm62PSU0XFIRc3bqjZ4PBKBLMYLuo9NZYAow== dependencies: - "@azure/core-auth" "^1.1.4" - abort-controller "^3.0.0" - form-data "^2.5.0" - node-fetch "^2.6.7" - tough-cookie "^3.0.1" - tslib "^1.10.0" - tunnel "0.0.6" - uuid "^8.3.2" - xml2js "^0.5.0" + "@azure/msal-common" "13.1.0" -"@azure/ms-rest-nodeauth@^3.0.10": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@azure/ms-rest-nodeauth/-/ms-rest-nodeauth-3.1.1.tgz#2624222f0685ae580801d6f1abeab20923814693" - integrity sha512-UA/8dgLy3+ZiwJjAZHxL4MUB14fFQPkaAOZ94jsTW/Z6WmoOeny2+cLk0+dyIX/iH6qSrEWKwbStEeB970B9pA== +"@azure/msal-common@13.1.0": + version "13.1.0" + resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-13.1.0.tgz#73a787ec1e7880c30b187cf451404af547d95339" + integrity sha512-wj+ULrRB0HTuMmtrMjg8j3guCx32GE2BCPbsMCZkHgL1BZetC3o/Su5UJEQMX1HNc9CrIaQNx5WaKWHygYDe0g== + +"@azure/msal-common@^7.0.0": + version "7.6.0" + resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-7.6.0.tgz#b52e97ef540275f72611cff57937dfa0b34cdcca" + integrity sha512-XqfbglUTVLdkHQ8F9UQJtKseRr3sSnr9ysboxtoswvaMVaEfvyLtMoHv9XdKUfOc0qKGzNgRFd9yRjIWVepl6Q== + +"@azure/msal-node@^1.10.0": + version "1.17.3" + resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-1.17.3.tgz#1a0bbecb0b3e5e63d50ccb27c9cb3bae5a6c1b65" + integrity sha512-slsa+388bQQWnWH1V91KL+zV57rIp/0OQFfF0EmVMY8gnEIkAnpWWFUVBTTMbxEyjEFMk5ZW9xiHvHBcYFHzDw== dependencies: - "@azure/ms-rest-azure-env" "^2.0.0" - "@azure/ms-rest-js" "^2.0.4" - adal-node "^0.2.2" + "@azure/msal-common" "13.1.0" + jsonwebtoken "^9.0.0" + uuid "^8.3.0" "@azure/storage-blob@^12.11.0": version "12.13.0" @@ -3576,6 +3664,11 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" +"@js-joda/core@^5.2.0": + version "5.5.3" + resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-5.5.3.tgz#defac1f9af382178104ad327af1ec97446039752" + integrity sha512-7dqNYwG8gCt4hfg5PKgM7xLEcgSBcx/UgC92OMnhMmvAnq11QzDFPrxUkNR/u5kn17WWLZ8beZ4A3Qrz4pZcmQ== + "@jsdevtools/ono@^7.1.3": version "7.1.3" resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" @@ -5223,6 +5316,11 @@ async "^3.2.1" simple-lru-cache "^0.0.2" +"@tediousjs/connection-string@^0.4.1": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@tediousjs/connection-string/-/connection-string-0.4.2.tgz#7bd1c68a7b075439768e85e9fa116b7e9020ec95" + integrity sha512-1R9UC7Qc5wief2oJL+c1+d7v1/oPBayL85u8L/jV2DzIKput1TZ8ZUjj2nxQaSfzu210zp0oFWUrYUiUs8NhBQ== + "@testing-library/dom@^8.1.0": version "8.20.0" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.20.0.tgz#914aa862cef0f5e89b98cc48e3445c4c921010f6" @@ -5800,7 +5898,7 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.14.5.tgz#4a13a6445862159303fc38586598a9396fc408b3" integrity sha512-CRT4tMK/DHYhw1fcCEBwME9CSaZNclxfzVMe7GsO6ULSwsttbj70wSiX6rZdIjGblu93sTJxLdhNIT85KKI7Qw== -"@types/node@>=4.2.0 < 13", "@types/node@^12.12.17": +"@types/node@>=4.2.0 < 13": version "12.20.55" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== @@ -5998,14 +6096,6 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== -"@types/readable-stream@^2.3.5": - version "2.3.15" - resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-2.3.15.tgz#3d79c9ceb1b6a57d5f6e6976f489b9b5384321ae" - integrity sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ== - dependencies: - "@types/node" "*" - safe-buffer "~5.1.1" - "@types/redis@4.0.11": version "4.0.11" resolved "https://registry.yarnpkg.com/@types/redis/-/redis-4.0.11.tgz#0bb4c11ac9900a21ad40d2a6768ec6aaf651c0e1" @@ -6490,11 +6580,6 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== -"@xmldom/xmldom@^0.8.3": - version "0.8.8" - resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.8.tgz#d0d11511cbc1de77e53342ad1546a4d487d6ea72" - integrity sha512-0LNz4EY8B/8xXY86wMrQ4tz6zEHZv9ehFMJPm8u2gq5lQ71cfRKdaKyxfJAx5aUoyzx0qzgURblTisPGgz3d+Q== - "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -6660,20 +6745,6 @@ acorn@^8.1.0, acorn@^8.2.4, acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.0, acorn@^8.7 resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== -adal-node@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/adal-node/-/adal-node-0.2.4.tgz#881beed9d493b76a86706ad5c8dc6f60eff04520" - integrity sha512-zIcvbwQFKMUtKxxj8YMHeTT1o/TPXfVNsTXVgXD8sxwV6h4AFQgK77dRciGhuEF9/Sdm3UQPJVPc/6XxrccSeA== - dependencies: - "@xmldom/xmldom" "^0.8.3" - async "^2.6.3" - axios "^0.21.1" - date-utils "*" - jws "3.x.x" - underscore ">= 1.3.1" - uuid "^3.1.0" - xpath.js "~1.1.0" - add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -7182,13 +7253,6 @@ async-value@^1.2.2: resolved "https://registry.yarnpkg.com/async-value/-/async-value-1.2.2.tgz#84517a1e7cb6b1a5b5e181fa31be10437b7fb125" integrity sha512-8rwtYe32OAS1W9CTwvknoyts+mc3ta8N7Pi0h7AjkMaKvsFbr39K+gEfZ7Z81aPXQ1sK5M23lgLy1QfZpcpadQ== -async@^2.6.3: - version "2.6.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" - integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== - dependencies: - lodash "^4.17.14" - async@^3.2.0, async@^3.2.1, async@^3.2.3: version "3.2.4" resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" @@ -7653,13 +7717,6 @@ bl@^1.0.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" -bl@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/bl/-/bl-3.0.1.tgz#1cbb439299609e419b5a74d7fce2f8b37d8e5c6f" - integrity sha512-jrCW5ZhfQ/Vt07WX1Ngs+yn9BDqPL/gw28S7s9H6QK/gupnizNzJAss5akW20ISgOrbLTlXOOCTJeNUQqruAWQ== - dependencies: - readable-stream "^3.0.1" - bl@^4.0.3, bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" @@ -7669,6 +7726,15 @@ bl@^4.0.3, bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" +bl@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-5.1.0.tgz#183715f678c7188ecef9fe475d90209400624273" + integrity sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ== + dependencies: + buffer "^6.0.3" + inherits "^2.0.4" + readable-stream "^3.4.0" + bl@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/bl/-/bl-0.8.2.tgz#c9b6bca08d1bc2ea00fc8afb4f1a5fd1e1c66e4e" @@ -8716,7 +8782,7 @@ commander@^8.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== -commander@^9.1.0, commander@^9.4.1: +commander@^9.1.0, commander@^9.4.0, commander@^9.4.1: version "9.5.0" resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== @@ -9463,11 +9529,6 @@ date-fns@^2.29.1: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.29.3.tgz#27402d2fc67eb442b511b70bbdf98e6411cd68a8" integrity sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA== -date-utils@*: - version "1.2.21" - resolved "https://registry.yarnpkg.com/date-utils/-/date-utils-1.2.21.tgz#61fb16cdc1274b3c9acaaffe9fc69df8720a2b64" - integrity sha512-wJMBjqlwXR0Iv0wUo/lFbhSQ7MmG1hl36iuxuE91kW+5b5sWbase73manEqNH9sOLFAMG83B4ffNKq9/Iq0FVA== - dateformat@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -9523,7 +9584,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@4.3.4, debug@^4, debug@^4.0.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: +debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -10719,6 +10780,19 @@ es-abstract@^1.19.0, es-abstract@^1.19.5: string.prototype.trimstart "^1.0.5" unbox-primitive "^1.0.2" +es-aggregate-error@^1.0.8: + version "1.0.9" + resolved "https://registry.yarnpkg.com/es-aggregate-error/-/es-aggregate-error-1.0.9.tgz#b50925cdf78c8a634bd766704f6f7825902be3d9" + integrity sha512-fvnX40sb538wdU6r4s35cq4EY6Lr09Upj40BEVem4LEsuW8XgQep9yD5Q1U2KftokNp1rWODFJ2qwZSsAjFpbg== + dependencies: + define-properties "^1.1.4" + es-abstract "^1.20.4" + function-bind "^1.1.1" + functions-have-names "^1.2.3" + get-intrinsic "^1.1.3" + globalthis "^1.0.3" + has-property-descriptors "^1.0.0" + es-get-iterator@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" @@ -12389,7 +12463,7 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= -functions-have-names@^1.2.2: +functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -13565,13 +13639,6 @@ iconv-lite@0.6.3, iconv-lite@^0.6.2, iconv-lite@^0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -iconv-lite@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.5.2.tgz#af6d628dccfb463b7364d97f715e4b74b8c8c2b8" - integrity sha512-kERHXvpSaB4aU3eANwidg79K8FlrN77m8G9V+0vOR3HYaRifrlwMEpT7ZBJqLSEIHnEgJTHcWK82wwLwwKwtag== - dependencies: - safer-buffer ">= 2.1.2 < 3" - icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" @@ -13922,11 +13989,6 @@ ioredis@^4.28.5: redis-parser "^3.0.0" standard-as-callback "^2.1.0" -ip-regex@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" - integrity sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw== - ip@^1.1.5: version "1.1.8" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" @@ -15897,6 +15959,11 @@ js-beautify@^1.6.12: glob "^8.0.3" nopt "^6.0.0" +js-md4@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/js-md4/-/js-md4-0.3.2.tgz#cd3b3dc045b0c404556c81ddb5756c23e59d7cf5" + integrity sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -15917,10 +15984,10 @@ js-yaml@^3.10.0, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -jsbi@^3.1.1: - version "3.2.5" - resolved "https://registry.yarnpkg.com/jsbi/-/jsbi-3.2.5.tgz#b37bb90e0e5c2814c1c2a1bcd8c729888a2e37d6" - integrity sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ== +jsbi@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/jsbi/-/jsbi-4.3.0.tgz#b54ee074fb6fcbc00619559305c8f7e912b04741" + integrity sha512-SnZNcinB4RIcnEyZqFPdGPVgrg2AcnykiBy0sHVJQKHYeaLUvi3Exj+iaPpLnFVkDPZIV4U0yvgC9/R4uEAZ9g== jsbn@~0.1.0: version "0.1.1" @@ -16191,7 +16258,7 @@ jwa@^2.0.0: ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jws@3.x.x, jws@^3.2.2: +jws@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== @@ -18138,14 +18205,17 @@ msgpackr@^1.5.2: optionalDependencies: msgpackr-extract "^3.0.1" -mssql@6.2.3: - version "6.2.3" - resolved "https://registry.yarnpkg.com/mssql/-/mssql-6.2.3.tgz#1d15bbe8c3057e32ee6e98596b6c323b097a6cba" - integrity sha512-4TW/fA9UgzmVTNgjl65r6ISr6aL5QHnlptEt1A3jIpdzkNbFPIkRbUNz90324HIdE+5pKc3VqikOImcTrhd4og== +mssql@9.1.1: + version "9.1.1" + resolved "https://registry.yarnpkg.com/mssql/-/mssql-9.1.1.tgz#fcec595834db1ff6e446710794f54082fc74ef02" + integrity sha512-m0yTx9xzUtTvJpWJHqknUXUDPRnJXZYOOFNygnNIXn1PBkLsC/rkXQdquObd+M0ZPlBhGC00Jg28zG0wCl7VWg== dependencies: - debug "^4" - tarn "^1.1.5" - tedious "^6.6.2" + "@tediousjs/connection-string" "^0.4.1" + commander "^9.4.0" + debug "^4.3.3" + rfdc "^1.3.0" + tarn "^3.0.2" + tedious "^15.0.1" multi-part-lite@^1.0.0: version "1.0.0" @@ -19103,7 +19173,7 @@ open@^7.3.1: is-docker "^2.0.0" is-wsl "^2.1.1" -open@^8.4.0: +open@^8.0.0, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== @@ -21460,15 +21530,6 @@ readable-stream@^2.1.4, readable-stream@^2.3.0, readable-stream@^2.3.5: string_decoder "~1.1.1" util-deprecate "~1.0.1" -readable-stream@^3.0.1: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.5.0, readable-stream@^3.6.0: version "3.6.1" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.1.tgz#f9f9b5f536920253b3d26e7660e7da4ccff9bb62" @@ -23298,6 +23359,11 @@ stop-iteration-iterator@^1.0.0: dependencies: internal-slot "^1.0.4" +stoppable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/stoppable/-/stoppable-1.1.0.tgz#32da568e83ea488b08e4d7ea2c3bcc9d75015d5b" + integrity sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw== + stream-chopper@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/stream-chopper/-/stream-chopper-3.0.1.tgz#73791ae7bf954c297d6683aec178648efc61dd75" @@ -23992,11 +24058,6 @@ tar@^6.1.11, tar@^6.1.2: mkdirp "^1.0.3" yallist "^4.0.0" -tarn@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/tarn/-/tarn-1.1.5.tgz#7be88622e951738b9fa3fb77477309242cdddc2d" - integrity sha512-PMtJ3HCLAZeedWjJPgGnCvcphbCOMbtZpjKgLq3qM5Qq9aQud+XHrL0WlrlgnTyS8U+jrjGbEXprFcQrxPy52g== - tarn@^3.0.1, tarn@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.2.tgz#73b6140fbb881b71559c4f8bfde3d9a4b3d27693" @@ -24014,21 +24075,22 @@ tcomb@^3.0.0, tcomb@^3.2.17: resolved "https://registry.yarnpkg.com/tcomb/-/tcomb-3.2.29.tgz#32404fe9456d90c2cf4798682d37439f1ccc386c" integrity sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ== -tedious@^6.6.2: - version "6.7.1" - resolved "https://registry.yarnpkg.com/tedious/-/tedious-6.7.1.tgz#e581be8634a5268b37dffe8930ba2d781edd8a3d" - integrity sha512-61eg/mvUa5vIqZcRizcqw/82dY65kR2uTll1TaUFh0aJ45XOrgbc8axiVR48dva8BahIAlJByaHNfAJ/KmPV0g== +tedious@^15.0.1: + version "15.1.3" + resolved "https://registry.yarnpkg.com/tedious/-/tedious-15.1.3.tgz#bbc44da3d284126cbf4cf141088ec743431d9a57" + integrity sha512-166EpRm5qknwhEisjZqz/mF7k14fXKJYHRg6XiAXVovd/YkyHJ3SG4Ppy89caPaNFfRr7PVYe+s4dAvKaCMFvw== dependencies: - "@azure/ms-rest-nodeauth" "^3.0.10" - "@types/node" "^12.12.17" - "@types/readable-stream" "^2.3.5" - bl "^3.0.0" - depd "^2.0.0" - iconv-lite "^0.5.0" - jsbi "^3.1.1" + "@azure/identity" "^2.0.4" + "@azure/keyvault-keys" "^4.4.0" + "@js-joda/core" "^5.2.0" + bl "^5.0.0" + es-aggregate-error "^1.0.8" + iconv-lite "^0.6.3" + js-md4 "^0.3.2" + jsbi "^4.3.0" native-duplexpair "^1.0.0" + node-abort-controller "^3.0.1" punycode "^2.1.0" - readable-stream "^3.4.0" sprintf-js "^1.1.2" temp-dir@1.0.0: @@ -24366,15 +24428,6 @@ touch@^3.1.0: universalify "^0.2.0" url-parse "^1.5.3" -tough-cookie@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-3.0.1.tgz#9df4f57e739c26930a018184887f4adb7dca73b2" - integrity sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg== - dependencies: - ip-regex "^2.1.0" - psl "^1.1.28" - punycode "^2.1.1" - tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -24585,7 +24638,7 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" -tunnel@0.0.6, tunnel@^0.0.6: +tunnel@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c" integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg== @@ -24783,11 +24836,6 @@ undefsafe@^2.0.5: resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== -"underscore@>= 1.3.1": - version "1.13.6" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" - integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== - undici@^4.14.1: version "4.16.0" resolved "https://registry.yarnpkg.com/undici/-/undici-4.16.0.tgz#469bb87b3b918818d3d7843d91a1d08da357d5ff" @@ -25118,7 +25166,7 @@ uuid@8.3.2, uuid@^8.3.0, uuid@^8.3.1, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^3.1.0, uuid@^3.3.2: +uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== @@ -25871,7 +25919,7 @@ xml2js@0.4.19: sax ">=0.6.0" xmlbuilder "~9.0.1" -xml2js@0.5.0, xml2js@^0.5.0: +xml2js@0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.5.0.tgz#d9440631fbb2ed800203fad106f2724f62c493b7" integrity sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA== @@ -25907,11 +25955,6 @@ xmlhttprequest-ssl@~2.0.0: resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== -xpath.js@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xpath.js/-/xpath.js-1.1.0.tgz#3816a44ed4bb352091083d002a383dd5104a5ff1" - integrity sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ== - xregexp@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-2.0.0.tgz#52a63e56ca0b84a7f3a5f3d61872f126ad7a5943" From c9bee9e423393fbf9b118bb43cdb7fcf17deae8c Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 27 Jun 2023 09:25:46 +0100 Subject: [PATCH 05/22] Display errors --- .../server/src/integrations/microsoftSqlServer.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index ee4cc968c9..284a6a6f55 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -151,9 +151,17 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { async connect() { try { this.client = await this.pool.connect() - } catch (err) { - // @ts-ignore - throw new Error(err) + } catch (err: any) { + if (err?.originalError?.errors?.length) { + const messages = [] + if (err.message) { + messages.push(err.message) + } + messages.push(...err.originalError.errors.map((e: any) => e.message)) + throw new Error(messages.join("\n")) + } + + throw err } } From f2d41addbd21c296d8112d5c70ce1d1e7551ca38 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 27 Jun 2023 11:18:22 +0100 Subject: [PATCH 06/22] Unify prettier --- package.json | 2 +- packages/server/package.json | 1 - packages/worker/package.json | 1 - yarn.lock | 10 ---------- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/package.json b/package.json index 8b715d8747..d43442e165 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "lerna": "7.0.2", "madge": "^6.0.0", "minimist": "^1.2.8", - "prettier": "^2.3.1", + "prettier": "2.5.1", "prettier-plugin-svelte": "^2.3.0", "rimraf": "^3.0.2", "rollup-plugin-replace": "^2.2.0", diff --git a/packages/server/package.json b/packages/server/package.json index 4aeec94cf6..a35f78d36d 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -168,7 +168,6 @@ "openapi-types": "9.3.1", "openapi-typescript": "5.2.0", "path-to-regexp": "6.2.0", - "prettier": "2.5.1", "rimraf": "3.0.2", "supertest": "6.2.2", "swagger-jsdoc": "6.1.0", diff --git a/packages/worker/package.json b/packages/worker/package.json index 64a60515ee..8d4844fa12 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -95,7 +95,6 @@ "lodash": "4.17.21", "nodemon": "2.0.15", "pouchdb-adapter-memory": "7.2.2", - "prettier": "2.3.1", "rimraf": "3.0.2", "supertest": "6.2.2", "timekeeper": "2.2.0", diff --git a/yarn.lock b/yarn.lock index 40753102e3..14aa71741f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20882,21 +20882,11 @@ prettier-plugin-svelte@^2.3.0: resolved "https://registry.yarnpkg.com/prettier-plugin-svelte/-/prettier-plugin-svelte-2.6.0.tgz#0e845b560b55cd1d951d6c50431b4949f8591746" integrity sha512-NPSRf6Y5rufRlBleok/pqg4+1FyGsL0zYhkYP6hnueeL1J/uCm3OfOZPsLX4zqD9VAdcXfyEL2PYqGv8ZoOSfA== -prettier@2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" - integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== - prettier@2.5.1: version "2.5.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== -prettier@^2.3.1: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== - prettier@^2.5.1: version "2.8.4" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" From 8a7d610faf308087f9436ba693090786b47365f9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 28 Jun 2023 10:39:43 +0100 Subject: [PATCH 07/22] Move creation pool on the connect step --- .../server/src/api/controllers/datasource.ts | 2 +- .../src/integrations/microsoftSqlServer.ts | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/server/src/api/controllers/datasource.ts b/packages/server/src/api/controllers/datasource.ts index 86669845e6..3ca8a8131a 100644 --- a/packages/server/src/api/controllers/datasource.ts +++ b/packages/server/src/api/controllers/datasource.ts @@ -11,7 +11,7 @@ import { BuildSchemaErrors, InvalidColumns } from "../../constants" import { getIntegration } from "../../integrations" import { getDatasourceAndQuery } from "./row/utils" import { invalidateDynamicVariables } from "../../threads/utils" -import { db as dbCore, context, events, cache } from "@budibase/backend-core" +import { db as dbCore, context, events } from "@budibase/backend-core" import { UserCtx, Datasource, diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 284a6a6f55..56f78bb932 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -96,7 +96,6 @@ const SCHEMA: Integration = { class SqlServerIntegration extends Sql implements DatasourcePlus { private readonly config: MSSQLConfig private index: number = 0 - private readonly pool: sqlServer.ConnectionPool private client?: sqlServer.ConnectionPool public tables: Record = {} public schemaErrors: Record = {} @@ -114,17 +113,6 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { constructor(config: MSSQLConfig) { super(SqlClient.MS_SQL) this.config = config - const clientCfg = { - ...this.config, - port: +this.config, - options: { - encrypt: this.config.encrypt, - enableArithAbort: true, - }, - } - delete clientCfg.encrypt - - this.pool = new sqlServer.ConnectionPool(clientCfg) } async testConnection() { @@ -150,7 +138,19 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { async connect() { try { - this.client = await this.pool.connect() + const clientCfg = { + ...this.config, + port: +this.config, + options: { + encrypt: this.config.encrypt, + enableArithAbort: true, + }, + } + delete clientCfg.encrypt + + const pool = new sqlServer.ConnectionPool(clientCfg) + + this.client = await pool.connect() } catch (err: any) { if (err?.originalError?.errors?.length) { const messages = [] From 534b4fffb48d1508daf9120088d0b4d705dce54d Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 28 Jun 2023 11:42:49 +0100 Subject: [PATCH 08/22] Allow hiding config --- .../Datasources/ConfigEditor/index.svelte | 25 +++++++++++-------- .../ConfigEditor/stores/validatedConfig.js | 1 + packages/types/src/sdk/datasources.ts | 3 ++- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/packages/builder/src/components/backend/Datasources/ConfigEditor/index.svelte b/packages/builder/src/components/backend/Datasources/ConfigEditor/index.svelte index fc24266959..2cfd3e9ca8 100644 --- a/packages/builder/src/components/backend/Datasources/ConfigEditor/index.svelte +++ b/packages/builder/src/components/backend/Datasources/ConfigEditor/index.svelte @@ -6,6 +6,7 @@ Layout, ModalContent, } from "@budibase/bbui" + import { processStringSync } from "@budibase/string-templates" import CreateEditVariableModal from "components/portal/environment/CreateEditVariableModal.svelte" import ConfigInput from "./ConfigInput.svelte" import { createValidatedConfigStore } from "./stores/validatedConfig" @@ -81,17 +82,19 @@ /> {/if} - {#each $configStore.validatedConfig as { type, key, value, error, name }} - - showModal(newValue => configStore.updateFieldValue(key, newValue))} - on:blur={() => configStore.markFieldActive(key)} - on:change={e => configStore.updateFieldValue(key, e.detail)} - /> + {#each $configStore.validatedConfig as { type, key, value, error, name, hidden }} + {#if hidden === undefined || !eval(processStringSync(hidden, $configStore.config))} + + showModal(newValue => configStore.updateFieldValue(key, newValue))} + on:blur={() => configStore.markFieldActive(key)} + on:change={e => configStore.updateFieldValue(key, e.detail)} + /> + {/if} {/each} diff --git a/packages/builder/src/components/backend/Datasources/ConfigEditor/stores/validatedConfig.js b/packages/builder/src/components/backend/Datasources/ConfigEditor/stores/validatedConfig.js index dc2eab303b..cf5d93028e 100644 --- a/packages/builder/src/components/backend/Datasources/ConfigEditor/stores/validatedConfig.js +++ b/packages/builder/src/components/backend/Datasources/ConfigEditor/stores/validatedConfig.js @@ -101,6 +101,7 @@ export const createValidatedConfigStore = (integration, config) => { error: $errorsStore[key], name: capitalise(properties.display || key), type: properties.type, + hidden: properties.hidden, }) }) diff --git a/packages/types/src/sdk/datasources.ts b/packages/types/src/sdk/datasources.ts index f3001a971d..57c534280a 100644 --- a/packages/types/src/sdk/datasources.ts +++ b/packages/types/src/sdk/datasources.ts @@ -110,7 +110,8 @@ export interface DatasourceConfig { required?: boolean default?: any deprecated?: boolean - } + hidden?: string + } & { fields?: DatasourceConfig } } export interface Integration { From 352ea72c5343a901059ca873e5ef2014ec068f11 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 28 Jun 2023 12:05:18 +0100 Subject: [PATCH 09/22] Select and conditional fields --- .../ConfigEditor/ConfigInput.svelte | 5 ++++ .../ConfigEditor/fields/Select.svelte | 30 +++++++++++++++++++ .../Datasources/ConfigEditor/index.svelte | 3 +- .../ConfigEditor/stores/validatedConfig.js | 1 + .../src/integrations/microsoftSqlServer.ts | 27 +++++++++++++++++ packages/types/src/sdk/datasources.ts | 30 ++++++++++++++----- 6 files changed, 87 insertions(+), 9 deletions(-) create mode 100644 packages/builder/src/components/backend/Datasources/ConfigEditor/fields/Select.svelte diff --git a/packages/builder/src/components/backend/Datasources/ConfigEditor/ConfigInput.svelte b/packages/builder/src/components/backend/Datasources/ConfigEditor/ConfigInput.svelte index 37fd579594..70f2ffef46 100644 --- a/packages/builder/src/components/backend/Datasources/ConfigEditor/ConfigInput.svelte +++ b/packages/builder/src/components/backend/Datasources/ConfigEditor/ConfigInput.svelte @@ -4,11 +4,13 @@ import LongFormField from "./fields/LongForm.svelte" import FieldGroupField from "./fields/FieldGroup.svelte" import StringField from "./fields/String.svelte" + import SelectField from "./fields/Select.svelte" export let type export let value export let error export let name + export let config export let showModal = () => {} const selectComponent = type => { @@ -20,6 +22,8 @@ return LongFormField } else if (type === "fieldGroup") { return FieldGroupField + } else if (type === "select") { + return SelectField } else { return StringField } @@ -34,6 +38,7 @@ {value} {error} {name} + {config} {showModal} on:blur on:change diff --git a/packages/builder/src/components/backend/Datasources/ConfigEditor/fields/Select.svelte b/packages/builder/src/components/backend/Datasources/ConfigEditor/fields/Select.svelte new file mode 100644 index 0000000000..3185a6c22c --- /dev/null +++ b/packages/builder/src/components/backend/Datasources/ConfigEditor/fields/Select.svelte @@ -0,0 +1,30 @@ + + +
+ +