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/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/objectStore/index.ts b/packages/backend-core/src/objectStore/index.ts
index a9f7981844..a97aa8f65d 100644
--- a/packages/backend-core/src/objectStore/index.ts
+++ b/packages/backend-core/src/objectStore/index.ts
@@ -307,9 +307,13 @@ export const uploadDirectory = async (
return files
}
-exports.downloadTarballDirect = async (url: string, path: string) => {
+exports.downloadTarballDirect = async (
+ url: string,
+ path: string,
+ headers = {}
+) => {
path = sanitizeKey(path)
- const response = await fetch(url)
+ const response = await fetch(url, { headers })
if (!response.ok) {
throw new Error(`unexpected response ${response.statusText}`)
}
diff --git a/packages/backend-core/src/plugin/index.ts b/packages/backend-core/src/plugin/index.ts
new file mode 100644
index 0000000000..a6d1853007
--- /dev/null
+++ b/packages/backend-core/src/plugin/index.ts
@@ -0,0 +1,7 @@
+import * as utils from "./utils"
+
+const pkg = {
+ ...utils,
+}
+
+export = pkg
diff --git a/packages/cli/src/plugins/validate.js b/packages/backend-core/src/plugin/utils.js
similarity index 91%
rename from packages/cli/src/plugins/validate.js
rename to packages/backend-core/src/plugin/utils.js
index a6b4555cbd..020fb4484d 100644
--- a/packages/cli/src/plugins/validate.js
+++ b/packages/backend-core/src/plugin/utils.js
@@ -1,5 +1,8 @@
-const { PluginTypes } = require("./constants")
-const { DatasourceFieldType, QueryType } = require("@budibase/types")
+const {
+ DatasourceFieldType,
+ QueryType,
+ PluginType,
+} = require("@budibase/types")
const joi = require("joi")
const DATASOURCE_TYPES = [
@@ -78,11 +81,11 @@ function validateDatasource(schema) {
}
exports.validate = schema => {
- switch (schema.type) {
- case PluginTypes.COMPONENT:
+ switch (schema?.type) {
+ case PluginType.COMPONENT:
validateComponent(schema)
break
- case PluginTypes.DATASOURCE:
+ case PluginType.DATASOURCE:
validateDatasource(schema)
break
default:
diff --git a/packages/bbui/src/Label/Label.svelte b/packages/bbui/src/Label/Label.svelte
index 3395ab4179..6b3392ce2d 100644
--- a/packages/bbui/src/Label/Label.svelte
+++ b/packages/bbui/src/Label/Label.svelte
@@ -4,10 +4,15 @@
export let size = "M"
export let tooltip = ""
+ export let muted