1
0
Fork 0
mirror of synced 2024-10-05 20:44:47 +13:00

Merge branch 'master' of github.com:Budibase/budibase

This commit is contained in:
mike12345567 2022-04-23 13:14:01 +01:00
commit eac5796928
11 changed files with 57 additions and 26 deletions

View file

@ -1,5 +1,5 @@
{
"version": "1.0.117",
"version": "1.0.118",
"npmClient": "yarn",
"packages": [
"packages/*"

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "1.0.117",
"version": "1.0.118",
"description": "Budibase backend core libraries used in server and worker",
"main": "src/index.js",
"author": "Budibase",

View file

@ -20,16 +20,47 @@ exports.getCouchUrl = () => {
return `${protocol}://${env.COUCH_DB_USERNAME}:${env.COUCH_DB_PASSWORD}@${rest}`
}
exports.splitCouchUrl = url => {
const [protocol, rest] = url.split("://")
const [auth, host] = rest.split("@")
const [username, password] = auth.split(":")
return {
url: `${protocol}://${host}`,
auth: {
username,
password,
},
}
}
/**
* Return a constructor for PouchDB.
* This should be rarely used outside of the main application config.
* Exposed for exceptional cases such as in-memory views.
*/
exports.getPouch = (opts = {}) => {
const COUCH_DB_URL = exports.getCouchUrl() || "http://localhost:4005"
let auth = {
username: env.COUCH_DB_USERNAME,
password: env.COUCH_DB_PASSWORD,
}
let url = exports.getCouchUrl() || "http://localhost:4005"
// need to update security settings
if (!auth.username || !auth.password || url.includes("@")) {
const split = exports.splitCouchUrl(url)
url = split.url
auth = split.auth
}
const authCookie = Buffer.from(`${auth.username}:${auth.password}`).toString(
"base64"
)
let POUCH_DB_DEFAULTS = {
prefix: COUCH_DB_URL,
prefix: url,
fetch: (url, opts) => {
// use a specific authorization cookie - be very explicit about how we authenticate
opts.headers.set("Authorization", `Basic ${authCookie}`)
return PouchDB.fetch(url, opts)
},
}
if (opts.inMemory) {

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "1.0.117",
"version": "1.0.118",
"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.0.117",
"@budibase/string-templates": "^1.0.118",
"@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2",

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "1.0.117",
"version": "1.0.118",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -65,10 +65,10 @@
}
},
"dependencies": {
"@budibase/bbui": "^1.0.117",
"@budibase/client": "^1.0.117",
"@budibase/frontend-core": "^1.0.117",
"@budibase/string-templates": "^1.0.117",
"@budibase/bbui": "^1.0.118",
"@budibase/client": "^1.0.118",
"@budibase/frontend-core": "^1.0.118",
"@budibase/string-templates": "^1.0.118",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "1.0.117",
"version": "1.0.118",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "1.0.117",
"version": "1.0.118",
"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.0.117",
"@budibase/frontend-core": "^1.0.117",
"@budibase/string-templates": "^1.0.117",
"@budibase/bbui": "^1.0.118",
"@budibase/frontend-core": "^1.0.118",
"@budibase/string-templates": "^1.0.118",
"@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3",

View file

@ -1,12 +1,12 @@
{
"name": "@budibase/frontend-core",
"version": "1.0.117",
"version": "1.0.118",
"description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase",
"license": "MPL-2.0",
"svelte": "src/index.js",
"dependencies": {
"@budibase/bbui": "^1.0.117",
"@budibase/bbui": "^1.0.118",
"lodash": "^4.17.21",
"svelte": "^3.46.2"
}

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "1.0.117",
"version": "1.0.118",
"description": "Budibase Web Server",
"main": "src/index.ts",
"repository": {
@ -68,9 +68,9 @@
"license": "GPL-3.0",
"dependencies": {
"@apidevtools/swagger-parser": "^10.0.3",
"@budibase/backend-core": "^1.0.117",
"@budibase/client": "^1.0.117",
"@budibase/string-templates": "^1.0.117",
"@budibase/backend-core": "^1.0.118",
"@budibase/client": "^1.0.118",
"@budibase/string-templates": "^1.0.118",
"@bull-board/api": "^3.7.0",
"@bull-board/koa": "^3.7.0",
"@elastic/elasticsearch": "7.10.0",

View file

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "1.0.117",
"version": "1.0.118",
"description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs",
"module": "dist/bundle.mjs",

View file

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "1.0.117",
"version": "1.0.118",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -31,8 +31,8 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "^1.0.117",
"@budibase/string-templates": "^1.0.117",
"@budibase/backend-core": "^1.0.118",
"@budibase/string-templates": "^1.0.118",
"@koa/router": "^8.0.0",
"@sentry/node": "^6.0.0",
"@techpass/passport-openidconnect": "^0.3.0",