diff --git a/lerna.json b/lerna.json index eb08127241..820e7abdf8 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.7.36-alpha.4", + "version": "2.7.36-alpha.6", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/package.json b/package.json index 8b715d8747..42e528dfce 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.8.8", "prettier-plugin-svelte": "^2.3.0", "rimraf": "^3.0.2", "rollup-plugin-replace": "^2.2.0", diff --git a/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte b/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte index b638d23168..6a2dd8d913 100644 --- a/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/EditRoles.svelte @@ -84,7 +84,7 @@ await roles.save(selectedRole) notifications.success("Role saved successfully") } catch (error) { - notifications.error("Error saving role") + notifications.error(`Error saving role - ${error.message}`) return false } } @@ -96,7 +96,8 @@ changeRole() notifications.success("Role deleted successfully") } catch (error) { - notifications.error("Error deleting role") + notifications.error(`Error deleting role - ${error.message}`) + return false } } @@ -139,7 +140,7 @@ {} 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/FieldGroup.svelte b/packages/builder/src/components/backend/Datasources/ConfigEditor/fields/FieldGroup.svelte index a83929663b..eaab7d1508 100644 --- a/packages/builder/src/components/backend/Datasources/ConfigEditor/fields/FieldGroup.svelte +++ b/packages/builder/src/components/backend/Datasources/ConfigEditor/fields/FieldGroup.svelte @@ -1,9 +1,11 @@ !!properties.value)} + initialOpen={config?.openByDefault || + Object.values(value).some(properties => !!properties.value)} header={name} > {#each value as field} - - {field.name} - handleChange(field.key, e.detail)} - value={field.value} - /> - + handleChange(field.key, e.detail)} + /> {/each} - - 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 @@ + + + + {name} + + + + diff --git a/packages/builder/src/components/backend/Datasources/ConfigEditor/index.svelte b/packages/builder/src/components/backend/Datasources/ConfigEditor/index.svelte index fc24266959..bbb10b41df 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" @@ -27,9 +28,11 @@ nameStore.markActive() if ((await configStore.validate()) && (await nameStore.validate())) { - return await onSubmit({ - config: get(configStore).config, - name: get(nameStore).name, + const { config } = get(configStore) + const { name } = get(nameStore) + return onSubmit({ + config, + name, }) } @@ -81,17 +84,20 @@ /> {/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, config }} + {#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..7b8b2c0975 100644 --- a/packages/builder/src/components/backend/Datasources/ConfigEditor/stores/validatedConfig.js +++ b/packages/builder/src/components/backend/Datasources/ConfigEditor/stores/validatedConfig.js @@ -46,6 +46,19 @@ export const createValidatedConfigStore = (integration, config) => { value.forEach(field => { newStore[field.key] = field.value }) + if (!integration.datasource[key].config?.nestedFields) { + value.forEach(field => { + newStore[field.key] = field.value + }) + } else { + newStore[key] = value.reduce( + (p, field) => ({ + ...p, + [field.key]: field.value, + }), + {} + ) + } } else { newStore[key] = value } @@ -101,6 +114,8 @@ export const createValidatedConfigStore = (integration, config) => { error: $errorsStore[key], name: capitalise(properties.display || key), type: properties.type, + hidden: properties.hidden, + config: properties.config, }) }) diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Settings.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Settings.svelte new file mode 100644 index 0000000000..894b705a30 --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[datasourceId]/_components/panels/Settings.svelte @@ -0,0 +1,38 @@ + + + + + + Troubleshooting + Download your schema to share with the Budibase team + + Download + + + + + + 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 ad71d15c24..6ce9cf7921 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,8 @@ import RestAuthenticationPanel from "./_components/panels/Authentication/index.svelte" import RestVariablesPanel from "./_components/panels/Variables/index.svelte" import PromptQueryModal from "./_components/PromptQueryModal.svelte" + import SettingsPanel from "./_components/panels/Settings.svelte" + import { helpers } from "@budibase/shared-core" let selectedPanel = null let panelOptions = [] @@ -38,6 +40,10 @@ panelOptions = ["Queries"] selectedPanel = "Queries" } + // always the last option for SQL + if (helpers.isSQL(datasource)) { + panelOptions.push("Settings") + } } @@ -81,6 +87,8 @@ {:else if selectedPanel === "Variables"} + {:else if selectedPanel === "Settings"} + {:else} Something went wrong {/if} diff --git a/packages/builder/src/stores/backend/datasources.js b/packages/builder/src/stores/backend/datasources.js index 4aca51b9dd..b1db99b5d8 100644 --- a/packages/builder/src/stores/backend/datasources.js +++ b/packages/builder/src/stores/backend/datasources.js @@ -115,13 +115,15 @@ export function createDatasourcesStore() { .length } - const isDatasourceInvalid = async (integration, datasource) => { + const checkDatasourceValidity = async (integration, datasource) => { if (integration.features?.[DatasourceFeature.CONNECTION_CHECKING]) { - const { connected } = await API.validateDatasource(datasource) - if (!connected) return true - } + const { connected, error } = await API.validateDatasource(datasource) + if (connected) { + return + } - return false + throw new Error(`Unable to connect: ${error}`) + } } const create = async ({ integration, config }) => { @@ -136,7 +138,7 @@ export function createDatasourcesStore() { plus: integration.plus && integration.name !== IntegrationTypes.REST, } - if (await isDatasourceInvalid(integration, datasource)) { + if (await checkDatasourceValidity(integration, datasource)) { throw new Error("Unable to connect") } @@ -150,7 +152,7 @@ export function createDatasourcesStore() { } const update = async ({ integration, datasource }) => { - if (await isDatasourceInvalid(integration, datasource)) { + if (await checkDatasourceValidity(integration, datasource)) { throw new Error("Unable to connect") } diff --git a/packages/frontend-core/src/api/datasources.js b/packages/frontend-core/src/api/datasources.js index 1ba17cc610..7cc05960d7 100644 --- a/packages/frontend-core/src/api/datasources.js +++ b/packages/frontend-core/src/api/datasources.js @@ -83,4 +83,10 @@ export const buildDatasourceEndpoints = API => ({ body: { datasource }, }) }, + + fetchExternalSchema: async datasourceId => { + return await API.get({ + url: `/api/datasources/${datasourceId}/schema/external`, + }) + }, }) diff --git a/packages/frontend-core/src/utils/download.js b/packages/frontend-core/src/utils/download.js new file mode 100644 index 0000000000..681bc8648e --- /dev/null +++ b/packages/frontend-core/src/utils/download.js @@ -0,0 +1,13 @@ +export function downloadText(filename, text) { + if (typeof text === "object") { + text = JSON.stringify(text) + } + const blob = new Blob([text], { type: "plain/text" }) + const url = URL.createObjectURL(blob) + const link = document.createElement("a") + link.href = url + link.download = filename + link.click() + + URL.revokeObjectURL(url) +} diff --git a/packages/frontend-core/src/utils/index.js b/packages/frontend-core/src/utils/index.js index 26e44410ba..dd04dd6c28 100644 --- a/packages/frontend-core/src/utils/index.js +++ b/packages/frontend-core/src/utils/index.js @@ -5,3 +5,4 @@ export * as RoleUtils from "./roles" export * as Utils from "./utils" export { memo, derivedMemo } from "./memo" export { createWebsocket } from "./websocket" +export { downloadText } from "./download" diff --git a/packages/server/package.json b/packages/server/package.json index 08234bda4c..a35f78d36d 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,6 +143,7 @@ "@types/koa": "2.13.4", "@types/koa__router": "8.0.8", "@types/lodash": "4.14.180", + "@types/mssql": "8.1.2", "@types/node": "14.18.20", "@types/node-fetch": "2.6.1", "@types/oracledb": "5.2.2", @@ -167,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/server/src/api/controllers/datasource.ts b/packages/server/src/api/controllers/datasource.ts index 86669845e6..8cf0f3a98e 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, @@ -427,8 +427,8 @@ export async function destroy(ctx: UserCtx) { } export async function find(ctx: UserCtx) { - const database = context.getAppDB() - const datasource = await database.get(ctx.params.datasourceId) + const db = context.getAppDB() + const datasource = await db.get(ctx.params.datasourceId) ctx.body = await sdk.datasources.removeSecretSingle(datasource) } @@ -443,7 +443,8 @@ export async function query(ctx: UserCtx) { } export async function getExternalSchema(ctx: UserCtx) { - const { datasource } = ctx.request.body + const db = context.getAppDB() + const datasource = await db.get(ctx.params.datasourceId) const enrichedDatasource = await getAndMergeDatasource(datasource) const connector = await getConnector(enrichedDatasource) diff --git a/packages/server/src/api/controllers/role.ts b/packages/server/src/api/controllers/role.ts index 57accfbbdc..a2369ef2da 100644 --- a/packages/server/src/api/controllers/role.ts +++ b/packages/server/src/api/controllers/role.ts @@ -1,9 +1,5 @@ -import { roles, context, events } from "@budibase/backend-core" -import { - generateRoleID, - getUserMetadataParams, - InternalTables, -} from "../../db/utils" +import { roles, context, events, db as dbCore } from "@budibase/backend-core" +import { getUserMetadataParams, InternalTables } from "../../db/utils" import { UserCtx, Database } from "@budibase/types" const UpdateRolesOptions = { @@ -55,6 +51,7 @@ export async function save(ctx: UserCtx) { const db = context.getAppDB() let { _id, name, inherits, permissionId, version } = ctx.request.body let isCreate = false + const isNewVersion = version === roles.RoleIDVersion.NAME if (_id && roles.isBuiltin(_id)) { ctx.throw(400, "Cannot update builtin roles.") @@ -62,12 +59,20 @@ export async function save(ctx: UserCtx) { // if not id found, then its creation if (!_id) { - _id = generateRoleID(name) + _id = dbCore.generateRoleID(name) isCreate = true } // version 2 roles need updated to add back role_ - else if (version === roles.RoleIDVersion.NAME) { - _id = generateRoleID(name) + else if (isNewVersion) { + _id = dbCore.prefixRoleID(_id) + } + + let dbRole + if (!isCreate) { + dbRole = await db.get(_id) + } + if (dbRole && dbRole.name !== name && isNewVersion) { + ctx.throw(400, "Cannot change custom role name") } const role = new roles.Role(_id, name, permissionId).addInheritance(inherits) @@ -98,7 +103,7 @@ export async function destroy(ctx: UserCtx) { ctx.throw(400, "Cannot delete builtin role.") } else { // make sure has the prefix (if it has it then it won't be added) - roleId = generateRoleID(roleId) + roleId = dbCore.generateRoleID(roleId) } const role = await db.get(roleId) // first check no users actively attached to role diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 1eb6635b74..d4efacea36 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -22,9 +22,15 @@ import { import Sql from "./base/sql" import { MSSQLTablesResponse, MSSQLColumn } from "./base/types" import { getReadableErrorMessage } from "./base/errorMapping" -const sqlServer = require("mssql") +import sqlServer from "mssql" const DEFAULT_SCHEMA = "dbo" +import { ConfidentialClientApplication } from "@azure/msal-node" + +enum MSSQLConfigAuthType { + ACTIVE_DIRECTORY = "Active Directory", +} + interface MSSQLConfig { user: string password: string @@ -33,6 +39,12 @@ interface MSSQLConfig { database: string schema: string encrypt?: boolean + authType?: MSSQLConfigAuthType + adConfig?: { + clientId: string + clientSecret: string + tenantId: string + } } const SCHEMA: Integration = { @@ -78,6 +90,38 @@ const SCHEMA: Integration = { type: DatasourceFieldType.BOOLEAN, default: true, }, + authType: { + type: DatasourceFieldType.SELECT, + display: "Advanced auth", + config: { options: [MSSQLConfigAuthType.ACTIVE_DIRECTORY] }, + }, + adConfig: { + type: DatasourceFieldType.FIELD_GROUP, + default: true, + display: "Configure Active Directory", + hidden: "'{{authType}}' !== 'Active Directory'", + config: { + openByDefault: true, + nestedFields: true, + }, + fields: { + clientId: { + type: DatasourceFieldType.STRING, + required: true, + display: "Client ID", + }, + clientSecret: { + type: DatasourceFieldType.PASSWORD, + required: true, + display: "Client secret", + }, + tenantId: { + type: DatasourceFieldType.STRING, + required: true, + display: "Tenant ID", + }, + }, + }, }, query: { create: { @@ -98,8 +142,7 @@ 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 client?: sqlServer.ConnectionPool public tables: Record = {} public schemaErrors: Record = {} @@ -116,17 +159,6 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { constructor(config: MSSQLConfig) { super(SqlClient.MS_SQL) this.config = config - const clientCfg = { - ...this.config, - options: { - encrypt: this.config.encrypt, - enableArithAbort: true, - }, - } - delete clientCfg.encrypt - if (!this.pool) { - this.pool = new sqlServer.ConnectionPool(clientCfg) - } } async testConnection() { @@ -137,7 +169,7 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { await this.connect() response.connected = true } catch (e: any) { - response.error = e.message as string + response.error = e.message } return response } @@ -152,10 +184,52 @@ class SqlServerIntegration extends Sql implements DatasourcePlus { async connect() { try { - this.client = await this.pool.connect() - } catch (err) { - // @ts-ignore - throw new Error(err) + const clientCfg: MSSQLConfig & sqlServer.config = { + ...this.config, + port: +this.config, + options: { + encrypt: this.config.encrypt, + enableArithAbort: true, + }, + } + delete clientCfg.encrypt + + if (this.config.authType === MSSQLConfigAuthType.ACTIVE_DIRECTORY) { + const { clientId, tenantId, clientSecret } = this.config.adConfig! + const clientApp = new ConfidentialClientApplication({ + auth: { + clientId, + authority: `https://login.microsoftonline.com/${tenantId}`, + clientSecret, + }, + }) + + const response = await clientApp.acquireTokenByClientCredential({ + scopes: ["https://database.windows.net/.default"], + }) + + clientCfg.authentication = { + type: "azure-active-directory-access-token", + options: { + token: response!.accessToken, + }, + } + } + + const pool = new sqlServer.ConnectionPool(clientCfg) + + this.client = await pool.connect() + } 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 } } @@ -163,7 +237,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/packages/server/src/integrations/redis.ts b/packages/server/src/integrations/redis.ts index a6372c8e13..879a790550 100644 --- a/packages/server/src/integrations/redis.ts +++ b/packages/server/src/integrations/redis.ts @@ -26,25 +26,25 @@ const SCHEMA: Integration = { }, datasource: { host: { - type: "string", + type: DatasourceFieldType.STRING, required: true, default: "localhost", }, port: { - type: "number", + type: DatasourceFieldType.NUMBER, required: true, default: 6379, }, username: { - type: "string", + type: DatasourceFieldType.STRING, required: false, }, password: { - type: "password", + type: DatasourceFieldType.PASSWORD, required: false, }, db: { - type: "number", + type: DatasourceFieldType.NUMBER, required: false, display: "DB", default: 0, diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index df9d21aab2..0b7d774048 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -29,24 +29,24 @@ const SCHEMA: Integration = { }, datasource: { region: { - type: "string", + type: DatasourceFieldType.STRING, required: false, default: "us-east-1", }, accessKeyId: { - type: "password", + type: DatasourceFieldType.PASSWORD, required: true, }, secretAccessKey: { - type: "password", + type: DatasourceFieldType.PASSWORD, required: true, }, endpoint: { - type: "string", + type: DatasourceFieldType.STRING, required: false, }, signatureVersion: { - type: "string", + type: DatasourceFieldType.STRING, required: false, default: "v4", }, diff --git a/packages/server/src/integrations/snowflake.ts b/packages/server/src/integrations/snowflake.ts index 698795c2b7..9a1dac10e5 100644 --- a/packages/server/src/integrations/snowflake.ts +++ b/packages/server/src/integrations/snowflake.ts @@ -1,6 +1,7 @@ import { ConnectionInfo, DatasourceFeature, + DatasourceFieldType, Integration, QueryType, SqlQuery, @@ -27,30 +28,30 @@ const SCHEMA: Integration = { }, datasource: { account: { - type: "string", + type: DatasourceFieldType.STRING, required: true, }, username: { - type: "string", + type: DatasourceFieldType.STRING, required: true, }, password: { - type: "password", + type: DatasourceFieldType.PASSWORD, required: true, }, role: { - type: "string", + type: DatasourceFieldType.STRING, }, warehouse: { - type: "string", + type: DatasourceFieldType.STRING, required: true, }, database: { - type: "string", + type: DatasourceFieldType.STRING, required: true, }, schema: { - type: "string", + type: DatasourceFieldType.STRING, required: true, }, }, 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 +} diff --git a/packages/types/src/sdk/datasources.ts b/packages/types/src/sdk/datasources.ts index f3001a971d..2391f6e878 100644 --- a/packages/types/src/sdk/datasources.ts +++ b/packages/types/src/sdk/datasources.ts @@ -36,6 +36,7 @@ export enum DatasourceFieldType { JSON = "json", FILE = "file", FIELD_GROUP = "fieldGroup", + SELECT = "select", } export enum SourceName { @@ -103,13 +104,36 @@ export interface ExtraQueryConfig { } } +interface DatasourceBasicFieldConfig { + type: DatasourceFieldType + display?: string + required?: boolean + default?: any + deprecated?: boolean + hidden?: string +} + +interface DatasourceSelectFieldConfig extends DatasourceBasicFieldConfig { + type: DatasourceFieldType.SELECT + config: { options: string[] } +} + +interface DatasourceFieldGroupConfig extends DatasourceBasicFieldConfig { + type: DatasourceFieldType.FIELD_GROUP + config: { + openByDefault?: boolean + nestedFields?: boolean + } +} + +type DatasourceFieldConfig = + | DatasourceSelectFieldConfig + | DatasourceFieldGroupConfig + | DatasourceBasicFieldConfig + export interface DatasourceConfig { - [key: string]: { - type: string - display?: string - required?: boolean - default?: any - deprecated?: boolean + [key: string]: DatasourceFieldConfig & { + fields?: DatasourceConfig } } 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 4c02b28ac2..bb016d1936 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.4" - resolved "https://registry.yarnpkg.com/@azure/ms-rest-js/-/ms-rest-js-2.6.4.tgz#b0a0f89841434471adf757d09e7e39e8ecfcd650" - integrity sha512-2sbOpGhlBfv9itWdF7Qlk0CmoQCARxe5unwjNOprU7OdgEgabQncZ35L5u1A+zgdkVtNYF9Eo6XAhXzTweIhag== +"@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.4.19" + "@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" @@ -5755,6 +5853,15 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== +"@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" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.1.tgz#8f127c50481db65886800ef496f20bbf15518975" @@ -5791,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== @@ -5989,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" @@ -6123,6 +6222,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" @@ -6474,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.6" - resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.6.tgz#8a1524eb5bd5e965c1e3735476f0262469f71440" - integrity sha512-uRjjusqpoqfmRkTaNuLJ2VohVr67Q5YwDATW3VU7PfzTj6IRaihGrYI7zckGZjxQPBIp63nfvJbM+Yu5ICh0Bg== - "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -6644,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" @@ -7166,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" @@ -7637,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" @@ -7653,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" @@ -8700,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== @@ -9447,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" @@ -9507,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== @@ -10703,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" @@ -12373,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== @@ -13549,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" @@ -13906,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" @@ -15881,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" @@ -15901,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" @@ -16175,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== @@ -18122,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" @@ -19087,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== @@ -20796,17 +20882,7 @@ 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: +prettier@2.8.8: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== @@ -21444,7 +21520,7 @@ 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.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== @@ -23273,6 +23349,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" @@ -23967,12 +24048,7 @@ 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.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== @@ -23989,21 +24065,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: @@ -24341,15 +24418,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" @@ -24560,7 +24628,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== @@ -24758,11 +24826,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" @@ -25093,7 +25156,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== @@ -25882,11 +25945,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"