From 3e1a7987a3e1c66ffa10eaa420819bd1cb2f4b68 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 26 Apr 2022 11:28:31 +0100 Subject: [PATCH 001/280] BB logo on free plan --- .../src/components/MadeInBudibase.svelte | 15 +++++++------- .../client/src/components/app/Layout.svelte | 7 +++++++ packages/client/src/licensing/constants.js | 6 ++++++ packages/client/src/licensing/features.js | 5 +++++ packages/client/src/licensing/index.js | 7 +++++++ packages/client/src/licensing/utils.js | 20 +++++++++++++++++++ packages/server/src/api/controllers/auth.js | 11 ++++++++++ 7 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 packages/client/src/licensing/constants.js create mode 100644 packages/client/src/licensing/features.js create mode 100644 packages/client/src/licensing/index.js create mode 100644 packages/client/src/licensing/utils.js diff --git a/packages/client/src/components/MadeInBudibase.svelte b/packages/client/src/components/MadeInBudibase.svelte index 2e5d6336f1..59b95e0f44 100644 --- a/packages/client/src/components/MadeInBudibase.svelte +++ b/packages/client/src/components/MadeInBudibase.svelte @@ -1,15 +1,19 @@ - + import { Link } from "@budibase/bbui" + + +
Budibase

Made In Budibase

-
+ + - + {{ PLUGINS }} @@ -85,9 +86,13 @@ - + {#if usedPlugins?.length} + {#each usedPlugins as plugin} + + {/each} + {/if} - {{ PLUGINS }} {#if $auth.isAdmin} @@ -106,6 +112,7 @@ } }} /> + diff --git a/packages/client/src/components/ClientApp.svelte b/packages/client/src/components/ClientApp.svelte index 64b1712b89..86fd56feb1 100644 --- a/packages/client/src/components/ClientApp.svelte +++ b/packages/client/src/components/ClientApp.svelte @@ -87,6 +87,14 @@ }) + + {#if $builderStore.usedPlugins?.length} + {#each $builderStore.usedPlugins as plugin} + + {/each} + {/if} + + {#if dataLoaded}
{ + const initialise = (instance, force = false) => { if (instance == null) { return } // Ensure we're processing a new instance const instanceKey = Helpers.hashString(JSON.stringify(instance)) - if (instanceKey === lastInstanceKey) { + if (instanceKey === lastInstanceKey && !force) { return } else { lastInstanceKey = instanceKey @@ -407,9 +407,11 @@ !componentStore.actions.isComponentRegistered(id) ) { componentStore.actions.registerInstance(id, { + component: instance._component, getSettings: () => cachedSettings, getRawSettings: () => ({ ...staticSettings, ...dynamicSettings }), getDataContext: () => get(context), + reload: () => initialise(instance, true), }) } }) diff --git a/packages/client/src/components/devtools/DevToolsStatsTab.svelte b/packages/client/src/components/devtools/DevToolsStatsTab.svelte index b20b9fafa0..24f587332c 100644 --- a/packages/client/src/components/devtools/DevToolsStatsTab.svelte +++ b/packages/client/src/components/devtools/DevToolsStatsTab.svelte @@ -19,7 +19,10 @@ label="Active screen" value={$screenStore.activeScreen?.routing.route} /> - + diff --git a/packages/client/src/index.js b/packages/client/src/index.js index 32b242bc69..bef3ab9c12 100644 --- a/packages/client/src/index.js +++ b/packages/client/src/index.js @@ -27,6 +27,7 @@ const loadBudibase = () => { previewDevice: window["##BUDIBASE_PREVIEW_DEVICE##"], navigation: window["##BUDIBASE_PREVIEW_NAVIGATION##"], hiddenComponentIds: window["##BUDIBASE_HIDDEN_COMPONENT_IDS##"], + usedPlugins: window["##BUDIBASE_USED_PLUGINS##"], }) // Set app ID - this window flag is set by both the preview and the real @@ -39,6 +40,11 @@ const loadBudibase = () => { devToolsStore.actions.setEnabled(enableDevTools) // Register any custom components + window.registerCustomComponent = plugin => { + componentStore.actions.registerCustomComponent(plugin) + console.log("registered!") + loadBudibase() + } if (window["##BUDIBASE_CUSTOM_COMPONENTS##"]) { window["##BUDIBASE_CUSTOM_COMPONENTS##"].forEach(component => { componentStore.actions.registerCustomComponent(component) diff --git a/packages/client/src/stores/components.js b/packages/client/src/stores/components.js index a07c9da996..94dd16a957 100644 --- a/packages/client/src/stores/components.js +++ b/packages/client/src/stores/components.js @@ -10,7 +10,11 @@ import * as AppComponents from "../components/app/index.js" const budibasePrefix = "@budibase/standard-components/" const createComponentStore = () => { - const store = writable({}) + const store = writable({ + customComponentManifest: {}, + componentsAwaitingConstructors: {}, + mountedComponents: {}, + }) const derivedStore = derived( [store, builderStore, devToolsStore, screenStore], @@ -29,9 +33,7 @@ const createComponentStore = () => { asset = $screenState.activeScreen } const component = findComponentById(asset?.props, selectedComponentId) - const prefix = "@budibase/standard-components/" - const type = component?._component?.replace(prefix, "") - const definition = type ? Manifest[type] : null + const definition = getComponentDefinition(component?._component) // Derive the selected component path const path = @@ -39,32 +41,50 @@ const createComponentStore = () => { return { customComponentManifest: $store.customComponentManifest, - selectedComponentInstance: $store[selectedComponentId], + selectedComponentInstance: + $store.mountedComponents[selectedComponentId], selectedComponent: component, selectedComponentDefinition: definition, selectedComponentPath: path?.map(component => component._id), - mountedComponents: Object.keys($store).length, + mountedComponentCount: Object.keys($store.mountedComponents).length, currentAsset: asset, } } ) const registerInstance = (id, instance) => { - store.update(state => ({ - ...state, - [id]: instance, - })) + store.update(state => { + // If this is a custom component and does not have an implementation yet, + // store so we can reload this component later + const component = instance.component + let cac = state.componentsAwaitingConstructors + if (!getComponentConstructor(component)) { + if (!cac[component]) { + cac[component] = [] + } + cac[component].push(id) + } + + return { + ...state, + componentsAwaitingConstructors: cac, + mountedComponents: { + ...state.mountedComponents, + [id]: instance, + }, + } + }) } const unregisterInstance = id => { store.update(state => { - delete state[id] + delete state.mountedComponents[id] return state }) } const isComponentRegistered = id => { - return get(store)[id] != null + return get(store).mountedComponents[id] != null } const getComponentById = id => { @@ -117,17 +137,32 @@ const createComponentStore = () => { if (!Component || !schema?.schema?.name) { return } + const componentName = `plugin/${schema.schema.name}/1.0.0` store.update(state => { if (!state.customComponentManifest) { state.customComponentManifest = {} } - const componentName = `plugin/${schema.schema.name}/1.0.0` state.customComponentManifest[componentName] = { schema, Component, } return state }) + + // Reload any mounted components which depend on this definition + const state = get(store) + if (state.componentsAwaitingConstructors[componentName]?.length) { + state.componentsAwaitingConstructors[componentName].forEach(id => { + const instance = state.mountedComponents[id] + if (instance) { + instance.reload() + } + }) + store.update(state => { + delete state.componentsAwaitingConstructors[componentName] + return state + }) + } } return { From 1f2f1309075e9ec46192f470411eea44ef03e95f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 11 Aug 2022 17:29:07 +0100 Subject: [PATCH 026/280] Getting dependency installation working correctly. --- .gitignore | 4 +++- packages/cli/src/exec.js | 9 +++++---- packages/cli/src/plugins/index.js | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index f063e2224f..32c6faf980 100644 --- a/.gitignore +++ b/.gitignore @@ -102,4 +102,6 @@ packages/builder/cypress/reports stats.html # TypeScript cache -*.tsbuildinfo \ No newline at end of file +*.tsbuildinfo +budibase-component +budibase-datasource diff --git a/packages/cli/src/exec.js b/packages/cli/src/exec.js index 8b1134c897..72fd8e00eb 100644 --- a/packages/cli/src/exec.js +++ b/packages/cli/src/exec.js @@ -1,8 +1,8 @@ const util = require("util") const exec = util.promisify(require("child_process").exec) -exports.exec = async command => { - const { stdout } = await exec(command) +exports.exec = async (command, dir = "./") => { + const { stdout } = await exec(command, { cwd: dir }) return stdout } @@ -15,12 +15,13 @@ exports.utilityInstalled = async utilName => { } } -exports.runPkgCommand = async command => { +exports.runPkgCommand = async (command, dir = "./") => { const yarn = await exports.utilityInstalled("yarn") const npm = await exports.utilityInstalled("npm") if (!yarn && !npm) { throw new Error("Must have yarn or npm installed to run build.") } const npmCmd = command === "install" ? `npm ${command}` : `npm run ${command}` - await exports.exec(yarn ? `yarn ${command}` : npmCmd) + const cmd = yarn ? `yarn ${command}` : npmCmd + await exports.exec(cmd, dir) } diff --git a/packages/cli/src/plugins/index.js b/packages/cli/src/plugins/index.js index 6ce2d47e63..e6de624b63 100644 --- a/packages/cli/src/plugins/index.js +++ b/packages/cli/src/plugins/index.js @@ -37,7 +37,7 @@ async function init(opts) { await getSkeleton(type, name) await fleshOutSkeleton(name, desc, version) console.log(info("Installing dependencies...")) - await runPkgCommand("install") + await runPkgCommand("install", join(process.cwd(), name)) console.log(info(`Plugin created in directory "${name}"`)) } From dcce46f61665ed6b01ae34e79fb316e9d4189e15 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 11 Aug 2022 18:29:49 +0100 Subject: [PATCH 027/280] Fixing validation for datasource plugins. --- packages/cli/package.json | 6 +++--- packages/cli/src/plugins/validate.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 4f1cc8d4cd..7ea6111662 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "1.2.28-alpha.0", - "@budibase/string-templates": "1.2.28-alpha.0", - "@budibase/types": "1.2.28-alpha.0", + "@budibase/backend-core": "^1.2.38", + "@budibase/string-templates": "^1.2.38", + "@budibase/types": "^1.2.38", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/cli/src/plugins/validate.js b/packages/cli/src/plugins/validate.js index b460670c7f..4c2fa6ba53 100644 --- a/packages/cli/src/plugins/validate.js +++ b/packages/cli/src/plugins/validate.js @@ -1,5 +1,5 @@ const { PluginTypes } = require("./constants") -const { DatasourceFieldTypes, QueryTypes } = require("@budibase/types") +const { DatasourceFieldType, QueryType } = require("@budibase/types") const joi = require("joi") const DATASOURCE_TYPES = [ @@ -36,7 +36,7 @@ function validateDatasource(schema) { const fieldValidator = joi.object({ type: joi .string() - .allow(...Object.values(DatasourceFieldTypes)) + .allow(...Object.values(DatasourceFieldType)) .required(), required: joi.boolean().required(), default: joi.any(), @@ -45,7 +45,7 @@ function validateDatasource(schema) { const queryValidator = joi .object({ - type: joi.string().allow(...Object.values(QueryTypes)), + type: joi.string().allow(...Object.values(QueryType)), fields: joi.object().pattern(joi.string(), fieldValidator), }) .required() From 6fc70fa0abb1537dd7db73d112a202c7535cc6fc Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 12 Aug 2022 13:18:21 +0100 Subject: [PATCH 028/280] Fixing types. --- packages/cli/yarn.lock | 29 +- packages/server/yarn.lock | 634 +----------------- .../types/src/documents/app/datasource.ts | 69 -- packages/types/src/index.ts | 2 - 4 files changed, 38 insertions(+), 696 deletions(-) diff --git a/packages/cli/yarn.lock b/packages/cli/yarn.lock index 93157892dd..43c219fcd7 100644 --- a/packages/cli/yarn.lock +++ b/packages/cli/yarn.lock @@ -43,19 +43,18 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@budibase/backend-core@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.28-alpha.0.tgz#f4253825724327e6552000f8c7575134bfaa05cd" - integrity sha512-ueu+NZgkiKrX49E0Zy2rrNE4NLe2HAyl3VolTrZfVxOzu1IvtQ/wJBcGDG84VvSliP+0bOOVO9TiGMY3bvZ/Hw== +"@budibase/backend-core@^1.2.38": + version "1.2.38" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.38.tgz#9451ae72f6af8cff3aa0a57dc61fc8d3505a77a0" + integrity sha512-g7m4fHG1tLqNsSvdSltqRHLASOH5n3QBbN5DD7cmSBIVpUtDCA0EMx/L0vkDDhTmbOQApXAW3cyJs6H3QiWtOw== dependencies: - "@budibase/types" "1.2.28-alpha.0" + "@budibase/types" "^1.2.38" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" dotenv "16.0.1" emitter-listener "1.1.2" ioredis "4.28.0" - joi "17.6.0" jsonwebtoken "8.5.1" koa-passport "4.1.4" lodash "4.17.21" @@ -102,10 +101,10 @@ to-gfm-code-block "^0.1.1" year "^0.2.1" -"@budibase/string-templates@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.2.28-alpha.0.tgz#895571c142bcd68852f87e06a395232b3eb5516a" - integrity sha512-nXqa0IlSVW0og8NAJUW+ihUhdW8+rK0tskGWIwF+gEfAKd9NMyxoLswIAb7aYLmwdRRJFwhrpMEuF7ed8AojSQ== +"@budibase/string-templates@^1.2.38": + version "1.2.38" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.2.38.tgz#404804df516fb981b4f073f09bab64c9111cecb0" + integrity sha512-JRIAZVuuBECxDBcbx5FOYRRKi1ZyW7//LwKL5U1r9sIVCIxCW1t5b175oTnR9/bkktNs7X2ziynH/tsT5GVC0g== dependencies: "@budibase/handlebars-helpers" "^0.11.8" dayjs "^1.10.4" @@ -114,10 +113,10 @@ lodash "^4.17.20" vm2 "^3.9.4" -"@budibase/types@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.28-alpha.0.tgz#61668b7d5d9b1f85c09d658deed87ec3dc28e290" - integrity sha512-tYhdUl1+dEtG8h2xoGUl0NXZC5BZYQIhgPK7JkYrqFHuNx+1f6EoHPQ9MMb/WyOxIDZv4gY7QJLg0KeVflofbw== +"@budibase/types@^1.2.38": + version "1.2.38" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.38.tgz#472f4ec891242488561a8cfc175961664bc7ac88" + integrity sha512-pMKh4FKhPoa1pge4FKqPi3gbzZp3HJ1RuhM5naKFqC1yompIn/Es+YNft39VC2bTW5tiGbucMcjWzdpMwTSTVw== "@eslint/eslintrc@^0.4.3": version "0.4.3" @@ -2485,7 +2484,7 @@ jmespath@0.15.0: resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" integrity sha512-+kHj8HXArPfpPEKGLZ+kB5ONRTCiGQXo8RQYL0hH8t6pWXUBBK5KkkQmTNOwKK4LEsd0yTsgtjJVm4UBSZea4w== -joi@17.6.0, joi@^17.6.0: +joi@^17.6.0: version "17.6.0" resolved "https://registry.yarnpkg.com/joi/-/joi-17.6.0.tgz#0bb54f2f006c09a96e75ce687957bd04290054b2" integrity sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw== diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 8545343645..a8dea20e95 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.28-alpha.0.tgz#f4253825724327e6552000f8c7575134bfaa05cd" - integrity sha512-ueu+NZgkiKrX49E0Zy2rrNE4NLe2HAyl3VolTrZfVxOzu1IvtQ/wJBcGDG84VvSliP+0bOOVO9TiGMY3bvZ/Hw== +"@budibase/backend-core@1.2.39-alpha.0": + version "1.2.39-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.39-alpha.0.tgz#52a1d340d28fa714822827aeb843e1f097ad8f60" + integrity sha512-yHvWAUH1j8+UJx8hYl11iAGOpxmkxSbzf7qVCJ8a84Ms46Clmwp+qxtnDzKxMit2KJW72dJM9+PvI+OUG0Bixg== dependencies: - "@budibase/types" "1.2.28-alpha.0" + "@budibase/types" "1.2.39-alpha.0" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1128,59 +1128,6 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/bbui@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.2.28-alpha.0.tgz#579afbccb824a2ade16a6632d82615dfc90fcfc8" - integrity sha512-61xgvHMJM5xWSNo6mva2toywXLM7KuF8Ly4mOgH/coKsS5DQj6v+8NXXbRTVtVy7i6rbeFjCs2fzTeEC6bW/ig== - dependencies: - "@adobe/spectrum-css-workflow-icons" "^1.2.1" - "@budibase/string-templates" "1.2.28-alpha.0" - "@spectrum-css/actionbutton" "^1.0.1" - "@spectrum-css/actiongroup" "^1.0.1" - "@spectrum-css/avatar" "^3.0.2" - "@spectrum-css/button" "^3.0.1" - "@spectrum-css/buttongroup" "^3.0.2" - "@spectrum-css/checkbox" "^3.0.2" - "@spectrum-css/dialog" "^3.0.1" - "@spectrum-css/divider" "^1.0.3" - "@spectrum-css/dropzone" "^3.0.2" - "@spectrum-css/fieldgroup" "^3.0.2" - "@spectrum-css/fieldlabel" "^3.0.1" - "@spectrum-css/icon" "^3.0.1" - "@spectrum-css/illustratedmessage" "^3.0.2" - "@spectrum-css/inlinealert" "^2.0.1" - "@spectrum-css/inputgroup" "^3.0.2" - "@spectrum-css/label" "^2.0.10" - "@spectrum-css/link" "^3.1.1" - "@spectrum-css/menu" "^3.0.1" - "@spectrum-css/modal" "^3.0.1" - "@spectrum-css/pagination" "^3.0.3" - "@spectrum-css/picker" "^1.0.1" - "@spectrum-css/popover" "^3.0.1" - "@spectrum-css/progressbar" "^1.0.2" - "@spectrum-css/progresscircle" "^1.0.2" - "@spectrum-css/radio" "^3.0.2" - "@spectrum-css/search" "^3.0.2" - "@spectrum-css/sidenav" "^3.0.2" - "@spectrum-css/slider" "3.0.1" - "@spectrum-css/statuslight" "^3.0.2" - "@spectrum-css/stepper" "^3.0.3" - "@spectrum-css/switch" "^1.0.2" - "@spectrum-css/table" "^3.0.1" - "@spectrum-css/tabs" "^3.2.12" - "@spectrum-css/tags" "^3.0.2" - "@spectrum-css/textfield" "^3.0.1" - "@spectrum-css/toast" "^3.0.1" - "@spectrum-css/tooltip" "^3.0.3" - "@spectrum-css/treeview" "^3.0.2" - "@spectrum-css/typography" "^3.0.1" - "@spectrum-css/underlay" "^2.0.9" - "@spectrum-css/vars" "^3.0.1" - dayjs "^1.10.4" - easymde "^2.16.1" - svelte-flatpickr "^3.2.3" - svelte-portal "^1.0.0" - "@budibase/bbui@^0.9.139": version "0.9.190" resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-0.9.190.tgz#e1ec400ac90f556bfbc80fc23a04506f1585ea81" @@ -1231,77 +1178,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/client@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/client/-/client-1.2.28-alpha.0.tgz#5f166cfc619848d308f0f7ba90d291220bb38ed8" - integrity sha512-DjMIafaBeDmL/tOmTCFSNOowcP33E+a3e02g7Y1oDzRei9o7zpsxSLXEUVNvLl+XtvR9PNe4krXrsv4MDPoQ6Q== +"@budibase/pro@1.2.39-alpha.0": + version "1.2.39-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.39-alpha.0.tgz#272e3ffd5e2189c787df6b6fbe22b7084832ade7" + integrity sha512-B0XakaUHW2Y1RtkEcrPEBcp8CDFJ8/fC9agLI3WK0ARnTGx9ROd8Liokq3/pW3vmlOgsfijzNHL3LUYcPTMEXw== dependencies: - "@budibase/bbui" "1.2.28-alpha.0" - "@budibase/frontend-core" "1.2.28-alpha.0" - "@budibase/string-templates" "1.2.28-alpha.0" - "@spectrum-css/button" "^3.0.3" - "@spectrum-css/card" "^3.0.3" - "@spectrum-css/divider" "^1.0.3" - "@spectrum-css/link" "^3.1.3" - "@spectrum-css/page" "^3.0.1" - "@spectrum-css/tag" "^3.1.4" - "@spectrum-css/typography" "^3.0.2" - "@spectrum-css/vars" "^3.0.1" - apexcharts "^3.22.1" - dayjs "^1.10.5" - downloadjs "1.4.7" - leaflet "^1.7.1" - regexparam "^1.3.0" - rollup-plugin-polyfill-node "^0.8.0" - sanitize-html "^2.7.0" - screenfull "^6.0.1" - shortid "^2.2.15" - svelte "^3.49.0" - svelte-apexcharts "^1.0.2" - svelte-flatpickr "^3.1.0" - svelte-spa-router "^3.0.5" - -"@budibase/frontend-core@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-1.2.28-alpha.0.tgz#dfe135acfce25fcdff4e4c7ed88c4d974c674858" - integrity sha512-uPZuVpJrJr9aX0QdrwkL+m78X46RUpcKg04KtcETvdvyUmPndz5Z7zr9j2Fo02Kt8c4lKRrpQgHL8gnDwwHSeg== - dependencies: - "@budibase/bbui" "1.2.28-alpha.0" - lodash "^4.17.21" - svelte "^3.46.2" - -"@budibase/handlebars-helpers@^0.11.8": - version "0.11.8" - resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.8.tgz#6953d29673a8c5c407e096c0a84890465c7ce841" - integrity sha512-ggWJUt0GqsHFAEup5tlWlcrmYML57nKhpNGGLzVsqXVYN8eVmf3xluYmmMe7fDYhQH0leSprrdEXmsdFQF3HAQ== - dependencies: - array-sort "^1.0.0" - define-property "^2.0.2" - extend-shallow "^3.0.2" - for-in "^1.0.2" - get-object "^0.2.0" - get-value "^3.0.1" - handlebars "^4.7.7" - handlebars-utils "^1.0.6" - has-value "^2.0.2" - helper-md "^0.2.2" - html-tag "^2.0.0" - is-even "^1.0.0" - is-glob "^4.0.1" - kind-of "^6.0.3" - micromatch "^3.1.5" - relative "^3.0.2" - striptags "^3.1.1" - to-gfm-code-block "^0.1.1" - year "^0.2.1" - -"@budibase/pro@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.28-alpha.0.tgz#f372dcbac55634a1f0e7ff8125ffb0a0aeea086c" - integrity sha512-YxElWs5gwpe1JmHgpB52YeRkyeWPoBiUIt8EshyW90EFVUXP7FOy3LsjvKMNJXAZs1mI4ttkZfuWva8HjrGaKA== - dependencies: - "@budibase/backend-core" "1.2.28-alpha.0" - "@budibase/types" "1.2.28-alpha.0" + "@budibase/backend-core" "1.2.39-alpha.0" + "@budibase/types" "1.2.39-alpha.0" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1324,22 +1207,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/string-templates@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.2.28-alpha.0.tgz#895571c142bcd68852f87e06a395232b3eb5516a" - integrity sha512-nXqa0IlSVW0og8NAJUW+ihUhdW8+rK0tskGWIwF+gEfAKd9NMyxoLswIAb7aYLmwdRRJFwhrpMEuF7ed8AojSQ== - dependencies: - "@budibase/handlebars-helpers" "^0.11.8" - dayjs "^1.10.4" - handlebars "^4.7.6" - handlebars-utils "^1.0.6" - lodash "^4.17.20" - vm2 "^3.9.4" - -"@budibase/types@1.2.28-alpha.0": - version "1.2.28-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.28-alpha.0.tgz#61668b7d5d9b1f85c09d658deed87ec3dc28e290" - integrity sha512-tYhdUl1+dEtG8h2xoGUl0NXZC5BZYQIhgPK7JkYrqFHuNx+1f6EoHPQ9MMb/WyOxIDZv4gY7QJLg0KeVflofbw== +"@budibase/types@1.2.39-alpha.0": + version "1.2.39-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.39-alpha.0.tgz#d0d48e4da36a93a4a9354cc49663f38d0181b6c0" + integrity sha512-i+lQeqlKmFORLuKdwmKnlmCCCEXZH6NdXHrOqNcebJzcNlx3Gx342+cHe4ZGYu0L+wCkWWelD5XHFuNMVMcuHg== "@bull-board/api@3.7.0": version "3.7.0" @@ -2268,24 +2139,6 @@ resolved "https://registry.yarnpkg.com/@redis/time-series/-/time-series-1.0.3.tgz#4cfca8e564228c0bddcdf4418cba60c20b224ac4" integrity sha512-OFp0q4SGrTH0Mruf6oFsHGea58u8vS/iI5+NpYdicaM+7BgqBZH8FFvNZ8rYYLrUO/QRqMq72NpXmxLVNcdmjA== -"@rollup/plugin-inject@^4.0.0": - version "4.0.4" - resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz#fbeee66e9a700782c4f65c8b0edbafe58678fbc2" - integrity sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ== - dependencies: - "@rollup/pluginutils" "^3.1.0" - estree-walker "^2.0.1" - magic-string "^0.25.7" - -"@rollup/pluginutils@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" - integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== - dependencies: - "@types/estree" "0.0.39" - estree-walker "^1.0.1" - picomatch "^2.2.2" - "@sendgrid/client@^7.1.1": version "7.7.0" resolved "https://registry.yarnpkg.com/@sendgrid/client/-/client-7.7.0.tgz#f8f67abd604205a0d0b1af091b61517ef465fdbf" @@ -2567,11 +2420,6 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/sidenav/-/sidenav-3.0.23.tgz#c218560d472e13a3e0d1499b762df1206dcffbfd" integrity sha512-4IFw2/HMQJRzM0M2c5na/HeY7y5vJoGpMFBkXNpQyhW4TRo7N1rGwYQ5dRD3s4OVEWV4/rjfGV0d/qhfwKUTog== -"@spectrum-css/slider@3.0.1": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@spectrum-css/slider/-/slider-3.0.1.tgz#5281e6f47eb5a4fd3d1816c138bf66d01d7f2e49" - integrity sha512-DI2dtMRnQuDM1miVzl3SGyR1khUEKnwdXfO5EHDFwkC3yav43F5QogkfjmjFmWWobMVovdJlAuiaaJ/IHejD0Q== - "@spectrum-css/statuslight@^3.0.2": version "3.0.8" resolved "https://registry.yarnpkg.com/@spectrum-css/statuslight/-/statuslight-3.0.8.tgz#3b0ea80712573679870a85d469850230e794a0f7" @@ -2597,16 +2445,6 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.16.tgz#c3f7800d8d6f7c9930c28cd01354816328bf72b1" integrity sha512-JUcMB/fiDG/KoyrVstlUMacFJUY4OHKqhMRuPtu9ggUXWCRbSkY8he92v6u0HwY3DuhDoOxNTK8d/PLjk/fsbg== -"@spectrum-css/tabs@^3.2.12": - version "3.2.19" - resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.19.tgz#2eae3a2c4760466882db08281365d502c3f22ebf" - integrity sha512-SNGFf/karBr/GNz5GNWnbppFz6uEOGecv6D8WA1ZLeWkjg4gG5e4M9XmPcB32v350e1PTRG7KwWDce48qWAKCQ== - -"@spectrum-css/tag@^3.1.4": - version "3.3.14" - resolved "https://registry.yarnpkg.com/@spectrum-css/tag/-/tag-3.3.14.tgz#2d1ca0759da6a3a2970d14bcabf33bd4a8f63a5f" - integrity sha512-S4RUaxN/83Pr/SYkQHeZNh2NXmtumUEzhrsrrliI6bAt3bjs+mLresTGd9qkIX2+Ycq1JHWTr0HTga4ti1YYyA== - "@spectrum-css/tags@^3.0.2": version "3.0.3" resolved "https://registry.yarnpkg.com/@spectrum-css/tags/-/tags-3.0.3.tgz#fc76d2735cdc442de91b7eb3bee49a928c0767ac" @@ -2784,13 +2622,6 @@ resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== -"@types/codemirror@^5.60.4": - version "5.60.5" - resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.5.tgz#5b989a3b4bbe657458cf372c92b6bfda6061a2b7" - integrity sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg== - dependencies: - "@types/tern" "*" - "@types/connect@*": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -2839,11 +2670,6 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== -"@types/estree@0.0.39": - version "0.0.39" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" - integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== - "@types/express-serve-static-core@^4.17.18": version "4.17.28" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" @@ -2987,11 +2813,6 @@ resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== -"@types/marked@^4.0.1": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.3.tgz#2098f4a77adaba9ce881c9e0b6baf29116e5acc4" - integrity sha512-HnMWQkLJEf/PnxZIfbm0yGJRRZYYMhb++O9M36UCTA9z53uPvVoSlAwJr3XOpDEryb7Hwl1qAx/MV6YIW1RXxg== - "@types/mime@^1": version "1.3.2" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" @@ -3127,13 +2948,6 @@ "@types/cookiejar" "*" "@types/node" "*" -"@types/tern@*": - version "0.23.4" - resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.4.tgz#03926eb13dbeaf3ae0d390caf706b2643a0127fb" - integrity sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg== - dependencies: - "@types/estree" "*" - "@types/tough-cookie@*": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" @@ -3718,7 +3532,7 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.10, argparse@^1.0.7: +argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -3765,15 +3579,6 @@ array-equal@^1.0.0: resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" integrity sha512-H3LU5RLiSsGXPhN+Nipar0iR0IofH+8r89G2y1tBKxQ/agagKyAjhkAFDRBfodP2caPrNKHpAWNIM/c9yeL7uA== -array-sort@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" - integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== - dependencies: - default-compare "^1.0.0" - get-value "^2.0.6" - kind-of "^5.0.2" - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -3905,13 +3710,6 @@ atomic-sleep@^1.0.0: resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== -autolinker@~0.28.0: - version "0.28.1" - resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" - integrity sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ== - dependencies: - gulp-header "^1.7.1" - available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -4744,18 +4542,6 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== -codemirror-spell-checker@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz#1c660f9089483ccb5113b9ba9ca19c3f4993371e" - integrity sha512-2Tl6n0v+GJRsC9K3MLCdLaMOmvWL0uukajNJseorZJsslaxZyZMgENocPU8R0DyoTAiKsyqiemSOZo7kjGV0LQ== - dependencies: - typo-js "*" - -codemirror@^5.63.1: - version "5.65.7" - resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.7.tgz#29af41ce5f4c2b8f1c1e16f4e645ff392823716a" - integrity sha512-zb67cXzgugIQmb6tfD4G11ILjYoMfTjwcjn+cWsa4GewlI2adhR/h3kolkoCQTm1msD/1BuqVTKuO09ELsS++A== - collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -4906,13 +4692,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -concat-with-sourcemaps@*: - version "1.1.0" - resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" - integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== - dependencies: - source-map "^0.6.1" - condense-newlines@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/condense-newlines/-/condense-newlines-0.2.1.tgz#3de985553139475d32502c83b02f60684d24c55f" @@ -5319,13 +5098,6 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== -default-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" - integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== - dependencies: - kind-of "^5.0.2" - default-shell@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/default-shell/-/default-shell-1.0.1.tgz#752304bddc6174f49eb29cb988feea0b8813c8bc" @@ -5493,25 +5265,11 @@ doctrine@3.0.0, doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-serializer@^1.0.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" - integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.2.0" - entities "^2.0.0" - dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== -domelementtype@^2.0.1, domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -5526,22 +5284,6 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" -domhandler@^4.0.0, domhandler@^4.2.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" - integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== - dependencies: - domelementtype "^2.2.0" - -domutils@^2.5.2: - version "2.8.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" - integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -5586,11 +5328,6 @@ download@8.0.0: p-event "^2.1.0" pify "^4.0.1" -downloadjs@1.4.7: - version "1.4.7" - resolved "https://registry.yarnpkg.com/downloadjs/-/downloadjs-1.4.7.tgz#f69f96f940e0d0553dac291139865a3cd0101e3c" - integrity sha512-LN1gO7+u9xjU5oEScGFKvXhYf7Y/empUIIEAGBs1LzUq/rg5duiDrkuH5A2lQGd5jfMOb9X9usDa2oVXwJ0U/Q== - duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -5606,17 +5343,6 @@ duplexify@^4.0.0: readable-stream "^3.1.1" stream-shift "^1.0.0" -easymde@^2.16.1: - version "2.16.1" - resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.16.1.tgz#f4c2380312615cb33826f1a1fecfaa4022ff551a" - integrity sha512-FihYgjRsKfhGNk89SHSqxKLC4aJ1kfybPWW6iAmtb5GnXu+tnFPSzSaGBmk1RRlCuhFSjhF0SnIMGVPjEzkr6g== - dependencies: - "@types/codemirror" "^5.60.4" - "@types/marked" "^4.0.1" - codemirror "^5.63.1" - codemirror-spell-checker "1.1.2" - marked "^4.0.10" - ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -5728,16 +5454,6 @@ enhanced-resolve@^5.9.3: graceful-fs "^4.2.4" tapable "^2.2.0" -ent@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" - integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== - -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - entities@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" @@ -6171,16 +5887,6 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== -estree-walker@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" - integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== - -estree-walker@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" - integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== - esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -6730,11 +6436,6 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-exists-sync@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" - integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== - fs-extra@8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -6883,14 +6584,6 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.3" -get-object@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/get-object/-/get-object-0.2.0.tgz#d92ff7d5190c64530cda0543dac63a3d47fe8c0c" - integrity sha512-7P6y6k6EzEFmO/XyUyFlXm1YLJy9xeA1x/grNV8276abX5GuwUtYgKFkRFkLixw4hf4Pz9q2vgv/8Ar42R0HuQ== - dependencies: - is-number "^2.0.2" - isobject "^0.2.0" - get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -6953,13 +6646,6 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== -get-value@^3.0.0, get-value@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-3.0.1.tgz#5efd2a157f1d6a516d7524e124ac52d0a39ef5a8" - integrity sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA== - dependencies: - isobject "^3.0.1" - getopts@2.2.5: version "2.2.5" resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" @@ -7265,24 +6951,7 @@ gtoken@^5.0.4: google-p12-pem "^3.1.3" jws "^4.0.0" -gulp-header@^1.7.1: - version "1.8.12" - resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" - integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== - dependencies: - concat-with-sourcemaps "*" - lodash.template "^4.4.0" - through2 "^2.0.0" - -handlebars-utils@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9" - integrity sha512-d5mmoQXdeEqSKMtQQZ9WkiUcO1E3tPbWxluCK9hVgIDPzQa9WsKo3Lbe/sGflTe7TomHEeZaOgwIkyIr1kfzkw== - dependencies: - kind-of "^6.0.0" - typeof-article "^0.1.1" - -handlebars@^4.7.6, handlebars@^4.7.7: +handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== @@ -7376,14 +7045,6 @@ has-value@^1.0.0: has-values "^1.0.0" isobject "^3.0.0" -has-value@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-2.0.2.tgz#d0f12e8780ba8e90e66ad1a21c707fdb67c25658" - integrity sha512-ybKOlcRsK2MqrM3Hmz/lQxXHZ6ejzSPzpNabKB45jb5qDgJvKPa3SdapTsTLwEb9WltgWpOmNax7i+DzNOk4TA== - dependencies: - get-value "^3.0.0" - has-values "^2.0.1" - has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" @@ -7397,13 +7058,6 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has-values@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-2.0.1.tgz#3876200ff86d8a8546a9264a952c17d5fc17579d" - integrity sha512-+QdH3jOmq9P8GfdjFg0eJudqx1FqU62NQJ4P16rOEHeRdl7ckgwn6uqQjzYE0ZoHVV/e5E2esuJ5Gl5+HUW19w== - dependencies: - kind-of "^6.0.2" - has-yarn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" @@ -7416,16 +7070,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -helper-md@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/helper-md/-/helper-md-0.2.2.tgz#c1f59d7e55bbae23362fd8a0e971607aec69d41f" - integrity sha512-49TaQzK+Ic7ZVTq4i1UZxRUJEmAilTk8hz7q4I0WNUaTclLR8ArJV5B3A1fe1xF2HtsDTr2gYKLaVTof/Lt84Q== - dependencies: - ent "^2.2.0" - extend-shallow "^2.0.1" - fs-exists-sync "^0.1.0" - remarkable "^1.6.2" - homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -7462,24 +7106,6 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== -html-tag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/html-tag/-/html-tag-2.0.0.tgz#36c3bc8d816fd30b570d5764a497a641640c2fed" - integrity sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g== - dependencies: - is-self-closing "^1.0.1" - kind-of "^6.0.0" - -htmlparser2@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" - integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.0.0" - domutils "^2.5.2" - entities "^2.0.0" - http-assert@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.5.0.tgz#c389ccd87ac16ed2dfa6246fd73b926aa00e6b8f" @@ -7920,13 +7546,6 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== -is-even@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-even/-/is-even-1.0.0.tgz#76b5055fbad8d294a86b6a949015e1c97b717c06" - integrity sha512-LEhnkAdJqic4Dbqn58A0y52IXoHWlsueqQkKfMfdEnIYG8A1sm/GHidKkS6yvXlMoRrkM34csHnXQtOqcb+Jzg== - dependencies: - is-odd "^0.1.2" - is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -8016,13 +7635,6 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" -is-number@^2.0.2: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" - integrity sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg== - dependencies: - kind-of "^3.0.2" - is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -8045,13 +7657,6 @@ is-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== -is-odd@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" - integrity sha512-Ri7C2K7o5IrUU9UEI8losXJCCD/UtsaIrkR5sxIcFg4xQ9cRJXlWA5DQvTE0yDc0krvSNLsRGXN11UPS6KyfBw== - dependencies: - is-number "^3.0.0" - is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -8069,11 +7674,6 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-plain-object@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" - integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== - is-potential-custom-element-name@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" @@ -8102,13 +7702,6 @@ is-retry-allowed@^2.2.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz#88f34cbd236e043e71b6932d09b0c65fb7b4d71d" integrity sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg== -is-self-closing@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" - integrity sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg== - dependencies: - self-closing-tags "^1.0.1" - is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" @@ -8219,11 +7812,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -isobject@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e" - integrity sha512-VaWq6XYAsbvM0wf4dyBO7WH9D7GosB7ZZlqrawI9BBiTMINBeCyqSKBa35m870MY3O4aM31pYyZi9DfGrYMJrQ== - isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" @@ -9404,7 +8992,7 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== @@ -9418,12 +9006,12 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0, kind-of@^5.0.2: +kind-of@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: +kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -9683,11 +9271,6 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" -leaflet@^1.7.1: - version "1.8.0" - resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.8.0.tgz#4615db4a22a304e8e692cae9270b983b38a2055e" - integrity sha512-gwhMjFCQiYs3x/Sf+d49f10ERXaEFCPr+nVTryhAW8DWbMGqJqt9G4XuIaHmFW08zYvhgdzqXGr8AlW8v8dQkA== - left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -9882,11 +9465,6 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash._reinterpolate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" - integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== - lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -9997,21 +9575,6 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== -lodash.template@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" - integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.templatesettings "^4.0.0" - -lodash.templatesettings@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" - integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== - dependencies: - lodash._reinterpolate "^3.0.0" - lodash.without@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" @@ -10022,7 +9585,7 @@ lodash.xor@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.xor/-/lodash.xor-4.5.0.tgz#4d48ed7e98095b0632582ba714d3ff8ae8fb1db6" integrity sha512-sVN2zimthq7aZ5sPGXnSz32rZPuqcparVW50chJQe+mzTYV+IsxSsl/2gnkWWE2Of7K3myBQBqtLKOUEHJKRsQ== -lodash@4.17.21, lodash@^4.14.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.7.0: +lodash@4.17.21, lodash@^4.14.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -10090,13 +9653,6 @@ ltgt@2.2.1, ltgt@^2.1.2, ltgt@~2.2.0: resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" integrity sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA== -magic-string@^0.25.7: - version "0.25.9" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" - integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ== - dependencies: - sourcemap-codec "^1.4.8" - make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -10161,11 +9717,6 @@ markdown-it@^12.2.0: mdurl "^1.0.1" uc.micro "^1.0.5" -marked@^4.0.10: - version "4.0.18" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.18.tgz#cd0ac54b2e5610cfb90e8fd46ccaa8292c9ed569" - integrity sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw== - matcher@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca" @@ -10238,7 +9789,7 @@ methods@^1.0.1, methods@^1.1.1, methods@^1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.5: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -10496,16 +10047,6 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA== -nanoid@^2.1.0: - version "2.1.11" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" - integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== - -nanoid@^3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" - integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -11103,11 +10644,6 @@ parse-passwd@^1.0.0: resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== -parse-srcset@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/parse-srcset/-/parse-srcset-1.0.2.tgz#f2bd221f6cc970a938d88556abc589caaaa2bde1" - integrity sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q== - parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -11354,7 +10890,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -11469,15 +11005,6 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== -postcss@^8.3.11: - version "8.4.16" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.16.tgz#33a1d675fac39941f5f445db0de4db2b6e01d43c" - integrity sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ== - dependencies: - nanoid "^3.3.4" - picocolors "^1.0.0" - source-map-js "^1.0.2" - postgres-array@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" @@ -12226,16 +11753,6 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" -regexparam@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-2.0.1.tgz#c912f5dae371e3798100b3c9ce22b7414d0889fa" - integrity sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw== - -regexparam@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f" - integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g== - regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" @@ -12279,21 +11796,6 @@ regjsparser@^0.8.2: dependencies: jsesc "~0.5.0" -relative@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" - integrity sha512-Q5W2qeYtY9GbiR8z1yHNZ1DGhyjb4AnLEjt8iE6XfcC1QIu+FAtj3HQaO0wH28H1mX6cqNLvAqWhP402dxJGyA== - dependencies: - isobject "^2.0.0" - -remarkable@^1.6.2: - version "1.7.4" - resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" - integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== - dependencies: - argparse "^1.0.10" - autolinker "~0.28.0" - remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -12505,13 +12007,6 @@ roarr@^2.15.3: semver-compare "^1.0.0" sprintf-js "^1.1.2" -rollup-plugin-polyfill-node@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.8.0.tgz#859c070822f5e38d221e5b4238cb34aa894c2b19" - integrity sha512-C4UeKedOmOBkB3FgR+z/v9kzRwV1Q/H8xWs1u1+CNe4XOV6hINfOrcO+TredKxYvopCmr+WKUSNsFUnD1RLHgQ== - dependencies: - "@rollup/plugin-inject" "^4.0.0" - rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -12578,18 +12073,6 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" -sanitize-html@^2.7.0: - version "2.7.1" - resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.7.1.tgz#a6c2c1a88054a79eeacfac9b0a43f1b393476901" - integrity sha512-oOpe8l4J8CaBk++2haoN5yNI5beekjuHv3JRPKUx/7h40Rdr85pemn4NkvUB3TcBP7yjat574sPlcMAyv4UQig== - dependencies: - deepmerge "^4.2.2" - escape-string-regexp "^4.0.0" - htmlparser2 "^6.0.0" - is-plain-object "^5.0.0" - parse-srcset "^1.0.2" - postcss "^8.3.11" - sanitize-s3-objectkey@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/sanitize-s3-objectkey/-/sanitize-s3-objectkey-0.0.1.tgz#efa9887cd45275b40234fb4bb12fc5754fe64e7e" @@ -12628,11 +12111,6 @@ schema-utils@^3.1.0, schema-utils@^3.1.1: ajv "^6.12.5" ajv-keywords "^3.5.2" -screenfull@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-6.0.2.tgz#3dbe4b8c4f8f49fb8e33caa8f69d0bca730ab238" - integrity sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw== - search-params@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/search-params/-/search-params-3.0.0.tgz#dbc7c243058e5a33ae1e9870be91f5aced4100d8" @@ -12650,11 +12128,6 @@ seek-bzip@^1.0.5: dependencies: commander "^2.8.1" -self-closing-tags@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" - integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== - semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -12790,13 +12263,6 @@ shimmer@^1.2.0: resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== -shortid@^2.2.15: - version "2.2.16" - resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608" - integrity sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g== - dependencies: - nanoid "^2.1.0" - side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -12961,11 +12427,6 @@ source-list-map@^2.0.1: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== -source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -13019,11 +12480,6 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== -sourcemap-codec@^1.4.8: - version "1.4.8" - resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - spark-md5@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/spark-md5/-/spark-md5-3.0.1.tgz#83a0e255734f2ab4e5c466e5a2cfc9ba2aa2124d" @@ -13348,11 +12804,6 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" -striptags@^3.1.1: - version "3.2.0" - resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.2.0.tgz#cc74a137db2de8b0b9a370006334161f7dd67052" - integrity sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw== - style-loader@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" @@ -13452,14 +12903,7 @@ svelte-portal@^1.0.0: resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3" integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q== -svelte-spa-router@^3.0.5: - version "3.3.0" - resolved "https://registry.yarnpkg.com/svelte-spa-router/-/svelte-spa-router-3.3.0.tgz#2fc0967a49dc361dfe4d38dddad6e662eed5b42c" - integrity sha512-cwRNe7cxD43sCvSfEeaKiNZg3FCizGxeMcf7CPiWRP3jKXjEma3vxyyuDtPOam6nWbVxl9TNM3hlE/i87ZlqcQ== - dependencies: - regexparam "2.0.1" - -svelte@3.49.0, svelte@^3.46.2, svelte@^3.49.0: +svelte@3.49.0: version "3.49.0" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== @@ -13821,11 +13265,6 @@ to-fast-properties@^2.0.0: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= -to-gfm-code-block@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" - integrity sha512-LQRZWyn8d5amUKnfR9A9Uu7x9ss7Re8peuWR2gkh1E+ildOfv2aF26JpuDg8JtvCduu5+hOrMIH+XstZtnagqg== - to-json-schema@0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/to-json-schema/-/to-json-schema-0.2.5.tgz#ef3c3f11ad64460dcfbdbafd0fd525d69d62a98f" @@ -14072,13 +13511,6 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typeof-article@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/typeof-article/-/typeof-article-0.1.1.tgz#9f07e733c3fbb646ffa9e61c08debacd460e06af" - integrity sha512-Vn42zdX3FhmUrzEmitX3iYyLb+Umwpmv8fkZRIknYh84lmdrwqZA5xYaoKiIj2Rc5i/5wcDrpUmZcbk1U51vTw== - dependencies: - kind-of "^3.1.0" - typeof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typeof/-/typeof-1.0.0.tgz#9c84403f2323ae5399167275497638ea1d2f2440" @@ -14089,11 +13521,6 @@ typescript@4.6.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4" integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg== -typo-js@*: - version "1.2.2" - resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.2.tgz#340484d81fe518e77c81a5a770162b14492f183b" - integrity sha512-C7pYBQK17EjSg8tVNY91KHdUt5Nf6FMJ+c3js076quPmBML57PmNMzAcIq/2kf/hSYtFABNDIYNYlJRl5BJhGw== - uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" @@ -14418,14 +13845,6 @@ vm2@3.9.6: acorn "^8.7.0" acorn-walk "^8.2.0" -vm2@^3.9.4: - version "3.9.10" - resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.10.tgz#c66543096b5c44c8861a6465805c23c7cc996a44" - integrity sha512-AuECTSvwu2OHLAZYhG716YzwodKCIJxB6u1zG7PgSQwIgAlEaoXH52bxdcvT8GkGjnYK7r7yWDW0m0sOsPuBjQ== - dependencies: - acorn "^8.7.0" - acorn-walk "^8.2.0" - vuvuzela@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/vuvuzela/-/vuvuzela-1.0.3.tgz#3be145e58271c73ca55279dd851f12a682114b0b" @@ -14979,11 +14398,6 @@ yauzl@^2.4.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" -year@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" - integrity sha512-9GnJUZ0QM4OgXuOzsKNzTJ5EOkums1Xc+3YQXp+Q+UxFjf7zLucp9dQ8QMIft0Szs1E1hUiXFim1OYfEKFq97w== - ylru@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.3.2.tgz#0de48017473275a4cbdfc83a1eaf67c01af8a785" diff --git a/packages/types/src/documents/app/datasource.ts b/packages/types/src/documents/app/datasource.ts index 8a8419c7f5..efdc2ca1bd 100644 --- a/packages/types/src/documents/app/datasource.ts +++ b/packages/types/src/documents/app/datasource.ts @@ -2,75 +2,6 @@ import { Document } from "../document" import { SourceName } from "../../sdk" import { Table } from "./table" -export enum Operation { - CREATE = "CREATE", - READ = "READ", - UPDATE = "UPDATE", - DELETE = "DELETE", - BULK_CREATE = "BULK_CREATE", - CREATE_TABLE = "CREATE_TABLE", - UPDATE_TABLE = "UPDATE_TABLE", - DELETE_TABLE = "DELETE_TABLE", -} - -export enum SortDirection { - ASCENDING = "ASCENDING", - DESCENDING = "DESCENDING", -} - -export enum QueryTypes { - SQL = "sql", - JSON = "json", - FIELDS = "fields", -} - -export enum DatasourceFieldTypes { - STRING = "string", - LONGFORM = "longForm", - BOOLEAN = "boolean", - NUMBER = "number", - PASSWORD = "password", - LIST = "list", - OBJECT = "object", - JSON = "json", - FILE = "file", -} - -export enum SourceNames { - POSTGRES = "POSTGRES", - DYNAMODB = "DYNAMODB", - MONGODB = "MONGODB", - ELASTICSEARCH = "ELASTICSEARCH", - COUCHDB = "COUCHDB", - SQL_SERVER = "SQL_SERVER", - S3 = "S3", - AIRTABLE = "AIRTABLE", - MYSQL = "MYSQL", - ARANGODB = "ARANGODB", - REST = "REST", - ORACLE = "ORACLE", - GOOGLE_SHEETS = "GOOGLE_SHEETS", - FIRESTORE = "FIRESTORE", - REDIS = "REDIS", - SNOWFLAKE = "SNOWFLAKE", -} - -export enum IncludeRelationships { - INCLUDE = 1, - EXCLUDE = 0, -} - -export enum FilterTypes { - STRING = "string", - FUZZY = "fuzzy", - RANGE = "range", - EQUAL = "equal", - NOT_EQUAL = "notEqual", - EMPTY = "empty", - NOT_EMPTY = "notEmpty", - ONE_OF = "oneOf", -} - export interface Datasource extends Document { type: string name?: string diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 4a645c5266..4adb2fda97 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,5 +1,3 @@ export * from "./documents" -export * from "./sdk/events" -export * from "./sdk/licensing" export * from "./sdk" export * from "./api" From f1d5691fb734185c0fb8cc65986a4c7157feac79 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 12 Aug 2022 14:01:56 +0100 Subject: [PATCH 029/280] Update name of types constant --- packages/server/src/api/controllers/screen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/screen.js b/packages/server/src/api/controllers/screen.js index 1d5d876dc4..99d12d064c 100644 --- a/packages/server/src/api/controllers/screen.js +++ b/packages/server/src/api/controllers/screen.js @@ -2,7 +2,7 @@ const { getScreenParams, generateScreenID, getPluginParams, - DocumentTypes, + DocumentType, } = require("../../db/utils") const { AccessController } = require("@budibase/backend-core/roles") const { getAppDB } = require("@budibase/backend-core/context") @@ -60,7 +60,7 @@ exports.save = async ctx => { }) // Update the app metadata - const application = await db.get(DocumentTypes.APP_METADATA) + const application = await db.get(DocumentType.APP_METADATA) let usedPlugins = application.usedPlugins || [] requiredPlugins.forEach(plugin => { From 8c227c0edda79662e73de34da06c60e60570a6da Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 12 Aug 2022 14:02:11 +0100 Subject: [PATCH 030/280] Simply logic around handling runtime reloading of custom components --- packages/client/src/stores/components.js | 66 ++++++++++++------------ 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/packages/client/src/stores/components.js b/packages/client/src/stores/components.js index 94dd16a957..8512a371d8 100644 --- a/packages/client/src/stores/components.js +++ b/packages/client/src/stores/components.js @@ -12,7 +12,7 @@ const budibasePrefix = "@budibase/standard-components/" const createComponentStore = () => { const store = writable({ customComponentManifest: {}, - componentsAwaitingConstructors: {}, + customComponentMap: {}, mountedComponents: {}, }) @@ -54,30 +54,37 @@ const createComponentStore = () => { const registerInstance = (id, instance) => { store.update(state => { - // If this is a custom component and does not have an implementation yet, - // store so we can reload this component later + // If this is a custom component, flag it so we can reload this component + // later if required const component = instance.component - let cac = state.componentsAwaitingConstructors - if (!getComponentConstructor(component)) { - if (!cac[component]) { - cac[component] = [] + if (component?.startsWith("plugin")) { + if (!state.customComponentMap[component]) { + state.customComponentMap[component] = [id] + } else { + state.customComponentMap[component].push(id) } - cac[component].push(id) } - return { - ...state, - componentsAwaitingConstructors: cac, - mountedComponents: { - ...state.mountedComponents, - [id]: instance, - }, - } + // Register to mounted components + state.mountedComponents[id] = instance + return state }) } const unregisterInstance = id => { store.update(state => { + // Remove from custom component map if required + const component = state.mountedComponents[id]?.instance?.component + let customComponentMap = state.customComponentMap + if (component?.startsWith("plugin")) { + customComponentMap[component] = customComponentMap[component].filter( + x => { + return x !== id + } + ) + } + + // Remove from mounted components delete state.mountedComponents[id] return state }) @@ -133,34 +140,25 @@ const createComponentStore = () => { return customComponentManifest?.[type]?.Component } - const registerCustomComponent = ({ Component, schema }) => { + const registerCustomComponent = ({ Component, schema, version }) => { if (!Component || !schema?.schema?.name) { return } - const componentName = `plugin/${schema.schema.name}/1.0.0` + const component = `plugin/${schema.schema.name}/${version}` store.update(state => { - if (!state.customComponentManifest) { - state.customComponentManifest = {} - } - state.customComponentManifest[componentName] = { - schema, + state.customComponentManifest[component] = { Component, + schema, + version, } return state }) - // Reload any mounted components which depend on this definition + // Reload any mounted instances of this custom component const state = get(store) - if (state.componentsAwaitingConstructors[componentName]?.length) { - state.componentsAwaitingConstructors[componentName].forEach(id => { - const instance = state.mountedComponents[id] - if (instance) { - instance.reload() - } - }) - store.update(state => { - delete state.componentsAwaitingConstructors[componentName] - return state + if (state.customComponentMap[component]?.length) { + state.customComponentMap[component].forEach(id => { + state.mountedComponents[id]?.reload() }) } } From 5ae40d8e1560bc933a09fa8a2ff0a28bb5a80f99 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 12 Aug 2022 14:34:02 +0100 Subject: [PATCH 031/280] Use friendly name in new component panel if available --- .../[componentId]/new/_components/NewComponentPanel.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte index a5d77c32ca..b0cd544977 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte @@ -58,7 +58,10 @@ enrichedStructure.push({ name: "Custom components", isCategory: true, - children: customComponents.map(x => definitions[x]), + children: customComponents.map(x => ({ + ...definitions[x], + name: definitions[x].friendlyName || definitions[x].name, + })), }) } From 10440803fe703866dde3e9b5e2f1b6b05b60b299 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 12 Aug 2022 14:34:16 +0100 Subject: [PATCH 032/280] Show success after uploading plugin --- .../src/pages/builder/portal/settings/organisation.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/builder/src/pages/builder/portal/settings/organisation.svelte b/packages/builder/src/pages/builder/portal/settings/organisation.svelte index d34442f886..d52bd66d47 100644 --- a/packages/builder/src/pages/builder/portal/settings/organisation.svelte +++ b/packages/builder/src/pages/builder/portal/settings/organisation.svelte @@ -39,6 +39,7 @@ let data = new FormData() data.append("file", $values.logo) await API.uploadPlugin(data) + notifications.success("Plugin uploaded successfully") } catch (error) { notifications.error("Error uploading logo") } From ceb3eb78e58b25b7e274dc243d1e7b4477c4bbf9 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 12 Aug 2022 14:34:44 +0100 Subject: [PATCH 033/280] Remove uncecessary calls to loadBudibase when registering a plugin at runtime --- packages/client/src/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/client/src/index.js b/packages/client/src/index.js index bef3ab9c12..a795d8d2d9 100644 --- a/packages/client/src/index.js +++ b/packages/client/src/index.js @@ -40,17 +40,17 @@ const loadBudibase = () => { devToolsStore.actions.setEnabled(enableDevTools) // Register any custom components - window.registerCustomComponent = plugin => { - componentStore.actions.registerCustomComponent(plugin) - console.log("registered!") - loadBudibase() - } if (window["##BUDIBASE_CUSTOM_COMPONENTS##"]) { window["##BUDIBASE_CUSTOM_COMPONENTS##"].forEach(component => { componentStore.actions.registerCustomComponent(component) }) } + // Make a callback available for custom component bundles to register + // themselves at runtime + window.registerCustomComponent = + componentStore.actions.registerCustomComponent + // Create app if one hasn't been created yet if (!app) { app = new ClientApp({ From 8eb64002528e0468b252db05c6c0054e0b949bef Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 12 Aug 2022 14:41:37 +0100 Subject: [PATCH 034/280] Overwrite existing plugins of the same name and version --- packages/server/src/api/controllers/plugin.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index f76d2871b0..4afa59cd3a 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -32,19 +32,18 @@ export async function upload(ctx: any) { } const jsFileName = jsFile.name const pluginId = generatePluginID(name, version) - let existing + + // overwrite existing docs entirely if they exist + let rev try { - existing = await db.get(pluginId) + const existing = await db.get(pluginId) + rev = existing._rev } catch (err) { - existing = null - } - if (existing) { - throw new Error( - `Plugin already exists: name: ${name}, version: ${version}` - ) + rev = null } const doc = { _id: pluginId, + _rev: rev, name, version, description, From 6c7a7648d9072fa67497680cffdaad6993bf3668 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 12 Aug 2022 16:19:29 +0100 Subject: [PATCH 035/280] Fix rev when uploading a new plugin --- packages/server/src/api/controllers/plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index 4afa59cd3a..6b9a2f8803 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -39,7 +39,7 @@ export async function upload(ctx: any) { const existing = await db.get(pluginId) rev = existing._rev } catch (err) { - rev = null + rev = undefined } const doc = { _id: pluginId, From 970e7ee3e79bb3a1322fad0f530680c24d1b9764 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 12 Aug 2022 17:03:06 +0100 Subject: [PATCH 036/280] Making integrations more like what custom integrations look like (to simplify integration). --- .../server/src/api/controllers/integration.js | 8 +- packages/server/src/api/controllers/plugin.ts | 24 +- packages/server/src/integrations/airtable.ts | 250 +++--- packages/server/src/integrations/arangodb.ts | 182 ++-- packages/server/src/integrations/couchdb.ts | 180 ++-- packages/server/src/integrations/dynamodb.ts | 424 +++++----- .../server/src/integrations/elasticsearch.ts | 266 +++--- packages/server/src/integrations/firebase.ts | 328 ++++---- .../server/src/integrations/googlesheets.ts | 735 ++++++++--------- packages/server/src/integrations/index.ts | 45 +- .../src/integrations/microsoftSqlServer.ts | 548 ++++++------ packages/server/src/integrations/mongodb.ts | 574 +++++++------ packages/server/src/integrations/mysql.ts | 487 ++++++----- packages/server/src/integrations/oracle.ts | 779 +++++++++--------- packages/server/src/integrations/postgres.ts | 574 +++++++------ packages/server/src/integrations/redis.ts | 258 +++--- packages/server/src/integrations/rest.ts | 657 ++++++++------- packages/server/src/integrations/s3.ts | 139 ++-- packages/server/src/integrations/snowflake.ts | 170 ++-- packages/types/src/documents/index.ts | 1 + packages/types/src/documents/plugin/index.ts | 4 + 21 files changed, 3297 insertions(+), 3336 deletions(-) create mode 100644 packages/types/src/documents/plugin/index.ts diff --git a/packages/server/src/api/controllers/integration.js b/packages/server/src/api/controllers/integration.js index cc9efac93a..ae9be7e6fe 100644 --- a/packages/server/src/api/controllers/integration.js +++ b/packages/server/src/api/controllers/integration.js @@ -1,12 +1,11 @@ -const { cloneDeep } = require("lodash") -const { definitions } = require("../../integrations") +const { getDefinitions } = require("../../integrations") const { SourceName } = require("@budibase/types") const googlesheets = require("../../integrations/googlesheets") const { featureFlags } = require("@budibase/backend-core") exports.fetch = async function (ctx) { ctx.status = 200 - const defs = cloneDeep(definitions) + const defs = await getDefinitions() // for google sheets integration google verification if (featureFlags.isEnabled(featureFlags.FeatureFlag.GOOGLE_SHEETS)) { @@ -17,6 +16,7 @@ exports.fetch = async function (ctx) { } exports.find = async function (ctx) { + const defs = await getDefinitions() ctx.status = 200 - ctx.body = definitions[ctx.params.type] + ctx.body = defs[ctx.params.type] } diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index f76d2871b0..218d59127c 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -3,6 +3,22 @@ import { extractPluginTarball } from "../../utilities/fileSystem" import { getGlobalDB } from "@budibase/backend-core/tenancy" import { generatePluginID, getPluginParams } from "../../db/utils" import { uploadDirectory } from "@budibase/backend-core/objectStore" +import { PluginType } from "@budibase/types" + +export async function getPlugins(type?: PluginType) { + const db = getGlobalDB() + const response = await db.allDocs( + getPluginParams(null, { + include_docs: true, + }) + ) + const plugins = response.rows.map((row: any) => row.doc) + if (type) { + return plugins.filter((plugin: any) => plugin.schema?.type === type) + } else { + return plugins + } +} export async function upload(ctx: any) { const plugins = @@ -68,13 +84,7 @@ export async function upload(ctx: any) { } export async function fetch(ctx: any) { - const db = getGlobalDB() - const response = await db.allDocs( - getPluginParams(null, { - include_docs: true, - }) - ) - ctx.body = response.rows.map((row: any) => row.doc) + ctx.body = await getPlugins() } export async function destroy(ctx: any) {} diff --git a/packages/server/src/integrations/airtable.ts b/packages/server/src/integrations/airtable.ts index e4c941b21c..1f56f0619b 100644 --- a/packages/server/src/integrations/airtable.ts +++ b/packages/server/src/integrations/airtable.ts @@ -5,146 +5,144 @@ import { IntegrationBase, } from "@budibase/types" -module AirtableModule { - const Airtable = require("airtable") +const Airtable = require("airtable") - interface AirtableConfig { - apiKey: string - base: string - } +interface AirtableConfig { + apiKey: string + base: string +} - const SCHEMA: Integration = { - docs: "https://airtable.com/api", - description: - "Airtable is a spreadsheet-database hybrid, with the features of a database but applied to a spreadsheet.", - friendlyName: "Airtable", - type: "Spreadsheet", - datasource: { - apiKey: { - type: DatasourceFieldType.PASSWORD, - default: "enter api key", - required: true, - }, - base: { - type: DatasourceFieldType.STRING, - default: "mybase", - required: true, +const SCHEMA: Integration = { + docs: "https://airtable.com/api", + description: + "Airtable is a spreadsheet-database hybrid, with the features of a database but applied to a spreadsheet.", + friendlyName: "Airtable", + type: "Spreadsheet", + datasource: { + apiKey: { + type: DatasourceFieldType.PASSWORD, + default: "enter api key", + required: true, + }, + base: { + type: DatasourceFieldType.STRING, + default: "mybase", + required: true, + }, + }, + query: { + create: { + type: QueryType.FIELDS, + customisable: true, + fields: { + table: { + type: DatasourceFieldType.STRING, + required: true, + }, }, }, - query: { - create: { - type: QueryType.FIELDS, - customisable: true, - fields: { - table: { - type: DatasourceFieldType.STRING, - required: true, - }, + read: { + type: QueryType.FIELDS, + fields: { + table: { + type: DatasourceFieldType.STRING, + required: true, }, - }, - read: { - type: QueryType.FIELDS, - fields: { - table: { - type: DatasourceFieldType.STRING, - required: true, - }, - view: { - type: DatasourceFieldType.STRING, - required: true, - }, - numRecords: { - type: DatasourceFieldType.NUMBER, - default: 10, - }, + view: { + type: DatasourceFieldType.STRING, + required: true, }, - }, - update: { - type: QueryType.FIELDS, - customisable: true, - fields: { - id: { - display: "Record ID", - type: DatasourceFieldType.STRING, - required: true, - }, - table: { - type: DatasourceFieldType.STRING, - required: true, - }, + numRecords: { + type: DatasourceFieldType.NUMBER, + default: 10, }, }, - delete: { - type: QueryType.JSON, - }, }, + update: { + type: QueryType.FIELDS, + customisable: true, + fields: { + id: { + display: "Record ID", + type: DatasourceFieldType.STRING, + required: true, + }, + table: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + delete: { + type: QueryType.JSON, + }, + }, +} + +class AirtableIntegration implements IntegrationBase { + private config: AirtableConfig + private client: any + + constructor(config: AirtableConfig) { + this.config = config + this.client = new Airtable(config).base(config.base) } - class AirtableIntegration implements IntegrationBase { - private config: AirtableConfig - private client: any + async create(query: { table: any; json: any }) { + const { table, json } = query - constructor(config: AirtableConfig) { - this.config = config - this.client = new Airtable(config).base(config.base) - } - - async create(query: { table: any; json: any }) { - const { table, json } = query - - try { - return await this.client(table).create([ - { - fields: json, - }, - ]) - } catch (err) { - console.error("Error writing to airtable", err) - throw err - } - } - - async read(query: { table: any; numRecords: any; view: any }) { - try { - const records = await this.client(query.table) - .select({ maxRecords: query.numRecords || 10, view: query.view }) - .firstPage() - // @ts-ignore - return records.map(({ fields }) => fields) - } catch (err) { - console.error("Error writing to airtable", err) - return [] - } - } - - async update(query: { table: any; id: any; json: any }) { - const { table, id, json } = query - - try { - return await this.client(table).update([ - { - id, - fields: json, - }, - ]) - } catch (err) { - console.error("Error writing to airtable", err) - throw err - } - } - - async delete(query: { table: any; ids: any }) { - try { - return await this.client(query.table).destroy(query.ids) - } catch (err) { - console.error("Error writing to airtable", err) - throw err - } + try { + return await this.client(table).create([ + { + fields: json, + }, + ]) + } catch (err) { + console.error("Error writing to airtable", err) + throw err } } - module.exports = { - schema: SCHEMA, - integration: AirtableIntegration, + async read(query: { table: any; numRecords: any; view: any }) { + try { + const records = await this.client(query.table) + .select({ maxRecords: query.numRecords || 10, view: query.view }) + .firstPage() + // @ts-ignore + return records.map(({ fields }) => fields) + } catch (err) { + console.error("Error writing to airtable", err) + return [] + } + } + + async update(query: { table: any; id: any; json: any }) { + const { table, id, json } = query + + try { + return await this.client(table).update([ + { + id, + fields: json, + }, + ]) + } catch (err) { + console.error("Error writing to airtable", err) + throw err + } + } + + async delete(query: { table: any; ids: any }) { + try { + return await this.client(query.table).destroy(query.ids) + } catch (err) { + console.error("Error writing to airtable", err) + throw err + } } } + +export default { + schema: SCHEMA, + integration: AirtableIntegration, +} diff --git a/packages/server/src/integrations/arangodb.ts b/packages/server/src/integrations/arangodb.ts index 968197474a..6df96501a4 100644 --- a/packages/server/src/integrations/arangodb.ts +++ b/packages/server/src/integrations/arangodb.ts @@ -5,106 +5,104 @@ import { IntegrationBase, } from "@budibase/types" -module ArangoModule { - const { Database, aql } = require("arangojs") +const { Database, aql } = require("arangojs") - interface ArangodbConfig { - url: string - username: string - password: string - databaseName: string - collection: string - } +interface ArangodbConfig { + url: string + username: string + password: string + databaseName: string + collection: string +} - const SCHEMA: Integration = { - docs: "https://github.com/arangodb/arangojs", - friendlyName: "ArangoDB", - type: "Non-relational", - description: - "ArangoDB is a scalable open-source multi-model database natively supporting graph, document and search. All supported data models & access patterns can be combined in queries allowing for maximal flexibility. ", - datasource: { - url: { - type: DatasourceFieldType.STRING, - default: "http://localhost:8529", - required: true, - }, - username: { - type: DatasourceFieldType.STRING, - default: "root", - required: true, - }, - password: { - type: DatasourceFieldType.PASSWORD, - required: true, - }, - databaseName: { - type: DatasourceFieldType.STRING, - default: "_system", - required: true, - }, - collection: { - type: DatasourceFieldType.STRING, - required: true, - }, +const SCHEMA: Integration = { + docs: "https://github.com/arangodb/arangojs", + friendlyName: "ArangoDB", + type: "Non-relational", + description: + "ArangoDB is a scalable open-source multi-model database natively supporting graph, document and search. All supported data models & access patterns can be combined in queries allowing for maximal flexibility. ", + datasource: { + url: { + type: DatasourceFieldType.STRING, + default: "http://localhost:8529", + required: true, }, - query: { - read: { - type: QueryType.SQL, - }, - create: { - type: QueryType.JSON, - }, + username: { + type: DatasourceFieldType.STRING, + default: "root", + required: true, }, + password: { + type: DatasourceFieldType.PASSWORD, + required: true, + }, + databaseName: { + type: DatasourceFieldType.STRING, + default: "_system", + required: true, + }, + collection: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + query: { + read: { + type: QueryType.SQL, + }, + create: { + type: QueryType.JSON, + }, + }, +} + +class ArangoDBIntegration implements IntegrationBase { + private config: ArangodbConfig + private client: any + + constructor(config: ArangodbConfig) { + const newConfig = { + auth: { + username: config.username, + password: config.password, + }, + } + + this.config = config + this.client = new Database(newConfig) } - class ArangoDBIntegration implements IntegrationBase { - private config: ArangodbConfig - private client: any - - constructor(config: ArangodbConfig) { - const newConfig = { - auth: { - username: config.username, - password: config.password, - }, - } - - this.config = config - this.client = new Database(newConfig) - } - - async read(query: { sql: any }) { - try { - const result = await this.client.query(query.sql) - return result.all() - } catch (err) { - // @ts-ignore - console.error("Error querying arangodb", err.message) - throw err - } finally { - this.client.close() - } - } - - async create(query: { json: any }) { - const clc = this.client.collection(this.config.collection) - try { - const result = await this.client.query( - aql`INSERT ${query.json} INTO ${clc} RETURN NEW` - ) - return result.all() - } catch (err) { - // @ts-ignore - console.error("Error querying arangodb", err.message) - throw err - } finally { - this.client.close() - } + async read(query: { sql: any }) { + try { + const result = await this.client.query(query.sql) + return result.all() + } catch (err) { + // @ts-ignore + console.error("Error querying arangodb", err.message) + throw err + } finally { + this.client.close() } } - module.exports = { - schema: SCHEMA, - integration: ArangoDBIntegration, + async create(query: { json: any }) { + const clc = this.client.collection(this.config.collection) + try { + const result = await this.client.query( + aql`INSERT ${query.json} INTO ${clc} RETURN NEW` + ) + return result.all() + } catch (err) { + // @ts-ignore + console.error("Error querying arangodb", err.message) + throw err + } finally { + this.client.close() + } } } + +export default { + schema: SCHEMA, + integration: ArangoDBIntegration, +} diff --git a/packages/server/src/integrations/couchdb.ts b/packages/server/src/integrations/couchdb.ts index c23593dbd4..67be21c9d1 100644 --- a/packages/server/src/integrations/couchdb.ts +++ b/packages/server/src/integrations/couchdb.ts @@ -5,109 +5,103 @@ import { IntegrationBase, } from "@budibase/types" -module CouchDBModule { - const PouchDB = require("pouchdb") +const PouchDB = require("pouchdb") - interface CouchDBConfig { - url: string - database: string - } +interface CouchDBConfig { + url: string + database: string +} - const SCHEMA: Integration = { - docs: "https://docs.couchdb.org/en/stable/", - friendlyName: "CouchDB", - type: "Non-relational", - description: - "Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang.", - datasource: { - url: { - type: DatasourceFieldType.STRING, - required: true, - default: "http://localhost:5984", - }, - database: { - type: DatasourceFieldType.STRING, - required: true, - }, +const SCHEMA: Integration = { + docs: "https://docs.couchdb.org/en/stable/", + friendlyName: "CouchDB", + type: "Non-relational", + description: + "Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang.", + datasource: { + url: { + type: DatasourceFieldType.STRING, + required: true, + default: "http://localhost:5984", }, - query: { - create: { - type: QueryType.JSON, - }, - read: { - type: QueryType.JSON, - }, - update: { - type: QueryType.JSON, - }, - delete: { - type: QueryType.FIELDS, - fields: { - id: { - type: DatasourceFieldType.STRING, - required: true, - }, + database: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + query: { + create: { + type: QueryType.JSON, + }, + read: { + type: QueryType.JSON, + }, + update: { + type: QueryType.JSON, + }, + delete: { + type: QueryType.FIELDS, + fields: { + id: { + type: DatasourceFieldType.STRING, + required: true, }, }, }, + }, +} + +class CouchDBIntegration implements IntegrationBase { + private config: CouchDBConfig + private readonly client: any + + constructor(config: CouchDBConfig) { + this.config = config + this.client = new PouchDB(`${config.url}/${config.database}`) } - class CouchDBIntegration implements IntegrationBase { - private config: CouchDBConfig - private readonly client: any - - constructor(config: CouchDBConfig) { - this.config = config - this.client = new PouchDB(`${config.url}/${config.database}`) - } - - async query( - command: string, - errorMsg: string, - query: { json?: object; id?: string } - ) { - try { - const response = await this.client[command](query.id || query.json) - await this.client.close() - return response - } catch (err) { - console.error(errorMsg, err) - throw err - } - } - - async create(query: { json: object }) { - return this.query("post", "Error writing to couchDB", query) - } - - async read(query: { json: object }) { - const result = await this.query("allDocs", "Error querying couchDB", { - json: { - include_docs: true, - ...query.json, - }, - }) - return result.rows.map((row: { doc: object }) => row.doc) - } - - async update(query: { json: object }) { - return this.query("put", "Error updating couchDB document", query) - } - - async delete(query: { id: string }) { - const doc = await this.query( - "get", - "Cannot find doc to be deleted", - query - ) - return this.query("remove", "Error deleting couchDB document", { - json: doc, - }) + async query( + command: string, + errorMsg: string, + query: { json?: object; id?: string } + ) { + try { + const response = await this.client[command](query.id || query.json) + await this.client.close() + return response + } catch (err) { + console.error(errorMsg, err) + throw err } } - module.exports = { - schema: SCHEMA, - integration: CouchDBIntegration, + async create(query: { json: object }) { + return this.query("post", "Error writing to couchDB", query) + } + + async read(query: { json: object }) { + const result = await this.query("allDocs", "Error querying couchDB", { + json: { + include_docs: true, + ...query.json, + }, + }) + return result.rows.map((row: { doc: object }) => row.doc) + } + + async update(query: { json: object }) { + return this.query("put", "Error updating couchDB document", query) + } + + async delete(query: { id: string }) { + const doc = await this.query("get", "Cannot find doc to be deleted", query) + return this.query("remove", "Error deleting couchDB document", { + json: doc, + }) } } + +export default { + schema: SCHEMA, + integration: CouchDBIntegration, +} diff --git a/packages/server/src/integrations/dynamodb.ts b/packages/server/src/integrations/dynamodb.ts index 5321da4791..8dea6c6213 100644 --- a/packages/server/src/integrations/dynamodb.ts +++ b/packages/server/src/integrations/dynamodb.ts @@ -5,228 +5,226 @@ import { IntegrationBase, } from "@budibase/types" -module DynamoModule { - const AWS = require("aws-sdk") - const { AWS_REGION } = require("../db/dynamoClient") +const AWS = require("aws-sdk") +const { AWS_REGION } = require("../db/dynamoClient") - interface DynamoDBConfig { - region: string - accessKeyId: string - secretAccessKey: string - endpoint: string - } +interface DynamoDBConfig { + region: string + accessKeyId: string + secretAccessKey: string + endpoint: string +} - const SCHEMA: Integration = { - docs: "https://github.com/dabit3/dynamodb-documentclient-cheat-sheet", - description: - "Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale.", - friendlyName: "DynamoDB", - type: "Non-relational", - datasource: { - region: { - type: DatasourceFieldType.STRING, - required: true, - default: "us-east-1", - }, - accessKeyId: { - type: DatasourceFieldType.PASSWORD, - required: true, - }, - secretAccessKey: { - type: DatasourceFieldType.PASSWORD, - required: true, - }, - endpoint: { - type: DatasourceFieldType.STRING, - required: false, - default: "https://dynamodb.us-east-1.amazonaws.com", - }, +const SCHEMA: Integration = { + docs: "https://github.com/dabit3/dynamodb-documentclient-cheat-sheet", + description: + "Amazon DynamoDB is a key-value and document database that delivers single-digit millisecond performance at any scale.", + friendlyName: "DynamoDB", + type: "Non-relational", + datasource: { + region: { + type: DatasourceFieldType.STRING, + required: true, + default: "us-east-1", }, - query: { - create: { - type: QueryType.FIELDS, - customisable: true, - fields: { - table: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - }, - read: { - type: QueryType.FIELDS, - customisable: true, - readable: true, - fields: { - table: { - type: DatasourceFieldType.STRING, - required: true, - }, - index: { - type: DatasourceFieldType.STRING, - }, - }, - }, - scan: { - type: QueryType.FIELDS, - customisable: true, - readable: true, - fields: { - table: { - type: DatasourceFieldType.STRING, - required: true, - }, - index: { - type: DatasourceFieldType.STRING, - }, - }, - }, - describe: { - type: QueryType.FIELDS, - customisable: true, - readable: true, - fields: { - table: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - }, - get: { - type: QueryType.FIELDS, - customisable: true, - readable: true, - fields: { - table: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - }, - update: { - type: QueryType.FIELDS, - customisable: true, - fields: { - table: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - }, - delete: { - type: QueryType.FIELDS, - customisable: true, - fields: { - table: { - type: DatasourceFieldType.STRING, - required: true, - }, + accessKeyId: { + type: DatasourceFieldType.PASSWORD, + required: true, + }, + secretAccessKey: { + type: DatasourceFieldType.PASSWORD, + required: true, + }, + endpoint: { + type: DatasourceFieldType.STRING, + required: false, + default: "https://dynamodb.us-east-1.amazonaws.com", + }, + }, + query: { + create: { + type: QueryType.FIELDS, + customisable: true, + fields: { + table: { + type: DatasourceFieldType.STRING, + required: true, }, }, }, + read: { + type: QueryType.FIELDS, + customisable: true, + readable: true, + fields: { + table: { + type: DatasourceFieldType.STRING, + required: true, + }, + index: { + type: DatasourceFieldType.STRING, + }, + }, + }, + scan: { + type: QueryType.FIELDS, + customisable: true, + readable: true, + fields: { + table: { + type: DatasourceFieldType.STRING, + required: true, + }, + index: { + type: DatasourceFieldType.STRING, + }, + }, + }, + describe: { + type: QueryType.FIELDS, + customisable: true, + readable: true, + fields: { + table: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + get: { + type: QueryType.FIELDS, + customisable: true, + readable: true, + fields: { + table: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + update: { + type: QueryType.FIELDS, + customisable: true, + fields: { + table: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + delete: { + type: QueryType.FIELDS, + customisable: true, + fields: { + table: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + }, +} + +class DynamoDBIntegration implements IntegrationBase { + private config: DynamoDBConfig + private client: any + + constructor(config: DynamoDBConfig) { + this.config = config + if (this.config.endpoint && !this.config.endpoint.includes("localhost")) { + this.connect() + } + let options = { + correctClockSkew: true, + region: this.config.region || AWS_REGION, + endpoint: config.endpoint ? config.endpoint : undefined, + } + this.client = new AWS.DynamoDB.DocumentClient(options) } - class DynamoDBIntegration implements IntegrationBase { - private config: DynamoDBConfig - private client: any - - constructor(config: DynamoDBConfig) { - this.config = config - if (this.config.endpoint && !this.config.endpoint.includes("localhost")) { - this.connect() - } - let options = { - correctClockSkew: true, - region: this.config.region || AWS_REGION, - endpoint: config.endpoint ? config.endpoint : undefined, - } - this.client = new AWS.DynamoDB.DocumentClient(options) - } - - end() { - this.disconnect() - } - - connect() { - AWS.config.update(this.config) - } - - disconnect() { - AWS.config.update({ - secretAccessKey: undefined, - accessKeyId: undefined, - region: AWS_REGION, - }) - } - - async create(query: { table: string; json: object }) { - const params = { - TableName: query.table, - ...query.json, - } - return this.client.put(params).promise() - } - - async read(query: { table: string; json: object; index: null | string }) { - const params = { - TableName: query.table, - IndexName: query.index ? query.index : undefined, - ...query.json, - } - const response = await this.client.query(params).promise() - if (response.Items) { - return response.Items - } - return response - } - - async scan(query: { table: string; json: object; index: null | string }) { - const params = { - TableName: query.table, - IndexName: query.index ? query.index : undefined, - ...query.json, - } - const response = await this.client.scan(params).promise() - if (response.Items) { - return response.Items - } - return response - } - - async describe(query: { table: string }) { - const params = { - TableName: query.table, - } - return new AWS.DynamoDB().describeTable(params).promise() - } - - async get(query: { table: string; json: object }) { - const params = { - TableName: query.table, - ...query.json, - } - return this.client.get(params).promise() - } - - async update(query: { table: string; json: object }) { - const params = { - TableName: query.table, - ...query.json, - } - return this.client.update(params).promise() - } - - async delete(query: { table: string; json: object }) { - const params = { - TableName: query.table, - ...query.json, - } - return this.client.delete(params).promise() - } + end() { + this.disconnect() } - module.exports = { - schema: SCHEMA, - integration: DynamoDBIntegration, + connect() { + AWS.config.update(this.config) + } + + disconnect() { + AWS.config.update({ + secretAccessKey: undefined, + accessKeyId: undefined, + region: AWS_REGION, + }) + } + + async create(query: { table: string; json: object }) { + const params = { + TableName: query.table, + ...query.json, + } + return this.client.put(params).promise() + } + + async read(query: { table: string; json: object; index: null | string }) { + const params = { + TableName: query.table, + IndexName: query.index ? query.index : undefined, + ...query.json, + } + const response = await this.client.query(params).promise() + if (response.Items) { + return response.Items + } + return response + } + + async scan(query: { table: string; json: object; index: null | string }) { + const params = { + TableName: query.table, + IndexName: query.index ? query.index : undefined, + ...query.json, + } + const response = await this.client.scan(params).promise() + if (response.Items) { + return response.Items + } + return response + } + + async describe(query: { table: string }) { + const params = { + TableName: query.table, + } + return new AWS.DynamoDB().describeTable(params).promise() + } + + async get(query: { table: string; json: object }) { + const params = { + TableName: query.table, + ...query.json, + } + return this.client.get(params).promise() + } + + async update(query: { table: string; json: object }) { + const params = { + TableName: query.table, + ...query.json, + } + return this.client.update(params).promise() + } + + async delete(query: { table: string; json: object }) { + const params = { + TableName: query.table, + ...query.json, + } + return this.client.delete(params).promise() } } + +export default { + schema: SCHEMA, + integration: DynamoDBIntegration, +} diff --git a/packages/server/src/integrations/elasticsearch.ts b/packages/server/src/integrations/elasticsearch.ts index 5c61545ecd..14887a743d 100644 --- a/packages/server/src/integrations/elasticsearch.ts +++ b/packages/server/src/integrations/elasticsearch.ts @@ -5,151 +5,149 @@ import { IntegrationBase, } from "@budibase/types" -module ElasticsearchModule { - const { Client } = require("@elastic/elasticsearch") +const { Client } = require("@elastic/elasticsearch") - interface ElasticsearchConfig { - url: string - } +interface ElasticsearchConfig { + url: string +} - const SCHEMA: Integration = { - docs: "https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html", - description: - "Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.", - friendlyName: "ElasticSearch", - type: "Non-relational", - datasource: { - url: { - type: DatasourceFieldType.STRING, - required: true, - default: "http://localhost:9200", - }, +const SCHEMA: Integration = { + docs: "https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html", + description: + "Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.", + friendlyName: "ElasticSearch", + type: "Non-relational", + datasource: { + url: { + type: DatasourceFieldType.STRING, + required: true, + default: "http://localhost:9200", }, - query: { - create: { - type: QueryType.FIELDS, - customisable: true, - fields: { - index: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - }, - read: { - type: QueryType.FIELDS, - customisable: true, - fields: { - index: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - }, - update: { - type: QueryType.FIELDS, - customisable: true, - fields: { - id: { - type: DatasourceFieldType.STRING, - required: true, - }, - index: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - }, - delete: { - type: QueryType.FIELDS, - fields: { - index: { - type: DatasourceFieldType.STRING, - required: true, - }, - id: { - type: DatasourceFieldType.STRING, - required: true, - }, + }, + query: { + create: { + type: QueryType.FIELDS, + customisable: true, + fields: { + index: { + type: DatasourceFieldType.STRING, + required: true, }, }, }, + read: { + type: QueryType.FIELDS, + customisable: true, + fields: { + index: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + update: { + type: QueryType.FIELDS, + customisable: true, + fields: { + id: { + type: DatasourceFieldType.STRING, + required: true, + }, + index: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + delete: { + type: QueryType.FIELDS, + fields: { + index: { + type: DatasourceFieldType.STRING, + required: true, + }, + id: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + }, +} + +class ElasticSearchIntegration implements IntegrationBase { + private config: ElasticsearchConfig + private client: any + + constructor(config: ElasticsearchConfig) { + this.config = config + this.client = new Client({ node: config.url }) } - class ElasticSearchIntegration implements IntegrationBase { - private config: ElasticsearchConfig - private client: any + async create(query: { index: string; json: object }) { + const { index, json } = query - constructor(config: ElasticsearchConfig) { - this.config = config - this.client = new Client({ node: config.url }) - } - - async create(query: { index: string; json: object }) { - const { index, json } = query - - try { - const result = await this.client.index({ - index, - body: json, - }) - return result.body - } catch (err) { - console.error("Error writing to elasticsearch", err) - throw err - } finally { - await this.client.close() - } - } - - async read(query: { index: string; json: object }) { - const { index, json } = query - try { - const result = await this.client.search({ - index: index, - body: json, - }) - return result.body.hits.hits.map(({ _source }: any) => _source) - } catch (err) { - console.error("Error querying elasticsearch", err) - throw err - } finally { - await this.client.close() - } - } - - async update(query: { id: string; index: string; json: object }) { - const { id, index, json } = query - try { - const result = await this.client.update({ - id, - index, - body: json, - }) - return result.body - } catch (err) { - console.error("Error querying elasticsearch", err) - throw err - } finally { - await this.client.close() - } - } - - async delete(query: object) { - try { - const result = await this.client.delete(query) - return result.body - } catch (err) { - console.error("Error deleting from elasticsearch", err) - throw err - } finally { - await this.client.close() - } + try { + const result = await this.client.index({ + index, + body: json, + }) + return result.body + } catch (err) { + console.error("Error writing to elasticsearch", err) + throw err + } finally { + await this.client.close() } } - module.exports = { - schema: SCHEMA, - integration: ElasticSearchIntegration, + async read(query: { index: string; json: object }) { + const { index, json } = query + try { + const result = await this.client.search({ + index: index, + body: json, + }) + return result.body.hits.hits.map(({ _source }: any) => _source) + } catch (err) { + console.error("Error querying elasticsearch", err) + throw err + } finally { + await this.client.close() + } + } + + async update(query: { id: string; index: string; json: object }) { + const { id, index, json } = query + try { + const result = await this.client.update({ + id, + index, + body: json, + }) + return result.body + } catch (err) { + console.error("Error querying elasticsearch", err) + throw err + } finally { + await this.client.close() + } + } + + async delete(query: object) { + try { + const result = await this.client.delete(query) + return result.body + } catch (err) { + console.error("Error deleting from elasticsearch", err) + throw err + } finally { + await this.client.close() + } } } + +export default { + schema: SCHEMA, + integration: ElasticSearchIntegration, +} diff --git a/packages/server/src/integrations/firebase.ts b/packages/server/src/integrations/firebase.ts index 1f82e9dafe..a82b3be782 100644 --- a/packages/server/src/integrations/firebase.ts +++ b/packages/server/src/integrations/firebase.ts @@ -6,184 +6,182 @@ import { } from "@budibase/types" import { Firestore, WhereFilterOp } from "@google-cloud/firestore" -module Firebase { - interface FirebaseConfig { - email: string - privateKey: string - projectId: string +interface FirebaseConfig { + email: string + privateKey: string + projectId: string +} + +const SCHEMA: Integration = { + docs: "https://firebase.google.com/docs/firestore/quickstart", + friendlyName: "Firestore", + type: "Non-relational", + description: + "Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud.", + datasource: { + email: { + type: DatasourceFieldType.STRING, + required: true, + }, + privateKey: { + type: DatasourceFieldType.STRING, + required: true, + }, + projectId: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + query: { + create: { + type: QueryType.JSON, + }, + read: { + type: QueryType.JSON, + }, + update: { + type: QueryType.JSON, + }, + delete: { + type: QueryType.JSON, + }, + }, + extra: { + collection: { + displayName: "Collection", + type: DatasourceFieldType.STRING, + required: true, + }, + filterField: { + displayName: "Filter field", + type: DatasourceFieldType.STRING, + required: false, + }, + filter: { + displayName: "Filter comparison", + type: DatasourceFieldType.LIST, + required: false, + data: { + read: [ + "==", + "<", + "<=", + "!=", + ">=", + ">", + "array-contains", + "in", + "not-in", + "array-contains-any", + ], + }, + }, + filterValue: { + displayName: "Filter value", + type: DatasourceFieldType.STRING, + required: false, + }, + }, +} + +class FirebaseIntegration implements IntegrationBase { + private config: FirebaseConfig + private client: Firestore + + constructor(config: FirebaseConfig) { + this.config = config + this.client = new Firestore({ + projectId: config.projectId, + credentials: { + client_email: config.email, + private_key: config.privateKey?.replace(/\\n/g, "\n"), + }, + }) } - const SCHEMA: Integration = { - docs: "https://firebase.google.com/docs/firestore/quickstart", - friendlyName: "Firestore", - type: "Non-relational", - description: - "Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud.", - datasource: { - email: { - type: DatasourceFieldType.STRING, - required: true, - }, - privateKey: { - type: DatasourceFieldType.STRING, - required: true, - }, - projectId: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - query: { - create: { - type: QueryType.JSON, - }, - read: { - type: QueryType.JSON, - }, - update: { - type: QueryType.JSON, - }, - delete: { - type: QueryType.JSON, - }, - }, - extra: { - collection: { - displayName: "Collection", - type: DatasourceFieldType.STRING, - required: true, - }, - filterField: { - displayName: "Filter field", - type: DatasourceFieldType.STRING, - required: false, - }, - filter: { - displayName: "Filter comparison", - type: DatasourceFieldType.LIST, - required: false, - data: { - read: [ - "==", - "<", - "<=", - "!=", - ">=", - ">", - "array-contains", - "in", - "not-in", - "array-contains-any", - ], - }, - }, - filterValue: { - displayName: "Filter value", - type: DatasourceFieldType.STRING, - required: false, - }, - }, + async create(query: { json: object; extra: { [key: string]: string } }) { + try { + const documentReference = this.client + .collection(query.extra.collection) + .doc() + await documentReference.set({ ...query.json, id: documentReference.id }) + const snapshot = await documentReference.get() + return snapshot.data() + } catch (err) { + console.error("Error writing to Firestore", err) + throw err + } } - class FirebaseIntegration implements IntegrationBase { - private config: FirebaseConfig - private client: Firestore - - constructor(config: FirebaseConfig) { - this.config = config - this.client = new Firestore({ - projectId: config.projectId, - credentials: { - client_email: config.email, - private_key: config.privateKey?.replace(/\\n/g, "\n"), - }, - }) - } - - async create(query: { json: object; extra: { [key: string]: string } }) { - try { - const documentReference = this.client - .collection(query.extra.collection) - .doc() - await documentReference.set({ ...query.json, id: documentReference.id }) - const snapshot = await documentReference.get() - return snapshot.data() - } catch (err) { - console.error("Error writing to Firestore", err) - throw err + async read(query: { json: object; extra: { [key: string]: string } }) { + try { + let snapshot + const collectionRef = this.client.collection(query.extra.collection) + if ( + query.extra.filterField && + query.extra.filter && + query.extra.filterValue + ) { + snapshot = await collectionRef + .where( + query.extra.filterField, + query.extra.filter as WhereFilterOp, + query.extra.filterValue + ) + .get() + } else { + snapshot = await collectionRef.get() } + const result: any[] = [] + snapshot.forEach(doc => result.push(doc.data())) + + return result + } catch (err) { + console.error("Error querying Firestore", err) + throw err } + } - async read(query: { json: object; extra: { [key: string]: string } }) { - try { - let snapshot - const collectionRef = this.client.collection(query.extra.collection) - if ( - query.extra.filterField && - query.extra.filter && - query.extra.filterValue - ) { - snapshot = await collectionRef - .where( - query.extra.filterField, - query.extra.filter as WhereFilterOp, - query.extra.filterValue - ) - .get() - } else { - snapshot = await collectionRef.get() - } - const result: any[] = [] - snapshot.forEach(doc => result.push(doc.data())) + async update(query: { + json: Record + extra: { [key: string]: string } + }) { + try { + await this.client + .collection(query.extra.collection) + .doc(query.json.id) + .update(query.json) - return result - } catch (err) { - console.error("Error querying Firestore", err) - throw err - } - } - - async update(query: { - json: Record - extra: { [key: string]: string } - }) { - try { + return ( await this.client .collection(query.extra.collection) .doc(query.json.id) - .update(query.json) - - return ( - await this.client - .collection(query.extra.collection) - .doc(query.json.id) - .get() - ).data() - } catch (err) { - console.error("Error writing to Firestore", err) - throw err - } - } - - async delete(query: { - json: { id: string } - extra: { [key: string]: string } - }) { - try { - await this.client - .collection(query.extra.collection) - .doc(query.json.id) - .delete() - return true - } catch (err) { - console.error("Error deleting from Firestore", err) - throw err - } + .get() + ).data() + } catch (err) { + console.error("Error writing to Firestore", err) + throw err } } - module.exports = { - schema: SCHEMA, - integration: FirebaseIntegration, + async delete(query: { + json: { id: string } + extra: { [key: string]: string } + }) { + try { + await this.client + .collection(query.extra.collection) + .doc(query.json.id) + .delete() + return true + } catch (err) { + console.error("Error deleting from Firestore", err) + throw err + } } } + +export default { + schema: SCHEMA, + integration: FirebaseIntegration, +} diff --git a/packages/server/src/integrations/googlesheets.ts b/packages/server/src/integrations/googlesheets.ts index 129ab485cd..675e28e159 100644 --- a/packages/server/src/integrations/googlesheets.ts +++ b/packages/server/src/integrations/googlesheets.ts @@ -13,409 +13,400 @@ import { DataSourceOperation, FieldTypes } from "../constants" import { GoogleSpreadsheet } from "google-spreadsheet" import env from "../environment" -module GoogleSheetsModule { - const { getGlobalDB } = require("@budibase/backend-core/tenancy") - const { getScopedConfig } = require("@budibase/backend-core/db") - const { Configs } = require("@budibase/backend-core/constants") - const fetch = require("node-fetch") +const { getGlobalDB } = require("@budibase/backend-core/tenancy") +const { getScopedConfig } = require("@budibase/backend-core/db") +const { Configs } = require("@budibase/backend-core/constants") +const fetch = require("node-fetch") - interface GoogleSheetsConfig { - spreadsheetId: string - auth: OAuthClientConfig - } +interface GoogleSheetsConfig { + spreadsheetId: string + auth: OAuthClientConfig +} - interface OAuthClientConfig { - appId: string - accessToken: string - refreshToken: string - } +interface OAuthClientConfig { + appId: string + accessToken: string + refreshToken: string +} - interface AuthTokenRequest { - client_id: string - client_secret: string - refresh_token: string - } +interface AuthTokenRequest { + client_id: string + client_secret: string + refresh_token: string +} - interface AuthTokenResponse { - access_token: string - } +interface AuthTokenResponse { + access_token: string +} - const SCHEMA: Integration = { - plus: true, - auth: { - type: "google", +const SCHEMA: Integration = { + plus: true, + auth: { + type: "google", + }, + relationships: false, + docs: "https://developers.google.com/sheets/api/quickstart/nodejs", + description: + "Create and collaborate on online spreadsheets in real-time and from any device. ", + friendlyName: "Google Sheets", + type: "Spreadsheet", + datasource: { + spreadsheetId: { + display: "Google Sheet URL", + type: DatasourceFieldType.STRING, + required: true, }, - relationships: false, - docs: "https://developers.google.com/sheets/api/quickstart/nodejs", - description: - "Create and collaborate on online spreadsheets in real-time and from any device. ", - friendlyName: "Google Sheets", - type: "Spreadsheet", - datasource: { - spreadsheetId: { - display: "Google Sheet URL", - type: DatasourceFieldType.STRING, - required: true, - }, - }, - query: { - create: { - type: QueryType.FIELDS, - fields: { - sheet: { - type: DatasourceFieldType.STRING, - required: true, - }, - row: { - type: QueryType.JSON, - required: true, - }, + }, + query: { + create: { + type: QueryType.FIELDS, + fields: { + sheet: { + type: DatasourceFieldType.STRING, + required: true, }, - }, - read: { - type: QueryType.FIELDS, - fields: { - sheet: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - }, - update: { - type: QueryType.FIELDS, - fields: { - sheet: { - type: DatasourceFieldType.STRING, - required: true, - }, - rowIndex: { - type: DatasourceFieldType.STRING, - required: true, - }, - row: { - type: QueryType.JSON, - required: true, - }, - }, - }, - delete: { - type: QueryType.FIELDS, - fields: { - sheet: { - type: DatasourceFieldType.STRING, - required: true, - }, - rowIndex: { - type: DatasourceFieldType.NUMBER, - required: true, - }, + row: { + type: QueryType.JSON, + required: true, }, }, }, + read: { + type: QueryType.FIELDS, + fields: { + sheet: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + update: { + type: QueryType.FIELDS, + fields: { + sheet: { + type: DatasourceFieldType.STRING, + required: true, + }, + rowIndex: { + type: DatasourceFieldType.STRING, + required: true, + }, + row: { + type: QueryType.JSON, + required: true, + }, + }, + }, + delete: { + type: QueryType.FIELDS, + fields: { + sheet: { + type: DatasourceFieldType.STRING, + required: true, + }, + rowIndex: { + type: DatasourceFieldType.NUMBER, + required: true, + }, + }, + }, + }, +} + +class GoogleSheetsIntegration implements DatasourcePlus { + private readonly config: GoogleSheetsConfig + private client: any + public tables: Record = {} + public schemaErrors: Record = {} + + constructor(config: GoogleSheetsConfig) { + this.config = config + const spreadsheetId = this.cleanSpreadsheetUrl(this.config.spreadsheetId) + this.client = new GoogleSpreadsheet(spreadsheetId) } - class GoogleSheetsIntegration implements DatasourcePlus { - private readonly config: GoogleSheetsConfig - private client: any - public tables: Record = {} - public schemaErrors: Record = {} + getBindingIdentifier() { + return "" + } - constructor(config: GoogleSheetsConfig) { - this.config = config - const spreadsheetId = this.cleanSpreadsheetUrl(this.config.spreadsheetId) - this.client = new GoogleSpreadsheet(spreadsheetId) - } + getStringConcat(parts: string[]) { + return "" + } - getBindingIdentifier() { - return "" - } - - getStringConcat(parts: string[]) { - return "" - } - - /** - * Pull the spreadsheet ID out from a valid google sheets URL - * @param spreadsheetId - the URL or standard spreadsheetId of the google sheet - * @returns spreadsheet Id of the google sheet - */ - cleanSpreadsheetUrl(spreadsheetId: string) { - if (!spreadsheetId) { - throw new Error( - "You must set a spreadsheet ID in your configuration to fetch tables." - ) - } - const parts = spreadsheetId.split("/") - return parts.length > 5 ? parts[5] : spreadsheetId - } - - async fetchAccessToken( - payload: AuthTokenRequest - ): Promise { - const response = await fetch( - "https://www.googleapis.com/oauth2/v4/token", - { - method: "POST", - body: JSON.stringify({ - ...payload, - grant_type: "refresh_token", - }), - headers: { - "Content-Type": "application/json", - }, - } + /** + * Pull the spreadsheet ID out from a valid google sheets URL + * @param spreadsheetId - the URL or standard spreadsheetId of the google sheet + * @returns spreadsheet Id of the google sheet + */ + cleanSpreadsheetUrl(spreadsheetId: string) { + if (!spreadsheetId) { + throw new Error( + "You must set a spreadsheet ID in your configuration to fetch tables." ) + } + const parts = spreadsheetId.split("/") + return parts.length > 5 ? parts[5] : spreadsheetId + } - const json = await response.json() + async fetchAccessToken( + payload: AuthTokenRequest + ): Promise { + const response = await fetch("https://www.googleapis.com/oauth2/v4/token", { + method: "POST", + body: JSON.stringify({ + ...payload, + grant_type: "refresh_token", + }), + headers: { + "Content-Type": "application/json", + }, + }) - if (response.status !== 200) { - throw new Error( - `Error authenticating with google sheets. ${json.error_description}` + const json = await response.json() + + if (response.status !== 200) { + throw new Error( + `Error authenticating with google sheets. ${json.error_description}` + ) + } + + return json + } + + async connect() { + try { + // Initialise oAuth client + const db = getGlobalDB() + let googleConfig = await getScopedConfig(db, { + type: Configs.GOOGLE, + }) + + if (!googleConfig) { + googleConfig = { + clientID: env.GOOGLE_CLIENT_ID, + clientSecret: env.GOOGLE_CLIENT_SECRET, + } + } + + const oauthClient = new OAuth2Client({ + clientId: googleConfig.clientID, + clientSecret: googleConfig.clientSecret, + }) + + const tokenResponse = await this.fetchAccessToken({ + client_id: googleConfig.clientID, + client_secret: googleConfig.clientSecret, + refresh_token: this.config.auth.refreshToken, + }) + + oauthClient.setCredentials({ + refresh_token: this.config.auth.refreshToken, + access_token: tokenResponse.access_token, + }) + + this.client.useOAuth2Client(oauthClient) + await this.client.loadInfo() + } catch (err) { + console.error("Error connecting to google sheets", err) + throw err + } + } + + async buildSchema(datasourceId: string) { + await this.connect() + const sheets = await this.client.sheetsByIndex + const tables: Record = {} + for (let sheet of sheets) { + // must fetch rows to determine schema + await sheet.getRows() + // build schema + const schema: TableSchema = {} + + // build schema from headers + for (let header of sheet.headerValues) { + schema[header] = { + name: header, + type: FieldTypes.STRING, + } + } + + // create tables + tables[sheet.title] = { + _id: buildExternalTableId(datasourceId, sheet.title), + name: sheet.title, + primary: ["rowNumber"], + schema, + } + } + + this.tables = tables + } + + async query(json: QueryJson) { + const sheet = json.endpoint.entityId + + const handlers = { + [DataSourceOperation.CREATE]: () => + this.create({ sheet, row: json.body }), + [DataSourceOperation.READ]: () => this.read({ sheet }), + [DataSourceOperation.UPDATE]: () => + this.update({ + // exclude the header row and zero index + rowIndex: json.extra?.idFilter?.equal?.rowNumber - 2, + sheet, + row: json.body, + }), + [DataSourceOperation.DELETE]: () => + this.delete({ + // exclude the header row and zero index + rowIndex: json.extra?.idFilter?.equal?.rowNumber - 2, + sheet, + }), + [DataSourceOperation.CREATE_TABLE]: () => + this.createTable(json?.table?.name), + [DataSourceOperation.UPDATE_TABLE]: () => this.updateTable(json.table), + [DataSourceOperation.DELETE_TABLE]: () => + this.deleteTable(json?.table?.name), + } + + const internalQueryMethod = handlers[json.endpoint.operation] + + return await internalQueryMethod() + } + + buildRowObject(headers: string[], values: string[], rowNumber: number) { + const rowObject: { rowNumber: number; [key: string]: any } = { rowNumber } + for (let i = 0; i < headers.length; i++) { + rowObject._id = rowNumber + rowObject[headers[i]] = values[i] + } + return rowObject + } + + async createTable(name?: string) { + try { + await this.connect() + const sheet = await this.client.addSheet({ title: name }) + return sheet + } catch (err) { + console.error("Error creating new table in google sheets", err) + throw err + } + } + + async updateTable(table?: any) { + try { + await this.connect() + const sheet = await this.client.sheetsByTitle[table.name] + await sheet.loadHeaderRow() + + if (table._rename) { + const headers = [] + for (let header of sheet.headerValues) { + if (header === table._rename.old) { + headers.push(table._rename.updated) + } else { + headers.push(header) + } + } + await sheet.setHeaderRow(headers) + } else { + let newField = Object.keys(table.schema).find( + key => !sheet.headerValues.includes(key) + ) + await sheet.setHeaderRow([...sheet.headerValues, newField]) + } + } catch (err) { + console.error("Error updating table in google sheets", err) + throw err + } + } + + async deleteTable(sheet: any) { + try { + await this.connect() + const sheetToDelete = await this.client.sheetsByTitle[sheet] + return await sheetToDelete.delete() + } catch (err) { + console.error("Error deleting table in google sheets", err) + throw err + } + } + + async create(query: { sheet: string; row: any }) { + try { + await this.connect() + const sheet = await this.client.sheetsByTitle[query.sheet] + const rowToInsert = + typeof query.row === "string" ? JSON.parse(query.row) : query.row + const row = await sheet.addRow(rowToInsert) + return [ + this.buildRowObject(sheet.headerValues, row._rawData, row._rowNumber), + ] + } catch (err) { + console.error("Error writing to google sheets", err) + throw err + } + } + + async read(query: { sheet: string }) { + try { + await this.connect() + const sheet = await this.client.sheetsByTitle[query.sheet] + const rows = await sheet.getRows() + const headerValues = sheet.headerValues + const response = [] + for (let row of rows) { + response.push( + this.buildRowObject(headerValues, row._rawData, row._rowNumber) ) } - - return json + return response + } catch (err) { + console.error("Error reading from google sheets", err) + throw err } + } - async connect() { - try { - // Initialise oAuth client - const db = getGlobalDB() - let googleConfig = await getScopedConfig(db, { - type: Configs.GOOGLE, - }) - - if (!googleConfig) { - googleConfig = { - clientID: env.GOOGLE_CLIENT_ID, - clientSecret: env.GOOGLE_CLIENT_SECRET, - } - } - - const oauthClient = new OAuth2Client({ - clientId: googleConfig.clientID, - clientSecret: googleConfig.clientSecret, - }) - - const tokenResponse = await this.fetchAccessToken({ - client_id: googleConfig.clientID, - client_secret: googleConfig.clientSecret, - refresh_token: this.config.auth.refreshToken, - }) - - oauthClient.setCredentials({ - refresh_token: this.config.auth.refreshToken, - access_token: tokenResponse.access_token, - }) - - this.client.useOAuth2Client(oauthClient) - await this.client.loadInfo() - } catch (err) { - console.error("Error connecting to google sheets", err) - throw err - } - } - - async buildSchema(datasourceId: string) { - await this.connect() - const sheets = await this.client.sheetsByIndex - const tables: Record = {} - for (let sheet of sheets) { - // must fetch rows to determine schema - await sheet.getRows() - // build schema - const schema: TableSchema = {} - - // build schema from headers - for (let header of sheet.headerValues) { - schema[header] = { - name: header, - type: FieldTypes.STRING, - } - } - - // create tables - tables[sheet.title] = { - _id: buildExternalTableId(datasourceId, sheet.title), - name: sheet.title, - primary: ["rowNumber"], - schema, - } - } - - this.tables = tables - } - - async query(json: QueryJson) { - const sheet = json.endpoint.entityId - - const handlers = { - [DataSourceOperation.CREATE]: () => - this.create({ sheet, row: json.body }), - [DataSourceOperation.READ]: () => this.read({ sheet }), - [DataSourceOperation.UPDATE]: () => - this.update({ - // exclude the header row and zero index - rowIndex: json.extra?.idFilter?.equal?.rowNumber - 2, - sheet, - row: json.body, - }), - [DataSourceOperation.DELETE]: () => - this.delete({ - // exclude the header row and zero index - rowIndex: json.extra?.idFilter?.equal?.rowNumber - 2, - sheet, - }), - [DataSourceOperation.CREATE_TABLE]: () => - this.createTable(json?.table?.name), - [DataSourceOperation.UPDATE_TABLE]: () => this.updateTable(json.table), - [DataSourceOperation.DELETE_TABLE]: () => - this.deleteTable(json?.table?.name), - } - - const internalQueryMethod = handlers[json.endpoint.operation] - - return await internalQueryMethod() - } - - buildRowObject(headers: string[], values: string[], rowNumber: number) { - const rowObject: { rowNumber: number; [key: string]: any } = { rowNumber } - for (let i = 0; i < headers.length; i++) { - rowObject._id = rowNumber - rowObject[headers[i]] = values[i] - } - return rowObject - } - - async createTable(name?: string) { - try { - await this.connect() - const sheet = await this.client.addSheet({ title: name }) - return sheet - } catch (err) { - console.error("Error creating new table in google sheets", err) - throw err - } - } - - async updateTable(table?: any) { - try { - await this.connect() - const sheet = await this.client.sheetsByTitle[table.name] - await sheet.loadHeaderRow() - - if (table._rename) { - const headers = [] - for (let header of sheet.headerValues) { - if (header === table._rename.old) { - headers.push(table._rename.updated) - } else { - headers.push(header) - } - } - await sheet.setHeaderRow(headers) - } else { - let newField = Object.keys(table.schema).find( - key => !sheet.headerValues.includes(key) - ) - await sheet.setHeaderRow([...sheet.headerValues, newField]) - } - } catch (err) { - console.error("Error updating table in google sheets", err) - throw err - } - } - - async deleteTable(sheet: any) { - try { - await this.connect() - const sheetToDelete = await this.client.sheetsByTitle[sheet] - return await sheetToDelete.delete() - } catch (err) { - console.error("Error deleting table in google sheets", err) - throw err - } - } - - async create(query: { sheet: string; row: any }) { - try { - await this.connect() - const sheet = await this.client.sheetsByTitle[query.sheet] - const rowToInsert = - typeof query.row === "string" ? JSON.parse(query.row) : query.row - const row = await sheet.addRow(rowToInsert) - return [ - this.buildRowObject(sheet.headerValues, row._rawData, row._rowNumber), - ] - } catch (err) { - console.error("Error writing to google sheets", err) - throw err - } - } - - async read(query: { sheet: string }) { - try { - await this.connect() - const sheet = await this.client.sheetsByTitle[query.sheet] - const rows = await sheet.getRows() - const headerValues = sheet.headerValues - const response = [] - for (let row of rows) { - response.push( - this.buildRowObject(headerValues, row._rawData, row._rowNumber) - ) - } - return response - } catch (err) { - console.error("Error reading from google sheets", err) - throw err - } - } - - async update(query: { sheet: string; rowIndex: number; row: any }) { - try { - await this.connect() - const sheet = await this.client.sheetsByTitle[query.sheet] - const rows = await sheet.getRows() - const row = rows[query.rowIndex] - if (row) { - const updateValues = query.row - for (let key in updateValues) { - row[key] = updateValues[key] - } - await row.save() - return [ - this.buildRowObject( - sheet.headerValues, - row._rawData, - row._rowNumber - ), - ] - } else { - throw new Error("Row does not exist.") - } - } catch (err) { - console.error("Error reading from google sheets", err) - throw err - } - } - - async delete(query: { sheet: string; rowIndex: number }) { + async update(query: { sheet: string; rowIndex: number; row: any }) { + try { await this.connect() const sheet = await this.client.sheetsByTitle[query.sheet] const rows = await sheet.getRows() const row = rows[query.rowIndex] if (row) { - await row.delete() - return [{ deleted: query.rowIndex }] + const updateValues = query.row + for (let key in updateValues) { + row[key] = updateValues[key] + } + await row.save() + return [ + this.buildRowObject(sheet.headerValues, row._rawData, row._rowNumber), + ] } else { throw new Error("Row does not exist.") } + } catch (err) { + console.error("Error reading from google sheets", err) + throw err } } - module.exports = { - schema: SCHEMA, - integration: GoogleSheetsIntegration, + async delete(query: { sheet: string; rowIndex: number }) { + await this.connect() + const sheet = await this.client.sheetsByTitle[query.sheet] + const rows = await sheet.getRows() + const row = rows[query.rowIndex] + if (row) { + await row.delete() + return [{ deleted: query.rowIndex }] + } else { + throw new Error("Row does not exist.") + } } } + +export default { + schema: SCHEMA, + integration: GoogleSheetsIntegration, +} diff --git a/packages/server/src/integrations/index.ts b/packages/server/src/integrations/index.ts index fd2ce75391..bde7235ac8 100644 --- a/packages/server/src/integrations/index.ts +++ b/packages/server/src/integrations/index.ts @@ -1,22 +1,24 @@ -const postgres = require("./postgres") -const dynamodb = require("./dynamodb") -const mongodb = require("./mongodb") -const elasticsearch = require("./elasticsearch") -const couchdb = require("./couchdb") -const sqlServer = require("./microsoftSqlServer") -const s3 = require("./s3") -const airtable = require("./airtable") -const mysql = require("./mysql") -const arangodb = require("./arangodb") -const rest = require("./rest") -const googlesheets = require("./googlesheets") -const firebase = require("./firebase") -const redis = require("./redis") -const snowflake = require("./snowflake") -const { SourceName } = require("@budibase/types") +import postgres from "./postgres" +import dynamodb from "./dynamodb" +import mongodb from "./mongodb" +import elasticsearch from "./elasticsearch" +import couchdb from "./couchdb" +import sqlServer from "./microsoftSqlServer" +import s3 from "./s3" +import airtable from "./airtable" +import mysql from "./mysql" +import arangodb from "./arangodb" +import rest from "./rest" +import googlesheets from "./googlesheets" +import firebase from "./firebase" +import redis from "./redis" +import snowflake from "./snowflake" +import { getPlugins } from "../api/controllers/plugin" +import { SourceName, Integration, PluginType } from "@budibase/types" const environment = require("../environment") +const { cloneDeep } = require("lodash") -const DEFINITIONS = { +const DEFINITIONS: { [key: string]: Integration } = { [SourceName.POSTGRES]: postgres.schema, [SourceName.DYNAMODB]: dynamodb.schema, [SourceName.MONGODB]: mongodb.schema, @@ -33,7 +35,7 @@ const DEFINITIONS = { [SourceName.SNOWFLAKE]: snowflake.schema, } -const INTEGRATIONS = { +const INTEGRATIONS: { [key: string]: any } = { [SourceName.POSTGRES]: postgres.integration, [SourceName.DYNAMODB]: dynamodb.integration, [SourceName.MONGODB]: mongodb.integration, @@ -48,7 +50,7 @@ const INTEGRATIONS = { [SourceName.FIRESTORE]: firebase.integration, [SourceName.GOOGLE_SHEETS]: googlesheets.integration, [SourceName.REDIS]: redis.integration, - [SourceName.FIREBASE]: firebase.integration, + [SourceName.FIRESTORE]: firebase.integration, [SourceName.SNOWFLAKE]: snowflake.integration, } @@ -64,6 +66,9 @@ if (environment.SELF_HOSTED) { } module.exports = { - definitions: DEFINITIONS, + getDefinitions: async () => { + const custom = await getPlugins(PluginType.DATASOURCE) + return cloneDeep(DEFINITIONS) + }, integrations: INTEGRATIONS, } diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 6103fd90ce..0746d0e3bc 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -18,292 +18,290 @@ import { } from "./utils" import Sql from "./base/sql" -module MSSQLModule { - const sqlServer = require("mssql") - const DEFAULT_SCHEMA = "dbo" +const sqlServer = require("mssql") +const DEFAULT_SCHEMA = "dbo" - interface MSSQLConfig { - user: string - password: string - server: string - port: number - database: string - schema: string - encrypt?: boolean - } +interface MSSQLConfig { + user: string + password: string + server: string + port: number + database: string + schema: string + encrypt?: boolean +} - interface TablesResponse { - TABLE_CATALOG: string - TABLE_SCHEMA: string - TABLE_NAME: string - TABLE_TYPE: string - } +interface TablesResponse { + TABLE_CATALOG: string + TABLE_SCHEMA: string + TABLE_NAME: string + TABLE_TYPE: string +} - const SCHEMA: Integration = { - docs: "https://github.com/tediousjs/node-mssql", - plus: true, - description: - "Microsoft SQL Server is a relational database management system developed by Microsoft. ", - friendlyName: "MS SQL Server", - type: "Relational", - datasource: { - user: { - type: DatasourceFieldType.STRING, - required: true, - default: "localhost", - }, - password: { - type: DatasourceFieldType.PASSWORD, - required: true, - }, - server: { - type: DatasourceFieldType.STRING, - default: "localhost", - }, - port: { - type: DatasourceFieldType.NUMBER, - required: false, - default: 1433, - }, - database: { - type: DatasourceFieldType.STRING, - default: "root", - }, - schema: { - type: DatasourceFieldType.STRING, - default: DEFAULT_SCHEMA, - }, - encrypt: { - type: DatasourceFieldType.BOOLEAN, - default: true, - }, +const SCHEMA: Integration = { + docs: "https://github.com/tediousjs/node-mssql", + plus: true, + description: + "Microsoft SQL Server is a relational database management system developed by Microsoft. ", + friendlyName: "MS SQL Server", + type: "Relational", + datasource: { + user: { + type: DatasourceFieldType.STRING, + required: true, + default: "localhost", }, - query: { - create: { - type: QueryType.SQL, - }, - read: { - type: QueryType.SQL, - }, - update: { - type: QueryType.SQL, - }, - delete: { - type: QueryType.SQL, - }, + password: { + type: DatasourceFieldType.PASSWORD, + required: true, }, - } + server: { + type: DatasourceFieldType.STRING, + default: "localhost", + }, + port: { + type: DatasourceFieldType.NUMBER, + required: false, + default: 1433, + }, + database: { + type: DatasourceFieldType.STRING, + default: "root", + }, + schema: { + type: DatasourceFieldType.STRING, + default: DEFAULT_SCHEMA, + }, + encrypt: { + type: DatasourceFieldType.BOOLEAN, + default: true, + }, + }, + query: { + create: { + type: QueryType.SQL, + }, + read: { + type: QueryType.SQL, + }, + update: { + type: QueryType.SQL, + }, + delete: { + type: QueryType.SQL, + }, + }, +} - class SqlServerIntegration extends Sql implements DatasourcePlus { - private readonly config: MSSQLConfig - private index: number = 0 - private readonly pool: any - private client: any - public tables: Record = {} - public schemaErrors: Record = {} +class SqlServerIntegration extends Sql implements DatasourcePlus { + private readonly config: MSSQLConfig + private index: number = 0 + private readonly pool: any + private client: any + public tables: Record = {} + public schemaErrors: Record = {} - MASTER_TABLES = [ - "spt_fallback_db", - "spt_fallback_dev", - "spt_fallback_usg", - "spt_monitor", - "MSreplication_options", - ] - TABLES_SQL = - "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'" + MASTER_TABLES = [ + "spt_fallback_db", + "spt_fallback_dev", + "spt_fallback_usg", + "spt_monitor", + "MSreplication_options", + ] + TABLES_SQL = + "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'" - 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) - } + constructor(config: MSSQLConfig) { + super(SqlClient.MS_SQL) + this.config = config + const clientCfg = { + ...this.config, + options: { + encrypt: this.config.encrypt, + enableArithAbort: true, + }, } - - getBindingIdentifier(): string { - return `@p${this.index++}` - } - - getStringConcat(parts: string[]): string { - return `concat(${parts.join(", ")})` - } - - async connect() { - try { - this.client = await this.pool.connect() - } catch (err) { - // @ts-ignore - throw new Error(err) - } - } - - async internalQuery( - query: SqlQuery, - operation: string | undefined = undefined - ) { - const client = this.client - const request = client.request() - this.index = 0 - try { - if (Array.isArray(query.bindings)) { - let count = 0 - for (let binding of query.bindings) { - request.input(`p${count++}`, binding) - } - } - // this is a hack to get the inserted ID back, - // no way to do this with Knex nicely - const sql = - operation === Operation.CREATE - ? `${query.sql}; SELECT SCOPE_IDENTITY() AS id;` - : query.sql - return await request.query(sql) - } catch (err) { - // @ts-ignore - throw new Error(err) - } - } - - getDefinitionSQL(tableName: string) { - return `select * - from INFORMATION_SCHEMA.COLUMNS - where TABLE_NAME='${tableName}'` - } - - getConstraintsSQL(tableName: string) { - return `SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS TC - INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS KU - ON TC.CONSTRAINT_TYPE = 'PRIMARY KEY' - AND TC.CONSTRAINT_NAME = KU.CONSTRAINT_NAME - AND KU.table_name='${tableName}' - ORDER BY - KU.TABLE_NAME, - KU.ORDINAL_POSITION;` - } - - getAutoColumnsSQL(tableName: string) { - return `SELECT - COLUMNPROPERTY(OBJECT_ID(TABLE_SCHEMA+'.'+TABLE_NAME),COLUMN_NAME,'IsComputed') - AS IS_COMPUTED, - COLUMNPROPERTY(object_id(TABLE_SCHEMA+'.'+TABLE_NAME), COLUMN_NAME, 'IsIdentity') - AS IS_IDENTITY, - * - FROM INFORMATION_SCHEMA.COLUMNS - WHERE TABLE_NAME='${tableName}'` - } - - async runSQL(sql: string) { - return (await this.internalQuery(getSqlQuery(sql))).recordset - } - - /** - * Fetches the tables from the sql server database and assigns them to the datasource. - * @param {*} datasourceId - datasourceId to fetch - * @param entities - the tables that are to be built - */ - async buildSchema(datasourceId: string, entities: Record) { - await this.connect() - let tableInfo: TablesResponse[] = await this.runSQL(this.TABLES_SQL) - if (tableInfo == null || !Array.isArray(tableInfo)) { - throw "Unable to get list of tables in database" - } - - const schema = this.config.schema || DEFAULT_SCHEMA - const tableNames = tableInfo - .filter((record: any) => record.TABLE_SCHEMA === schema) - .map((record: any) => record.TABLE_NAME) - .filter((name: string) => this.MASTER_TABLES.indexOf(name) === -1) - - const tables: Record = {} - for (let tableName of tableNames) { - // get the column definition (type) - const definition = await this.runSQL(this.getDefinitionSQL(tableName)) - // find primary key constraints - const constraints = await this.runSQL(this.getConstraintsSQL(tableName)) - // find the computed and identity columns (auto columns) - const columns = await this.runSQL(this.getAutoColumnsSQL(tableName)) - const primaryKeys = constraints - .filter( - (constraint: any) => constraint.CONSTRAINT_TYPE === "PRIMARY KEY" - ) - .map((constraint: any) => constraint.COLUMN_NAME) - const autoColumns = columns - .filter((col: any) => col.IS_COMPUTED || col.IS_IDENTITY) - .map((col: any) => col.COLUMN_NAME) - - let schema: TableSchema = {} - for (let def of definition) { - const name = def.COLUMN_NAME - if (typeof name !== "string") { - continue - } - schema[name] = { - autocolumn: !!autoColumns.find((col: string) => col === name), - name: name, - ...convertSqlType(def.DATA_TYPE), - externalType: def.DATA_TYPE, - } - } - tables[tableName] = { - _id: buildExternalTableId(datasourceId, tableName), - primary: primaryKeys, - name: tableName, - schema, - } - } - const final = finaliseExternalTables(tables, entities) - this.tables = final.tables - this.schemaErrors = final.errors - } - - async read(query: SqlQuery | string) { - await this.connect() - const response = await this.internalQuery(getSqlQuery(query)) - return response.recordset - } - - async create(query: SqlQuery | string) { - await this.connect() - const response = await this.internalQuery(getSqlQuery(query)) - return response.recordset || [{ created: true }] - } - - async update(query: SqlQuery | string) { - await this.connect() - const response = await this.internalQuery(getSqlQuery(query)) - return response.recordset || [{ updated: true }] - } - - async delete(query: SqlQuery | string) { - await this.connect() - const response = await this.internalQuery(getSqlQuery(query)) - return response.recordset || [{ deleted: true }] - } - - async query(json: QueryJson) { - const schema = this.config.schema - await this.connect() - if (schema && schema !== DEFAULT_SCHEMA && json?.endpoint) { - json.endpoint.schema = schema - } - const operation = this._operation(json) - const queryFn = (query: any, op: string) => this.internalQuery(query, op) - const processFn = (result: any) => - result.recordset ? result.recordset : [{ [operation]: true }] - return this.queryWithReturning(json, queryFn, processFn) + delete clientCfg.encrypt + if (!this.pool) { + this.pool = new sqlServer.ConnectionPool(clientCfg) } } - module.exports = { - schema: SCHEMA, - integration: SqlServerIntegration, + getBindingIdentifier(): string { + return `@p${this.index++}` + } + + getStringConcat(parts: string[]): string { + return `concat(${parts.join(", ")})` + } + + async connect() { + try { + this.client = await this.pool.connect() + } catch (err) { + // @ts-ignore + throw new Error(err) + } + } + + async internalQuery( + query: SqlQuery, + operation: string | undefined = undefined + ) { + const client = this.client + const request = client.request() + this.index = 0 + try { + if (Array.isArray(query.bindings)) { + let count = 0 + for (let binding of query.bindings) { + request.input(`p${count++}`, binding) + } + } + // this is a hack to get the inserted ID back, + // no way to do this with Knex nicely + const sql = + operation === Operation.CREATE + ? `${query.sql}; SELECT SCOPE_IDENTITY() AS id;` + : query.sql + return await request.query(sql) + } catch (err) { + // @ts-ignore + throw new Error(err) + } + } + + getDefinitionSQL(tableName: string) { + return `select * + from INFORMATION_SCHEMA.COLUMNS + where TABLE_NAME='${tableName}'` + } + + getConstraintsSQL(tableName: string) { + return `SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS TC + INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS KU + ON TC.CONSTRAINT_TYPE = 'PRIMARY KEY' + AND TC.CONSTRAINT_NAME = KU.CONSTRAINT_NAME + AND KU.table_name='${tableName}' + ORDER BY + KU.TABLE_NAME, + KU.ORDINAL_POSITION;` + } + + getAutoColumnsSQL(tableName: string) { + return `SELECT + COLUMNPROPERTY(OBJECT_ID(TABLE_SCHEMA+'.'+TABLE_NAME),COLUMN_NAME,'IsComputed') + AS IS_COMPUTED, + COLUMNPROPERTY(object_id(TABLE_SCHEMA+'.'+TABLE_NAME), COLUMN_NAME, 'IsIdentity') + AS IS_IDENTITY, + * + FROM INFORMATION_SCHEMA.COLUMNS + WHERE TABLE_NAME='${tableName}'` + } + + async runSQL(sql: string) { + return (await this.internalQuery(getSqlQuery(sql))).recordset + } + + /** + * Fetches the tables from the sql server database and assigns them to the datasource. + * @param {*} datasourceId - datasourceId to fetch + * @param entities - the tables that are to be built + */ + async buildSchema(datasourceId: string, entities: Record) { + await this.connect() + let tableInfo: TablesResponse[] = await this.runSQL(this.TABLES_SQL) + if (tableInfo == null || !Array.isArray(tableInfo)) { + throw "Unable to get list of tables in database" + } + + const schema = this.config.schema || DEFAULT_SCHEMA + const tableNames = tableInfo + .filter((record: any) => record.TABLE_SCHEMA === schema) + .map((record: any) => record.TABLE_NAME) + .filter((name: string) => this.MASTER_TABLES.indexOf(name) === -1) + + const tables: Record = {} + for (let tableName of tableNames) { + // get the column definition (type) + const definition = await this.runSQL(this.getDefinitionSQL(tableName)) + // find primary key constraints + const constraints = await this.runSQL(this.getConstraintsSQL(tableName)) + // find the computed and identity columns (auto columns) + const columns = await this.runSQL(this.getAutoColumnsSQL(tableName)) + const primaryKeys = constraints + .filter( + (constraint: any) => constraint.CONSTRAINT_TYPE === "PRIMARY KEY" + ) + .map((constraint: any) => constraint.COLUMN_NAME) + const autoColumns = columns + .filter((col: any) => col.IS_COMPUTED || col.IS_IDENTITY) + .map((col: any) => col.COLUMN_NAME) + + let schema: TableSchema = {} + for (let def of definition) { + const name = def.COLUMN_NAME + if (typeof name !== "string") { + continue + } + schema[name] = { + autocolumn: !!autoColumns.find((col: string) => col === name), + name: name, + ...convertSqlType(def.DATA_TYPE), + externalType: def.DATA_TYPE, + } + } + tables[tableName] = { + _id: buildExternalTableId(datasourceId, tableName), + primary: primaryKeys, + name: tableName, + schema, + } + } + const final = finaliseExternalTables(tables, entities) + this.tables = final.tables + this.schemaErrors = final.errors + } + + async read(query: SqlQuery | string) { + await this.connect() + const response = await this.internalQuery(getSqlQuery(query)) + return response.recordset + } + + async create(query: SqlQuery | string) { + await this.connect() + const response = await this.internalQuery(getSqlQuery(query)) + return response.recordset || [{ created: true }] + } + + async update(query: SqlQuery | string) { + await this.connect() + const response = await this.internalQuery(getSqlQuery(query)) + return response.recordset || [{ updated: true }] + } + + async delete(query: SqlQuery | string) { + await this.connect() + const response = await this.internalQuery(getSqlQuery(query)) + return response.recordset || [{ deleted: true }] + } + + async query(json: QueryJson) { + const schema = this.config.schema + await this.connect() + if (schema && schema !== DEFAULT_SCHEMA && json?.endpoint) { + json.endpoint.schema = schema + } + const operation = this._operation(json) + const queryFn = (query: any, op: string) => this.internalQuery(query, op) + const processFn = (result: any) => + result.recordset ? result.recordset : [{ [operation]: true }] + return this.queryWithReturning(json, queryFn, processFn) } } + +export default { + schema: SCHEMA, + integration: SqlServerIntegration, +} diff --git a/packages/server/src/integrations/mongodb.ts b/packages/server/src/integrations/mongodb.ts index 4f2a901259..3b11348368 100644 --- a/packages/server/src/integrations/mongodb.ts +++ b/packages/server/src/integrations/mongodb.ts @@ -15,313 +15,309 @@ import { CommonOptions, } from "mongodb" -module MongoDBModule { - interface MongoDBConfig { - connectionString: string - db: string +interface MongoDBConfig { + connectionString: string + db: string +} + +const SCHEMA: Integration = { + docs: "https://github.com/mongodb/node-mongodb-native", + friendlyName: "MongoDB", + type: "Non-relational", + description: + "MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era.", + datasource: { + connectionString: { + type: DatasourceFieldType.STRING, + required: true, + default: "mongodb://localhost:27017", + }, + db: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + query: { + create: { + type: QueryType.JSON, + }, + read: { + type: QueryType.JSON, + }, + update: { + type: QueryType.JSON, + }, + delete: { + type: QueryType.JSON, + }, + }, + extra: { + collection: { + displayName: "Collection", + type: DatasourceFieldType.STRING, + required: true, + }, + actionTypes: { + displayName: "Action Types", + type: DatasourceFieldType.LIST, + required: true, + data: { + read: ["find", "findOne", "findOneAndUpdate", "count", "distinct"], + create: ["insertOne", "insertMany"], + update: ["updateOne", "updateMany"], + delete: ["deleteOne", "deleteMany"], + }, + }, + }, +} + +class MongoIntegration implements IntegrationBase { + private config: MongoDBConfig + private client: any + + constructor(config: MongoDBConfig) { + this.config = config + this.client = new MongoClient(config.connectionString) } - const SCHEMA: Integration = { - docs: "https://github.com/mongodb/node-mongodb-native", - friendlyName: "MongoDB", - type: "Non-relational", - description: - "MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era.", - datasource: { - connectionString: { - type: DatasourceFieldType.STRING, - required: true, - default: "mongodb://localhost:27017", - }, - db: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - query: { - create: { - type: QueryType.JSON, - }, - read: { - type: QueryType.JSON, - }, - update: { - type: QueryType.JSON, - }, - delete: { - type: QueryType.JSON, - }, - }, - extra: { - collection: { - displayName: "Collection", - type: DatasourceFieldType.STRING, - required: true, - }, - actionTypes: { - displayName: "Action Types", - type: DatasourceFieldType.LIST, - required: true, - data: { - read: ["find", "findOne", "findOneAndUpdate", "count", "distinct"], - create: ["insertOne", "insertMany"], - update: ["updateOne", "updateMany"], - delete: ["deleteOne", "deleteMany"], - }, - }, - }, + async connect() { + return this.client.connect() } - class MongoIntegration implements IntegrationBase { - private config: MongoDBConfig - private client: any - - constructor(config: MongoDBConfig) { - this.config = config - this.client = new MongoClient(config.connectionString) + createObjectIds(json: any): object { + const self = this + function interpolateObjectIds(json: any) { + for (let field of Object.keys(json)) { + if (json[field] instanceof Object) { + json[field] = self.createObjectIds(json[field]) + } + if ( + (field === "_id" || field?.startsWith("$")) && + typeof json[field] === "string" + ) { + const id = json[field].match(/(?<=objectid\(['"]).*(?=['"]\))/gi)?.[0] + if (id) { + json[field] = ObjectID.createFromHexString(id) + } + } + } + return json } - async connect() { - return this.client.connect() + if (Array.isArray(json)) { + for (let i = 0; i < json.length; i++) { + json[i] = interpolateObjectIds(json[i]) + } + return json } + return interpolateObjectIds(json) + } - createObjectIds(json: any): object { - const self = this - function interpolateObjectIds(json: any) { - for (let field of Object.keys(json)) { - if (json[field] instanceof Object) { - json[field] = self.createObjectIds(json[field]) - } - if ( - (field === "_id" || field?.startsWith("$")) && - typeof json[field] === "string" - ) { - const id = json[field].match( - /(?<=objectid\(['"]).*(?=['"]\))/gi - )?.[0] - if (id) { - json[field] = ObjectID.createFromHexString(id) - } - } - } - return json + parseQueryParams(params: string, mode: string) { + let queryParams = [] + let openCount = 0 + let inQuotes = false + let i = 0 + let startIndex = 0 + for (let c of params) { + if (c === '"' && i > 0 && params[i - 1] !== "\\") { + inQuotes = !inQuotes } - - if (Array.isArray(json)) { - for (let i = 0; i < json.length; i++) { - json[i] = interpolateObjectIds(json[i]) + if (c === "{" && !inQuotes) { + openCount++ + if (openCount === 1) { + startIndex = i } - return json + } else if (c === "}" && !inQuotes) { + if (openCount === 1) { + queryParams.push(JSON.parse(params.substring(startIndex, i + 1))) + } + openCount-- } - return interpolateObjectIds(json) + i++ } - - parseQueryParams(params: string, mode: string) { - let queryParams = [] - let openCount = 0 - let inQuotes = false - let i = 0 - let startIndex = 0 - for (let c of params) { - if (c === '"' && i > 0 && params[i - 1] !== "\\") { - inQuotes = !inQuotes - } - if (c === "{" && !inQuotes) { - openCount++ - if (openCount === 1) { - startIndex = i - } - } else if (c === "}" && !inQuotes) { - if (openCount === 1) { - queryParams.push(JSON.parse(params.substring(startIndex, i + 1))) - } - openCount-- - } - i++ - } - let group1 = queryParams[0] ?? {} - let group2 = queryParams[1] ?? {} - let group3 = queryParams[2] ?? {} - if (mode === "update") { - return { - filter: group1, - update: group2, - options: group3, - } - } + let group1 = queryParams[0] ?? {} + let group2 = queryParams[1] ?? {} + let group3 = queryParams[2] ?? {} + if (mode === "update") { return { filter: group1, - options: group2, + update: group2, + options: group3, } } - - async create(query: { json: object; extra: { [key: string]: string } }) { - try { - await this.connect() - const db = this.client.db(this.config.db) - const collection = db.collection(query.extra.collection) - let json = this.createObjectIds(query.json) - - // For mongodb we add an extra actionType to specify - // which method we want to call on the collection - switch (query.extra.actionTypes) { - case "insertOne": { - return await collection.insertOne(json) - } - case "insertMany": { - return await collection.insertMany(json) - } - default: { - throw new Error( - `actionType ${query.extra.actionTypes} does not exist on DB for create` - ) - } - } - } catch (err) { - console.error("Error writing to mongodb", err) - throw err - } finally { - await this.client.close() - } - } - - async read(query: { json: object; extra: { [key: string]: string } }) { - try { - await this.connect() - const db = this.client.db(this.config.db) - const collection = db.collection(query.extra.collection) - let json = this.createObjectIds(query.json) - - switch (query.extra.actionTypes) { - case "find": { - return await collection.find(json).toArray() - } - case "findOne": { - return await collection.findOne(json) - } - case "findOneAndUpdate": { - if (typeof query.json === "string") { - json = this.parseQueryParams(query.json, "update") - } - let findAndUpdateJson = this.createObjectIds(json) as { - filter: FilterQuery - update: UpdateQuery - options: FindOneAndUpdateOption - } - return await collection.findOneAndUpdate( - findAndUpdateJson.filter, - findAndUpdateJson.update, - findAndUpdateJson.options - ) - } - case "count": { - return await collection.countDocuments(json) - } - case "distinct": { - return await collection.distinct(json) - } - default: { - throw new Error( - `actionType ${query.extra.actionTypes} does not exist on DB for read` - ) - } - } - } catch (err) { - console.error("Error querying mongodb", err) - throw err - } finally { - await this.client.close() - } - } - - async update(query: { json: object; extra: { [key: string]: string } }) { - try { - await this.connect() - const db = this.client.db(this.config.db) - const collection = db.collection(query.extra.collection) - let queryJson = query.json - if (typeof queryJson === "string") { - queryJson = this.parseQueryParams(queryJson, "update") - } - let json = this.createObjectIds(queryJson) as { - filter: FilterQuery - update: UpdateQuery - options: object - } - - switch (query.extra.actionTypes) { - case "updateOne": { - return await collection.updateOne( - json.filter, - json.update, - json.options as UpdateOneOptions - ) - } - case "updateMany": { - return await collection.updateMany( - json.filter, - json.update, - json.options as UpdateManyOptions - ) - } - default: { - throw new Error( - `actionType ${query.extra.actionTypes} does not exist on DB for update` - ) - } - } - } catch (err) { - console.error("Error writing to mongodb", err) - throw err - } finally { - await this.client.close() - } - } - - async delete(query: { json: object; extra: { [key: string]: string } }) { - try { - await this.connect() - const db = this.client.db(this.config.db) - const collection = db.collection(query.extra.collection) - let queryJson = query.json - if (typeof queryJson === "string") { - queryJson = this.parseQueryParams(queryJson, "delete") - } - let json = this.createObjectIds(queryJson) as { - filter: FilterQuery - options: CommonOptions - } - if (!json.options) { - json = { - filter: json, - options: {}, - } - } - - switch (query.extra.actionTypes) { - case "deleteOne": { - return await collection.deleteOne(json.filter, json.options) - } - case "deleteMany": { - return await collection.deleteMany(json.filter, json.options) - } - default: { - throw new Error( - `actionType ${query.extra.actionTypes} does not exist on DB for delete` - ) - } - } - } catch (err) { - console.error("Error writing to mongodb", err) - throw err - } finally { - await this.client.close() - } + return { + filter: group1, + options: group2, } } - module.exports = { - schema: SCHEMA, - integration: MongoIntegration, + async create(query: { json: object; extra: { [key: string]: string } }) { + try { + await this.connect() + const db = this.client.db(this.config.db) + const collection = db.collection(query.extra.collection) + let json = this.createObjectIds(query.json) + + // For mongodb we add an extra actionType to specify + // which method we want to call on the collection + switch (query.extra.actionTypes) { + case "insertOne": { + return await collection.insertOne(json) + } + case "insertMany": { + return await collection.insertMany(json) + } + default: { + throw new Error( + `actionType ${query.extra.actionTypes} does not exist on DB for create` + ) + } + } + } catch (err) { + console.error("Error writing to mongodb", err) + throw err + } finally { + await this.client.close() + } + } + + async read(query: { json: object; extra: { [key: string]: string } }) { + try { + await this.connect() + const db = this.client.db(this.config.db) + const collection = db.collection(query.extra.collection) + let json = this.createObjectIds(query.json) + + switch (query.extra.actionTypes) { + case "find": { + return await collection.find(json).toArray() + } + case "findOne": { + return await collection.findOne(json) + } + case "findOneAndUpdate": { + if (typeof query.json === "string") { + json = this.parseQueryParams(query.json, "update") + } + let findAndUpdateJson = this.createObjectIds(json) as { + filter: FilterQuery + update: UpdateQuery + options: FindOneAndUpdateOption + } + return await collection.findOneAndUpdate( + findAndUpdateJson.filter, + findAndUpdateJson.update, + findAndUpdateJson.options + ) + } + case "count": { + return await collection.countDocuments(json) + } + case "distinct": { + return await collection.distinct(json) + } + default: { + throw new Error( + `actionType ${query.extra.actionTypes} does not exist on DB for read` + ) + } + } + } catch (err) { + console.error("Error querying mongodb", err) + throw err + } finally { + await this.client.close() + } + } + + async update(query: { json: object; extra: { [key: string]: string } }) { + try { + await this.connect() + const db = this.client.db(this.config.db) + const collection = db.collection(query.extra.collection) + let queryJson = query.json + if (typeof queryJson === "string") { + queryJson = this.parseQueryParams(queryJson, "update") + } + let json = this.createObjectIds(queryJson) as { + filter: FilterQuery + update: UpdateQuery + options: object + } + + switch (query.extra.actionTypes) { + case "updateOne": { + return await collection.updateOne( + json.filter, + json.update, + json.options as UpdateOneOptions + ) + } + case "updateMany": { + return await collection.updateMany( + json.filter, + json.update, + json.options as UpdateManyOptions + ) + } + default: { + throw new Error( + `actionType ${query.extra.actionTypes} does not exist on DB for update` + ) + } + } + } catch (err) { + console.error("Error writing to mongodb", err) + throw err + } finally { + await this.client.close() + } + } + + async delete(query: { json: object; extra: { [key: string]: string } }) { + try { + await this.connect() + const db = this.client.db(this.config.db) + const collection = db.collection(query.extra.collection) + let queryJson = query.json + if (typeof queryJson === "string") { + queryJson = this.parseQueryParams(queryJson, "delete") + } + let json = this.createObjectIds(queryJson) as { + filter: FilterQuery + options: CommonOptions + } + if (!json.options) { + json = { + filter: json, + options: {}, + } + } + + switch (query.extra.actionTypes) { + case "deleteOne": { + return await collection.deleteOne(json.filter, json.options) + } + case "deleteMany": { + return await collection.deleteMany(json.filter, json.options) + } + default: { + throw new Error( + `actionType ${query.extra.actionTypes} does not exist on DB for delete` + ) + } + } + } catch (err) { + console.error("Error writing to mongodb", err) + throw err + } finally { + await this.client.close() + } } } + +export default { + schema: SCHEMA, + integration: MongoIntegration, +} diff --git a/packages/server/src/integrations/mysql.ts b/packages/server/src/integrations/mysql.ts index 466f2e6494..0f236935c8 100644 --- a/packages/server/src/integrations/mysql.ts +++ b/packages/server/src/integrations/mysql.ts @@ -19,274 +19,269 @@ import dayjs from "dayjs" const { NUMBER_REGEX } = require("../utilities") import Sql from "./base/sql" -module MySQLModule { - const mysql = require("mysql2/promise") +const mysql = require("mysql2/promise") - interface MySQLConfig { - host: string - port: number - user: string - password: string - database: string - ssl?: { [key: string]: any } - rejectUnauthorized: boolean - typeCast: Function - } +interface MySQLConfig { + host: string + port: number + user: string + password: string + database: string + ssl?: { [key: string]: any } + rejectUnauthorized: boolean + typeCast: Function +} - const SCHEMA: Integration = { - docs: "https://github.com/sidorares/node-mysql2", - plus: true, - friendlyName: "MySQL", - type: "Relational", - description: - "MySQL Database Service is a fully managed database service to deploy cloud-native applications. ", - datasource: { - host: { - type: DatasourceFieldType.STRING, - default: "localhost", - required: true, - }, - port: { - type: DatasourceFieldType.NUMBER, - default: 3306, - required: false, - }, - user: { - type: DatasourceFieldType.STRING, - default: "root", - required: true, - }, - password: { - type: DatasourceFieldType.PASSWORD, - default: "root", - required: true, - }, - database: { - type: DatasourceFieldType.STRING, - required: true, - }, - ssl: { - type: DatasourceFieldType.OBJECT, - required: false, - }, - rejectUnauthorized: { - type: DatasourceFieldType.BOOLEAN, - default: true, - required: false, - }, +const SCHEMA: Integration = { + docs: "https://github.com/sidorares/node-mysql2", + plus: true, + friendlyName: "MySQL", + type: "Relational", + description: + "MySQL Database Service is a fully managed database service to deploy cloud-native applications. ", + datasource: { + host: { + type: DatasourceFieldType.STRING, + default: "localhost", + required: true, }, - query: { - create: { - type: QueryType.SQL, - }, - read: { - type: QueryType.SQL, - }, - update: { - type: QueryType.SQL, - }, - delete: { - type: QueryType.SQL, - }, + port: { + type: DatasourceFieldType.NUMBER, + default: 3306, + required: false, }, + user: { + type: DatasourceFieldType.STRING, + default: "root", + required: true, + }, + password: { + type: DatasourceFieldType.PASSWORD, + default: "root", + required: true, + }, + database: { + type: DatasourceFieldType.STRING, + required: true, + }, + ssl: { + type: DatasourceFieldType.OBJECT, + required: false, + }, + rejectUnauthorized: { + type: DatasourceFieldType.BOOLEAN, + default: true, + required: false, + }, + }, + query: { + create: { + type: QueryType.SQL, + }, + read: { + type: QueryType.SQL, + }, + update: { + type: QueryType.SQL, + }, + delete: { + type: QueryType.SQL, + }, + }, +} + +const TimezoneAwareDateTypes = ["timestamp"] + +function bindingTypeCoerce(bindings: any[]) { + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i] + if (typeof binding !== "string") { + continue + } + const matches = binding.match(NUMBER_REGEX) + // check if number first + if (matches && matches[0] !== "" && !isNaN(Number(matches[0]))) { + bindings[i] = parseFloat(binding) + } + // if not a number, see if it is a date - important to do in this order as any + // integer will be considered a valid date + else if (/^\d/.test(binding) && dayjs(binding).isValid()) { + bindings[i] = dayjs(binding).toDate() + } + } + return bindings +} + +class MySQLIntegration extends Sql implements DatasourcePlus { + private config: MySQLConfig + private client: any + public tables: Record = {} + public schemaErrors: Record = {} + + constructor(config: MySQLConfig) { + super(SqlClient.MY_SQL) + this.config = config + if (config.ssl && Object.keys(config.ssl).length === 0) { + delete config.ssl + } + // make sure this defaults to true + if ( + config.rejectUnauthorized != null && + !config.rejectUnauthorized && + config.ssl + ) { + config.ssl.rejectUnauthorized = config.rejectUnauthorized + } + // @ts-ignore + delete config.rejectUnauthorized + this.config = { + ...config, + typeCast: function (field: any, next: any) { + if ( + field.type == "DATETIME" || + field.type === "DATE" || + field.type === "TIMESTAMP" + ) { + return field.string() + } + return next() + }, + } } - const TimezoneAwareDateTypes = ["timestamp"] - - function bindingTypeCoerce(bindings: any[]) { - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i] - if (typeof binding !== "string") { - continue - } - const matches = binding.match(NUMBER_REGEX) - // check if number first - if (matches && matches[0] !== "" && !isNaN(Number(matches[0]))) { - bindings[i] = parseFloat(binding) - } - // if not a number, see if it is a date - important to do in this order as any - // integer will be considered a valid date - else if (/^\d/.test(binding) && dayjs(binding).isValid()) { - bindings[i] = dayjs(binding).toDate() - } - } - return bindings + getBindingIdentifier(): string { + return "?" } - class MySQLIntegration extends Sql implements DatasourcePlus { - private config: MySQLConfig - private client: any - public tables: Record = {} - public schemaErrors: Record = {} + getStringConcat(parts: string[]): string { + return `concat(${parts.join(", ")})` + } - constructor(config: MySQLConfig) { - super(SqlClient.MY_SQL) - this.config = config - if (config.ssl && Object.keys(config.ssl).length === 0) { - delete config.ssl + async connect() { + this.client = await mysql.createConnection(this.config) + } + + async disconnect() { + await this.client.end() + } + + async internalQuery( + query: SqlQuery, + opts: { connect?: boolean; disableCoercion?: boolean } = { + connect: true, + disableCoercion: false, + } + ): Promise { + try { + if (opts?.connect) { + await this.connect() } - // make sure this defaults to true - if ( - config.rejectUnauthorized != null && - !config.rejectUnauthorized && - config.ssl - ) { - config.ssl.rejectUnauthorized = config.rejectUnauthorized - } - // @ts-ignore - delete config.rejectUnauthorized - this.config = { - ...config, - typeCast: function (field: any, next: any) { - if ( - field.type == "DATETIME" || - field.type === "DATE" || - field.type === "TIMESTAMP" - ) { - return field.string() - } - return next() - }, + const baseBindings = query.bindings || [] + const bindings = opts?.disableCoercion + ? baseBindings + : bindingTypeCoerce(baseBindings) + // Node MySQL is callback based, so we must wrap our call in a promise + const response = await this.client.query(query.sql, bindings) + return response[0] + } finally { + if (opts?.connect) { + await this.disconnect() } } + } - getBindingIdentifier(): string { - return "?" - } + async buildSchema(datasourceId: string, entities: Record) { + const tables: { [key: string]: Table } = {} + const database = this.config.database + await this.connect() - getStringConcat(parts: string[]): string { - return `concat(${parts.join(", ")})` - } - - async connect() { - this.client = await mysql.createConnection(this.config) - } - - async disconnect() { - await this.client.end() - } - - async internalQuery( - query: SqlQuery, - opts: { connect?: boolean; disableCoercion?: boolean } = { - connect: true, - disableCoercion: false, - } - ): Promise { - try { - if (opts?.connect) { - await this.connect() - } - const baseBindings = query.bindings || [] - const bindings = opts?.disableCoercion - ? baseBindings - : bindingTypeCoerce(baseBindings) - // Node MySQL is callback based, so we must wrap our call in a promise - const response = await this.client.query(query.sql, bindings) - return response[0] - } finally { - if (opts?.connect) { - await this.disconnect() - } - } - } - - async buildSchema(datasourceId: string, entities: Record) { - const tables: { [key: string]: Table } = {} - const database = this.config.database - await this.connect() - - try { - // get the tables first - const tablesResp = await this.internalQuery( - { sql: "SHOW TABLES;" }, + try { + // get the tables first + const tablesResp = await this.internalQuery( + { sql: "SHOW TABLES;" }, + { connect: false } + ) + const tableNames = tablesResp.map( + (obj: any) => + obj[`Tables_in_${database}`] || + obj[`Tables_in_${database.toLowerCase()}`] + ) + for (let tableName of tableNames) { + const primaryKeys = [] + const schema: TableSchema = {} + const descResp = await this.internalQuery( + { sql: `DESCRIBE \`${tableName}\`;` }, { connect: false } ) - const tableNames = tablesResp.map( - (obj: any) => - obj[`Tables_in_${database}`] || - obj[`Tables_in_${database.toLowerCase()}`] - ) - for (let tableName of tableNames) { - const primaryKeys = [] - const schema: TableSchema = {} - const descResp = await this.internalQuery( - { sql: `DESCRIBE \`${tableName}\`;` }, - { connect: false } - ) - for (let column of descResp) { - const columnName = column.Field - if ( - column.Key === "PRI" && - primaryKeys.indexOf(column.Key) === -1 - ) { - primaryKeys.push(columnName) - } - const constraints = { - presence: column.Null !== "YES", - } - const isAuto: boolean = - typeof column.Extra === "string" && - (column.Extra === "auto_increment" || - column.Extra.toLowerCase().includes("generated")) - schema[columnName] = { - name: columnName, - autocolumn: isAuto, - constraints, - ...convertSqlType(column.Type), - externalType: column.Type, - } + for (let column of descResp) { + const columnName = column.Field + if (column.Key === "PRI" && primaryKeys.indexOf(column.Key) === -1) { + primaryKeys.push(columnName) } - if (!tables[tableName]) { - tables[tableName] = { - _id: buildExternalTableId(datasourceId, tableName), - primary: primaryKeys, - name: tableName, - schema, - } + const constraints = { + presence: column.Null !== "YES", + } + const isAuto: boolean = + typeof column.Extra === "string" && + (column.Extra === "auto_increment" || + column.Extra.toLowerCase().includes("generated")) + schema[columnName] = { + name: columnName, + autocolumn: isAuto, + constraints, + ...convertSqlType(column.Type), + externalType: column.Type, + } + } + if (!tables[tableName]) { + tables[tableName] = { + _id: buildExternalTableId(datasourceId, tableName), + primary: primaryKeys, + name: tableName, + schema, } } - } finally { - await this.disconnect() - } - const final = finaliseExternalTables(tables, entities) - this.tables = final.tables - this.schemaErrors = final.errors - } - - async create(query: SqlQuery | string) { - const results = await this.internalQuery(getSqlQuery(query)) - return results.length ? results : [{ created: true }] - } - - async read(query: SqlQuery | string) { - return this.internalQuery(getSqlQuery(query)) - } - - async update(query: SqlQuery | string) { - const results = await this.internalQuery(getSqlQuery(query)) - return results.length ? results : [{ updated: true }] - } - - async delete(query: SqlQuery | string) { - const results = await this.internalQuery(getSqlQuery(query)) - return results.length ? results : [{ deleted: true }] - } - - async query(json: QueryJson) { - await this.connect() - try { - const queryFn = (query: any) => - this.internalQuery(query, { connect: false, disableCoercion: true }) - return await this.queryWithReturning(json, queryFn) - } finally { - await this.disconnect() } + } finally { + await this.disconnect() } + const final = finaliseExternalTables(tables, entities) + this.tables = final.tables + this.schemaErrors = final.errors } - module.exports = { - schema: SCHEMA, - integration: MySQLIntegration, + async create(query: SqlQuery | string) { + const results = await this.internalQuery(getSqlQuery(query)) + return results.length ? results : [{ created: true }] + } + + async read(query: SqlQuery | string) { + return this.internalQuery(getSqlQuery(query)) + } + + async update(query: SqlQuery | string) { + const results = await this.internalQuery(getSqlQuery(query)) + return results.length ? results : [{ updated: true }] + } + + async delete(query: SqlQuery | string) { + const results = await this.internalQuery(getSqlQuery(query)) + return results.length ? results : [{ deleted: true }] + } + + async query(json: QueryJson) { + await this.connect() + try { + const queryFn = (query: any) => + this.internalQuery(query, { connect: false, disableCoercion: true }) + return await this.queryWithReturning(json, queryFn) + } finally { + await this.disconnect() + } } } + +export default { + schema: SCHEMA, + integration: MySQLIntegration, +} diff --git a/packages/server/src/integrations/oracle.ts b/packages/server/src/integrations/oracle.ts index fa8a3837b2..5f35935e12 100644 --- a/packages/server/src/integrations/oracle.ts +++ b/packages/server/src/integrations/oracle.ts @@ -25,437 +25,430 @@ import oracledb, { import Sql from "./base/sql" import { FieldTypes } from "../constants" -module OracleModule { - oracledb.outFormat = oracledb.OUT_FORMAT_OBJECT +oracledb.outFormat = oracledb.OUT_FORMAT_OBJECT - interface OracleConfig { - host: string - port: number - database: string - user: string - password: string - } +interface OracleConfig { + host: string + port: number + database: string + user: string + password: string +} - const SCHEMA: Integration = { - docs: "https://github.com/oracle/node-oracledb", - plus: true, - friendlyName: "Oracle", - type: "Relational", - description: - "Oracle Database is an object-relational database management system developed by Oracle Corporation", - datasource: { - host: { - type: DatasourceFieldType.STRING, - default: "localhost", - required: true, - }, - port: { - type: DatasourceFieldType.NUMBER, - required: true, - default: 1521, - }, - database: { - type: DatasourceFieldType.STRING, - required: true, - }, - user: { - type: DatasourceFieldType.STRING, - required: true, - }, - password: { - type: DatasourceFieldType.PASSWORD, - required: true, - }, +const SCHEMA: Integration = { + docs: "https://github.com/oracle/node-oracledb", + plus: true, + friendlyName: "Oracle", + type: "Relational", + description: + "Oracle Database is an object-relational database management system developed by Oracle Corporation", + datasource: { + host: { + type: DatasourceFieldType.STRING, + default: "localhost", + required: true, }, - query: { - create: { - type: QueryType.SQL, - }, - read: { - type: QueryType.SQL, - }, - update: { - type: QueryType.SQL, - }, - delete: { - type: QueryType.SQL, - }, + port: { + type: DatasourceFieldType.NUMBER, + required: true, + default: 1521, }, + database: { + type: DatasourceFieldType.STRING, + required: true, + }, + user: { + type: DatasourceFieldType.STRING, + required: true, + }, + password: { + type: DatasourceFieldType.PASSWORD, + required: true, + }, + }, + query: { + create: { + type: QueryType.SQL, + }, + read: { + type: QueryType.SQL, + }, + update: { + type: QueryType.SQL, + }, + delete: { + type: QueryType.SQL, + }, + }, +} + +const UNSUPPORTED_TYPES = ["BLOB", "CLOB", "NCLOB"] + +/** + * Raw query response + */ +interface ColumnsResponse { + TABLE_NAME: string + COLUMN_NAME: string + DATA_TYPE: string + DATA_DEFAULT: string | null + COLUMN_ID: number + CONSTRAINT_NAME: string | null + CONSTRAINT_TYPE: string | null + R_CONSTRAINT_NAME: string | null + SEARCH_CONDITION: string | null +} + +/** + * An oracle constraint + */ +interface OracleConstraint { + name: string + type: string + relatedConstraintName: string | null + searchCondition: string | null +} + +/** + * An oracle column and it's related constraints + */ +interface OracleColumn { + name: string + type: string + default: string | null + id: number + constraints: { [key: string]: OracleConstraint } +} + +/** + * An oracle table and it's related columns + */ +interface OracleTable { + name: string + columns: { [key: string]: OracleColumn } +} + +const OracleContraintTypes = { + PRIMARY: "P", + NOT_NULL_OR_CHECK: "C", + FOREIGN_KEY: "R", + UNIQUE: "U", +} + +class OracleIntegration extends Sql implements DatasourcePlus { + private readonly config: OracleConfig + private index: number = 1 + + public tables: Record = {} + public schemaErrors: Record = {} + + private readonly COLUMNS_SQL = ` + SELECT + tabs.table_name, + cols.column_name, + cols.data_type, + cols.data_default, + cols.column_id, + cons.constraint_name, + cons.constraint_type, + cons.r_constraint_name, + cons.search_condition + FROM + user_tables tabs + JOIN + user_tab_columns cols + ON tabs.table_name = cols.table_name + LEFT JOIN + user_cons_columns col_cons + ON cols.column_name = col_cons.column_name + AND cols.table_name = col_cons.table_name + LEFT JOIN + user_constraints cons + ON col_cons.constraint_name = cons.constraint_name + AND cons.table_name = cols.table_name + WHERE + (cons.status = 'ENABLED' + OR cons.status IS NULL) + ` + constructor(config: OracleConfig) { + super(SqlClient.ORACLE) + this.config = config } - const UNSUPPORTED_TYPES = ["BLOB", "CLOB", "NCLOB"] + getBindingIdentifier(): string { + return `:${this.index++}` + } - /** - * Raw query response - */ - interface ColumnsResponse { - TABLE_NAME: string - COLUMN_NAME: string - DATA_TYPE: string - DATA_DEFAULT: string | null - COLUMN_ID: number - CONSTRAINT_NAME: string | null - CONSTRAINT_TYPE: string | null - R_CONSTRAINT_NAME: string | null - SEARCH_CONDITION: string | null + getStringConcat(parts: string[]): string { + return parts.join(" || ") } /** - * An oracle constraint + * Map the flat tabular columns and constraints data into a nested object */ - interface OracleConstraint { - name: string - type: string - relatedConstraintName: string | null - searchCondition: string | null - } + private mapColumns(result: Result): { + [key: string]: OracleTable + } { + const oracleTables: { [key: string]: OracleTable } = {} - /** - * An oracle column and it's related constraints - */ - interface OracleColumn { - name: string - type: string - default: string | null - id: number - constraints: { [key: string]: OracleConstraint } - } + if (result.rows) { + result.rows.forEach(row => { + const tableName = row.TABLE_NAME + const columnName = row.COLUMN_NAME + const dataType = row.DATA_TYPE + const dataDefault = row.DATA_DEFAULT + const columnId = row.COLUMN_ID + const constraintName = row.CONSTRAINT_NAME + const constraintType = row.CONSTRAINT_TYPE + const relatedConstraintName = row.R_CONSTRAINT_NAME + const searchCondition = row.SEARCH_CONDITION - /** - * An oracle table and it's related columns - */ - interface OracleTable { - name: string - columns: { [key: string]: OracleColumn } - } - - const OracleContraintTypes = { - PRIMARY: "P", - NOT_NULL_OR_CHECK: "C", - FOREIGN_KEY: "R", - UNIQUE: "U", - } - - class OracleIntegration extends Sql implements DatasourcePlus { - private readonly config: OracleConfig - private index: number = 1 - - public tables: Record = {} - public schemaErrors: Record = {} - - private readonly COLUMNS_SQL = ` - SELECT - tabs.table_name, - cols.column_name, - cols.data_type, - cols.data_default, - cols.column_id, - cons.constraint_name, - cons.constraint_type, - cons.r_constraint_name, - cons.search_condition - FROM - user_tables tabs - JOIN - user_tab_columns cols - ON tabs.table_name = cols.table_name - LEFT JOIN - user_cons_columns col_cons - ON cols.column_name = col_cons.column_name - AND cols.table_name = col_cons.table_name - LEFT JOIN - user_constraints cons - ON col_cons.constraint_name = cons.constraint_name - AND cons.table_name = cols.table_name - WHERE - (cons.status = 'ENABLED' - OR cons.status IS NULL) - ` - constructor(config: OracleConfig) { - super(SqlClient.ORACLE) - this.config = config - } - - getBindingIdentifier(): string { - return `:${this.index++}` - } - - getStringConcat(parts: string[]): string { - return parts.join(" || ") - } - - /** - * Map the flat tabular columns and constraints data into a nested object - */ - private mapColumns(result: Result): { - [key: string]: OracleTable - } { - const oracleTables: { [key: string]: OracleTable } = {} - - if (result.rows) { - result.rows.forEach(row => { - const tableName = row.TABLE_NAME - const columnName = row.COLUMN_NAME - const dataType = row.DATA_TYPE - const dataDefault = row.DATA_DEFAULT - const columnId = row.COLUMN_ID - const constraintName = row.CONSTRAINT_NAME - const constraintType = row.CONSTRAINT_TYPE - const relatedConstraintName = row.R_CONSTRAINT_NAME - const searchCondition = row.SEARCH_CONDITION - - let table = oracleTables[tableName] - if (!table) { - table = { - name: tableName, - columns: {}, - } - oracleTables[tableName] = table - } - - let column = table.columns[columnName] - if (!column) { - column = { - name: columnName, - type: dataType, - default: dataDefault, - id: columnId, - constraints: {}, - } - table.columns[columnName] = column - } - - if (constraintName && constraintType) { - let constraint = column.constraints[constraintName] - if (!constraint) { - constraint = { - name: constraintName, - type: constraintType, - relatedConstraintName: relatedConstraintName, - searchCondition: searchCondition, - } - } - column.constraints[constraintName] = constraint - } - }) - } - - return oracleTables - } - - private static isSupportedColumn(column: OracleColumn) { - return !UNSUPPORTED_TYPES.includes(column.type) - } - - private static isAutoColumn(column: OracleColumn) { - return !!( - column.default && column.default.toLowerCase().includes("nextval") - ) - } - - /** - * No native boolean in oracle. Best we can do is to check if a manual 1 or 0 number constraint has been set up - * This matches the default behaviour for generating DDL used in knex. - */ - private isBooleanType(column: OracleColumn): boolean { - return ( - column.type.toLowerCase() === "number" && - Object.values(column.constraints).filter(c => { - if ( - c.type === OracleContraintTypes.NOT_NULL_OR_CHECK && - c.searchCondition - ) { - const condition = c.searchCondition - .replace(/\s/g, "") // remove spaces - .replace(/[']+/g, "") // remove quotes - if ( - condition.includes("in(0,1)") || - condition.includes("in(1,0)") - ) { - return true - } - } - return false - }).length > 0 - ) - } - - private internalConvertType(column: OracleColumn): { type: string } { - if (this.isBooleanType(column)) { - return { type: FieldTypes.BOOLEAN } - } - - return convertSqlType(column.type) - } - - /** - * Fetches the tables from the oracle table and assigns them to the datasource. - * @param {*} datasourceId - datasourceId to fetch - * @param entities - the tables that are to be built - */ - async buildSchema(datasourceId: string, entities: Record) { - const columnsResponse = await this.internalQuery({ - sql: this.COLUMNS_SQL, - }) - const oracleTables = this.mapColumns(columnsResponse) - - const tables: { [key: string]: Table } = {} - - // iterate each table - Object.values(oracleTables).forEach(oracleTable => { - let table = tables[oracleTable.name] + let table = oracleTables[tableName] if (!table) { table = { - _id: buildExternalTableId(datasourceId, oracleTable.name), - primary: [], - name: oracleTable.name, - schema: {}, + name: tableName, + columns: {}, } - tables[oracleTable.name] = table + oracleTables[tableName] = table } - // iterate each column on the table - Object.values(oracleTable.columns) - // remove columns that we can't read / save - .filter(oracleColumn => - OracleIntegration.isSupportedColumn(oracleColumn) - ) - // match the order of the columns in the db - .sort((c1, c2) => c1.id - c2.id) - .forEach(oracleColumn => { - const columnName = oracleColumn.name - let fieldSchema = table.schema[columnName] - if (!fieldSchema) { - fieldSchema = { - autocolumn: OracleIntegration.isAutoColumn(oracleColumn), - name: columnName, - ...this.internalConvertType(oracleColumn), - } - table.schema[columnName] = fieldSchema + let column = table.columns[columnName] + if (!column) { + column = { + name: columnName, + type: dataType, + default: dataDefault, + id: columnId, + constraints: {}, + } + table.columns[columnName] = column + } + + if (constraintName && constraintType) { + let constraint = column.constraints[constraintName] + if (!constraint) { + constraint = { + name: constraintName, + type: constraintType, + relatedConstraintName: relatedConstraintName, + searchCondition: searchCondition, } - - // iterate each constraint on the column - Object.values(oracleColumn.constraints).forEach( - oracleConstraint => { - if (oracleConstraint.type === OracleContraintTypes.PRIMARY) { - table.primary!.push(columnName) - } - } - ) - }) + } + column.constraints[constraintName] = constraint + } }) - - const final = finaliseExternalTables(tables, entities) - this.tables = final.tables - this.schemaErrors = final.errors } - private async internalQuery(query: SqlQuery): Promise> { - let connection - try { - this.index = 1 - connection = await this.getConnection() + return oracleTables + } - const options: ExecuteOptions = { autoCommit: true } - const bindings: BindParameters = query.bindings || [] + private static isSupportedColumn(column: OracleColumn) { + return !UNSUPPORTED_TYPES.includes(column.type) + } - return await connection.execute(query.sql, bindings, options) - } finally { - if (connection) { - try { - await connection.close() - } catch (err) { - console.error(err) + private static isAutoColumn(column: OracleColumn) { + return !!( + column.default && column.default.toLowerCase().includes("nextval") + ) + } + + /** + * No native boolean in oracle. Best we can do is to check if a manual 1 or 0 number constraint has been set up + * This matches the default behaviour for generating DDL used in knex. + */ + private isBooleanType(column: OracleColumn): boolean { + return ( + column.type.toLowerCase() === "number" && + Object.values(column.constraints).filter(c => { + if ( + c.type === OracleContraintTypes.NOT_NULL_OR_CHECK && + c.searchCondition + ) { + const condition = c.searchCondition + .replace(/\s/g, "") // remove spaces + .replace(/[']+/g, "") // remove quotes + if (condition.includes("in(0,1)") || condition.includes("in(1,0)")) { + return true } } - } + return false + }).length > 0 + ) + } + + private internalConvertType(column: OracleColumn): { type: string } { + if (this.isBooleanType(column)) { + return { type: FieldTypes.BOOLEAN } } - private getConnection = async (): Promise => { - //connectString : "(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))(CONNECT_DATA =(SID= ORCL)))" - const connectString = `${this.config.host}:${this.config.port || 1521}/${ - this.config.database - }` - const attributes: ConnectionAttributes = { - user: this.config.user, - password: this.config.password, - connectString, - } - return oracledb.getConnection(attributes) - } + return convertSqlType(column.type) + } - async create(query: SqlQuery | string): Promise { - const response = await this.internalQuery(getSqlQuery(query)) - return response.rows && response.rows.length - ? response.rows - : [{ created: true }] - } + /** + * Fetches the tables from the oracle table and assigns them to the datasource. + * @param {*} datasourceId - datasourceId to fetch + * @param entities - the tables that are to be built + */ + async buildSchema(datasourceId: string, entities: Record) { + const columnsResponse = await this.internalQuery({ + sql: this.COLUMNS_SQL, + }) + const oracleTables = this.mapColumns(columnsResponse) - async read(query: SqlQuery | string): Promise { - const response = await this.internalQuery(getSqlQuery(query)) - return response.rows ? response.rows : [] - } + const tables: { [key: string]: Table } = {} - async update(query: SqlQuery | string): Promise { - const response = await this.internalQuery(getSqlQuery(query)) - return response.rows && response.rows.length - ? response.rows - : [{ updated: true }] - } - - async delete(query: SqlQuery | string): Promise { - const response = await this.internalQuery(getSqlQuery(query)) - return response.rows && response.rows.length - ? response.rows - : [{ deleted: true }] - } - - async query(json: QueryJson) { - const operation = this._operation(json) - const input = this._query(json, { disableReturning: true }) - if (Array.isArray(input)) { - const responses = [] - for (let query of input) { - responses.push(await this.internalQuery(query)) - } - return responses - } else { - // read the row to be deleted up front for the return - let deletedRows - if (operation === Operation.DELETE) { - const queryFn = (query: any) => this.internalQuery(query) - deletedRows = await this.getReturningRow(queryFn, json) + // iterate each table + Object.values(oracleTables).forEach(oracleTable => { + let table = tables[oracleTable.name] + if (!table) { + table = { + _id: buildExternalTableId(datasourceId, oracleTable.name), + primary: [], + name: oracleTable.name, + schema: {}, } + tables[oracleTable.name] = table + } - // run the query - const response = await this.internalQuery(input) - - // get the results or return the created / updated / deleted row - if (deletedRows?.rows?.length) { - return deletedRows.rows - } else if (response.rows?.length) { - return response.rows - } else { - // get the last row that was updated - if ( - response.lastRowid && - json.endpoint?.entityId && - operation !== Operation.DELETE - ) { - const lastRow = await this.internalQuery({ - sql: `SELECT * FROM \"${json.endpoint.entityId}\" WHERE ROWID = '${response.lastRowid}'`, - }) - return lastRow.rows - } else { - return [{ [operation.toLowerCase()]: true }] + // iterate each column on the table + Object.values(oracleTable.columns) + // remove columns that we can't read / save + .filter(oracleColumn => + OracleIntegration.isSupportedColumn(oracleColumn) + ) + // match the order of the columns in the db + .sort((c1, c2) => c1.id - c2.id) + .forEach(oracleColumn => { + const columnName = oracleColumn.name + let fieldSchema = table.schema[columnName] + if (!fieldSchema) { + fieldSchema = { + autocolumn: OracleIntegration.isAutoColumn(oracleColumn), + name: columnName, + ...this.internalConvertType(oracleColumn), + } + table.schema[columnName] = fieldSchema } + + // iterate each constraint on the column + Object.values(oracleColumn.constraints).forEach(oracleConstraint => { + if (oracleConstraint.type === OracleContraintTypes.PRIMARY) { + table.primary!.push(columnName) + } + }) + }) + }) + + const final = finaliseExternalTables(tables, entities) + this.tables = final.tables + this.schemaErrors = final.errors + } + + private async internalQuery(query: SqlQuery): Promise> { + let connection + try { + this.index = 1 + connection = await this.getConnection() + + const options: ExecuteOptions = { autoCommit: true } + const bindings: BindParameters = query.bindings || [] + + return await connection.execute(query.sql, bindings, options) + } finally { + if (connection) { + try { + await connection.close() + } catch (err) { + console.error(err) } } } } - module.exports = { - schema: SCHEMA, - integration: OracleIntegration, + private getConnection = async (): Promise => { + //connectString : "(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))(CONNECT_DATA =(SID= ORCL)))" + const connectString = `${this.config.host}:${this.config.port || 1521}/${ + this.config.database + }` + const attributes: ConnectionAttributes = { + user: this.config.user, + password: this.config.password, + connectString, + } + return oracledb.getConnection(attributes) + } + + async create(query: SqlQuery | string): Promise { + const response = await this.internalQuery(getSqlQuery(query)) + return response.rows && response.rows.length + ? response.rows + : [{ created: true }] + } + + async read(query: SqlQuery | string): Promise { + const response = await this.internalQuery(getSqlQuery(query)) + return response.rows ? response.rows : [] + } + + async update(query: SqlQuery | string): Promise { + const response = await this.internalQuery(getSqlQuery(query)) + return response.rows && response.rows.length + ? response.rows + : [{ updated: true }] + } + + async delete(query: SqlQuery | string): Promise { + const response = await this.internalQuery(getSqlQuery(query)) + return response.rows && response.rows.length + ? response.rows + : [{ deleted: true }] + } + + async query(json: QueryJson) { + const operation = this._operation(json) + const input = this._query(json, { disableReturning: true }) + if (Array.isArray(input)) { + const responses = [] + for (let query of input) { + responses.push(await this.internalQuery(query)) + } + return responses + } else { + // read the row to be deleted up front for the return + let deletedRows + if (operation === Operation.DELETE) { + const queryFn = (query: any) => this.internalQuery(query) + deletedRows = await this.getReturningRow(queryFn, json) + } + + // run the query + const response = await this.internalQuery(input) + + // get the results or return the created / updated / deleted row + if (deletedRows?.rows?.length) { + return deletedRows.rows + } else if (response.rows?.length) { + return response.rows + } else { + // get the last row that was updated + if ( + response.lastRowid && + json.endpoint?.entityId && + operation !== Operation.DELETE + ) { + const lastRow = await this.internalQuery({ + sql: `SELECT * FROM \"${json.endpoint.entityId}\" WHERE ROWID = '${response.lastRowid}'`, + }) + return lastRow.rows + } else { + return [{ [operation.toLowerCase()]: true }] + } + } + } } } + +export default { + schema: SCHEMA, + integration: OracleIntegration, +} diff --git a/packages/server/src/integrations/postgres.ts b/packages/server/src/integrations/postgres.ts index 316311e193..da1124f421 100644 --- a/packages/server/src/integrations/postgres.ts +++ b/packages/server/src/integrations/postgres.ts @@ -16,317 +16,313 @@ import { } from "./utils" import Sql from "./base/sql" -module PostgresModule { - const { Client, types } = require("pg") - const { escapeDangerousCharacters } = require("../utilities") +const { Client, types } = require("pg") +const { escapeDangerousCharacters } = require("../utilities") - // Return "date" and "timestamp" types as plain strings. - // This lets us reference the original stored timezone. - // types is undefined when running in a test env for some reason. - if (types) { - types.setTypeParser(1114, (val: any) => val) // timestamp - types.setTypeParser(1082, (val: any) => val) // date - types.setTypeParser(1184, (val: any) => val) // timestampz - } +// Return "date" and "timestamp" types as plain strings. +// This lets us reference the original stored timezone. +// types is undefined when running in a test env for some reason. +if (types) { + types.setTypeParser(1114, (val: any) => val) // timestamp + types.setTypeParser(1082, (val: any) => val) // date + types.setTypeParser(1184, (val: any) => val) // timestampz +} - const JSON_REGEX = /'{.*}'::json/s +const JSON_REGEX = /'{.*}'::json/s - interface PostgresConfig { - host: string - port: number - database: string - user: string - password: string - schema: string - ssl?: boolean - ca?: string - rejectUnauthorized?: boolean - } +interface PostgresConfig { + host: string + port: number + database: string + user: string + password: string + schema: string + ssl?: boolean + ca?: string + rejectUnauthorized?: boolean +} - const SCHEMA: Integration = { - docs: "https://node-postgres.com", - plus: true, - friendlyName: "PostgreSQL", - type: "Relational", - description: - "PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance.", - datasource: { - host: { - type: DatasourceFieldType.STRING, - default: "localhost", - required: true, - }, - port: { - type: DatasourceFieldType.NUMBER, - required: true, - default: 5432, - }, - database: { - type: DatasourceFieldType.STRING, - default: "postgres", - required: true, - }, - user: { - type: DatasourceFieldType.STRING, - default: "root", - required: true, - }, - password: { - type: DatasourceFieldType.PASSWORD, - default: "root", - required: true, - }, - schema: { - type: DatasourceFieldType.STRING, - default: "public", - required: true, - }, - ssl: { - type: DatasourceFieldType.BOOLEAN, - default: false, - required: false, - }, - rejectUnauthorized: { - type: DatasourceFieldType.BOOLEAN, - default: false, - required: false, - }, - ca: { - type: DatasourceFieldType.LONGFORM, - default: false, - required: false, - }, +const SCHEMA: Integration = { + docs: "https://node-postgres.com", + plus: true, + friendlyName: "PostgreSQL", + type: "Relational", + description: + "PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance.", + datasource: { + host: { + type: DatasourceFieldType.STRING, + default: "localhost", + required: true, }, - query: { - create: { - type: QueryType.SQL, - }, - read: { - type: QueryType.SQL, - }, - update: { - type: QueryType.SQL, - }, - delete: { - type: QueryType.SQL, - }, + port: { + type: DatasourceFieldType.NUMBER, + required: true, + default: 5432, }, - } + database: { + type: DatasourceFieldType.STRING, + default: "postgres", + required: true, + }, + user: { + type: DatasourceFieldType.STRING, + default: "root", + required: true, + }, + password: { + type: DatasourceFieldType.PASSWORD, + default: "root", + required: true, + }, + schema: { + type: DatasourceFieldType.STRING, + default: "public", + required: true, + }, + ssl: { + type: DatasourceFieldType.BOOLEAN, + default: false, + required: false, + }, + rejectUnauthorized: { + type: DatasourceFieldType.BOOLEAN, + default: false, + required: false, + }, + ca: { + type: DatasourceFieldType.LONGFORM, + default: false, + required: false, + }, + }, + query: { + create: { + type: QueryType.SQL, + }, + read: { + type: QueryType.SQL, + }, + update: { + type: QueryType.SQL, + }, + delete: { + type: QueryType.SQL, + }, + }, +} - class PostgresIntegration extends Sql implements DatasourcePlus { - private readonly client: any - private readonly config: PostgresConfig - private index: number = 1 - private open: boolean - public tables: Record = {} - public schemaErrors: Record = {} +class PostgresIntegration extends Sql implements DatasourcePlus { + private readonly client: any + private readonly config: PostgresConfig + private index: number = 1 + private open: boolean + public tables: Record = {} + public schemaErrors: Record = {} - COLUMNS_SQL!: string + COLUMNS_SQL!: string - PRIMARY_KEYS_SQL = ` - select tc.table_schema, tc.table_name, kc.column_name as primary_key - from information_schema.table_constraints tc - join - information_schema.key_column_usage kc on kc.table_name = tc.table_name - and kc.table_schema = tc.table_schema - and kc.constraint_name = tc.constraint_name - where tc.constraint_type = 'PRIMARY KEY'; - ` + PRIMARY_KEYS_SQL = ` + select tc.table_schema, tc.table_name, kc.column_name as primary_key + from information_schema.table_constraints tc + join + information_schema.key_column_usage kc on kc.table_name = tc.table_name + and kc.table_schema = tc.table_schema + and kc.constraint_name = tc.constraint_name + where tc.constraint_type = 'PRIMARY KEY'; + ` - constructor(config: PostgresConfig) { - super(SqlClient.POSTGRES) - this.config = config + constructor(config: PostgresConfig) { + super(SqlClient.POSTGRES) + this.config = config - let newConfig = { - ...this.config, - ssl: this.config.ssl - ? { - rejectUnauthorized: this.config.rejectUnauthorized, - ca: this.config.ca, - } - : undefined, - } - this.client = new Client(newConfig) - this.open = false - } - - getBindingIdentifier(): string { - return `$${this.index++}` - } - - getStringConcat(parts: string[]): string { - return parts.join(" || ") - } - - async openConnection() { - await this.client.connect() - if (!this.config.schema) { - this.config.schema = "public" - } - this.client.query(`SET search_path TO ${this.config.schema}`) - this.COLUMNS_SQL = `select * from information_schema.columns where table_schema = '${this.config.schema}'` - this.open = true - } - - closeConnection() { - const pg = this - return new Promise((resolve, reject) => { - this.client.end((err: any) => { - pg.open = false - if (err) { - reject(err) - } else { - resolve() + let newConfig = { + ...this.config, + ssl: this.config.ssl + ? { + rejectUnauthorized: this.config.rejectUnauthorized, + ca: this.config.ca, } - }) + : undefined, + } + this.client = new Client(newConfig) + this.open = false + } + + getBindingIdentifier(): string { + return `$${this.index++}` + } + + getStringConcat(parts: string[]): string { + return parts.join(" || ") + } + + async openConnection() { + await this.client.connect() + if (!this.config.schema) { + this.config.schema = "public" + } + this.client.query(`SET search_path TO ${this.config.schema}`) + this.COLUMNS_SQL = `select * from information_schema.columns where table_schema = '${this.config.schema}'` + this.open = true + } + + closeConnection() { + const pg = this + return new Promise((resolve, reject) => { + this.client.end((err: any) => { + pg.open = false + if (err) { + reject(err) + } else { + resolve() + } }) - } + }) + } - async internalQuery(query: SqlQuery, close: boolean = true) { - if (!this.open) { - await this.openConnection() - } - const client = this.client - this.index = 1 - // need to handle a specific issue with json data types in postgres, - // new lines inside the JSON data will break it - if (query && query.sql) { - const matches = query.sql.match(JSON_REGEX) - if (matches && matches.length > 0) { - for (let match of matches) { - const escaped = escapeDangerousCharacters(match) - query.sql = query.sql.replace(match, escaped) - } - } - } - try { - return await client.query(query.sql, query.bindings || []) - } catch (err) { - await this.closeConnection() - // @ts-ignore - throw new Error(err) - } finally { - if (close) { - await this.closeConnection() - } - } - } - - /** - * Fetches the tables from the postgres table and assigns them to the datasource. - * @param {*} datasourceId - datasourceId to fetch - * @param entities - the tables that are to be built - */ - async buildSchema(datasourceId: string, entities: Record) { - let tableKeys: { [key: string]: string[] } = {} + async internalQuery(query: SqlQuery, close: boolean = true) { + if (!this.open) { await this.openConnection() - try { - const primaryKeysResponse = await this.client.query( - this.PRIMARY_KEYS_SQL - ) - for (let table of primaryKeysResponse.rows) { - const tableName = table.table_name - if (!tableKeys[tableName]) { - tableKeys[tableName] = [] - } - const key = table.column_name || table.primary_key - // only add the unique keys - if (key && tableKeys[tableName].indexOf(key) === -1) { - tableKeys[tableName].push(key) - } + } + const client = this.client + this.index = 1 + // need to handle a specific issue with json data types in postgres, + // new lines inside the JSON data will break it + if (query && query.sql) { + const matches = query.sql.match(JSON_REGEX) + if (matches && matches.length > 0) { + for (let match of matches) { + const escaped = escapeDangerousCharacters(match) + query.sql = query.sql.replace(match, escaped) } - } catch (err) { - tableKeys = {} - } - - try { - const columnsResponse = await this.client.query(this.COLUMNS_SQL) - - const tables: { [key: string]: Table } = {} - - for (let column of columnsResponse.rows) { - const tableName: string = column.table_name - const columnName: string = column.column_name - - // table key doesn't exist yet - if (!tables[tableName] || !tables[tableName].schema) { - tables[tableName] = { - _id: buildExternalTableId(datasourceId, tableName), - primary: tableKeys[tableName] || [], - name: tableName, - schema: {}, - } - } - - const identity = !!( - column.identity_generation || - column.identity_start || - column.identity_increment - ) - const hasDefault = - typeof column.column_default === "string" && - column.column_default.startsWith("nextval") - const isGenerated = - column.is_generated && column.is_generated !== "NEVER" - const isAuto: boolean = hasDefault || identity || isGenerated - tables[tableName].schema[columnName] = { - autocolumn: isAuto, - name: columnName, - ...convertSqlType(column.data_type), - externalType: column.data_type, - } - } - - const final = finaliseExternalTables(tables, entities) - this.tables = final.tables - this.schemaErrors = final.errors - } catch (err) { - // @ts-ignore - throw new Error(err) - } finally { - await this.closeConnection() } } - - async create(query: SqlQuery | string) { - const response = await this.internalQuery(getSqlQuery(query)) - return response.rows.length ? response.rows : [{ created: true }] - } - - async read(query: SqlQuery | string) { - const response = await this.internalQuery(getSqlQuery(query)) - return response.rows - } - - async update(query: SqlQuery | string) { - const response = await this.internalQuery(getSqlQuery(query)) - return response.rows.length ? response.rows : [{ updated: true }] - } - - async delete(query: SqlQuery | string) { - const response = await this.internalQuery(getSqlQuery(query)) - return response.rows.length ? response.rows : [{ deleted: true }] - } - - async query(json: QueryJson) { - const operation = this._operation(json).toLowerCase() - const input = this._query(json) - if (Array.isArray(input)) { - const responses = [] - for (let query of input) { - responses.push(await this.internalQuery(query, false)) - } + try { + return await client.query(query.sql, query.bindings || []) + } catch (err) { + await this.closeConnection() + // @ts-ignore + throw new Error(err) + } finally { + if (close) { await this.closeConnection() - return responses - } else { - const response = await this.internalQuery(input) - return response.rows.length ? response.rows : [{ [operation]: true }] } } } - module.exports = { - schema: SCHEMA, - integration: PostgresIntegration, + /** + * Fetches the tables from the postgres table and assigns them to the datasource. + * @param {*} datasourceId - datasourceId to fetch + * @param entities - the tables that are to be built + */ + async buildSchema(datasourceId: string, entities: Record) { + let tableKeys: { [key: string]: string[] } = {} + await this.openConnection() + try { + const primaryKeysResponse = await this.client.query(this.PRIMARY_KEYS_SQL) + for (let table of primaryKeysResponse.rows) { + const tableName = table.table_name + if (!tableKeys[tableName]) { + tableKeys[tableName] = [] + } + const key = table.column_name || table.primary_key + // only add the unique keys + if (key && tableKeys[tableName].indexOf(key) === -1) { + tableKeys[tableName].push(key) + } + } + } catch (err) { + tableKeys = {} + } + + try { + const columnsResponse = await this.client.query(this.COLUMNS_SQL) + + const tables: { [key: string]: Table } = {} + + for (let column of columnsResponse.rows) { + const tableName: string = column.table_name + const columnName: string = column.column_name + + // table key doesn't exist yet + if (!tables[tableName] || !tables[tableName].schema) { + tables[tableName] = { + _id: buildExternalTableId(datasourceId, tableName), + primary: tableKeys[tableName] || [], + name: tableName, + schema: {}, + } + } + + const identity = !!( + column.identity_generation || + column.identity_start || + column.identity_increment + ) + const hasDefault = + typeof column.column_default === "string" && + column.column_default.startsWith("nextval") + const isGenerated = + column.is_generated && column.is_generated !== "NEVER" + const isAuto: boolean = hasDefault || identity || isGenerated + tables[tableName].schema[columnName] = { + autocolumn: isAuto, + name: columnName, + ...convertSqlType(column.data_type), + externalType: column.data_type, + } + } + + const final = finaliseExternalTables(tables, entities) + this.tables = final.tables + this.schemaErrors = final.errors + } catch (err) { + // @ts-ignore + throw new Error(err) + } finally { + await this.closeConnection() + } + } + + async create(query: SqlQuery | string) { + const response = await this.internalQuery(getSqlQuery(query)) + return response.rows.length ? response.rows : [{ created: true }] + } + + async read(query: SqlQuery | string) { + const response = await this.internalQuery(getSqlQuery(query)) + return response.rows + } + + async update(query: SqlQuery | string) { + const response = await this.internalQuery(getSqlQuery(query)) + return response.rows.length ? response.rows : [{ updated: true }] + } + + async delete(query: SqlQuery | string) { + const response = await this.internalQuery(getSqlQuery(query)) + return response.rows.length ? response.rows : [{ deleted: true }] + } + + async query(json: QueryJson) { + const operation = this._operation(json).toLowerCase() + const input = this._query(json) + if (Array.isArray(input)) { + const responses = [] + for (let query of input) { + responses.push(await this.internalQuery(query, false)) + } + await this.closeConnection() + return responses + } else { + const response = await this.internalQuery(input) + return response.rows.length ? response.rows : [{ [operation]: true }] + } } } + +export default { + schema: SCHEMA, + integration: PostgresIntegration, +} diff --git a/packages/server/src/integrations/redis.ts b/packages/server/src/integrations/redis.ts index e8aa13560c..ebf7d2a82a 100644 --- a/packages/server/src/integrations/redis.ts +++ b/packages/server/src/integrations/redis.ts @@ -1,149 +1,147 @@ import { DatasourceFieldType, Integration, QueryType } from "@budibase/types" import Redis from "ioredis" -module RedisModule { - interface RedisConfig { - host: string - port: number - username: string - password?: string - } +interface RedisConfig { + host: string + port: number + username: string + password?: string +} - const SCHEMA: Integration = { - docs: "https://redis.io/docs/", - description: "", - friendlyName: "Redis", - type: "Non-relational", - datasource: { - host: { - type: "string", - required: true, - default: "localhost", - }, - port: { - type: "number", - required: true, - default: 6379, - }, - username: { - type: "string", - required: false, - }, - password: { - type: "password", - required: false, +const SCHEMA: Integration = { + docs: "https://redis.io/docs/", + description: "", + friendlyName: "Redis", + type: "Non-relational", + datasource: { + host: { + type: "string", + required: true, + default: "localhost", + }, + port: { + type: "number", + required: true, + default: 6379, + }, + username: { + type: "string", + required: false, + }, + password: { + type: "password", + required: false, + }, + }, + query: { + create: { + type: QueryType.FIELDS, + fields: { + key: { + type: DatasourceFieldType.STRING, + required: true, + }, + value: { + type: DatasourceFieldType.STRING, + required: true, + }, + ttl: { + type: DatasourceFieldType.NUMBER, + }, }, }, - query: { - create: { - type: QueryType.FIELDS, - fields: { - key: { - type: DatasourceFieldType.STRING, - required: true, - }, - value: { - type: DatasourceFieldType.STRING, - required: true, - }, - ttl: { - type: DatasourceFieldType.NUMBER, - }, + read: { + readable: true, + type: QueryType.FIELDS, + fields: { + key: { + type: DatasourceFieldType.STRING, + required: true, }, }, - read: { - readable: true, - type: QueryType.FIELDS, - fields: { - key: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - }, - delete: { - type: QueryType.FIELDS, - fields: { - key: { - type: DatasourceFieldType.STRING, - required: true, - }, - }, - }, - command: { - readable: true, - displayName: "Redis Command", - type: QueryType.JSON, - }, }, + delete: { + type: QueryType.FIELDS, + fields: { + key: { + type: DatasourceFieldType.STRING, + required: true, + }, + }, + }, + command: { + readable: true, + displayName: "Redis Command", + type: QueryType.JSON, + }, + }, +} + +class RedisIntegration { + private readonly config: RedisConfig + private client: any + + constructor(config: RedisConfig) { + this.config = config + this.client = new Redis({ + host: this.config.host, + port: this.config.port, + username: this.config.username, + password: this.config.password, + }) } - class RedisIntegration { - private readonly config: RedisConfig - private client: any + async disconnect() { + this.client.disconnect() + } - constructor(config: RedisConfig) { - this.config = config - this.client = new Redis({ - host: this.config.host, - port: this.config.port, - username: this.config.username, - password: this.config.password, - }) + async redisContext(query: Function) { + try { + return await query() + } catch (err) { + throw new Error(`Redis error: ${err}`) + } finally { + this.disconnect() } + } - async disconnect() { - this.client.disconnect() - } - - async redisContext(query: Function) { - try { - return await query() - } catch (err) { - throw new Error(`Redis error: ${err}`) - } finally { - this.disconnect() + async create(query: { key: string; value: string; ttl: number }) { + return this.redisContext(async () => { + const response = await this.client.set(query.key, query.value) + if (query.ttl) { + await this.client.expire(query.key, query.ttl) } - } - - async create(query: { key: string; value: string; ttl: number }) { - return this.redisContext(async () => { - const response = await this.client.set(query.key, query.value) - if (query.ttl) { - await this.client.expire(query.key, query.ttl) - } - return response - }) - } - - async read(query: { key: string }) { - return this.redisContext(async () => { - const response = await this.client.get(query.key) - return response - }) - } - - async delete(query: { key: string }) { - return this.redisContext(async () => { - const response = await this.client.del(query.key) - return response - }) - } - - async command(query: { json: string }) { - return this.redisContext(async () => { - const commands = query.json.trim().split(" ") - const pipeline = this.client.pipeline([commands]) - const result = await pipeline.exec() - return { - response: result[0][1], - } - }) - } + return response + }) } - module.exports = { - schema: SCHEMA, - integration: RedisIntegration, + async read(query: { key: string }) { + return this.redisContext(async () => { + const response = await this.client.get(query.key) + return response + }) + } + + async delete(query: { key: string }) { + return this.redisContext(async () => { + const response = await this.client.del(query.key) + return response + }) + } + + async command(query: { json: string }) { + return this.redisContext(async () => { + const commands = query.json.trim().split(" ") + const pipeline = this.client.pipeline([commands]) + const result = await pipeline.exec() + return { + response: result[0][1], + } + }) } } + +export default { + schema: SCHEMA, + integration: RedisIntegration, +} diff --git a/packages/server/src/integrations/rest.ts b/packages/server/src/integrations/rest.ts index 284d2a921a..5126e0100e 100644 --- a/packages/server/src/integrations/rest.ts +++ b/packages/server/src/integrations/rest.ts @@ -14,6 +14,11 @@ import { BearerAuthConfig, } from "../definitions/datasource" import { get } from "lodash" +const fetch = require("node-fetch") +const { formatBytes } = require("../utilities") +const { performance } = require("perf_hooks") +const FormData = require("form-data") +const { URLSearchParams } = require("url") const BodyTypes = { NONE: "none", @@ -50,363 +55,353 @@ const coreFields = { }, } -module RestModule { - const fetch = require("node-fetch") - const { formatBytes } = require("../utilities") - const { performance } = require("perf_hooks") - const FormData = require("form-data") - const { URLSearchParams } = require("url") - const { - parseStringPromise: xmlParser, - Builder: XmlBuilder, - } = require("xml2js") +const { parseStringPromise: xmlParser, Builder: XmlBuilder } = require("xml2js") - const SCHEMA: Integration = { - docs: "https://github.com/node-fetch/node-fetch", - description: - "With the REST API datasource, you can connect, query and pull data from multiple REST APIs. You can then use the retrieved data to build apps.", - friendlyName: "REST API", - type: "API", - datasource: { - url: { - type: DatasourceFieldType.STRING, - default: "", - required: false, - deprecated: true, - }, - defaultHeaders: { - type: DatasourceFieldType.OBJECT, - required: false, - default: {}, - }, +const SCHEMA: Integration = { + docs: "https://github.com/node-fetch/node-fetch", + description: + "With the REST API datasource, you can connect, query and pull data from multiple REST APIs. You can then use the retrieved data to build apps.", + friendlyName: "REST API", + type: "API", + datasource: { + url: { + type: DatasourceFieldType.STRING, + default: "", + required: false, + deprecated: true, }, - query: { - create: { - readable: true, - displayName: "POST", - type: QueryType.FIELDS, - fields: coreFields, - }, - read: { - displayName: "GET", - readable: true, - type: QueryType.FIELDS, - fields: coreFields, - }, - update: { - displayName: "PUT", - readable: true, - type: QueryType.FIELDS, - fields: coreFields, - }, - patch: { - displayName: "PATCH", - readable: true, - type: QueryType.FIELDS, - fields: coreFields, - }, - delete: { - displayName: "DELETE", - type: QueryType.FIELDS, - fields: coreFields, - }, + defaultHeaders: { + type: DatasourceFieldType.OBJECT, + required: false, + default: {}, }, + }, + query: { + create: { + readable: true, + displayName: "POST", + type: QueryType.FIELDS, + fields: coreFields, + }, + read: { + displayName: "GET", + readable: true, + type: QueryType.FIELDS, + fields: coreFields, + }, + update: { + displayName: "PUT", + readable: true, + type: QueryType.FIELDS, + fields: coreFields, + }, + patch: { + displayName: "PATCH", + readable: true, + type: QueryType.FIELDS, + fields: coreFields, + }, + delete: { + displayName: "DELETE", + type: QueryType.FIELDS, + fields: coreFields, + }, + }, +} + +class RestIntegration implements IntegrationBase { + private config: RestConfig + private headers: { + [key: string]: string + } = {} + private startTimeMs: number = performance.now() + + constructor(config: RestConfig) { + this.config = config } - class RestIntegration implements IntegrationBase { - private config: RestConfig - private headers: { - [key: string]: string - } = {} - private startTimeMs: number = performance.now() - - constructor(config: RestConfig) { - this.config = config + async parseResponse(response: any, pagination: PaginationConfig | null) { + let data, raw, headers + const contentType = response.headers.get("content-type") || "" + try { + if (contentType.includes("application/json")) { + data = await response.json() + raw = JSON.stringify(data) + } else if ( + contentType.includes("text/xml") || + contentType.includes("application/xml") + ) { + const rawXml = await response.text() + data = + (await xmlParser(rawXml, { + explicitArray: false, + trim: true, + explicitRoot: false, + })) || {} + // there is only one structure, its an array, return the array so it appears as rows + const keys = Object.keys(data) + if (keys.length === 1 && Array.isArray(data[keys[0]])) { + data = data[keys[0]] + } + raw = rawXml + } else { + data = await response.text() + raw = data + } + } catch (err) { + throw "Failed to parse response body." + } + const size = formatBytes( + response.headers.get("content-length") || Buffer.byteLength(raw, "utf8") + ) + const time = `${Math.round(performance.now() - this.startTimeMs)}ms` + headers = response.headers.raw() + for (let [key, value] of Object.entries(headers)) { + headers[key] = Array.isArray(value) ? value[0] : value } - async parseResponse(response: any, pagination: PaginationConfig | null) { - let data, raw, headers - const contentType = response.headers.get("content-type") || "" - try { - if (contentType.includes("application/json")) { - data = await response.json() - raw = JSON.stringify(data) - } else if ( - contentType.includes("text/xml") || - contentType.includes("application/xml") - ) { - const rawXml = await response.text() - data = - (await xmlParser(rawXml, { - explicitArray: false, - trim: true, - explicitRoot: false, - })) || {} - // there is only one structure, its an array, return the array so it appears as rows - const keys = Object.keys(data) - if (keys.length === 1 && Array.isArray(data[keys[0]])) { - data = data[keys[0]] - } - raw = rawXml - } else { - data = await response.text() - raw = data - } - } catch (err) { - throw "Failed to parse response body." - } - const size = formatBytes( - response.headers.get("content-length") || Buffer.byteLength(raw, "utf8") - ) - const time = `${Math.round(performance.now() - this.startTimeMs)}ms` - headers = response.headers.raw() - for (let [key, value] of Object.entries(headers)) { - headers[key] = Array.isArray(value) ? value[0] : value + // Check if a pagination cursor exists in the response + let nextCursor = null + if (pagination?.responseParam) { + nextCursor = get(data, pagination.responseParam) + } + + return { + data, + info: { + code: response.status, + size, + time, + }, + extra: { + raw, + headers, + }, + pagination: { + cursor: nextCursor, + }, + } + } + + getUrl( + path: string, + queryString: string, + pagination: PaginationConfig | null, + paginationValues: PaginationValues | null + ): string { + // Add pagination params to query string if required + if (pagination?.location === "query" && paginationValues) { + const { pageParam, sizeParam } = pagination + const params = new URLSearchParams() + + // Append page number or cursor param if configured + if (pageParam && paginationValues.page != null) { + params.append(pageParam, paginationValues.page) } - // Check if a pagination cursor exists in the response - let nextCursor = null - if (pagination?.responseParam) { - nextCursor = get(data, pagination.responseParam) + // Append page size param if configured + if (sizeParam && paginationValues.limit != null) { + params.append(sizeParam, paginationValues.limit) } - return { - data, - info: { - code: response.status, - size, - time, - }, - extra: { - raw, - headers, - }, - pagination: { - cursor: nextCursor, - }, + // Prepend query string with pagination params + let paginationString = params.toString() + if (paginationString) { + queryString = `${paginationString}&${queryString}` } } - getUrl( - path: string, - queryString: string, - pagination: PaginationConfig | null, - paginationValues: PaginationValues | null - ): string { - // Add pagination params to query string if required - if (pagination?.location === "query" && paginationValues) { - const { pageParam, sizeParam } = pagination - const params = new URLSearchParams() - - // Append page number or cursor param if configured - if (pageParam && paginationValues.page != null) { - params.append(pageParam, paginationValues.page) - } - - // Append page size param if configured - if (sizeParam && paginationValues.limit != null) { - params.append(sizeParam, paginationValues.limit) - } - - // Prepend query string with pagination params - let paginationString = params.toString() - if (paginationString) { - queryString = `${paginationString}&${queryString}` - } - } - - const main = `${path}?${queryString}` - let complete = main - if (this.config.url && !main.startsWith("http")) { - complete = !this.config.url ? main : `${this.config.url}/${main}` - } - if (!complete.startsWith("http")) { - complete = `http://${complete}` - } - return complete + const main = `${path}?${queryString}` + let complete = main + if (this.config.url && !main.startsWith("http")) { + complete = !this.config.url ? main : `${this.config.url}/${main}` } + if (!complete.startsWith("http")) { + complete = `http://${complete}` + } + return complete + } - addBody( - bodyType: string, - body: string | any, - input: any, - pagination: PaginationConfig | null, - paginationValues: PaginationValues | null - ) { - if (!input.headers) { - input.headers = {} - } - if (bodyType === BodyTypes.NONE) { - return input - } - let error, - object: any = {}, - string = "" - try { - if (body) { - string = typeof body !== "string" ? JSON.stringify(body) : body - object = typeof body === "object" ? body : JSON.parse(body) - } - } catch (err) { - error = err - } - - // Util to add pagination values to a certain body type - const addPaginationToBody = (insertFn: Function) => { - if (pagination?.location === "body") { - if (pagination?.pageParam && paginationValues?.page != null) { - insertFn(pagination.pageParam, paginationValues.page) - } - if (pagination?.sizeParam && paginationValues?.limit != null) { - insertFn(pagination.sizeParam, paginationValues.limit) - } - } - } - - switch (bodyType) { - case BodyTypes.TEXT: - // content type defaults to plaintext - input.body = string - break - case BodyTypes.ENCODED: - const params = new URLSearchParams() - for (let [key, value] of Object.entries(object)) { - params.append(key, value) - } - addPaginationToBody((key: string, value: any) => { - params.append(key, value) - }) - input.body = params - break - case BodyTypes.FORM_DATA: - const form = new FormData() - for (let [key, value] of Object.entries(object)) { - form.append(key, value) - } - addPaginationToBody((key: string, value: any) => { - form.append(key, value) - }) - input.body = form - break - case BodyTypes.XML: - if (object != null && Object.keys(object).length) { - string = new XmlBuilder().buildObject(object) - } - input.body = string - input.headers["Content-Type"] = "application/xml" - break - case BodyTypes.JSON: - // if JSON error, throw it - if (error) { - throw "Invalid JSON for request body" - } - addPaginationToBody((key: string, value: any) => { - object[key] = value - }) - input.body = JSON.stringify(object) - input.headers["Content-Type"] = "application/json" - break - } + addBody( + bodyType: string, + body: string | any, + input: any, + pagination: PaginationConfig | null, + paginationValues: PaginationValues | null + ) { + if (!input.headers) { + input.headers = {} + } + if (bodyType === BodyTypes.NONE) { return input } + let error, + object: any = {}, + string = "" + try { + if (body) { + string = typeof body !== "string" ? JSON.stringify(body) : body + object = typeof body === "object" ? body : JSON.parse(body) + } + } catch (err) { + error = err + } - getAuthHeaders(authConfigId: string): { [key: string]: any } { - let headers: any = {} - - if (this.config.authConfigs && authConfigId) { - const authConfig = this.config.authConfigs.filter( - c => c._id === authConfigId - )[0] - // check the config still exists before proceeding - // if not - do nothing - if (authConfig) { - let config - switch (authConfig.type) { - case AuthType.BASIC: - config = authConfig.config as BasicAuthConfig - headers.Authorization = `Basic ${Buffer.from( - `${config.username}:${config.password}` - ).toString("base64")}` - break - case AuthType.BEARER: - config = authConfig.config as BearerAuthConfig - headers.Authorization = `Bearer ${config.token}` - break - } + // Util to add pagination values to a certain body type + const addPaginationToBody = (insertFn: Function) => { + if (pagination?.location === "body") { + if (pagination?.pageParam && paginationValues?.page != null) { + insertFn(pagination.pageParam, paginationValues.page) + } + if (pagination?.sizeParam && paginationValues?.limit != null) { + insertFn(pagination.sizeParam, paginationValues.limit) } } - - return headers } - async _req(query: RestQuery) { - const { - path = "", - queryString = "", - headers = {}, - method = "GET", - disabledHeaders, - bodyType, - requestBody, - authConfigId, - pagination, - paginationValues, - } = query - const authHeaders = this.getAuthHeaders(authConfigId) - - this.headers = { - ...this.config.defaultHeaders, - ...headers, - ...authHeaders, - } - - if (disabledHeaders) { - for (let headerKey of Object.keys(this.headers)) { - if (disabledHeaders[headerKey]) { - delete this.headers[headerKey] - } + switch (bodyType) { + case BodyTypes.TEXT: + // content type defaults to plaintext + input.body = string + break + case BodyTypes.ENCODED: + const params = new URLSearchParams() + for (let [key, value] of Object.entries(object)) { + params.append(key, value) } - } - - let input: any = { method, headers: this.headers } - input = this.addBody( - bodyType, - requestBody, - input, - pagination, - paginationValues - ) - - this.startTimeMs = performance.now() - const url = this.getUrl(path, queryString, pagination, paginationValues) - const response = await fetch(url, input) - return await this.parseResponse(response, pagination) - } - - async create(opts: RestQuery) { - return this._req({ ...opts, method: "POST" }) - } - - async read(opts: RestQuery) { - return this._req({ ...opts, method: "GET" }) - } - - async update(opts: RestQuery) { - return this._req({ ...opts, method: "PUT" }) - } - - async patch(opts: RestQuery) { - return this._req({ ...opts, method: "PATCH" }) - } - - async delete(opts: RestQuery) { - return this._req({ ...opts, method: "DELETE" }) + addPaginationToBody((key: string, value: any) => { + params.append(key, value) + }) + input.body = params + break + case BodyTypes.FORM_DATA: + const form = new FormData() + for (let [key, value] of Object.entries(object)) { + form.append(key, value) + } + addPaginationToBody((key: string, value: any) => { + form.append(key, value) + }) + input.body = form + break + case BodyTypes.XML: + if (object != null && Object.keys(object).length) { + string = new XmlBuilder().buildObject(object) + } + input.body = string + input.headers["Content-Type"] = "application/xml" + break + case BodyTypes.JSON: + // if JSON error, throw it + if (error) { + throw "Invalid JSON for request body" + } + addPaginationToBody((key: string, value: any) => { + object[key] = value + }) + input.body = JSON.stringify(object) + input.headers["Content-Type"] = "application/json" + break } + return input } - module.exports = { - schema: SCHEMA, - integration: RestIntegration, - AuthType, + getAuthHeaders(authConfigId: string): { [key: string]: any } { + let headers: any = {} + + if (this.config.authConfigs && authConfigId) { + const authConfig = this.config.authConfigs.filter( + c => c._id === authConfigId + )[0] + // check the config still exists before proceeding + // if not - do nothing + if (authConfig) { + let config + switch (authConfig.type) { + case AuthType.BASIC: + config = authConfig.config as BasicAuthConfig + headers.Authorization = `Basic ${Buffer.from( + `${config.username}:${config.password}` + ).toString("base64")}` + break + case AuthType.BEARER: + config = authConfig.config as BearerAuthConfig + headers.Authorization = `Bearer ${config.token}` + break + } + } + } + + return headers + } + + async _req(query: RestQuery) { + const { + path = "", + queryString = "", + headers = {}, + method = "GET", + disabledHeaders, + bodyType, + requestBody, + authConfigId, + pagination, + paginationValues, + } = query + const authHeaders = this.getAuthHeaders(authConfigId) + + this.headers = { + ...this.config.defaultHeaders, + ...headers, + ...authHeaders, + } + + if (disabledHeaders) { + for (let headerKey of Object.keys(this.headers)) { + if (disabledHeaders[headerKey]) { + delete this.headers[headerKey] + } + } + } + + let input: any = { method, headers: this.headers } + input = this.addBody( + bodyType, + requestBody, + input, + pagination, + paginationValues + ) + + this.startTimeMs = performance.now() + const url = this.getUrl(path, queryString, pagination, paginationValues) + const response = await fetch(url, input) + return await this.parseResponse(response, pagination) + } + + async create(opts: RestQuery) { + return this._req({ ...opts, method: "POST" }) + } + + async read(opts: RestQuery) { + return this._req({ ...opts, method: "GET" }) + } + + async update(opts: RestQuery) { + return this._req({ ...opts, method: "PUT" }) + } + + async patch(opts: RestQuery) { + return this._req({ ...opts, method: "PATCH" }) + } + + async delete(opts: RestQuery) { + return this._req({ ...opts, method: "DELETE" }) } } + +export default { + schema: SCHEMA, + integration: RestIntegration, + AuthType, +} diff --git a/packages/server/src/integrations/s3.ts b/packages/server/src/integrations/s3.ts index e8da696424..f92124082e 100644 --- a/packages/server/src/integrations/s3.ts +++ b/packages/server/src/integrations/s3.ts @@ -1,86 +1,83 @@ import { Integration, QueryType, IntegrationBase } from "@budibase/types" +const AWS = require("aws-sdk") -module S3Module { - const AWS = require("aws-sdk") +interface S3Config { + region: string + accessKeyId: string + secretAccessKey: string + s3ForcePathStyle: boolean + endpoint?: string +} - interface S3Config { - region: string - accessKeyId: string - secretAccessKey: string - s3ForcePathStyle: boolean - endpoint?: string - } - - const SCHEMA: Integration = { - docs: "https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html", - description: - "Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance.", - friendlyName: "Amazon S3", - type: "Object store", - datasource: { - region: { - type: "string", - required: false, - default: "us-east-1", - }, - accessKeyId: { - type: "password", - required: true, - }, - secretAccessKey: { - type: "password", - required: true, - }, - endpoint: { - type: "string", - required: false, - }, - signatureVersion: { - type: "string", - required: false, - default: "v4", - }, +const SCHEMA: Integration = { + docs: "https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html", + description: + "Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance.", + friendlyName: "Amazon S3", + type: "Object store", + datasource: { + region: { + type: "string", + required: false, + default: "us-east-1", }, - query: { - read: { - type: QueryType.FIELDS, - fields: { - bucket: { - type: "string", - required: true, - }, + accessKeyId: { + type: "password", + required: true, + }, + secretAccessKey: { + type: "password", + required: true, + }, + endpoint: { + type: "string", + required: false, + }, + signatureVersion: { + type: "string", + required: false, + default: "v4", + }, + }, + query: { + read: { + type: QueryType.FIELDS, + fields: { + bucket: { + type: "string", + required: true, }, }, }, - } + }, +} - class S3Integration implements IntegrationBase { - private readonly config: S3Config - private client: any +class S3Integration implements IntegrationBase { + private readonly config: S3Config + private client: any - constructor(config: S3Config) { - this.config = config - if (this.config.endpoint) { - this.config.s3ForcePathStyle = true - } else { - delete this.config.endpoint - } - - this.client = new AWS.S3(this.config) + constructor(config: S3Config) { + this.config = config + if (this.config.endpoint) { + this.config.s3ForcePathStyle = true + } else { + delete this.config.endpoint } - async read(query: { bucket: string }) { - const response = await this.client - .listObjects({ - Bucket: query.bucket, - }) - .promise() - return response.Contents - } + this.client = new AWS.S3(this.config) } - module.exports = { - schema: SCHEMA, - integration: S3Integration, + async read(query: { bucket: string }) { + const response = await this.client + .listObjects({ + Bucket: query.bucket, + }) + .promise() + return response.Contents } } + +export default { + schema: SCHEMA, + integration: S3Integration, +} diff --git a/packages/server/src/integrations/snowflake.ts b/packages/server/src/integrations/snowflake.ts index 7155d27b66..db702520f9 100644 --- a/packages/server/src/integrations/snowflake.ts +++ b/packages/server/src/integrations/snowflake.ts @@ -1,99 +1,97 @@ import { Integration, QueryType, SqlQuery } from "@budibase/types" import { Snowflake } from "snowflake-promise" -module SnowflakeModule { - interface SnowflakeConfig { - account: string - username: string - password: string - warehouse: string - database: string - schema: string - } +interface SnowflakeConfig { + account: string + username: string + password: string + warehouse: string + database: string + schema: string +} - const SCHEMA: Integration = { - docs: "https://developers.snowflake.com/", - description: - "Snowflake is a solution for data warehousing, data lakes, data engineering, data science, data application development, and securely sharing and consuming shared data.", - friendlyName: "Snowflake", - type: "Relational", - datasource: { - account: { - type: "string", - required: true, - }, - username: { - type: "string", - required: true, - }, - password: { - type: "password", - required: true, - }, - warehouse: { - type: "string", - required: true, - }, - database: { - type: "string", - required: true, - }, - schema: { - type: "string", - required: true, - }, +const SCHEMA: Integration = { + docs: "https://developers.snowflake.com/", + description: + "Snowflake is a solution for data warehousing, data lakes, data engineering, data science, data application development, and securely sharing and consuming shared data.", + friendlyName: "Snowflake", + type: "Relational", + datasource: { + account: { + type: "string", + required: true, }, - query: { - create: { - type: QueryType.SQL, - }, - read: { - type: QueryType.SQL, - }, - update: { - type: QueryType.SQL, - }, - delete: { - type: QueryType.SQL, - }, + username: { + type: "string", + required: true, }, + password: { + type: "password", + required: true, + }, + warehouse: { + type: "string", + required: true, + }, + database: { + type: "string", + required: true, + }, + schema: { + type: "string", + required: true, + }, + }, + query: { + create: { + type: QueryType.SQL, + }, + read: { + type: QueryType.SQL, + }, + update: { + type: QueryType.SQL, + }, + delete: { + type: QueryType.SQL, + }, + }, +} + +class SnowflakeIntegration { + private client: Snowflake + + constructor(config: SnowflakeConfig) { + this.client = new Snowflake(config) } - class SnowflakeIntegration { - private client: Snowflake - - constructor(config: SnowflakeConfig) { - this.client = new Snowflake(config) - } - - async internalQuery(query: SqlQuery) { - await this.client.connect() - try { - return await this.client.execute(query.sql) - } catch (err: any) { - throw err?.message.split(":")[1] || err?.message - } - } - - async create(query: SqlQuery) { - return this.internalQuery(query) - } - - async read(query: SqlQuery) { - return this.internalQuery(query) - } - - async update(query: SqlQuery) { - return this.internalQuery(query) - } - - async delete(query: SqlQuery) { - return this.internalQuery(query) + async internalQuery(query: SqlQuery) { + await this.client.connect() + try { + return await this.client.execute(query.sql) + } catch (err: any) { + throw err?.message.split(":")[1] || err?.message } } - module.exports = { - schema: SCHEMA, - integration: SnowflakeIntegration, + async create(query: SqlQuery) { + return this.internalQuery(query) + } + + async read(query: SqlQuery) { + return this.internalQuery(query) + } + + async update(query: SqlQuery) { + return this.internalQuery(query) + } + + async delete(query: SqlQuery) { + return this.internalQuery(query) } } + +export default { + schema: SCHEMA, + integration: SnowflakeIntegration, +} diff --git a/packages/types/src/documents/index.ts b/packages/types/src/documents/index.ts index 4f5b278a4b..1afee41599 100644 --- a/packages/types/src/documents/index.ts +++ b/packages/types/src/documents/index.ts @@ -1,5 +1,6 @@ export * from "./account" export * from "./app" export * from "./global" +export * from "./plugin" export * from "./platform" export * from "./document" diff --git a/packages/types/src/documents/plugin/index.ts b/packages/types/src/documents/plugin/index.ts new file mode 100644 index 0000000000..03a239a6c9 --- /dev/null +++ b/packages/types/src/documents/plugin/index.ts @@ -0,0 +1,4 @@ +export enum PluginType { + DATASOURCE = "datasource", + COMPONENT = "component", +} From 244850cc0bbee77c59965820b9dd1984daedb758 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 15 Aug 2022 11:23:27 +0100 Subject: [PATCH 037/280] Rename custom components to plugins in the new component panel --- .../[componentId]/new/_components/NewComponentPanel.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte index b0cd544977..c18df34556 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte @@ -56,7 +56,7 @@ // Add custom components category if (customComponents?.length) { enrichedStructure.push({ - name: "Custom components", + name: "Plugins", isCategory: true, children: customComponents.map(x => ({ ...definitions[x], From 51e06a9c7a314b5cca5dad9538a308cf17ed66c2 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 15 Aug 2022 18:38:09 +0100 Subject: [PATCH 038/280] Adding custom datasources to UI. --- .../DatasourceNavigator/icons/Custom.svelte | 39 +++++++++++++++++++ .../DatasourceNavigator/icons/index.js | 2 + .../modals/CreateDatasourceModal.svelte | 10 ++++- .../server/src/api/controllers/datasource.js | 8 ++-- .../server/src/integrations/base/query.ts | 4 +- packages/server/src/integrations/index.ts | 20 ++++++++-- packages/server/src/threads/query.ts | 4 +- 7 files changed, 75 insertions(+), 12 deletions(-) create mode 100644 packages/builder/src/components/backend/DatasourceNavigator/icons/Custom.svelte diff --git a/packages/builder/src/components/backend/DatasourceNavigator/icons/Custom.svelte b/packages/builder/src/components/backend/DatasourceNavigator/icons/Custom.svelte new file mode 100644 index 0000000000..354b7a3358 --- /dev/null +++ b/packages/builder/src/components/backend/DatasourceNavigator/icons/Custom.svelte @@ -0,0 +1,39 @@ + + + + + + + + + + diff --git a/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js b/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js index 404895f05a..267ed32b6e 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js +++ b/packages/builder/src/components/backend/DatasourceNavigator/icons/index.js @@ -15,6 +15,7 @@ import GoogleSheets from "./GoogleSheets.svelte" import Firebase from "./Firebase.svelte" import Redis from "./Redis.svelte" import Snowflake from "./Snowflake.svelte" +import Custom from "./Custom.svelte" export default { BUDIBASE: Budibase, @@ -34,4 +35,5 @@ export default { FIRESTORE: Firebase, REDIS: Redis, SNOWFLAKE: Snowflake, + CUSTOM: Custom, } diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte index 8d34c292f3..2d5e6976bf 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte @@ -92,6 +92,14 @@ } integrations = newIntegrations } + + function getIcon(integrationType, schema) { + if (schema.custom) { + return ICONS.CUSTOM + } else { + return ICONS[integrationType] + } + } @@ -158,7 +166,7 @@ >
diff --git a/packages/server/src/api/controllers/datasource.js b/packages/server/src/api/controllers/datasource.js index 8b9b765a5f..36d345912e 100644 --- a/packages/server/src/api/controllers/datasource.js +++ b/packages/server/src/api/controllers/datasource.js @@ -7,7 +7,7 @@ const { getTableParams, } = require("../../db/utils") const { BuildSchemaErrors, InvalidColumns } = require("../../constants") -const { integrations } = require("../../integrations") +const { getIntegration } = require("../../integrations") const { getDatasourceAndQuery } = require("./row/utils") const { invalidateDynamicVariables } = require("../../threads/utils") const { getAppDB } = require("@budibase/backend-core/context") @@ -114,7 +114,7 @@ exports.update = async function (ctx) { // Drain connection pools when configuration is changed if (datasource.source) { - const source = integrations[datasource.source] + const source = await getIntegration(datasource.source) if (source && source.pool) { await source.pool.end() } @@ -149,7 +149,7 @@ exports.save = async function (ctx) { // Drain connection pools when configuration is changed if (datasource.source) { - const source = integrations[datasource.source] + const source = await getIntegration(datasource.source) if (source && source.pool) { await source.pool.end() } @@ -218,7 +218,7 @@ function updateError(error, newError, tables) { } const buildSchemaHelper = async datasource => { - const Connector = integrations[datasource.source] + const Connector = await getIntegration(datasource.source) // Connect to the DB and build the schema const connector = new Connector(datasource.config) diff --git a/packages/server/src/integrations/base/query.ts b/packages/server/src/integrations/base/query.ts index 1f3ed3dd74..7435b28141 100644 --- a/packages/server/src/integrations/base/query.ts +++ b/packages/server/src/integrations/base/query.ts @@ -1,11 +1,11 @@ import { QueryJson, Datasource } from "@budibase/types" -const { integrations } = require("../index") +const { getIntegration } = require("../index") export async function makeExternalQuery( datasource: Datasource, json: QueryJson ) { - const Integration = integrations[datasource.source] + const Integration = await getIntegration(datasource.source) // query is the opinionated function if (Integration.prototype.query) { const integration = new Integration(datasource.config) diff --git a/packages/server/src/integrations/index.ts b/packages/server/src/integrations/index.ts index bde7235ac8..bf267e46cc 100644 --- a/packages/server/src/integrations/index.ts +++ b/packages/server/src/integrations/index.ts @@ -67,8 +67,22 @@ if (environment.SELF_HOSTED) { module.exports = { getDefinitions: async () => { - const custom = await getPlugins(PluginType.DATASOURCE) - return cloneDeep(DEFINITIONS) + const plugins = await getPlugins(PluginType.DATASOURCE) + // extract the actual schema from each custom + const pluginSchemas: { [key: string]: Integration } = {} + for (let plugin of plugins) { + const sourceId = plugin.name + pluginSchemas[sourceId] = { + ...plugin.schema["schema"], + custom: true, + } + } + return { + ...cloneDeep(DEFINITIONS), + ...pluginSchemas, + } + }, + getIntegration: async () => { + return INTEGRATIONS }, - integrations: INTEGRATIONS, } diff --git a/packages/server/src/threads/query.ts b/packages/server/src/threads/query.ts index 6b93a00200..86cbf89c87 100644 --- a/packages/server/src/threads/query.ts +++ b/packages/server/src/threads/query.ts @@ -2,7 +2,7 @@ import { default as threadUtils } from "./utils" threadUtils.threadSetup() import { WorkerCallback, QueryEvent, QueryVariable } from "./definitions" const ScriptRunner = require("../utilities/scriptRunner") -const { integrations } = require("../integrations") +const { getIntegration } = require("../integrations") const { processStringSync } = require("@budibase/string-templates") const { doInAppContext, getAppDB } = require("@budibase/backend-core/context") const { @@ -62,7 +62,7 @@ class QueryRunner { let datasourceClone = cloneDeep(datasource) let fieldsClone = cloneDeep(fields) - const Integration = integrations[datasourceClone.source] + const Integration = await getIntegration(datasourceClone.source) if (!Integration) { throw "Integration type does not exist." } From 6093da79d6f555c0003b77a511002baade1aa252 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 15 Aug 2022 22:23:45 +0100 Subject: [PATCH 039/280] Add hot reloading for component plugins via watched plugin directory --- .../templates/app-service-deployment.yaml | 8 +- hosting/.env | 5 +- hosting/hosting.properties | 5 +- packages/server/package.json | 1 + packages/server/scripts/dev/manage.js | 1 + packages/server/src/api/controllers/plugin.ts | 93 +-- packages/server/src/app.ts | 28 + packages/server/src/environment.js | 1 + packages/server/yarn.lock | 645 +++++++++++++++++- packages/types/src/documents/plugin/index.ts | 5 + 10 files changed, 734 insertions(+), 58 deletions(-) diff --git a/charts/budibase/templates/app-service-deployment.yaml b/charts/budibase/templates/app-service-deployment.yaml index fd46e77647..332637d971 100644 --- a/charts/budibase/templates/app-service-deployment.yaml +++ b/charts/budibase/templates/app-service-deployment.yaml @@ -124,11 +124,15 @@ spec: value: {{ .Values.globals.tenantFeatureFlags | quote }} {{ if .Values.globals.bbAdminUserEmail }} - name: BB_ADMIN_USER_EMAIL - value: { { .Values.globals.bbAdminUserEmail | quote } } + value: {{ .Values.globals.bbAdminUserEmail | quote }} {{ end }} {{ if .Values.globals.bbAdminUserPassword }} - name: BB_ADMIN_USER_PASSWORD - value: { { .Values.globals.bbAdminUserPassword | quote } } + value: {{ .Values.globals.bbAdminUserPassword | quote }} + {{ end }} + {{ if .Values.globals.pluginsDir }} + - name: PLUGINS_DIR + value: { { .Values.globals.pluginsDir | quote }} {{ end }} image: budibase/apps:{{ .Values.globals.appVersion }} diff --git a/hosting/.env b/hosting/.env index 11dd661bf1..c5638a266f 100644 --- a/hosting/.env +++ b/hosting/.env @@ -22,4 +22,7 @@ BUDIBASE_ENVIRONMENT=PRODUCTION # An admin user can be automatically created initially if these are set BB_ADMIN_USER_EMAIL= -BB_ADMIN_USER_PASSWORD= \ No newline at end of file +BB_ADMIN_USER_PASSWORD= + +# A path that is watched for plugin bundles. Any bundles found are imported automatically/ +PLUGINS_DIR= \ No newline at end of file diff --git a/hosting/hosting.properties b/hosting/hosting.properties index 11dd661bf1..c5638a266f 100644 --- a/hosting/hosting.properties +++ b/hosting/hosting.properties @@ -22,4 +22,7 @@ BUDIBASE_ENVIRONMENT=PRODUCTION # An admin user can be automatically created initially if these are set BB_ADMIN_USER_EMAIL= -BB_ADMIN_USER_PASSWORD= \ No newline at end of file +BB_ADMIN_USER_PASSWORD= + +# A path that is watched for plugin bundles. Any bundles found are imported automatically/ +PLUGINS_DIR= \ No newline at end of file diff --git a/packages/server/package.json b/packages/server/package.json index 2bea771ad7..0a24f767e0 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -95,6 +95,7 @@ "bcryptjs": "2.4.3", "bull": "3.29.3", "chmodr": "1.2.0", + "chokidar": "^3.5.3", "csvtojson": "2.0.10", "curlconverter": "3.21.0", "dotenv": "8.2.0", diff --git a/packages/server/scripts/dev/manage.js b/packages/server/scripts/dev/manage.js index fc9fde0a02..8a5f8e9477 100644 --- a/packages/server/scripts/dev/manage.js +++ b/packages/server/scripts/dev/manage.js @@ -58,6 +58,7 @@ async function init() { DEPLOYMENT_ENVIRONMENT: "development", BB_ADMIN_USER_EMAIL: "", BB_ADMIN_USER_PASSWORD: "", + PLUGINS_DIR: "", } let envFile = "" Object.keys(envFileJson).forEach(key => { diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index 48104f24b9..93e569e0c8 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -3,7 +3,7 @@ import { extractPluginTarball } from "../../utilities/fileSystem" import { getGlobalDB } from "@budibase/backend-core/tenancy" import { generatePluginID, getPluginParams } from "../../db/utils" import { uploadDirectory } from "@budibase/backend-core/objectStore" -import { PluginType } from "@budibase/types" +import { PluginType, FileType } from "@budibase/types" export async function getPlugins(type?: PluginType) { const db = getGlobalDB() @@ -21,56 +21,16 @@ export async function getPlugins(type?: PluginType) { } export async function upload(ctx: any) { - const plugins = + const plugins: FileType[] = ctx.request.files.file.length > 1 ? Array.from(ctx.request.files.file) : [ctx.request.files.file] - const db = getGlobalDB() try { let docs = [] // can do single or multiple plugins for (let plugin of plugins) { - const { metadata, directory } = await extractPluginTarball(plugin) - const version = metadata.package.version, - name = metadata.package.name, - description = metadata.package.description - - // first open the tarball into tmp directory - const bucketPath = `${name}/${version}/` - const files = await uploadDirectory( - ObjectStoreBuckets.PLUGINS, - directory, - bucketPath - ) - const jsFile = files.find((file: any) => file.name.endsWith(".js")) - if (!jsFile) { - throw new Error(`Plugin missing .js file.`) - } - const jsFileName = jsFile.name - const pluginId = generatePluginID(name, version) - - // overwrite existing docs entirely if they exist - let rev - try { - const existing = await db.get(pluginId) - rev = existing._rev - } catch (err) { - rev = undefined - } - const doc = { - _id: pluginId, - _rev: rev, - name, - version, - description, - ...metadata, - jsUrl: `${bucketPath}${jsFileName}`, - } - const response = await db.put(doc) - docs.push({ - ...doc, - _rev: response.rev, - }) + const doc = await processPlugin(plugin) + docs.push(doc) } ctx.body = { message: "Plugin(s) uploaded successfully", @@ -87,3 +47,48 @@ export async function fetch(ctx: any) { } export async function destroy(ctx: any) {} + +export async function processPlugin(plugin: FileType) { + const db = getGlobalDB() + const { metadata, directory } = await extractPluginTarball(plugin) + const version = metadata.package.version, + name = metadata.package.name, + description = metadata.package.description + + // first open the tarball into tmp directory + const bucketPath = `${name}/${version}/` + const files = await uploadDirectory( + ObjectStoreBuckets.PLUGINS, + directory, + bucketPath + ) + const jsFile = files.find((file: any) => file.name.endsWith(".js")) + if (!jsFile) { + throw new Error(`Plugin missing .js file.`) + } + const jsFileName = jsFile.name + const pluginId = generatePluginID(name, version) + + // overwrite existing docs entirely if they exist + let rev + try { + const existing = await db.get(pluginId) + rev = existing._rev + } catch (err) { + rev = undefined + } + const doc = { + _id: pluginId, + _rev: rev, + name, + version, + description, + ...metadata, + jsUrl: `${bucketPath}${jsFileName}`, + } + const response = await db.put(doc) + return { + ...doc, + _rev: response.rev, + } +} diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 62301d57ca..2f8adc879d 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -17,10 +17,15 @@ const bullboard = require("./automations/bullboard") const { logAlert } = require("@budibase/backend-core/logging") const { pinoSettings } = require("@budibase/backend-core") const { Thread } = require("./threads") +const chokidar = require("chokidar") +const fs = require("fs") +const path = require("path") import redis from "./utilities/redis" import * as migrations from "./migrations" import { events, installation, tenancy } from "@budibase/backend-core" import { createAdminUser, getChecklist } from "./utilities/workerRequests" +import { processPlugin } from "./api/controllers/plugin" +import { getGlobalDB } from "@budibase/backend-core/tenancy" const app = new Koa() @@ -132,6 +137,29 @@ module.exports = server.listen(env.PORT || 0, async () => { } } + // monitor plugin directory if required + if (env.SELF_HOSTED && env.PLUGINS_DIR && fs.existsSync(env.PLUGINS_DIR)) { + const watchPath = path.join(env.PLUGINS_DIR, "./**/dist/*.tar.gz") + chokidar + .watch(watchPath, { + ignored: "**/node_modules", + awaitWriteFinish: true, + }) + .on("all", async (event: string, path: string) => { + const tenantId = tenancy.getTenantId() + await tenancy.doInTenant(tenantId, async () => { + try { + const split = path.split("/") + const name = split[split.length - 1] + console.log("Importing plugin:", path) + await processPlugin({ name, path }) + } catch (err) { + console.log("Failed to import plugin:", err) + } + }) + }) + } + // check for version updates await installation.checkInstallVersion() diff --git a/packages/server/src/environment.js b/packages/server/src/environment.js index c2e2815e00..5a7aa61b9d 100644 --- a/packages/server/src/environment.js +++ b/packages/server/src/environment.js @@ -77,6 +77,7 @@ module.exports = { SQL_MAX_ROWS: process.env.SQL_MAX_ROWS, BB_ADMIN_USER_EMAIL: process.env.BB_ADMIN_USER_EMAIL, BB_ADMIN_USER_PASSWORD: process.env.BB_ADMIN_USER_PASSWORD, + PLUGINS_DIR: process.env.PLUGINS_DIR, // flags ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS, DISABLE_THREADING: process.env.DISABLE_THREADING, diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index a8dea20e95..ac01381814 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1128,6 +1128,93 @@ uuid "8.3.2" zlib "1.0.5" +"@budibase/backend-core@1.2.39-alpha.1": + version "1.2.39-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.39-alpha.1.tgz#7e5293670cf39f05e31eaaabbc3d7abc7f9837ca" + integrity sha512-mfHGyLc2FZ63cF8f4VX8GdJe7ciLCX4kZ+NK1yzBG0rRzHSTWJb2CVRq0rXNsZbwAVt9llHH58ysSHd+ggw9hg== + dependencies: + "@budibase/types" "1.2.39-alpha.1" + "@techpass/passport-openidconnect" "0.3.2" + aws-sdk "2.1030.0" + bcrypt "5.0.1" + dotenv "16.0.1" + emitter-listener "1.1.2" + ioredis "4.28.0" + joi "17.6.0" + jsonwebtoken "8.5.1" + koa-passport "4.1.4" + lodash "4.17.21" + lodash.isarguments "3.1.0" + node-fetch "2.6.7" + passport-google-auth "1.0.2" + passport-google-oauth "2.0.0" + passport-jwt "4.0.0" + passport-local "1.0.0" + passport-oauth2-refresh "^2.1.0" + posthog-node "1.3.0" + pouchdb "7.3.0" + pouchdb-find "7.2.2" + pouchdb-replication-stream "1.2.9" + redlock "4.2.0" + sanitize-s3-objectkey "0.0.1" + semver "7.3.7" + tar-fs "2.1.1" + uuid "8.3.2" + zlib "1.0.5" + +"@budibase/bbui@1.2.39-alpha.1": + version "1.2.39-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.2.39-alpha.1.tgz#6c4698e86540ae547b4569b077da1a3d7637809a" + integrity sha512-wZbe/G/jUxQwhpkqdnJyMQObRTT9eY0vowHkLrplAAVfG84tPYsWDMKqLmauJOXv8Fl3G24I2Jj1kzWFKjYieA== + dependencies: + "@adobe/spectrum-css-workflow-icons" "^1.2.1" + "@budibase/string-templates" "1.2.39-alpha.1" + "@spectrum-css/actionbutton" "^1.0.1" + "@spectrum-css/actiongroup" "^1.0.1" + "@spectrum-css/avatar" "^3.0.2" + "@spectrum-css/button" "^3.0.1" + "@spectrum-css/buttongroup" "^3.0.2" + "@spectrum-css/checkbox" "^3.0.2" + "@spectrum-css/dialog" "^3.0.1" + "@spectrum-css/divider" "^1.0.3" + "@spectrum-css/dropzone" "^3.0.2" + "@spectrum-css/fieldgroup" "^3.0.2" + "@spectrum-css/fieldlabel" "^3.0.1" + "@spectrum-css/icon" "^3.0.1" + "@spectrum-css/illustratedmessage" "^3.0.2" + "@spectrum-css/inlinealert" "^2.0.1" + "@spectrum-css/inputgroup" "^3.0.2" + "@spectrum-css/label" "^2.0.10" + "@spectrum-css/link" "^3.1.1" + "@spectrum-css/menu" "^3.0.1" + "@spectrum-css/modal" "^3.0.1" + "@spectrum-css/pagination" "^3.0.3" + "@spectrum-css/picker" "^1.0.1" + "@spectrum-css/popover" "^3.0.1" + "@spectrum-css/progressbar" "^1.0.2" + "@spectrum-css/progresscircle" "^1.0.2" + "@spectrum-css/radio" "^3.0.2" + "@spectrum-css/search" "^3.0.2" + "@spectrum-css/sidenav" "^3.0.2" + "@spectrum-css/slider" "3.0.1" + "@spectrum-css/statuslight" "^3.0.2" + "@spectrum-css/stepper" "^3.0.3" + "@spectrum-css/switch" "^1.0.2" + "@spectrum-css/table" "^3.0.1" + "@spectrum-css/tabs" "^3.2.12" + "@spectrum-css/tags" "^3.0.2" + "@spectrum-css/textfield" "^3.0.1" + "@spectrum-css/toast" "^3.0.1" + "@spectrum-css/tooltip" "^3.0.3" + "@spectrum-css/treeview" "^3.0.2" + "@spectrum-css/typography" "^3.0.1" + "@spectrum-css/underlay" "^2.0.9" + "@spectrum-css/vars" "^3.0.1" + dayjs "^1.10.4" + easymde "^2.16.1" + svelte-flatpickr "^3.2.3" + svelte-portal "^1.0.0" + "@budibase/bbui@^0.9.139": version "0.9.190" resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-0.9.190.tgz#e1ec400ac90f556bfbc80fc23a04506f1585ea81" @@ -1178,6 +1265,70 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" +"@budibase/client@1.2.39-alpha.1": + version "1.2.39-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/client/-/client-1.2.39-alpha.1.tgz#a9a727d0843d7e610d224d2b1b0a15d336c0199c" + integrity sha512-qAzbpIgAoLll56xq6pVmOMI05KdcO/Dp/4aAzYKxKteRq+fcBeNIb9WPlP3NKYhYFE/HJegkiwqTt+B3UKA/gQ== + dependencies: + "@budibase/bbui" "1.2.39-alpha.1" + "@budibase/frontend-core" "1.2.39-alpha.1" + "@budibase/string-templates" "1.2.39-alpha.1" + "@spectrum-css/button" "^3.0.3" + "@spectrum-css/card" "^3.0.3" + "@spectrum-css/divider" "^1.0.3" + "@spectrum-css/link" "^3.1.3" + "@spectrum-css/page" "^3.0.1" + "@spectrum-css/tag" "^3.1.4" + "@spectrum-css/typography" "^3.0.2" + "@spectrum-css/vars" "^3.0.1" + apexcharts "^3.22.1" + dayjs "^1.10.5" + downloadjs "1.4.7" + leaflet "^1.7.1" + regexparam "^1.3.0" + rollup-plugin-polyfill-node "^0.8.0" + sanitize-html "^2.7.0" + screenfull "^6.0.1" + shortid "^2.2.15" + svelte "^3.49.0" + svelte-apexcharts "^1.0.2" + svelte-flatpickr "^3.1.0" + svelte-spa-router "^3.0.5" + +"@budibase/frontend-core@1.2.39-alpha.1": + version "1.2.39-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-1.2.39-alpha.1.tgz#8ba142af58fdb5226254001f0360d048a31cc60f" + integrity sha512-WsQCrVGKeWhFTAxjmakkVEcCzxAaRwxoBIze97psupq0a4EUKLOqblFzrlL9Y+1SvVHyUQQz0bqjXfDzAlv7TQ== + dependencies: + "@budibase/bbui" "1.2.39-alpha.1" + lodash "^4.17.21" + svelte "^3.46.2" + +"@budibase/handlebars-helpers@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.8.tgz#6953d29673a8c5c407e096c0a84890465c7ce841" + integrity sha512-ggWJUt0GqsHFAEup5tlWlcrmYML57nKhpNGGLzVsqXVYN8eVmf3xluYmmMe7fDYhQH0leSprrdEXmsdFQF3HAQ== + dependencies: + array-sort "^1.0.0" + define-property "^2.0.2" + extend-shallow "^3.0.2" + for-in "^1.0.2" + get-object "^0.2.0" + get-value "^3.0.1" + handlebars "^4.7.7" + handlebars-utils "^1.0.6" + has-value "^2.0.2" + helper-md "^0.2.2" + html-tag "^2.0.0" + is-even "^1.0.0" + is-glob "^4.0.1" + kind-of "^6.0.3" + micromatch "^3.1.5" + relative "^3.0.2" + striptags "^3.1.1" + to-gfm-code-block "^0.1.1" + year "^0.2.1" + "@budibase/pro@1.2.39-alpha.0": version "1.2.39-alpha.0" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.39-alpha.0.tgz#272e3ffd5e2189c787df6b6fbe22b7084832ade7" @@ -1207,11 +1358,28 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" +"@budibase/string-templates@1.2.39-alpha.1": + version "1.2.39-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.2.39-alpha.1.tgz#2cef89a75b85289742588f067e426046039b67a5" + integrity sha512-puWejjG6+Yz8jmKxi7j2rMwuilNXC9cmIH4dNHfAowvq3Cn2w31SjR5Qd79cmJe2wb8B1snXMqti0uzSHWGmhQ== + dependencies: + "@budibase/handlebars-helpers" "^0.11.8" + dayjs "^1.10.4" + handlebars "^4.7.6" + handlebars-utils "^1.0.6" + lodash "^4.17.20" + vm2 "^3.9.4" + "@budibase/types@1.2.39-alpha.0": version "1.2.39-alpha.0" resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.39-alpha.0.tgz#d0d48e4da36a93a4a9354cc49663f38d0181b6c0" integrity sha512-i+lQeqlKmFORLuKdwmKnlmCCCEXZH6NdXHrOqNcebJzcNlx3Gx342+cHe4ZGYu0L+wCkWWelD5XHFuNMVMcuHg== +"@budibase/types@1.2.39-alpha.1": + version "1.2.39-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.39-alpha.1.tgz#1758c5c7b8a1d754b4c391fc2dc699d6e249980b" + integrity sha512-b3YKkNf0+ImO/HvNbDS0biaMY2uu5ClphBLtA34hOd1I8hjjNj1kguuiQvgW7zqTYvMRK0hBNtTCnSa90uI7Fg== + "@bull-board/api@3.7.0": version "3.7.0" resolved "https://registry.yarnpkg.com/@bull-board/api/-/api-3.7.0.tgz#231f687187c0cb34e0b97f463917b6aaeb4ef6af" @@ -2139,6 +2307,24 @@ resolved "https://registry.yarnpkg.com/@redis/time-series/-/time-series-1.0.3.tgz#4cfca8e564228c0bddcdf4418cba60c20b224ac4" integrity sha512-OFp0q4SGrTH0Mruf6oFsHGea58u8vS/iI5+NpYdicaM+7BgqBZH8FFvNZ8rYYLrUO/QRqMq72NpXmxLVNcdmjA== +"@rollup/plugin-inject@^4.0.0": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz#fbeee66e9a700782c4f65c8b0edbafe58678fbc2" + integrity sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ== + dependencies: + "@rollup/pluginutils" "^3.1.0" + estree-walker "^2.0.1" + magic-string "^0.25.7" + +"@rollup/pluginutils@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" + integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== + dependencies: + "@types/estree" "0.0.39" + estree-walker "^1.0.1" + picomatch "^2.2.2" + "@sendgrid/client@^7.1.1": version "7.7.0" resolved "https://registry.yarnpkg.com/@sendgrid/client/-/client-7.7.0.tgz#f8f67abd604205a0d0b1af091b61517ef465fdbf" @@ -2420,6 +2606,11 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/sidenav/-/sidenav-3.0.23.tgz#c218560d472e13a3e0d1499b762df1206dcffbfd" integrity sha512-4IFw2/HMQJRzM0M2c5na/HeY7y5vJoGpMFBkXNpQyhW4TRo7N1rGwYQ5dRD3s4OVEWV4/rjfGV0d/qhfwKUTog== +"@spectrum-css/slider@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@spectrum-css/slider/-/slider-3.0.1.tgz#5281e6f47eb5a4fd3d1816c138bf66d01d7f2e49" + integrity sha512-DI2dtMRnQuDM1miVzl3SGyR1khUEKnwdXfO5EHDFwkC3yav43F5QogkfjmjFmWWobMVovdJlAuiaaJ/IHejD0Q== + "@spectrum-css/statuslight@^3.0.2": version "3.0.8" resolved "https://registry.yarnpkg.com/@spectrum-css/statuslight/-/statuslight-3.0.8.tgz#3b0ea80712573679870a85d469850230e794a0f7" @@ -2445,6 +2636,16 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.16.tgz#c3f7800d8d6f7c9930c28cd01354816328bf72b1" integrity sha512-JUcMB/fiDG/KoyrVstlUMacFJUY4OHKqhMRuPtu9ggUXWCRbSkY8he92v6u0HwY3DuhDoOxNTK8d/PLjk/fsbg== +"@spectrum-css/tabs@^3.2.12": + version "3.2.19" + resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.19.tgz#2eae3a2c4760466882db08281365d502c3f22ebf" + integrity sha512-SNGFf/karBr/GNz5GNWnbppFz6uEOGecv6D8WA1ZLeWkjg4gG5e4M9XmPcB32v350e1PTRG7KwWDce48qWAKCQ== + +"@spectrum-css/tag@^3.1.4": + version "3.3.14" + resolved "https://registry.yarnpkg.com/@spectrum-css/tag/-/tag-3.3.14.tgz#2d1ca0759da6a3a2970d14bcabf33bd4a8f63a5f" + integrity sha512-S4RUaxN/83Pr/SYkQHeZNh2NXmtumUEzhrsrrliI6bAt3bjs+mLresTGd9qkIX2+Ycq1JHWTr0HTga4ti1YYyA== + "@spectrum-css/tags@^3.0.2": version "3.0.3" resolved "https://registry.yarnpkg.com/@spectrum-css/tags/-/tags-3.0.3.tgz#fc76d2735cdc442de91b7eb3bee49a928c0767ac" @@ -2622,6 +2823,13 @@ resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== +"@types/codemirror@^5.60.4": + version "5.60.5" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.5.tgz#5b989a3b4bbe657458cf372c92b6bfda6061a2b7" + integrity sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg== + dependencies: + "@types/tern" "*" + "@types/connect@*": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -2670,6 +2878,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== +"@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== + "@types/express-serve-static-core@^4.17.18": version "4.17.28" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" @@ -2813,6 +3026,11 @@ resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== +"@types/marked@^4.0.1": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.3.tgz#2098f4a77adaba9ce881c9e0b6baf29116e5acc4" + integrity sha512-HnMWQkLJEf/PnxZIfbm0yGJRRZYYMhb++O9M36UCTA9z53uPvVoSlAwJr3XOpDEryb7Hwl1qAx/MV6YIW1RXxg== + "@types/mime@^1": version "1.3.2" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" @@ -2948,6 +3166,13 @@ "@types/cookiejar" "*" "@types/node" "*" +"@types/tern@*": + version "0.23.4" + resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.4.tgz#03926eb13dbeaf3ae0d390caf706b2643a0127fb" + integrity sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg== + dependencies: + "@types/estree" "*" + "@types/tough-cookie@*": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" @@ -3532,7 +3757,7 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.7: +argparse@^1.0.10, argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -3579,6 +3804,15 @@ array-equal@^1.0.0: resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" integrity sha512-H3LU5RLiSsGXPhN+Nipar0iR0IofH+8r89G2y1tBKxQ/agagKyAjhkAFDRBfodP2caPrNKHpAWNIM/c9yeL7uA== +array-sort@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" + integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== + dependencies: + default-compare "^1.0.0" + get-value "^2.0.6" + kind-of "^5.0.2" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -3710,6 +3944,13 @@ atomic-sleep@^1.0.0: resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== +autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ== + dependencies: + gulp-header "^1.7.1" + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -4411,7 +4652,7 @@ chmodr@1.2.0: resolved "https://registry.yarnpkg.com/chmodr/-/chmodr-1.2.0.tgz#720e96caa09b7f1cdbb01529b7d0ab6bc5e118b9" integrity sha512-Y5uI7Iq/Az6HgJEL6pdw7THVd7jbVOTPwsmcPOBjQL8e3N+pz872kzK5QxYGEy21iRys+iHWV0UZQXDFJo1hyA== -chokidar@^3.5.2: +chokidar@^3.5.2, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -4542,6 +4783,18 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== +codemirror-spell-checker@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz#1c660f9089483ccb5113b9ba9ca19c3f4993371e" + integrity sha512-2Tl6n0v+GJRsC9K3MLCdLaMOmvWL0uukajNJseorZJsslaxZyZMgENocPU8R0DyoTAiKsyqiemSOZo7kjGV0LQ== + dependencies: + typo-js "*" + +codemirror@^5.63.1: + version "5.65.7" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.7.tgz#29af41ce5f4c2b8f1c1e16f4e645ff392823716a" + integrity sha512-zb67cXzgugIQmb6tfD4G11ILjYoMfTjwcjn+cWsa4GewlI2adhR/h3kolkoCQTm1msD/1BuqVTKuO09ELsS++A== + collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -4692,6 +4945,13 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +concat-with-sourcemaps@*: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + condense-newlines@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/condense-newlines/-/condense-newlines-0.2.1.tgz#3de985553139475d32502c83b02f60684d24c55f" @@ -5098,6 +5358,13 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +default-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== + dependencies: + kind-of "^5.0.2" + default-shell@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/default-shell/-/default-shell-1.0.1.tgz#752304bddc6174f49eb29cb988feea0b8813c8bc" @@ -5265,11 +5532,25 @@ doctrine@3.0.0, doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-serializer@^1.0.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" + integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" + dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== +domelementtype@^2.0.1, domelementtype@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -5284,6 +5565,22 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" +domhandler@^4.0.0, domhandler@^4.2.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" + integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== + dependencies: + domelementtype "^2.2.0" + +domutils@^2.5.2: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -5328,6 +5625,11 @@ download@8.0.0: p-event "^2.1.0" pify "^4.0.1" +downloadjs@1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/downloadjs/-/downloadjs-1.4.7.tgz#f69f96f940e0d0553dac291139865a3cd0101e3c" + integrity sha512-LN1gO7+u9xjU5oEScGFKvXhYf7Y/empUIIEAGBs1LzUq/rg5duiDrkuH5A2lQGd5jfMOb9X9usDa2oVXwJ0U/Q== + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -5343,6 +5645,17 @@ duplexify@^4.0.0: readable-stream "^3.1.1" stream-shift "^1.0.0" +easymde@^2.16.1: + version "2.16.1" + resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.16.1.tgz#f4c2380312615cb33826f1a1fecfaa4022ff551a" + integrity sha512-FihYgjRsKfhGNk89SHSqxKLC4aJ1kfybPWW6iAmtb5GnXu+tnFPSzSaGBmk1RRlCuhFSjhF0SnIMGVPjEzkr6g== + dependencies: + "@types/codemirror" "^5.60.4" + "@types/marked" "^4.0.1" + codemirror "^5.63.1" + codemirror-spell-checker "1.1.2" + marked "^4.0.10" + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -5454,6 +5767,16 @@ enhanced-resolve@^5.9.3: graceful-fs "^4.2.4" tapable "^2.2.0" +ent@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== + +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + entities@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" @@ -5887,6 +6210,16 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== +estree-walker@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" + integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== + +estree-walker@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -6436,6 +6769,11 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== + fs-extra@8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -6584,6 +6922,14 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.3" +get-object@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/get-object/-/get-object-0.2.0.tgz#d92ff7d5190c64530cda0543dac63a3d47fe8c0c" + integrity sha512-7P6y6k6EzEFmO/XyUyFlXm1YLJy9xeA1x/grNV8276abX5GuwUtYgKFkRFkLixw4hf4Pz9q2vgv/8Ar42R0HuQ== + dependencies: + is-number "^2.0.2" + isobject "^0.2.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -6646,6 +6992,13 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== +get-value@^3.0.0, get-value@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-3.0.1.tgz#5efd2a157f1d6a516d7524e124ac52d0a39ef5a8" + integrity sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA== + dependencies: + isobject "^3.0.1" + getopts@2.2.5: version "2.2.5" resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" @@ -6951,7 +7304,24 @@ gtoken@^5.0.4: google-p12-pem "^3.1.3" jws "^4.0.0" -handlebars@^4.7.7: +gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + +handlebars-utils@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9" + integrity sha512-d5mmoQXdeEqSKMtQQZ9WkiUcO1E3tPbWxluCK9hVgIDPzQa9WsKo3Lbe/sGflTe7TomHEeZaOgwIkyIr1kfzkw== + dependencies: + kind-of "^6.0.0" + typeof-article "^0.1.1" + +handlebars@^4.7.6, handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== @@ -7045,6 +7415,14 @@ has-value@^1.0.0: has-values "^1.0.0" isobject "^3.0.0" +has-value@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-2.0.2.tgz#d0f12e8780ba8e90e66ad1a21c707fdb67c25658" + integrity sha512-ybKOlcRsK2MqrM3Hmz/lQxXHZ6ejzSPzpNabKB45jb5qDgJvKPa3SdapTsTLwEb9WltgWpOmNax7i+DzNOk4TA== + dependencies: + get-value "^3.0.0" + has-values "^2.0.1" + has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" @@ -7058,6 +7436,13 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" +has-values@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-2.0.1.tgz#3876200ff86d8a8546a9264a952c17d5fc17579d" + integrity sha512-+QdH3jOmq9P8GfdjFg0eJudqx1FqU62NQJ4P16rOEHeRdl7ckgwn6uqQjzYE0ZoHVV/e5E2esuJ5Gl5+HUW19w== + dependencies: + kind-of "^6.0.2" + has-yarn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" @@ -7070,6 +7455,16 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +helper-md@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/helper-md/-/helper-md-0.2.2.tgz#c1f59d7e55bbae23362fd8a0e971607aec69d41f" + integrity sha512-49TaQzK+Ic7ZVTq4i1UZxRUJEmAilTk8hz7q4I0WNUaTclLR8ArJV5B3A1fe1xF2HtsDTr2gYKLaVTof/Lt84Q== + dependencies: + ent "^2.2.0" + extend-shallow "^2.0.1" + fs-exists-sync "^0.1.0" + remarkable "^1.6.2" + homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -7106,6 +7501,24 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +html-tag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-tag/-/html-tag-2.0.0.tgz#36c3bc8d816fd30b570d5764a497a641640c2fed" + integrity sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g== + dependencies: + is-self-closing "^1.0.1" + kind-of "^6.0.0" + +htmlparser2@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + http-assert@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.5.0.tgz#c389ccd87ac16ed2dfa6246fd73b926aa00e6b8f" @@ -7546,6 +7959,13 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-even@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-even/-/is-even-1.0.0.tgz#76b5055fbad8d294a86b6a949015e1c97b717c06" + integrity sha512-LEhnkAdJqic4Dbqn58A0y52IXoHWlsueqQkKfMfdEnIYG8A1sm/GHidKkS6yvXlMoRrkM34csHnXQtOqcb+Jzg== + dependencies: + is-odd "^0.1.2" + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -7635,6 +8055,13 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" +is-number@^2.0.2: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg== + dependencies: + kind-of "^3.0.2" + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -7657,6 +8084,13 @@ is-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== +is-odd@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" + integrity sha512-Ri7C2K7o5IrUU9UEI8losXJCCD/UtsaIrkR5sxIcFg4xQ9cRJXlWA5DQvTE0yDc0krvSNLsRGXN11UPS6KyfBw== + dependencies: + is-number "^3.0.0" + is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -7674,6 +8108,11 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + is-potential-custom-element-name@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" @@ -7702,6 +8141,13 @@ is-retry-allowed@^2.2.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz#88f34cbd236e043e71b6932d09b0c65fb7b4d71d" integrity sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg== +is-self-closing@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" + integrity sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg== + dependencies: + self-closing-tags "^1.0.1" + is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" @@ -7812,6 +8258,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isobject@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e" + integrity sha512-VaWq6XYAsbvM0wf4dyBO7WH9D7GosB7ZZlqrawI9BBiTMINBeCyqSKBa35m870MY3O4aM31pYyZi9DfGrYMJrQ== + isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" @@ -8992,7 +9443,7 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== @@ -9006,12 +9457,12 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0: +kind-of@^5.0.0, kind-of@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -9271,6 +9722,11 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" +leaflet@^1.7.1: + version "1.8.0" + resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.8.0.tgz#4615db4a22a304e8e692cae9270b983b38a2055e" + integrity sha512-gwhMjFCQiYs3x/Sf+d49f10ERXaEFCPr+nVTryhAW8DWbMGqJqt9G4XuIaHmFW08zYvhgdzqXGr8AlW8v8dQkA== + left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -9465,6 +9921,11 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -9575,6 +10036,21 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== +lodash.template@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.without@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" @@ -9585,7 +10061,7 @@ lodash.xor@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.xor/-/lodash.xor-4.5.0.tgz#4d48ed7e98095b0632582ba714d3ff8ae8fb1db6" integrity sha512-sVN2zimthq7aZ5sPGXnSz32rZPuqcparVW50chJQe+mzTYV+IsxSsl/2gnkWWE2Of7K3myBQBqtLKOUEHJKRsQ== -lodash@4.17.21, lodash@^4.14.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.7.0: +lodash@4.17.21, lodash@^4.14.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -9653,6 +10129,13 @@ ltgt@2.2.1, ltgt@^2.1.2, ltgt@~2.2.0: resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" integrity sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA== +magic-string@^0.25.7: + version "0.25.9" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" + integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ== + dependencies: + sourcemap-codec "^1.4.8" + make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -9717,6 +10200,11 @@ markdown-it@^12.2.0: mdurl "^1.0.1" uc.micro "^1.0.5" +marked@^4.0.10: + version "4.0.18" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.18.tgz#cd0ac54b2e5610cfb90e8fd46ccaa8292c9ed569" + integrity sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw== + matcher@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca" @@ -9789,7 +10277,7 @@ methods@^1.0.1, methods@^1.1.1, methods@^1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.5: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -10047,6 +10535,16 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA== +nanoid@^2.1.0: + version "2.1.11" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" + integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== + +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -10644,6 +11142,11 @@ parse-passwd@^1.0.0: resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== +parse-srcset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-srcset/-/parse-srcset-1.0.2.tgz#f2bd221f6cc970a938d88556abc589caaaa2bde1" + integrity sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q== + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -10890,7 +11393,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -11005,6 +11508,15 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +postcss@^8.3.11: + version "8.4.16" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.16.tgz#33a1d675fac39941f5f445db0de4db2b6e01d43c" + integrity sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + postgres-array@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" @@ -11753,6 +12265,16 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexparam@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-2.0.1.tgz#c912f5dae371e3798100b3c9ce22b7414d0889fa" + integrity sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw== + +regexparam@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f" + integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g== + regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" @@ -11796,6 +12318,21 @@ regjsparser@^0.8.2: dependencies: jsesc "~0.5.0" +relative@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" + integrity sha512-Q5W2qeYtY9GbiR8z1yHNZ1DGhyjb4AnLEjt8iE6XfcC1QIu+FAtj3HQaO0wH28H1mX6cqNLvAqWhP402dxJGyA== + dependencies: + isobject "^2.0.0" + +remarkable@^1.6.2: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -12007,6 +12544,13 @@ roarr@^2.15.3: semver-compare "^1.0.0" sprintf-js "^1.1.2" +rollup-plugin-polyfill-node@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.8.0.tgz#859c070822f5e38d221e5b4238cb34aa894c2b19" + integrity sha512-C4UeKedOmOBkB3FgR+z/v9kzRwV1Q/H8xWs1u1+CNe4XOV6hINfOrcO+TredKxYvopCmr+WKUSNsFUnD1RLHgQ== + dependencies: + "@rollup/plugin-inject" "^4.0.0" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -12073,6 +12617,18 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" +sanitize-html@^2.7.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.7.1.tgz#a6c2c1a88054a79eeacfac9b0a43f1b393476901" + integrity sha512-oOpe8l4J8CaBk++2haoN5yNI5beekjuHv3JRPKUx/7h40Rdr85pemn4NkvUB3TcBP7yjat574sPlcMAyv4UQig== + dependencies: + deepmerge "^4.2.2" + escape-string-regexp "^4.0.0" + htmlparser2 "^6.0.0" + is-plain-object "^5.0.0" + parse-srcset "^1.0.2" + postcss "^8.3.11" + sanitize-s3-objectkey@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/sanitize-s3-objectkey/-/sanitize-s3-objectkey-0.0.1.tgz#efa9887cd45275b40234fb4bb12fc5754fe64e7e" @@ -12111,6 +12667,11 @@ schema-utils@^3.1.0, schema-utils@^3.1.1: ajv "^6.12.5" ajv-keywords "^3.5.2" +screenfull@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-6.0.2.tgz#3dbe4b8c4f8f49fb8e33caa8f69d0bca730ab238" + integrity sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw== + search-params@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/search-params/-/search-params-3.0.0.tgz#dbc7c243058e5a33ae1e9870be91f5aced4100d8" @@ -12128,6 +12689,11 @@ seek-bzip@^1.0.5: dependencies: commander "^2.8.1" +self-closing-tags@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" + integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== + semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -12263,6 +12829,13 @@ shimmer@^1.2.0: resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== +shortid@^2.2.15: + version "2.2.16" + resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608" + integrity sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g== + dependencies: + nanoid "^2.1.0" + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -12427,6 +13000,11 @@ source-list-map@^2.0.1: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -12480,6 +13058,11 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== +sourcemap-codec@^1.4.8: + version "1.4.8" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" + integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== + spark-md5@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/spark-md5/-/spark-md5-3.0.1.tgz#83a0e255734f2ab4e5c466e5a2cfc9ba2aa2124d" @@ -12804,6 +13387,11 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" +striptags@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.2.0.tgz#cc74a137db2de8b0b9a370006334161f7dd67052" + integrity sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw== + style-loader@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" @@ -12903,7 +13491,14 @@ svelte-portal@^1.0.0: resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3" integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q== -svelte@3.49.0: +svelte-spa-router@^3.0.5: + version "3.3.0" + resolved "https://registry.yarnpkg.com/svelte-spa-router/-/svelte-spa-router-3.3.0.tgz#2fc0967a49dc361dfe4d38dddad6e662eed5b42c" + integrity sha512-cwRNe7cxD43sCvSfEeaKiNZg3FCizGxeMcf7CPiWRP3jKXjEma3vxyyuDtPOam6nWbVxl9TNM3hlE/i87ZlqcQ== + dependencies: + regexparam "2.0.1" + +svelte@3.49.0, svelte@^3.46.2, svelte@^3.49.0: version "3.49.0" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== @@ -13265,6 +13860,11 @@ to-fast-properties@^2.0.0: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= +to-gfm-code-block@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" + integrity sha512-LQRZWyn8d5amUKnfR9A9Uu7x9ss7Re8peuWR2gkh1E+ildOfv2aF26JpuDg8JtvCduu5+hOrMIH+XstZtnagqg== + to-json-schema@0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/to-json-schema/-/to-json-schema-0.2.5.tgz#ef3c3f11ad64460dcfbdbafd0fd525d69d62a98f" @@ -13511,6 +14111,13 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typeof-article@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/typeof-article/-/typeof-article-0.1.1.tgz#9f07e733c3fbb646ffa9e61c08debacd460e06af" + integrity sha512-Vn42zdX3FhmUrzEmitX3iYyLb+Umwpmv8fkZRIknYh84lmdrwqZA5xYaoKiIj2Rc5i/5wcDrpUmZcbk1U51vTw== + dependencies: + kind-of "^3.1.0" + typeof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typeof/-/typeof-1.0.0.tgz#9c84403f2323ae5399167275497638ea1d2f2440" @@ -13521,6 +14128,11 @@ typescript@4.6.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4" integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg== +typo-js@*: + version "1.2.2" + resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.2.tgz#340484d81fe518e77c81a5a770162b14492f183b" + integrity sha512-C7pYBQK17EjSg8tVNY91KHdUt5Nf6FMJ+c3js076quPmBML57PmNMzAcIq/2kf/hSYtFABNDIYNYlJRl5BJhGw== + uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" @@ -13845,6 +14457,14 @@ vm2@3.9.6: acorn "^8.7.0" acorn-walk "^8.2.0" +vm2@^3.9.4: + version "3.9.10" + resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.10.tgz#c66543096b5c44c8861a6465805c23c7cc996a44" + integrity sha512-AuECTSvwu2OHLAZYhG716YzwodKCIJxB6u1zG7PgSQwIgAlEaoXH52bxdcvT8GkGjnYK7r7yWDW0m0sOsPuBjQ== + dependencies: + acorn "^8.7.0" + acorn-walk "^8.2.0" + vuvuzela@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/vuvuzela/-/vuvuzela-1.0.3.tgz#3be145e58271c73ca55279dd851f12a682114b0b" @@ -14398,6 +15018,11 @@ yauzl@^2.4.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" +year@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" + integrity sha512-9GnJUZ0QM4OgXuOzsKNzTJ5EOkums1Xc+3YQXp+Q+UxFjf7zLucp9dQ8QMIft0Szs1E1hUiXFim1OYfEKFq97w== + ylru@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.3.2.tgz#0de48017473275a4cbdfc83a1eaf67c01af8a785" diff --git a/packages/types/src/documents/plugin/index.ts b/packages/types/src/documents/plugin/index.ts index 03a239a6c9..8133e91523 100644 --- a/packages/types/src/documents/plugin/index.ts +++ b/packages/types/src/documents/plugin/index.ts @@ -2,3 +2,8 @@ export enum PluginType { DATASOURCE = "datasource", COMPONENT = "component", } + +export interface FileType { + path: string + name: string +} From 16d17cefd31b660ce84357cabc40ee0c1df45b88 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 16 Aug 2022 09:58:47 +0100 Subject: [PATCH 040/280] fix password modal length in user onboarding flow --- .../portal/manage/users/_components/PasswordModal.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/PasswordModal.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/PasswordModal.svelte index 02501f2de0..e7ee28411b 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/PasswordModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/PasswordModal.svelte @@ -42,7 +42,7 @@ Date: Tue, 16 Aug 2022 09:25:16 +0000 Subject: [PATCH 041/280] Proxy vite HMR websocket in dev --- hosting/nginx.dev.conf.hbs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosting/nginx.dev.conf.hbs b/hosting/nginx.dev.conf.hbs index 9398b7e719..91f495cfac 100644 --- a/hosting/nginx.dev.conf.hbs +++ b/hosting/nginx.dev.conf.hbs @@ -77,6 +77,11 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } + location /ws { + proxy_pass http://{{ address }}:3000; + rewrite ^/ws(.*)$ /$1 break; + } + location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; From 4c6b9a03d19b210695207e685a7967881bb643ed Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 16 Aug 2022 09:26:23 +0000 Subject: [PATCH 042/280] Support env variables for vite config --- packages/builder/vite.config.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/builder/vite.config.js b/packages/builder/vite.config.js index 56ffbf20f5..9859e1dbb9 100644 --- a/packages/builder/vite.config.js +++ b/packages/builder/vite.config.js @@ -1,15 +1,22 @@ import { svelte } from "@sveltejs/vite-plugin-svelte" import replace from "@rollup/plugin-replace" +import { defineConfig, loadEnv } from "vite" import path from "path" -export default ({ mode }) => { +export default defineConfig(({ mode }) => { const isProduction = mode === "production" + const env = loadEnv(mode, process.cwd()) return { server: { fs: { strict: false, }, + hmr: { + protocol: "wss", + clientPort: env.VITE_HMR_CLIENT_PORT || 3000, + path: env.VITE_HMR_PATH || "/" + } }, base: "/builder/", build: { @@ -79,4 +86,4 @@ export default ({ mode }) => { ], }, } -} +}) From 76e18fb6dee1602e1bf5201fae4452e5777e7f59 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 16 Aug 2022 12:13:47 +0100 Subject: [PATCH 043/280] Support tiered pricing for day passes and update upgrade UI --- packages/backend-core/src/index.ts | 2 ++ packages/types/src/documents/account/account.ts | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/backend-core/src/index.ts b/packages/backend-core/src/index.ts index c899173891..c604dd6068 100644 --- a/packages/backend-core/src/index.ts +++ b/packages/backend-core/src/index.ts @@ -14,6 +14,7 @@ import auth from "./auth" import constants from "./constants" import * as dbConstants from "./db/constants" import * as logging from "./logging" +import * as middleware from "./middleware" // mimic the outer package exports import * as db from "./pkg/db" @@ -52,6 +53,7 @@ const core = { errors, logging, ...errorClasses, + middleware, } export = core diff --git a/packages/types/src/documents/account/account.ts b/packages/types/src/documents/account/account.ts index 344b699137..e6f48ff001 100644 --- a/packages/types/src/documents/account/account.ts +++ b/packages/types/src/documents/account/account.ts @@ -22,11 +22,6 @@ export const isCreatePasswordAccount = ( account: CreateAccount ): account is CreatePassswordAccount => account.authType === AuthType.PASSWORD -export interface UpdateAccount { - stripeCustomerId?: string - licenseKey?: string -} - export interface Account extends CreateAccount { // generated accountId: string From 468e840a0c771ae90cac6d869d1cc3f5e49858e8 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 16 Aug 2022 14:02:51 +0000 Subject: [PATCH 044/280] Only watch plugins in single tenant envs --- packages/server/src/app.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 2f8adc879d..6f63715cfb 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -25,7 +25,7 @@ import * as migrations from "./migrations" import { events, installation, tenancy } from "@budibase/backend-core" import { createAdminUser, getChecklist } from "./utilities/workerRequests" import { processPlugin } from "./api/controllers/plugin" -import { getGlobalDB } from "@budibase/backend-core/tenancy" +import { DEFAULT_TENANT_ID } from "@budibase/backend-core/constants" const app = new Koa() @@ -138,7 +138,7 @@ module.exports = server.listen(env.PORT || 0, async () => { } // monitor plugin directory if required - if (env.SELF_HOSTED && env.PLUGINS_DIR && fs.existsSync(env.PLUGINS_DIR)) { + if (env.SELF_HOSTED && !env.MULTI_TENANCY && env.PLUGINS_DIR && fs.existsSync(env.PLUGINS_DIR)) { const watchPath = path.join(env.PLUGINS_DIR, "./**/dist/*.tar.gz") chokidar .watch(watchPath, { @@ -146,8 +146,7 @@ module.exports = server.listen(env.PORT || 0, async () => { awaitWriteFinish: true, }) .on("all", async (event: string, path: string) => { - const tenantId = tenancy.getTenantId() - await tenancy.doInTenant(tenantId, async () => { + await tenancy.doInTenant(DEFAULT_TENANT_ID, async () => { try { const split = path.split("/") const name = split[split.length - 1] From 3518642b150ac31dd931551d304885805035998a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 16 Aug 2022 14:42:32 +0000 Subject: [PATCH 045/280] Add missing declaration of objectstore module --- packages/server/src/module.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/server/src/module.d.ts b/packages/server/src/module.d.ts index 4c0e13586a..eb1d1feb48 100644 --- a/packages/server/src/module.d.ts +++ b/packages/server/src/module.d.ts @@ -10,3 +10,4 @@ declare module "@budibase/backend-core/sessions" declare module "@budibase/backend-core/encryption" declare module "@budibase/backend-core/utils" declare module "@budibase/backend-core/redis" +declare module "@budibase/backend-core/objectStore" From 5807488f19d089df7ec3df5f13e454fb5ba0b879 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 16 Aug 2022 15:14:47 +0000 Subject: [PATCH 046/280] Add PLUGINS_DIR env var and show example mount for HMR of plugins --- hosting/docker-compose.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index 7d3e6960dc..4506467791 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -25,9 +25,12 @@ services: REDIS_PASSWORD: ${REDIS_PASSWORD} BB_ADMIN_USER_EMAIL: ${BB_ADMIN_USER_EMAIL} BB_ADMIN_USER_PASSWORD: ${BB_ADMIN_USER_PASSWORD} + PLUGINS_DIR: ${PLUGINS_DIR} depends_on: - worker-service - redis-service +# volumes: +# - /some/path/to/plugins:/plugins worker-service: restart: unless-stopped From 50c0e9ca69cb11961bbe1a647957048524df0305 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 16 Aug 2022 15:16:46 +0000 Subject: [PATCH 047/280] Default plugins dir to /plugins --- packages/server/src/app.ts | 7 ++++++- packages/server/src/environment.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 6f63715cfb..e9a5661093 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -138,7 +138,12 @@ module.exports = server.listen(env.PORT || 0, async () => { } // monitor plugin directory if required - if (env.SELF_HOSTED && !env.MULTI_TENANCY && env.PLUGINS_DIR && fs.existsSync(env.PLUGINS_DIR)) { + if ( + env.SELF_HOSTED && + !env.MULTI_TENANCY && + env.PLUGINS_DIR && + fs.existsSync(env.PLUGINS_DIR) + ) { const watchPath = path.join(env.PLUGINS_DIR, "./**/dist/*.tar.gz") chokidar .watch(watchPath, { diff --git a/packages/server/src/environment.js b/packages/server/src/environment.js index 5a7aa61b9d..5524159a78 100644 --- a/packages/server/src/environment.js +++ b/packages/server/src/environment.js @@ -77,7 +77,7 @@ module.exports = { SQL_MAX_ROWS: process.env.SQL_MAX_ROWS, BB_ADMIN_USER_EMAIL: process.env.BB_ADMIN_USER_EMAIL, BB_ADMIN_USER_PASSWORD: process.env.BB_ADMIN_USER_PASSWORD, - PLUGINS_DIR: process.env.PLUGINS_DIR, + PLUGINS_DIR: process.env.PLUGINS_DIR || "/plugins", // flags ALLOW_DEV_AUTOMATIONS: process.env.ALLOW_DEV_AUTOMATIONS, DISABLE_THREADING: process.env.DISABLE_THREADING, From 63742ec7f0cf440a7eac4816a0256e958b6b06f0 Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Tue, 16 Aug 2022 16:27:03 +0100 Subject: [PATCH 048/280] Adding watch command to CLI. --- packages/builder/vite.config.js | 4 ++-- packages/cli/src/plugins/index.js | 31 +++++++++++++++++++++++++++++-- packages/cli/src/prebuilds.js | 5 ++++- packages/cli/yarn.lock | 26 +++++++++++++------------- packages/server/src/app.ts | 7 ++++++- packages/server/yarn.lock | 31 +++++++++++++++---------------- packages/worker/yarn.lock | 31 +++++++++++++++---------------- 7 files changed, 84 insertions(+), 51 deletions(-) diff --git a/packages/builder/vite.config.js b/packages/builder/vite.config.js index 9859e1dbb9..20ff93831c 100644 --- a/packages/builder/vite.config.js +++ b/packages/builder/vite.config.js @@ -15,8 +15,8 @@ export default defineConfig(({ mode }) => { hmr: { protocol: "wss", clientPort: env.VITE_HMR_CLIENT_PORT || 3000, - path: env.VITE_HMR_PATH || "/" - } + path: env.VITE_HMR_PATH || "/", + }, }, base: "/builder/", build: { diff --git a/packages/cli/src/plugins/index.js b/packages/cli/src/plugins/index.js index e6de624b63..3ee2463a31 100644 --- a/packages/cli/src/plugins/index.js +++ b/packages/cli/src/plugins/index.js @@ -41,7 +41,7 @@ async function init(opts) { console.log(info(`Plugin created in directory "${name}"`)) } -async function build() { +async function verify() { console.log(info("Verifying plugin...")) const schema = fs.readFileSync("schema.json", "utf8") const pkg = fs.readFileSync("package.json", "utf8") @@ -57,21 +57,43 @@ async function build() { name = pkgJson.name version = pkgJson.version validate(schemaJson) + return { name, version } } catch (err) { if (err && err.message && err.message.includes("not valid JSON")) { console.log(error(`schema.json is not valid JSON: ${err.message}`)) } else { console.log(error(`Invalid schema/package.json: ${err.message}`)) } + } +} + +async function build() { + const verified = await verify() + if (!verified.name) { return } console.log(success("Verified!")) console.log(info("Building plugin...")) await runPkgCommand("build") - const output = join("dist", `${name}-${version}.tar.gz`) + const output = join("dist", `${verified.name}-${verified.version}.tar.gz`) console.log(success(`Build complete - output in: ${output}`)) } +async function watch() { + const verified = await verify() + if (!verified.name) { + return + } + const output = join("dist", `${verified.name}-${verified.version}.tar.gz`) + console.log(info(`Watching - build in: ${output}`)) + try { + await runPkgCommand("watch") + } catch (err) { + // always errors when user escapes + console.log(success("Watch exited.")) + } +} + const command = new Command(`${CommandWords.PLUGIN}`) .addHelp( "Custom plugins for Budibase, init, build and verify your components and datasources with this tool." @@ -86,5 +108,10 @@ const command = new Command(`${CommandWords.PLUGIN}`) "Build your plugin, this will verify and produce a final tarball for your project.", build ) + .addSubOption( + "--watch", + "Automatically build any changes to your plugin.", + watch + ) exports.command = command diff --git a/packages/cli/src/prebuilds.js b/packages/cli/src/prebuilds.js index ecc59f964a..b8f380a937 100644 --- a/packages/cli/src/prebuilds.js +++ b/packages/cli/src/prebuilds.js @@ -5,7 +5,10 @@ const PREBUILDS = "prebuilds" const ARCH = `${os.platform()}-${os.arch()}` const PREBUILD_DIR = join(process.execPath, "..", PREBUILDS, ARCH) -checkForBinaries() +// running as built CLI pkg bundle +if (!process.argv[0].includes("node")) { + checkForBinaries() +} function checkForBinaries() { const readDir = join(__filename, "..", "..", PREBUILDS, ARCH) diff --git a/packages/cli/yarn.lock b/packages/cli/yarn.lock index 43c219fcd7..72b4bb328e 100644 --- a/packages/cli/yarn.lock +++ b/packages/cli/yarn.lock @@ -43,12 +43,12 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@budibase/backend-core@^1.2.38": - version "1.2.38" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.38.tgz#9451ae72f6af8cff3aa0a57dc61fc8d3505a77a0" - integrity sha512-g7m4fHG1tLqNsSvdSltqRHLASOH5n3QBbN5DD7cmSBIVpUtDCA0EMx/L0vkDDhTmbOQApXAW3cyJs6H3QiWtOw== +"@budibase/backend-core@1.2.40": + version "1.2.40" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.40.tgz#692062478f310eaee780adbc55e266fc3b6649b6" + integrity sha512-HUw6IQgKkP345vnQcTok6X+inqYe0WpUL7uFJnm3XERvsAWX4FYWbgDoGJGS0+jZjdPjvARkt4+uZuTAEUFLiQ== dependencies: - "@budibase/types" "^1.2.38" + "@budibase/types" "^1.2.40" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -101,10 +101,10 @@ to-gfm-code-block "^0.1.1" year "^0.2.1" -"@budibase/string-templates@^1.2.38": - version "1.2.38" - resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.2.38.tgz#404804df516fb981b4f073f09bab64c9111cecb0" - integrity sha512-JRIAZVuuBECxDBcbx5FOYRRKi1ZyW7//LwKL5U1r9sIVCIxCW1t5b175oTnR9/bkktNs7X2ziynH/tsT5GVC0g== +"@budibase/string-templates@1.2.40": + version "1.2.40" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.2.40.tgz#d7012b415a51e0119ac098e77d052f96bc04e742" + integrity sha512-Vc/DrmJ//kpT+QoIGqloVnomBJgHVPNIiCOXc+2XSsN5HyR18S8uO7lc77cpln3dTlvNcd7bQqXO1UIx8oebUQ== dependencies: "@budibase/handlebars-helpers" "^0.11.8" dayjs "^1.10.4" @@ -113,10 +113,10 @@ lodash "^4.17.20" vm2 "^3.9.4" -"@budibase/types@^1.2.38": - version "1.2.38" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.38.tgz#472f4ec891242488561a8cfc175961664bc7ac88" - integrity sha512-pMKh4FKhPoa1pge4FKqPi3gbzZp3HJ1RuhM5naKFqC1yompIn/Es+YNft39VC2bTW5tiGbucMcjWzdpMwTSTVw== +"@budibase/types@1.2.40", "@budibase/types@^1.2.40": + version "1.2.40" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.40.tgz#c1456728b61966cab7fe3689bd044bf415faa138" + integrity sha512-eNZFG0C/GBog87y6StKBjdF/aDJJtUHbAM8NWLUNNqTAiMxO2s3XhDN1dE6t74NBCRFzJo2sAD+34pJHhKFanQ== "@eslint/eslintrc@^0.4.3": version "0.4.3" diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 6f63715cfb..e9a5661093 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -138,7 +138,12 @@ module.exports = server.listen(env.PORT || 0, async () => { } // monitor plugin directory if required - if (env.SELF_HOSTED && !env.MULTI_TENANCY && env.PLUGINS_DIR && fs.existsSync(env.PLUGINS_DIR)) { + if ( + env.SELF_HOSTED && + !env.MULTI_TENANCY && + env.PLUGINS_DIR && + fs.existsSync(env.PLUGINS_DIR) + ) { const watchPath = path.join(env.PLUGINS_DIR, "./**/dist/*.tar.gz") chokidar .watch(watchPath, { diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index ebfd49ce8b..e39b0b97c4 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,19 +1094,18 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.39-alpha.8": - version "1.2.39-alpha.8" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.39-alpha.8.tgz#70c4d3de7c68feaa3d7b183e4c9cfb1baf3d3d47" - integrity sha512-vBGPIei1qVPmbrHKGD4Swf7ECOWGXV+2buRIOkr0gRawK8oLOXc2xYV1zsDM7jd7rTMwtyF86fL/lhaSkXWwKA== +"@budibase/backend-core@1.2.40": + version "1.2.40" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.40.tgz#692062478f310eaee780adbc55e266fc3b6649b6" + integrity sha512-HUw6IQgKkP345vnQcTok6X+inqYe0WpUL7uFJnm3XERvsAWX4FYWbgDoGJGS0+jZjdPjvARkt4+uZuTAEUFLiQ== dependencies: - "@budibase/types" "1.2.39-alpha.8" + "@budibase/types" "^1.2.40" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" dotenv "16.0.1" emitter-listener "1.1.2" ioredis "4.28.0" - joi "17.6.0" jsonwebtoken "8.5.1" koa-passport "4.1.4" lodash "4.17.21" @@ -1178,13 +1177,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.2.39-alpha.8": - version "1.2.39-alpha.8" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.39-alpha.8.tgz#11433da0dba0e6c81ad93d6cabc5ce165db94e0f" - integrity sha512-1N3FnVPhUwh2KR0IGiN+EjbY3LpF563Ac2FyT/JgyS9wG6NTP0hV/ugA7TZIvkv2XaYroYMYSPBa/wYtWh4xBQ== +"@budibase/pro@1.2.40": + version "1.2.40" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.40.tgz#007cad4d8341698104498ae7d1578a7e26760dd7" + integrity sha512-lGB0/O8l63FtpP1dOzxowFUjgj7SrRSVsODygPB7oScfUBtbqHyZKC4EafrVpJT4A8hbdh1ijQZ8PLJE/YdRkQ== dependencies: - "@budibase/backend-core" "1.2.39-alpha.8" - "@budibase/types" "1.2.39-alpha.8" + "@budibase/backend-core" "1.2.40" + "@budibase/types" "1.2.40" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1207,10 +1206,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.2.39-alpha.8": - version "1.2.39-alpha.8" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.39-alpha.8.tgz#2999dac33da64b41f222d0fe73cfd387957952d9" - integrity sha512-UbknZ3Pnl8tdCPy5XKkuW3OQb1T/L+n1slY8/orm8KpR/TOEhK4Q20JRxENqQo5f9Za8bX4COesLjwAmae426Q== +"@budibase/types@1.2.40", "@budibase/types@^1.2.40": + version "1.2.40" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.40.tgz#c1456728b61966cab7fe3689bd044bf415faa138" + integrity sha512-eNZFG0C/GBog87y6StKBjdF/aDJJtUHbAM8NWLUNNqTAiMxO2s3XhDN1dE6t74NBCRFzJo2sAD+34pJHhKFanQ== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 9b29ca8dc7..9806952df8 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,19 +291,18 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.2.39-alpha.8": - version "1.2.39-alpha.8" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.39-alpha.8.tgz#70c4d3de7c68feaa3d7b183e4c9cfb1baf3d3d47" - integrity sha512-vBGPIei1qVPmbrHKGD4Swf7ECOWGXV+2buRIOkr0gRawK8oLOXc2xYV1zsDM7jd7rTMwtyF86fL/lhaSkXWwKA== +"@budibase/backend-core@1.2.40": + version "1.2.40" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.2.40.tgz#692062478f310eaee780adbc55e266fc3b6649b6" + integrity sha512-HUw6IQgKkP345vnQcTok6X+inqYe0WpUL7uFJnm3XERvsAWX4FYWbgDoGJGS0+jZjdPjvARkt4+uZuTAEUFLiQ== dependencies: - "@budibase/types" "1.2.39-alpha.8" + "@budibase/types" "^1.2.40" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" dotenv "16.0.1" emitter-listener "1.1.2" ioredis "4.28.0" - joi "17.6.0" jsonwebtoken "8.5.1" koa-passport "4.1.4" lodash "4.17.21" @@ -325,21 +324,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.2.39-alpha.8": - version "1.2.39-alpha.8" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.39-alpha.8.tgz#11433da0dba0e6c81ad93d6cabc5ce165db94e0f" - integrity sha512-1N3FnVPhUwh2KR0IGiN+EjbY3LpF563Ac2FyT/JgyS9wG6NTP0hV/ugA7TZIvkv2XaYroYMYSPBa/wYtWh4xBQ== +"@budibase/pro@1.2.40": + version "1.2.40" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.40.tgz#007cad4d8341698104498ae7d1578a7e26760dd7" + integrity sha512-lGB0/O8l63FtpP1dOzxowFUjgj7SrRSVsODygPB7oScfUBtbqHyZKC4EafrVpJT4A8hbdh1ijQZ8PLJE/YdRkQ== dependencies: - "@budibase/backend-core" "1.2.39-alpha.8" - "@budibase/types" "1.2.39-alpha.8" + "@budibase/backend-core" "1.2.40" + "@budibase/types" "1.2.40" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.2.39-alpha.8": - version "1.2.39-alpha.8" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.39-alpha.8.tgz#2999dac33da64b41f222d0fe73cfd387957952d9" - integrity sha512-UbknZ3Pnl8tdCPy5XKkuW3OQb1T/L+n1slY8/orm8KpR/TOEhK4Q20JRxENqQo5f9Za8bX4COesLjwAmae426Q== +"@budibase/types@1.2.40", "@budibase/types@^1.2.40": + version "1.2.40" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.40.tgz#c1456728b61966cab7fe3689bd044bf415faa138" + integrity sha512-eNZFG0C/GBog87y6StKBjdF/aDJJtUHbAM8NWLUNNqTAiMxO2s3XhDN1dE6t74NBCRFzJo2sAD+34pJHhKFanQ== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 9b20e91eb2e45b2e8b366c03ee68020a209db6ed Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 17 Aug 2022 09:21:36 +0100 Subject: [PATCH 049/280] Update vite config to work properly with all defaults --- packages/builder/vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/vite.config.js b/packages/builder/vite.config.js index 20ff93831c..ad58b472dd 100644 --- a/packages/builder/vite.config.js +++ b/packages/builder/vite.config.js @@ -13,7 +13,7 @@ export default defineConfig(({ mode }) => { strict: false, }, hmr: { - protocol: "wss", + protocol: env.VITE_HMR_PROTOCOL || "ws", clientPort: env.VITE_HMR_CLIENT_PORT || 3000, path: env.VITE_HMR_PATH || "/", }, From 2aaff7576bcf201ea522fb96054d4ebfb603969a Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 17 Aug 2022 10:05:13 +0100 Subject: [PATCH 050/280] Adding full flow for creating custom datasource. --- .../modals/CreateDatasourceModal.svelte | 3 +++ .../modals/DatasourceConfigModal.svelte | 5 ++++- packages/server/src/integrations/index.ts | 16 ++++++++++++-- .../server/src/utilities/fileSystem/index.js | 22 +++++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte index 2d5e6976bf..33953493f6 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte @@ -49,6 +49,9 @@ schema: selected.datasource, auth: selected.auth, } + if (selected.friendlyName) { + integration.name = selected.friendlyName + } checkShowImport() } diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte index 0aaa2b201d..ecfd838b16 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte @@ -14,6 +14,9 @@ let datasource = cloneDeep(integration) let skipFetch = false + $: name = + IntegrationNames[datasource.type] || datasource.name || datasource.type + async function saveDatasource() { try { const resp = await save(datasource, skipFetch) @@ -32,7 +35,7 @@ saveDatasource()} onCancel={() => modal.show()} confirmText={datasource.plus diff --git a/packages/server/src/integrations/index.ts b/packages/server/src/integrations/index.ts index bf267e46cc..b9523061a4 100644 --- a/packages/server/src/integrations/index.ts +++ b/packages/server/src/integrations/index.ts @@ -15,6 +15,7 @@ import redis from "./redis" import snowflake from "./snowflake" import { getPlugins } from "../api/controllers/plugin" import { SourceName, Integration, PluginType } from "@budibase/types" +import { getDatasourcePlugin } from "../utilities/fileSystem" const environment = require("../environment") const { cloneDeep } = require("lodash") @@ -65,6 +66,8 @@ if (environment.SELF_HOSTED) { DEFINITIONS[SourceName.GOOGLE_SHEETS] = googlesheets.schema } +function isIntegrationAvailable(integration: string) {} + module.exports = { getDefinitions: async () => { const plugins = await getPlugins(PluginType.DATASOURCE) @@ -82,7 +85,16 @@ module.exports = { ...pluginSchemas, } }, - getIntegration: async () => { - return INTEGRATIONS + getIntegration: async (integration: string) => { + if (INTEGRATIONS[integration]) { + return INTEGRATIONS[integration] + } + const plugins = await getPlugins(PluginType.DATASOURCE) + for (let plugin of plugins) { + if (plugin.name === integration) { + // need to use commonJS require due to its dynamic runtime nature + return getDatasourcePlugin(plugin.name, plugin.jsUrl) + } + } }, } diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index 94c5a92375..9b124d6c29 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -26,9 +26,11 @@ const { const MemoryStream = require("memorystream") const { getAppId } = require("@budibase/backend-core/context") const tar = require("tar") +const fetch = require("node-fetch") const TOP_LEVEL_PATH = join(__dirname, "..", "..", "..") const NODE_MODULES_PATH = join(TOP_LEVEL_PATH, "node_modules") +const DATASOURCE_PATH = join(budibaseTempDir(), "datasource") /** * The single stack system (Cloud and Builder) should not make use of the file system where possible, @@ -348,6 +350,26 @@ exports.extractPluginTarball = async file => { return { metadata, directory: path } } +exports.getDatasourcePlugin = async (name, url) => { + if (!fs.existsSync(DATASOURCE_PATH)) { + fs.mkdirSync(DATASOURCE_PATH) + } + const filename = join(DATASOURCE_PATH, name) + if (fs.existsSync(filename)) { + return require(filename) + } + const response = fetch(url) + if (response.status === 200) { + const content = await response.text() + fs.writeFileSync(filename, content) + require(filename) + } else { + throw new Error( + `Unable to retrieve plugin - reason: ${await response.text()}` + ) + } +} + /** * Full function definition for below can be found in the utilities. */ From ee4f72126ad2f3b96b83af4dea6234040d818b09 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 17 Aug 2022 10:46:17 +0100 Subject: [PATCH 051/280] Updating custom datasource SVG - splitting out in UI. --- .../_components/DatasourceCard.svelte | 73 +++++++++++++++++++ .../DatasourceNavigator/icons/Custom.svelte | 57 ++++++++------- .../modals/CreateDatasourceModal.svelte | 45 +++++------- 3 files changed, 122 insertions(+), 53 deletions(-) create mode 100644 packages/builder/src/components/backend/DatasourceNavigator/_components/DatasourceCard.svelte diff --git a/packages/builder/src/components/backend/DatasourceNavigator/_components/DatasourceCard.svelte b/packages/builder/src/components/backend/DatasourceNavigator/_components/DatasourceCard.svelte new file mode 100644 index 0000000000..2dac2fec79 --- /dev/null +++ b/packages/builder/src/components/backend/DatasourceNavigator/_components/DatasourceCard.svelte @@ -0,0 +1,73 @@ + + +
dispatcher("selected", integrationType)} + class="item hoverable" +> +
+ +
+ {schema.friendlyName} + {#if schema.type} + {schema.type || ""} + {/if} +
+
+
+ + diff --git a/packages/builder/src/components/backend/DatasourceNavigator/icons/Custom.svelte b/packages/builder/src/components/backend/DatasourceNavigator/icons/Custom.svelte index 354b7a3358..0d4b7219aa 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/icons/Custom.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/icons/Custom.svelte @@ -1,8 +1,6 @@ - - - - - - + + + + + diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte index 33953493f6..945cd574d8 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte @@ -18,6 +18,7 @@ import { createRestDatasource } from "builderStore/datasource" import { goto } from "@roxi/routify" import ImportRestQueriesModal from "./ImportRestQueriesModal.svelte" + import DatasourceCard from "../_components/DatasourceCard.svelte" export let modal let integrations = {} @@ -95,14 +96,6 @@ } integrations = newIntegrations } - - function getIcon(integrationType, schema) { - if (schema.custom) { - return ICONS.CUSTOM - } else { - return ICONS[integrationType] - } - } @@ -161,28 +154,24 @@ Connect to an external data source
- {#each Object.entries(integrations).filter(([key]) => key !== IntegrationTypes.INTERNAL) as [integrationType, schema]} -
selectIntegration(integrationType)} - class="item hoverable" - > -
- -
- {schema.friendlyName} - {#if schema.type} - {schema.type || ""} - {/if} -
-
-
+ {#each Object.entries(integrations).filter(([key, val]) => key !== IntegrationTypes.INTERNAL && !val.custom) as [integrationType, schema]} + selectIntegration(evt.detail)} + {schema} + bind:integrationType + {integration} + /> {/each}
+ Custom data source + {#each Object.entries(integrations).filter(entry => entry[1].custom) as [integrationType, schema]} + selectIntegration(evt.detail)} + {schema} + bind:integrationType + {integration} + /> + {/each}
From b6a5ccbf1001b04215400a0e5581b0bd3f6d2cf3 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 17 Aug 2022 11:01:25 +0100 Subject: [PATCH 052/280] Adding some controls around datasource config creation and updating minio fetch. --- .../DatasourceNavigator/modals/DatasourceConfigModal.svelte | 3 +++ packages/server/src/utilities/fileSystem/index.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte index ecfd838b16..c8a5bc96eb 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte @@ -19,6 +19,9 @@ async function saveDatasource() { try { + if (!datasource.name) { + datasource.name = name + } const resp = await save(datasource, skipFetch) $goto(`./datasource/${resp._id}`) notifications.success(`Datasource updated successfully.`) diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index 9b124d6c29..d65ee48f05 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -17,6 +17,7 @@ const { downloadTarball, } = require("./utilities") const { updateClientLibrary } = require("./clientLibrary") +const { checkSlashesInUrl } = require("../") const env = require("../../environment") const { USER_METDATA_PREFIX, @@ -358,7 +359,7 @@ exports.getDatasourcePlugin = async (name, url) => { if (fs.existsSync(filename)) { return require(filename) } - const response = fetch(url) + const response = await fetch(checkSlashesInUrl(`${env.MINIO_URL}/${url}`)) if (response.status === 200) { const content = await response.text() fs.writeFileSync(filename, content) From fb510907523c20d09f8e7b66581899265868d86a Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Wed, 17 Aug 2022 18:16:11 +0100 Subject: [PATCH 053/280] Allow list of named tables to be fetched --- .../PlusConfigForm.svelte | 19 ++++++++++++++++++- .../builder/src/stores/backend/datasources.js | 7 +++++-- packages/frontend-core/src/api/datasources.js | 6 +++++- .../server/src/api/controllers/datasource.js | 17 ++++++++++++++--- 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte index cd19523476..b81e818d5f 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/PlusConfigForm.svelte @@ -8,6 +8,7 @@ notifications, Modal, Table, + Toggle, } from "@budibase/bbui" import { datasources, integrations, tables } from "stores/backend" import CreateEditRelationship from "components/backend/Datasources/CreateEditRelationship.svelte" @@ -15,6 +16,7 @@ import ArrayRenderer from "components/common/renderers/ArrayRenderer.svelte" import ConfirmDialog from "components/common/ConfirmDialog.svelte" import { goto } from "@roxi/routify" + import ValuesList from "components/common/ValuesList.svelte" export let datasource export let save @@ -31,6 +33,8 @@ let createExternalTableModal let selectedFromRelationship, selectedToRelationship let confirmDialog + let specificTables = null + let requireSpecificTables = false $: integration = datasource && $integrations[datasource.source] $: plusTables = datasource?.plus @@ -87,7 +91,7 @@ async function updateDatasourceSchema() { try { - await datasources.updateSchema(datasource) + await datasources.updateSchema(datasource, specificTables) notifications.success(`Datasource ${name} tables updated successfully.`) await tables.fetch() } catch (error) { @@ -150,6 +154,19 @@ warning={false} title="Confirm table fetch" > + { + requireSpecificTables = e.detail + specificTables = null + }} + thin + text="Fetch listed tables only (one per line)" + /> + {#if requireSpecificTables} + + {/if} +
If you have fetched tables from this database before, this action may overwrite any changes you made after your initial fetch. diff --git a/packages/builder/src/stores/backend/datasources.js b/packages/builder/src/stores/backend/datasources.js index 2423394c6a..07aeab1921 100644 --- a/packages/builder/src/stores/backend/datasources.js +++ b/packages/builder/src/stores/backend/datasources.js @@ -62,8 +62,11 @@ export function createDatasourcesStore() { unselect: () => { update(state => ({ ...state, selected: null })) }, - updateSchema: async datasource => { - const response = await API.buildDatasourceSchema(datasource?._id) + updateSchema: async (datasource, tablesFilter) => { + const response = await API.buildDatasourceSchema({ + datasourceId: datasource?._id, + tablesFilter, + }) return await updateDatasource(response) }, save: async (body, fetchSchema = false) => { diff --git a/packages/frontend-core/src/api/datasources.js b/packages/frontend-core/src/api/datasources.js index ff72fbf25b..eda7b3c860 100644 --- a/packages/frontend-core/src/api/datasources.js +++ b/packages/frontend-core/src/api/datasources.js @@ -11,10 +11,14 @@ export const buildDatasourceEndpoints = API => ({ /** * Prompts the server to build the schema for a datasource. * @param datasourceId the datasource ID to build the schema for + * @param tablesFilter list of specific table names to be build the schema */ - buildDatasourceSchema: async datasourceId => { + buildDatasourceSchema: async ({ datasourceId, tablesFilter }) => { return await API.post({ url: `/api/datasources/${datasourceId}/schema`, + body: { + tablesFilter, + }, }) }, diff --git a/packages/server/src/api/controllers/datasource.js b/packages/server/src/api/controllers/datasource.js index 8b9b765a5f..75fd1db02a 100644 --- a/packages/server/src/api/controllers/datasource.js +++ b/packages/server/src/api/controllers/datasource.js @@ -50,9 +50,21 @@ exports.fetch = async function (ctx) { exports.buildSchemaFromDb = async function (ctx) { const db = getAppDB() const datasource = await db.get(ctx.params.datasourceId) + const tablesFilter = ctx.request.body.tablesFilter - const { tables, error } = await buildSchemaHelper(datasource) - datasource.entities = tables + let { tables, error } = await buildSchemaHelper(datasource) + if (tablesFilter) { + if (!datasource.entities) { + datasource.entities = {} + } + for (let key in tables) { + if (tablesFilter.includes(key)) { + datasource.entities[key] = tables[key] + } + } + } else { + datasource.entities = tables + } const dbResp = await db.put(datasource) datasource._rev = dbResp.rev @@ -223,7 +235,6 @@ const buildSchemaHelper = async datasource => { // Connect to the DB and build the schema const connector = new Connector(datasource.config) await connector.buildSchema(datasource._id, datasource.entities) - datasource.entities = connector.tables // make sure they all have a display name selected for (let entity of Object.values(datasource.entities)) { From 7dfe049ae679e8be98f6717d17d4d396aca0e1d0 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 17 Aug 2022 23:13:51 +0100 Subject: [PATCH 054/280] Adding full builder integration of custom components - splitting into own section properly - fixing some issues with SVG class overlap. --- .../builder/src/builderStore/datasource.js | 2 +- .../DatasourceNavigator.svelte | 4 ++-- .../_components/DatasourceCard.svelte | 10 +--------- .../DatasourceNavigator/icons/Custom.svelte | 18 ++++++++++++------ .../backend/DatasourceNavigator/icons/index.js | 12 +++++++++++- .../app/[application]/data/_layout.svelte | 4 +++- .../server/src/utilities/fileSystem/index.js | 5 ++++- 7 files changed, 34 insertions(+), 21 deletions(-) diff --git a/packages/builder/src/builderStore/datasource.js b/packages/builder/src/builderStore/datasource.js index 804d88bad6..84edcdd6ad 100644 --- a/packages/builder/src/builderStore/datasource.js +++ b/packages/builder/src/builderStore/datasource.js @@ -9,7 +9,7 @@ function prepareData(config) { ds => ds.source === config.type ).length - let baseName = IntegrationNames[config.type] + let baseName = IntegrationNames[config.type] || config.name let name = existingTypeCount === 0 ? baseName : `${baseName}-${existingTypeCount + 1}` diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index 9faf00a199..6235e52916 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -13,7 +13,7 @@ customQueryIconColor, customQueryText, } from "helpers/data/utils" - import ICONS from "./icons" + import { getIcon } from "./icons" import { notifications } from "@budibase/bbui" let openDataSources = [] @@ -124,7 +124,7 @@ >
diff --git a/packages/builder/src/components/backend/DatasourceNavigator/_components/DatasourceCard.svelte b/packages/builder/src/components/backend/DatasourceNavigator/_components/DatasourceCard.svelte index 2dac2fec79..6dffc70a63 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/_components/DatasourceCard.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/_components/DatasourceCard.svelte @@ -1,21 +1,13 @@
- + - + {#if modal} + + {/if}
diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index d65ee48f05..f937f172b5 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -359,7 +359,10 @@ exports.getDatasourcePlugin = async (name, url) => { if (fs.existsSync(filename)) { return require(filename) } - const response = await fetch(checkSlashesInUrl(`${env.MINIO_URL}/${url}`)) + const fullUrl = checkSlashesInUrl( + `${env.MINIO_URL}/${ObjectStoreBuckets.PLUGINS}/${url}` + ) + const response = await fetch(fullUrl) if (response.status === 200) { const content = await response.text() fs.writeFileSync(filename, content) From 2f23de7b3a7f9b2de1523089e1e534a7914e8676 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 17 Aug 2022 23:17:10 +0100 Subject: [PATCH 055/280] Fixing issue with single custom datasource being full width in creation modal. --- .../modals/CreateDatasourceModal.svelte | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte index 945cd574d8..a500c6a5b3 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/CreateDatasourceModal.svelte @@ -164,14 +164,16 @@ {/each}
Custom data source - {#each Object.entries(integrations).filter(entry => entry[1].custom) as [integrationType, schema]} - selectIntegration(evt.detail)} - {schema} - bind:integrationType - {integration} - /> - {/each} +
+ {#each Object.entries(integrations).filter(entry => entry[1].custom) as [integrationType, schema]} + selectIntegration(evt.detail)} + {schema} + bind:integrationType + {integration} + /> + {/each} +
@@ -179,7 +181,7 @@ diff --git a/packages/server/src/api/controllers/application.ts b/packages/server/src/api/controllers/application.ts index 57a18e7df3..7183c083ef 100644 --- a/packages/server/src/api/controllers/application.ts +++ b/packages/server/src/api/controllers/application.ts @@ -443,7 +443,6 @@ const destroyApp = async (ctx: any) => { const result = await db.destroy() if (isUnpublish) { - await quotas.removePublishedApp() await events.app.unpublished(app) } else { await quotas.removeApp() diff --git a/packages/server/src/api/controllers/deploy/index.ts b/packages/server/src/api/controllers/deploy/index.ts index 7c1a093398..680f2d534e 100644 --- a/packages/server/src/api/controllers/deploy/index.ts +++ b/packages/server/src/api/controllers/deploy/index.ts @@ -188,12 +188,7 @@ const _deployApp = async function (ctx: any) { console.log("Deploying app...") - let app - if (await isFirstDeploy()) { - app = await quotas.addPublishedApp(() => deployApp(deployment)) - } else { - app = await deployApp(deployment) - } + let app = await deployApp(deployment) await events.app.published(app) ctx.body = deployment diff --git a/packages/server/src/migrations/functions/backfill/global.ts b/packages/server/src/migrations/functions/backfill/global.ts index 5dd812d6ea..7c8558c2df 100644 --- a/packages/server/src/migrations/functions/backfill/global.ts +++ b/packages/server/src/migrations/functions/backfill/global.ts @@ -35,12 +35,10 @@ const formatUsage = (usage: QuotaUsage) => { let maxAutomations = 0 let maxQueries = 0 let rows = 0 - let developers = 0 if (usage) { if (usage.usageQuota) { rows = usage.usageQuota.rows - developers = usage.usageQuota.developers } if (usage.monthly) { @@ -59,7 +57,6 @@ const formatUsage = (usage: QuotaUsage) => { maxAutomations, maxQueries, rows, - developers, } } diff --git a/packages/server/src/migrations/functions/developerQuota.ts b/packages/server/src/migrations/functions/developerQuota.ts deleted file mode 100644 index b639e0bd83..0000000000 --- a/packages/server/src/migrations/functions/developerQuota.ts +++ /dev/null @@ -1,15 +0,0 @@ -const { createUserBuildersView } = require("@budibase/backend-core/db") -import * as syncDevelopers from "./usageQuotas/syncDevelopers" - -/** - * Date: - * March 2022 - * - * Description: - * Create the builder users view and sync the developer count - */ - -export const run = async (db: any) => { - await createUserBuildersView(db) - await syncDevelopers.run() -} diff --git a/packages/server/src/migrations/functions/publishedAppsQuota.ts b/packages/server/src/migrations/functions/publishedAppsQuota.ts deleted file mode 100644 index 53bd8e65e5..0000000000 --- a/packages/server/src/migrations/functions/publishedAppsQuota.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as syncPublishedApps from "./usageQuotas/syncPublishedApps" - -/** - * Date: - * March 2022 - * - * Description: - * Sync the published apps count - */ - -export const run = async (db: any) => { - await syncPublishedApps.run() -} diff --git a/packages/server/src/migrations/functions/usageQuotas/syncDevelopers.ts b/packages/server/src/migrations/functions/usageQuotas/syncDevelopers.ts deleted file mode 100644 index c13a095b23..0000000000 --- a/packages/server/src/migrations/functions/usageQuotas/syncDevelopers.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { getTenantId } from "@budibase/backend-core/tenancy" -import { utils } from "@budibase/backend-core" -import { quotas, QuotaUsageType, StaticQuotaName } from "@budibase/pro" - -export const run = async () => { - // get developer count - const developerCount = await utils.getBuildersCount() - - // sync developer count - const tenantId = getTenantId() - console.log( - `[Tenant: ${tenantId}] Syncing developer count: ${developerCount}` - ) - await quotas.setUsage( - developerCount, - StaticQuotaName.DEVELOPERS, - QuotaUsageType.STATIC - ) -} diff --git a/packages/server/src/migrations/functions/usageQuotas/syncPublishedApps.ts b/packages/server/src/migrations/functions/usageQuotas/syncPublishedApps.ts deleted file mode 100644 index 550a3006b3..0000000000 --- a/packages/server/src/migrations/functions/usageQuotas/syncPublishedApps.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { getTenantId } from "@budibase/backend-core/tenancy" -import { getAllApps } from "@budibase/backend-core/db" -import { quotas, QuotaUsageType, StaticQuotaName } from "@budibase/pro" - -export const run = async () => { - // get app count - const opts: any = { dev: false } - const prodApps = await getAllApps(opts) - const prodAppCount = prodApps ? prodApps.length : 0 - - // sync app count - const tenantId = getTenantId() - console.log( - `[Tenant: ${tenantId}] Syncing published app count: ${prodAppCount}` - ) - await quotas.setUsage( - prodAppCount, - StaticQuotaName.PUBLISHED_APPS, - QuotaUsageType.STATIC - ) -} diff --git a/packages/server/src/migrations/index.ts b/packages/server/src/migrations/index.ts index 494740d1d9..bb691f1133 100644 --- a/packages/server/src/migrations/index.ts +++ b/packages/server/src/migrations/index.ts @@ -6,8 +6,6 @@ import env from "../environment" import * as userEmailViewCasing from "./functions/userEmailViewCasing" import * as quota1 from "./functions/quotas1" import * as appUrls from "./functions/appUrls" -import * as developerQuota from "./functions/developerQuota" -import * as publishedAppsQuota from "./functions/publishedAppsQuota" import * as backfill from "./functions/backfill" /** @@ -42,20 +40,6 @@ export const buildMigrations = () => { }) break } - case MigrationName.DEVELOPER_QUOTA: { - serverMigrations.push({ - ...definition, - fn: developerQuota.run, - }) - break - } - case MigrationName.PUBLISHED_APP_QUOTA: { - serverMigrations.push({ - ...definition, - fn: publishedAppsQuota.run, - }) - break - } case MigrationName.EVENT_APP_BACKFILL: { serverMigrations.push({ ...definition, diff --git a/packages/types/src/sdk/migrations.ts b/packages/types/src/sdk/migrations.ts index bb32d2e045..3ad4daccaf 100644 --- a/packages/types/src/sdk/migrations.ts +++ b/packages/types/src/sdk/migrations.ts @@ -41,8 +41,6 @@ export enum MigrationName { USER_EMAIL_VIEW_CASING = "user_email_view_casing", QUOTAS_1 = "quotas_1", APP_URLS = "app_urls", - DEVELOPER_QUOTA = "developer_quota", - PUBLISHED_APP_QUOTA = "published_apps_quota", EVENT_APP_BACKFILL = "event_app_backfill", EVENT_GLOBAL_BACKFILL = "event_global_backfill", EVENT_INSTALLATION_BACKFILL = "event_installation_backfill", diff --git a/packages/worker/src/sdk/users/users.ts b/packages/worker/src/sdk/users/users.ts index 8e9b3382e4..5355b82b72 100644 --- a/packages/worker/src/sdk/users/users.ts +++ b/packages/worker/src/sdk/users/users.ts @@ -1,5 +1,4 @@ import env from "../../environment" -import { quotas } from "@budibase/pro" import * as apps from "../../utilities/appService" import * as eventHelpers from "./events" import { @@ -164,15 +163,7 @@ export const save = async ( return putOpts } // save the user to db - let response - const putUserFn = () => { - return db.put(user) - } - if (eventHelpers.isAddingBuilder(user, dbUser)) { - response = await quotas.addDeveloper(putUserFn) - } else { - response = await putUserFn() - } + let response = await db.put(user) user._rev = response.rev await eventHelpers.handleSaveEvents(user, dbUser) @@ -223,7 +214,6 @@ export const destroy = async (id: string, currentUser: any) => { await deprovisioning.removeUserFromInfoDB(dbUser) await db.remove(dbUser._id, dbUser._rev) await eventHelpers.handleDeleteEvents(dbUser) - await quotas.removeUser(dbUser) await cache.user.invalidateUser(dbUser._id) await sessions.invalidateSessions(dbUser._id) // let server know to sync user From 2c87d6e340dba468e87f0b5dd7766f736d11658b Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 19 Aug 2022 11:09:20 +0100 Subject: [PATCH 063/280] Initial work on websockets --- hosting/nginx.dev.conf.hbs | 16 +- .../[screenId]/_components/AppPreview.svelte | 1 + .../[screenId]/_components/iframeTemplate.js | 2 + packages/client/package.json | 1 + .../client/src/components/ClientApp.svelte | 4 +- packages/client/src/index.js | 5 + packages/client/src/stores/builder.js | 15 + packages/client/src/stores/components.js | 10 +- packages/client/src/websocket.js | 24 + packages/client/yarn.lock | 1357 ++++++++++++++++- packages/server/package.json | 1 + packages/server/src/api/controllers/plugin.ts | 6 +- packages/server/src/app.ts | 10 + packages/server/src/utilities/websocket.js | 9 + packages/server/yarn.lock | 701 ++++++++- 15 files changed, 2129 insertions(+), 33 deletions(-) create mode 100644 packages/client/src/websocket.js create mode 100644 packages/server/src/utilities/websocket.js diff --git a/hosting/nginx.dev.conf.hbs b/hosting/nginx.dev.conf.hbs index 91f495cfac..492722e2e4 100644 --- a/hosting/nginx.dev.conf.hbs +++ b/hosting/nginx.dev.conf.hbs @@ -77,9 +77,19 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } - location /ws { - proxy_pass http://{{ address }}:3000; - rewrite ^/ws(.*)$ /$1 break; + location /vite/ { + proxy_pass http://{{ address }}:3000; + rewrite ^/vite(.*)$ /$1 break; + } + + location /socket/ { + proxy_pass http://{{ address }}:4001; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; } location / { diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte index d345bdeb77..1ca1882963 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte @@ -93,6 +93,7 @@ : [], isBudibaseEvent: true, usedPlugins: $store.usedPlugins, + location: window.location, } // Refresh the preview when required diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/iframeTemplate.js b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/iframeTemplate.js index 8711f5d670..83e4d0a8ae 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/iframeTemplate.js +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/iframeTemplate.js @@ -68,6 +68,7 @@ export default ` navigation, hiddenComponentIds, usedPlugins, + location } = parsed // Set some flags so the app knows we're in the builder @@ -83,6 +84,7 @@ export default ` window["##BUDIBASE_PREVIEW_NAVIGATION##"] = navigation window["##BUDIBASE_HIDDEN_COMPONENT_IDS##"] = hiddenComponentIds window["##BUDIBASE_USED_PLUGINS##"] = usedPlugins + window["##BUDIBASE_LOCATION##"] = location // Initialise app try { diff --git a/packages/client/package.json b/packages/client/package.json index 876bd0782e..c92b081021 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -39,6 +39,7 @@ "sanitize-html": "^2.7.0", "screenfull": "^6.0.1", "shortid": "^2.2.15", + "socket.io-client": "^4.5.1", "svelte": "^3.49.0", "svelte-apexcharts": "^1.0.2", "svelte-flatpickr": "^3.1.0", diff --git a/packages/client/src/components/ClientApp.svelte b/packages/client/src/components/ClientApp.svelte index 961e635971..c212fcf0f5 100644 --- a/packages/client/src/components/ClientApp.svelte +++ b/packages/client/src/components/ClientApp.svelte @@ -91,8 +91,8 @@ {#if $builderStore.usedPlugins?.length} - {#each $builderStore.usedPlugins as plugin} - + {#each $builderStore.usedPlugins as plugin (plugin.hash)} + {/each} {/if} diff --git a/packages/client/src/index.js b/packages/client/src/index.js index a795d8d2d9..3d0aaa1038 100644 --- a/packages/client/src/index.js +++ b/packages/client/src/index.js @@ -2,6 +2,7 @@ import ClientApp from "./components/ClientApp.svelte" import { componentStore, builderStore, appStore, devToolsStore } from "./stores" import loadSpectrumIcons from "@budibase/bbui/spectrum-icons-rollup.js" import { get } from "svelte/store" +import { initWebsocket } from "./websocket.js" // Provide svelte and svelte/internal as globals for custom components import * as svelte from "svelte" @@ -28,6 +29,7 @@ const loadBudibase = () => { navigation: window["##BUDIBASE_PREVIEW_NAVIGATION##"], hiddenComponentIds: window["##BUDIBASE_HIDDEN_COMPONENT_IDS##"], usedPlugins: window["##BUDIBASE_USED_PLUGINS##"], + location: window["##BUDIBASE_LOCATION##"], }) // Set app ID - this window flag is set by both the preview and the real @@ -51,6 +53,9 @@ const loadBudibase = () => { window.registerCustomComponent = componentStore.actions.registerCustomComponent + // Initialise websocket + initWebsocket() + // Create app if one hasn't been created yet if (!app) { app = new ClientApp({ diff --git a/packages/client/src/stores/builder.js b/packages/client/src/stores/builder.js index 32eb956d52..608a058e01 100644 --- a/packages/client/src/stores/builder.js +++ b/packages/client/src/stores/builder.js @@ -19,6 +19,7 @@ const createBuilderStore = () => { isDragging: false, navigation: null, hiddenComponentIds: [], + usedPlugins: null, // Legacy - allow the builder to specify a layout layout: null, @@ -84,6 +85,20 @@ const createBuilderStore = () => { highlightSetting: setting => { dispatchEvent("highlight-setting", { setting }) }, + updateUsedPlugin: (name, hash) => { + // Check if we used this plugin + const used = get(store)?.usedPlugins?.find(x => x.name === name) + if (used) { + store.update(state => { + state.usedPlugins = state.usedPlugins.filter(x => x.name !== name) + state.usedPlugins.push({ + ...used, + hash, + }) + return state + }) + } + }, } return { ...store, diff --git a/packages/client/src/stores/components.js b/packages/client/src/stores/components.js index 8512a371d8..90a0c903f2 100644 --- a/packages/client/src/stores/components.js +++ b/packages/client/src/stores/components.js @@ -140,16 +140,20 @@ const createComponentStore = () => { return customComponentManifest?.[type]?.Component } - const registerCustomComponent = ({ Component, schema, version }) => { + const registerCustomComponent = ({ Component, schema }) => { if (!Component || !schema?.schema?.name) { return } - const component = `plugin/${schema.schema.name}/${version}` + console.log(schema) + console.log("register", schema.schema.name) + const component = `plugin/${schema.schema.name}/${ + schema.schema.version || "2.0.5" + }` + console.log(component) store.update(state => { state.customComponentManifest[component] = { Component, schema, - version, } return state }) diff --git a/packages/client/src/websocket.js b/packages/client/src/websocket.js new file mode 100644 index 0000000000..6acb442e7a --- /dev/null +++ b/packages/client/src/websocket.js @@ -0,0 +1,24 @@ +import { builderStore } from "./stores/index.js" +import { get } from "svelte/store" +import { io } from "socket.io-client" + +export const initWebsocket = () => { + const { inBuilder, location } = get(builderStore) + console.log(location) + if (!inBuilder || !location) { + return + } + + // Websocket + const tls = location.protocol === "https:" + const proto = tls ? "wss:" : "ws:" + const host = location.hostname + const port = location.port || (tls ? 433 : 80) + console.log(`${proto}//${host}:${port}`) + const socket = io(`${proto}//${host}:${port}`, { + path: "/socket/", + }) + socket.on("plugin-update", data => { + builderStore.actions.updateUsedPlugin(data.name, data.hash) + }) +} diff --git a/packages/client/yarn.lock b/packages/client/yarn.lock index 0864699225..ff84a8ed0f 100644 --- a/packages/client/yarn.lock +++ b/packages/client/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@adobe/spectrum-css-workflow-icons@^1.2.1": + version "1.5.4" + resolved "https://registry.yarnpkg.com/@adobe/spectrum-css-workflow-icons/-/spectrum-css-workflow-icons-1.5.4.tgz#0e09ff519c36139176c3ba3ce617a995c9032f67" + integrity sha512-sZ19YOLGw5xTZzCEkVXPjf53lXVzo063KmDTJjpSjy/XLVsF+RaX0b436SfSM4hsIUZ7n27+UsbOvzFaFjcYXw== + "@babel/code-frame@^7.10.4": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.0.tgz#0dfc80309beec8411e65e706461c408b0bb9b431" @@ -23,6 +28,105 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@budibase/bbui@1.2.41-alpha.0": + version "1.2.41-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.2.41-alpha.0.tgz#8e9aa2ffc08c0dccf9316081e312c14e60cbfcd9" + integrity sha512-OQlpWN9XIARatTD7/WQZffYlFsl3M72nmV7bdB8R2zx9/snhT2lwT7gTgfIFa42sawXhcpYXfsUrWgL8IR/iXw== + dependencies: + "@adobe/spectrum-css-workflow-icons" "^1.2.1" + "@budibase/string-templates" "1.2.41-alpha.0" + "@spectrum-css/actionbutton" "^1.0.1" + "@spectrum-css/actiongroup" "^1.0.1" + "@spectrum-css/avatar" "^3.0.2" + "@spectrum-css/button" "^3.0.1" + "@spectrum-css/buttongroup" "^3.0.2" + "@spectrum-css/checkbox" "^3.0.2" + "@spectrum-css/dialog" "^3.0.1" + "@spectrum-css/divider" "^1.0.3" + "@spectrum-css/dropzone" "^3.0.2" + "@spectrum-css/fieldgroup" "^3.0.2" + "@spectrum-css/fieldlabel" "^3.0.1" + "@spectrum-css/icon" "^3.0.1" + "@spectrum-css/illustratedmessage" "^3.0.2" + "@spectrum-css/inlinealert" "^2.0.1" + "@spectrum-css/inputgroup" "^3.0.2" + "@spectrum-css/label" "^2.0.10" + "@spectrum-css/link" "^3.1.1" + "@spectrum-css/menu" "^3.0.1" + "@spectrum-css/modal" "^3.0.1" + "@spectrum-css/pagination" "^3.0.3" + "@spectrum-css/picker" "^1.0.1" + "@spectrum-css/popover" "^3.0.1" + "@spectrum-css/progressbar" "^1.0.2" + "@spectrum-css/progresscircle" "^1.0.2" + "@spectrum-css/radio" "^3.0.2" + "@spectrum-css/search" "^3.0.2" + "@spectrum-css/sidenav" "^3.0.2" + "@spectrum-css/slider" "3.0.1" + "@spectrum-css/statuslight" "^3.0.2" + "@spectrum-css/stepper" "^3.0.3" + "@spectrum-css/switch" "^1.0.2" + "@spectrum-css/table" "^3.0.1" + "@spectrum-css/tabs" "^3.2.12" + "@spectrum-css/tags" "^3.0.2" + "@spectrum-css/textfield" "^3.0.1" + "@spectrum-css/toast" "^3.0.1" + "@spectrum-css/tooltip" "^3.0.3" + "@spectrum-css/treeview" "^3.0.2" + "@spectrum-css/typography" "^3.0.1" + "@spectrum-css/underlay" "^2.0.9" + "@spectrum-css/vars" "^3.0.1" + dayjs "^1.10.4" + easymde "^2.16.1" + svelte-flatpickr "^3.2.3" + svelte-portal "^1.0.0" + +"@budibase/frontend-core@1.2.41-alpha.0": + version "1.2.41-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-1.2.41-alpha.0.tgz#1f98dabc1955b41003b9ad92aae932c399920559" + integrity sha512-0hT7Qm7qxs0xIklPFetM55x7b0XQTpdIWpLvECRsUFo0xYRKt8XJBgMegua9U0AYKCyXDhruL0FKpBLCebbJXg== + dependencies: + "@budibase/bbui" "1.2.41-alpha.0" + lodash "^4.17.21" + svelte "^3.46.2" + +"@budibase/handlebars-helpers@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.8.tgz#6953d29673a8c5c407e096c0a84890465c7ce841" + integrity sha512-ggWJUt0GqsHFAEup5tlWlcrmYML57nKhpNGGLzVsqXVYN8eVmf3xluYmmMe7fDYhQH0leSprrdEXmsdFQF3HAQ== + dependencies: + array-sort "^1.0.0" + define-property "^2.0.2" + extend-shallow "^3.0.2" + for-in "^1.0.2" + get-object "^0.2.0" + get-value "^3.0.1" + handlebars "^4.7.7" + handlebars-utils "^1.0.6" + has-value "^2.0.2" + helper-md "^0.2.2" + html-tag "^2.0.0" + is-even "^1.0.0" + is-glob "^4.0.1" + kind-of "^6.0.3" + micromatch "^3.1.5" + relative "^3.0.2" + striptags "^3.1.1" + to-gfm-code-block "^0.1.1" + year "^0.2.1" + +"@budibase/string-templates@1.2.41-alpha.0": + version "1.2.41-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.2.41-alpha.0.tgz#f61808f5199805ba77510fec652369a38489ec2f" + integrity sha512-JW4Td0R/2kZv71UjjCDo31Oz+B61OKUq37U2ZL4uzvid64z9HwHr7NBP2/aELKBq31BymtUfvq1lOjBv1n1Flg== + dependencies: + "@budibase/handlebars-helpers" "^0.11.8" + dayjs "^1.10.4" + handlebars "^4.7.6" + handlebars-utils "^1.0.6" + lodash "^4.17.20" + vm2 "^3.9.4" + "@jridgewell/gen-mapping@^0.3.0": version "0.3.2" resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" @@ -113,16 +217,51 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@spectrum-css/button@^3.0.3": +"@socket.io/component-emitter@~3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" + integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== + +"@spectrum-css/actionbutton@^1.0.1": + version "1.1.14" + resolved "https://registry.yarnpkg.com/@spectrum-css/actionbutton/-/actionbutton-1.1.14.tgz#4e12eb7f482fb5944c3d97547591964baebeb1d4" + integrity sha512-ViBjdWi23J6vIR4t8JTRQ6jY/+KgpZgCALj3otgy495zMNG7jPeN7sKoy6i6JZJcdIRJA4MjOTVvcDOGkYWUZg== + +"@spectrum-css/actiongroup@^1.0.1": + version "1.0.26" + resolved "https://registry.yarnpkg.com/@spectrum-css/actiongroup/-/actiongroup-1.0.26.tgz#181ee059f28b1342389a128c39d20d2e10566aae" + integrity sha512-T1IK9a2Gxix9givm+chGvFtZh5oGBZQc/S2UA9F76JZKu45eCkLkvUH6F670XOrBhDGkVfzvN21QnFymSY43ow== + +"@spectrum-css/avatar@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@spectrum-css/avatar/-/avatar-3.0.2.tgz#4f1826223eae330e64b6d3cc899e9bc2e98dac95" + integrity sha512-wEczvSqxttTWSiL3cOvXV/RmGRwSkw2w6+slcHhnf0kb7ovymMM+9oz8vvEpEsSeo5u598bc+7ktrKFpAd6soQ== + +"@spectrum-css/button@^3.0.1", "@spectrum-css/button@^3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@spectrum-css/button/-/button-3.0.3.tgz#2df1efaab6c7e0b3b06cb4b59e1eae59c7f1fc84" integrity sha512-6CnLPqqtaU/PcSSIGeGRi0iFIIxIUByYLKFO6zn5NEUc12KQ28dJ4PLwB6WBa0L8vRoAGlnWWH2ZZweTijbXgg== +"@spectrum-css/buttongroup@^3.0.2": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@spectrum-css/buttongroup/-/buttongroup-3.0.10.tgz#897ea04b3ffea389fc7fe5bf67a6d1f3454b774d" + integrity sha512-U7D24vgHYhlqOyaLJZ5LPskDAuD7cGZktmWvXtvLqG6RFyTr7JHn5oPRuo6mLzaggIHqCdJylOjZ4FHqT4LpTQ== + "@spectrum-css/card@^3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@spectrum-css/card/-/card-3.0.3.tgz#56b2e2da6b80c1583228baa279de7407383bfb6b" integrity sha512-+oKLUI2a0QmQP9EzySeq/G4FpUkkdaDNbuEbqCj2IkPMc/2v/nwzsPhh1fj2UIghGAiiUwXfPpzax1e8fyhQUg== +"@spectrum-css/checkbox@^3.0.2": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@spectrum-css/checkbox/-/checkbox-3.1.3.tgz#584cdea28a4e7e203314bfeccf69d6d1ab3799af" + integrity sha512-c1l8jQCj/CniHNNvZR/wr/PM8C/EuwhFyWXwzfr2npkgnWqdbcooIa0QfDRYtVy9U5/N8MM2IDLiZ8kPf7LKqQ== + +"@spectrum-css/dialog@^3.0.1": + version "3.0.12" + resolved "https://registry.yarnpkg.com/@spectrum-css/dialog/-/dialog-3.0.12.tgz#fc97e002ca768a3d99dd10cb6a135c2b06052004" + integrity sha512-50rbFa+9eUKT+3uYBX7CkmI7SbQ0Z3CAFwjyjai+itYZ8kf/FcHVFwcLjgrry9scUnKhexMs94kkr0gfQpPe8Q== + "@spectrum-css/divider@^1.0.3": version "1.0.17" resolved "https://registry.yarnpkg.com/@spectrum-css/divider/-/divider-1.0.17.tgz#cae86fdcb5eb6dae95798ae19ec962e5735fc27f" @@ -130,11 +269,66 @@ dependencies: "@spectrum-css/vars" "^7.0.0" +"@spectrum-css/dropzone@^3.0.2": + version "3.0.25" + resolved "https://registry.yarnpkg.com/@spectrum-css/dropzone/-/dropzone-3.0.25.tgz#5fd16cde5e4c8df225bdae02e3b77ee891a6fa98" + integrity sha512-3m7n/gt9+rY4w6nfz7bWfCvHpQzz9/Ew+R6llLgRzS06+RiZXmSeA5O7wD4eNk57sd4xPdv5xBvzE/2Gl2CdYg== + +"@spectrum-css/fieldgroup@^3.0.2": + version "3.1.4" + resolved "https://registry.yarnpkg.com/@spectrum-css/fieldgroup/-/fieldgroup-3.1.4.tgz#aede57bda56c41310d262774a8805eefc89ddf74" + integrity sha512-ynqkD1OWicCEW7hgYQWzJUrUih+guJHjDtPbTKYhCbnxPqi6aifKmLstBehCgs4iG4+YfGDdZTppW64A3o5foQ== + +"@spectrum-css/fieldlabel@^3.0.1": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@spectrum-css/fieldlabel/-/fieldlabel-3.0.3.tgz#f73c04d20734d4718ffb620dc46458904685b449" + integrity sha512-nEvIkEXCD5n4fW67Unq6Iu7VXoauEd/JGpfTY02VsC5p4FJLnwKfPDbJUuUsqClAxqw7nAsmXVKtn4zQFf5yPQ== + +"@spectrum-css/icon@^3.0.1": + version "3.0.23" + resolved "https://registry.yarnpkg.com/@spectrum-css/icon/-/icon-3.0.23.tgz#95a5e1aa7fa0eace579449b3aaa7ec87c8c77f7f" + integrity sha512-HtH8M1+b2KxcOJjdaqqemp/Yx7TUBosHhlzuZcDxoG2OpSrg7LtkJfDyv+0qFELzB934k9JbiE4xVlHRzTcrZA== + +"@spectrum-css/illustratedmessage@^3.0.2": + version "3.0.17" + resolved "https://registry.yarnpkg.com/@spectrum-css/illustratedmessage/-/illustratedmessage-3.0.17.tgz#49cb2549fda97a6812156bfba6ccdd3a18bebd11" + integrity sha512-kpDqeq1U+rEjG1XuiXkbGvS71vn6mpFF/hiwCgFJWudVOfypDPQ4KLfYw1ditFSUzMCm5H6U/RqAShAJn8oMWA== + +"@spectrum-css/inlinealert@^2.0.1": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@spectrum-css/inlinealert/-/inlinealert-2.0.6.tgz#4c5e923a1f56a96cc1adb30ef1f06ae04f2c6376" + integrity sha512-OpvvoWP02wWyCnF4IgG8SOPkXymovkC9cGtgMS1FdDubnG3tJZB/JeKTsRR9C9Vt3WBaOmISRdSKlZ4lC9CFzA== + +"@spectrum-css/inputgroup@^3.0.2": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@spectrum-css/inputgroup/-/inputgroup-3.0.8.tgz#fc23afc8a73c24d17249c9d2337e8b42085b298b" + integrity sha512-cmQWzFp0GU+4IMc8SSeVFdmQDlRUdPelXaQdKUR9mZuO2iYettg37s0lfBCeJyYkUNTagz0zP8O7A0iXfmeE6g== + +"@spectrum-css/label@^2.0.10": + version "2.0.10" + resolved "https://registry.yarnpkg.com/@spectrum-css/label/-/label-2.0.10.tgz#2368651d7636a19385b5d300cdf6272db1916001" + integrity sha512-xCbtEiQkZIlLdWFikuw7ifDCC21DOC/KMgVrrVJHXFc4KRQe9LTZSqmGF3tovm+CSq1adE59mYoTbojVQ9YuEQ== + +"@spectrum-css/link@^3.1.1": + version "3.1.23" + resolved "https://registry.yarnpkg.com/@spectrum-css/link/-/link-3.1.23.tgz#9d9ff64c41366edbfdb19d04a5deec88bf2ea8fd" + integrity sha512-CAJQGnGTrTtR4tF1L94ou9Y+c4vnx9d5rWhb3AMzKb2Focqz02xSkTyaCCH7OM/3CwD8TCLOMANon8LcRpGAjA== + "@spectrum-css/link@^3.1.3": version "3.1.17" resolved "https://registry.yarnpkg.com/@spectrum-css/link/-/link-3.1.17.tgz#efa8fd5ee8a6b291843dcaf4fa1270b81c564c48" integrity sha512-sWWTnDB+Yig9WmLvzcvUgSH6zZtu2tWfobMivFLjRnfQYIhxJSoj87AleLpcTbvIQIwSwytSdnbncsm4rBfDjg== +"@spectrum-css/menu@^3.0.1": + version "3.0.21" + resolved "https://registry.yarnpkg.com/@spectrum-css/menu/-/menu-3.0.21.tgz#d1f7e6e69d30b5e1edd7ed2c86ea4e08dfd670ab" + integrity sha512-G5AIUO26O6IAc6HUGZu4AZgyw0QRyLfSbcKlFGu4oJHzP36cQc1S1uCh8Xp4g5d+n6mU62LxNDLSMpVbwnA00A== + +"@spectrum-css/modal@^3.0.1": + version "3.0.23" + resolved "https://registry.yarnpkg.com/@spectrum-css/modal/-/modal-3.0.23.tgz#1e269e4f652f4981bd67661bdf6041ff990645e9" + integrity sha512-NvqwuCZc9Kpv5KFuWyKx8vLTjC6EJ/MHSbhyA6jRg37jtzNsnoQdlGzPgFsYVI82V1xCPDTccmC1hV7v4i1lzw== + "@spectrum-css/page@^3.0.1": version "3.0.9" resolved "https://registry.yarnpkg.com/@spectrum-css/page/-/page-3.0.9.tgz#f8a705dee90af958e2ee20307218e4f82a018c36" @@ -142,16 +336,116 @@ dependencies: "@spectrum-css/vars" "^4.3.1" +"@spectrum-css/pagination@^3.0.3": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@spectrum-css/pagination/-/pagination-3.0.11.tgz#68d9f34fe8eb36bf922e41b11f49eac62ac2fc41" + integrity sha512-wjZr7NAcqHK6fxNIGKTYEVtAOJugJTbcz4d8K7DZuUDgBVwLJJHJBi4uJ4KrIRYliMWOvqWTZzCJLmmTfx4cyw== + +"@spectrum-css/picker@^1.0.1": + version "1.2.12" + resolved "https://registry.yarnpkg.com/@spectrum-css/picker/-/picker-1.2.12.tgz#1d60daabb0b6e09a26b4f2380b80cb1baa3b8bc0" + integrity sha512-WdV16JVgdQp3XJ0ymfbbB4A1emXZAX2Z9cqDf+UsaFNg7wOkNrhXl5paj9J7wOdALHU6uJN1EfNRhWMrTZQxGw== + +"@spectrum-css/popover@^3.0.1": + version "3.0.11" + resolved "https://registry.yarnpkg.com/@spectrum-css/popover/-/popover-3.0.11.tgz#a7450c01bcf1609264b4a9df58821368b9e224d1" + integrity sha512-bzyNQJVw6Mn1EBelTaRlXCdd0ZfykNX9O6SHx3a+jXPYu8VBrRpHm0gsfWzPAz1etd1vj1CxwG/teQt4qvyZ/Q== + +"@spectrum-css/progressbar@^1.0.2": + version "1.0.33" + resolved "https://registry.yarnpkg.com/@spectrum-css/progressbar/-/progressbar-1.0.33.tgz#0fbf815355e3b352ab0965a0d1ff9424c145204e" + integrity sha512-DLNkEd9XsyxSYRyLsV2cy9clByDoHy+GpKGOu7q6STtYYl7Y2hjBvNk9DNaLc78PBCXDf4MJ/j59vl5VmfRctA== + +"@spectrum-css/progresscircle@^1.0.2": + version "1.0.23" + resolved "https://registry.yarnpkg.com/@spectrum-css/progresscircle/-/progresscircle-1.0.23.tgz#b8872716d2f54bf4bb20d571527f8ee4b04f5c10" + integrity sha512-J6IYhospCebEZ/+82vxBAckl5XATuNPQ5n0QSUFnRxql824x4B/mFhLt/PPLJtPBxEty6OA3GQ4evxAYutqEqQ== + +"@spectrum-css/radio@^3.0.2": + version "3.0.24" + resolved "https://registry.yarnpkg.com/@spectrum-css/radio/-/radio-3.0.24.tgz#7a08476edf42be2007b75f7765c18c26eb3a9880" + integrity sha512-C/saSKXb3dNCWprsP4iXkFFEmRrxwsdm2Al04myZ6pxOJ4tr1WjHAAtorwUgaUiyR87OnL1mGX2aWrFEN1mvtQ== + +"@spectrum-css/search@^3.0.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@spectrum-css/search/-/search-3.1.2.tgz#8d43f35f884f7c190e7694c8d26a3f2cfed01ef0" + integrity sha512-8cMK1QB07dbReZ/ECyTyoT2dELZ7hK1b3jEDiWSeLBbXcKirR1OI24sZEnewQY/XWFd/62Z1YdNaaA8S6UuXWQ== + +"@spectrum-css/sidenav@^3.0.2": + version "3.0.24" + resolved "https://registry.yarnpkg.com/@spectrum-css/sidenav/-/sidenav-3.0.24.tgz#37ec2990a8a94ce9929ae30b3f0989e606b2ee8c" + integrity sha512-WADKJ6zr/WfUxXiUbG4BgZsLYqNHjHyuKCGg3ixhk3BT51Jpgm7sQ7YCdmbZGU/mZ3Mlbsc1ON+HENwRxmgelw== + +"@spectrum-css/slider@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@spectrum-css/slider/-/slider-3.0.1.tgz#5281e6f47eb5a4fd3d1816c138bf66d01d7f2e49" + integrity sha512-DI2dtMRnQuDM1miVzl3SGyR1khUEKnwdXfO5EHDFwkC3yav43F5QogkfjmjFmWWobMVovdJlAuiaaJ/IHejD0Q== + +"@spectrum-css/statuslight@^3.0.2": + version "3.0.8" + resolved "https://registry.yarnpkg.com/@spectrum-css/statuslight/-/statuslight-3.0.8.tgz#3b0ea80712573679870a85d469850230e794a0f7" + integrity sha512-zMTHs8lk+I7fLdi9waEEbsCmJ1FxeHcjQ0yltWxuRmGk2vl4MQdQIuHIMI63iblqEaiwnJRjXJoKnWlNvndTJQ== + +"@spectrum-css/stepper@^3.0.3": + version "3.0.26" + resolved "https://registry.yarnpkg.com/@spectrum-css/stepper/-/stepper-3.0.26.tgz#eeb9bd95b60bec67bbfe3cdc5fcc286d8bee1c1a" + integrity sha512-i9GiYw74XAc2o94dobQzaAZVR2zqIjiHynFEi4ndcCpQeOYFEO3U3H7BDWg0YuNALt9n6Rys1bd46b6QsGLYbA== + +"@spectrum-css/switch@^1.0.2": + version "1.0.23" + resolved "https://registry.yarnpkg.com/@spectrum-css/switch/-/switch-1.0.23.tgz#c523c2f528ca16feca57f01b0e703e14f38c0919" + integrity sha512-6ym5p672xPCzfIBn8vtCtswGZ77cXb9BZEMSqwqu9O2MCi1QRPk3ot82SRXqjT2i5yeDgQR2dyBWrjzOh97mJg== + +"@spectrum-css/table@^3.0.1": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@spectrum-css/table/-/table-3.0.3.tgz#7f7f19905ef3275cbf907ce3a5818e63c30b2caf" + integrity sha512-nxwzVjLPsXoY/v4sdxOVYLcC+cEbGgJyLcLclT5LT9MGSbngFeUMJzzVR4EvehzuN4dH7hrATG7Mbuq29Mf0Hg== + +"@spectrum-css/tabs@^3.2.12": + version "3.2.19" + resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.19.tgz#2eae3a2c4760466882db08281365d502c3f22ebf" + integrity sha512-SNGFf/karBr/GNz5GNWnbppFz6uEOGecv6D8WA1ZLeWkjg4gG5e4M9XmPcB32v350e1PTRG7KwWDce48qWAKCQ== + "@spectrum-css/tag@^3.1.4": version "3.3.5" resolved "https://registry.yarnpkg.com/@spectrum-css/tag/-/tag-3.3.5.tgz#f83ded301c8ed334d2c9a33f586807a3d423e588" integrity sha512-KhUZ75xzjnbYPg1ztwWp5xvWYVkG5+KH/2OiTsE5vA9LXZ3Z1O21c5YpFg5FVCvAWN/fwfwpxsi7sp38x7FlLg== -"@spectrum-css/typography@^3.0.2": +"@spectrum-css/tags@^3.0.2": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@spectrum-css/tags/-/tags-3.0.3.tgz#fc76d2735cdc442de91b7eb3bee49a928c0767ac" + integrity sha512-SL8vPxVDfWcY5VdIuyl0TImEXcOU1I7yCyXkk7MudMwfnYs81FaIyY32hFV9OHj0Tz/36UzRzc7AVMSuRQ53pw== + +"@spectrum-css/textfield@^3.0.1": + version "3.2.4" + resolved "https://registry.yarnpkg.com/@spectrum-css/textfield/-/textfield-3.2.4.tgz#46570e7c1ef5bc0de592757ca4731980456ccf4f" + integrity sha512-Af4Otlm2JFjn9tiGcWurE2C73ZC34Xwh6GL/UC4Vq8EQRJsWe6RA9WEVpsafZTZlm/0oEokEstFBkL4nVpbWGw== + +"@spectrum-css/toast@^3.0.1": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@spectrum-css/toast/-/toast-3.0.3.tgz#97c1527384707600832ecda35643ed304615250f" + integrity sha512-CjLeaMs+cjUXojCCRtbj0YkD2BoZW16kjj2o5omkEpUTjA34IJ8xJ1a+CCtDILWekhXvN0MBN4sbumcnwcnx8w== + +"@spectrum-css/tooltip@^3.0.3": + version "3.1.18" + resolved "https://registry.yarnpkg.com/@spectrum-css/tooltip/-/tooltip-3.1.18.tgz#f210eb43e719d81bc22b7cc499c764d56046fd4d" + integrity sha512-n0orz46I5G88IGI0LQGRpoOVCrYMnidghFetUx7+lUNogLj+WsCc9Bpz04iscu6X6E2KmnW/uOyM35llq6H55w== + +"@spectrum-css/treeview@^3.0.2": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@spectrum-css/treeview/-/treeview-3.0.3.tgz#aeda5175158b9f8d7529cb2b394428eb2a428046" + integrity sha512-D5gGzZC/KtRArdx86Mesc9+99W9nTbUOeyYGqoJoAfJSOttoT6Tk5CrDvlCmAqjKf5rajemAkGri1ChqvUIwkw== + +"@spectrum-css/typography@^3.0.1", "@spectrum-css/typography@^3.0.2": version "3.0.2" resolved "https://registry.yarnpkg.com/@spectrum-css/typography/-/typography-3.0.2.tgz#ea3ca0a60e18064527819d48c8c4364cab4fcd38" integrity sha512-5ZOLmQe0edzsDMyhghUd4hBb5uxGsFrxzf+WasfcUw9klSfTsRZ09n1BsaaWbgrLjlMQ+EEHS46v5VNo0Ms2CA== +"@spectrum-css/underlay@^2.0.9": + version "2.0.31" + resolved "https://registry.yarnpkg.com/@spectrum-css/underlay/-/underlay-2.0.31.tgz#d796f0518112c9428e8d2f1e042372ef2f8f4a30" + integrity sha512-v+QU4eUiJbR6j0DrGttlUb2k0vn1mjekWm/SRR52p7lVVNhfZe6y+Zc94xkOxJDQkSo5rhBWSTT3llaNIxjNKQ== + "@spectrum-css/vars@^3.0.1": version "3.0.2" resolved "https://registry.yarnpkg.com/@spectrum-css/vars/-/vars-3.0.2.tgz#ea9062c3c98dfc6ba59e5df14a03025ad8969999" @@ -172,11 +466,23 @@ resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== +"@types/codemirror@^5.60.4": + version "5.60.5" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.5.tgz#5b989a3b4bbe657458cf372c92b6bfda6061a2b7" + integrity sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg== + dependencies: + "@types/tern" "*" + "@types/estree@*", "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== +"@types/marked@^4.0.1": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.5.tgz#3e900fa331a9b1a98f7a8a50f0f39b4bf2b6469f" + integrity sha512-jMN2moJ+lSf1VZXQo3VXeMCjoXuciVONig8+U0YNBop5aBvQw4qkolx1Nzn1i0T8L2l9IZ3jju6bS1pPwlaY1w== + "@types/node@*": version "16.11.7" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.7.tgz#36820945061326978c42a01e56b61cd223dfdc42" @@ -189,11 +495,28 @@ dependencies: "@types/node" "*" +"@types/tern@*": + version "0.23.4" + resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.4.tgz#03926eb13dbeaf3ae0d390caf706b2643a0127fb" + integrity sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg== + dependencies: + "@types/estree" "*" + +acorn-walk@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + acorn@^8.5.0: version "8.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== +acorn@^8.7.0: + version "8.8.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== + alphanum-sort@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" @@ -230,11 +553,77 @@ apexcharts@^3.19.2, apexcharts@^3.22.1: svg.resize.js "^1.4.3" svg.select.js "^3.0.1" +argparse@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA== + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== + +array-sort@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" + integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== + dependencies: + default-compare "^1.0.0" + get-value "^2.0.6" + kind-of "^5.0.2" + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw== + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ== + dependencies: + gulp-header "^1.7.1" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -253,6 +642,22 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +braces@^2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + browserslist@^4.0.0, browserslist@^4.16.0, browserslist@^4.16.6: version "4.18.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.18.1.tgz#60d3920f25b6860eb917c6c7b185576f4d8b017f" @@ -274,6 +679,21 @@ builtin-modules@^3.1.0: resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.2.0.tgz#45d5db99e7ee5e6bc4f362e008bf917ab5049887" integrity sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA== +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + caniuse-api@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0" @@ -306,6 +726,16 @@ chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -315,6 +745,26 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +codemirror-spell-checker@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz#1c660f9089483ccb5113b9ba9ca19c3f4993371e" + integrity sha512-2Tl6n0v+GJRsC9K3MLCdLaMOmvWL0uukajNJseorZJsslaxZyZMgENocPU8R0DyoTAiKsyqiemSOZo7kjGV0LQ== + dependencies: + typo-js "*" + +codemirror@^5.63.1: + version "5.65.7" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.7.tgz#29af41ce5f4c2b8f1c1e16f4e645ff392823716a" + integrity sha512-zb67cXzgugIQmb6tfD4G11ILjYoMfTjwcjn+cWsa4GewlI2adhR/h3kolkoCQTm1msD/1BuqVTKuO09ELsS++A== + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw== + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -359,18 +809,33 @@ commondir@^1.0.1: resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-with-sourcemaps@^1.1.0: +concat-with-sourcemaps@*, concat-with-sourcemaps@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== dependencies: source-map "^0.6.1" +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + css-declaration-sorter@^6.0.3: version "6.1.3" resolved "https://registry.yarnpkg.com/css-declaration-sorter/-/css-declaration-sorter-6.1.3.tgz#e9852e4cf940ba79f509d9425b137d1f94438dc2" @@ -464,21 +929,74 @@ csso@^4.2.0: dependencies: css-tree "^1.1.2" +dayjs@^1.10.4: + version "1.11.5" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.5.tgz#00e8cc627f231f9499c19b38af49f56dc0ac5e93" + integrity sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA== + dayjs@^1.10.5: version "1.10.8" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.8.tgz#267df4bc6276fcb33c04a6735287e3f429abec41" integrity sha512-wbNwDfBHHur9UOzNUjeKUOJ0fCb0a52Wx0xInmQ7Y8FstyajiV1NmK1e00cxsr9YrE9r7yAChE0VvpuY5Rnlow== +debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +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== + dependencies: + ms "2.1.2" + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== + deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +default-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== + dependencies: + kind-of "^5.0.2" + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA== + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA== + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + dom-serializer@^1.0.1: version "1.3.2" resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.3.2.tgz#6206437d32ceefaec7161803230c7a20bc1b4d91" @@ -521,6 +1039,17 @@ downloadjs@1.4.7: resolved "https://registry.yarnpkg.com/downloadjs/-/downloadjs-1.4.7.tgz#f69f96f940e0d0553dac291139865a3cd0101e3c" integrity sha1-9p+W+UDg0FU9rCkROYZaPNAQHjw= +easymde@^2.16.1: + version "2.16.1" + resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.16.1.tgz#f4c2380312615cb33826f1a1fecfaa4022ff551a" + integrity sha512-FihYgjRsKfhGNk89SHSqxKLC4aJ1kfybPWW6iAmtb5GnXu+tnFPSzSaGBmk1RRlCuhFSjhF0SnIMGVPjEzkr6g== + dependencies: + "@types/codemirror" "^5.60.4" + "@types/marked" "^4.0.1" + codemirror "^5.63.1" + codemirror-spell-checker "1.1.2" + marked "^4.0.10" + electron-to-chromium@^1.3.896: version "1.3.900" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.900.tgz#5be2c5818a2a012c511b4b43e87b6ab7a296d4f5" @@ -536,6 +1065,27 @@ emojis-list@^3.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== +engine.io-client@~6.2.1: + version "6.2.2" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.2.2.tgz#c6c5243167f5943dcd9c4abee1bfc634aa2cbdd0" + integrity sha512-8ZQmx0LQGRTYkHuogVZuGSpDqYZtCM/nv8zQ68VZ+JkOpazJ7ICdsSpaO6iXwvaU30oFg5QJOJWj8zWqhbKjkQ== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + engine.io-parser "~5.0.3" + ws "~8.2.3" + xmlhttprequest-ssl "~2.0.0" + +engine.io-parser@~5.0.3: + version "5.0.4" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" + integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== + +ent@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== + entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -581,11 +1131,80 @@ eventemitter3@^4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA== + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug== + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q== + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ== + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + flatpickr@^4.5.2: version "4.6.9" resolved "https://registry.yarnpkg.com/flatpickr/-/flatpickr-4.6.9.tgz#9a13383e8a6814bda5d232eae3fcdccb97dc1499" integrity sha512-F0azNNi8foVWKSF+8X+ZJzz8r9sE1G4hl06RyceIaLvyltKvDl6vqk9Lm/6AUUCi5HWaIjiUbk7UpeE/fOXOpw== +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA== + dependencies: + map-cache "^0.2.2" + +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -613,6 +1232,26 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-object@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/get-object/-/get-object-0.2.0.tgz#d92ff7d5190c64530cda0543dac63a3d47fe8c0c" + integrity sha512-7P6y6k6EzEFmO/XyUyFlXm1YLJy9xeA1x/grNV8276abX5GuwUtYgKFkRFkLixw4hf4Pz9q2vgv/8Ar42R0HuQ== + dependencies: + is-number "^2.0.2" + isobject "^0.2.0" + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== + +get-value@^3.0.0, get-value@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-3.0.1.tgz#5efd2a157f1d6a516d7524e124ac52d0a39ef5a8" + integrity sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA== + dependencies: + isobject "^3.0.1" + glob@^7.1.6: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" @@ -625,6 +1264,35 @@ glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" +gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + +handlebars-utils@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9" + integrity sha512-d5mmoQXdeEqSKMtQQZ9WkiUcO1E3tPbWxluCK9hVgIDPzQa9WsKo3Lbe/sGflTe7TomHEeZaOgwIkyIr1kfzkw== + dependencies: + kind-of "^6.0.0" + typeof-article "^0.1.1" + +handlebars@^4.7.6, handlebars@^4.7.7: + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -635,6 +1303,52 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q== + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw== + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-value@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-2.0.2.tgz#d0f12e8780ba8e90e66ad1a21c707fdb67c25658" + integrity sha512-ybKOlcRsK2MqrM3Hmz/lQxXHZ6ejzSPzpNabKB45jb5qDgJvKPa3SdapTsTLwEb9WltgWpOmNax7i+DzNOk4TA== + dependencies: + get-value "^3.0.0" + has-values "^2.0.1" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ== + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ== + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has-values@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-2.0.1.tgz#3876200ff86d8a8546a9264a952c17d5fc17579d" + integrity sha512-+QdH3jOmq9P8GfdjFg0eJudqx1FqU62NQJ4P16rOEHeRdl7ckgwn6uqQjzYE0ZoHVV/e5E2esuJ5Gl5+HUW19w== + dependencies: + kind-of "^6.0.2" + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -642,6 +1356,24 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +helper-md@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/helper-md/-/helper-md-0.2.2.tgz#c1f59d7e55bbae23362fd8a0e971607aec69d41f" + integrity sha512-49TaQzK+Ic7ZVTq4i1UZxRUJEmAilTk8hz7q4I0WNUaTclLR8ArJV5B3A1fe1xF2HtsDTr2gYKLaVTof/Lt84Q== + dependencies: + ent "^2.2.0" + extend-shallow "^2.0.1" + fs-exists-sync "^0.1.0" + remarkable "^1.6.2" + +html-tag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-tag/-/html-tag-2.0.0.tgz#36c3bc8d816fd30b570d5764a497a641640c2fed" + integrity sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g== + dependencies: + is-self-closing "^1.0.1" + kind-of "^6.0.0" + htmlparser2@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" @@ -684,7 +1416,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2: +inherits@2, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -694,6 +1426,25 @@ is-absolute-url@^3.0.3: resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-3.0.3.tgz#96c6a22b6a23929b11ea0afb1836c36ad4a5d698" integrity sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A== + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + is-core-module@^2.2.0: version "2.8.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.0.tgz#0321336c3d0925e497fd97f5d95cb114a5ccd548" @@ -701,21 +1452,112 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg== + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + is-docker@^2.0.0, is-docker@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-even@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-even/-/is-even-1.0.0.tgz#76b5055fbad8d294a86b6a949015e1c97b717c06" + integrity sha512-LEhnkAdJqic4Dbqn58A0y52IXoHWlsueqQkKfMfdEnIYG8A1sm/GHidKkS6yvXlMoRrkM34csHnXQtOqcb+Jzg== + dependencies: + is-odd "^0.1.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw== + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-glob@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= +is-number@^2.0.2: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg== + dependencies: + kind-of "^3.0.2" + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg== + dependencies: + kind-of "^3.0.2" + +is-odd@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" + integrity sha512-Ri7C2K7o5IrUU9UEI8losXJCCD/UtsaIrkR5sxIcFg4xQ9cRJXlWA5DQvTE0yDc0krvSNLsRGXN11UPS6KyfBw== + dependencies: + is-number "^3.0.0" + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + is-plain-object@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" @@ -733,6 +1575,18 @@ is-resolvable@^1.1.0: resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== +is-self-closing@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" + integrity sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg== + dependencies: + self-closing-tags "^1.0.1" + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" @@ -740,6 +1594,28 @@ is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + +isobject@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e" + integrity sha512-VaWq6XYAsbvM0wf4dyBO7WH9D7GosB7ZZlqrawI9BBiTMINBeCyqSKBa35m870MY3O4aM31pYyZi9DfGrYMJrQ== + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA== + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== + jest-worker@^26.2.1: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" @@ -761,6 +1637,30 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw== + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0, kind-of@^5.0.2: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + leaflet@^1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.7.1.tgz#10d684916edfe1bf41d688a3b97127c0322a2a19" @@ -780,6 +1680,11 @@ loader-utils@^1.1.0: emojis-list "^3.0.0" json5 "^1.0.1" +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -790,11 +1695,31 @@ lodash.memoize@^4.1.2: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= +lodash.template@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= +lodash@^4.17.20, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + magic-string@^0.25.7: version "0.25.7" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.7.tgz#3f497d6fd34c669c6798dcb821f2ef31f5445051" @@ -802,6 +1727,23 @@ magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.4" +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w== + dependencies: + object-visit "^1.0.0" + +marked@^4.0.10: + version "4.0.18" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.18.tgz#cd0ac54b2e5610cfb90e8fd46ccaa8292c9ed569" + integrity sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw== + mdn-data@2.0.14: version "2.0.14" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50" @@ -812,6 +1754,25 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== +micromatch@^3.1.5: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + minimatch@^3.0.2, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -819,11 +1780,29 @@ minimatch@^3.0.2, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimist@^1.2.0: +minimist@^1.2.0, minimist@^1.2.5: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + nanoid@^2.1.0: version "2.1.11" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" @@ -839,6 +1818,28 @@ nanoid@^3.3.1: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.2.tgz#c89622fafb4381cd221421c69ec58547a1eec557" integrity sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA== +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +neo-async@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + node-releases@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" @@ -856,6 +1857,29 @@ nth-check@^2.0.0: dependencies: boolbase "^1.0.0" +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ== + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA== + dependencies: + isobject "^3.0.0" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== + dependencies: + isobject "^3.0.1" + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -897,6 +1921,11 @@ parse-srcset@^1.0.2: resolved "https://registry.yarnpkg.com/parse-srcset/-/parse-srcset-1.0.2.tgz#f2bd221f6cc970a938d88556abc589caaaa2bde1" integrity sha1-8r0iH2zJcKk42IVWq8WJyqqiveE= +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -922,6 +1951,11 @@ pify@^5.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== + postcss-calc@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-8.0.0.tgz#a05b87aacd132740a5db09462a3612453e5df90a" @@ -1208,6 +2242,11 @@ postcss@^8.3.11: picocolors "^1.0.0" source-map-js "^1.0.2" +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + promise.series@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/promise.series/-/promise.series-0.2.0.tgz#2cc7ebe959fc3a6619c04ab4dbdc9e452d864bbd" @@ -1220,6 +2259,27 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" +readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + regexparam@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-2.0.0.tgz#059476767d5f5f87f735fc7922d133fd1a118c8c" @@ -1230,6 +2290,31 @@ regexparam@^1.3.0: resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f" integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g== +relative@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" + integrity sha512-Q5W2qeYtY9GbiR8z1yHNZ1DGhyjb4AnLEjt8iE6XfcC1QIu+FAtj3HQaO0wH28H1mX6cqNLvAqWhP402dxJGyA== + dependencies: + isobject "^2.0.0" + +remarkable@^1.6.2: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + +repeat-element@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" + integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -1245,6 +2330,11 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg== + resolve@^1.17.0, resolve@^1.19.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" @@ -1253,6 +2343,11 @@ resolve@^1.17.0, resolve@^1.19.0: is-core-module "^2.2.0" path-parse "^1.0.6" +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + rollup-plugin-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz#a18da0a4b30bf5ca1ee76ddb1422afbb84ae2b9e" @@ -1343,7 +2438,7 @@ rollup@^2.44.0: optionalDependencies: fsevents "~2.3.2" -safe-buffer@^5.1.0: +safe-buffer@^5.1.0, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== @@ -1353,6 +2448,13 @@ safe-identifier@^0.4.2: resolved "https://registry.yarnpkg.com/safe-identifier/-/safe-identifier-0.4.2.tgz#cf6bfca31c2897c588092d1750d30ef501d59fcb" integrity sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w== +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg== + dependencies: + ret "~0.1.10" + sanitize-html@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.7.0.tgz#e106205b468aca932e2f9baf241f24660d34e279" @@ -1370,6 +2472,11 @@ screenfull@^6.0.1: resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-6.0.1.tgz#3b71e6f06b72d817a8d3be73c45ebe71fa8da1ce" integrity sha512-yzQW+j4zMUBQC51xxWaoDYjxOtl8Kn+xvue3p6v/fv2pIi1jH4AldgVLU8TBfFVgH2x3VXlf3+YiA/AYIPlaew== +self-closing-tags@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" + integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== + serialize-javascript@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" @@ -1377,6 +2484,16 @@ serialize-javascript@^4.0.0: dependencies: randombytes "^2.1.0" +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + shortid@^2.2.15: version "2.2.16" resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608" @@ -1389,11 +2506,70 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +socket.io-client@^4.5.1: + version "4.5.1" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.5.1.tgz#cab8da71976a300d3090414e28c2203a47884d84" + integrity sha512-e6nLVgiRYatS+AHXnOnGi4ocOpubvOUCGhyWw8v+/FxW8saHkinG6Dfhi9TU0Kt/8mwJIAASxvw6eujQmjdZVA== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.2" + engine.io-client "~6.2.1" + socket.io-parser "~4.2.0" + +socket.io-parser@~4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.1.tgz#01c96efa11ded938dcb21cbe590c26af5eff65e5" + integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + source-map-js@^1.0.1, source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" @@ -1402,6 +2578,16 @@ source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" +source-map-url@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" + integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== + +source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ== + source-map@^0.6.0, source-map@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" @@ -1417,11 +2603,31 @@ sourcemap-codec@^1.4.4: resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + stable@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g== + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + string-hash@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" @@ -1436,6 +2642,13 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" @@ -1443,6 +2656,11 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +striptags@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.2.0.tgz#cc74a137db2de8b0b9a370006334161f7dd67052" + integrity sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw== + style-inject@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/style-inject/-/style-inject-0.3.0.tgz#d21c477affec91811cc82355832a700d22bf8dd3" @@ -1477,13 +2695,18 @@ svelte-apexcharts@^1.0.2: dependencies: apexcharts "^3.19.2" -svelte-flatpickr@^3.1.0: +svelte-flatpickr@^3.1.0, svelte-flatpickr@^3.2.3: version "3.2.6" resolved "https://registry.yarnpkg.com/svelte-flatpickr/-/svelte-flatpickr-3.2.6.tgz#595a97b2f25a669e61fe743f90a10dce783bbd49" integrity sha512-0ePUyE9OjInYFqQwRKOxnFSu4dQX9+/rzFMynq2fKYXx406ZUThzSx72gebtjr0DoAQbsH2///BBZa5qk4qZXg== dependencies: flatpickr "^4.5.2" +svelte-portal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3" + integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q== + svelte-spa-router@^3.0.5: version "3.2.0" resolved "https://registry.yarnpkg.com/svelte-spa-router/-/svelte-spa-router-3.2.0.tgz#fae3311d292451236cb57131262406cf312b15ee" @@ -1491,7 +2714,7 @@ svelte-spa-router@^3.0.5: dependencies: regexparam "2.0.0" -svelte@^3.49.0: +svelte@^3.46.2, svelte@^3.49.0: version "3.49.0" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== @@ -1574,16 +2797,112 @@ terser@^5.0.0: commander "^2.20.0" source-map-support "~0.5.20" +through2@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + timsort@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= -util-deprecate@^1.0.2: +to-gfm-code-block@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" + integrity sha512-LQRZWyn8d5amUKnfR9A9Uu7x9ss7Re8peuWR2gkh1E+ildOfv2aF26JpuDg8JtvCduu5+hOrMIH+XstZtnagqg== + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg== + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg== + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +typeof-article@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/typeof-article/-/typeof-article-0.1.1.tgz#9f07e733c3fbb646ffa9e61c08debacd460e06af" + integrity sha512-Vn42zdX3FhmUrzEmitX3iYyLb+Umwpmv8fkZRIknYh84lmdrwqZA5xYaoKiIj2Rc5i/5wcDrpUmZcbk1U51vTw== + dependencies: + kind-of "^3.1.0" + +typo-js@*: + version "1.2.2" + resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.2.tgz#340484d81fe518e77c81a5a770162b14492f183b" + integrity sha512-C7pYBQK17EjSg8tVNY91KHdUt5Nf6FMJ+c3js076quPmBML57PmNMzAcIq/2kf/hSYtFABNDIYNYlJRl5BJhGw== + +uglify-js@^3.1.4: + version "3.17.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.0.tgz#55bd6e9d19ce5eef0d5ad17cd1f587d85b180a85" + integrity sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg== + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ== + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +vm2@^3.9.4: + version "3.9.10" + resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.10.tgz#c66543096b5c44c8861a6465805c23c7cc996a44" + integrity sha512-AuECTSvwu2OHLAZYhG716YzwodKCIJxB6u1zG7PgSQwIgAlEaoXH52bxdcvT8GkGjnYK7r7yWDW0m0sOsPuBjQ== + dependencies: + acorn "^8.7.0" + acorn-walk "^8.2.0" + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== + wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -1598,6 +2917,21 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +ws@~8.2.3: + version "8.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" + integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== + +xmlhttprequest-ssl@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" + integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== + +xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" @@ -1625,3 +2959,8 @@ yargs@^17.3.1: string-width "^4.2.3" y18n "^5.0.5" yargs-parser "^21.0.0" + +year@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" + integrity sha512-9GnJUZ0QM4OgXuOzsKNzTJ5EOkums1Xc+3YQXp+Q+UxFjf7zLucp9dQ8QMIft0Szs1E1hUiXFim1OYfEKFq97w== diff --git a/packages/server/package.json b/packages/server/package.json index 754aa0c264..7f179e3303 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -138,6 +138,7 @@ "redis": "4", "server-destroy": "1.0.1", "snowflake-promise": "^4.5.0", + "socket.io": "^4.5.1", "svelte": "3.49.0", "swagger-parser": "10.0.3", "tar": "^6.1.11", diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index 93e569e0c8..1c9241a53c 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -4,6 +4,7 @@ import { getGlobalDB } from "@budibase/backend-core/tenancy" import { generatePluginID, getPluginParams } from "../../db/utils" import { uploadDirectory } from "@budibase/backend-core/objectStore" import { PluginType, FileType } from "@budibase/types" +import { io } from "../../app" export async function getPlugins(type?: PluginType) { const db = getGlobalDB() @@ -53,7 +54,8 @@ export async function processPlugin(plugin: FileType) { const { metadata, directory } = await extractPluginTarball(plugin) const version = metadata.package.version, name = metadata.package.name, - description = metadata.package.description + description = metadata.package.description, + hash = metadata.schema.hash // first open the tarball into tmp directory const bucketPath = `${name}/${version}/` @@ -82,11 +84,13 @@ export async function processPlugin(plugin: FileType) { _rev: rev, name, version, + hash, description, ...metadata, jsUrl: `${bucketPath}${jsFileName}`, } const response = await db.put(doc) + io.sockets.emit("plugin-update", { name, hash }) return { ...doc, _rev: response.rev, diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index a830fd5518..753375a7f2 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -20,6 +20,7 @@ const { Thread } = require("./threads") const chokidar = require("chokidar") const fs = require("fs") const path = require("path") +const SocketIO = require("socket.io") import redis from "./utilities/redis" import * as migrations from "./migrations" import { events, installation, tenancy } from "@budibase/backend-core" @@ -71,6 +72,15 @@ if (env.isProd()) { const server = http.createServer(app.callback()) destroyable(server) +// Websocket +export const io = SocketIO(server, { + path: "/socket/", + cors: { + origin: ["https://hmr.lan.kingston.dev"], + methods: ["GET", "POST"], + }, +}) + let shuttingDown = false, errCode = 0 server.on("close", async () => { diff --git a/packages/server/src/utilities/websocket.js b/packages/server/src/utilities/websocket.js new file mode 100644 index 0000000000..27cf8d94bd --- /dev/null +++ b/packages/server/src/utilities/websocket.js @@ -0,0 +1,9 @@ +const { Server } = require("socket.io") + +const io = new Server(4000) + +io.on("connection", socket => { + socket.on("foo", arg => { + console.log(arg) + }) +}) diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index f6a0c6ca5c..a60097e18e 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1128,6 +1128,59 @@ uuid "8.3.2" zlib "1.0.5" +"@budibase/bbui@1.2.41-alpha.0": + version "1.2.41-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.2.41-alpha.0.tgz#8e9aa2ffc08c0dccf9316081e312c14e60cbfcd9" + integrity sha512-OQlpWN9XIARatTD7/WQZffYlFsl3M72nmV7bdB8R2zx9/snhT2lwT7gTgfIFa42sawXhcpYXfsUrWgL8IR/iXw== + dependencies: + "@adobe/spectrum-css-workflow-icons" "^1.2.1" + "@budibase/string-templates" "1.2.41-alpha.0" + "@spectrum-css/actionbutton" "^1.0.1" + "@spectrum-css/actiongroup" "^1.0.1" + "@spectrum-css/avatar" "^3.0.2" + "@spectrum-css/button" "^3.0.1" + "@spectrum-css/buttongroup" "^3.0.2" + "@spectrum-css/checkbox" "^3.0.2" + "@spectrum-css/dialog" "^3.0.1" + "@spectrum-css/divider" "^1.0.3" + "@spectrum-css/dropzone" "^3.0.2" + "@spectrum-css/fieldgroup" "^3.0.2" + "@spectrum-css/fieldlabel" "^3.0.1" + "@spectrum-css/icon" "^3.0.1" + "@spectrum-css/illustratedmessage" "^3.0.2" + "@spectrum-css/inlinealert" "^2.0.1" + "@spectrum-css/inputgroup" "^3.0.2" + "@spectrum-css/label" "^2.0.10" + "@spectrum-css/link" "^3.1.1" + "@spectrum-css/menu" "^3.0.1" + "@spectrum-css/modal" "^3.0.1" + "@spectrum-css/pagination" "^3.0.3" + "@spectrum-css/picker" "^1.0.1" + "@spectrum-css/popover" "^3.0.1" + "@spectrum-css/progressbar" "^1.0.2" + "@spectrum-css/progresscircle" "^1.0.2" + "@spectrum-css/radio" "^3.0.2" + "@spectrum-css/search" "^3.0.2" + "@spectrum-css/sidenav" "^3.0.2" + "@spectrum-css/slider" "3.0.1" + "@spectrum-css/statuslight" "^3.0.2" + "@spectrum-css/stepper" "^3.0.3" + "@spectrum-css/switch" "^1.0.2" + "@spectrum-css/table" "^3.0.1" + "@spectrum-css/tabs" "^3.2.12" + "@spectrum-css/tags" "^3.0.2" + "@spectrum-css/textfield" "^3.0.1" + "@spectrum-css/toast" "^3.0.1" + "@spectrum-css/tooltip" "^3.0.3" + "@spectrum-css/treeview" "^3.0.2" + "@spectrum-css/typography" "^3.0.1" + "@spectrum-css/underlay" "^2.0.9" + "@spectrum-css/vars" "^3.0.1" + dayjs "^1.10.4" + easymde "^2.16.1" + svelte-flatpickr "^3.2.3" + svelte-portal "^1.0.0" + "@budibase/bbui@^0.9.139": version "0.9.190" resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-0.9.190.tgz#e1ec400ac90f556bfbc80fc23a04506f1585ea81" @@ -1178,6 +1231,70 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" +"@budibase/client@1.2.41-alpha.0": + version "1.2.41-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/client/-/client-1.2.41-alpha.0.tgz#b439345ab0053952854c69eba2fafb812fcbb320" + integrity sha512-ZMUWIGde1BGMwxsWioDIabOCBjlrfBr4KP47gL8YCM4a5C5RyoZJty8kRVRSImsJcPs8YcF012XaXb8J2A7WNg== + dependencies: + "@budibase/bbui" "1.2.41-alpha.0" + "@budibase/frontend-core" "1.2.41-alpha.0" + "@budibase/string-templates" "1.2.41-alpha.0" + "@spectrum-css/button" "^3.0.3" + "@spectrum-css/card" "^3.0.3" + "@spectrum-css/divider" "^1.0.3" + "@spectrum-css/link" "^3.1.3" + "@spectrum-css/page" "^3.0.1" + "@spectrum-css/tag" "^3.1.4" + "@spectrum-css/typography" "^3.0.2" + "@spectrum-css/vars" "^3.0.1" + apexcharts "^3.22.1" + dayjs "^1.10.5" + downloadjs "1.4.7" + leaflet "^1.7.1" + regexparam "^1.3.0" + rollup-plugin-polyfill-node "^0.8.0" + sanitize-html "^2.7.0" + screenfull "^6.0.1" + shortid "^2.2.15" + svelte "^3.49.0" + svelte-apexcharts "^1.0.2" + svelte-flatpickr "^3.1.0" + svelte-spa-router "^3.0.5" + +"@budibase/frontend-core@1.2.41-alpha.0": + version "1.2.41-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/frontend-core/-/frontend-core-1.2.41-alpha.0.tgz#1f98dabc1955b41003b9ad92aae932c399920559" + integrity sha512-0hT7Qm7qxs0xIklPFetM55x7b0XQTpdIWpLvECRsUFo0xYRKt8XJBgMegua9U0AYKCyXDhruL0FKpBLCebbJXg== + dependencies: + "@budibase/bbui" "1.2.41-alpha.0" + lodash "^4.17.21" + svelte "^3.46.2" + +"@budibase/handlebars-helpers@^0.11.8": + version "0.11.8" + resolved "https://registry.yarnpkg.com/@budibase/handlebars-helpers/-/handlebars-helpers-0.11.8.tgz#6953d29673a8c5c407e096c0a84890465c7ce841" + integrity sha512-ggWJUt0GqsHFAEup5tlWlcrmYML57nKhpNGGLzVsqXVYN8eVmf3xluYmmMe7fDYhQH0leSprrdEXmsdFQF3HAQ== + dependencies: + array-sort "^1.0.0" + define-property "^2.0.2" + extend-shallow "^3.0.2" + for-in "^1.0.2" + get-object "^0.2.0" + get-value "^3.0.1" + handlebars "^4.7.7" + handlebars-utils "^1.0.6" + has-value "^2.0.2" + helper-md "^0.2.2" + html-tag "^2.0.0" + is-even "^1.0.0" + is-glob "^4.0.1" + kind-of "^6.0.3" + micromatch "^3.1.5" + relative "^3.0.2" + striptags "^3.1.1" + to-gfm-code-block "^0.1.1" + year "^0.2.1" + "@budibase/pro@1.2.41-alpha.0": version "1.2.41-alpha.0" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.2.41-alpha.0.tgz#4f27dbeee24ddc58e2a4e75cd90b53543f742722" @@ -1207,6 +1324,18 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" +"@budibase/string-templates@1.2.41-alpha.0": + version "1.2.41-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/string-templates/-/string-templates-1.2.41-alpha.0.tgz#f61808f5199805ba77510fec652369a38489ec2f" + integrity sha512-JW4Td0R/2kZv71UjjCDo31Oz+B61OKUq37U2ZL4uzvid64z9HwHr7NBP2/aELKBq31BymtUfvq1lOjBv1n1Flg== + dependencies: + "@budibase/handlebars-helpers" "^0.11.8" + dayjs "^1.10.4" + handlebars "^4.7.6" + handlebars-utils "^1.0.6" + lodash "^4.17.20" + vm2 "^3.9.4" + "@budibase/types@1.2.41-alpha.0": version "1.2.41-alpha.0" resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.2.41-alpha.0.tgz#01071ce6ecef6799b04b1defce2b38e81b615f9f" @@ -2139,6 +2268,24 @@ resolved "https://registry.yarnpkg.com/@redis/time-series/-/time-series-1.0.3.tgz#4cfca8e564228c0bddcdf4418cba60c20b224ac4" integrity sha512-OFp0q4SGrTH0Mruf6oFsHGea58u8vS/iI5+NpYdicaM+7BgqBZH8FFvNZ8rYYLrUO/QRqMq72NpXmxLVNcdmjA== +"@rollup/plugin-inject@^4.0.0": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz#fbeee66e9a700782c4f65c8b0edbafe58678fbc2" + integrity sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ== + dependencies: + "@rollup/pluginutils" "^3.1.0" + estree-walker "^2.0.1" + magic-string "^0.25.7" + +"@rollup/pluginutils@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" + integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== + dependencies: + "@types/estree" "0.0.39" + estree-walker "^1.0.1" + picomatch "^2.2.2" + "@sendgrid/client@^7.1.1": version "7.7.0" resolved "https://registry.yarnpkg.com/@sendgrid/client/-/client-7.7.0.tgz#f8f67abd604205a0d0b1af091b61517ef465fdbf" @@ -2420,6 +2567,11 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/sidenav/-/sidenav-3.0.23.tgz#c218560d472e13a3e0d1499b762df1206dcffbfd" integrity sha512-4IFw2/HMQJRzM0M2c5na/HeY7y5vJoGpMFBkXNpQyhW4TRo7N1rGwYQ5dRD3s4OVEWV4/rjfGV0d/qhfwKUTog== +"@spectrum-css/slider@3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@spectrum-css/slider/-/slider-3.0.1.tgz#5281e6f47eb5a4fd3d1816c138bf66d01d7f2e49" + integrity sha512-DI2dtMRnQuDM1miVzl3SGyR1khUEKnwdXfO5EHDFwkC3yav43F5QogkfjmjFmWWobMVovdJlAuiaaJ/IHejD0Q== + "@spectrum-css/statuslight@^3.0.2": version "3.0.8" resolved "https://registry.yarnpkg.com/@spectrum-css/statuslight/-/statuslight-3.0.8.tgz#3b0ea80712573679870a85d469850230e794a0f7" @@ -2445,6 +2597,16 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.16.tgz#c3f7800d8d6f7c9930c28cd01354816328bf72b1" integrity sha512-JUcMB/fiDG/KoyrVstlUMacFJUY4OHKqhMRuPtu9ggUXWCRbSkY8he92v6u0HwY3DuhDoOxNTK8d/PLjk/fsbg== +"@spectrum-css/tabs@^3.2.12": + version "3.2.19" + resolved "https://registry.yarnpkg.com/@spectrum-css/tabs/-/tabs-3.2.19.tgz#2eae3a2c4760466882db08281365d502c3f22ebf" + integrity sha512-SNGFf/karBr/GNz5GNWnbppFz6uEOGecv6D8WA1ZLeWkjg4gG5e4M9XmPcB32v350e1PTRG7KwWDce48qWAKCQ== + +"@spectrum-css/tag@^3.1.4": + version "3.3.14" + resolved "https://registry.yarnpkg.com/@spectrum-css/tag/-/tag-3.3.14.tgz#2d1ca0759da6a3a2970d14bcabf33bd4a8f63a5f" + integrity sha512-S4RUaxN/83Pr/SYkQHeZNh2NXmtumUEzhrsrrliI6bAt3bjs+mLresTGd9qkIX2+Ycq1JHWTr0HTga4ti1YYyA== + "@spectrum-css/tags@^3.0.2": version "3.0.3" resolved "https://registry.yarnpkg.com/@spectrum-css/tags/-/tags-3.0.3.tgz#fc76d2735cdc442de91b7eb3bee49a928c0767ac" @@ -2622,6 +2784,18 @@ resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== +"@types/codemirror@^5.60.4": + version "5.60.5" + resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.5.tgz#5b989a3b4bbe657458cf372c92b6bfda6061a2b7" + integrity sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg== + dependencies: + "@types/tern" "*" + +"@types/component-emitter@^1.2.10": + version "1.2.11" + resolved "https://registry.yarnpkg.com/@types/component-emitter/-/component-emitter-1.2.11.tgz#50d47d42b347253817a39709fef03ce66a108506" + integrity sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ== + "@types/connect@*": version "3.4.35" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" @@ -2634,6 +2808,11 @@ resolved "https://registry.yarnpkg.com/@types/content-disposition/-/content-disposition-0.5.5.tgz#650820e95de346e1f84e30667d168c8fd25aa6e3" integrity sha512-v6LCdKfK6BwcqMo+wYW05rLS12S0ZO0Fl4w1h4aaZMD7bqT3gVUns6FvLJKGZHQmYn3SX55JWGpziwJRwVgutA== +"@types/cookie@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.1.tgz#bfd02c1f2224567676c1545199f87c3a861d878d" + integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== + "@types/cookiejar@*": version "2.1.2" resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.2.tgz#66ad9331f63fe8a3d3d9d8c6e3906dd10f6446e8" @@ -2649,6 +2828,11 @@ "@types/keygrip" "*" "@types/node" "*" +"@types/cors@^2.8.12": + version "2.8.12" + resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.12.tgz#6b2c510a7ad7039e98e7b8d3d6598f4359e5c080" + integrity sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw== + "@types/eslint-scope@^3.7.3": version "3.7.3" resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.3.tgz#125b88504b61e3c8bc6f870882003253005c3224" @@ -2670,6 +2854,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== +"@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== + "@types/express-serve-static-core@^4.17.18": version "4.17.28" resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" @@ -2813,6 +3002,11 @@ resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== +"@types/marked@^4.0.1": + version "4.0.5" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-4.0.5.tgz#3e900fa331a9b1a98f7a8a50f0f39b4bf2b6469f" + integrity sha512-jMN2moJ+lSf1VZXQo3VXeMCjoXuciVONig8+U0YNBop5aBvQw4qkolx1Nzn1i0T8L2l9IZ3jju6bS1pPwlaY1w== + "@types/mime@^1": version "1.3.2" resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" @@ -2857,6 +3051,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708" integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== +"@types/node@>=10.0.0": + version "18.7.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.6.tgz#31743bc5772b6ac223845e18c3fc26f042713c83" + integrity sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A== + "@types/node@>=8.0.0 <15": version "14.18.21" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.21.tgz#0155ee46f6be28b2ff0342ca1a9b9fd4468bef41" @@ -2948,6 +3147,13 @@ "@types/cookiejar" "*" "@types/node" "*" +"@types/tern@*": + version "0.23.4" + resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.4.tgz#03926eb13dbeaf3ae0d390caf706b2643a0127fb" + integrity sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg== + dependencies: + "@types/estree" "*" + "@types/tough-cookie@*": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.2.tgz#6286b4c7228d58ab7866d19716f3696e03a09397" @@ -3239,7 +3445,7 @@ abstract-leveldown@~6.2.1, abstract-leveldown@~6.2.3: level-supports "~1.0.0" xtend "~4.0.0" -accepts@^1.3.5: +accepts@^1.3.5, accepts@~1.3.4: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== @@ -3532,7 +3738,7 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.7: +argparse@^1.0.10, argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== @@ -3579,6 +3785,15 @@ array-equal@^1.0.0: resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" integrity sha512-H3LU5RLiSsGXPhN+Nipar0iR0IofH+8r89G2y1tBKxQ/agagKyAjhkAFDRBfodP2caPrNKHpAWNIM/c9yeL7uA== +array-sort@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" + integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== + dependencies: + default-compare "^1.0.0" + get-value "^2.0.6" + kind-of "^5.0.2" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -3710,6 +3925,13 @@ atomic-sleep@^1.0.0: resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ== +autolinker@~0.28.0: + version "0.28.1" + resolved "https://registry.yarnpkg.com/autolinker/-/autolinker-0.28.1.tgz#0652b491881879f0775dace0cdca3233942a4e47" + integrity sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ== + dependencies: + gulp-header "^1.7.1" + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" @@ -3943,6 +4165,11 @@ base64-js@^1.0.2, base64-js@^1.3.0, base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== +base64id@2.0.0, base64id@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/base64id/-/base64id-2.0.0.tgz#2770ac6bc47d312af97a8bf9a634342e0cd25cb6" + integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== + base64url@3.x.x, base64url@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" @@ -4542,6 +4769,18 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== +codemirror-spell-checker@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz#1c660f9089483ccb5113b9ba9ca19c3f4993371e" + integrity sha512-2Tl6n0v+GJRsC9K3MLCdLaMOmvWL0uukajNJseorZJsslaxZyZMgENocPU8R0DyoTAiKsyqiemSOZo7kjGV0LQ== + dependencies: + typo-js "*" + +codemirror@^5.63.1: + version "5.65.7" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.7.tgz#29af41ce5f4c2b8f1c1e16f4e645ff392823716a" + integrity sha512-zb67cXzgugIQmb6tfD4G11ILjYoMfTjwcjn+cWsa4GewlI2adhR/h3kolkoCQTm1msD/1BuqVTKuO09ELsS++A== + collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -4670,7 +4909,7 @@ commoner@^0.10.1: q "^1.1.2" recast "^0.11.17" -component-emitter@^1.2.0, component-emitter@^1.2.1: +component-emitter@^1.2.0, component-emitter@^1.2.1, component-emitter@~1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== @@ -4692,6 +4931,13 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +concat-with-sourcemaps@*: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + condense-newlines@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/condense-newlines/-/condense-newlines-0.2.1.tgz#3de985553139475d32502c83b02f60684d24c55f" @@ -4752,7 +4998,7 @@ convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: dependencies: safe-buffer "~5.1.1" -cookie@^0.4.1: +cookie@^0.4.1, cookie@~0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== @@ -4814,6 +5060,14 @@ core-util-is@^1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== +cors@~2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + crc@^3.4.4: version "3.8.0" resolved "https://registry.yarnpkg.com/crc/-/crc-3.8.0.tgz#ad60269c2c856f8c299e2c4cc0de4556914056c6" @@ -4958,7 +5212,7 @@ dayjs@^1.10.4, dayjs@^1.10.5: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.3.tgz#4754eb694a624057b9ad2224b67b15d552589258" integrity sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A== -debug@4, debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: +debug@4, debug@^4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, 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== @@ -5098,6 +5352,13 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +default-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" + integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== + dependencies: + kind-of "^5.0.2" + default-shell@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/default-shell/-/default-shell-1.0.1.tgz#752304bddc6174f49eb29cb988feea0b8813c8bc" @@ -5265,11 +5526,25 @@ doctrine@3.0.0, doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-serializer@^1.0.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-1.4.1.tgz#de5d41b1aea290215dc45a6dae8adcf1d32e2d30" + integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.2.0" + entities "^2.0.0" + dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== +domelementtype@^2.0.1, domelementtype@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -5284,6 +5559,22 @@ domexception@^2.0.1: dependencies: webidl-conversions "^5.0.0" +domhandler@^4.0.0, domhandler@^4.2.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" + integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== + dependencies: + domelementtype "^2.2.0" + +domutils@^2.5.2: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -5328,6 +5619,11 @@ download@8.0.0: p-event "^2.1.0" pify "^4.0.1" +downloadjs@1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/downloadjs/-/downloadjs-1.4.7.tgz#f69f96f940e0d0553dac291139865a3cd0101e3c" + integrity sha512-LN1gO7+u9xjU5oEScGFKvXhYf7Y/empUIIEAGBs1LzUq/rg5duiDrkuH5A2lQGd5jfMOb9X9usDa2oVXwJ0U/Q== + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -5343,6 +5639,17 @@ duplexify@^4.0.0: readable-stream "^3.1.1" stream-shift "^1.0.0" +easymde@^2.16.1: + version "2.16.1" + resolved "https://registry.yarnpkg.com/easymde/-/easymde-2.16.1.tgz#f4c2380312615cb33826f1a1fecfaa4022ff551a" + integrity sha512-FihYgjRsKfhGNk89SHSqxKLC4aJ1kfybPWW6iAmtb5GnXu+tnFPSzSaGBmk1RRlCuhFSjhF0SnIMGVPjEzkr6g== + dependencies: + "@types/codemirror" "^5.60.4" + "@types/marked" "^4.0.1" + codemirror "^5.63.1" + codemirror-spell-checker "1.1.2" + marked "^4.0.10" + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -5446,6 +5753,27 @@ end-stream@~0.1.0: dependencies: write-stream "~0.4.3" +engine.io-parser@~5.0.3: + version "5.0.4" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.0.4.tgz#0b13f704fa9271b3ec4f33112410d8f3f41d0fc0" + integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== + +engine.io@~6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-6.2.0.tgz#003bec48f6815926f2b1b17873e576acd54f41d0" + integrity sha512-4KzwW3F3bk+KlzSOY57fj/Jx6LyRQ1nbcyIadehl+AnXjKT7gDO0ORdRi/84ixvMKTym6ZKuxvbzN62HDDU1Lg== + dependencies: + "@types/cookie" "^0.4.1" + "@types/cors" "^2.8.12" + "@types/node" ">=10.0.0" + accepts "~1.3.4" + base64id "2.0.0" + cookie "~0.4.1" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~5.0.3" + ws "~8.2.3" + enhanced-resolve@^5.9.3: version "5.9.3" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88" @@ -5454,6 +5782,16 @@ enhanced-resolve@^5.9.3: graceful-fs "^4.2.4" tapable "^2.2.0" +ent@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" + integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== + +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + entities@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" @@ -5887,6 +6225,16 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== +estree-walker@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" + integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== + +estree-walker@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -6436,6 +6784,11 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== + fs-extra@8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -6584,6 +6937,14 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.3" +get-object@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/get-object/-/get-object-0.2.0.tgz#d92ff7d5190c64530cda0543dac63a3d47fe8c0c" + integrity sha512-7P6y6k6EzEFmO/XyUyFlXm1YLJy9xeA1x/grNV8276abX5GuwUtYgKFkRFkLixw4hf4Pz9q2vgv/8Ar42R0HuQ== + dependencies: + is-number "^2.0.2" + isobject "^0.2.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -6646,6 +7007,13 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA== +get-value@^3.0.0, get-value@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-3.0.1.tgz#5efd2a157f1d6a516d7524e124ac52d0a39ef5a8" + integrity sha512-mKZj9JLQrwMBtj5wxi6MH8Z5eSKaERpAwjg43dPtlGI1ZVEgH/qC7T8/6R2OBSUA+zzHBZgICsVJaEIV2tKTDA== + dependencies: + isobject "^3.0.1" + getopts@2.2.5: version "2.2.5" resolved "https://registry.yarnpkg.com/getopts/-/getopts-2.2.5.tgz#67a0fe471cacb9c687d817cab6450b96dde8313b" @@ -6951,7 +7319,24 @@ gtoken@^5.0.4: google-p12-pem "^3.1.3" jws "^4.0.0" -handlebars@^4.7.7: +gulp-header@^1.7.1: + version "1.8.12" + resolved "https://registry.yarnpkg.com/gulp-header/-/gulp-header-1.8.12.tgz#ad306be0066599127281c4f8786660e705080a84" + integrity sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ== + dependencies: + concat-with-sourcemaps "*" + lodash.template "^4.4.0" + through2 "^2.0.0" + +handlebars-utils@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/handlebars-utils/-/handlebars-utils-1.0.6.tgz#cb9db43362479054782d86ffe10f47abc76357f9" + integrity sha512-d5mmoQXdeEqSKMtQQZ9WkiUcO1E3tPbWxluCK9hVgIDPzQa9WsKo3Lbe/sGflTe7TomHEeZaOgwIkyIr1kfzkw== + dependencies: + kind-of "^6.0.0" + typeof-article "^0.1.1" + +handlebars@^4.7.6, handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== @@ -7045,6 +7430,14 @@ has-value@^1.0.0: has-values "^1.0.0" isobject "^3.0.0" +has-value@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-2.0.2.tgz#d0f12e8780ba8e90e66ad1a21c707fdb67c25658" + integrity sha512-ybKOlcRsK2MqrM3Hmz/lQxXHZ6ejzSPzpNabKB45jb5qDgJvKPa3SdapTsTLwEb9WltgWpOmNax7i+DzNOk4TA== + dependencies: + get-value "^3.0.0" + has-values "^2.0.1" + has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" @@ -7058,6 +7451,13 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" +has-values@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-2.0.1.tgz#3876200ff86d8a8546a9264a952c17d5fc17579d" + integrity sha512-+QdH3jOmq9P8GfdjFg0eJudqx1FqU62NQJ4P16rOEHeRdl7ckgwn6uqQjzYE0ZoHVV/e5E2esuJ5Gl5+HUW19w== + dependencies: + kind-of "^6.0.2" + has-yarn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" @@ -7070,6 +7470,16 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +helper-md@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/helper-md/-/helper-md-0.2.2.tgz#c1f59d7e55bbae23362fd8a0e971607aec69d41f" + integrity sha512-49TaQzK+Ic7ZVTq4i1UZxRUJEmAilTk8hz7q4I0WNUaTclLR8ArJV5B3A1fe1xF2HtsDTr2gYKLaVTof/Lt84Q== + dependencies: + ent "^2.2.0" + extend-shallow "^2.0.1" + fs-exists-sync "^0.1.0" + remarkable "^1.6.2" + homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" @@ -7106,6 +7516,24 @@ html-escaper@^2.0.0: resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== +html-tag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/html-tag/-/html-tag-2.0.0.tgz#36c3bc8d816fd30b570d5764a497a641640c2fed" + integrity sha512-XxzooSo6oBoxBEUazgjdXj7VwTn/iSTSZzTYKzYY6I916tkaYzypHxy+pbVU1h+0UQ9JlVf5XkNQyxOAiiQO1g== + dependencies: + is-self-closing "^1.0.1" + kind-of "^6.0.0" + +htmlparser2@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" + integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== + dependencies: + domelementtype "^2.0.1" + domhandler "^4.0.0" + domutils "^2.5.2" + entities "^2.0.0" + http-assert@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/http-assert/-/http-assert-1.5.0.tgz#c389ccd87ac16ed2dfa6246fd73b926aa00e6b8f" @@ -7546,6 +7974,13 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-even@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-even/-/is-even-1.0.0.tgz#76b5055fbad8d294a86b6a949015e1c97b717c06" + integrity sha512-LEhnkAdJqic4Dbqn58A0y52IXoHWlsueqQkKfMfdEnIYG8A1sm/GHidKkS6yvXlMoRrkM34csHnXQtOqcb+Jzg== + dependencies: + is-odd "^0.1.2" + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -7635,6 +8070,13 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" +is-number@^2.0.2: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg== + dependencies: + kind-of "^3.0.2" + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -7657,6 +8099,13 @@ is-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== +is-odd@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" + integrity sha512-Ri7C2K7o5IrUU9UEI8losXJCCD/UtsaIrkR5sxIcFg4xQ9cRJXlWA5DQvTE0yDc0krvSNLsRGXN11UPS6KyfBw== + dependencies: + is-number "^3.0.0" + is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -7674,6 +8123,11 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-plain-object@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" + integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== + is-potential-custom-element-name@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" @@ -7702,6 +8156,13 @@ is-retry-allowed@^2.2.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz#88f34cbd236e043e71b6932d09b0c65fb7b4d71d" integrity sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg== +is-self-closing@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" + integrity sha512-E+60FomW7Blv5GXTlYee2KDrnG6srxF7Xt1SjrhWUGUEsTFIqY/nq2y3DaftCsgUMdh89V07IVfhY9KIJhLezg== + dependencies: + self-closing-tags "^1.0.1" + is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" @@ -7812,6 +8273,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isobject@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-0.2.0.tgz#a3432192f39b910b5f02cc989487836ec70aa85e" + integrity sha512-VaWq6XYAsbvM0wf4dyBO7WH9D7GosB7ZZlqrawI9BBiTMINBeCyqSKBa35m870MY3O4aM31pYyZi9DfGrYMJrQ== + isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" @@ -8992,7 +9458,7 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.1.0, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ== @@ -9006,12 +9472,12 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -kind-of@^5.0.0: +kind-of@^5.0.0, kind-of@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== -kind-of@^6.0.0, kind-of@^6.0.2: +kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== @@ -9271,6 +9737,11 @@ lcid@^2.0.0: dependencies: invert-kv "^2.0.0" +leaflet@^1.7.1: + version "1.8.0" + resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.8.0.tgz#4615db4a22a304e8e692cae9270b983b38a2055e" + integrity sha512-gwhMjFCQiYs3x/Sf+d49f10ERXaEFCPr+nVTryhAW8DWbMGqJqt9G4XuIaHmFW08zYvhgdzqXGr8AlW8v8dQkA== + left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -9465,6 +9936,11 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -9575,6 +10051,21 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== +lodash.template@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.without@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" @@ -9585,7 +10076,7 @@ lodash.xor@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.xor/-/lodash.xor-4.5.0.tgz#4d48ed7e98095b0632582ba714d3ff8ae8fb1db6" integrity sha512-sVN2zimthq7aZ5sPGXnSz32rZPuqcparVW50chJQe+mzTYV+IsxSsl/2gnkWWE2Of7K3myBQBqtLKOUEHJKRsQ== -lodash@4.17.21, lodash@^4.14.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.7.0: +lodash@4.17.21, lodash@^4.14.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -9653,6 +10144,13 @@ ltgt@2.2.1, ltgt@^2.1.2, ltgt@~2.2.0: resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" integrity sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA== +magic-string@^0.25.7: + version "0.25.9" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c" + integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ== + dependencies: + sourcemap-codec "^1.4.8" + make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" @@ -9717,6 +10215,11 @@ markdown-it@^12.2.0: mdurl "^1.0.1" uc.micro "^1.0.5" +marked@^4.0.10: + version "4.0.18" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.18.tgz#cd0ac54b2e5610cfb90e8fd46ccaa8292c9ed569" + integrity sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw== + matcher@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca" @@ -9789,7 +10292,7 @@ methods@^1.0.1, methods@^1.1.1, methods@^1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.5: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -10047,6 +10550,16 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA== +nanoid@^2.1.0: + version "2.1.11" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" + integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== + +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -10289,7 +10802,7 @@ object-assign@^2.0.0: resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa" integrity sha512-CdsOUYIh5wIiozhJ3rLQgmUTgcyzFwZZrqhkKhODMoGtPKM+wt0h0CNIoauJWMsS9822EdzPsF/6mb4nLvPN5g== -object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -10644,6 +11157,11 @@ parse-passwd@^1.0.0: resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== +parse-srcset@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-srcset/-/parse-srcset-1.0.2.tgz#f2bd221f6cc970a938d88556abc589caaaa2bde1" + integrity sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q== + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -10890,7 +11408,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -11005,6 +11523,15 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg== +postcss@^8.3.11: + version "8.4.16" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.16.tgz#33a1d675fac39941f5f445db0de4db2b6e01d43c" + integrity sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + postgres-array@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" @@ -11753,6 +12280,16 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexparam@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-2.0.1.tgz#c912f5dae371e3798100b3c9ce22b7414d0889fa" + integrity sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw== + +regexparam@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f" + integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g== + regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" @@ -11796,6 +12333,21 @@ regjsparser@^0.8.2: dependencies: jsesc "~0.5.0" +relative@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" + integrity sha512-Q5W2qeYtY9GbiR8z1yHNZ1DGhyjb4AnLEjt8iE6XfcC1QIu+FAtj3HQaO0wH28H1mX6cqNLvAqWhP402dxJGyA== + dependencies: + isobject "^2.0.0" + +remarkable@^1.6.2: + version "1.7.4" + resolved "https://registry.yarnpkg.com/remarkable/-/remarkable-1.7.4.tgz#19073cb960398c87a7d6546eaa5e50d2022fcd00" + integrity sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg== + dependencies: + argparse "^1.0.10" + autolinker "~0.28.0" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -12007,6 +12559,13 @@ roarr@^2.15.3: semver-compare "^1.0.0" sprintf-js "^1.1.2" +rollup-plugin-polyfill-node@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.8.0.tgz#859c070822f5e38d221e5b4238cb34aa894c2b19" + integrity sha512-C4UeKedOmOBkB3FgR+z/v9kzRwV1Q/H8xWs1u1+CNe4XOV6hINfOrcO+TredKxYvopCmr+WKUSNsFUnD1RLHgQ== + dependencies: + "@rollup/plugin-inject" "^4.0.0" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -12073,6 +12632,18 @@ sane@^4.0.3: minimist "^1.1.1" walker "~1.0.5" +sanitize-html@^2.7.0: + version "2.7.1" + resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-2.7.1.tgz#a6c2c1a88054a79eeacfac9b0a43f1b393476901" + integrity sha512-oOpe8l4J8CaBk++2haoN5yNI5beekjuHv3JRPKUx/7h40Rdr85pemn4NkvUB3TcBP7yjat574sPlcMAyv4UQig== + dependencies: + deepmerge "^4.2.2" + escape-string-regexp "^4.0.0" + htmlparser2 "^6.0.0" + is-plain-object "^5.0.0" + parse-srcset "^1.0.2" + postcss "^8.3.11" + sanitize-s3-objectkey@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/sanitize-s3-objectkey/-/sanitize-s3-objectkey-0.0.1.tgz#efa9887cd45275b40234fb4bb12fc5754fe64e7e" @@ -12111,6 +12682,11 @@ schema-utils@^3.1.0, schema-utils@^3.1.1: ajv "^6.12.5" ajv-keywords "^3.5.2" +screenfull@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/screenfull/-/screenfull-6.0.2.tgz#3dbe4b8c4f8f49fb8e33caa8f69d0bca730ab238" + integrity sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw== + search-params@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/search-params/-/search-params-3.0.0.tgz#dbc7c243058e5a33ae1e9870be91f5aced4100d8" @@ -12128,6 +12704,11 @@ seek-bzip@^1.0.5: dependencies: commander "^2.8.1" +self-closing-tags@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" + integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== + semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" @@ -12263,6 +12844,13 @@ shimmer@^1.2.0: resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== +shortid@^2.2.15: + version "2.2.16" + resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.16.tgz#b742b8f0cb96406fd391c76bfc18a67a57fe5608" + integrity sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g== + dependencies: + nanoid "^2.1.0" + side-channel@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" @@ -12393,6 +12981,32 @@ snowflake-sdk@^1.6.0: uuid "^3.3.2" winston "^3.1.0" +socket.io-adapter@~2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz#b50a4a9ecdd00c34d4c8c808224daa1a786152a6" + integrity sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg== + +socket.io-parser@~4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.0.5.tgz#cb404382c32324cc962f27f3a44058cf6e0552df" + integrity sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig== + dependencies: + "@types/component-emitter" "^1.2.10" + component-emitter "~1.3.0" + debug "~4.3.1" + +socket.io@^4.5.1: + version "4.5.1" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.5.1.tgz#aa7e73f8a6ce20ee3c54b2446d321bbb6b1a9029" + integrity sha512-0y9pnIso5a9i+lJmsCdtmTTgJFFSvNQKDnPQRz28mGNnxbmqYg2QPtJTLFxhymFZhAIn50eHAKzJeiNaKr+yUQ== + dependencies: + accepts "~1.3.4" + base64id "~2.0.0" + debug "~4.3.2" + engine.io "~6.2.0" + socket.io-adapter "~2.4.0" + socket.io-parser "~4.0.4" + sonic-boom@^1.0.2: version "1.4.1" resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-1.4.1.tgz#d35d6a74076624f12e6f917ade7b9d75e918f53e" @@ -12427,6 +13041,11 @@ source-list-map@^2.0.1: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -12480,6 +13099,11 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== +sourcemap-codec@^1.4.8: + version "1.4.8" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" + integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== + spark-md5@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/spark-md5/-/spark-md5-3.0.1.tgz#83a0e255734f2ab4e5c466e5a2cfc9ba2aa2124d" @@ -12804,6 +13428,11 @@ strip-outer@^1.0.0: dependencies: escape-string-regexp "^1.0.2" +striptags@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/striptags/-/striptags-3.2.0.tgz#cc74a137db2de8b0b9a370006334161f7dd67052" + integrity sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw== + style-loader@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.1.tgz#057dfa6b3d4d7c7064462830f9113ed417d38575" @@ -12903,7 +13532,14 @@ svelte-portal@^1.0.0: resolved "https://registry.yarnpkg.com/svelte-portal/-/svelte-portal-1.0.0.tgz#36a47c5578b1a4d9b4dc60fa32a904640ec4cdd3" integrity sha512-nHf+DS/jZ6jjnZSleBMSaZua9JlG5rZv9lOGKgJuaZStfevtjIlUJrkLc3vbV8QdBvPPVmvcjTlazAzfKu0v3Q== -svelte@3.49.0: +svelte-spa-router@^3.0.5: + version "3.3.0" + resolved "https://registry.yarnpkg.com/svelte-spa-router/-/svelte-spa-router-3.3.0.tgz#2fc0967a49dc361dfe4d38dddad6e662eed5b42c" + integrity sha512-cwRNe7cxD43sCvSfEeaKiNZg3FCizGxeMcf7CPiWRP3jKXjEma3vxyyuDtPOam6nWbVxl9TNM3hlE/i87ZlqcQ== + dependencies: + regexparam "2.0.1" + +svelte@3.49.0, svelte@^3.46.2, svelte@^3.49.0: version "3.49.0" resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== @@ -13265,6 +13901,11 @@ to-fast-properties@^2.0.0: resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= +to-gfm-code-block@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-gfm-code-block/-/to-gfm-code-block-0.1.1.tgz#25d045a5fae553189e9637b590900da732d8aa82" + integrity sha512-LQRZWyn8d5amUKnfR9A9Uu7x9ss7Re8peuWR2gkh1E+ildOfv2aF26JpuDg8JtvCduu5+hOrMIH+XstZtnagqg== + to-json-schema@0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/to-json-schema/-/to-json-schema-0.2.5.tgz#ef3c3f11ad64460dcfbdbafd0fd525d69d62a98f" @@ -13511,6 +14152,13 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typeof-article@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/typeof-article/-/typeof-article-0.1.1.tgz#9f07e733c3fbb646ffa9e61c08debacd460e06af" + integrity sha512-Vn42zdX3FhmUrzEmitX3iYyLb+Umwpmv8fkZRIknYh84lmdrwqZA5xYaoKiIj2Rc5i/5wcDrpUmZcbk1U51vTw== + dependencies: + kind-of "^3.1.0" + typeof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/typeof/-/typeof-1.0.0.tgz#9c84403f2323ae5399167275497638ea1d2f2440" @@ -13521,6 +14169,11 @@ typescript@4.6.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4" integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg== +typo-js@*: + version "1.2.2" + resolved "https://registry.yarnpkg.com/typo-js/-/typo-js-1.2.2.tgz#340484d81fe518e77c81a5a770162b14492f183b" + integrity sha512-C7pYBQK17EjSg8tVNY91KHdUt5Nf6FMJ+c3js076quPmBML57PmNMzAcIq/2kf/hSYtFABNDIYNYlJRl5BJhGw== + uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" @@ -13823,7 +14476,7 @@ validator@^13.6.0, validator@^13.7.0: resolved "https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857" integrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw== -vary@^1.1.2: +vary@^1, vary@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= @@ -13845,6 +14498,14 @@ vm2@3.9.6: acorn "^8.7.0" acorn-walk "^8.2.0" +vm2@^3.9.4: + version "3.9.10" + resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.10.tgz#c66543096b5c44c8861a6465805c23c7cc996a44" + integrity sha512-AuECTSvwu2OHLAZYhG716YzwodKCIJxB6u1zG7PgSQwIgAlEaoXH52bxdcvT8GkGjnYK7r7yWDW0m0sOsPuBjQ== + dependencies: + acorn "^8.7.0" + acorn-walk "^8.2.0" + vuvuzela@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/vuvuzela/-/vuvuzela-1.0.3.tgz#3be145e58271c73ca55279dd851f12a682114b0b" @@ -14210,6 +14871,11 @@ ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a" integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== +ws@~8.2.3: + version "8.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" + integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== + x3-linkedlist@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/x3-linkedlist/-/x3-linkedlist-1.2.0.tgz#c70467559b7c748595f0f79222af1d709402699e" @@ -14398,6 +15064,11 @@ yauzl@^2.4.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" +year@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/year/-/year-0.2.1.tgz#4083ae520a318b23ec86037f3000cb892bdf9bb0" + integrity sha512-9GnJUZ0QM4OgXuOzsKNzTJ5EOkums1Xc+3YQXp+Q+UxFjf7zLucp9dQ8QMIft0Szs1E1hUiXFim1OYfEKFq97w== + ylru@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/ylru/-/ylru-1.3.2.tgz#0de48017473275a4cbdfc83a1eaf67c01af8a785" From f548dd99b837c18757793d185065ce8f649355d4 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 19 Aug 2022 11:49:11 +0100 Subject: [PATCH 064/280] Update vite to fix chrome issues --- packages/builder/package.json | 4 +- packages/builder/vite.config.js | 1 + packages/builder/yarn.lock | 345 +++++++++++++++++++------------- 3 files changed, 206 insertions(+), 144 deletions(-) diff --git a/packages/builder/package.json b/packages/builder/package.json index 959f302fea..430b752c0a 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -96,7 +96,7 @@ "@babel/runtime": "^7.13.10", "@rollup/plugin-replace": "^2.4.2", "@roxi/routify": "2.18.5", - "@sveltejs/vite-plugin-svelte": "1.0.0-next.19", + "@sveltejs/vite-plugin-svelte": "1.0.1", "@testing-library/jest-dom": "^5.11.10", "@testing-library/svelte": "^3.0.0", "babel-jest": "^26.6.3", @@ -118,7 +118,7 @@ "ts-node": "^10.4.0", "tsconfig-paths": "4.0.0", "typescript": "^4.5.5", - "vite": "^2.1.5" + "vite": "^3.0.8" }, "gitHead": "115189f72a850bfb52b65ec61d932531bf327072" } diff --git a/packages/builder/vite.config.js b/packages/builder/vite.config.js index ad58b472dd..95e2908995 100644 --- a/packages/builder/vite.config.js +++ b/packages/builder/vite.config.js @@ -17,6 +17,7 @@ export default defineConfig(({ mode }) => { clientPort: env.VITE_HMR_CLIENT_PORT || 3000, path: env.VITE_HMR_PATH || "/", }, + port: 3000, }, base: "/builder/", build: { diff --git a/packages/builder/yarn.lock b/packages/builder/yarn.lock index 88547fd4a6..6551981a9e 100644 --- a/packages/builder/yarn.lock +++ b/packages/builder/yarn.lock @@ -967,6 +967,11 @@ debug "^3.1.0" lodash.once "^4.1.1" +"@esbuild/linux-loong64@0.14.54": + version "0.14.54" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz#de2a4be678bd4d0d1ffbb86e6de779cde5999028" + integrity sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw== + "@hapi/hoek@^9.0.0": version "9.2.1" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.1.tgz#9551142a1980503752536b5050fd99f4a7f13b17" @@ -1215,10 +1220,10 @@ estree-walker "^1.0.1" picomatch "^2.2.2" -"@rollup/pluginutils@^4.1.1": - version "4.1.1" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.1.tgz#1d4da86dd4eded15656a57d933fda2b9a08d47ec" - integrity sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ== +"@rollup/pluginutils@^4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" + integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ== dependencies: estree-walker "^2.0.1" picomatch "^2.2.2" @@ -1350,17 +1355,17 @@ resolved "https://registry.yarnpkg.com/@spectrum-css/vars/-/vars-4.3.0.tgz#03ddf67d3aa8a9a4cb0edbbd259465c9ced7e70d" integrity sha512-ZQ2XAhgu4G9yBeXQNDAz07Z8oZNnMt5o9vzf/mpBA7Teb/JI+8qXp2wt8D245SzmtNlFkG/bzRYvQc0scgZeCQ== -"@sveltejs/vite-plugin-svelte@1.0.0-next.19": - version "1.0.0-next.19" - resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.0-next.19.tgz#9646abc2cd1982146db4bb341aafdb5f32f19dd2" - integrity sha512-q9hHkMzodScwDq64pNaWhekpj97vWg3wO9T0rqd8bC2EsrBQs2uD1qMJvDqlNd63AbO2uSJMGo+TQ0Xt2xgyYg== +"@sveltejs/vite-plugin-svelte@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.1.tgz#7f468f03c933fcdfc60d4773671c73f33b9ef4d6" + integrity sha512-PorCgUounn0VXcpeJu+hOweZODKmGuLHsLomwqSj+p26IwjjGffmYQfVHtiTWq+NqaUuuHWWG7vPge6UFw4Aeg== dependencies: - "@rollup/pluginutils" "^4.1.1" - debug "^4.3.2" - kleur "^4.1.4" - magic-string "^0.25.7" - require-relative "^0.8.7" - svelte-hmr "^0.14.7" + "@rollup/pluginutils" "^4.2.1" + debug "^4.3.4" + deepmerge "^4.2.2" + kleur "^4.1.5" + magic-string "^0.26.2" + svelte-hmr "^0.14.12" "@testing-library/dom@^7.0.3": version "7.31.2" @@ -2493,6 +2498,13 @@ debug@^3.1.0: dependencies: ms "^2.1.1" +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -2655,113 +2667,132 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -esbuild-android-arm64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.13.14.tgz#c85083ece26be3d67e6c720e088968a98409e023" - integrity sha512-Q+Xhfp827r+ma8/DJgpMRUbDZfefsk13oePFEXEIJ4gxFbNv5+vyiYXYuKm43/+++EJXpnaYmEnu4hAKbAWYbA== +esbuild-android-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz#505f41832884313bbaffb27704b8bcaa2d8616be" + integrity sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ== -esbuild-darwin-64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.13.14.tgz#8e4e237ad847cc54a1d3a5caee26a746b9f0b81f" - integrity sha512-YmOhRns6QBNSjpVdTahi/yZ8dscx9ai7a6OY6z5ACgOuQuaQ2Qk2qgJ0/siZ6LgD0gJFMV8UINFV5oky5TFNQQ== +esbuild-android-arm64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz#8ce69d7caba49646e009968fe5754a21a9871771" + integrity sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg== -esbuild-darwin-arm64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.14.tgz#b3b5ebd40b2cb06ee0f6fb342dd4bdcca54ad273" - integrity sha512-Lp00VTli2jqZghSa68fx3fEFCPsO1hK59RMo1PRap5RUjhf55OmaZTZYnCDI0FVlCtt+gBwX5qwFt4lc6tI1xg== +esbuild-darwin-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz#24ba67b9a8cb890a3c08d9018f887cc221cdda25" + integrity sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug== -esbuild-freebsd-64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.14.tgz#175ecb2fa8141428cf70ea2d5f4c27534bad53e0" - integrity sha512-BKosI3jtvTfnmsCW37B1TyxMUjkRWKqopR0CE9AF2ratdpkxdR24Vpe3gLKNyWiZ7BE96/SO5/YfhbPUzY8wKw== +esbuild-darwin-arm64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz#3f7cdb78888ee05e488d250a2bdaab1fa671bf73" + integrity sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw== -esbuild-freebsd-arm64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.14.tgz#a7d64e41d1fa581f8db7775e5200f18e67d70c4d" - integrity sha512-yd2uh0yf+fWv5114+SYTl4/1oDWtr4nN5Op+PGxAkMqHfYfLjFKpcxwCo/QOS/0NWqPVE8O41IYZlFhbEN2B8Q== +esbuild-freebsd-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz#09250f997a56ed4650f3e1979c905ffc40bbe94d" + integrity sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg== -esbuild-linux-32@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.13.14.tgz#14bdd4f6b6cfd35c65c835894651ba335c2117da" - integrity sha512-a8rOnS1oWSfkkYWXoD2yXNV4BdbDKA7PNVQ1klqkY9SoSApL7io66w5H44mTLsfyw7G6Z2vLlaLI2nz9MMAowA== +esbuild-freebsd-arm64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz#bafb46ed04fc5f97cbdb016d86947a79579f8e48" + integrity sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q== -esbuild-linux-64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.13.14.tgz#7fd56851b2982fdd0cd8447ee9858c2c5711708a" - integrity sha512-yPZSoMs9W2MC3Dw+6kflKt5FfQm6Dicex9dGIr1OlHRsn3Hm7yGMUTctlkW53KknnZdOdcdd5upxvbxqymczVQ== +esbuild-linux-32@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz#e2a8c4a8efdc355405325033fcebeb941f781fe5" + integrity sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw== -esbuild-linux-arm64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.14.tgz#a55634d70679ba509adeafd68eebb9fd1ec5af6c" - integrity sha512-Lvo391ln9PzC334e+jJ2S0Rt0cxP47eoH5gFyv/E8HhOnEJTvm7A+RRnMjjHnejELacTTfYgFGQYPjLsi/jObQ== +esbuild-linux-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz#de5fdba1c95666cf72369f52b40b03be71226652" + integrity sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg== -esbuild-linux-arm@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.13.14.tgz#bb96a99677e608b31ff61f37564326d38e846ca2" - integrity sha512-8chZE4pkKRvJ/M/iwsNQ1KqsRg2RyU5eT/x2flNt/f8F2TVrDreR7I0HEeCR50wLla3B1C3wTIOzQBmjuc6uWg== +esbuild-linux-arm64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz#dae4cd42ae9787468b6a5c158da4c84e83b0ce8b" + integrity sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig== -esbuild-linux-mips64le@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.14.tgz#6a55362a8fd1e593dea2ecc41877beed8b8184b9" - integrity sha512-MZhgxbmrWbpY3TOE029O6l5tokG9+Yoj2hW7vdit/d/VnmneqeGrSHADuDL6qXM8L5jaCiaivb4VhsyVCpdAbQ== +esbuild-linux-arm@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz#a2c1dff6d0f21dbe8fc6998a122675533ddfcd59" + integrity sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw== -esbuild-linux-ppc64le@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.14.tgz#9e0048587ece0a7f184ab147f20d077098045e7f" - integrity sha512-un7KMwS7fX1Un6BjfSZxTT8L5cV/8Uf4SAhM7WYy2XF8o8TI+uRxxD03svZnRNIPsN2J5cl6qV4n7Iwz+yhhVw== +esbuild-linux-mips64le@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz#d9918e9e4cb972f8d6dae8e8655bf9ee131eda34" + integrity sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw== -esbuild-netbsd-64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.13.14.tgz#dcab16a4bbcfa16e2e8535dadc5f64fdc891c63b" - integrity sha512-5ekKx/YbOmmlTeNxBjh38Uh5TGn5C4uyqN17i67k18pS3J+U2hTVD7rCxcFcRS1AjNWumkVL3jWqYXadFwMS0Q== +esbuild-linux-ppc64le@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz#3f9a0f6d41073fb1a640680845c7de52995f137e" + integrity sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ== -esbuild-openbsd-64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.14.tgz#3c7453b155ebb68dc34d5aec3bd6505337bdda08" - integrity sha512-9bzvwewHjct2Cv5XcVoE1yW5YTW12Sk838EYfA46abgnhxGoFSD1mFcaztp5HHC43AsF+hQxbSFG/RilONARUA== +esbuild-linux-riscv64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz#618853c028178a61837bc799d2013d4695e451c8" + integrity sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg== -esbuild-sunos-64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.13.14.tgz#85addf5fef6b5db154a955d4f2e88953359d75ce" - integrity sha512-mjMrZB76M6FmoiTvj/RGWilrioR7gVwtFBRVugr9qLarXMIU1W/pQx+ieEOtflrW61xo8w1fcxyHsVVGRvoQ0w== +esbuild-linux-s390x@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz#d1885c4c5a76bbb5a0fe182e2c8c60eb9e29f2a6" + integrity sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA== -esbuild-windows-32@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.13.14.tgz#f77f98f30a5c636c44db2428ecdf9bcbbaedb1a7" - integrity sha512-GZa6mrx2rgfbH/5uHg0Rdw50TuOKbdoKCpEBitzmG5tsXBdce+cOL+iFO5joZc6fDVCLW3Y6tjxmSXRk/v20Hg== +esbuild-netbsd-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz#69ae917a2ff241b7df1dbf22baf04bd330349e81" + integrity sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w== -esbuild-windows-64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.13.14.tgz#bc778674c40d65150d12385e0f23eb3a0badbd0d" - integrity sha512-Lsgqah24bT7ClHjLp/Pj3A9wxjhIAJyWQcrOV4jqXAFikmrp2CspA8IkJgw7HFjx6QrJuhpcKVbCAe/xw0i2yw== +esbuild-openbsd-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz#db4c8495287a350a6790de22edea247a57c5d47b" + integrity sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw== -esbuild-windows-arm64@0.13.14: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.14.tgz#91a8dad35ab2c4dd27cd83860742955b25a354d7" - integrity sha512-KP8FHVlWGhM7nzYtURsGnskXb/cBCPTfj0gOKfjKq2tHtYnhDZywsUG57nk7TKhhK0fL11LcejHG3LRW9RF/9A== +esbuild-sunos-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz#54287ee3da73d3844b721c21bc80c1dc7e1bf7da" + integrity sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw== -esbuild@^0.13.2: - version "0.13.14" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.13.14.tgz#98a3f7f42809abdc2b57c84565d0f713382dc1a5" - integrity sha512-xu4D+1ji9x53ocuomcY+KOrwAnWzhBu/wTEjpdgZ8I1c8i5vboYIeigMdzgY1UowYBKa2vZgVgUB32bu7gkxeg== +esbuild-windows-32@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz#f8aaf9a5667630b40f0fb3aa37bf01bbd340ce31" + integrity sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w== + +esbuild-windows-64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz#bf54b51bd3e9b0f1886ffdb224a4176031ea0af4" + integrity sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ== + +esbuild-windows-arm64@0.14.54: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz#937d15675a15e4b0e4fafdbaa3a01a776a2be982" + integrity sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg== + +esbuild@^0.14.47: + version "0.14.54" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.54.tgz#8b44dcf2b0f1a66fc22459943dccf477535e9aa2" + integrity sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA== optionalDependencies: - esbuild-android-arm64 "0.13.14" - esbuild-darwin-64 "0.13.14" - esbuild-darwin-arm64 "0.13.14" - esbuild-freebsd-64 "0.13.14" - esbuild-freebsd-arm64 "0.13.14" - esbuild-linux-32 "0.13.14" - esbuild-linux-64 "0.13.14" - esbuild-linux-arm "0.13.14" - esbuild-linux-arm64 "0.13.14" - esbuild-linux-mips64le "0.13.14" - esbuild-linux-ppc64le "0.13.14" - esbuild-netbsd-64 "0.13.14" - esbuild-openbsd-64 "0.13.14" - esbuild-sunos-64 "0.13.14" - esbuild-windows-32 "0.13.14" - esbuild-windows-64 "0.13.14" - esbuild-windows-arm64 "0.13.14" + "@esbuild/linux-loong64" "0.14.54" + esbuild-android-64 "0.14.54" + esbuild-android-arm64 "0.14.54" + esbuild-darwin-64 "0.14.54" + esbuild-darwin-arm64 "0.14.54" + esbuild-freebsd-64 "0.14.54" + esbuild-freebsd-arm64 "0.14.54" + esbuild-linux-32 "0.14.54" + esbuild-linux-64 "0.14.54" + esbuild-linux-arm "0.14.54" + esbuild-linux-arm64 "0.14.54" + esbuild-linux-mips64le "0.14.54" + esbuild-linux-ppc64le "0.14.54" + esbuild-linux-riscv64 "0.14.54" + esbuild-linux-s390x "0.14.54" + esbuild-netbsd-64 "0.14.54" + esbuild-openbsd-64 "0.14.54" + esbuild-sunos-64 "0.14.54" + esbuild-windows-32 "0.14.54" + esbuild-windows-64 "0.14.54" + esbuild-windows-arm64 "0.14.54" escalade@^3.1.1: version "3.1.1" @@ -3519,6 +3550,13 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" +is-core-module@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -4285,10 +4323,10 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== -kleur@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.4.tgz#8c202987d7e577766d039a8cd461934c01cda04d" - integrity sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA== +kleur@^4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780" + integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== lazy-ass@1.6.0, lazy-ass@^1.6.0: version "1.6.0" @@ -4425,6 +4463,13 @@ magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.4" +magic-string@^0.26.2: + version "0.26.2" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.2.tgz#5331700e4158cd6befda738bb6b0c7b93c0d4432" + integrity sha512-NzzlXpclt5zAbmo6h6jNc8zl2gNRGHvmsZW4IvZhTC4W7k4OlLP+S5YLussa/r3ixNT66KOQfNORlXHSOy/X4A== + dependencies: + sourcemap-codec "^1.4.8" + make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -4615,10 +4660,10 @@ nanoid@^2.1.0: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280" integrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA== -nanoid@^3.1.30: - version "3.1.30" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" - integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ== +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== nanomatch@^1.2.9: version "1.2.13" @@ -4887,7 +4932,7 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -4948,14 +4993,14 @@ posix-character-classes@^0.1.0: resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= -postcss@^8.3.8: - version "8.3.11" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.11.tgz#c3beca7ea811cd5e1c4a3ec6d2e7599ef1f8f858" - integrity sha512-hCmlUAIlUiav8Xdqw3Io4LcpA1DOt7h3LSTAC4G6JGHFFaWzI6qvFt9oilvl8BmkbBRX1IhM90ZAmpk68zccQA== +postcss@^8.4.16: + version "8.4.16" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.16.tgz#33a1d675fac39941f5f445db0de4db2b6e01d43c" + integrity sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ== dependencies: - nanoid "^3.1.30" + nanoid "^3.3.4" picocolors "^1.0.0" - source-map-js "^0.6.2" + source-map-js "^1.0.2" posthog-js@1.4.5: version "1.4.5" @@ -5184,11 +5229,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -require-relative@^0.8.7: - version "0.8.7" - resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" - integrity sha1-eZlTn8ngR6N5KPoZb44VY9q9Nt4= - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -5206,7 +5246,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.14.2, resolve@^1.18.1, resolve@^1.20.0: +resolve@^1.10.0, resolve@^1.14.2, resolve@^1.18.1: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -5214,6 +5254,15 @@ resolve@^1.10.0, resolve@^1.14.2, resolve@^1.18.1, resolve@^1.20.0: is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^1.22.1: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -5262,7 +5311,14 @@ rollup-pluginutils@^2.8.2: dependencies: estree-walker "^0.6.1" -rollup@^2.44.0, rollup@^2.57.0: +"rollup@>=2.75.6 <2.77.0 || ~2.77.0": + version "2.77.3" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.77.3.tgz#8f00418d3a2740036e15deb653bed1a90ee0cc12" + integrity sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g== + optionalDependencies: + fsevents "~2.3.2" + +rollup@^2.44.0: version "2.60.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.60.0.tgz#4ee60ab7bdd0356763f87d7099f413e5460fc193" integrity sha512-cHdv9GWd58v58rdseC8e8XIaPUo8a9cgZpnCMMDGZFDZKEODOiPPEQFXLriWr/TjXzhPPmG5bkAztPsOARIcGQ== @@ -5475,10 +5531,10 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -source-map-js@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-0.6.2.tgz#0bb5de631b41cfbda6cfba8bd05a80efdfd2385e" - integrity sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug== +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== source-map-resolve@^0.5.0: version "0.5.3" @@ -5527,7 +5583,7 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== -sourcemap-codec@^1.4.4: +sourcemap-codec@^1.4.4, sourcemap-codec@^1.4.8: version "1.4.8" resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== @@ -5707,15 +5763,20 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + svelte-dnd-action@^0.9.8: version "0.9.12" resolved "https://registry.yarnpkg.com/svelte-dnd-action/-/svelte-dnd-action-0.9.12.tgz#78cf33097986488c6d069eca517af473cd998730" integrity sha512-GlXIB3/56IMR5A0+qUx+FX7Q7n8uCAIeuYdgSBmn9iOlxWc+mgM8P1kNwAKCMSTdQ4IQETVQILNgWVY1KIFzsg== -svelte-hmr@^0.14.7: - version "0.14.7" - resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.7.tgz#7fa8261c7b225d9409f0a86f3b9ea5c3ca6f6607" - integrity sha512-pDrzgcWSoMaK6AJkBWkmgIsecW0GChxYZSZieIYfCP0v2oPyx2CYU/zm7TBIcjLVUPP714WxmViE9Thht4etog== +svelte-hmr@^0.14.12: + version "0.14.12" + resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.12.tgz#a127aec02f1896500b10148b2d4d21ddde39973f" + integrity sha512-4QSW/VvXuqVcFZ+RhxiR8/newmwOCTlbYIezvkeN6302YFRE8cXy0naamHcjz8Y9Ce3ITTZtrHrIL0AGfyo61w== svelte-jester@^1.3.2: version "1.8.2" @@ -6081,15 +6142,15 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vite@^2.1.5: - version "2.6.14" - resolved "https://registry.yarnpkg.com/vite/-/vite-2.6.14.tgz#35c09a15e4df823410819a2a239ab11efb186271" - integrity sha512-2HA9xGyi+EhY2MXo0+A2dRsqsAG3eFNEVIo12olkWhOmc8LfiM+eMdrXf+Ruje9gdXgvSqjLI9freec1RUM5EA== +vite@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/vite/-/vite-3.0.8.tgz#aa095ad8e3e5da46d9ec7e878f262678965d6531" + integrity sha512-AOZ4eN7mrkJiOLuw8IA7piS4IdOQyQCA81GxGsAQvAZzMRi9ZwGB3TOaYsj4uLAWK46T5L4AfQ6InNGlxX30IQ== dependencies: - esbuild "^0.13.2" - postcss "^8.3.8" - resolve "^1.20.0" - rollup "^2.57.0" + esbuild "^0.14.47" + postcss "^8.4.16" + resolve "^1.22.1" + rollup ">=2.75.6 <2.77.0 || ~2.77.0" optionalDependencies: fsevents "~2.3.2" From c1822ecac671d6c508d5b68df001697680e3a1da Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 22 Aug 2022 18:24:34 +0100 Subject: [PATCH 065/280] Clean up websocket initialisation --- packages/client/src/websocket.js | 9 ++++++--- packages/server/src/api/controllers/plugin.ts | 4 ++-- packages/server/src/app.ts | 12 +++-------- packages/server/src/websocket.ts | 20 +++++++++++++++++++ 4 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 packages/server/src/websocket.ts diff --git a/packages/client/src/websocket.js b/packages/client/src/websocket.js index 6acb442e7a..8c151e6ab9 100644 --- a/packages/client/src/websocket.js +++ b/packages/client/src/websocket.js @@ -4,20 +4,23 @@ import { io } from "socket.io-client" export const initWebsocket = () => { const { inBuilder, location } = get(builderStore) - console.log(location) + + // Only connect when we're inside the builder preview, for now if (!inBuilder || !location) { return } - // Websocket + // Initialise connection const tls = location.protocol === "https:" const proto = tls ? "wss:" : "ws:" const host = location.hostname const port = location.port || (tls ? 433 : 80) console.log(`${proto}//${host}:${port}`) const socket = io(`${proto}//${host}:${port}`, { - path: "/socket/", + path: "/socket/client", }) + + // Event handlers socket.on("plugin-update", data => { builderStore.actions.updateUsedPlugin(data.name, data.hash) }) diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index 1c9241a53c..b237a70421 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -4,7 +4,7 @@ import { getGlobalDB } from "@budibase/backend-core/tenancy" import { generatePluginID, getPluginParams } from "../../db/utils" import { uploadDirectory } from "@budibase/backend-core/objectStore" import { PluginType, FileType } from "@budibase/types" -import { io } from "../../app" +import { ClientAppSocket } from "../../app" export async function getPlugins(type?: PluginType) { const db = getGlobalDB() @@ -90,7 +90,7 @@ export async function processPlugin(plugin: FileType) { jsUrl: `${bucketPath}${jsFileName}`, } const response = await db.put(doc) - io.sockets.emit("plugin-update", { name, hash }) + ClientAppSocket.emit("plugin-update", { name, hash }) return { ...doc, _rev: response.rev, diff --git a/packages/server/src/app.ts b/packages/server/src/app.ts index 8d2e1cdea8..3238fe4d26 100644 --- a/packages/server/src/app.ts +++ b/packages/server/src/app.ts @@ -18,12 +18,12 @@ const { logAlert } = require("@budibase/backend-core/logging") const { pinoSettings } = require("@budibase/backend-core") const { Thread } = require("./threads") const fs = require("fs") -const SocketIO = require("socket.io") import redis from "./utilities/redis" import * as migrations from "./migrations" import { events, installation, tenancy } from "@budibase/backend-core" import { createAdminUser, getChecklist } from "./utilities/workerRequests" import { watch } from "./watch" +import { Websocket } from "./websocket" const app = new Koa() @@ -69,14 +69,8 @@ if (env.isProd()) { const server = http.createServer(app.callback()) destroyable(server) -// Websocket -export const io = SocketIO(server, { - path: "/socket/", - cors: { - origin: ["https://hmr.lan.kingston.dev"], - methods: ["GET", "POST"], - }, -}) +// initialise websockets +export const ClientAppSocket = new Websocket(server, "/socket/client") let shuttingDown = false, errCode = 0 diff --git a/packages/server/src/websocket.ts b/packages/server/src/websocket.ts new file mode 100644 index 0000000000..db61c34358 --- /dev/null +++ b/packages/server/src/websocket.ts @@ -0,0 +1,20 @@ +import SocketIO from "socket.io" + +export class Websocket { + socketIO: any + + constructor(server: any, path: string) { + // @ts-ignore + this.socketIO = SocketIO(server, { + path, + cors: { + origin: "*", + }, + }) + } + + // Emit an event to all sockets + emit(event: string, payload: any) { + this.socketIO.sockets.emit(event, payload) + } +} From 2961b0ed89f81925841598631f034199b49232d9 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 22 Aug 2022 18:30:13 +0100 Subject: [PATCH 066/280] Remove logging and expect version to be passed in top level when initialising plugins --- packages/client/src/stores/components.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/client/src/stores/components.js b/packages/client/src/stores/components.js index 90a0c903f2..f12f26ecfb 100644 --- a/packages/client/src/stores/components.js +++ b/packages/client/src/stores/components.js @@ -140,16 +140,11 @@ const createComponentStore = () => { return customComponentManifest?.[type]?.Component } - const registerCustomComponent = ({ Component, schema }) => { - if (!Component || !schema?.schema?.name) { + const registerCustomComponent = ({ Component, schema, version }) => { + if (!Component || !schema?.schema?.name || !version) { return } - console.log(schema) - console.log("register", schema.schema.name) - const component = `plugin/${schema.schema.name}/${ - schema.schema.version || "2.0.5" - }` - console.log(component) + const component = `plugin/${schema.schema.name}/${version}` store.update(state => { state.customComponentManifest[component] = { Component, From f0e158cc813e47624ae76c758c4ced3ff974b3f1 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 23 Aug 2022 08:48:16 +0100 Subject: [PATCH 067/280] Improve websocket types --- packages/client/src/websocket.js | 2 +- packages/server/src/websocket.ts | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/packages/client/src/websocket.js b/packages/client/src/websocket.js index 8c151e6ab9..1a4ee49a92 100644 --- a/packages/client/src/websocket.js +++ b/packages/client/src/websocket.js @@ -14,7 +14,7 @@ export const initWebsocket = () => { const tls = location.protocol === "https:" const proto = tls ? "wss:" : "ws:" const host = location.hostname - const port = location.port || (tls ? 433 : 80) + const port = location.port || (tls ? 443 : 80) console.log(`${proto}//${host}:${port}`) const socket = io(`${proto}//${host}:${port}`, { path: "/socket/client", diff --git a/packages/server/src/websocket.ts b/packages/server/src/websocket.ts index db61c34358..52942ab795 100644 --- a/packages/server/src/websocket.ts +++ b/packages/server/src/websocket.ts @@ -1,20 +1,17 @@ -import SocketIO from "socket.io" +import { Server } from "socket.io" +import http from "http" export class Websocket { - socketIO: any + socketServer: Server - constructor(server: any, path: string) { - // @ts-ignore - this.socketIO = SocketIO(server, { + constructor(server: http.Server, path: string) { + this.socketServer = new Server(server, { path, - cors: { - origin: "*", - }, }) } // Emit an event to all sockets emit(event: string, payload: any) { - this.socketIO.sockets.emit(event, payload) + this.socketServer.sockets.emit(event, payload) } } From fe09208bb1a5b3c01c898fbb8b89403da6e5c442 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Tue, 30 Aug 2022 09:53:16 +0100 Subject: [PATCH 068/280] Usage page updates WIP --- .../builder/src/components/usage/Usage.svelte | 52 +++- .../src/components/usage/UsageDashCard.svelte | 108 +++++++ .../builder/src/components/usage/index.js | 2 + packages/builder/src/constants/index.js | 7 + .../builder/portal/settings/usage.svelte | 279 ++++++++++++++---- 5 files changed, 381 insertions(+), 67 deletions(-) create mode 100644 packages/builder/src/components/usage/UsageDashCard.svelte create mode 100644 packages/builder/src/components/usage/index.js diff --git a/packages/builder/src/components/usage/Usage.svelte b/packages/builder/src/components/usage/Usage.svelte index cd9071785d..27383019e8 100644 --- a/packages/builder/src/components/usage/Usage.svelte +++ b/packages/builder/src/components/usage/Usage.svelte @@ -1,10 +1,13 @@
- +
+ {#if showWarning} + + {/if} +
+ {usage.name} +
+
{#if unlimited} - {usage.used} + {usage.used} / Unlimited {:else} {usage.used} / {usage.total} {/if}
{#if unlimited} - Unlimited + {:else} - + + {/if} + {#if showWarning} + + To get more queries upgrade your plan + {/if}
@@ -51,6 +82,13 @@ display: flex; flex-direction: row; justify-content: space-between; - gap: var(--spacing-m); + margin-bottom: 12px; + } + .header-container { + display: flex; + } + .heading { + margin-top: 3px; + margin-left: 5px; } diff --git a/packages/builder/src/components/usage/UsageDashCard.svelte b/packages/builder/src/components/usage/UsageDashCard.svelte new file mode 100644 index 0000000000..ff0ac7ca49 --- /dev/null +++ b/packages/builder/src/components/usage/UsageDashCard.svelte @@ -0,0 +1,108 @@ + + +
+
+
+ +
+ {description} +
+ {title} +
+ {subtitle} +
+
+ {#each textRows as row} + {row} + {/each} +
+
+
+
+ {#if secondaryDefined} +
+ +
+ {/if} + {#if primaryDefined} +
+ +
+ {/if} +
+
+
+ +
+
+ + diff --git a/packages/builder/src/components/usage/index.js b/packages/builder/src/components/usage/index.js new file mode 100644 index 0000000000..48c0e2ea2c --- /dev/null +++ b/packages/builder/src/components/usage/index.js @@ -0,0 +1,2 @@ +export { default as Usage } from "./Usage.svelte" +export { default as DashCard } from "./UsageDashCard.svelte" diff --git a/packages/builder/src/constants/index.js b/packages/builder/src/constants/index.js index 4e2ca37b9c..bcfbfffb81 100644 --- a/packages/builder/src/constants/index.js +++ b/packages/builder/src/constants/index.js @@ -57,3 +57,10 @@ export const DefaultAppTheme = { navBackground: "var(--spectrum-global-color-gray-50)", navTextColor: "var(--spectrum-global-color-gray-800)", } + +export const PlanType = { + FREE: "free", + PRO: "pro", + BUSINESS: "business", + ENTERPRISE: "enterprise", +} diff --git a/packages/builder/src/pages/builder/portal/settings/usage.svelte b/packages/builder/src/pages/builder/portal/settings/usage.svelte index 069c37b555..6ee7e45e25 100644 --- a/packages/builder/src/pages/builder/portal/settings/usage.svelte +++ b/packages/builder/src/pages/builder/portal/settings/usage.svelte @@ -5,20 +5,39 @@ Heading, Layout, notifications, - Link, + Page, + Detail, } from "@budibase/bbui" import { onMount } from "svelte" - import { admin, auth, licensing } from "stores/portal" - import Usage from "components/usage/Usage.svelte" + import { admin, auth, licensing } from "../../../../stores/portal" + import { PlanType } from "../../../../constants" + import { DashCard, Usage } from "../../../../components/usage" let staticUsage = [] let monthlyUsage = [] + let price + let lastPayment + let cancelAt + let nextPayment + let balance let loaded = false + let textRows = [] + let daysRemainingInMonth + + const upgradeUrl = `${$admin.accountPortalUrl}/portal/upgrade` + const manageUrl = `${$admin.accountPortalUrl}/portal/billing` + + const warnUsage = ["Queries", "Automations", "Rows"] $: quotaUsage = $licensing.quotaUsage $: license = $auth.user?.license - const upgradeUrl = `${$admin.accountPortalUrl}/portal/upgrade` + const numberFormatter = new Intl.NumberFormat("en-US", { + style: "currency", + currency: "USD", + minimumFractionDigits: 0, + maximumFractionDigits: 0, + }) const setMonthlyUsage = () => { monthlyUsage = [] @@ -34,6 +53,7 @@ } } } + monthlyUsage = monthlyUsage.sort((a, b) => a.name.localeCompare(b.name)) } const setStaticUsage = () => { @@ -48,6 +68,52 @@ }) } } + staticUsage = staticUsage.sort((a, b) => a.name.localeCompare(b.name)) + } + + const setNextPayment = () => { + const periodEnd = license?.billing.subscription?.currentPeriodEnd + const cancelAt = license?.billing.subscription?.cancelAt + if (periodEnd) { + if (cancelAt && periodEnd <= cancelAt) { + return + } + nextPayment = `Next payment: ${getLocaleDataString(periodEnd)}` + } + } + + const setCancelAt = () => { + cancelAt = license?.billing.subscription?.cancelAt + } + + const setLastPayment = () => { + const periodStart = license?.billing.subscription?.currentPeriodStart + if (periodStart) { + lastPayment = `Last payment: ${getLocaleDataString(periodStart)}` + } + } + + const setBalance = () => { + const customerBalance = license?.billing.customer.balance + if (customerBalance) { + balance = `Balance: ${numberFormatter.format( + (customerBalance / 100) * -1 + )}` + } + } + + const getLocaleDataString = epoch => { + const date = new Date(epoch * 1000) + return date.toLocaleDateString("default", { + day: "numeric", + month: "long", + year: "numeric", + }) + } + + const setPrice = () => { + const planPrice = license.plan.price + price = `${numberFormatter.format(planPrice.amountMonthly / 100)} per month` } const capitalise = string => { @@ -56,6 +122,69 @@ } } + const planTitle = () => { + return capitalise(license?.plan.type) + } + + const planSubtitle = () => { + return `${license?.plan.price.sessions} day passes` + } + + const getDaysRemaining = timestamp => { + if (!timestamp) { + return + } + const now = new Date() + now.setHours(0) + now.setMinutes(0) + + const thenDate = new Date(timestamp) + thenDate.setHours(0) + thenDate.setMinutes(0) + + const difference = thenDate.getTime() - now + // return the difference in days + return (difference / (1000 * 3600 * 24)).toFixed(0) + } + + const setTextRows = () => { + textRows = [] + + if (cancelAt) { + textRows.push("Subscription has been cancelled") + textRows.push(`${getDaysRemaining(cancelAt * 1000)} days remaining`) + } else { + if (price) { + textRows.push(price) + } + if (lastPayment) { + textRows.push(lastPayment) + } + if (nextPayment) { + textRows.push(nextPayment) + } + } + } + + const setDaysRemainingInMonth = () => { + let now = new Date() + now = new Date(now.getFullYear(), now.getMonth(), now.getDate()) + + const firstNextMonth = new Date(now.getFullYear(), now.getMonth() + 1, 1) + const difference = firstNextMonth.getTime() - now.getTime() + + // return the difference in days + daysRemainingInMonth = (difference / (1000 * 3600 * 24)).toFixed(0) + } + + const goToAccountPortal = () => { + if (license?.plan.type === PlanType.FREE) { + window.location.href = upgradeUrl + } else { + window.location.href = manageUrl + } + } + const init = async () => { try { await licensing.getQuotaUsage() @@ -71,69 +200,99 @@ }) $: { - if (license && quotaUsage) { - setMonthlyUsage() - setStaticUsage() + if (license) { + setPrice() + setBalance() + setLastPayment() + setNextPayment() + setCancelAt() + setTextRows() + setDaysRemainingInMonth() + + if (quotaUsage) { + setMonthlyUsage() + setStaticUsage() + } } } -{#if loaded} - - Usage - Get information about your current usage within Budibase. - {#if $admin.cloud} - {#if $auth.user?.accountPortalAccess} - To upgrade your plan and usage limits visit your Account. - {:else} - Contact your account holder to upgrade your usage limits. - {/if} - {/if} - - - - - - - - YOUR PLAN - {capitalise(license?.plan.type)} - - - USAGE -
- {#each staticUsage as usage} -
- -
- {/each} -
-
- {#if monthlyUsage.length} - - MONTHLY -
- {#each monthlyUsage as usage} -
- -
- {/each} -
+ + {#if loaded} + + + Billing + Get information about your current usage and manage your plan -
- {/if} - -{/if} + + + + +
+ + {#each staticUsage as usage} +
+ +
+ {/each} +
+
+
+ {#if monthlyUsage.length} +
+ + Monthly +
+ Resets in {daysRemainingInMonth} days +
+
+ + {#each monthlyUsage as usage} +
+ +
+ {/each} +
+
+
+
+ {/if} +
+
+ + {/if} + From 3f26c411c92aa47f44bf93968c036d8e303fa044 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 30 Aug 2022 10:16:15 +0100 Subject: [PATCH 069/280] Revert "Revert "Feature/binding ux update"" --- .../bbui/src/Actions/position_dropdown.js | 21 +- packages/bbui/src/Popover/Popover.svelte | 3 +- .../cypress/integration/createBinding.spec.js | 10 +- .../builder/src/builderStore/dataBinding.js | 39 ++- .../common/bindings/BindingPanel.svelte | 273 ++++++++++++++---- .../common/bindings/ClientBindingPanel.svelte | 1 - packages/client/manifest.json | 48 ++- 7 files changed, 305 insertions(+), 90 deletions(-) diff --git a/packages/bbui/src/Actions/position_dropdown.js b/packages/bbui/src/Actions/position_dropdown.js index a25cc1bbd5..7570a39c8c 100644 --- a/packages/bbui/src/Actions/position_dropdown.js +++ b/packages/bbui/src/Actions/position_dropdown.js @@ -1,4 +1,4 @@ -export default function positionDropdown(element, { anchor, align }) { +export default function positionDropdown(element, { anchor, align, maxWidth }) { let positionSide = "top" let maxHeight = 0 let dimensions = getDimensions(anchor) @@ -34,13 +34,24 @@ export default function positionDropdown(element, { anchor, align }) { } function calcLeftPosition() { - return align === "right" - ? dimensions.left + dimensions.width - dimensions.containerWidth - : dimensions.left + let left + + if (align == "right") { + left = dimensions.left + dimensions.width - dimensions.containerWidth + } else if (align == "right-side") { + left = dimensions.left + dimensions.width + } else { + left = dimensions.left + } + + return left } element.style.position = "absolute" element.style.zIndex = "9999" + if (maxWidth) { + element.style.maxWidth = `${maxWidth}px` + } element.style.minWidth = `${dimensions.width}px` element.style.maxHeight = `${maxHeight.toFixed(0)}px` element.style.transformOrigin = `center ${positionSide}` @@ -54,10 +65,8 @@ export default function positionDropdown(element, { anchor, align }) { element.style.left = `${calcLeftPosition(dimensions).toFixed(0)}px` }) }) - resizeObserver.observe(anchor) resizeObserver.observe(element) - return { destroy() { resizeObserver.disconnect() diff --git a/packages/bbui/src/Popover/Popover.svelte b/packages/bbui/src/Popover/Popover.svelte index 756e5e6a09..91581724d5 100644 --- a/packages/bbui/src/Popover/Popover.svelte +++ b/packages/bbui/src/Popover/Popover.svelte @@ -11,6 +11,7 @@ export let align = "right" export let portalTarget export let dataCy + export let maxWidth export let direction = "bottom" export let showTip = false @@ -45,7 +46,7 @@
{ it("should add a current user binding", () => { cy.searchAndAddComponent("Paragraph").then(() => { - addSettingBinding("text", "Current User._id") + addSettingBinding("text", ["Current User", "_id"], "Current User._id") }) }) @@ -28,7 +28,7 @@ filterTests(['smoke', 'all'], () => { const paramName = "foo" cy.createScreen(`/test/:${paramName}`) cy.searchAndAddComponent("Paragraph").then(componentId => { - addSettingBinding("text", `URL.${paramName}`) + addSettingBinding("text", ["URL", paramName], `URL.${paramName}`) // The builder preview pages don't have a real URL, so all we can do // is check that we were able to bind to the property, and that the // component exists on the page @@ -47,11 +47,13 @@ filterTests(['smoke', 'all'], () => { }) }) - const addSettingBinding = (setting, bindingText, clickOption = true) => { + const addSettingBinding = (setting, bindingCategories, bindingText, clickOption = true) => { cy.get(`[data-cy="setting-${setting}"] [data-cy=text-binding-button]`).click() + cy.get(".category-list li").contains(bindingCategories[0]) cy.get(".drawer").within(() => { if (clickOption) { - cy.contains(bindingText).click() + cy.get(".category-list li").contains(bindingCategories[0]).click() + cy.get("li.binding").contains(bindingCategories[1]).click() cy.get("textarea").should("have.value", `{{ ${bindingText} }}`) } else { cy.get("textarea").type(bindingText) diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 13b749e19f..d961a3a1cd 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -299,7 +299,10 @@ const getProviderContextBindings = (asset, dataProviders) => { schema = {} const values = context.values || [] values.forEach(value => { - schema[value.key] = { name: value.label, type: "string" } + schema[value.key] = { + name: value.label, + type: value.type || "string", + } }) } else if (context.type === "schema") { // Schema contexts are generated dynamically depending on their data @@ -359,6 +362,12 @@ const getProviderContextBindings = (asset, dataProviders) => { providerId, // Table ID is used by JSON fields to know what table the field is in tableId: table?._id, + category: component._instanceName, + icon: def.icon, + display: { + name: fieldSchema.name || key, + type: fieldSchema.type, + }, }) }) }) @@ -385,6 +394,9 @@ const getUserBindings = () => { // datasource options, based on bindable properties fieldSchema, providerId: "user", + category: "Current User", + icon: "User", + display: fieldSchema, }) }) return bindings @@ -401,11 +413,17 @@ const getDeviceBindings = () => { type: "context", runtimeBinding: `${safeDevice}.${makePropSafe("mobile")}`, readableBinding: `Device.Mobile`, + category: "Device", + icon: "DevicePhone", + display: { type: "boolean", name: "mobile" }, }) bindings.push({ type: "context", runtimeBinding: `${safeDevice}.${makePropSafe("tablet")}`, readableBinding: `Device.Tablet`, + category: "Device", + icon: "DevicePhone", + display: { type: "boolean", name: "tablet" }, }) } return bindings @@ -429,6 +447,8 @@ const getSelectedRowsBindings = asset => { "selectedRows" )}`, readableBinding: `${table._instanceName}.Selected rows`, + category: "Selected rows", + icon: "ViewRow", })) ) @@ -460,6 +480,9 @@ const getStateBindings = () => { type: "context", runtimeBinding: `${safeState}.${makePropSafe(key)}`, readableBinding: `State.${key}`, + category: "State", + icon: "AutomatedSegment", + display: { name: key }, })) } return bindings @@ -482,11 +505,17 @@ const getUrlBindings = asset => { type: "context", runtimeBinding: `${safeURL}.${makePropSafe(param)}`, readableBinding: `URL.${param}`, + category: "URL", + icon: "RailTop", + display: { type: "string" }, })) const queryParamsBinding = { type: "context", runtimeBinding: makePropSafe("query"), readableBinding: "Query params", + category: "URL", + icon: "RailTop", + display: { type: "object" }, } return urlParamBindings.concat([queryParamsBinding]) } @@ -497,6 +526,9 @@ const getRoleBindings = () => { type: "context", runtimeBinding: `trim "${role._id}"`, readableBinding: `Role.${role.name}`, + category: "Role", + icon: "UserGroup", + display: { type: "string", name: role.name }, } }) } @@ -518,6 +550,7 @@ export const getEventContextBindings = ( // Check if any context bindings are provided by the component for this // setting const component = findComponent(asset.props, componentId) + const def = store.actions.components.getDefinition(component?._component) const settings = getComponentSettings(component?._component) const eventSetting = settings.find(setting => setting.key === settingKey) if (eventSetting?.context?.length) { @@ -527,6 +560,8 @@ export const getEventContextBindings = ( runtimeBinding: `${makePropSafe("eventContext")}.${makePropSafe( contextEntry.key )}`, + category: component._instanceName, + icon: def.icon, }) }) } @@ -548,6 +583,8 @@ export const getEventContextBindings = ( bindings.push({ readableBinding: `Action ${idx + 1}.${contextValue.label}`, runtimeBinding: `actions.${idx}.${contextValue.value}`, + category: "Actions", + icon: "JourneyAction", }) }) } diff --git a/packages/builder/src/components/common/bindings/BindingPanel.svelte b/packages/builder/src/components/common/bindings/BindingPanel.svelte index 49cbd434cf..ffa0e98819 100644 --- a/packages/builder/src/components/common/bindings/BindingPanel.svelte +++ b/packages/builder/src/components/common/bindings/BindingPanel.svelte @@ -9,6 +9,9 @@ Body, Layout, Button, + ActionButton, + Icon, + Popover, } from "@budibase/bbui" import { createEventDispatcher, onMount } from "svelte" import { @@ -45,9 +48,25 @@ let jsValue = initialValueJS ? value : null let hbsValue = initialValueJS ? null : value + let selectedCategory = null + + let popover + let popoverAnchor + let hoverTarget + $: usingJS = mode === "JavaScript" $: searchRgx = new RegExp(search, "ig") $: categories = Object.entries(groupBy("category", bindings)) + + $: bindingIcons = bindings?.reduce((acc, ele) => { + if (ele.icon) { + acc[ele.category] = acc[ele.category] || ele.icon + } + return acc + }, {}) + + $: categoryIcons = { ...bindingIcons, Helpers: "MagicWand" } + $: filteredCategories = categories .map(([name, categoryBindings]) => ({ name, @@ -55,10 +74,19 @@ return binding.readableBinding.match(searchRgx) }), })) - .filter(category => category.bindings?.length > 0) + .filter(category => { + return ( + category.bindings?.length > 0 && + (!selectedCategory ? true : selectedCategory === category.name) + ) + }) + $: filteredHelpers = helpers?.filter(helper => { return helper.label.match(searchRgx) || helper.description.match(searchRgx) }) + + $: categoryNames = [...categories.map(cat => cat[0]), "Helpers"] + $: codeMirrorHints = bindings?.map(x => `$("${x.readableBinding}")`) const updateValue = val => { @@ -140,58 +168,163 @@ }) + + + +
+ {#if hoverTarget.title} +
{hoverTarget.title}
+ {/if} + {#if hoverTarget.description} +
+ {@html hoverTarget.description} +
+ {/if} + {#if hoverTarget.example} +
{hoverTarget.example}
+ {/if} +
+
+
+
+ -
-
+ + {#if selectedCategory} +
+ { + selectedCategory = null + }} + > + Back + +
+ {/if} + + {#if !selectedCategory}
Search
-
- {#each filteredCategories as category} - {#if category.bindings?.length} -
-
{category.name}
+ {/if} + + {#if !selectedCategory && !search} +
    + {#each categoryNames as categoryName} +
  • { + selectedCategory = categoryName + }} + > + + {categoryName} + +
  • + {/each} +
+ {/if} + + {#if selectedCategory || search} + {#each filteredCategories as category} + {#if category.bindings?.length} +
+ {category.name} +
    {#each category.bindings as binding} -
  • addBinding(binding)}> - {binding.readableBinding} - {#if binding.type} - {binding.type} - {/if} - {#if binding.description} -
    -
    - {binding.description || ""} -
    +
  • { + popoverAnchor = e.target + if (!binding.description) { + return + } + hoverTarget = { + title: binding.display.name || binding.fieldSchema.name, + description: binding.description, + } + popover.show() + e.stopPropagation() + }} + on:mouseleave={() => { + popover.hide() + popoverAnchor = null + hoverTarget = null + }} + on:focus={() => {}} + on:blur={() => {}} + on:click={() => addBinding(binding)} + > + + {#if binding.display?.name} + {binding.display.name} + {:else if binding.fieldSchema?.name} + {binding.fieldSchema?.name} + {:else} + {binding.readableBinding} + {/if} + + + {#if binding.display?.type || binding.fieldSchema?.type} + + + {binding.display?.type || binding.fieldSchema?.type} + + {/if}
  • {/each}
-
+ {/if} + {/each} + + {#if selectedCategory === "Helpers" || search} + {#if filteredHelpers?.length} +
Helpers
+
    + {#each filteredHelpers as helper} +
  • addHelper(helper, usingJS)} + on:mouseenter={e => { + popoverAnchor = e.target + if (!helper.displayText && helper.description) { + return + } + hoverTarget = { + title: helper.displayText, + description: helper.description, + example: getHelperExample(helper, usingJS), + } + popover.show() + e.stopPropagation() + }} + on:mouseleave={() => { + popover.hide() + popoverAnchor = null + hoverTarget = null + }} + on:focus={() => {}} + on:blur={() => {}} + > + {helper.displayText} + + function + +
  • + {/each} +
+ {/if} {/if} - {/each} - {#if filteredHelpers?.length} -
-
Helpers
-
    - {#each filteredHelpers as helper} -
  • addHelper(helper, usingJS)}> -
    -
    {helper.displayText}
    -
    - {@html helper.description} -
    -
    {getHelperExample(
    -                      helper,
    -                      usingJS
    -                    )}
    -
    -
  • - {/each} -
-
{/if} -
+
@@ -241,6 +374,35 @@ diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte new file mode 100644 index 0000000000..3a92a699e6 --- /dev/null +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte @@ -0,0 +1,81 @@ + + +
+
+
+
+ +
+
+ + {plugin.name} + + +
{plugin.schema.type}
+
+
+
+
+
{plugin.source || "-"}
+
{plugin.author || "-"}
+
{plugin.version}
+ +
+
+ + + + + plugins.deletePlugin(plugin._id, plugin._rev)} + icon="Delete">Delete + editGroup(plugin)} icon="Edit">Edit + +
+
+
+ + diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte new file mode 100644 index 0000000000..61227786b0 --- /dev/null +++ b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte @@ -0,0 +1,94 @@ + + + + +
+ Plugins +
+ Add your own custom datasources and components + +
+ +
+
+ +
+
+
+ @@ -61,7 +98,7 @@
- +
{#each authOptions[sourceValue] as option} {#if option === "Upload"} @@ -82,7 +119,7 @@ {:else}
- +
{/if} {/each} diff --git a/packages/builder/src/stores/portal/plugins.js b/packages/builder/src/stores/portal/plugins.js index 6a1d7cc2cb..531ac1c396 100644 --- a/packages/builder/src/stores/portal/plugins.js +++ b/packages/builder/src/stores/portal/plugins.js @@ -17,6 +17,41 @@ export function createPluginsStore() { }) } + async function createPlugin(type, source, name, url, auth) { + let pluginData = { + type, + source, + name, + url, + } + + switch (source) { + case "github": + pluginData.githubToken = auth + break + case "url": + pluginData.header = auth + break + case "npm": + pluginData.npmToken = auth + break + } + + let resp = await API.createPlugin(pluginData) + console.log(resp) + // TODO_RIC + // let newPlugin = resp.plugins[0] + // update(state => { + // const currentIdx = state.findIndex(plugin => plugin._id === newPlugin._id) + // if (currentIdx >= 0) { + // state.splice(currentIdx, 1, newPlugin) + // } else { + // state.push(newPlugin) + // } + // return state + // }) + } + async function uploadPlugin(file, source) { let data = new FormData() data.append("file", file) @@ -35,6 +70,7 @@ export function createPluginsStore() { return { subscribe, load, + createPlugin, deletePlugin, uploadPlugin, } diff --git a/packages/frontend-core/src/api/plugins.js b/packages/frontend-core/src/api/plugins.js index 108e1b50a7..484cf763bb 100644 --- a/packages/frontend-core/src/api/plugins.js +++ b/packages/frontend-core/src/api/plugins.js @@ -11,6 +11,16 @@ export const buildPluginEndpoints = API => ({ }) }, + /** + * Creates a plugin from URL, Github or NPM + */ + createPlugin: async data => { + return await API.post({ + url: `/api/plugin`, + body: data, + }) + }, + /** * Gets a list of all plugins */ diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index e8a2dd1746..b6d3d31354 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -1,5 +1,9 @@ import { ObjectStoreBuckets } from "../../constants" -import { extractPluginTarball } from "../../utilities/fileSystem" +import { + extractPluginTarball, + npmPlugin, + getPluginMetadata, +} from "../../utilities/fileSystem" import { getGlobalDB } from "@budibase/backend-core/tenancy" import { generatePluginID, getPluginParams } from "../../db/utils" import { uploadDirectory } from "@budibase/backend-core/objectStore" @@ -39,10 +43,48 @@ export async function upload(ctx: any) { } } catch (err: any) { const errMsg = err?.message ? err?.message : err + ctx.throw(400, `Failed to import plugin: ${errMsg}`) } } +export async function create(ctx: any) { + const { type, source, name, url, header, githubToken, npmToken } = + ctx.request.body + let metadata + let directory + + switch (source) { + case "npm": + // const { metadata: metadataNpm, directory: directoryNpm } = await npmPlugin(url, name) + // metadata = metadataNpm + // directory = directoryNpm + + console.log(22222, await getPluginMetadata(await npmPlugin(url, name))) + break + case "github": + console.log("github") + break + case "url": + console.log("url") + break + } + + // try { + // const doc = storePlugin(metadata, directory, source) + // + // ctx.body = { + // message: "Plugin uploaded successfully", + // plugins: doc, + // } + // } catch (err: any) { + // const errMsg = err?.message ? err?.message : err + // + // ctx.throw(400, `Failed to import plugin: ${errMsg}`) + // } + ctx.status = 200 +} + export async function fetch(ctx: any) { ctx.body = await getPlugins() } @@ -54,9 +96,12 @@ export async function destroy(ctx: any) { ctx.status = 200 } -export async function processPlugin(plugin: FileType, source?: string) { +export async function storePlugin( + metadata: any, + directory: any, + source?: string +) { const db = getGlobalDB() - const { metadata, directory } = await extractPluginTarball(plugin) const version = metadata.package.version, name = metadata.package.name, description = metadata.package.description @@ -99,3 +144,8 @@ export async function processPlugin(plugin: FileType, source?: string) { _rev: response.rev, } } + +export async function processPlugin(plugin: FileType, source?: string) { + const { metadata, directory } = await extractPluginTarball(plugin) + return await storePlugin(metadata, directory, source) +} diff --git a/packages/server/src/api/routes/plugin.ts b/packages/server/src/api/routes/plugin.ts index 1ca49cf300..2508115a29 100644 --- a/packages/server/src/api/routes/plugin.ts +++ b/packages/server/src/api/routes/plugin.ts @@ -7,6 +7,7 @@ const router = new Router() router .post("/api/plugin/upload/:source", authorized(BUILDER), controller.upload) + .post("/api/plugin", authorized(BUILDER), controller.create) .get("/api/plugin", authorized(BUILDER), controller.fetch) .delete( "/api/plugin/:pluginId/:pluginRev", diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index 821e905fbc..9c70edf8a6 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -1,6 +1,9 @@ const { budibaseTempDir } = require("../budibaseDir") const fs = require("fs") const { join } = require("path") +// const { promisify } = require("util") +// const exec = promisify(require("child_process").exec) +// const streamPipeline = promisify(require("stream")) const uuid = require("uuid/v4") const { doWithDB, @@ -29,6 +32,7 @@ const MemoryStream = require("memorystream") const { getAppId } = require("@budibase/backend-core/context") const tar = require("tar") const fetch = require("node-fetch") +// const fileType = require("file-type") const TOP_LEVEL_PATH = join(__dirname, "..", "..", "..") const NODE_MODULES_PATH = join(TOP_LEVEL_PATH, "node_modules") @@ -326,11 +330,11 @@ exports.cleanup = appIds => { } } -exports.extractPluginTarball = async file => { - if (!file.name.endsWith(".tar.gz")) { +const extractPluginTarball = async (file, ext = ".tar.gz") => { + if (!file.name.endsWith(ext)) { throw new Error("Plugin must be compressed into a gzipped tarball.") } - const path = join(budibaseTempDir(), file.name.split(".tar.gz")[0]) + const path = join(budibaseTempDir(), file.name.split(ext)[0]) // remove old tmp directories automatically - don't combine if (fs.existsSync(path)) { fs.rmSync(path, { recursive: true, force: true }) @@ -340,6 +344,63 @@ exports.extractPluginTarball = async file => { file: file.path, C: path, }) + + return await getPluginMetadata(path) +} +exports.extractPluginTarball = extractPluginTarball + +exports.npmPlugin = async (url, name = "") => { + let npmTarball = url + let filename = name + let path = join(budibaseTempDir(), name) + + if (!npmTarball.includes(".tgz")) { + const npmPackageURl = url.replace( + "https://www.npmjs.com/package/", + "https://registry.npmjs.org/" + ) + const response = await fetch(npmPackageURl) + if (response.status === 200) { + let npmDetails = await response.json() + filename = npmDetails.name + path = join(budibaseTempDir(), filename) + const npmVersion = npmDetails["dist-tags"].latest + npmTarball = npmDetails.versions[npmVersion].dist.tarball + } else { + throw "Cannot get package details" + } + } + + try { + if (fs.existsSync(path)) { + fs.rmSync(path, { recursive: true, force: true }) + } + fs.mkdirSync(path) + + const response = await fetch(npmTarball) + if (!response.ok) + throw new Error(`Loading NPM plugin failed ${response.statusText}`) + + // const dest = fs.createWriteStream(`${path}/${filename}.tgz`) + await response.body.pipe( + await tar.x({ + strip: 1, + C: path, + }) + ) + + // const readStream = fs.createReadStream(`${path}/${filename}.tgz`) + // readStream.pipe( + + // ) + } catch (e) { + throw `Cannot store package locally: ${e.message}` + } + + return path +} + +const getPluginMetadata = async path => { let metadata = {} try { const pkg = fs.readFileSync(join(path, "package.json"), "utf8") @@ -349,8 +410,10 @@ exports.extractPluginTarball = async file => { } catch (err) { throw new Error("Unable to process schema.json/package.json in plugin.") } + return { metadata, directory: path } } +exports.getPluginMetadata = getPluginMetadata exports.getDatasourcePlugin = async (name, url, hash) => { if (!fs.existsSync(DATASOURCE_PATH)) { From bbbf8bfc0be5130c4582e461050491ddccc1a6d0 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 31 Aug 2022 15:19:57 +0100 Subject: [PATCH 074/280] Updated bootstrapping flow to include the account portal. --- scripts/link-dependencies.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/link-dependencies.sh b/scripts/link-dependencies.sh index 052f8aed8e..d2c71f637b 100755 --- a/scripts/link-dependencies.sh +++ b/scripts/link-dependencies.sh @@ -20,6 +20,7 @@ cd - if [ -d "../budibase-pro" ]; then cd ../budibase-pro + echo "Bootstrapping budibase-pro" yarn bootstrap cd packages/pro @@ -44,7 +45,11 @@ if [ -d "../budibase-pro" ]; then fi if [ -d "../account-portal" ]; then - cd ../account-portal/packages/server + cd ../account-portal + echo "Bootstrapping account-portal" + yarn bootstrap + + cd packages/server echo "Linking backend-core to account-portal" yarn link "@budibase/backend-core" From 0e2a86460ce37ea331a3f3e519767a3e0714e788 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Wed, 31 Aug 2022 16:09:47 +0100 Subject: [PATCH 075/280] uploading npm and url plugins --- .../plugins/_components/AddPluginModal.svelte | 16 ++---- packages/builder/src/stores/portal/plugins.js | 11 ++--- packages/server/src/api/controllers/plugin.ts | 45 ++++++++--------- .../server/src/utilities/fileSystem/index.js | 49 +++++++++++-------- 4 files changed, 60 insertions(+), 61 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte index e45655d20d..1fce6746ad 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte @@ -11,10 +11,10 @@ import { plugins } from "stores/portal" let authOptions = { - NPM: ["NPM Token", "URL"], + NPM: ["URL"], Github: ["Github Token", "URL"], - URL: ["Header", "URL"], - File: ["Path", "Header"], + URL: ["Headers", "URL"], + File: ["Path", "Headers"], Upload: ["Upload"], } let file @@ -50,17 +50,11 @@ source, nameValue, url, - dynamicValues["Header"] + dynamicValues["Headers"] ) break case "npm": - await plugins.createPlugin( - typeValue, - source, - nameValue, - url, - dynamicValues["NPM Token"] - ) + await plugins.createPlugin(typeValue, source, nameValue, url) break } } diff --git a/packages/builder/src/stores/portal/plugins.js b/packages/builder/src/stores/portal/plugins.js index 531ac1c396..4e3d952fe3 100644 --- a/packages/builder/src/stores/portal/plugins.js +++ b/packages/builder/src/stores/portal/plugins.js @@ -17,7 +17,7 @@ export function createPluginsStore() { }) } - async function createPlugin(type, source, name, url, auth) { + async function createPlugin(type, source, name, url, auth = null) { let pluginData = { type, source, @@ -26,19 +26,16 @@ export function createPluginsStore() { } switch (source) { - case "github": - pluginData.githubToken = auth - break case "url": - pluginData.header = auth + pluginData.headers = auth break case "npm": pluginData.npmToken = auth break } - let resp = await API.createPlugin(pluginData) - console.log(resp) + let res = await API.createPlugin(pluginData) + console.log("RESP", res) // TODO_RIC // let newPlugin = resp.plugins[0] // update(state => { diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index b6d3d31354..dc70ea8b62 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -1,8 +1,8 @@ import { ObjectStoreBuckets } from "../../constants" import { extractPluginTarball, - npmPlugin, - getPluginMetadata, + createNpmPlugin, + createUrlPlugin, } from "../../utilities/fileSystem" import { getGlobalDB } from "@budibase/backend-core/tenancy" import { generatePluginID, getPluginParams } from "../../db/utils" @@ -49,39 +49,40 @@ export async function upload(ctx: any) { } export async function create(ctx: any) { - const { type, source, name, url, header, githubToken, npmToken } = - ctx.request.body + const { type, source, name, url, headers, githubToken } = ctx.request.body let metadata let directory switch (source) { case "npm": - // const { metadata: metadataNpm, directory: directoryNpm } = await npmPlugin(url, name) - // metadata = metadataNpm - // directory = directoryNpm - - console.log(22222, await getPluginMetadata(await npmPlugin(url, name))) + const { metadata: metadataNpm, directory: directoryNpm } = + await createNpmPlugin(url, name) + metadata = metadataNpm + directory = directoryNpm break case "github": console.log("github") break case "url": - console.log("url") + const { metadata: metadataUrl, directory: directoryUrl } = + await createUrlPlugin(url, name, headers) + metadata = metadataUrl + directory = directoryUrl break } - // try { - // const doc = storePlugin(metadata, directory, source) - // - // ctx.body = { - // message: "Plugin uploaded successfully", - // plugins: doc, - // } - // } catch (err: any) { - // const errMsg = err?.message ? err?.message : err - // - // ctx.throw(400, `Failed to import plugin: ${errMsg}`) - // } + try { + const doc = storePlugin(metadata, directory, source) + + ctx.body = { + message: "Plugin uploaded successfully", + plugins: doc, + } + } catch (err: any) { + const errMsg = err?.message ? err?.message : err + + ctx.throw(400, `Failed to import plugin: ${errMsg}`) + } ctx.status = 200 } diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index 9c70edf8a6..710e3c0294 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -1,9 +1,8 @@ const { budibaseTempDir } = require("../budibaseDir") const fs = require("fs") const { join } = require("path") -// const { promisify } = require("util") -// const exec = promisify(require("child_process").exec) -// const streamPipeline = promisify(require("stream")) +const { promisify } = require("util") +const streamPipeline = promisify(require("stream").pipeline) const uuid = require("uuid/v4") const { doWithDB, @@ -32,7 +31,6 @@ const MemoryStream = require("memorystream") const { getAppId } = require("@budibase/backend-core/context") const tar = require("tar") const fetch = require("node-fetch") -// const fileType = require("file-type") const TOP_LEVEL_PATH = join(__dirname, "..", "..", "..") const NODE_MODULES_PATH = join(TOP_LEVEL_PATH, "node_modules") @@ -349,10 +347,9 @@ const extractPluginTarball = async (file, ext = ".tar.gz") => { } exports.extractPluginTarball = extractPluginTarball -exports.npmPlugin = async (url, name = "") => { +exports.createNpmPlugin = async (url, name = "") => { let npmTarball = url - let filename = name - let path = join(budibaseTempDir(), name) + let pluginName = name if (!npmTarball.includes(".tgz")) { const npmPackageURl = url.replace( @@ -362,8 +359,7 @@ exports.npmPlugin = async (url, name = "") => { const response = await fetch(npmPackageURl) if (response.status === 200) { let npmDetails = await response.json() - filename = npmDetails.name - path = join(budibaseTempDir(), filename) + pluginName = npmDetails.name const npmVersion = npmDetails["dist-tags"].latest npmTarball = npmDetails.versions[npmVersion].dist.tarball } else { @@ -371,36 +367,47 @@ exports.npmPlugin = async (url, name = "") => { } } + return await downloadUnzipPlugin(pluginName, npmTarball) +} + +exports.createUrlPlugin = async (url, name = "", headers = {}) => { + if (!url.includes(".tgz") && !url.includes(".tar.gz")) { + throw new Error("Plugin must be compressed into a gzipped tarball.") + } + + return await downloadUnzipPlugin(name, url, headers) +} + +const downloadUnzipPlugin = async (name, url, headers = {}) => { + console.log(name, url, headers) + const path = join(budibaseTempDir(), name) try { + // Remove first if exists if (fs.existsSync(path)) { fs.rmSync(path, { recursive: true, force: true }) } fs.mkdirSync(path) - const response = await fetch(npmTarball) + const response = await fetch(url, { headers }) if (!response.ok) throw new Error(`Loading NPM plugin failed ${response.statusText}`) - // const dest = fs.createWriteStream(`${path}/${filename}.tgz`) - await response.body.pipe( - await tar.x({ + await streamPipeline( + response.body, + tar.x({ strip: 1, C: path, }) ) - - // const readStream = fs.createReadStream(`${path}/${filename}.tgz`) - // readStream.pipe( - - // ) + return await getPluginMetadata(path) } catch (e) { - throw `Cannot store package locally: ${e.message}` + throw `Cannot store plugin locally: ${e.message}` } - - return path } +exports.downloadUnzipPlugin = downloadUnzipPlugin const getPluginMetadata = async path => { + console.log(path) let metadata = {} try { const pkg = fs.readFileSync(join(path, "package.json"), "utf8") From 6daa49927ed4e58bcdefe94bba6b64bd9c0a3335 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Wed, 31 Aug 2022 17:53:00 +0100 Subject: [PATCH 076/280] plugins npm and url working --- packages/builder/src/stores/portal/plugins.js | 22 +++++++++---------- packages/server/src/api/controllers/plugin.ts | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/builder/src/stores/portal/plugins.js b/packages/builder/src/stores/portal/plugins.js index 4e3d952fe3..a498bf663a 100644 --- a/packages/builder/src/stores/portal/plugins.js +++ b/packages/builder/src/stores/portal/plugins.js @@ -36,17 +36,17 @@ export function createPluginsStore() { let res = await API.createPlugin(pluginData) console.log("RESP", res) - // TODO_RIC - // let newPlugin = resp.plugins[0] - // update(state => { - // const currentIdx = state.findIndex(plugin => plugin._id === newPlugin._id) - // if (currentIdx >= 0) { - // state.splice(currentIdx, 1, newPlugin) - // } else { - // state.push(newPlugin) - // } - // return state - // }) + + let newPlugin = res.plugins[0] + update(state => { + const currentIdx = state.findIndex(plugin => plugin._id === newPlugin._id) + if (currentIdx >= 0) { + state.splice(currentIdx, 1, newPlugin) + } else { + state.push(newPlugin) + } + return state + }) } async function uploadPlugin(file, source) { diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index dc70ea8b62..26caf38806 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -72,11 +72,11 @@ export async function create(ctx: any) { } try { - const doc = storePlugin(metadata, directory, source) + const doc = await storePlugin(metadata, directory, source) ctx.body = { message: "Plugin uploaded successfully", - plugins: doc, + plugins: [doc], } } catch (err: any) { const errMsg = err?.message ? err?.message : err From f49d61bc5cdad85431c2e26ab6274219bb8a366f Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 31 Aug 2022 19:21:45 +0100 Subject: [PATCH 077/280] Updating test cases to TS to get them working properly with the full TS implementations. --- packages/server/__mocks__/mongodb.ts | 2 +- packages/server/src/api/controllers/screen.js | 2 +- .../{airtable.spec.js => airtable.spec.ts} | 39 +- .../{arangodb.spec.js => arangodb.spec.ts} | 21 +- .../{couchdb.spec.js => couchdb.spec.ts} | 60 +-- .../{dynamodb.spec.js => dynamodb.spec.ts} | 86 ++-- ...icsearch.spec.js => elasticsearch.spec.ts} | 43 +- .../{firebase.spec.js => firebase.spec.ts} | 61 +-- ...ver.spec.js => microsoftSqlServer.spec.ts} | 23 +- .../tests/{mongo.spec.js => mongo.spec.ts} | 81 ++-- .../tests/{mysql.spec.js => mysql.spec.ts} | 32 +- .../tests/{oracle.spec.js => oracle.spec.ts} | 36 +- .../{postgres.spec.js => postgres.spec.ts} | 36 +- .../tests/{redis.spec.js => redis.spec.ts} | 33 +- .../tests/{rest.spec.js => rest.spec.ts} | 30 +- .../tests/{s3.spec.js => s3.spec.ts} | 18 +- .../tests/{sql.spec.js => sql.spec.ts} | 405 ++++++++++-------- 17 files changed, 558 insertions(+), 450 deletions(-) rename packages/server/src/integrations/tests/{airtable.spec.js => airtable.spec.ts} (75%) rename packages/server/src/integrations/tests/{arangodb.spec.js => arangodb.spec.ts} (75%) rename packages/server/src/integrations/tests/{couchdb.spec.js => couchdb.spec.ts} (58%) rename packages/server/src/integrations/tests/{dynamodb.spec.js => dynamodb.spec.ts} (68%) rename packages/server/src/integrations/tests/{elasticsearch.spec.js => elasticsearch.spec.ts} (72%) rename packages/server/src/integrations/tests/{firebase.spec.js => firebase.spec.ts} (70%) rename packages/server/src/integrations/tests/{microsoftSqlServer.spec.js => microsoftSqlServer.spec.ts} (75%) rename packages/server/src/integrations/tests/{mongo.spec.js => mongo.spec.ts} (90%) rename packages/server/src/integrations/tests/{mysql.spec.js => mysql.spec.ts} (80%) rename packages/server/src/integrations/tests/{oracle.spec.js => oracle.spec.ts} (83%) rename packages/server/src/integrations/tests/{postgres.spec.js => postgres.spec.ts} (78%) rename packages/server/src/integrations/tests/{redis.spec.js => redis.spec.ts} (71%) rename packages/server/src/integrations/tests/{rest.spec.js => rest.spec.ts} (96%) rename packages/server/src/integrations/tests/{s3.spec.js => s3.spec.ts} (55%) rename packages/server/src/integrations/tests/{sql.spec.js => sql.spec.ts} (60%) diff --git a/packages/server/__mocks__/mongodb.ts b/packages/server/__mocks__/mongodb.ts index 92ec89227f..4a1867f6f9 100644 --- a/packages/server/__mocks__/mongodb.ts +++ b/packages/server/__mocks__/mongodb.ts @@ -33,7 +33,7 @@ module MongoMock { }) } - mongodb.ObjectID = require("mongodb").ObjectID + mongodb.ObjectID = jest.requireActual("mongodb").ObjectID module.exports = mongodb } diff --git a/packages/server/src/api/controllers/screen.js b/packages/server/src/api/controllers/screen.js index 99d12d064c..07b15dd8a1 100644 --- a/packages/server/src/api/controllers/screen.js +++ b/packages/server/src/api/controllers/screen.js @@ -8,7 +8,7 @@ const { AccessController } = require("@budibase/backend-core/roles") const { getAppDB } = require("@budibase/backend-core/context") const { events } = require("@budibase/backend-core") const { getGlobalDB } = require("@budibase/backend-core/tenancy") -import { updateAppPackage } from "./application" +const { updateAppPackage } = require("./application") exports.fetch = async ctx => { const db = getAppDB() diff --git a/packages/server/src/integrations/tests/airtable.spec.js b/packages/server/src/integrations/tests/airtable.spec.ts similarity index 75% rename from packages/server/src/integrations/tests/airtable.spec.js rename to packages/server/src/integrations/tests/airtable.spec.ts index df676a1397..26a389456f 100644 --- a/packages/server/src/integrations/tests/airtable.spec.js +++ b/packages/server/src/integrations/tests/airtable.spec.ts @@ -1,10 +1,12 @@ -const Airtable = require("airtable") -const AirtableIntegration = require("../airtable") +import { default as AirtableIntegration } from "../airtable" jest.mock("airtable") class TestConfiguration { - constructor(config = {}) { - this.integration = new AirtableIntegration.integration(config) + integration: any + client: any + + constructor(config: any = {}) { + this.integration = new AirtableIntegration.integration(config) this.client = { create: jest.fn(), select: jest.fn(() => ({ @@ -13,12 +15,12 @@ class TestConfiguration { update: jest.fn(), destroy: jest.fn(), } - this.integration.client = () => this.client + this.integration.client = () => this.client } } describe("Airtable Integration", () => { - let config + let config: any beforeEach(() => { config = new TestConfiguration() @@ -27,22 +29,23 @@ describe("Airtable Integration", () => { it("calls the create method with the correct params", async () => { const response = await config.integration.create({ table: "test", - json: {} + json: {}, }) expect(config.client.create).toHaveBeenCalledWith([ { - fields: {} - } + fields: {}, + }, ]) }) it("calls the read method with the correct params", async () => { const response = await config.integration.read({ table: "test", - view: "Grid view" + view: "Grid view", }) expect(config.client.select).toHaveBeenCalledWith({ - maxRecords: 10, view: "Grid view" + maxRecords: 10, + view: "Grid view", }) }) @@ -51,22 +54,22 @@ describe("Airtable Integration", () => { table: "table", id: "123", json: { - name: "test" - } + name: "test", + }, }) expect(config.client.update).toHaveBeenCalledWith([ { id: "123", - fields: { name: "test" } - } + fields: { name: "test" }, + }, ]) }) it("calls the delete method with the correct params", async () => { - const ids = [1,2,3,4] + const ids = [1, 2, 3, 4] const response = await config.integration.delete({ - ids + ids, }) expect(config.client.destroy).toHaveBeenCalledWith(ids) }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/arangodb.spec.js b/packages/server/src/integrations/tests/arangodb.spec.ts similarity index 75% rename from packages/server/src/integrations/tests/arangodb.spec.js rename to packages/server/src/integrations/tests/arangodb.spec.ts index 437a7fd3ec..401b2ec707 100644 --- a/packages/server/src/integrations/tests/arangodb.spec.js +++ b/packages/server/src/integrations/tests/arangodb.spec.ts @@ -1,15 +1,16 @@ -const arangodb = require("arangojs") -const ArangoDBIntegration = require("../arangodb") +import { default as ArangoDBIntegration } from "../arangodb" jest.mock("arangojs") class TestConfiguration { - constructor(config = {}) { - this.integration = new ArangoDBIntegration.integration(config) + integration: any + + constructor(config: any = {}) { + this.integration = new ArangoDBIntegration.integration(config) } } describe("ArangoDB Integration", () => { - let config + let config: any let indexName = "Users" beforeEach(() => { @@ -18,18 +19,20 @@ describe("ArangoDB Integration", () => { it("calls the create method with the correct params", async () => { const body = { - json: "Hello" + json: "Hello", } const response = await config.integration.create(body) - expect(config.integration.client.query).toHaveBeenCalledWith(`INSERT Hello INTO collection RETURN NEW`) + expect(config.integration.client.query).toHaveBeenCalledWith( + `INSERT Hello INTO collection RETURN NEW` + ) }) it("calls the read method with the correct params", async () => { const query = { - json: `test`, + sql: `test`, } const response = await config.integration.read(query) expect(config.integration.client.query).toHaveBeenCalledWith(query.sql) }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/couchdb.spec.js b/packages/server/src/integrations/tests/couchdb.spec.ts similarity index 58% rename from packages/server/src/integrations/tests/couchdb.spec.js rename to packages/server/src/integrations/tests/couchdb.spec.ts index 65c9c83ad2..e05a2bd247 100644 --- a/packages/server/src/integrations/tests/couchdb.spec.js +++ b/packages/server/src/integrations/tests/couchdb.spec.ts @@ -1,23 +1,29 @@ -jest.mock("pouchdb", () => function CouchDBMock() { - this.post = jest.fn() - this.allDocs = jest.fn(() => ({ rows: [] })) - this.put = jest.fn() - this.get = jest.fn() - this.remove = jest.fn() - this.plugin = jest.fn() - this.close = jest.fn() -}) +jest.mock( + "pouchdb", + () => + function CouchDBMock(this: any) { + this.post = jest.fn() + this.allDocs = jest.fn(() => ({ rows: [] })) + this.put = jest.fn() + this.get = jest.fn() + this.remove = jest.fn() + this.plugin = jest.fn() + this.close = jest.fn() + } +) -const CouchDBIntegration = require("../couchdb") +import { default as CouchDBIntegration } from "../couchdb" class TestConfiguration { - constructor(config = {}) { - this.integration = new CouchDBIntegration.integration(config) + integration: any + + constructor(config: any = {}) { + this.integration = new CouchDBIntegration.integration(config) } } describe("CouchDB Integration", () => { - let config + let config: any beforeEach(() => { config = new TestConfiguration() @@ -25,37 +31,37 @@ describe("CouchDB Integration", () => { it("calls the create method with the correct params", async () => { const doc = { - test: 1 - } - const response = await config.integration.create({ - json: doc + test: 1, + } + const response = await config.integration.create({ + json: doc, }) expect(config.integration.client.post).toHaveBeenCalledWith(doc) }) it("calls the read method with the correct params", async () => { const doc = { - name: "search" - } + name: "search", + } - const response = await config.integration.read({ - json: doc + const response = await config.integration.read({ + json: doc, }) expect(config.integration.client.allDocs).toHaveBeenCalledWith({ include_docs: true, - name: "search" + name: "search", }) }) it("calls the update method with the correct params", async () => { const doc = { _id: "1234", - name: "search" - } + name: "search", + } - const response = await config.integration.update({ - json: doc + const response = await config.integration.update({ + json: doc, }) expect(config.integration.client.put).toHaveBeenCalledWith(doc) @@ -67,4 +73,4 @@ describe("CouchDB Integration", () => { expect(config.integration.client.get).toHaveBeenCalledWith(id) expect(config.integration.client.remove).toHaveBeenCalled() }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/dynamodb.spec.js b/packages/server/src/integrations/tests/dynamodb.spec.ts similarity index 68% rename from packages/server/src/integrations/tests/dynamodb.spec.js rename to packages/server/src/integrations/tests/dynamodb.spec.ts index 198ed6a4b4..d245875173 100644 --- a/packages/server/src/integrations/tests/dynamodb.spec.js +++ b/packages/server/src/integrations/tests/dynamodb.spec.ts @@ -1,15 +1,16 @@ -const AWS = require("aws-sdk") -const DynamoDBIntegration = require("../dynamodb") +import { default as DynamoDBIntegration } from "../dynamodb" jest.mock("aws-sdk") class TestConfiguration { - constructor(config = {}) { - this.integration = new DynamoDBIntegration.integration(config) + integration: any + + constructor(config: any = {}) { + this.integration = new DynamoDBIntegration.integration(config) } } describe("DynamoDB Integration", () => { - let config + let config: any let tableName = "Users" beforeEach(() => { @@ -17,25 +18,25 @@ describe("DynamoDB Integration", () => { }) it("calls the create method with the correct params", async () => { - const response = await config.integration.create({ + const response = await config.integration.create({ table: tableName, json: { - Name: "John" - } + Name: "John", + }, }) expect(config.integration.client.put).toHaveBeenCalledWith({ TableName: tableName, - Name: "John" + Name: "John", }) }) it("calls the read method with the correct params", async () => { const indexName = "Test" - const response = await config.integration.read({ + const response = await config.integration.read({ table: tableName, - index: indexName, - json: {} + index: indexName, + json: {}, }) expect(config.integration.client.query).toHaveBeenCalledWith({ TableName: tableName, @@ -47,57 +48,59 @@ describe("DynamoDB Integration", () => { it("calls the scan method with the correct params", async () => { const indexName = "Test" - const response = await config.integration.scan({ + const response = await config.integration.scan({ table: tableName, - index: indexName, - json: {} + index: indexName, + json: {}, }) expect(config.integration.client.scan).toHaveBeenCalledWith({ TableName: tableName, IndexName: indexName, }) - expect(response).toEqual([{ - Name: "test" - }]) + expect(response).toEqual([ + { + Name: "test", + }, + ]) }) it("calls the get method with the correct params", async () => { - const response = await config.integration.get({ + const response = await config.integration.get({ table: tableName, json: { - Id: 123 - } + Id: 123, + }, }) expect(config.integration.client.get).toHaveBeenCalledWith({ TableName: tableName, - Id: 123 + Id: 123, }) }) it("calls the update method with the correct params", async () => { - const response = await config.integration.update({ + const response = await config.integration.update({ table: tableName, json: { - Name: "John" - } + Name: "John", + }, }) expect(config.integration.client.update).toHaveBeenCalledWith({ TableName: tableName, - Name: "John" + Name: "John", }) }) it("calls the delete method with the correct params", async () => { - const response = await config.integration.delete({ + const response = await config.integration.delete({ table: tableName, json: { - Name: "John" - } + Name: "John", + }, }) expect(config.integration.client.delete).toHaveBeenCalledWith({ TableName: tableName, - Name: "John" + Name: "John", }) }) @@ -105,14 +108,14 @@ describe("DynamoDB Integration", () => { const config = { region: "us-east-1", accessKeyId: "test", - secretAccessKeyId: "test" + secretAccessKey: "test", } - const integration = new DynamoDBIntegration.integration(config) + const integration: any = new DynamoDBIntegration.integration(config) expect(integration.config).toEqual({ currentClockSkew: true, - ...config + ...config, }) }) @@ -120,16 +123,16 @@ describe("DynamoDB Integration", () => { const config = { region: "us-east-1", accessKeyId: "test", - secretAccessKeyId: "test", - endpoint: "localhost:8080" + secretAccessKey: "test", + endpoint: "localhost:8080", } - const integration = new DynamoDBIntegration.integration(config) + const integration: any = new DynamoDBIntegration.integration(config) expect(integration.config).toEqual({ region: "us-east-1", currentClockSkew: true, - endpoint: "localhost:8080" + endpoint: "localhost:8080", }) }) @@ -137,15 +140,16 @@ describe("DynamoDB Integration", () => { const config = { region: "us-east-1", accessKeyId: "test", - secretAccessKeyId: "test", - endpoint: "dynamodb.aws.foo.net" + secretAccessKey: "test", + endpoint: "dynamodb.aws.foo.net", } const integration = new DynamoDBIntegration.integration(config) + // @ts-ignore expect(integration.config).toEqual({ currentClockSkew: true, - ...config + ...config, }) }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/elasticsearch.spec.js b/packages/server/src/integrations/tests/elasticsearch.spec.ts similarity index 72% rename from packages/server/src/integrations/tests/elasticsearch.spec.js rename to packages/server/src/integrations/tests/elasticsearch.spec.ts index fc97e04bcc..c839b9b2d4 100644 --- a/packages/server/src/integrations/tests/elasticsearch.spec.js +++ b/packages/server/src/integrations/tests/elasticsearch.spec.ts @@ -1,15 +1,16 @@ -const elasticsearch = require("@elastic/elasticsearch") -const ElasticSearchIntegration = require("../elasticsearch") +import { default as ElasticSearchIntegration } from "../elasticsearch" jest.mock("@elastic/elasticsearch") class TestConfiguration { - constructor(config = {}) { - this.integration = new ElasticSearchIntegration.integration(config) + integration: any + + constructor(config: any = {}) { + this.integration = new ElasticSearchIntegration.integration(config) } } describe("Elasticsearch Integration", () => { - let config + let config: any let indexName = "Users" beforeEach(() => { @@ -18,15 +19,15 @@ describe("Elasticsearch Integration", () => { it("calls the create method with the correct params", async () => { const body = { - name: "Hello" + name: "Hello", } - const response = await config.integration.create({ + const response = await config.integration.create({ index: indexName, - json: body + json: body, }) expect(config.integration.client.index).toHaveBeenCalledWith({ index: indexName, - body + body, }) }) @@ -34,43 +35,43 @@ describe("Elasticsearch Integration", () => { const body = { query: { term: { - name: "kimchy" - } - } + name: "kimchy", + }, + }, } - const response = await config.integration.read({ + const response = await config.integration.read({ index: indexName, - json: body + json: body, }) expect(config.integration.client.search).toHaveBeenCalledWith({ index: indexName, - body + body, }) expect(response).toEqual(expect.any(Array)) }) it("calls the update method with the correct params", async () => { const body = { - name: "updated" + name: "updated", } - const response = await config.integration.update({ + const response = await config.integration.update({ id: "1234", index: indexName, - json: body + json: body, }) expect(config.integration.client.update).toHaveBeenCalledWith({ id: "1234", index: indexName, - body + body, }) expect(response).toEqual(expect.any(Array)) }) it("calls the delete method with the correct params", async () => { const body = { - id: "1234" + id: "1234", } const response = await config.integration.delete(body) @@ -78,4 +79,4 @@ describe("Elasticsearch Integration", () => { expect(config.integration.client.delete).toHaveBeenCalledWith(body) expect(response).toEqual(expect.any(Array)) }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/firebase.spec.js b/packages/server/src/integrations/tests/firebase.spec.ts similarity index 70% rename from packages/server/src/integrations/tests/firebase.spec.js rename to packages/server/src/integrations/tests/firebase.spec.ts index 97d3b2c0d7..befbb80ccb 100644 --- a/packages/server/src/integrations/tests/firebase.spec.js +++ b/packages/server/src/integrations/tests/firebase.spec.ts @@ -1,92 +1,97 @@ -const firebase = require("@google-cloud/firestore") -const FirebaseIntegration = require("../firebase") +import { default as FirebaseIntegration } from "../firebase" jest.mock("@google-cloud/firestore") class TestConfiguration { - constructor(config = {}) { - this.integration = new FirebaseIntegration.integration(config) + integration: any + + constructor(config: any = {}) { + this.integration = new FirebaseIntegration.integration(config) } } describe("Firebase Integration", () => { - let config + let config: any let tableName = "Users" beforeEach(() => { config = new TestConfiguration({ - serviceAccount: "{}" + serviceAccount: "{}", }) }) it("calls the create method with the correct params", async () => { - await config.integration.create({ + await config.integration.create({ table: tableName, json: { - Name: "Test Name" + Name: "Test Name", }, extra: { - collection: "test" - } + collection: "test", + }, }) expect(config.integration.client.collection).toHaveBeenCalledWith("test") - expect(config.integration.client.set).toHaveBeenCalledWith({ + expect(config.integration.client.set).toHaveBeenCalledWith({ Name: "Test Name", - id: "test_id" + id: "test_id", }) }) it("calls the read method with the correct params", async () => { - const response = await config.integration.read({ + const response = await config.integration.read({ table: tableName, json: { - Name: "Test" + Name: "Test", }, extra: { collection: "test", filterField: "field", filter: "==", filterValue: "value", - } + }, }) expect(config.integration.client.collection).toHaveBeenCalledWith("test") - expect(config.integration.client.where).toHaveBeenCalledWith("field", "==", "value") - expect(response).toEqual([{ result: "test"}]) + expect(config.integration.client.where).toHaveBeenCalledWith( + "field", + "==", + "value" + ) + expect(response).toEqual([{ result: "test" }]) }) it("calls the update method with the correct params", async () => { - const response = await config.integration.update({ + const response = await config.integration.update({ table: tableName, json: { id: "test", - Name: "Test" + Name: "Test", }, extra: { - collection: "test" - } + collection: "test", + }, }) expect(config.integration.client.collection).toHaveBeenCalledWith("test") expect(config.integration.client.update).toHaveBeenCalledWith({ Name: "Test", - id: "test" + id: "test", }) expect(response).toEqual({ - result: "test" + result: "test", }) }) it("calls the delete method with the correct params", async () => { - const response = await config.integration.delete({ + const response = await config.integration.delete({ table: tableName, json: { id: "test", - Name: "Test" + Name: "Test", }, extra: { - collection: "test" - } + collection: "test", + }, }) expect(config.integration.client.collection).toHaveBeenCalledWith("test") expect(config.integration.client.doc).toHaveBeenCalledWith("test") expect(config.integration.client.delete).toHaveBeenCalled() }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/microsoftSqlServer.spec.js b/packages/server/src/integrations/tests/microsoftSqlServer.spec.ts similarity index 75% rename from packages/server/src/integrations/tests/microsoftSqlServer.spec.js rename to packages/server/src/integrations/tests/microsoftSqlServer.spec.ts index 19a99ad54b..8484e759a9 100644 --- a/packages/server/src/integrations/tests/microsoftSqlServer.spec.js +++ b/packages/server/src/integrations/tests/microsoftSqlServer.spec.ts @@ -1,15 +1,16 @@ -const sqlServer = require("mssql") -const MSSQLIntegration = require("../microsoftSqlServer") +import { default as MSSQLIntegration } from "../microsoftSqlServer" jest.mock("mssql") class TestConfiguration { - constructor(config = {}) { - this.integration = new MSSQLIntegration.integration(config) + integration: any + + constructor(config: any = {}) { + this.integration = new MSSQLIntegration.integration(config) } } describe("MS SQL Server Integration", () => { - let config + let config: any beforeEach(async () => { config = new TestConfiguration() @@ -23,7 +24,7 @@ describe("MS SQL Server Integration", () => { it("calls the create method with the correct params", async () => { const sql = "insert into users (name, age) values ('Joe', 123);" const response = await config.integration.create({ - sql + sql, }) expect(config.integration.client.request).toHaveBeenCalledWith() expect(response[0]).toEqual(sql) @@ -32,7 +33,7 @@ describe("MS SQL Server Integration", () => { it("calls the read method with the correct params", async () => { const sql = "select * from users;" const response = await config.integration.read({ - sql + sql, }) expect(config.integration.client.request).toHaveBeenCalledWith() expect(response[0]).toEqual(sql) @@ -45,11 +46,11 @@ describe("MS SQL Server Integration", () => { }) it("returns the correct response when the create response has no rows", async () => { - const sql = "insert into users (name, age) values ('Joe', 123);" - const response = await config.integration.create({ - sql + const sql = "insert into users (name, age) values ('Joe', 123);" + const response = await config.integration.create({ + sql, }) expect(response[0]).toEqual(sql) }) }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/mongo.spec.js b/packages/server/src/integrations/tests/mongo.spec.ts similarity index 90% rename from packages/server/src/integrations/tests/mongo.spec.js rename to packages/server/src/integrations/tests/mongo.spec.ts index 40aa6dbb58..a326d3ac2a 100644 --- a/packages/server/src/integrations/tests/mongo.spec.js +++ b/packages/server/src/integrations/tests/mongo.spec.ts @@ -1,22 +1,26 @@ const mongo = require("mongodb") -const MongoDBIntegration = require("../mongodb") +import { default as MongoDBIntegration } from "../mongodb" jest.mock("mongodb") class TestConfiguration { - constructor(config = {}) { + integration: any + + constructor(config: any = {}) { this.integration = new MongoDBIntegration.integration(config) } } function disableConsole() { jest.spyOn(console, "error") + // @ts-ignore console.error.mockImplementation(() => {}) + // @ts-ignore return console.error.mockRestore } describe("MongoDB Integration", () => { - let config + let config: any let indexName = "Users" beforeEach(() => { @@ -54,13 +58,16 @@ describe("MongoDB Integration", () => { id: "test", }, options: { - opt: "option" - } + opt: "option", + }, }, extra: { collection: "testCollection", actionTypes: "deleteOne" }, } await config.integration.delete(query) - expect(config.integration.client.deleteOne).toHaveBeenCalledWith(query.json.filter, query.json.options) + expect(config.integration.client.deleteOne).toHaveBeenCalledWith( + query.json.filter, + query.json.options + ) }) it("calls the update method with the correct params", async () => { @@ -108,7 +115,7 @@ describe("MongoDB Integration", () => { json: { filter: { _id: "ObjectId('ACBD12345678ABCD12345678')", - name: "ObjectId('BBBB12345678ABCD12345678')" + name: "ObjectId('BBBB12345678ABCD12345678')", }, update: { _id: "ObjectId('FFFF12345678ABCD12345678')", @@ -122,7 +129,7 @@ describe("MongoDB Integration", () => { } await config.integration.update(query) expect(config.integration.client.updateOne).toHaveBeenCalled() - + const args = config.integration.client.updateOne.mock.calls[0] expect(args[0]).toEqual({ _id: mongo.ObjectID.createFromHexString("ACBD12345678ABCD12345678"), @@ -133,7 +140,7 @@ describe("MongoDB Integration", () => { name: mongo.ObjectID.createFromHexString("CCCC12345678ABCD12345678"), }) expect(args[2]).toEqual({ - upsert: false + upsert: false, }) }) @@ -143,7 +150,7 @@ describe("MongoDB Integration", () => { filter: { _id: { $eq: "ObjectId('ACBD12345678ABCD12345678')", - } + }, }, update: { $set: { @@ -158,20 +165,20 @@ describe("MongoDB Integration", () => { } await config.integration.update(query) expect(config.integration.client.updateOne).toHaveBeenCalled() - + const args = config.integration.client.updateOne.mock.calls[0] expect(args[0]).toEqual({ _id: { $eq: mongo.ObjectID.createFromHexString("ACBD12345678ABCD12345678"), - } + }, }) expect(args[1]).toEqual({ $set: { _id: mongo.ObjectID.createFromHexString("FFFF12345678ABCD12345678"), - } + }, }) expect(args[2]).toEqual({ - upsert: true + upsert: true, }) }) @@ -181,12 +188,12 @@ describe("MongoDB Integration", () => { filter: { _id: { $eq: "ObjectId('ACBD12345678ABCD12345678')", - } + }, }, update: { $set: { name: "UPDATED", - age: 99 + age: 99, }, }, options: { @@ -197,21 +204,21 @@ describe("MongoDB Integration", () => { } await config.integration.read(query) expect(config.integration.client.findOneAndUpdate).toHaveBeenCalled() - + const args = config.integration.client.findOneAndUpdate.mock.calls[0] expect(args[0]).toEqual({ _id: { $eq: mongo.ObjectID.createFromHexString("ACBD12345678ABCD12345678"), - } + }, }) expect(args[1]).toEqual({ $set: { name: "UPDATED", - age: 99 - } + age: 99, + }, }) expect(args[2]).toEqual({ - upsert: false + upsert: false, }) }) @@ -242,12 +249,12 @@ describe("MongoDB Integration", () => { } await config.integration.update(query) expect(config.integration.client.updateOne).toHaveBeenCalled() - + const args = config.integration.client.updateOne.mock.calls[0] expect(args[0]).toEqual({ _id: { $eq: mongo.ObjectID.createFromHexString("ACBD12345678ABCD12345678"), - } + }, }) expect(args[1]).toEqual({ $set: { @@ -255,15 +262,17 @@ describe("MongoDB Integration", () => { data: [ { cid: 1 }, { cid: 2 }, - { nested: { - name: "test" - }} - ] + { + nested: { + name: "test", + }, + }, + ], }, }, }) expect(args[2]).toEqual({ - upsert: true + upsert: true, }) }) @@ -295,12 +304,12 @@ describe("MongoDB Integration", () => { } await config.integration.update(query) expect(config.integration.client.updateOne).toHaveBeenCalled() - + const args = config.integration.client.updateOne.mock.calls[0] expect(args[0]).toEqual({ _id: { $eq: mongo.ObjectID.createFromHexString("ACBD12345678ABCD12345678"), - } + }, }) expect(args[1]).toEqual({ $set: { @@ -308,16 +317,18 @@ describe("MongoDB Integration", () => { data: [ { cid: 1 }, { cid: 2 }, - { nested: { - name: "te}st" - }} - ] + { + nested: { + name: "te}st", + }, + }, + ], }, }, }) expect(args[2]).toEqual({ upsert: true, - extra: "ad\"{\"d" + extra: 'ad"{"d', }) }) }) diff --git a/packages/server/src/integrations/tests/mysql.spec.js b/packages/server/src/integrations/tests/mysql.spec.ts similarity index 80% rename from packages/server/src/integrations/tests/mysql.spec.js rename to packages/server/src/integrations/tests/mysql.spec.ts index 8304771d5d..a70eb73857 100644 --- a/packages/server/src/integrations/tests/mysql.spec.js +++ b/packages/server/src/integrations/tests/mysql.spec.ts @@ -1,14 +1,16 @@ -const MySQLIntegration = require("../mysql") +import { default as MySQLIntegration } from "../mysql" jest.mock("mysql2") class TestConfiguration { - constructor(config = { ssl: {} }) { + integration: any + + constructor(config: any = { ssl: {} }) { this.integration = new MySQLIntegration.integration(config) } } describe("MySQL Integration", () => { - let config + let config: any beforeEach(() => { config = new TestConfiguration() @@ -17,7 +19,7 @@ describe("MySQL Integration", () => { it("calls the create method with the correct params", async () => { const sql = "insert into users (name, age) values ('Joe', 123);" await config.integration.create({ - sql + sql, }) expect(config.integration.client.query).toHaveBeenCalledWith(sql, []) }) @@ -25,7 +27,7 @@ describe("MySQL Integration", () => { it("calls the read method with the correct params", async () => { const sql = "select * from users;" await config.integration.read({ - sql + sql, }) expect(config.integration.client.query).toHaveBeenCalledWith(sql, []) }) @@ -33,7 +35,7 @@ describe("MySQL Integration", () => { it("calls the update method with the correct params", async () => { const sql = "update table users set name = 'test';" await config.integration.update({ - sql + sql, }) expect(config.integration.client.query).toHaveBeenCalledWith(sql, []) }) @@ -41,34 +43,34 @@ describe("MySQL Integration", () => { it("calls the delete method with the correct params", async () => { const sql = "delete from users where name = 'todelete';" await config.integration.delete({ - sql + sql, }) expect(config.integration.client.query).toHaveBeenCalledWith(sql, []) }) describe("no rows returned", () => { it("returns the correct response when the create response has no rows", async () => { - const sql = "insert into users (name, age) values ('Joe', 123);" - const response = await config.integration.create({ - sql + const sql = "insert into users (name, age) values ('Joe', 123);" + const response = await config.integration.create({ + sql, }) expect(response).toEqual([{ created: true }]) }) it("returns the correct response when the update response has no rows", async () => { const sql = "update table users set name = 'test';" - const response = await config.integration.update({ - sql + const response = await config.integration.update({ + sql, }) expect(response).toEqual([{ updated: true }]) }) it("returns the correct response when the delete response has no rows", async () => { const sql = "delete from users where name = 'todelete';" - const response = await config.integration.delete({ - sql + const response = await config.integration.delete({ + sql, }) expect(response).toEqual([{ deleted: true }]) }) }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/oracle.spec.js b/packages/server/src/integrations/tests/oracle.spec.ts similarity index 83% rename from packages/server/src/integrations/tests/oracle.spec.js rename to packages/server/src/integrations/tests/oracle.spec.ts index 77f0525090..57dad48820 100644 --- a/packages/server/src/integrations/tests/oracle.spec.js +++ b/packages/server/src/integrations/tests/oracle.spec.ts @@ -1,17 +1,19 @@ const oracledb = require("oracledb") -const OracleIntegration = require("../oracle") +import { default as OracleIntegration } from "../oracle" jest.mock("oracledb") class TestConfiguration { - constructor(config = {}) { - this.integration = new OracleIntegration.integration(config) + integration: any + + constructor(config: any = {}) { + this.integration = new OracleIntegration.integration(config) } } const options = { autoCommit: true } describe("Oracle Integration", () => { - let config + let config: any beforeEach(() => { jest.clearAllMocks() @@ -26,7 +28,7 @@ describe("Oracle Integration", () => { it("calls the create method with the correct params", async () => { const sql = "insert into users (name, age) values ('Joe', 123);" await config.integration.create({ - sql + sql, }) expect(oracledb.executeMock).toHaveBeenCalledWith(sql, [], options) expect(oracledb.executeMock).toHaveBeenCalledTimes(1) @@ -35,7 +37,7 @@ describe("Oracle Integration", () => { it("calls the read method with the correct params", async () => { const sql = "select * from users;" await config.integration.read({ - sql + sql, }) expect(oracledb.executeMock).toHaveBeenCalledWith(sql, [], options) expect(oracledb.executeMock).toHaveBeenCalledTimes(1) @@ -43,8 +45,8 @@ describe("Oracle Integration", () => { it("calls the update method with the correct params", async () => { const sql = "update table users set name = 'test';" - const response = await config.integration.update({ - sql + const response = await config.integration.update({ + sql, }) expect(oracledb.executeMock).toHaveBeenCalledWith(sql, [], options) expect(oracledb.executeMock).toHaveBeenCalledTimes(1) @@ -53,7 +55,7 @@ describe("Oracle Integration", () => { it("calls the delete method with the correct params", async () => { const sql = "delete from users where name = 'todelete';" await config.integration.delete({ - sql + sql, }) expect(oracledb.executeMock).toHaveBeenCalledWith(sql, [], options) expect(oracledb.executeMock).toHaveBeenCalledTimes(1) @@ -65,9 +67,9 @@ describe("Oracle Integration", () => { }) it("returns the correct response when the create response has no rows", async () => { - const sql = "insert into users (name, age) values ('Joe', 123);" - const response = await config.integration.create({ - sql + const sql = "insert into users (name, age) values ('Joe', 123);" + const response = await config.integration.create({ + sql, }) expect(response).toEqual([{ created: true }]) expect(oracledb.executeMock).toHaveBeenCalledTimes(1) @@ -75,8 +77,8 @@ describe("Oracle Integration", () => { it("returns the correct response when the update response has no rows", async () => { const sql = "update table users set name = 'test';" - const response = await config.integration.update({ - sql + const response = await config.integration.update({ + sql, }) expect(response).toEqual([{ updated: true }]) expect(oracledb.executeMock).toHaveBeenCalledTimes(1) @@ -84,11 +86,11 @@ describe("Oracle Integration", () => { it("returns the correct response when the delete response has no rows", async () => { const sql = "delete from users where name = 'todelete';" - const response = await config.integration.delete({ - sql + const response = await config.integration.delete({ + sql, }) expect(response).toEqual([{ deleted: true }]) expect(oracledb.executeMock).toHaveBeenCalledTimes(1) }) }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/postgres.spec.js b/packages/server/src/integrations/tests/postgres.spec.ts similarity index 78% rename from packages/server/src/integrations/tests/postgres.spec.js rename to packages/server/src/integrations/tests/postgres.spec.ts index 4ce5f12e96..a6be3aa623 100644 --- a/packages/server/src/integrations/tests/postgres.spec.js +++ b/packages/server/src/integrations/tests/postgres.spec.ts @@ -1,15 +1,17 @@ const pg = require("pg") -const PostgresIntegration = require("../postgres") +import { default as PostgresIntegration } from "../postgres" jest.mock("pg") class TestConfiguration { - constructor(config = {}) { - this.integration = new PostgresIntegration.integration(config) + integration: any + + constructor(config: any = {}) { + this.integration = new PostgresIntegration.integration(config) } } describe("Postgres Integration", () => { - let config + let config: any beforeEach(() => { config = new TestConfiguration() @@ -18,7 +20,7 @@ describe("Postgres Integration", () => { it("calls the create method with the correct params", async () => { const sql = "insert into users (name, age) values ('Joe', 123);" await config.integration.create({ - sql + sql, }) expect(pg.queryMock).toHaveBeenCalledWith(sql, []) }) @@ -26,15 +28,15 @@ describe("Postgres Integration", () => { it("calls the read method with the correct params", async () => { const sql = "select * from users;" await config.integration.read({ - sql + sql, }) expect(pg.queryMock).toHaveBeenCalledWith(sql, []) }) it("calls the update method with the correct params", async () => { const sql = "update table users set name = 'test';" - const response = await config.integration.update({ - sql + const response = await config.integration.update({ + sql, }) expect(pg.queryMock).toHaveBeenCalledWith(sql, []) }) @@ -42,7 +44,7 @@ describe("Postgres Integration", () => { it("calls the delete method with the correct params", async () => { const sql = "delete from users where name = 'todelete';" await config.integration.delete({ - sql + sql, }) expect(pg.queryMock).toHaveBeenCalledWith(sql, []) }) @@ -53,27 +55,27 @@ describe("Postgres Integration", () => { }) it("returns the correct response when the create response has no rows", async () => { - const sql = "insert into users (name, age) values ('Joe', 123);" - const response = await config.integration.create({ - sql + const sql = "insert into users (name, age) values ('Joe', 123);" + const response = await config.integration.create({ + sql, }) expect(response).toEqual([{ created: true }]) }) it("returns the correct response when the update response has no rows", async () => { const sql = "update table users set name = 'test';" - const response = await config.integration.update({ - sql + const response = await config.integration.update({ + sql, }) expect(response).toEqual([{ updated: true }]) }) it("returns the correct response when the delete response has no rows", async () => { const sql = "delete from users where name = 'todelete';" - const response = await config.integration.delete({ - sql + const response = await config.integration.delete({ + sql, }) expect(response).toEqual([{ deleted: true }]) }) }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/redis.spec.js b/packages/server/src/integrations/tests/redis.spec.ts similarity index 71% rename from packages/server/src/integrations/tests/redis.spec.js rename to packages/server/src/integrations/tests/redis.spec.ts index 219584bdb2..d2e5ac819d 100644 --- a/packages/server/src/integrations/tests/redis.spec.js +++ b/packages/server/src/integrations/tests/redis.spec.ts @@ -1,13 +1,16 @@ const Redis = require("ioredis-mock") -const RedisIntegration = require("../redis") +import { default as RedisIntegration } from "../redis" class TestConfiguration { - constructor(config = {}) { - this.integration = new RedisIntegration.integration(config) + integration: any + redis: any + + constructor(config: any = {}) { + this.integration = new RedisIntegration.integration(config) this.redis = new Redis({ data: { - test: 'test', - result: "1" + test: "test", + result: "1", }, }) this.integration.client = this.redis @@ -15,7 +18,7 @@ class TestConfiguration { } describe("Redis Integration", () => { - let config + let config: any beforeEach(() => { config = new TestConfiguration() @@ -24,7 +27,7 @@ describe("Redis Integration", () => { it("calls the create method with the correct params", async () => { const body = { key: "key", - value: "value" + value: "value", } const response = await config.integration.create(body) expect(await config.redis.get("key")).toEqual("value") @@ -32,7 +35,7 @@ describe("Redis Integration", () => { it("calls the read method with the correct params", async () => { const body = { - key: "test" + key: "test", } const response = await config.integration.read(body) expect(response).toEqual("test") @@ -40,7 +43,7 @@ describe("Redis Integration", () => { it("calls the delete method with the correct params", async () => { const body = { - key: "test" + key: "test", } await config.integration.delete(body) expect(await config.redis.get(body.key)).toEqual(null) @@ -48,13 +51,17 @@ describe("Redis Integration", () => { it("calls the command method with the correct params", async () => { const body = { - json: "KEYS *" + json: "KEYS *", } // ioredis-mock doesn't support pipelines - config.integration.client.pipeline = jest.fn(() => ({ exec: jest.fn(() => [[]]) })) + config.integration.client.pipeline = jest.fn(() => ({ + exec: jest.fn(() => [[]]), + })) await config.integration.command(body) - expect(config.integration.client.pipeline).toHaveBeenCalledWith([["KEYS", "*"]]) + expect(config.integration.client.pipeline).toHaveBeenCalledWith([ + ["KEYS", "*"], + ]) }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/rest.spec.js b/packages/server/src/integrations/tests/rest.spec.ts similarity index 96% rename from packages/server/src/integrations/tests/rest.spec.js rename to packages/server/src/integrations/tests/rest.spec.ts index 0bb1e3a75d..96f87c2355 100644 --- a/packages/server/src/integrations/tests/rest.spec.js +++ b/packages/server/src/integrations/tests/rest.spec.ts @@ -12,9 +12,8 @@ jest.mock("node-fetch", () => text: jest.fn(), })) ) -const fetch = require("node-fetch") -const RestIntegration = require("../rest") -const { AuthType } = require("../rest") +import fetch from "node-fetch" +import { default as RestIntegration } from "../rest" const FormData = require("form-data") const { URLSearchParams } = require("url") @@ -24,14 +23,16 @@ const HEADERS = { } class TestConfiguration { - constructor(config = {}) { + integration: any + + constructor(config: any = {}) { this.integration = new RestIntegration.integration(config) } } describe("REST Integration", () => { const BASE_URL = "https://myapi.com" - let config + let config: any beforeEach(() => { config = new TestConfiguration({ @@ -170,22 +171,25 @@ describe("REST Integration", () => { }) it("should allow a valid json string and parse the contents to xml", () => { - const output = config.integration.addBody("xml", JSON.stringify(input), {}) + const output = config.integration.addBody( + "xml", + JSON.stringify(input), + {} + ) expect(output.body.includes("1")).toEqual(true) expect(output.body.includes("2")).toEqual(true) expect(output.headers["Content-Type"]).toEqual("application/xml") }) - }) describe("response", () => { - function buildInput(json, text, header) { + function buildInput(json: any, text: any, header: any) { return { status: 200, json: json ? async () => json : undefined, text: text ? async () => text : undefined, headers: { - get: key => (key === "content-length" ? 100 : header), + get: (key: any) => (key === "content-length" ? 100 : header), raw: () => ({ "content-type": header }), }, } @@ -224,7 +228,7 @@ describe("REST Integration", () => { const basicAuth = { _id: "c59c14bd1898a43baa08da68959b24686", name: "basic-1", - type: AuthType.BASIC, + type: RestIntegration.AuthType.BASIC, config: { username: "user", password: "password", @@ -234,7 +238,7 @@ describe("REST Integration", () => { const bearerAuth = { _id: "0d91d732f34e4befabeff50b392a8ff3", name: "bearer-1", - type: AuthType.BEARER, + type: RestIntegration.AuthType.BEARER, config: { token: "mytoken", }, @@ -360,6 +364,7 @@ describe("REST Integration", () => { headers: {}, method: "POST", }) + // @ts-ignore const sentData = JSON.stringify(fetch.mock.calls[0][1].body) expect(sentData).toContain(pageParam) expect(sentData).toContain(sizeParam) @@ -390,6 +395,7 @@ describe("REST Integration", () => { headers: {}, method: "POST", }) + // @ts-ignore const sentData = fetch.mock.calls[0][1].body expect(sentData.has(pageParam)) expect(sentData.get(pageParam)).toEqual(pageValue.toString()) @@ -489,6 +495,7 @@ describe("REST Integration", () => { headers: {}, method: "POST", }) + // @ts-ignore const sentData = JSON.stringify(fetch.mock.calls[0][1].body) expect(sentData).toContain(pageParam) expect(sentData).toContain(sizeParam) @@ -521,6 +528,7 @@ describe("REST Integration", () => { headers: {}, method: "POST", }) + // @ts-ignore const sentData = fetch.mock.calls[0][1].body expect(sentData.has(pageParam)) expect(sentData.get(pageParam)).toEqual(pageValue.toString()) diff --git a/packages/server/src/integrations/tests/s3.spec.js b/packages/server/src/integrations/tests/s3.spec.ts similarity index 55% rename from packages/server/src/integrations/tests/s3.spec.js rename to packages/server/src/integrations/tests/s3.spec.ts index 7ac403dbd4..503702c042 100644 --- a/packages/server/src/integrations/tests/s3.spec.js +++ b/packages/server/src/integrations/tests/s3.spec.ts @@ -1,26 +1,28 @@ const AWS = require("aws-sdk") -const S3Integration = require("../s3") +import { default as S3Integration } from "../s3" jest.mock("aws-sdk") class TestConfiguration { - constructor(config = {}) { - this.integration = new S3Integration.integration(config) + integration: any + + constructor(config: any = {}) { + this.integration = new S3Integration.integration(config) } } describe("S3 Integration", () => { - let config + let config: any beforeEach(() => { config = new TestConfiguration() }) it("calls the read method with the correct params", async () => { - const response = await config.integration.read({ - bucket: "test" + const response = await config.integration.read({ + bucket: "test", }) expect(config.integration.client.listObjects).toHaveBeenCalledWith({ - Bucket: "test" + Bucket: "test", }) }) -}) \ No newline at end of file +}) diff --git a/packages/server/src/integrations/tests/sql.spec.js b/packages/server/src/integrations/tests/sql.spec.ts similarity index 60% rename from packages/server/src/integrations/tests/sql.spec.js rename to packages/server/src/integrations/tests/sql.spec.ts index 3cc9f0fb3e..421b8535d4 100644 --- a/packages/server/src/integrations/tests/sql.spec.js +++ b/packages/server/src/integrations/tests/sql.spec.ts @@ -3,7 +3,7 @@ const { SqlClient } = require("../utils") const TABLE_NAME = "test" -function endpoint(table, operation) { +function endpoint(table: any, operation: any) { return { datasourceId: "Postgres", operation: operation, @@ -11,7 +11,13 @@ function endpoint(table, operation) { } } -function generateReadJson({ table, fields, filters, sort, paginate} = {}) { +function generateReadJson({ + table, + fields, + filters, + sort, + paginate, +}: any = {}) { return { endpoint: endpoint(table || TABLE_NAME, "READ"), resource: { @@ -48,7 +54,7 @@ function generateDeleteJson(table = TABLE_NAME, filters = {}) { describe("SQL query builder", () => { const limit = 500 const client = SqlClient.POSTGRES - let sql + let sql: any beforeEach(() => { sql = new Sql(client, limit) @@ -58,118 +64,139 @@ describe("SQL query builder", () => { const query = sql._query(generateReadJson()) expect(query).toEqual({ bindings: [limit], - sql: `select * from (select * from "${TABLE_NAME}" limit $1) as "${TABLE_NAME}"` + sql: `select * from (select * from "${TABLE_NAME}" limit $1) as "${TABLE_NAME}"`, }) }) it("should test a read with specific columns", () => { - const nameProp = `${TABLE_NAME}.name`, ageProp = `${TABLE_NAME}.age` - const query = sql._query(generateReadJson({ - fields: [nameProp, ageProp] - })) + const nameProp = `${TABLE_NAME}.name`, + ageProp = `${TABLE_NAME}.age` + const query = sql._query( + generateReadJson({ + fields: [nameProp, ageProp], + }) + ) expect(query).toEqual({ bindings: [limit], - sql: `select "${TABLE_NAME}"."name" as "${nameProp}", "${TABLE_NAME}"."age" as "${ageProp}" from (select * from "${TABLE_NAME}" limit $1) as "${TABLE_NAME}"` + sql: `select "${TABLE_NAME}"."name" as "${nameProp}", "${TABLE_NAME}"."age" as "${ageProp}" from (select * from "${TABLE_NAME}" limit $1) as "${TABLE_NAME}"`, }) }) it("should test a where string starts with read", () => { - const query = sql._query(generateReadJson({ - filters: { - string: { - name: "John", - } - } - })) + const query = sql._query( + generateReadJson({ + filters: { + string: { + name: "John", + }, + }, + }) + ) expect(query).toEqual({ bindings: ["John%", limit], - sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."name" ilike $1 limit $2) as "${TABLE_NAME}"` + sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."name" ilike $1 limit $2) as "${TABLE_NAME}"`, }) }) it("should test a where range read", () => { - const query = sql._query(generateReadJson({ - filters: { - range: { - age: { - low: 2, - high: 10, - } - } - } - })) + const query = sql._query( + generateReadJson({ + filters: { + range: { + age: { + low: 2, + high: 10, + }, + }, + }, + }) + ) expect(query).toEqual({ bindings: [2, 10, limit], - sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."age" between $1 and $2 limit $3) as "${TABLE_NAME}"` + sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."age" between $1 and $2 limit $3) as "${TABLE_NAME}"`, }) }) it("should test for multiple IDs with OR", () => { - const query = sql._query(generateReadJson({ - filters: { - equal: { - age: 10, - name: "John", + const query = sql._query( + generateReadJson({ + filters: { + equal: { + age: 10, + name: "John", + }, + allOr: true, }, - allOr: true, - } - })) + }) + ) expect(query).toEqual({ bindings: [10, "John", limit], - sql: `select * from (select * from "${TABLE_NAME}" where ("${TABLE_NAME}"."age" = $1) or ("${TABLE_NAME}"."name" = $2) limit $3) as "${TABLE_NAME}"` + sql: `select * from (select * from "${TABLE_NAME}" where ("${TABLE_NAME}"."age" = $1) or ("${TABLE_NAME}"."name" = $2) limit $3) as "${TABLE_NAME}"`, }) }) it("should allow filtering on a related field", () => { - const query = sql._query(generateReadJson({ - filters: { - equal: { - age: 10, - "task.name": "task 1", + const query = sql._query( + generateReadJson({ + filters: { + equal: { + age: 10, + "task.name": "task 1", + }, }, - }, - })) + }) + ) // order of bindings changes because relationship filters occur outside inner query expect(query).toEqual({ bindings: [10, limit, "task 1"], - sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."age" = $1 limit $2) as "${TABLE_NAME}" where "task"."name" = $3` + sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."age" = $1 limit $2) as "${TABLE_NAME}" where "task"."name" = $3`, }) }) it("should test an create statement", () => { - const query = sql._query(generateCreateJson(TABLE_NAME, { - name: "Michael", - age: 45, - })) + const query = sql._query( + generateCreateJson(TABLE_NAME, { + name: "Michael", + age: 45, + }) + ) expect(query).toEqual({ bindings: [45, "Michael"], - sql: `insert into "${TABLE_NAME}" ("age", "name") values ($1, $2) returning *` + sql: `insert into "${TABLE_NAME}" ("age", "name") values ($1, $2) returning *`, }) }) it("should test an update statement", () => { - const query = sql._query(generateUpdateJson(TABLE_NAME, { - name: "John" - }, { - equal: { - id: 1001, - } - })) + const query = sql._query( + generateUpdateJson( + TABLE_NAME, + { + name: "John", + }, + { + equal: { + id: 1001, + }, + } + ) + ) expect(query).toEqual({ bindings: ["John", 1001], - sql: `update "${TABLE_NAME}" set "name" = $1 where "${TABLE_NAME}"."id" = $2 returning *` + sql: `update "${TABLE_NAME}" set "name" = $1 where "${TABLE_NAME}"."id" = $2 returning *`, }) }) it("should test a delete statement", () => { - const query = sql._query(generateDeleteJson(TABLE_NAME, { - equal: { - id: 1001, - } - })) + const query = sql._query( + generateDeleteJson(TABLE_NAME, { + equal: { + id: 1001, + }, + }) + ) expect(query).toEqual({ bindings: [1001], - sql: `delete from "${TABLE_NAME}" where "${TABLE_NAME}"."id" = $1 returning *` + sql: `delete from "${TABLE_NAME}" where "${TABLE_NAME}"."id" = $1 returning *`, }) }) @@ -177,7 +204,7 @@ describe("SQL query builder", () => { const query = new Sql(SqlClient.MS_SQL, 10)._query(generateReadJson()) expect(query).toEqual({ bindings: [10], - sql: `select * from (select top (@p0) * from [${TABLE_NAME}]) as [${TABLE_NAME}]` + sql: `select * from (select top (@p0) * from [${TABLE_NAME}]) as [${TABLE_NAME}]`, }) }) @@ -185,193 +212,217 @@ describe("SQL query builder", () => { const query = new Sql(SqlClient.MY_SQL, 10)._query(generateReadJson()) expect(query).toEqual({ bindings: [10], - sql: `select * from (select * from \`${TABLE_NAME}\` limit ?) as \`${TABLE_NAME}\`` + sql: `select * from (select * from \`${TABLE_NAME}\` limit ?) as \`${TABLE_NAME}\``, }) }) it("should use greater than when only low range specified", () => { const date = new Date() - const query = sql._query(generateReadJson({ - filters: { - range: { - property: { - low: date, - } - } - } - })) + const query = sql._query( + generateReadJson({ + filters: { + range: { + property: { + low: date, + }, + }, + }, + }) + ) expect(query).toEqual({ bindings: [date, limit], - sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."property" > $1 limit $2) as "${TABLE_NAME}"` + sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."property" > $1 limit $2) as "${TABLE_NAME}"`, }) }) it("should use less than when only high range specified", () => { const date = new Date() - const query = sql._query(generateReadJson({ - filters: { - range: { - property: { - high: date, - } - } - } - })) + const query = sql._query( + generateReadJson({ + filters: { + range: { + property: { + high: date, + }, + }, + }, + }) + ) expect(query).toEqual({ bindings: [date, limit], - sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."property" < $1 limit $2) as "${TABLE_NAME}"` + sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."property" < $1 limit $2) as "${TABLE_NAME}"`, }) }) it("should use greater than when only low range specified", () => { const date = new Date() - const query = sql._query(generateReadJson({ - filters: { - range: { - property: { - low: date, - } - } - } - })) + const query = sql._query( + generateReadJson({ + filters: { + range: { + property: { + low: date, + }, + }, + }, + }) + ) expect(query).toEqual({ bindings: [date, limit], - sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."property" > $1 limit $2) as "${TABLE_NAME}"` + sql: `select * from (select * from "${TABLE_NAME}" where "${TABLE_NAME}"."property" > $1 limit $2) as "${TABLE_NAME}"`, }) }) it("should use AND like expression for MS-SQL when filter is contains", () => { - const query = new Sql(SqlClient.MS_SQL, 10)._query(generateReadJson({ - filters: { - contains: { - age: [20, 25], - name: ["John", "Mary"] - } - } - })) + const query = new Sql(SqlClient.MS_SQL, 10)._query( + generateReadJson({ + filters: { + contains: { + age: [20, 25], + name: ["John", "Mary"], + }, + }, + }) + ) expect(query).toEqual({ bindings: [10, "%20%", "%25%", `%"John"%`, `%"Mary"%`], - sql: `select * from (select top (@p0) * from [${TABLE_NAME}] where (LOWER(${TABLE_NAME}.age) LIKE @p1 AND LOWER(${TABLE_NAME}.age) LIKE @p2) and (LOWER(${TABLE_NAME}.name) LIKE @p3 AND LOWER(${TABLE_NAME}.name) LIKE @p4)) as [${TABLE_NAME}]` + sql: `select * from (select top (@p0) * from [${TABLE_NAME}] where (LOWER(${TABLE_NAME}.age) LIKE @p1 AND LOWER(${TABLE_NAME}.age) LIKE @p2) and (LOWER(${TABLE_NAME}.name) LIKE @p3 AND LOWER(${TABLE_NAME}.name) LIKE @p4)) as [${TABLE_NAME}]`, }) }) it("should use JSON_CONTAINS expression for MySQL when filter is contains", () => { - const query = new Sql(SqlClient.MY_SQL, 10)._query(generateReadJson({ - filters: { - contains: { - age: [20], - name: ["John"] - } - } - })) + const query = new Sql(SqlClient.MY_SQL, 10)._query( + generateReadJson({ + filters: { + contains: { + age: [20], + name: ["John"], + }, + }, + }) + ) expect(query).toEqual({ bindings: [10], - sql: `select * from (select * from \`${TABLE_NAME}\` where JSON_CONTAINS(${TABLE_NAME}.age, '[20]') and JSON_CONTAINS(${TABLE_NAME}.name, '["John"]') limit ?) as \`${TABLE_NAME}\`` + sql: `select * from (select * from \`${TABLE_NAME}\` where JSON_CONTAINS(${TABLE_NAME}.age, '[20]') and JSON_CONTAINS(${TABLE_NAME}.name, '["John"]') limit ?) as \`${TABLE_NAME}\``, }) }) it("should use jsonb operator expression for PostgreSQL when filter is contains", () => { - const query = new Sql(SqlClient.POSTGRES, 10)._query(generateReadJson({ - filters: { - contains: { - age: [20], - name: ["John"] - } - } - })) + const query = new Sql(SqlClient.POSTGRES, 10)._query( + generateReadJson({ + filters: { + contains: { + age: [20], + name: ["John"], + }, + }, + }) + ) expect(query).toEqual({ bindings: [10], - sql: `select * from (select * from \"${TABLE_NAME}\" where \"${TABLE_NAME}\".\"age\"::jsonb @> '[20]' and \"${TABLE_NAME}\".\"name\"::jsonb @> '["John"]' limit $1) as \"${TABLE_NAME}\"` + sql: `select * from (select * from \"${TABLE_NAME}\" where \"${TABLE_NAME}\".\"age\"::jsonb @> '[20]' and \"${TABLE_NAME}\".\"name\"::jsonb @> '["John"]' limit $1) as \"${TABLE_NAME}\"`, }) }) it("should use NOT like expression for MS-SQL when filter is notContains", () => { - const query = new Sql(SqlClient.MS_SQL, 10)._query(generateReadJson({ - filters: { - notContains: { - age: [20], - name: ["John"] - } - } - })) + const query = new Sql(SqlClient.MS_SQL, 10)._query( + generateReadJson({ + filters: { + notContains: { + age: [20], + name: ["John"], + }, + }, + }) + ) expect(query).toEqual({ bindings: [10, "%20%", `%"John"%`], - sql: `select * from (select top (@p0) * from [${TABLE_NAME}] where NOT (LOWER(${TABLE_NAME}.age) LIKE @p1) and NOT (LOWER(${TABLE_NAME}.name) LIKE @p2)) as [${TABLE_NAME}]` + sql: `select * from (select top (@p0) * from [${TABLE_NAME}] where NOT (LOWER(${TABLE_NAME}.age) LIKE @p1) and NOT (LOWER(${TABLE_NAME}.name) LIKE @p2)) as [${TABLE_NAME}]`, }) }) it("should use NOT JSON_CONTAINS expression for MySQL when filter is notContains", () => { - const query = new Sql(SqlClient.MY_SQL, 10)._query(generateReadJson({ - filters: { - notContains: { - age: [20], - name: ["John"] - } - } - })) + const query = new Sql(SqlClient.MY_SQL, 10)._query( + generateReadJson({ + filters: { + notContains: { + age: [20], + name: ["John"], + }, + }, + }) + ) expect(query).toEqual({ bindings: [10], - sql: `select * from (select * from \`${TABLE_NAME}\` where NOT JSON_CONTAINS(${TABLE_NAME}.age, '[20]') and NOT JSON_CONTAINS(${TABLE_NAME}.name, '["John"]') limit ?) as \`${TABLE_NAME}\`` + sql: `select * from (select * from \`${TABLE_NAME}\` where NOT JSON_CONTAINS(${TABLE_NAME}.age, '[20]') and NOT JSON_CONTAINS(${TABLE_NAME}.name, '["John"]') limit ?) as \`${TABLE_NAME}\``, }) }) it("should use jsonb operator NOT expression for PostgreSQL when filter is notContains", () => { - const query = new Sql(SqlClient.POSTGRES, 10)._query(generateReadJson({ - filters: { - notContains: { - age: [20], - name: ["John"] - } - } - })) + const query = new Sql(SqlClient.POSTGRES, 10)._query( + generateReadJson({ + filters: { + notContains: { + age: [20], + name: ["John"], + }, + }, + }) + ) expect(query).toEqual({ bindings: [10], - sql: `select * from (select * from \"${TABLE_NAME}\" where NOT \"${TABLE_NAME}\".\"age\"::jsonb @> '[20]' and NOT \"${TABLE_NAME}\".\"name\"::jsonb @> '["John"]' limit $1) as \"${TABLE_NAME}\"` + sql: `select * from (select * from \"${TABLE_NAME}\" where NOT \"${TABLE_NAME}\".\"age\"::jsonb @> '[20]' and NOT \"${TABLE_NAME}\".\"name\"::jsonb @> '["John"]' limit $1) as \"${TABLE_NAME}\"`, }) }) it("should use OR like expression for MS-SQL when filter is containsAny", () => { - const query = new Sql(SqlClient.MS_SQL, 10)._query(generateReadJson({ - filters: { - containsAny: { - age: [20, 25], - name: ["John", "Mary"] - } - } - })) + const query = new Sql(SqlClient.MS_SQL, 10)._query( + generateReadJson({ + filters: { + containsAny: { + age: [20, 25], + name: ["John", "Mary"], + }, + }, + }) + ) expect(query).toEqual({ bindings: [10, "%20%", "%25%", `%"John"%`, `%"Mary"%`], - sql: `select * from (select top (@p0) * from [${TABLE_NAME}] where (LOWER(${TABLE_NAME}.age) LIKE @p1 OR LOWER(${TABLE_NAME}.age) LIKE @p2) and (LOWER(${TABLE_NAME}.name) LIKE @p3 OR LOWER(${TABLE_NAME}.name) LIKE @p4)) as [${TABLE_NAME}]` + sql: `select * from (select top (@p0) * from [${TABLE_NAME}] where (LOWER(${TABLE_NAME}.age) LIKE @p1 OR LOWER(${TABLE_NAME}.age) LIKE @p2) and (LOWER(${TABLE_NAME}.name) LIKE @p3 OR LOWER(${TABLE_NAME}.name) LIKE @p4)) as [${TABLE_NAME}]`, }) }) it("should use JSON_OVERLAPS expression for MySQL when filter is containsAny", () => { - const query = new Sql(SqlClient.MY_SQL, 10)._query(generateReadJson({ - filters: { - containsAny: { - age: [20, 25], - name: ["John", "Mary"] - } - } - })) + const query = new Sql(SqlClient.MY_SQL, 10)._query( + generateReadJson({ + filters: { + containsAny: { + age: [20, 25], + name: ["John", "Mary"], + }, + }, + }) + ) expect(query).toEqual({ bindings: [10], - sql: `select * from (select * from \`${TABLE_NAME}\` where JSON_OVERLAPS(${TABLE_NAME}.age, '[20,25]') and JSON_OVERLAPS(${TABLE_NAME}.name, '["John","Mary"]') limit ?) as \`${TABLE_NAME}\`` + sql: `select * from (select * from \`${TABLE_NAME}\` where JSON_OVERLAPS(${TABLE_NAME}.age, '[20,25]') and JSON_OVERLAPS(${TABLE_NAME}.name, '["John","Mary"]') limit ?) as \`${TABLE_NAME}\``, }) }) it("should use ?| operator expression for PostgreSQL when filter is containsAny", () => { - const query = new Sql(SqlClient.POSTGRES, 10)._query(generateReadJson({ - filters: { - containsAny: { - age: [20, 25], - name: ["John", "Mary"] - } - } - })) + const query = new Sql(SqlClient.POSTGRES, 10)._query( + generateReadJson({ + filters: { + containsAny: { + age: [20, 25], + name: ["John", "Mary"], + }, + }, + }) + ) expect(query).toEqual({ bindings: [10], - sql: `select * from (select * from \"${TABLE_NAME}\" where \"${TABLE_NAME}\".\"age\"::jsonb ?| array [20,25] and \"${TABLE_NAME}\".\"name\"::jsonb ?| array ['John','Mary'] limit $1) as \"${TABLE_NAME}\"` + sql: `select * from (select * from \"${TABLE_NAME}\" where \"${TABLE_NAME}\".\"age\"::jsonb ?| array [20,25] and \"${TABLE_NAME}\".\"name\"::jsonb ?| array ['John','Mary'] limit $1) as \"${TABLE_NAME}\"`, }) }) }) From ba5ed65e0321ba6fa2d6177dbef74766e02fa638 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 1 Sep 2022 11:36:23 +0100 Subject: [PATCH 078/280] Billing and usage page updates to support different kinds of users and plans --- .../builder/src/components/usage/Usage.svelte | 11 +- .../src/components/usage/UsageDashCard.svelte | 18 +- .../builder/portal/settings/usage.svelte | 222 +++++++----------- 3 files changed, 100 insertions(+), 151 deletions(-) diff --git a/packages/builder/src/components/usage/Usage.svelte b/packages/builder/src/components/usage/Usage.svelte index 27383019e8..49c4205a4c 100644 --- a/packages/builder/src/components/usage/Usage.svelte +++ b/packages/builder/src/components/usage/Usage.svelte @@ -1,6 +1,6 @@ - - {#if loaded} - - - Billing - Get information about your current usage and manage your plan - - - - - -
- - {#each staticUsage as usage} -
- -
- {/each} -
-
-
- {#if monthlyUsage.length} -
- - Monthly -
- Resets in {daysRemainingInMonth} days -
-
- - {#each monthlyUsage as usage} -
- -
- {/each} -
-
-
-
- {/if} -
-
+{#if loaded} + + + Usage + Get information about your current usage within Budibase. + {#if accountPortalAccess} + To upgrade your plan and usage limits visit your Account + {:else} + To upgrade your plan and usage limits contact your account holder + {/if} + - {/if} -
+ + + + +
+ + {#each staticUsage as usage} +
+ +
+ {/each} +
+
+
+ {#if monthlyUsage.length} +
+ + Monthly +
+ Resets in {daysRemainingInMonth} days +
+
+ + {#each monthlyUsage as usage} +
+ +
+ {/each} +
+
+
+
+ {/if} +
+
+ +{/if} From 3336dcdaa160112b45aeefc8047b7f0a0f04fc6f Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 1 Sep 2022 12:51:28 +0100 Subject: [PATCH 079/280] Update watch params to use polling and improve speed --- packages/server/src/watch.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/server/src/watch.ts b/packages/server/src/watch.ts index 3d3f4280da..9821d1127b 100644 --- a/packages/server/src/watch.ts +++ b/packages/server/src/watch.ts @@ -11,7 +11,12 @@ export function watch() { chokidar .watch(watchPath, { ignored: "**/node_modules", - awaitWriteFinish: true, + awaitWriteFinish: { + pollInterval: 100, + stabilityThreshold: 250, + }, + usePolling: true, + interval: 250, }) .on("all", async (event: string, path: string) => { // Sanity checks From 72277bd015b57b0a76a9557ff961c91565e62a95 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 1 Sep 2022 14:10:29 +0100 Subject: [PATCH 080/280] Remove extra space --- charts/budibase/templates/app-service-deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/budibase/templates/app-service-deployment.yaml b/charts/budibase/templates/app-service-deployment.yaml index 89bc2e578d..a9bf714c45 100644 --- a/charts/budibase/templates/app-service-deployment.yaml +++ b/charts/budibase/templates/app-service-deployment.yaml @@ -132,7 +132,7 @@ spec: {{ end }} {{ if .Values.globals.pluginsDir }} - name: PLUGINS_DIR - value: { { .Values.globals.pluginsDir | quote }} + value: {{ .Values.globals.pluginsDir | quote }} {{ end }} {{ if .Values.services.apps.nodeDebug }} - name: NODE_DEBUG From 16a505a36f620fa5a2729683dd4ebbc1ad8edccc Mon Sep 17 00:00:00 2001 From: Dean Date: Thu, 1 Sep 2022 15:30:04 +0100 Subject: [PATCH 081/280] Merge commit --- .../pages/builder/portal/apps/index.svelte | 6 +- .../builder/src/stores/portal/licensing.js | 63 ++++++++++++++++++- 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index 13d23f6a51..3bb7050c43 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -20,7 +20,7 @@ import { store, automationStore } from "builderStore" import { API } from "api" import { onMount } from "svelte" - import { apps, auth, admin, templates } from "stores/portal" + import { apps, auth, admin, templates, licensing } from "stores/portal" import download from "downloadjs" import { goto } from "@roxi/routify" import AppRow from "components/start/AppRow.svelte" @@ -243,6 +243,10 @@ notifications.error("Error loading apps and templates") } loaded = true + + //Testing + await licensing.getQuotaUsage() + await licensing.getTestData() }) diff --git a/packages/builder/src/stores/portal/licensing.js b/packages/builder/src/stores/portal/licensing.js index 653dab52ed..40bfcff323 100644 --- a/packages/builder/src/stores/portal/licensing.js +++ b/packages/builder/src/stores/portal/licensing.js @@ -1,5 +1,6 @@ -import { writable } from "svelte/store" +import { writable, get } from "svelte/store" import { API } from "api" +import { auth } from "stores/portal" export const createLicensingStore = () => { const DEFAULT = { @@ -18,6 +19,66 @@ export const createLicensingStore = () => { } }) }, + getTestData: async () => { + const tenantId = get(auth).tenantId + console.log("Tenant ", tenantId) + + const license = get(auth).user.license + console.log("User LICENSE ", license) + + // Pull out the usage. + const quota = get(store).quotaUsage + console.log("Quota usage", quota) + + // Would only initialise the usage elements if the account element is present. + console.log("User account ", get(auth).user.account) + + //separate into functions that pass in both the usage and quota + //easier to test + + const getMonthlyMetrics = (license, quota) => { + return ["sessions", "queries", "automations"].reduce((acc, key) => { + const quotaLimit = license.quotas.usage.monthly[key].value + acc[key] = + quotaLimit > -1 + ? (quota.monthly.current[key] / quotaLimit) * 100 + : -1 + return acc + }, {}) + } + + const getStaticMetrics = (license, quota) => { + return ["apps", "rows"].reduce((acc, key) => { + const quotaLimit = license.quotas.usage.monthly[key].value + acc[key] = + quotaLimit > -1 ? (quota.usageQuota[key] / quotaLimit) * 100 : -1 + return acc + }, {}) + } + + const modQuotaStr = JSON.stringify(quota) + const cloneQuota = JSON.parse(modQuotaStr) + cloneQuota.monthly.current.sessions = 4 + + const monthlyMetrics = getMonthlyMetrics(license, cloneQuota) + const staticMetrics = getStaticMetrics(license, cloneQuota) + + console.log("Monthly Usage Metrics ", monthlyMetrics) + console.log("Static Usage Metrics ", staticMetrics) + + const flagged = Object.keys(monthlyMetrics).filter(key => { + return monthlyMetrics[key] >= 100 + }) + + console.log(flagged) + + // store.update(state => { + // return { + // ...state, + // metrics, + // } + // }) + }, } return { From b29e9be026dfae116ec1c1fdd4e4cb608f8a8c86 Mon Sep 17 00:00:00 2001 From: Mel O'Hagan Date: Thu, 1 Sep 2022 17:21:42 +0100 Subject: [PATCH 082/280] Exclude formula columns from Sql drop column --- packages/server/src/integrations/base/sqlTable.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/integrations/base/sqlTable.ts b/packages/server/src/integrations/base/sqlTable.ts index 4b715e5f3a..af561e81c5 100644 --- a/packages/server/src/integrations/base/sqlTable.ts +++ b/packages/server/src/integrations/base/sqlTable.ts @@ -96,7 +96,9 @@ function generateSchema( const deletedColumns = Object.entries(oldTable.schema) .filter( ([key, schema]) => - schema.type !== FieldTypes.LINK && table.schema[key] == null + schema.type !== FieldTypes.LINK && + schema.type !== FieldTypes.FORMULA && + table.schema[key] == null ) .map(([key]) => key) deletedColumns.forEach(key => { From 54eed13541f4075547b8fcc7081c8616d8938b4b Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Thu, 1 Sep 2022 20:04:45 +0100 Subject: [PATCH 083/280] create plugin github public and private --- packages/builder/src/stores/portal/plugins.js | 4 +- packages/server/src/api/controllers/plugin.ts | 6 +- .../server/src/utilities/fileSystem/index.js | 65 ++++++++++++++++++- 3 files changed, 71 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/stores/portal/plugins.js b/packages/builder/src/stores/portal/plugins.js index a498bf663a..821934307d 100644 --- a/packages/builder/src/stores/portal/plugins.js +++ b/packages/builder/src/stores/portal/plugins.js @@ -32,10 +32,12 @@ export function createPluginsStore() { case "npm": pluginData.npmToken = auth break + case "github": + pluginData.githubToken = auth + break } let res = await API.createPlugin(pluginData) - console.log("RESP", res) let newPlugin = res.plugins[0] update(state => { diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index 26caf38806..1159b08dce 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -3,6 +3,7 @@ import { extractPluginTarball, createNpmPlugin, createUrlPlugin, + createGithubPlugin, } from "../../utilities/fileSystem" import { getGlobalDB } from "@budibase/backend-core/tenancy" import { generatePluginID, getPluginParams } from "../../db/utils" @@ -61,7 +62,10 @@ export async function create(ctx: any) { directory = directoryNpm break case "github": - console.log("github") + const { metadata: metadataGithub, directory: directoryGithub } = + await createGithubPlugin(ctx, url, name, githubToken) + metadata = metadataGithub + directory = directoryGithub break case "url": const { metadata: metadataUrl, directory: directoryUrl } = diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index 710e3c0294..d8c201a380 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -31,6 +31,7 @@ const MemoryStream = require("memorystream") const { getAppId } = require("@budibase/backend-core/context") const tar = require("tar") const fetch = require("node-fetch") +const { NodeVM } = require("vm2") const TOP_LEVEL_PATH = join(__dirname, "..", "..", "..") const NODE_MODULES_PATH = join(TOP_LEVEL_PATH, "node_modules") @@ -378,8 +379,69 @@ exports.createUrlPlugin = async (url, name = "", headers = {}) => { return await downloadUnzipPlugin(name, url, headers) } +exports.createGithubPlugin = async (ctx, url, name = "", token = "") => { + let githubRepositoryUrl + let githubUrl + + if (url.includes(".git")) { + githubRepositoryUrl = token + ? url.replace("https://", `https://${token}@`) + : url + githubUrl = url.replace(".git", "") + } else { + githubRepositoryUrl = token + ? `${url}.git`.replace("https://", `https://${token}@`) + : `${url}.git` + githubUrl = url + } + + const githubApiUrl = githubUrl.replace( + "https://github.com/", + "https://api.github.com/repos/" + ) + const headers = token ? { Authorization: `Bearer ${token}` } : {} + try { + const pluginRaw = await fetch(githubApiUrl, { headers }) + if (pluginRaw.status !== 200) { + throw `Repository not found` + } + + let pluginDetails = await pluginRaw.json() + const pluginName = pluginDetails.name || name + + const path = join(budibaseTempDir(), pluginName) + // Remove first if exists + if (fs.existsSync(path)) { + fs.rmSync(path, { recursive: true, force: true }) + } + fs.mkdirSync(path) + + const script = ` +module.exports = async () => { + const child_process = require('child_process') + child_process.execSync(\`git clone ${githubRepositoryUrl} ${join( + budibaseTempDir(), + pluginName + )}\`); +} +` + const scriptRunner = new NodeVM({ + require: { + external: true, + builtin: ["child_process"], + root: "./", + }, + }).run(script) + + await scriptRunner() + + return await getPluginMetadata(path) + } catch (e) { + throw e.message + } +} + const downloadUnzipPlugin = async (name, url, headers = {}) => { - console.log(name, url, headers) const path = join(budibaseTempDir(), name) try { // Remove first if exists @@ -407,7 +469,6 @@ const downloadUnzipPlugin = async (name, url, headers = {}) => { exports.downloadUnzipPlugin = downloadUnzipPlugin const getPluginMetadata = async path => { - console.log(path) let metadata = {} try { const pkg = fs.readFileSync(join(path, "package.json"), "utf8") From 28aaaf96617ae1dfe254cf3e0441ecd6d9647b22 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 2 Sep 2022 11:48:45 +0100 Subject: [PATCH 084/280] Update vite path for proxying websocket to be /vite --- hosting/nginx.dev.conf.hbs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosting/nginx.dev.conf.hbs b/hosting/nginx.dev.conf.hbs index ecf73c4fb1..430ea75398 100644 --- a/hosting/nginx.dev.conf.hbs +++ b/hosting/nginx.dev.conf.hbs @@ -84,9 +84,9 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } - location /ws { + location /vite { proxy_pass http://{{ address }}:3000; - rewrite ^/ws(.*)$ /$1 break; + rewrite ^/vite(.*)$ /$1 break; } location / { From cc50f696ff37cbea18cd1c42971feba4c9952331 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 2 Sep 2022 12:04:18 +0100 Subject: [PATCH 085/280] Remove logs --- packages/client/src/websocket.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/client/src/websocket.js b/packages/client/src/websocket.js index 1a4ee49a92..eb859933f7 100644 --- a/packages/client/src/websocket.js +++ b/packages/client/src/websocket.js @@ -15,7 +15,6 @@ export const initWebsocket = () => { const proto = tls ? "wss:" : "ws:" const host = location.hostname const port = location.port || (tls ? 443 : 80) - console.log(`${proto}//${host}:${port}`) const socket = io(`${proto}//${host}:${port}`, { path: "/socket/client", }) From a794e19dfc036acbeeaec14d85b1f6a39305d650 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 2 Sep 2022 12:26:30 +0100 Subject: [PATCH 086/280] Update nginx confs and add to single image --- hosting/nginx.dev.conf.hbs | 3 +-- hosting/nginx.prod.conf.hbs | 9 +++++++++ hosting/single/nginx/nginx-default-site.conf | 9 +++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/hosting/nginx.dev.conf.hbs b/hosting/nginx.dev.conf.hbs index 778dc9dacd..7faa92e38a 100644 --- a/hosting/nginx.dev.conf.hbs +++ b/hosting/nginx.dev.conf.hbs @@ -90,13 +90,12 @@ http { } location /socket/ { - proxy_pass http://{{ address }}:4001; - proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; + proxy_pass http://{{ address }}:4001; } location / { diff --git a/hosting/nginx.prod.conf.hbs b/hosting/nginx.prod.conf.hbs index 5ecea67c42..5b69d2ab5c 100644 --- a/hosting/nginx.prod.conf.hbs +++ b/hosting/nginx.prod.conf.hbs @@ -162,6 +162,15 @@ http { rewrite ^/db/(.*)$ /$1 break; } + location /socket/ { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_pass http://$apps:4002; + } + location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/hosting/single/nginx/nginx-default-site.conf b/hosting/single/nginx/nginx-default-site.conf index c0d80a0185..bd89e21251 100644 --- a/hosting/single/nginx/nginx-default-site.conf +++ b/hosting/single/nginx/nginx-default-site.conf @@ -66,6 +66,15 @@ server { rewrite ^/db/(.*)$ /$1 break; } + location /socket/ { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + proxy_pass http://127.0.0.1:4001; + } + location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; From 5a08834def2c5ff8ec6804c91d2868896789e238 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 2 Sep 2022 19:16:13 +0100 Subject: [PATCH 087/280] delete plugin through modal confirmation --- .../_components/DeletePluginModal.svelte | 31 +++++++++++++++++++ .../plugins/_components/PluginRow.svelte | 16 +++++++--- .../portal/manage/plugins/index.svelte | 16 +++++++++- 3 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 packages/builder/src/pages/builder/portal/manage/plugins/_components/DeletePluginModal.svelte diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/DeletePluginModal.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/DeletePluginModal.svelte new file mode 100644 index 0000000000..3907c1a0a2 --- /dev/null +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/DeletePluginModal.svelte @@ -0,0 +1,31 @@ + + + + + Are you sure you want to delete {plugin?.name} + + diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte index 3a92a699e6..9c166b8b1b 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte @@ -1,6 +1,8 @@
@@ -41,9 +51,7 @@ - plugins.deletePlugin(plugin._id, plugin._rev)} - icon="Delete">Delete remove(plugin)} icon="Delete">Delete editGroup(plugin)} icon="Edit">Edit diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte index 61227786b0..489333b095 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte @@ -13,9 +13,12 @@ import { plugins } from "stores/portal" import PluginRow from "./_components/PluginRow.svelte" import AddPluginModal from "./_components/AddPluginModal.svelte" + import DeletePluginModal from "./_components/DeletePluginModal.svelte" let modal + let deleteModal let searchTerm = "" + let removePlugin let filterOptions = [ { label: "All Plugins", value: "all" }, @@ -31,6 +34,14 @@ .filter(plugin => plugin?.name?.toLowerCase().includes(searchTerm.toLowerCase()) ) + + const deletePlugin = evt => { + const { detail } = evt + + deleteModal.show() + removePlugin = detail + } + onMount(async () => { await plugins.load() }) @@ -66,7 +77,7 @@ {#if $plugins} {#each filteredPlugins as plugin} - + {/each} {/if} @@ -75,6 +86,9 @@ + + + From 32b336cc2ddf2749b419a29d1883e95a68419feb Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Mon, 5 Sep 2022 10:13:55 +0100 Subject: [PATCH 097/280] cleaning minio folder when deleting plugin --- packages/server/src/api/controllers/plugin.ts | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index 337df0fc9e..8ec898d67d 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -4,11 +4,14 @@ import { createNpmPlugin, createUrlPlugin, createGithubPlugin, - loadJSFile + loadJSFile, } from "../../utilities/fileSystem" import { getGlobalDB } from "@budibase/backend-core/tenancy" import { generatePluginID, getPluginParams } from "../../db/utils" -import { uploadDirectory } from "@budibase/backend-core/objectStore" +import { + uploadDirectory, + deleteFolder, +} from "@budibase/backend-core/objectStore" import { PluginType, FileType } from "@budibase/types" import env from "../../environment" @@ -98,7 +101,20 @@ export async function fetch(ctx: any) { export async function destroy(ctx: any) { const db = getGlobalDB() - await db.remove(ctx.params.pluginId, ctx.params.pluginRev) + const { pluginId, pluginRev } = ctx.params + + try { + const plugin = await db.get(pluginId) + const bucketPath = `${plugin.name}/` + await deleteFolder(ObjectStoreBuckets.PLUGINS, bucketPath) + + await db.remove(pluginId, pluginRev) + } catch (err: any) { + const errMsg = err?.message ? err?.message : err + + ctx.throw(400, `Failed to delete plugin: ${errMsg}`) + } + ctx.message = `Plugin ${ctx.params.pluginId} deleted.` ctx.status = 200 } From a03d007821ea3224f21edfb692ee15c6355059eb Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Mon, 5 Sep 2022 10:28:09 +0100 Subject: [PATCH 098/280] random name in case it is needed --- packages/server/src/api/controllers/plugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index 8ec898d67d..254a008781 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -55,9 +55,11 @@ export async function upload(ctx: any) { } export async function create(ctx: any) { - const { type, source, name, url, headers, githubToken } = ctx.request.body + const { type, source, url, headers, githubToken } = ctx.request.body let metadata let directory + // Generating random name as a backup and needed for url + let name = "PLUGIN_" + Math.floor(100000 + Math.random() * 900000) switch (source) { case "npm": From cb4b918e5a3cf79733f306c9db305d81a101ad47 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 5 Sep 2022 11:27:43 +0100 Subject: [PATCH 099/280] remove name selection from UI --- packages/bbui/src/Modal/ModalContent.svelte | 2 +- .../plugins/_components/AddPluginModal.svelte | 1 + .../manage/plugins/_components/PluginRow.svelte | 14 ++++---------- packages/builder/src/stores/portal/plugins.js | 3 +-- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/packages/bbui/src/Modal/ModalContent.svelte b/packages/bbui/src/Modal/ModalContent.svelte index 4c70f2390a..d946268da6 100644 --- a/packages/bbui/src/Modal/ModalContent.svelte +++ b/packages/bbui/src/Modal/ModalContent.svelte @@ -88,7 +88,7 @@
- {#if showCancelButton || showConfirmButton} + {#if showCancelButton || showConfirmButton || $$slots.footer}
diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte index 7149136dec..2ccc9283e9 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte @@ -92,6 +92,7 @@ { if (!e.detail || e.detail.length === 0) { diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte index 0eabad111a..30fddb2f76 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte @@ -8,9 +8,9 @@ Label, Input, } from "@budibase/bbui" - import { plugins } from "stores/portal" export let plugin + export let deletePlugin let detailsModal @@ -74,17 +74,11 @@
diff --git a/packages/builder/src/stores/portal/plugins.js b/packages/builder/src/stores/portal/plugins.js index 821934307d..9d558561b6 100644 --- a/packages/builder/src/stores/portal/plugins.js +++ b/packages/builder/src/stores/portal/plugins.js @@ -17,11 +17,10 @@ export function createPluginsStore() { }) } - async function createPlugin(type, source, name, url, auth = null) { + async function createPlugin(type, source, url, auth = null) { let pluginData = { type, source, - name, url, } From 3f3f792c6589ae523baf1153ba2acf77808c92d9 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Sep 2022 11:27:59 +0000 Subject: [PATCH 100/280] v1.3.4-alpha.1 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 4 ++-- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/lerna.json b/lerna.json index 2c00056102..70a4e77a28 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 098ba87298..b5765805cd 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "1.3.4-alpha.0", + "@budibase/types": "1.3.4-alpha.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", "bcrypt": "5.0.1", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 9602a4f464..181c2ac0a8 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "1.3.4-alpha.0", + "@budibase/string-templates": "1.3.4-alpha.1", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index d638331f62..f66178cf58 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "1.3.4-alpha.0", - "@budibase/client": "1.3.4-alpha.0", - "@budibase/frontend-core": "1.3.4-alpha.0", - "@budibase/string-templates": "1.3.4-alpha.0", + "@budibase/bbui": "1.3.4-alpha.1", + "@budibase/client": "1.3.4-alpha.1", + "@budibase/frontend-core": "1.3.4-alpha.1", + "@budibase/string-templates": "1.3.4-alpha.1", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 72b1ed90c6..9f3c45c2e6 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,7 +26,7 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "1.3.4-alpha.0", + "@budibase/backend-core": "1.3.4-alpha.1", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 4f5c5a0552..f5f4af13d6 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "1.3.4-alpha.0", - "@budibase/frontend-core": "1.3.4-alpha.0", - "@budibase/string-templates": "1.3.4-alpha.0", + "@budibase/bbui": "1.3.4-alpha.1", + "@budibase/frontend-core": "1.3.4-alpha.1", + "@budibase/string-templates": "1.3.4-alpha.1", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 91c6f1807f..e894018bd7 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "1.3.4-alpha.0", + "@budibase/bbui": "1.3.4-alpha.1", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 87391f472a..f56e50dc1f 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "1.3.4-alpha.0", - "@budibase/client": "1.3.4-alpha.0", + "@budibase/backend-core": "1.3.4-alpha.1", + "@budibase/client": "1.3.4-alpha.1", "@budibase/pro": "1.3.4-alpha.0", - "@budibase/string-templates": "1.3.4-alpha.0", - "@budibase/types": "1.3.4-alpha.0", + "@budibase/string-templates": "1.3.4-alpha.1", + "@budibase/types": "1.3.4-alpha.1", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 2d5a300586..329d78894d 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 1b6b12e87d..941860a34e 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index cd3d783f58..2c73c8d881 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.3.4-alpha.0", + "version": "1.3.4-alpha.1", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -35,10 +35,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "1.3.4-alpha.0", + "@budibase/backend-core": "1.3.4-alpha.1", "@budibase/pro": "1.3.4-alpha.0", - "@budibase/string-templates": "1.3.4-alpha.0", - "@budibase/types": "1.3.4-alpha.0", + "@budibase/string-templates": "1.3.4-alpha.1", + "@budibase/types": "1.3.4-alpha.1", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 1ab8ffa687d97a46c8c29cdcc54ae6c0c96d764c Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 5 Sep 2022 11:31:57 +0000 Subject: [PATCH 101/280] Update pro version to 1.3.4-alpha.1 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index f56e50dc1f..002328863b 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.3.4-alpha.1", "@budibase/client": "1.3.4-alpha.1", - "@budibase/pro": "1.3.4-alpha.0", + "@budibase/pro": "1.3.4-alpha.1", "@budibase/string-templates": "1.3.4-alpha.1", "@budibase/types": "1.3.4-alpha.1", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 15bb54baab..5e5fd1d7b9 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.3.4-alpha.0": - version "1.3.4-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.4-alpha.0.tgz#630120bbbbeda7e13edc2d3ef878088d64fbdba5" - integrity sha512-LzAnOM06f0nDY76bgLjQuL2ChSOdhLg1zLPnwK07OEfQ9w8ZkkhNwJC/7/FAnnNEMypnKezrxXfhqee341JPZA== +"@budibase/backend-core@1.3.4-alpha.1": + version "1.3.4-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.4-alpha.1.tgz#5c7547bdf22da936ab6fea8c5fc3ad1b9d54a910" + integrity sha512-TH4AyFm31kduVYdciw0TLhkGbilSi6vtE2h0qbnr5QV8SszZ8iKt3vUljTHS0PsH2V/S7qLQVEqZ2blkpRHO0A== dependencies: - "@budibase/types" "1.3.4-alpha.0" + "@budibase/types" "1.3.4-alpha.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -1178,13 +1178,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.3.4-alpha.0": - version "1.3.4-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.4-alpha.0.tgz#37af17330c85131be1d2fe3cb5ef9c15bb46ab0a" - integrity sha512-2hM/wXP2UrG52tlnoABdSnEMlk2edEjZF+FdYJGmJWGPkXhfI5sWV6B9a0+v9lH/xazj7Pv0XKdfe/IpfapLyQ== +"@budibase/pro@1.3.4-alpha.1": + version "1.3.4-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.4-alpha.1.tgz#fa58c6a0e58d620ddd329389ae896b823a4dd50e" + integrity sha512-e8dReYYw+weqYYAQC0zkatBgACaXcbM71kneUTYaX7DnYg7WGY3EHyfajjlQXq+gxmVuXc6wkY28dIozG+/8TQ== dependencies: - "@budibase/backend-core" "1.3.4-alpha.0" - "@budibase/types" "1.3.4-alpha.0" + "@budibase/backend-core" "1.3.4-alpha.1" + "@budibase/types" "1.3.4-alpha.1" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1207,10 +1207,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.3.4-alpha.0": - version "1.3.4-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.4-alpha.0.tgz#954a99cb10e564d8a28e789eced870f7602f092b" - integrity sha512-SXJ3kMBpsIVzXqux3z5X/L4IM5QhhrGNcS03k8pKpfqr5yoDwH+P5S2rAc0qZ7YgqlTBP9TVfzaJntWAc9YtQQ== +"@budibase/types@1.3.4-alpha.1": + version "1.3.4-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.4-alpha.1.tgz#e75aaf70b5c5a3e7b9fde6f77cb91447dffe0d2d" + integrity sha512-DpjO3bkPiOCDtIsvPWU4p6SGBAsN80vtr7zz3Cjrv7p98050fWzkUBPAISOTCWTq59OpF6dUhmMmOQuN6OrK+g== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 2c73c8d881..8f6d362a0e 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.3.4-alpha.1", - "@budibase/pro": "1.3.4-alpha.0", + "@budibase/pro": "1.3.4-alpha.1", "@budibase/string-templates": "1.3.4-alpha.1", "@budibase/types": "1.3.4-alpha.1", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index e8b842ac72..4098129265 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,12 +291,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.3.4-alpha.0": - version "1.3.4-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.4-alpha.0.tgz#630120bbbbeda7e13edc2d3ef878088d64fbdba5" - integrity sha512-LzAnOM06f0nDY76bgLjQuL2ChSOdhLg1zLPnwK07OEfQ9w8ZkkhNwJC/7/FAnnNEMypnKezrxXfhqee341JPZA== +"@budibase/backend-core@1.3.4-alpha.1": + version "1.3.4-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.4-alpha.1.tgz#5c7547bdf22da936ab6fea8c5fc3ad1b9d54a910" + integrity sha512-TH4AyFm31kduVYdciw0TLhkGbilSi6vtE2h0qbnr5QV8SszZ8iKt3vUljTHS0PsH2V/S7qLQVEqZ2blkpRHO0A== dependencies: - "@budibase/types" "1.3.4-alpha.0" + "@budibase/types" "1.3.4-alpha.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" bcrypt "5.0.1" @@ -325,21 +325,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.3.4-alpha.0": - version "1.3.4-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.4-alpha.0.tgz#37af17330c85131be1d2fe3cb5ef9c15bb46ab0a" - integrity sha512-2hM/wXP2UrG52tlnoABdSnEMlk2edEjZF+FdYJGmJWGPkXhfI5sWV6B9a0+v9lH/xazj7Pv0XKdfe/IpfapLyQ== +"@budibase/pro@1.3.4-alpha.1": + version "1.3.4-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.4-alpha.1.tgz#fa58c6a0e58d620ddd329389ae896b823a4dd50e" + integrity sha512-e8dReYYw+weqYYAQC0zkatBgACaXcbM71kneUTYaX7DnYg7WGY3EHyfajjlQXq+gxmVuXc6wkY28dIozG+/8TQ== dependencies: - "@budibase/backend-core" "1.3.4-alpha.0" - "@budibase/types" "1.3.4-alpha.0" + "@budibase/backend-core" "1.3.4-alpha.1" + "@budibase/types" "1.3.4-alpha.1" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.3.4-alpha.0": - version "1.3.4-alpha.0" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.4-alpha.0.tgz#954a99cb10e564d8a28e789eced870f7602f092b" - integrity sha512-SXJ3kMBpsIVzXqux3z5X/L4IM5QhhrGNcS03k8pKpfqr5yoDwH+P5S2rAc0qZ7YgqlTBP9TVfzaJntWAc9YtQQ== +"@budibase/types@1.3.4-alpha.1": + version "1.3.4-alpha.1" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.4-alpha.1.tgz#e75aaf70b5c5a3e7b9fde6f77cb91447dffe0d2d" + integrity sha512-DpjO3bkPiOCDtIsvPWU4p6SGBAsN80vtr7zz3Cjrv7p98050fWzkUBPAISOTCWTq59OpF6dUhmMmOQuN6OrK+g== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From 88bc74f68b306af54fb907379e120f53c1969af2 Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Mon, 5 Sep 2022 13:48:37 +0100 Subject: [PATCH 102/280] Cypress: Smoke Build: Test Changes createComponents - Updated how the test gets nav-items from the side nav bar commands - Updating maximum timeout value for cy.visit instances (this seems specific to the CI runs) - Updated createUser command to ensure better timing between the create user modals --- .../integration/createComponents.spec.js | 14 +++++------ packages/builder/cypress/support/commands.js | 25 +++++++++++-------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/packages/builder/cypress/integration/createComponents.spec.js b/packages/builder/cypress/integration/createComponents.spec.js index 649a77e442..e39ce4a4a8 100644 --- a/packages/builder/cypress/integration/createComponents.spec.js +++ b/packages/builder/cypress/integration/createComponents.spec.js @@ -20,7 +20,7 @@ filterTests(["all"], () => { //Use the tree to delete a selected component const deleteSelectedComponent = () => { cy.get( - ".nav-items-container .nav-item.selected .actions > div > .icon" + ".nav-item.selected .actions > div > .icon" ).click({ force: true, }) @@ -91,7 +91,7 @@ filterTests(["all"], () => { cy.searchAndAddComponent("Paragraph").then(componentId => { cy.get("[data-cy=setting-_instanceName] input").type(componentId).blur() cy.get( - ".nav-items-container .nav-item.selected .actions > div > .icon" + ".nav-item.selected .actions > div > .icon" ).click({ force: true, }) @@ -145,7 +145,7 @@ filterTests(["all"], () => { return testFieldFocusOnCreate(label) }) .then(() => { - cy.get(".nav-items-container .nav-item") + cy.get(".nav-item") .contains(formId) .click({ force: true }) deleteSelectedComponent() @@ -195,7 +195,7 @@ filterTests(["all"], () => { return testFocusOnCreate(label) }) .then(() => { - cy.get(".nav-items-container .nav-item") + cy.get(".nav-item") .contains(providerId) .click({ force: true }) deleteSelectedComponent() @@ -218,7 +218,7 @@ filterTests(["all"], () => { .find(".component-placeholder") .should("not.exist") cy.getComponent(imageId).find(`img[alt=${imageId}]`).should("exist") - cy.get(".nav-items-container .nav-item") + cy.get(".nav-item") .contains(imageId) .click({ force: true }) deleteSelectedComponent() @@ -242,7 +242,7 @@ filterTests(["all"], () => { cy.getComponent(markdownId) .find(".editor-preview-full h1") .contains("Hi") - cy.get(".nav-items-container .nav-item") + cy.get(".nav-item") .contains(markdownId) .click({ force: true }) deleteSelectedComponent() @@ -265,7 +265,7 @@ filterTests(["all"], () => { .find(".component-placeholder") .should("not.exist") cy.getComponent(iconId).find("i.ri-save-fill").should("exist") - cy.get(".nav-items-container .nav-item") + cy.get(".nav-item") .contains(iconId) .click({ force: true }) deleteSelectedComponent() diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index d4b0ec80e8..394d5e9af2 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -4,7 +4,7 @@ Cypress.on("uncaught:exception", () => { // ACCOUNTS & USERS Cypress.Commands.add("login", (email, password) => { - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 }) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 }) cy.url() .should("include", "/builder/") .then(url => { @@ -33,7 +33,7 @@ Cypress.Commands.add("login", (email, password) => { }) Cypress.Commands.add("logOut", () => { - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 2000 }) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 }) cy.get(".user-dropdown .avatar > .icon").click({ force: true }) cy.get(".spectrum-Popover[data-cy='user-menu']").within(() => { cy.get("li[data-cy='user-logout']").click({ force: true }) @@ -43,7 +43,7 @@ Cypress.Commands.add("logOut", () => { Cypress.Commands.add("logoutNoAppGrid", () => { // Logs user out when app grid is not present - cy.visit(`${Cypress.config().baseUrl}/builder`) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 }) cy.get(".avatar > .icon").click({ force: true }) cy.get(".spectrum-Popover[data-cy='user-menu']").within(() => { cy.get(".spectrum-Menu-item").contains("Log out").click({ force: true }) @@ -68,11 +68,14 @@ Cypress.Commands.add("createUser", (email, permission) => { .click({ force: true }) }) } - // Add user and wait for modal to change - cy.get(".spectrum-Button").contains("Add user").click({ force: true }) + // Add user + cy.get(".spectrum-Button").contains("Add users").click({ force: true }) cy.get(".spectrum-ActionButton").contains("Add email").should("not.exist") }) // Onboarding modal + cy.get(".spectrum-Dialog-grid", { timeout: 5000 }).contains( + "Choose your onboarding" + ) cy.get(".spectrum-Dialog-grid").within(() => { cy.get(".onboarding-type").eq(1).click() cy.get(".spectrum-Button").contains("Done").click({ force: true }) @@ -163,7 +166,7 @@ Cypress.Commands.add("createApp", (name, addDefaultTable) => { const shouldCreateDefaultTable = typeof addDefaultTable != "boolean" ? true : addDefaultTable - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 }) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 }) cy.url({ timeout: 30000 }).should("include", "/apps") cy.get(`[data-cy="create-app-btn"]`, { timeout: 5000 }).click({ force: true }) @@ -197,7 +200,7 @@ Cypress.Commands.add("createApp", (name, addDefaultTable) => { }) Cypress.Commands.add("deleteApp", name => { - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 }) cy.wait(2000) cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`) .its("body") @@ -254,7 +257,7 @@ Cypress.Commands.add("deleteApp", name => { }) Cypress.Commands.add("deleteAllApps", () => { - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 }) cy.wait(500) cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`, { timeout: 5000, @@ -351,7 +354,7 @@ Cypress.Commands.add("alterAppVersion", (appId, version) => { }) Cypress.Commands.add("importApp", (exportFilePath, name) => { - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 5000 }) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 }) cy.request(`${Cypress.config().baseUrl}/api/applications?status=all`) .its("body") @@ -386,7 +389,7 @@ Cypress.Commands.add("importApp", (exportFilePath, name) => { // Filters visible with 1 or more Cypress.Commands.add("searchForApplication", appName => { - cy.visit(`${Cypress.config().baseUrl}/builder`) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 }) cy.wait(2000) // No app filter functionality if only 1 app exists @@ -409,7 +412,7 @@ Cypress.Commands.add("searchForApplication", appName => { // Assumes there are no others Cypress.Commands.add("applicationInAppTable", appName => { - cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 10000 }) + cy.visit(`${Cypress.config().baseUrl}/builder`, { timeout: 30000 }) cy.get(".appTable", { timeout: 5000 }).within(() => { cy.get(".title").contains(appName).should("exist") }) From f37c8e0b8818951e776fcb6bb8c01aacddce5d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9F?= Date: Wed, 23 Feb 2022 16:26:09 +0100 Subject: [PATCH 103/280] allow specifying resources on app, worker, proxy deployments --- charts/budibase/templates/app-service-deployment.yaml | 5 ++++- charts/budibase/templates/proxy-service-deployment.yaml | 5 ++++- charts/budibase/templates/worker-service-deployment.yaml | 5 ++++- charts/budibase/values.yaml | 3 +++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/charts/budibase/templates/app-service-deployment.yaml b/charts/budibase/templates/app-service-deployment.yaml index 74b98ac008..422097e699 100644 --- a/charts/budibase/templates/app-service-deployment.yaml +++ b/charts/budibase/templates/app-service-deployment.yaml @@ -158,7 +158,10 @@ spec: name: bbapps ports: - containerPort: {{ .Values.services.apps.port }} - resources: {} + {{ with .Values.services.apps.resources }} + resources: + {{- toYaml . | nindent 10 }} + {{ end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/charts/budibase/templates/proxy-service-deployment.yaml b/charts/budibase/templates/proxy-service-deployment.yaml index 505a46f1e8..5588022032 100644 --- a/charts/budibase/templates/proxy-service-deployment.yaml +++ b/charts/budibase/templates/proxy-service-deployment.yaml @@ -30,7 +30,10 @@ spec: name: proxy-service ports: - containerPort: {{ .Values.services.proxy.port }} - resources: {} + {{ with .Values.services.proxy.resources }} + resources: + {{- toYaml . | nindent 10 }} + {{ end }} volumeMounts: {{- with .Values.affinity }} affinity: diff --git a/charts/budibase/templates/worker-service-deployment.yaml b/charts/budibase/templates/worker-service-deployment.yaml index 083231eeff..902e9ac03d 100644 --- a/charts/budibase/templates/worker-service-deployment.yaml +++ b/charts/budibase/templates/worker-service-deployment.yaml @@ -151,7 +151,10 @@ spec: name: bbworker ports: - containerPort: {{ .Values.services.worker.port }} - resources: {} + {{ with .Values.services.worker.resources }} + resources: + {{- toYaml . | nindent 10 }} + {{ end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index 9b5e76d0d7..0ebf625abd 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -125,16 +125,19 @@ services: proxy: port: 10000 replicaCount: 1 + resources: {} apps: port: 4002 replicaCount: 1 logLevel: info + resources: {} # nodeDebug: "" # set the value of NODE_DEBUG worker: port: 4003 replicaCount: 1 + resources: {} couchdb: enabled: true From 1057eab83a7d70e017a93e11fc902d65123831a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9F?= Date: Mon, 29 Aug 2022 13:51:08 +0200 Subject: [PATCH 104/280] allow specifying resources on minio, redis deployments --- charts/budibase/templates/minio-service-deployment.yaml | 5 ++++- charts/budibase/templates/redis-service-deployment.yaml | 5 ++++- charts/budibase/values.yaml | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/budibase/templates/minio-service-deployment.yaml b/charts/budibase/templates/minio-service-deployment.yaml index 103f9e3ed2..144dbe539a 100644 --- a/charts/budibase/templates/minio-service-deployment.yaml +++ b/charts/budibase/templates/minio-service-deployment.yaml @@ -56,7 +56,10 @@ spec: name: minio-service ports: - containerPort: {{ .Values.services.objectStore.port }} - resources: {} + {{ with .Values.services.objectStore.resources }} + resources: + {{- toYaml . | nindent 10 }} + {{ end }} volumeMounts: - mountPath: /data name: minio-data diff --git a/charts/budibase/templates/redis-service-deployment.yaml b/charts/budibase/templates/redis-service-deployment.yaml index 6e09346cad..d94e4d70f8 100644 --- a/charts/budibase/templates/redis-service-deployment.yaml +++ b/charts/budibase/templates/redis-service-deployment.yaml @@ -35,7 +35,10 @@ spec: name: redis-service ports: - containerPort: {{ .Values.services.redis.port }} - resources: {} + {{ with .Values.services.redis.resources }} + resources: + {{- toYaml . | nindent 10 }} + {{ end }} volumeMounts: - mountPath: /data name: redis-data diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index 0ebf625abd..950a2f838e 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -164,6 +164,7 @@ services: ## If undefined (the default) or set to null, no storageClassName spec is ## set, choosing the default provisioner. storageClass: "" + resources: {} objectStore: minio: true @@ -180,6 +181,7 @@ services: ## If undefined (the default) or set to null, no storageClassName spec is ## set, choosing the default provisioner. storageClass: "" + resources: {} # Override values in couchDB subchart couchdb: From de62475d93c0bd2f0c99f301e3c1b71ad900e8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9F?= Date: Mon, 29 Aug 2022 13:52:45 +0200 Subject: [PATCH 105/280] allow specifying resources on couchdb-backup deployment --- charts/budibase/templates/couchdb-backup.yaml | 5 ++++- charts/budibase/values.yaml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/budibase/templates/couchdb-backup.yaml b/charts/budibase/templates/couchdb-backup.yaml index ae062475ce..68e5eab617 100644 --- a/charts/budibase/templates/couchdb-backup.yaml +++ b/charts/budibase/templates/couchdb-backup.yaml @@ -38,7 +38,10 @@ spec: image: redgeoff/replicate-couchdb-cluster imagePullPolicy: Always name: couchdb-backup - resources: {} + {{ with .Values.services.couchdb.backup.resources }} + resources: + {{- toYaml . | nindent 10 }} + {{ end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index 950a2f838e..14c18205df 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -151,6 +151,7 @@ services: target: "" # backup interval in seconds interval: "" + resources: {} redis: enabled: true # disable if using external redis From 3e2b98c97926687345a1df5f26b0b316690fcf69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9F?= Date: Mon, 29 Aug 2022 13:54:21 +0200 Subject: [PATCH 106/280] remove unused value from chart defaults --- charts/budibase/values.yaml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index 14c18205df..a15504d58c 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -60,19 +60,6 @@ ingress: port: number: 10000 -resources: - {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - autoscaling: enabled: false minReplicas: 1 From 5ad21ad3332bc21ad75cab0045c8d1df198e027f Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Mon, 5 Sep 2022 14:39:19 +0100 Subject: [PATCH 107/280] improve responsiveness of plugins ui --- .../plugins/_components/PluginRow.svelte | 27 +++++++++++++------ packages/server/src/api/controllers/plugin.ts | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte index 30fddb2f76..848611c248 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte @@ -12,6 +12,11 @@ export let plugin export let deletePlugin + let icon = + plugin.schema.type === "component" + ? plugin.schema.schema.icon || "Book" + : plugin.schema.schema.icon || "Beaker" + let detailsModal @@ -19,7 +24,7 @@
- +
-
+
+ + +
+ +
-
+
-
+
-
+
-
+
@@ -88,7 +99,7 @@ diff --git a/packages/builder/src/stores/portal/plugins.js b/packages/builder/src/stores/portal/plugins.js index a3d62ca6e3..9703b30cb7 100644 --- a/packages/builder/src/stores/portal/plugins.js +++ b/packages/builder/src/stores/portal/plugins.js @@ -50,11 +50,11 @@ export function createPluginsStore() { }) } - async function uploadPlugin(file, source) { + async function uploadPlugin(file, source, updatePlugin) { let data = new FormData() data.append("file", file) data.append("source", source) - + data.append("update", updatePlugin) let resp = await API.uploadPlugin(data) let newPlugin = resp.plugins[0] update(state => { diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index ce35d2fad5..a84a077b33 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -39,7 +39,11 @@ export async function upload(ctx: any) { let docs = [] // can do single or multiple plugins for (let plugin of plugins) { - const doc = await processPlugin(plugin, ctx.request.body.source) + const doc = await processPlugin( + plugin, + ctx.request.body.source, + ctx.request.body.update + ) docs.push(doc) } ctx.body = { @@ -128,7 +132,8 @@ export async function destroy(ctx: any) { export async function storePlugin( metadata: any, directory: any, - source?: string + source?: string, + update?: boolean ) { const db = getGlobalDB() const version = metadata.package.version, @@ -167,6 +172,9 @@ export async function storePlugin( const existing = await db.get(pluginId) rev = existing._rev } catch (err) { + if (update) { + throw new Error("Unable to update. Plugin does not exist") + } rev = undefined } let doc = { @@ -185,6 +193,7 @@ export async function storePlugin( source, } } + const response = await db.put(doc) return { ...doc, @@ -192,11 +201,15 @@ export async function storePlugin( } } -export async function processPlugin(plugin: FileType, source?: string) { +export async function processPlugin( + plugin: FileType, + source?: string, + update?: boolean +) { if (!env.SELF_HOSTED) { throw new Error("Plugins not supported outside of self-host.") } const { metadata, directory } = await uploadedFilePlugin(plugin) - return await storePlugin(metadata, directory, source) + return await storePlugin(metadata, directory, source, update) } From 535007de2cb311e8182728577037c2083cbd6df2 Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Wed, 7 Sep 2022 13:52:05 +0100 Subject: [PATCH 141/280] Update createDatasourceScreen Adding a manual wait this time go better determine the timing issue occurring against the CI runs --- packages/builder/cypress/support/commands.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index bb26e53d80..a07a22188f 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -642,6 +642,7 @@ Cypress.Commands.add( cy.intercept("**/api/datasources").as("autoScreens") cy.get(".spectrum-Button").contains("Continue").click({ force: true }) cy.wait("@autoScreens") + cy.wait(5000) }) cy.get("[data-cy='autogenerated-screens']").should("not.exist") cy.get("[data-cy='data-source-modal']", { timeout: 10000 }).within(() => { From 145eb775ceb01a1d497e4bea45497b99ab01a261 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 7 Sep 2022 13:27:13 +0000 Subject: [PATCH 142/280] v1.3.12-alpha.2 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/lerna.json b/lerna.json index efbd4520e1..a74e653725 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 0b58e3497e..5f3414bab9 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "1.3.12-alpha.1", + "@budibase/types": "1.3.12-alpha.2", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index ee0b00a2b5..95fb5c855b 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "1.3.12-alpha.1", + "@budibase/string-templates": "1.3.12-alpha.2", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index c596412bc7..3d7e34b8d7 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "1.3.12-alpha.1", - "@budibase/client": "1.3.12-alpha.1", - "@budibase/frontend-core": "1.3.12-alpha.1", - "@budibase/string-templates": "1.3.12-alpha.1", + "@budibase/bbui": "1.3.12-alpha.2", + "@budibase/client": "1.3.12-alpha.2", + "@budibase/frontend-core": "1.3.12-alpha.2", + "@budibase/string-templates": "1.3.12-alpha.2", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index cef8ddfd72..3c11d7d624 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "^1.3.12-alpha.1", - "@budibase/string-templates": "^1.3.12-alpha.1", - "@budibase/types": "^1.3.12-alpha.1", + "@budibase/backend-core": "1.3.12-alpha.2", + "@budibase/string-templates": "1.3.12-alpha.2", + "@budibase/types": "1.3.12-alpha.2", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 139ee20c9c..1df066dbdb 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "1.3.12-alpha.1", - "@budibase/frontend-core": "1.3.12-alpha.1", - "@budibase/string-templates": "1.3.12-alpha.1", + "@budibase/bbui": "1.3.12-alpha.2", + "@budibase/frontend-core": "1.3.12-alpha.2", + "@budibase/string-templates": "1.3.12-alpha.2", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index e3a888a4e4..b686e3cea5 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "1.3.12-alpha.1", + "@budibase/bbui": "1.3.12-alpha.2", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 127945266f..5c0b41c805 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "1.3.12-alpha.1", - "@budibase/client": "1.3.12-alpha.1", + "@budibase/backend-core": "1.3.12-alpha.2", + "@budibase/client": "1.3.12-alpha.2", "@budibase/pro": "1.3.12-alpha.1", - "@budibase/string-templates": "1.3.12-alpha.1", - "@budibase/types": "1.3.12-alpha.1", + "@budibase/string-templates": "1.3.12-alpha.2", + "@budibase/types": "1.3.12-alpha.2", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index fa20295974..3c2e35aba6 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 6af650da47..c5164852ed 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index d0f391ed41..1547f24b30 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.3.12-alpha.1", + "version": "1.3.12-alpha.2", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -35,10 +35,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "1.3.12-alpha.1", + "@budibase/backend-core": "1.3.12-alpha.2", "@budibase/pro": "1.3.12-alpha.1", - "@budibase/string-templates": "1.3.12-alpha.1", - "@budibase/types": "1.3.12-alpha.1", + "@budibase/string-templates": "1.3.12-alpha.2", + "@budibase/types": "1.3.12-alpha.2", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From ead9d5386df9f6e6569181966f981aa8a4540425 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 7 Sep 2022 13:30:26 +0000 Subject: [PATCH 143/280] Update pro version to 1.3.12-alpha.2 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 5c0b41c805..c72c68817d 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.3.12-alpha.2", "@budibase/client": "1.3.12-alpha.2", - "@budibase/pro": "1.3.12-alpha.1", + "@budibase/pro": "1.3.12-alpha.2", "@budibase/string-templates": "1.3.12-alpha.2", "@budibase/types": "1.3.12-alpha.2", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index ff811617dc..2a3db0f037 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.3.12-alpha.1": - version "1.3.12-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.12-alpha.1.tgz#a38f36610a4880b5f8c18192d82244a431c28a86" - integrity sha512-V1rtNBMob3BJjOGeMyvro2tqYoC85TSIO8wyJf1c4DRpPN0rW3s6MjSmVItqtZlbrcnHmxKFr4PDFDIBJaHnbg== +"@budibase/backend-core@1.3.12-alpha.2": + version "1.3.12-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.12-alpha.2.tgz#cab9edd5bde68c245c1b01e29bdd1468cfb10031" + integrity sha512-8NEGk71xnctP9xHGhC9Y5Dy3ilBE8HAW6WtWueOv7SZupa6Y5x0hdtzaJJY1/6oEqnhW/eGYXvPQpffOtfpgYg== dependencies: - "@budibase/types" "1.3.12-alpha.1" + "@budibase/types" "1.3.12-alpha.2" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1179,13 +1179,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.3.12-alpha.1": - version "1.3.12-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.12-alpha.1.tgz#5161f3c646e275fd7f9a72abf817fb407cfd6efe" - integrity sha512-lzsZeZuUGqs8eRsCB3T7yBo4yS7z7L3N2qW9Pzh7/VBwFv4NdQH56tniXCf3oFfxsQ+6xH++vklfRxddID/Dfg== +"@budibase/pro@1.3.12-alpha.2": + version "1.3.12-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.12-alpha.2.tgz#d49accc3c6258e4a258ed60046aa8756f2993895" + integrity sha512-gu/nKTKtHIhqeLrvQfB1z6sIEePWN3453TtVldPgDdl4luVcax4RhktWAw4/Bxyn/NyU80rNjcmBTlMh59Hj0A== dependencies: - "@budibase/backend-core" "1.3.12-alpha.1" - "@budibase/types" "1.3.12-alpha.1" + "@budibase/backend-core" "1.3.12-alpha.2" + "@budibase/types" "1.3.12-alpha.2" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1208,10 +1208,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.3.12-alpha.1": - version "1.3.12-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.12-alpha.1.tgz#18fda1652a757479be45fe096235af1b966ca49c" - integrity sha512-dNP+9zRKX7cYjwL+0/zdlYnMGMUWSyw3Vi+YmWNdXVcQnMXsc9gSbODBQMNv4YNqXBBC+0xgo/A5wRqWhZFL6g== +"@budibase/types@1.3.12-alpha.2": + version "1.3.12-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.12-alpha.2.tgz#e95c6d963000c5b561e8c3007df02ae8fd2a4869" + integrity sha512-pyw10xOPb78deK3aZzhpYuXMGBVrUzAb7Z5AANzDFvi4ggInY6c2GGjrzL/PfHy3DeLZkYnPDxkvaF6GNF6Txw== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index 1547f24b30..85b7e4be7e 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.3.12-alpha.2", - "@budibase/pro": "1.3.12-alpha.1", + "@budibase/pro": "1.3.12-alpha.2", "@budibase/string-templates": "1.3.12-alpha.2", "@budibase/types": "1.3.12-alpha.2", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 431c655d1f..52ab196d8f 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,12 +291,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.3.12-alpha.1": - version "1.3.12-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.12-alpha.1.tgz#a38f36610a4880b5f8c18192d82244a431c28a86" - integrity sha512-V1rtNBMob3BJjOGeMyvro2tqYoC85TSIO8wyJf1c4DRpPN0rW3s6MjSmVItqtZlbrcnHmxKFr4PDFDIBJaHnbg== +"@budibase/backend-core@1.3.12-alpha.2": + version "1.3.12-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.12-alpha.2.tgz#cab9edd5bde68c245c1b01e29bdd1468cfb10031" + integrity sha512-8NEGk71xnctP9xHGhC9Y5Dy3ilBE8HAW6WtWueOv7SZupa6Y5x0hdtzaJJY1/6oEqnhW/eGYXvPQpffOtfpgYg== dependencies: - "@budibase/types" "1.3.12-alpha.1" + "@budibase/types" "1.3.12-alpha.2" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -326,21 +326,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.3.12-alpha.1": - version "1.3.12-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.12-alpha.1.tgz#5161f3c646e275fd7f9a72abf817fb407cfd6efe" - integrity sha512-lzsZeZuUGqs8eRsCB3T7yBo4yS7z7L3N2qW9Pzh7/VBwFv4NdQH56tniXCf3oFfxsQ+6xH++vklfRxddID/Dfg== +"@budibase/pro@1.3.12-alpha.2": + version "1.3.12-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.12-alpha.2.tgz#d49accc3c6258e4a258ed60046aa8756f2993895" + integrity sha512-gu/nKTKtHIhqeLrvQfB1z6sIEePWN3453TtVldPgDdl4luVcax4RhktWAw4/Bxyn/NyU80rNjcmBTlMh59Hj0A== dependencies: - "@budibase/backend-core" "1.3.12-alpha.1" - "@budibase/types" "1.3.12-alpha.1" + "@budibase/backend-core" "1.3.12-alpha.2" + "@budibase/types" "1.3.12-alpha.2" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.3.12-alpha.1": - version "1.3.12-alpha.1" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.12-alpha.1.tgz#18fda1652a757479be45fe096235af1b966ca49c" - integrity sha512-dNP+9zRKX7cYjwL+0/zdlYnMGMUWSyw3Vi+YmWNdXVcQnMXsc9gSbODBQMNv4YNqXBBC+0xgo/A5wRqWhZFL6g== +"@budibase/types@1.3.12-alpha.2": + version "1.3.12-alpha.2" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.12-alpha.2.tgz#e95c6d963000c5b561e8c3007df02ae8fd2a4869" + integrity sha512-pyw10xOPb78deK3aZzhpYuXMGBVrUzAb7Z5AANzDFvi4ggInY6c2GGjrzL/PfHy3DeLZkYnPDxkvaF6GNF6Txw== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From dafb038cef5f3459c165f39063a029df9c17284a Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Wed, 7 Sep 2022 15:42:45 +0100 Subject: [PATCH 144/280] Oracle + datasource Wizard Test skips Skipping tests for Oracle & datasourceWizard Both are covered during general regressions There are timing issues associated with the CI Smoke run This will help reduce the smoke build run time The oracle test file was only covering a basic check of invalid configuration (Not essential for the smoke run) --- .../cypress/integration/datasources/datasourceWizard.spec.js | 2 +- packages/builder/cypress/integration/datasources/oracle.spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/cypress/integration/datasources/datasourceWizard.spec.js b/packages/builder/cypress/integration/datasources/datasourceWizard.spec.js index 14653d8286..837a433951 100644 --- a/packages/builder/cypress/integration/datasources/datasourceWizard.spec.js +++ b/packages/builder/cypress/integration/datasources/datasourceWizard.spec.js @@ -1,7 +1,7 @@ import filterTests from "../../support/filterTests" filterTests(['all'], () => { - context("Datasource Wizard", () => { + xcontext("Datasource Wizard", () => { if (Cypress.env("TEST_ENV")) { before(() => { cy.login() diff --git a/packages/builder/cypress/integration/datasources/oracle.spec.js b/packages/builder/cypress/integration/datasources/oracle.spec.js index 92a5737ff9..5d92d6b217 100644 --- a/packages/builder/cypress/integration/datasources/oracle.spec.js +++ b/packages/builder/cypress/integration/datasources/oracle.spec.js @@ -1,7 +1,7 @@ import filterTests from "../../support/filterTests" filterTests(["all"], () => { - context("Oracle Datasource Testing", () => { + xcontext("Oracle Datasource Testing", () => { if (Cypress.env("TEST_ENV")) { before(() => { cy.login() From 0ebe0b827575e97694b56ecf258c8dc1c8255367 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 7 Sep 2022 16:08:29 +0100 Subject: [PATCH 145/280] remove verify and fix deletion bug --- packages/bbui/src/Modal/ModalContent.svelte | 3 +- .../plugins/_components/AddPluginModal.svelte | 49 ++-------------- .../_components/DeletePluginModal.svelte | 5 +- .../plugins/_components/PluginRow.svelte | 58 +------------------ packages/builder/src/stores/portal/plugins.js | 3 +- packages/server/src/api/controllers/plugin.ts | 20 ++----- 6 files changed, 15 insertions(+), 123 deletions(-) diff --git a/packages/bbui/src/Modal/ModalContent.svelte b/packages/bbui/src/Modal/ModalContent.svelte index d946268da6..25fac63ec8 100644 --- a/packages/bbui/src/Modal/ModalContent.svelte +++ b/packages/bbui/src/Modal/ModalContent.svelte @@ -24,7 +24,6 @@ export let secondaryAction = undefined export let secondaryButtonWarning = false export let dataCy = null - export let buttonCta = true const { hide, cancel } = getContext(Context.Modal) let loading = false $: confirmDisabled = disabled || loading @@ -113,7 +112,7 @@
{/if} {/each} - -
-
- -
-
- {#if verificationSuccessful} - Verification Successful - {:else} - Verify your source - {/if} -
-
diff --git a/packages/builder/src/stores/portal/plugins.js b/packages/builder/src/stores/portal/plugins.js index 9703b30cb7..28f9bfc42d 100644 --- a/packages/builder/src/stores/portal/plugins.js +++ b/packages/builder/src/stores/portal/plugins.js @@ -50,11 +50,10 @@ export function createPluginsStore() { }) } - async function uploadPlugin(file, source, updatePlugin) { + async function uploadPlugin(file, source) { let data = new FormData() data.append("file", file) data.append("source", source) - data.append("update", updatePlugin) let resp = await API.uploadPlugin(data) let newPlugin = resp.plugins[0] update(state => { diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index a84a077b33..cb4d592812 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -39,11 +39,7 @@ export async function upload(ctx: any) { let docs = [] // can do single or multiple plugins for (let plugin of plugins) { - const doc = await processPlugin( - plugin, - ctx.request.body.source, - ctx.request.body.update - ) + const doc = await processPlugin(plugin, ctx.request.body.source) docs.push(doc) } ctx.body = { @@ -132,8 +128,7 @@ export async function destroy(ctx: any) { export async function storePlugin( metadata: any, directory: any, - source?: string, - update?: boolean + source?: string ) { const db = getGlobalDB() const version = metadata.package.version, @@ -172,9 +167,6 @@ export async function storePlugin( const existing = await db.get(pluginId) rev = existing._rev } catch (err) { - if (update) { - throw new Error("Unable to update. Plugin does not exist") - } rev = undefined } let doc = { @@ -201,15 +193,11 @@ export async function storePlugin( } } -export async function processPlugin( - plugin: FileType, - source?: string, - update?: boolean -) { +export async function processPlugin(plugin: FileType, source?: string) { if (!env.SELF_HOSTED) { throw new Error("Plugins not supported outside of self-host.") } const { metadata, directory } = await uploadedFilePlugin(plugin) - return await storePlugin(metadata, directory, source, update) + return await storePlugin(metadata, directory, source) } From 931bca92f358ca0d0646c03ada25b0aae771b5e8 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 7 Sep 2022 15:10:29 +0000 Subject: [PATCH 146/280] v1.3.12-alpha.3 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/lerna.json b/lerna.json index a74e653725..bee30cbc57 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 5f3414bab9..3f5cb33241 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "1.3.12-alpha.2", + "@budibase/types": "1.3.12-alpha.3", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 95fb5c855b..c9e35848f3 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "1.3.12-alpha.2", + "@budibase/string-templates": "1.3.12-alpha.3", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index 3d7e34b8d7..fb5a3d2244 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "1.3.12-alpha.2", - "@budibase/client": "1.3.12-alpha.2", - "@budibase/frontend-core": "1.3.12-alpha.2", - "@budibase/string-templates": "1.3.12-alpha.2", + "@budibase/bbui": "1.3.12-alpha.3", + "@budibase/client": "1.3.12-alpha.3", + "@budibase/frontend-core": "1.3.12-alpha.3", + "@budibase/string-templates": "1.3.12-alpha.3", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 3c11d7d624..497933ea76 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "1.3.12-alpha.2", - "@budibase/string-templates": "1.3.12-alpha.2", - "@budibase/types": "1.3.12-alpha.2", + "@budibase/backend-core": "1.3.12-alpha.3", + "@budibase/string-templates": "1.3.12-alpha.3", + "@budibase/types": "1.3.12-alpha.3", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 1df066dbdb..9166a8ead2 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "1.3.12-alpha.2", - "@budibase/frontend-core": "1.3.12-alpha.2", - "@budibase/string-templates": "1.3.12-alpha.2", + "@budibase/bbui": "1.3.12-alpha.3", + "@budibase/frontend-core": "1.3.12-alpha.3", + "@budibase/string-templates": "1.3.12-alpha.3", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index b686e3cea5..823a6a7458 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "1.3.12-alpha.2", + "@budibase/bbui": "1.3.12-alpha.3", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index c72c68817d..8524eebe27 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "1.3.12-alpha.2", - "@budibase/client": "1.3.12-alpha.2", + "@budibase/backend-core": "1.3.12-alpha.3", + "@budibase/client": "1.3.12-alpha.3", "@budibase/pro": "1.3.12-alpha.2", - "@budibase/string-templates": "1.3.12-alpha.2", - "@budibase/types": "1.3.12-alpha.2", + "@budibase/string-templates": "1.3.12-alpha.3", + "@budibase/types": "1.3.12-alpha.3", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 3c2e35aba6..da6ace54e7 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index c5164852ed..84f7431d7d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 85b7e4be7e..e5a5968084 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.3.12-alpha.2", + "version": "1.3.12-alpha.3", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -35,10 +35,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "1.3.12-alpha.2", + "@budibase/backend-core": "1.3.12-alpha.3", "@budibase/pro": "1.3.12-alpha.2", - "@budibase/string-templates": "1.3.12-alpha.2", - "@budibase/types": "1.3.12-alpha.2", + "@budibase/string-templates": "1.3.12-alpha.3", + "@budibase/types": "1.3.12-alpha.3", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From cc028affdb0eeb7d5cb5f5dc4141776fea35a960 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Wed, 7 Sep 2022 15:13:50 +0000 Subject: [PATCH 147/280] Update pro version to 1.3.12-alpha.3 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 8524eebe27..896d920045 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.3.12-alpha.3", "@budibase/client": "1.3.12-alpha.3", - "@budibase/pro": "1.3.12-alpha.2", + "@budibase/pro": "1.3.12-alpha.3", "@budibase/string-templates": "1.3.12-alpha.3", "@budibase/types": "1.3.12-alpha.3", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 2a3db0f037..d89a21f0d3 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.3.12-alpha.2": - version "1.3.12-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.12-alpha.2.tgz#cab9edd5bde68c245c1b01e29bdd1468cfb10031" - integrity sha512-8NEGk71xnctP9xHGhC9Y5Dy3ilBE8HAW6WtWueOv7SZupa6Y5x0hdtzaJJY1/6oEqnhW/eGYXvPQpffOtfpgYg== +"@budibase/backend-core@1.3.12-alpha.3": + version "1.3.12-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.12-alpha.3.tgz#baf7ea0590db9e49db08e4e05b7d374a2ed05f20" + integrity sha512-8xkaJX2kA2n7LKNXJ9SSyQnvOYRPDxiZ6BKDEPNoOa0WjYZ/htCnUJxgjdnSSzSojqfdDf8eqxa+pGXA87ZU6Q== dependencies: - "@budibase/types" "1.3.12-alpha.2" + "@budibase/types" "1.3.12-alpha.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1179,13 +1179,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.3.12-alpha.2": - version "1.3.12-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.12-alpha.2.tgz#d49accc3c6258e4a258ed60046aa8756f2993895" - integrity sha512-gu/nKTKtHIhqeLrvQfB1z6sIEePWN3453TtVldPgDdl4luVcax4RhktWAw4/Bxyn/NyU80rNjcmBTlMh59Hj0A== +"@budibase/pro@1.3.12-alpha.3": + version "1.3.12-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.12-alpha.3.tgz#30dce4ba54aa7c19b60d6faf2852e3402c81ee50" + integrity sha512-qDddYE6XNbiNIpADUIhXWvgBjJMNxWhHdCpS7Qoci2tmoS4ofLlh5C8qKJuddg3RaLkWIQmII/p/ZnZ0uQ3E9A== dependencies: - "@budibase/backend-core" "1.3.12-alpha.2" - "@budibase/types" "1.3.12-alpha.2" + "@budibase/backend-core" "1.3.12-alpha.3" + "@budibase/types" "1.3.12-alpha.3" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1208,10 +1208,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.3.12-alpha.2": - version "1.3.12-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.12-alpha.2.tgz#e95c6d963000c5b561e8c3007df02ae8fd2a4869" - integrity sha512-pyw10xOPb78deK3aZzhpYuXMGBVrUzAb7Z5AANzDFvi4ggInY6c2GGjrzL/PfHy3DeLZkYnPDxkvaF6GNF6Txw== +"@budibase/types@1.3.12-alpha.3": + version "1.3.12-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.12-alpha.3.tgz#26c5f168281f5ead4a108af2918ce9810d92d239" + integrity sha512-dvs+KWlu+DdaVKAA6vU2qTZJmS4ACIllBSSjDeG0sGOBkIlGJSi5aC6zvkPXpaaZlbDQpDwao/9xNP+Ub8wj1g== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index e5a5968084..79754d4ee0 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.3.12-alpha.3", - "@budibase/pro": "1.3.12-alpha.2", + "@budibase/pro": "1.3.12-alpha.3", "@budibase/string-templates": "1.3.12-alpha.3", "@budibase/types": "1.3.12-alpha.3", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 52ab196d8f..02d5bc0e3a 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,12 +291,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.3.12-alpha.2": - version "1.3.12-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.12-alpha.2.tgz#cab9edd5bde68c245c1b01e29bdd1468cfb10031" - integrity sha512-8NEGk71xnctP9xHGhC9Y5Dy3ilBE8HAW6WtWueOv7SZupa6Y5x0hdtzaJJY1/6oEqnhW/eGYXvPQpffOtfpgYg== +"@budibase/backend-core@1.3.12-alpha.3": + version "1.3.12-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.12-alpha.3.tgz#baf7ea0590db9e49db08e4e05b7d374a2ed05f20" + integrity sha512-8xkaJX2kA2n7LKNXJ9SSyQnvOYRPDxiZ6BKDEPNoOa0WjYZ/htCnUJxgjdnSSzSojqfdDf8eqxa+pGXA87ZU6Q== dependencies: - "@budibase/types" "1.3.12-alpha.2" + "@budibase/types" "1.3.12-alpha.3" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -326,21 +326,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.3.12-alpha.2": - version "1.3.12-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.12-alpha.2.tgz#d49accc3c6258e4a258ed60046aa8756f2993895" - integrity sha512-gu/nKTKtHIhqeLrvQfB1z6sIEePWN3453TtVldPgDdl4luVcax4RhktWAw4/Bxyn/NyU80rNjcmBTlMh59Hj0A== +"@budibase/pro@1.3.12-alpha.3": + version "1.3.12-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.12-alpha.3.tgz#30dce4ba54aa7c19b60d6faf2852e3402c81ee50" + integrity sha512-qDddYE6XNbiNIpADUIhXWvgBjJMNxWhHdCpS7Qoci2tmoS4ofLlh5C8qKJuddg3RaLkWIQmII/p/ZnZ0uQ3E9A== dependencies: - "@budibase/backend-core" "1.3.12-alpha.2" - "@budibase/types" "1.3.12-alpha.2" + "@budibase/backend-core" "1.3.12-alpha.3" + "@budibase/types" "1.3.12-alpha.3" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.3.12-alpha.2": - version "1.3.12-alpha.2" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.12-alpha.2.tgz#e95c6d963000c5b561e8c3007df02ae8fd2a4869" - integrity sha512-pyw10xOPb78deK3aZzhpYuXMGBVrUzAb7Z5AANzDFvi4ggInY6c2GGjrzL/PfHy3DeLZkYnPDxkvaF6GNF6Txw== +"@budibase/types@1.3.12-alpha.3": + version "1.3.12-alpha.3" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.12-alpha.3.tgz#26c5f168281f5ead4a108af2918ce9810d92d239" + integrity sha512-dvs+KWlu+DdaVKAA6vU2qTZJmS4ACIllBSSjDeG0sGOBkIlGJSi5aC6zvkPXpaaZlbDQpDwao/9xNP+Ub8wj1g== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From ac0443a876cf0c36e3bde3f83edaf8412a49c0a7 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 7 Sep 2022 17:49:29 +0100 Subject: [PATCH 148/280] fix build --- .../portal/manage/plugins/_components/AddPluginModal.svelte | 6 +++--- packages/server/src/api/controllers/plugin/utils.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte index f45eea9dc9..3520c18991 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/AddPluginModal.svelte @@ -3,14 +3,14 @@ import { plugins } from "stores/portal" let authOptions = { + URL: ["Headers", "URL"], NPM: ["URL"], Github: ["Github Token", "URL"], - URL: ["Headers", "URL"], "File Upload": ["File Upload"], } let file - let sourceValue = "NPM" - let typeValue = "Datasource" + let sourceValue = "URL" + let typeValue = "Component" let dynamicValues = {} let validation diff --git a/packages/server/src/api/controllers/plugin/utils.js b/packages/server/src/api/controllers/plugin/utils.js index 86f8754a7a..df76ebc121 100644 --- a/packages/server/src/api/controllers/plugin/utils.js +++ b/packages/server/src/api/controllers/plugin/utils.js @@ -1,4 +1,3 @@ -import fetch from "node-fetch" import { createTempFolder, getPluginMetadata, @@ -8,6 +7,7 @@ import { deleteFolderFileSystem, } from "../../../utilities/fileSystem" import { join } from "path" +const fetch = require("node-fetch") export const uploadedFilePlugin = async file => { if (!file.name.endsWith(".tar.gz")) { From 3ef877f886a6a1d9b557559a1032cf2f4ddacb19 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Wed, 7 Sep 2022 18:11:17 +0100 Subject: [PATCH 149/280] fix build again --- packages/server/src/api/controllers/plugin/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/api/controllers/plugin/utils.js b/packages/server/src/api/controllers/plugin/utils.js index df76ebc121..e15a72789e 100644 --- a/packages/server/src/api/controllers/plugin/utils.js +++ b/packages/server/src/api/controllers/plugin/utils.js @@ -1,12 +1,12 @@ -import { +const { createTempFolder, getPluginMetadata, findFileRec, downloadTarballDirect, extractTarball, deleteFolderFileSystem, -} from "../../../utilities/fileSystem" -import { join } from "path" +} = require("../../../utilities/fileSystem") +const join = require("path") const fetch = require("node-fetch") export const uploadedFilePlugin = async file => { From 28e8ce329baa007c5bfc7dbfaa151d5ad2645143 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 9 Sep 2022 11:10:48 +0100 Subject: [PATCH 150/280] fixed building issue --- packages/server/src/api/controllers/plugin/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/plugin/utils.js b/packages/server/src/api/controllers/plugin/utils.js index e15a72789e..f2a9fd6981 100644 --- a/packages/server/src/api/controllers/plugin/utils.js +++ b/packages/server/src/api/controllers/plugin/utils.js @@ -6,7 +6,7 @@ const { extractTarball, deleteFolderFileSystem, } = require("../../../utilities/fileSystem") -const join = require("path") +const { join } = require("path") const fetch = require("node-fetch") export const uploadedFilePlugin = async file => { From e5806b832fbc80dddd9a50ad0976fcc6038f15e4 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 9 Sep 2022 11:12:14 +0100 Subject: [PATCH 151/280] moved validate to backend-core to be used in server and cli --- packages/backend-core/plugins.js | 3 + packages/backend-core/src/plugin/index.ts | 1 + packages/backend-core/src/plugin/utils.js | 94 +++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 packages/backend-core/plugins.js create mode 100644 packages/backend-core/src/plugin/index.ts create mode 100644 packages/backend-core/src/plugin/utils.js diff --git a/packages/backend-core/plugins.js b/packages/backend-core/plugins.js new file mode 100644 index 0000000000..018e214dcb --- /dev/null +++ b/packages/backend-core/plugins.js @@ -0,0 +1,3 @@ +module.exports = { + ...require("./src/plugin"), +} diff --git a/packages/backend-core/src/plugin/index.ts b/packages/backend-core/src/plugin/index.ts new file mode 100644 index 0000000000..3eeaeaa90c --- /dev/null +++ b/packages/backend-core/src/plugin/index.ts @@ -0,0 +1 @@ +export * from "./utils" diff --git a/packages/backend-core/src/plugin/utils.js b/packages/backend-core/src/plugin/utils.js new file mode 100644 index 0000000000..020fb4484d --- /dev/null +++ b/packages/backend-core/src/plugin/utils.js @@ -0,0 +1,94 @@ +const { + DatasourceFieldType, + QueryType, + PluginType, +} = require("@budibase/types") +const joi = require("joi") + +const DATASOURCE_TYPES = [ + "Relational", + "Non-relational", + "Spreadsheet", + "Object store", + "Graph", + "API", +] + +function runJoi(validator, schema) { + const { error } = validator.validate(schema) + if (error) { + throw error + } +} + +function validateComponent(schema) { + const validator = joi.object({ + type: joi.string().allow("component").required(), + metadata: joi.object().unknown(true).required(), + hash: joi.string().optional(), + version: joi.string().optional(), + schema: joi + .object({ + name: joi.string().required(), + settings: joi.array().items(joi.object().unknown(true)).required(), + }) + .unknown(true), + }) + runJoi(validator, schema) +} + +function validateDatasource(schema) { + const fieldValidator = joi.object({ + type: joi + .string() + .allow(...Object.values(DatasourceFieldType)) + .required(), + required: joi.boolean().required(), + default: joi.any(), + display: joi.string(), + }) + + const queryValidator = joi + .object({ + type: joi.string().allow(...Object.values(QueryType)), + fields: joi.object().pattern(joi.string(), fieldValidator), + }) + .required() + + const validator = joi.object({ + type: joi.string().allow("datasource").required(), + metadata: joi.object().unknown(true).required(), + hash: joi.string().optional(), + version: joi.string().optional(), + schema: joi.object({ + docs: joi.string(), + friendlyName: joi.string().required(), + type: joi.string().allow(...DATASOURCE_TYPES), + description: joi.string().required(), + datasource: joi.object().pattern(joi.string(), fieldValidator).required(), + query: joi + .object({ + create: queryValidator, + read: queryValidator, + update: queryValidator, + delete: queryValidator, + }) + .unknown(true) + .required(), + }), + }) + runJoi(validator, schema) +} + +exports.validate = schema => { + switch (schema?.type) { + case PluginType.COMPONENT: + validateComponent(schema) + break + case PluginType.DATASOURCE: + validateDatasource(schema) + break + default: + throw new Error(`Unknown plugin type - check schema.json: ${schema.type}`) + } +} From 82615491312ed6b168aaf357df89eb8d1ce79214 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 9 Sep 2022 11:13:18 +0100 Subject: [PATCH 152/280] added plugin validation --- packages/server/src/api/controllers/plugin.ts | 6 +++++- packages/string-templates/yarn.lock | 16 ---------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin.ts index cb4d592812..3941798ac4 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin.ts @@ -7,6 +7,7 @@ import { uploadedFilePlugin, } from "./plugin/utils" import { getGlobalDB } from "@budibase/backend-core/tenancy" +import { validate } from "@budibase/backend-core/plugins" import { generatePluginID, getPluginParams } from "../../db/utils" import { uploadDirectory, @@ -80,13 +81,16 @@ export async function create(ctx: any) { directory = directoryGithub break case "url": + const headersObj = JSON.parse(headers || null) || {} const { metadata: metadataUrl, directory: directoryUrl } = - await uploadedUrlPlugin(url, name, headers) + await uploadedUrlPlugin(url, name, headersObj) metadata = metadataUrl directory = directoryUrl break } + validate(metadata?.schema) + const doc = await storePlugin(metadata, directory, source) ctx.body = { diff --git a/packages/string-templates/yarn.lock b/packages/string-templates/yarn.lock index dc7e8f1852..8e71e59912 100644 --- a/packages/string-templates/yarn.lock +++ b/packages/string-templates/yarn.lock @@ -568,15 +568,6 @@ magic-string "^0.25.7" resolve "^1.17.0" -"@rollup/plugin-inject@^4.0.0": - version "4.0.4" - resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz#fbeee66e9a700782c4f65c8b0edbafe58678fbc2" - integrity sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ== - dependencies: - "@rollup/pluginutils" "^3.1.0" - estree-walker "^2.0.1" - magic-string "^0.25.7" - "@rollup/plugin-json@^4.1.0": version "4.1.0" resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz#54e09867ae6963c593844d8bd7a9c718294496f3" @@ -3796,13 +3787,6 @@ rollup-plugin-node-resolve@^5.2.0: resolve "^1.11.1" rollup-pluginutils "^2.8.1" -rollup-plugin-polyfill-node@^0.10.2: - version "0.10.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.10.2.tgz#b2128646851fcb9475ddfd5bc22ca1a8c568738d" - integrity sha512-5GMywXiLiuQP6ZzED/LO/Q0HyDi2W6b8VN+Zd3oB0opIjyRs494Me2ZMaqKWDNbGiW4jvvzl6L2n4zRgxS9cSQ== - dependencies: - "@rollup/plugin-inject" "^4.0.0" - rollup-plugin-terser@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" From 829d1bf70d598f85fa3a0860fc6395f3905ab264 Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 9 Sep 2022 11:25:17 +0100 Subject: [PATCH 153/280] cleaned plugin validate from cli --- packages/cli/src/plugins/constants.js | 6 -- packages/cli/src/plugins/index.js | 6 +- packages/cli/src/plugins/validate.js | 91 -------------------- packages/types/src/documents/plugin/index.ts | 2 + 4 files changed, 5 insertions(+), 100 deletions(-) delete mode 100644 packages/cli/src/plugins/constants.js delete mode 100644 packages/cli/src/plugins/validate.js diff --git a/packages/cli/src/plugins/constants.js b/packages/cli/src/plugins/constants.js deleted file mode 100644 index 37d0748979..0000000000 --- a/packages/cli/src/plugins/constants.js +++ /dev/null @@ -1,6 +0,0 @@ -exports.PluginTypes = { - COMPONENT: "component", - DATASOURCE: "datasource", -} - -exports.PLUGIN_TYPES_ARR = Object.values(exports.PluginTypes) diff --git a/packages/cli/src/plugins/index.js b/packages/cli/src/plugins/index.js index 643406bc4d..714187df56 100644 --- a/packages/cli/src/plugins/index.js +++ b/packages/cli/src/plugins/index.js @@ -3,8 +3,8 @@ const { CommandWords } = require("../constants") const { getSkeleton, fleshOutSkeleton } = require("./skeleton") const questions = require("../questions") const fs = require("fs") -const { PLUGIN_TYPES_ARR } = require("./constants") -const { validate } = require("./validate") +const { PLUGIN_TYPE_ARR } = require("@budibase/types") +const { validate } = require("@budibase/backend-core/plugins") const { runPkgCommand } = require("../exec") const { join } = require("path") const { success, error, info } = require("../utils") @@ -24,7 +24,7 @@ function checkInPlugin() { async function init(opts) { const type = opts["init"] || opts - if (!type || !PLUGIN_TYPES_ARR.includes(type)) { + if (!type || !PLUGIN_TYPE_ARR.includes(type)) { console.log( error( "Please provide a type to init, either 'component' or 'datasource'." diff --git a/packages/cli/src/plugins/validate.js b/packages/cli/src/plugins/validate.js deleted file mode 100644 index a6b4555cbd..0000000000 --- a/packages/cli/src/plugins/validate.js +++ /dev/null @@ -1,91 +0,0 @@ -const { PluginTypes } = require("./constants") -const { DatasourceFieldType, QueryType } = require("@budibase/types") -const joi = require("joi") - -const DATASOURCE_TYPES = [ - "Relational", - "Non-relational", - "Spreadsheet", - "Object store", - "Graph", - "API", -] - -function runJoi(validator, schema) { - const { error } = validator.validate(schema) - if (error) { - throw error - } -} - -function validateComponent(schema) { - const validator = joi.object({ - type: joi.string().allow("component").required(), - metadata: joi.object().unknown(true).required(), - hash: joi.string().optional(), - version: joi.string().optional(), - schema: joi - .object({ - name: joi.string().required(), - settings: joi.array().items(joi.object().unknown(true)).required(), - }) - .unknown(true), - }) - runJoi(validator, schema) -} - -function validateDatasource(schema) { - const fieldValidator = joi.object({ - type: joi - .string() - .allow(...Object.values(DatasourceFieldType)) - .required(), - required: joi.boolean().required(), - default: joi.any(), - display: joi.string(), - }) - - const queryValidator = joi - .object({ - type: joi.string().allow(...Object.values(QueryType)), - fields: joi.object().pattern(joi.string(), fieldValidator), - }) - .required() - - const validator = joi.object({ - type: joi.string().allow("datasource").required(), - metadata: joi.object().unknown(true).required(), - hash: joi.string().optional(), - version: joi.string().optional(), - schema: joi.object({ - docs: joi.string(), - friendlyName: joi.string().required(), - type: joi.string().allow(...DATASOURCE_TYPES), - description: joi.string().required(), - datasource: joi.object().pattern(joi.string(), fieldValidator).required(), - query: joi - .object({ - create: queryValidator, - read: queryValidator, - update: queryValidator, - delete: queryValidator, - }) - .unknown(true) - .required(), - }), - }) - runJoi(validator, schema) -} - -exports.validate = schema => { - switch (schema.type) { - case PluginTypes.COMPONENT: - validateComponent(schema) - break - case PluginTypes.DATASOURCE: - validateDatasource(schema) - break - default: - throw new Error(`Unknown plugin type - check schema.json: ${schema.type}`) - } -} diff --git a/packages/types/src/documents/plugin/index.ts b/packages/types/src/documents/plugin/index.ts index 8133e91523..2d7e480882 100644 --- a/packages/types/src/documents/plugin/index.ts +++ b/packages/types/src/documents/plugin/index.ts @@ -7,3 +7,5 @@ export interface FileType { path: string name: string } + +export const PLUGIN_TYPE_ARR = Object.values(exports.PluginType) \ No newline at end of file From 5f8a6c065bcc67d23aa64ea90b0e5ef863d6a65c Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 9 Sep 2022 11:26:20 +0100 Subject: [PATCH 154/280] added array to types --- packages/types/src/documents/plugin/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/types/src/documents/plugin/index.ts b/packages/types/src/documents/plugin/index.ts index 2d7e480882..f696d7a2aa 100644 --- a/packages/types/src/documents/plugin/index.ts +++ b/packages/types/src/documents/plugin/index.ts @@ -8,4 +8,4 @@ export interface FileType { name: string } -export const PLUGIN_TYPE_ARR = Object.values(exports.PluginType) \ No newline at end of file +export const PLUGIN_TYPE_ARR = Object.values(exports.PluginType) From 171970108e2aa5dae4530f16970dd94e11030deb Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 9 Sep 2022 12:01:04 +0100 Subject: [PATCH 155/280] fix build error exporting and declaring plugins --- packages/backend-core/src/index.ts | 2 ++ packages/backend-core/src/plugin/index.ts | 8 +++++++- packages/server/src/module.d.ts | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/backend-core/src/index.ts b/packages/backend-core/src/index.ts index 74e79e7b95..d9dbe58264 100644 --- a/packages/backend-core/src/index.ts +++ b/packages/backend-core/src/index.ts @@ -18,6 +18,7 @@ import * as dbConstants from "./db/constants" import logging from "./logging" import pino from "./pino" import * as middleware from "./middleware" +import plugins from "./plugin" // mimic the outer package exports import * as db from "./pkg/db" @@ -56,6 +57,7 @@ const core = { errors, logging, roles, + plugins, ...pino, ...errorClasses, middleware, diff --git a/packages/backend-core/src/plugin/index.ts b/packages/backend-core/src/plugin/index.ts index 3eeaeaa90c..a6d1853007 100644 --- a/packages/backend-core/src/plugin/index.ts +++ b/packages/backend-core/src/plugin/index.ts @@ -1 +1,7 @@ -export * from "./utils" +import * as utils from "./utils" + +const pkg = { + ...utils, +} + +export = pkg diff --git a/packages/server/src/module.d.ts b/packages/server/src/module.d.ts index eb1d1feb48..ada45a3a66 100644 --- a/packages/server/src/module.d.ts +++ b/packages/server/src/module.d.ts @@ -11,3 +11,4 @@ declare module "@budibase/backend-core/encryption" declare module "@budibase/backend-core/utils" declare module "@budibase/backend-core/redis" declare module "@budibase/backend-core/objectStore" +declare module "@budibase/backend-core/plugins" From 945665448d3f85dc0ba956e8d75fba750471e18b Mon Sep 17 00:00:00 2001 From: NEOLPAR Date: Fri, 9 Sep 2022 12:15:38 +0100 Subject: [PATCH 156/280] fixing node exports --- packages/server/src/api/controllers/plugin/utils.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/server/src/api/controllers/plugin/utils.js b/packages/server/src/api/controllers/plugin/utils.js index f2a9fd6981..37d8ad6c3d 100644 --- a/packages/server/src/api/controllers/plugin/utils.js +++ b/packages/server/src/api/controllers/plugin/utils.js @@ -9,7 +9,7 @@ const { const { join } = require("path") const fetch = require("node-fetch") -export const uploadedFilePlugin = async file => { +exports.uploadedFilePlugin = async file => { if (!file.name.endsWith(".tar.gz")) { throw new Error("Plugin must be compressed into a gzipped tarball.") } @@ -19,7 +19,7 @@ export const uploadedFilePlugin = async file => { return await getPluginMetadata(path) } -export const uploadedNpmPlugin = async (url, name, headers = {}) => { +exports.uploadedNpmPlugin = async (url, name, headers = {}) => { let npmTarballUrl = url let pluginName = name @@ -66,7 +66,7 @@ export const uploadedNpmPlugin = async (url, name, headers = {}) => { return await getPluginMetadata(path) } -export const uploadedUrlPlugin = async (url, name = "", headers = {}) => { +exports.uploadedUrlPlugin = async (url, name = "", headers = {}) => { if (!url.includes(".tar.gz")) { throw new Error("Plugin must be compressed into a gzipped tarball.") } @@ -76,7 +76,7 @@ export const uploadedUrlPlugin = async (url, name = "", headers = {}) => { return await getPluginMetadata(path) } -export const uploadedGithubPlugin = async (ctx, url, name = "", token = "") => { +exports.uploadedGithubPlugin = async (ctx, url, name = "", token = "") => { let githubUrl = url if (!githubUrl.includes("https://github.com/")) { @@ -140,7 +140,7 @@ export const uploadedGithubPlugin = async (ctx, url, name = "", token = "") => { } } -export const downloadUnzipTarball = async (url, name, headers = {}) => { +const downloadUnzipTarball = async (url, name, headers = {}) => { try { const path = createTempFolder(name) From 48464b2fe3fade1135ab6bef4ae81e97adc4239b Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Sun, 11 Sep 2022 20:25:51 +0100 Subject: [PATCH 157/280] Update InlineAlert with additional spacing around button --- packages/bbui/src/InlineAlert/InlineAlert.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/bbui/src/InlineAlert/InlineAlert.svelte b/packages/bbui/src/InlineAlert/InlineAlert.svelte index 25e14b7caf..b99399bf8b 100644 --- a/packages/bbui/src/InlineAlert/InlineAlert.svelte +++ b/packages/bbui/src/InlineAlert/InlineAlert.svelte @@ -39,13 +39,16 @@
{splitMsg}
{/each} {#if onConfirm} - From f4963db294dab0feb37567e323558bf9a9b47124 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 12 Sep 2022 10:43:26 +0100 Subject: [PATCH 159/280] Add buttonText to InlineAlert, export TooltipWrapper, update Account type with license key activate time, convert error package to TS --- packages/backend-core/src/environment.ts | 2 +- packages/backend-core/src/errors/base.js | 11 ----- packages/backend-core/src/errors/base.ts | 10 +++++ packages/backend-core/src/errors/generic.js | 11 ----- packages/backend-core/src/errors/generic.ts | 7 +++ packages/backend-core/src/errors/http.js | 12 ------ packages/backend-core/src/errors/http.ts | 15 +++++++ .../src/errors/{index.js => index.ts} | 17 +++++--- packages/backend-core/src/errors/licensing.js | 43 ------------------- packages/backend-core/src/errors/licensing.ts | 39 +++++++++++++++++ .../builder/portal/settings/upgrade.svelte | 12 ++++-- .../types/src/documents/account/account.ts | 1 + 12 files changed, 91 insertions(+), 89 deletions(-) delete mode 100644 packages/backend-core/src/errors/base.js create mode 100644 packages/backend-core/src/errors/base.ts delete mode 100644 packages/backend-core/src/errors/generic.js create mode 100644 packages/backend-core/src/errors/generic.ts delete mode 100644 packages/backend-core/src/errors/http.js create mode 100644 packages/backend-core/src/errors/http.ts rename packages/backend-core/src/errors/{index.js => index.ts} (65%) delete mode 100644 packages/backend-core/src/errors/licensing.js create mode 100644 packages/backend-core/src/errors/licensing.ts diff --git a/packages/backend-core/src/environment.ts b/packages/backend-core/src/environment.ts index 0348d921ab..0588ece793 100644 --- a/packages/backend-core/src/environment.ts +++ b/packages/backend-core/src/environment.ts @@ -36,7 +36,7 @@ const env = { MULTI_TENANCY: process.env.MULTI_TENANCY, ACCOUNT_PORTAL_URL: process.env.ACCOUNT_PORTAL_URL || "https://account.budibase.app", - ACCOUNT_PORTAL_API_KEY: process.env.ACCOUNT_PORTAL_API_KEY, + ACCOUNT_PORTAL_API_KEY: process.env.ACCOUNT_PORTAL_API_KEY || "", DISABLE_ACCOUNT_PORTAL: process.env.DISABLE_ACCOUNT_PORTAL, SELF_HOSTED: !!parseInt(process.env.SELF_HOSTED || ""), COOKIE_DOMAIN: process.env.COOKIE_DOMAIN, diff --git a/packages/backend-core/src/errors/base.js b/packages/backend-core/src/errors/base.js deleted file mode 100644 index 7cb0c0fc23..0000000000 --- a/packages/backend-core/src/errors/base.js +++ /dev/null @@ -1,11 +0,0 @@ -class BudibaseError extends Error { - constructor(message, code, type) { - super(message) - this.code = code - this.type = type - } -} - -module.exports = { - BudibaseError, -} diff --git a/packages/backend-core/src/errors/base.ts b/packages/backend-core/src/errors/base.ts new file mode 100644 index 0000000000..801dcf168d --- /dev/null +++ b/packages/backend-core/src/errors/base.ts @@ -0,0 +1,10 @@ +export class BudibaseError extends Error { + code: string + type: string + + constructor(message: string, code: string, type: string) { + super(message) + this.code = code + this.type = type + } +} diff --git a/packages/backend-core/src/errors/generic.js b/packages/backend-core/src/errors/generic.js deleted file mode 100644 index 5c7661f035..0000000000 --- a/packages/backend-core/src/errors/generic.js +++ /dev/null @@ -1,11 +0,0 @@ -const { BudibaseError } = require("./base") - -class GenericError extends BudibaseError { - constructor(message, code, type) { - super(message, code, type ? type : "generic") - } -} - -module.exports = { - GenericError, -} diff --git a/packages/backend-core/src/errors/generic.ts b/packages/backend-core/src/errors/generic.ts new file mode 100644 index 0000000000..71b3352438 --- /dev/null +++ b/packages/backend-core/src/errors/generic.ts @@ -0,0 +1,7 @@ +import { BudibaseError } from "./base" + +export class GenericError extends BudibaseError { + constructor(message: string, code: string, type: string) { + super(message, code, type ? type : "generic") + } +} diff --git a/packages/backend-core/src/errors/http.js b/packages/backend-core/src/errors/http.js deleted file mode 100644 index 8e7cab4638..0000000000 --- a/packages/backend-core/src/errors/http.js +++ /dev/null @@ -1,12 +0,0 @@ -const { GenericError } = require("./generic") - -class HTTPError extends GenericError { - constructor(message, httpStatus, code = "http", type = "generic") { - super(message, code, type) - this.status = httpStatus - } -} - -module.exports = { - HTTPError, -} diff --git a/packages/backend-core/src/errors/http.ts b/packages/backend-core/src/errors/http.ts new file mode 100644 index 0000000000..182e009f58 --- /dev/null +++ b/packages/backend-core/src/errors/http.ts @@ -0,0 +1,15 @@ +import { GenericError } from "./generic" + +export class HTTPError extends GenericError { + status: number + + constructor( + message: string, + httpStatus: number, + code = "http", + type = "generic" + ) { + super(message, code, type) + this.status = httpStatus + } +} diff --git a/packages/backend-core/src/errors/index.js b/packages/backend-core/src/errors/index.ts similarity index 65% rename from packages/backend-core/src/errors/index.js rename to packages/backend-core/src/errors/index.ts index 31ffd739a0..be6657093d 100644 --- a/packages/backend-core/src/errors/index.js +++ b/packages/backend-core/src/errors/index.ts @@ -1,5 +1,6 @@ -const http = require("./http") -const licensing = require("./licensing") +import { HTTPError } from "./http" +import { UsageLimitError, FeatureDisabledError } from "./licensing" +import * as licensing from "./licensing" const codes = { ...licensing.codes, @@ -11,7 +12,7 @@ const context = { ...licensing.context, } -const getPublicError = err => { +const getPublicError = (err: any) => { let error if (err.code || err.type) { // add generic error information @@ -32,13 +33,15 @@ const getPublicError = err => { return error } -module.exports = { +const pkg = { codes, types, errors: { - UsageLimitError: licensing.UsageLimitError, - FeatureDisabledError: licensing.FeatureDisabledError, - HTTPError: http.HTTPError, + UsageLimitError, + FeatureDisabledError, + HTTPError, }, getPublicError, } + +export = pkg diff --git a/packages/backend-core/src/errors/licensing.js b/packages/backend-core/src/errors/licensing.js deleted file mode 100644 index 85d207ac35..0000000000 --- a/packages/backend-core/src/errors/licensing.js +++ /dev/null @@ -1,43 +0,0 @@ -const { HTTPError } = require("./http") - -const type = "license_error" - -const codes = { - USAGE_LIMIT_EXCEEDED: "usage_limit_exceeded", - FEATURE_DISABLED: "feature_disabled", -} - -const context = { - [codes.USAGE_LIMIT_EXCEEDED]: err => { - return { - limitName: err.limitName, - } - }, - [codes.FEATURE_DISABLED]: err => { - return { - featureName: err.featureName, - } - }, -} - -class UsageLimitError extends HTTPError { - constructor(message, limitName) { - super(message, 400, codes.USAGE_LIMIT_EXCEEDED, type) - this.limitName = limitName - } -} - -class FeatureDisabledError extends HTTPError { - constructor(message, featureName) { - super(message, 400, codes.FEATURE_DISABLED, type) - this.featureName = featureName - } -} - -module.exports = { - type, - codes, - context, - UsageLimitError, - FeatureDisabledError, -} diff --git a/packages/backend-core/src/errors/licensing.ts b/packages/backend-core/src/errors/licensing.ts new file mode 100644 index 0000000000..7ffcefa167 --- /dev/null +++ b/packages/backend-core/src/errors/licensing.ts @@ -0,0 +1,39 @@ +import { HTTPError } from "./http" + +export const type = "license_error" + +export const codes = { + USAGE_LIMIT_EXCEEDED: "usage_limit_exceeded", + FEATURE_DISABLED: "feature_disabled", +} + +export const context = { + [codes.USAGE_LIMIT_EXCEEDED]: (err: any) => { + return { + limitName: err.limitName, + } + }, + [codes.FEATURE_DISABLED]: (err: any) => { + return { + featureName: err.featureName, + } + }, +} + +export class UsageLimitError extends HTTPError { + limitName: string + + constructor(message: string, limitName: string) { + super(message, 400, codes.USAGE_LIMIT_EXCEEDED, type) + this.limitName = limitName + } +} + +export class FeatureDisabledError extends HTTPError { + featureName: string + + constructor(message: string, featureName: string) { + super(message, 400, codes.FEATURE_DISABLED, type) + this.featureName = featureName + } +} diff --git a/packages/builder/src/pages/builder/portal/settings/upgrade.svelte b/packages/builder/src/pages/builder/portal/settings/upgrade.svelte index 5200834ffa..68ace1a157 100644 --- a/packages/builder/src/pages/builder/portal/settings/upgrade.svelte +++ b/packages/builder/src/pages/builder/portal/settings/upgrade.svelte @@ -35,10 +35,14 @@ } const activate = async () => { - await API.activateLicenseKey({ licenseKey }) - await auth.getSelf() - await setLicenseInfo() - notifications.success("Successfully activated") + try { + await API.activateLicenseKey({ licenseKey }) + await auth.getSelf() + await setLicenseInfo() + notifications.success("Successfully activated") + } catch (e) { + notifications.error(e.message) + } } const refresh = async () => { diff --git a/packages/types/src/documents/account/account.ts b/packages/types/src/documents/account/account.ts index e6f48ff001..33c96033a0 100644 --- a/packages/types/src/documents/account/account.ts +++ b/packages/types/src/documents/account/account.ts @@ -33,6 +33,7 @@ export interface Account extends CreateAccount { tier: string // deprecated stripeCustomerId?: string licenseKey?: string + licenseKeyActivatedAt?: number } export interface PasswordAccount extends Account { From 962a04f453d3297f590dc6906fb3d4fd07a3f976 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 12 Sep 2022 13:38:21 +0100 Subject: [PATCH 160/280] Update string-templates/yarn.lock --- packages/string-templates/yarn.lock | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/string-templates/yarn.lock b/packages/string-templates/yarn.lock index dc7e8f1852..8e71e59912 100644 --- a/packages/string-templates/yarn.lock +++ b/packages/string-templates/yarn.lock @@ -568,15 +568,6 @@ magic-string "^0.25.7" resolve "^1.17.0" -"@rollup/plugin-inject@^4.0.0": - version "4.0.4" - resolved "https://registry.yarnpkg.com/@rollup/plugin-inject/-/plugin-inject-4.0.4.tgz#fbeee66e9a700782c4f65c8b0edbafe58678fbc2" - integrity sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ== - dependencies: - "@rollup/pluginutils" "^3.1.0" - estree-walker "^2.0.1" - magic-string "^0.25.7" - "@rollup/plugin-json@^4.1.0": version "4.1.0" resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz#54e09867ae6963c593844d8bd7a9c718294496f3" @@ -3796,13 +3787,6 @@ rollup-plugin-node-resolve@^5.2.0: resolve "^1.11.1" rollup-pluginutils "^2.8.1" -rollup-plugin-polyfill-node@^0.10.2: - version "0.10.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.10.2.tgz#b2128646851fcb9475ddfd5bc22ca1a8c568738d" - integrity sha512-5GMywXiLiuQP6ZzED/LO/Q0HyDi2W6b8VN+Zd3oB0opIjyRs494Me2ZMaqKWDNbGiW4jvvzl6L2n4zRgxS9cSQ== - dependencies: - "@rollup/plugin-inject" "^4.0.0" - rollup-plugin-terser@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" From 2f02d471265041e6a8a42b68b63b8b11311287bc Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 12 Sep 2022 13:16:58 +0000 Subject: [PATCH 161/280] v1.3.15-alpha.0 --- lerna.json | 2 +- packages/backend-core/package.json | 4 ++-- packages/bbui/package.json | 4 ++-- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 8 ++++---- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 10 +++++----- packages/string-templates/package.json | 2 +- packages/types/package.json | 2 +- packages/worker/package.json | 8 ++++---- 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/lerna.json b/lerna.json index 1292aa521e..a276af2caf 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.3.14", + "version": "1.3.15-alpha.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 887e9ae095..32c8d3e1f2 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.3.14", + "version": "1.3.15-alpha.0", "description": "Budibase backend core libraries used in server and worker", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", @@ -20,7 +20,7 @@ "test:watch": "jest --watchAll" }, "dependencies": { - "@budibase/types": "^1.3.14", + "@budibase/types": "1.3.15-alpha.0", "@shopify/jest-koa-mocks": "5.0.1", "@techpass/passport-openidconnect": "0.3.2", "aws-sdk": "2.1030.0", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 0b901ac40a..081f6471af 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.3.14", + "version": "1.3.15-alpha.0", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "^1.3.14", + "@budibase/string-templates": "1.3.15-alpha.0", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index e3b8897c4e..862fd2d333 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.3.14", + "version": "1.3.15-alpha.0", "license": "GPL-3.0", "private": true, "scripts": { @@ -69,10 +69,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.3.14", - "@budibase/client": "^1.3.14", - "@budibase/frontend-core": "^1.3.14", - "@budibase/string-templates": "^1.3.14", + "@budibase/bbui": "1.3.15-alpha.0", + "@budibase/client": "1.3.15-alpha.0", + "@budibase/frontend-core": "1.3.15-alpha.0", + "@budibase/string-templates": "1.3.15-alpha.0", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index b71a047f47..f073a7913d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.3.14", + "version": "1.3.15-alpha.0", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { @@ -26,9 +26,9 @@ "outputPath": "build" }, "dependencies": { - "@budibase/backend-core": "1.3.14", - "@budibase/string-templates": "1.3.14", - "@budibase/types": "1.3.14", + "@budibase/backend-core": "1.3.15-alpha.0", + "@budibase/string-templates": "1.3.15-alpha.0", + "@budibase/types": "1.3.15-alpha.0", "axios": "0.21.2", "chalk": "4.1.0", "cli-progress": "3.11.2", diff --git a/packages/client/package.json b/packages/client/package.json index 881f0e59f7..370920f42b 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.3.14", + "version": "1.3.15-alpha.0", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^1.3.14", - "@budibase/frontend-core": "^1.3.14", - "@budibase/string-templates": "^1.3.14", + "@budibase/bbui": "1.3.15-alpha.0", + "@budibase/frontend-core": "1.3.15-alpha.0", + "@budibase/string-templates": "1.3.15-alpha.0", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 309aee4f2b..d6963ed5f4 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.3.14", + "version": "1.3.15-alpha.0", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.3.14", + "@budibase/bbui": "1.3.15-alpha.0", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 2d02e3580f..83c05dab4d 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.3.14", + "version": "1.3.15-alpha.0", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -77,11 +77,11 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "10.0.3", - "@budibase/backend-core": "^1.3.14", - "@budibase/client": "^1.3.14", + "@budibase/backend-core": "1.3.15-alpha.0", + "@budibase/client": "1.3.15-alpha.0", "@budibase/pro": "1.3.13", - "@budibase/string-templates": "^1.3.14", - "@budibase/types": "^1.3.14", + "@budibase/string-templates": "1.3.15-alpha.0", + "@budibase/types": "1.3.15-alpha.0", "@bull-board/api": "3.7.0", "@bull-board/koa": "3.9.4", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index ce0d30ad5e..6b21c143a8 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.3.14", + "version": "1.3.15-alpha.0", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/types/package.json b/packages/types/package.json index 5b1e86ed38..e2ff347691 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/types", - "version": "1.3.14", + "version": "1.3.15-alpha.0", "description": "Budibase types", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/worker/package.json b/packages/worker/package.json index 53d174afa1..f2e744fe1c 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.3.14", + "version": "1.3.15-alpha.0", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -35,10 +35,10 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.3.14", + "@budibase/backend-core": "1.3.15-alpha.0", "@budibase/pro": "1.3.13", - "@budibase/string-templates": "^1.3.14", - "@budibase/types": "^1.3.14", + "@budibase/string-templates": "1.3.15-alpha.0", + "@budibase/types": "1.3.15-alpha.0", "@koa/router": "8.0.8", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "0.3.2", From 8ac0b42c1e96d30cdea23454c61436f682e87b1f Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 12 Sep 2022 13:20:19 +0000 Subject: [PATCH 162/280] Update pro version to 1.3.15-alpha.0 --- packages/server/package.json | 2 +- packages/server/yarn.lock | 30 +++++++++++++++--------------- packages/worker/package.json | 2 +- packages/worker/yarn.lock | 30 +++++++++++++++--------------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index 83c05dab4d..77890b483c 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -79,7 +79,7 @@ "@apidevtools/swagger-parser": "10.0.3", "@budibase/backend-core": "1.3.15-alpha.0", "@budibase/client": "1.3.15-alpha.0", - "@budibase/pro": "1.3.13", + "@budibase/pro": "1.3.15-alpha.0", "@budibase/string-templates": "1.3.15-alpha.0", "@budibase/types": "1.3.15-alpha.0", "@bull-board/api": "3.7.0", diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 8a9ba0011c..63730ebd4c 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -1094,12 +1094,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.3.13": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.13.tgz#62341d7eb2daba955069b4b54d1e7ef6ade62598" - integrity sha512-ib+ojvO8Yw5wCoHkE6Gc09D5EZiQL72g/KVEs0y2oRD92VGnv9VGpY3dA1A1UIRdi8wELDz20LrDaV/4lFbmfg== +"@budibase/backend-core@1.3.15-alpha.0": + version "1.3.15-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.15-alpha.0.tgz#d4fd3a00008c3d5018c57bb5b4f04360d60f9807" + integrity sha512-3X7K3rHPBs065y1nihZdT45twPNiK5FGoi82DQc7z2ub6nuD7hfn+A8WpEGEpofFwNQHme1XTVrJJjyBDME/ZQ== dependencies: - "@budibase/types" "^1.3.13" + "@budibase/types" "1.3.15-alpha.0" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -1179,13 +1179,13 @@ svelte-flatpickr "^3.2.3" svelte-portal "^1.0.0" -"@budibase/pro@1.3.13": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.13.tgz#2833898c04b041716f712ba95599da46d07e2d1d" - integrity sha512-l9AkPCCmOtX9htB7rT+cisgcihVXI4b5wsPzDwHKYfAj1rSRa/0FA+m6/V6D5FzwHAILY3//YOZmgPavL9gvMw== +"@budibase/pro@1.3.15-alpha.0": + version "1.3.15-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.15-alpha.0.tgz#92d0a74c5aa31c22020aeb584e05c90a9ca210a0" + integrity sha512-mNdwrtJt++WNKttizfvD1mpDZqQHhUAsY5SvlKAL6EiOJVYpJzW/p7m4fxn8hjhLtTrKdDThmb7nTyxE43Scdw== dependencies: - "@budibase/backend-core" "1.3.13" - "@budibase/types" "1.3.13" + "@budibase/backend-core" "1.3.15-alpha.0" + "@budibase/types" "1.3.15-alpha.0" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" @@ -1208,10 +1208,10 @@ svelte-apexcharts "^1.0.2" svelte-flatpickr "^3.1.0" -"@budibase/types@1.3.13", "@budibase/types@^1.3.13": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.13.tgz#d71986f4785311322636231589ca5e1d29e87985" - integrity sha512-iqBjB3wart+rjQ8q/QbZU5JEljixVzzDwZu3i9rFCWbHAUH+GVeuP4CehdLlDRhCjoecFw+UxA6SuhCwdLi+yQ== +"@budibase/types@1.3.15-alpha.0": + version "1.3.15-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.15-alpha.0.tgz#813eb8415fc2df926572dd96d67467292fd692f4" + integrity sha512-rQ52X2v9xIbWfB9aUpiNfHsByg2OpAtUOrPkj/JQopyRdfTXuHC/IJiHvVBkYmappXo6D0p9VdcCvgeSPn/RMQ== "@bull-board/api@3.7.0": version "3.7.0" diff --git a/packages/worker/package.json b/packages/worker/package.json index f2e744fe1c..db818fed8d 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -36,7 +36,7 @@ "license": "GPL-3.0", "dependencies": { "@budibase/backend-core": "1.3.15-alpha.0", - "@budibase/pro": "1.3.13", + "@budibase/pro": "1.3.15-alpha.0", "@budibase/string-templates": "1.3.15-alpha.0", "@budibase/types": "1.3.15-alpha.0", "@koa/router": "8.0.8", diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 908b8a09c3..6d8559052a 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -291,12 +291,12 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@budibase/backend-core@1.3.13": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.13.tgz#62341d7eb2daba955069b4b54d1e7ef6ade62598" - integrity sha512-ib+ojvO8Yw5wCoHkE6Gc09D5EZiQL72g/KVEs0y2oRD92VGnv9VGpY3dA1A1UIRdi8wELDz20LrDaV/4lFbmfg== +"@budibase/backend-core@1.3.15-alpha.0": + version "1.3.15-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.15-alpha.0.tgz#d4fd3a00008c3d5018c57bb5b4f04360d60f9807" + integrity sha512-3X7K3rHPBs065y1nihZdT45twPNiK5FGoi82DQc7z2ub6nuD7hfn+A8WpEGEpofFwNQHme1XTVrJJjyBDME/ZQ== dependencies: - "@budibase/types" "^1.3.13" + "@budibase/types" "1.3.15-alpha.0" "@shopify/jest-koa-mocks" "5.0.1" "@techpass/passport-openidconnect" "0.3.2" aws-sdk "2.1030.0" @@ -326,21 +326,21 @@ uuid "8.3.2" zlib "1.0.5" -"@budibase/pro@1.3.13": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.13.tgz#2833898c04b041716f712ba95599da46d07e2d1d" - integrity sha512-l9AkPCCmOtX9htB7rT+cisgcihVXI4b5wsPzDwHKYfAj1rSRa/0FA+m6/V6D5FzwHAILY3//YOZmgPavL9gvMw== +"@budibase/pro@1.3.15-alpha.0": + version "1.3.15-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.15-alpha.0.tgz#92d0a74c5aa31c22020aeb584e05c90a9ca210a0" + integrity sha512-mNdwrtJt++WNKttizfvD1mpDZqQHhUAsY5SvlKAL6EiOJVYpJzW/p7m4fxn8hjhLtTrKdDThmb7nTyxE43Scdw== dependencies: - "@budibase/backend-core" "1.3.13" - "@budibase/types" "1.3.13" + "@budibase/backend-core" "1.3.15-alpha.0" + "@budibase/types" "1.3.15-alpha.0" "@koa/router" "8.0.8" joi "17.6.0" node-fetch "^2.6.1" -"@budibase/types@1.3.13", "@budibase/types@^1.3.13": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.13.tgz#d71986f4785311322636231589ca5e1d29e87985" - integrity sha512-iqBjB3wart+rjQ8q/QbZU5JEljixVzzDwZu3i9rFCWbHAUH+GVeuP4CehdLlDRhCjoecFw+UxA6SuhCwdLi+yQ== +"@budibase/types@1.3.15-alpha.0": + version "1.3.15-alpha.0" + resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.15-alpha.0.tgz#813eb8415fc2df926572dd96d67467292fd692f4" + integrity sha512-rQ52X2v9xIbWfB9aUpiNfHsByg2OpAtUOrPkj/JQopyRdfTXuHC/IJiHvVBkYmappXo6D0p9VdcCvgeSPn/RMQ== "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" From c89eb1994447b5268e362b318f258173b4e14ab5 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 12 Sep 2022 16:19:28 +0100 Subject: [PATCH 163/280] Undo reverse logic when filtering by component type --- .../portal/manage/plugins/index.svelte | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte index 7e19a0cbbe..46740d13fa 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte @@ -16,21 +16,23 @@ let modal let searchTerm = "" - + let filter = "all" let filterOptions = [ { label: "All Plugins", value: "all" }, - { label: "Components", value: "datasource" }, - { label: "Datasources", value: "component" }, + { label: "Components", value: "component" }, + { label: "Datasources", value: "datasource" }, ] - let filter = "all" - $: filteredPlugins = - filter === "all" && searchTerm.length === 0 - ? $plugins - : $plugins - .filter(plugin => plugin.schema.type !== filter) - .filter(plugin => - plugin?.name?.toLowerCase().includes(searchTerm.toLowerCase()) - ) + + $: filteredPlugins = $plugins + .filter(plugin => { + return filter === "all" || plugin.schema.type === filter + }) + .filter(plugin => { + return ( + !searchTerm || + plugin?.name?.toLowerCase().includes(searchTerm.toLowerCase()) + ) + }) onMount(async () => { await plugins.load() From 0415a67ef045785032c498ce559b53d4e9553dc5 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 12 Sep 2022 16:19:58 +0100 Subject: [PATCH 164/280] Fix capitalisation --- .../src/pages/builder/portal/manage/plugins/index.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte index 46740d13fa..a31cf71f03 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/index.svelte @@ -18,7 +18,7 @@ let searchTerm = "" let filter = "all" let filterOptions = [ - { label: "All Plugins", value: "all" }, + { label: "All plugins", value: "all" }, { label: "Components", value: "component" }, { label: "Datasources", value: "datasource" }, ] From 722a087af5add3036b976bfd2edce2767ddaeb5e Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 12 Sep 2022 16:21:47 +0100 Subject: [PATCH 165/280] Reverting organisation page changes. --- .../builder/portal/settings/organisation.svelte | 14 +++----------- .../api/controllers/{plugin.ts => plugin/index.ts} | 10 +++++----- packages/server/src/utilities/fileSystem/index.js | 10 ++++------ 3 files changed, 12 insertions(+), 22 deletions(-) rename packages/server/src/api/controllers/{plugin.ts => plugin/index.ts} (95%) diff --git a/packages/builder/src/pages/builder/portal/settings/organisation.svelte b/packages/builder/src/pages/builder/portal/settings/organisation.svelte index d52bd66d47..8c091ce952 100644 --- a/packages/builder/src/pages/builder/portal/settings/organisation.svelte +++ b/packages/builder/src/pages/builder/portal/settings/organisation.svelte @@ -15,7 +15,6 @@ import { API } from "api" import { writable } from "svelte/store" import { redirect } from "@roxi/routify" - import { onMount } from "svelte" // Only admins allowed here $: { @@ -34,12 +33,11 @@ }) let loading = false - async function uploadLogo() { + async function uploadLogo(file) { try { let data = new FormData() - data.append("file", $values.logo) - await API.uploadPlugin(data) - notifications.success("Plugin uploaded successfully") + data.append("file", file) + await API.uploadLogo(data) } catch (error) { notifications.error("Error uploading logo") } @@ -73,11 +71,6 @@ } loading = false } - - onMount(async () => { - const plugins = await API.getPlugins() - console.log(plugins) - }) {#if $auth.isAdmin} @@ -113,7 +106,6 @@ } }} /> -
diff --git a/packages/server/src/api/controllers/plugin.ts b/packages/server/src/api/controllers/plugin/index.ts similarity index 95% rename from packages/server/src/api/controllers/plugin.ts rename to packages/server/src/api/controllers/plugin/index.ts index 3941798ac4..de4aa2a50a 100644 --- a/packages/server/src/api/controllers/plugin.ts +++ b/packages/server/src/api/controllers/plugin/index.ts @@ -1,20 +1,20 @@ -import { ObjectStoreBuckets } from "../../constants" -import { loadJSFile } from "../../utilities/fileSystem" +import { ObjectStoreBuckets } from "../../../constants" +import { loadJSFile } from "../../../utilities/fileSystem" import { uploadedNpmPlugin, uploadedUrlPlugin, uploadedGithubPlugin, uploadedFilePlugin, -} from "./plugin/utils" +} from "./utils" import { getGlobalDB } from "@budibase/backend-core/tenancy" import { validate } from "@budibase/backend-core/plugins" -import { generatePluginID, getPluginParams } from "../../db/utils" +import { generatePluginID, getPluginParams } from "../../../db/utils" import { uploadDirectory, deleteFolder, } from "@budibase/backend-core/objectStore" import { PluginType, FileType } from "@budibase/types" -import env from "../../environment" +import env from "../../../environment" export async function getPlugins(type?: PluginType) { const db = getGlobalDB() diff --git a/packages/server/src/utilities/fileSystem/index.js b/packages/server/src/utilities/fileSystem/index.js index ef9088dd3e..40cc456356 100644 --- a/packages/server/src/utilities/fileSystem/index.js +++ b/packages/server/src/utilities/fileSystem/index.js @@ -426,36 +426,34 @@ exports.getDatasourcePlugin = async (name, url, hash) => { /** * Find for a file recursively from start path applying filter, return first match */ -const findFileRec = (startPath, filter) => { +exports.findFileRec = (startPath, filter) => { if (!fs.existsSync(startPath)) { return } - var files = fs.readdirSync(startPath) + const files = fs.readdirSync(startPath) for (let i = 0, len = files.length; i < len; i++) { const filename = join(startPath, files[i]) const stat = fs.lstatSync(filename) if (stat.isDirectory()) { - return findFileRec(filename, filter) + return exports.findFileRec(filename, filter) } else if (filename.endsWith(filter)) { return filename } } } -exports.findFileRec = findFileRec /** * Remove a folder which is not empty from the file system */ -const deleteFolderFileSystem = path => { +exports.deleteFolderFileSystem = path => { if (!fs.existsSync(path)) { return } fs.rmSync(path, { recursive: true, force: true }) } -exports.deleteFolderFileSystem = deleteFolderFileSystem /** * Full function definition for below can be found in the utilities. From b31cc043edb44179c25de89da4525942e90eda9c Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 12 Sep 2022 16:35:42 +0100 Subject: [PATCH 166/280] Update plugins UI styles --- .../plugins/_components/PluginRow.svelte | 21 ++++++---- .../portal/manage/plugins/index.svelte | 40 +++++++++---------- 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte index dd35ce752d..09a67c3583 100644 --- a/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte +++ b/packages/builder/src/pages/builder/portal/manage/plugins/_components/PluginRow.svelte @@ -21,7 +21,7 @@ : plugin.schema.schema.icon || "Beaker" -
+
detailsModal.show()}>
@@ -42,9 +42,8 @@
{plugin.schema.type.charAt(0).toUpperCase() + plugin.schema.type.slice(1)}
-
- +
@@ -98,13 +97,19 @@ From 27af24ec264b8fea506394f180f6c11d8d7aee86 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 12 Sep 2022 16:39:41 +0100 Subject: [PATCH 167/280] Revert organisation page --- .../portal/settings/organisation.svelte | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/settings/organisation.svelte b/packages/builder/src/pages/builder/portal/settings/organisation.svelte index d52bd66d47..6d1f26ce36 100644 --- a/packages/builder/src/pages/builder/portal/settings/organisation.svelte +++ b/packages/builder/src/pages/builder/portal/settings/organisation.svelte @@ -15,7 +15,6 @@ import { API } from "api" import { writable } from "svelte/store" import { redirect } from "@roxi/routify" - import { onMount } from "svelte" // Only admins allowed here $: { @@ -34,12 +33,11 @@ }) let loading = false - async function uploadLogo() { + async function uploadLogo(file) { try { let data = new FormData() - data.append("file", $values.logo) - await API.uploadPlugin(data) - notifications.success("Plugin uploaded successfully") + data.append("file", file) + await API.uploadLogo(data) } catch (error) { notifications.error("Error uploading logo") } @@ -73,11 +71,6 @@ } loading = false } - - onMount(async () => { - const plugins = await API.getPlugins() - console.log(plugins) - }) {#if $auth.isAdmin} @@ -95,14 +88,14 @@ Information Here you can update your logo and organization name. -
-
+
+
-