diff --git a/README.md b/README.md index a1d9f62f05..692c6b7100 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,6 @@ - - - @@ -52,8 +49,6 @@ Report a bug ยท Support: Discussions - & - Discord @@ -61,7 +56,7 @@ - **Build and ship real software.** Unlike other platforms, with Budibase you build and ship single page applications. Budibase applications have performance baked in and can be designed responsively, providing your users with a great experience. -- **Open source and extensable.** Budibase is open-source - licensed as GPL v3. This should fill you with confidence that Budibase will always be around. You can also code against Budibase or fork it and make changes as you please, providing a developer-friendly experience. +- **Open source and extensible.** Budibase is open-source - licensed as GPL v3. This should fill you with confidence that Budibase will always be around. You can also code against Budibase or fork it and make changes as you please, providing a developer-friendly experience. - **Load data or start from scratch.** Budibase pulls in data from multiple sources, including MongoDB, CouchDB, PostgreSQL, mySQL, Airtable, S3, DyanmoDB, or a REST API. And unlike other platforms, with Budibase you can start from scratch and create business apps with no data sources. [Request new data sources](https://github.com/Budibase/budibase/discussions?discussions_q=category%3AIdeas). @@ -79,28 +74,6 @@ --- -## โ Status -- [x] Alpha: We are demoing Budibase to users and receiving feedback -- [x] Private Beta: We are testing Budibase with a closed set of customers -- [x] Public Beta: Anyone can [get started](https://docs.budibase.com/getting-started). -- [ ] Official Launch - -Watch "releases" of this repo to get notified of major updates, and give the star button a click whilst you're there. - -
- -
- -### Stargazers over time - -[![Stargazers over time](https://starchart.cc/Budibase/budibase.svg)](https://starchart.cc/Budibase/budibase) - -If you are having issues between updates of the builder, please use the guide [here](https://github.com/Budibase/budibase/blob/HEAD/.github/CONTRIBUTING.md#troubleshooting) to clear down your environment. - - ---- - - ## ๐ Getting Started with Budibase in 5 minutes To get started, you must have docker and docker compose installed on your machine. @@ -141,21 +114,40 @@ Done! You are now ready to build powerful internal tools in minutes. For additio The Budibase [documentation lives here](https://docs.budibase.com). -You can also follow a quick tutorial on [how to build a CRM with Budibase](https://docs.budibase.com/tutorial/tutorial-introduction) + +--- + +## โ Status +- [x] Alpha: We are demoing Budibase to users and receiving feedback +- [x] Private Beta: We are testing Budibase with a closed set of customers +- [x] Public Beta: Anyone can [get started](https://docs.budibase.com/getting-started). +- [ ] Official Launch + +Watch "releases" of this repo to get notified of major updates, and give the star button a click whilst you're there. + ++ +
+ + +--- + +## Stargazers over time + +[![Stargazers over time](https://starchart.cc/Budibase/budibase.svg)](https://starchart.cc/Budibase/budibase) + +If you are having issues between updates of the builder, please use the guide [here](https://github.com/Budibase/budibase/blob/HEAD/.github/CONTRIBUTING.md#troubleshooting) to clear down your environment. --- -## Roadmap - -Checkout our [Public Roadmap](https://github.com/Budibase/budibase/projects/10). If you would like to discuss some of the items on the roadmap, please feel to reach out on [Discord](https://discord.gg/rCYayfe), or via [Github discussions](https://github.com/Budibase/budibase/discussions) - - ## โ Code of Conduct Budibase is dedicated to providing a welcoming, diverse, and harrassment-free experience for everyone. We expect everyone in the Budibase community to abide by our [**Code of Conduct**](https://github.com/Budibase/budibase/blob/HEAD/.github/CODE_OF_CONDUCT.md). Please read it. +--- + ## ๐ Contributing to Budibase From opening a bug report to creating a pull request: every contribution is appreciated and welcomed. If you're planning to implement a new feature or change the API please create an issue first. This way we can ensure your work is not in vain. @@ -188,11 +180,7 @@ Budibase is open-source. The builder is licensed [AGPL v3](https://www.gnu.org/l ## ๐ฌ Get in touch -If you have a question or would like to talk with other Budibase users, please hop over to [Github discussions](https://github.com/Budibase/budibase/discussions) or join our Discord server: - -[Discord chatroom](https://discord.gg/rCYayfe) - -![Discord Shield](https://discordapp.com/api/guilds/733030666647765003/widget.png?style=shield) +If you have a question or would like to talk with other Budibase users and join our community, please hop over to [Github discussions](https://github.com/Budibase/budibase/discussions) --- diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index 0cd7bc92bf..b03b433cef 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -24,6 +24,8 @@ services: ENABLE_ANALYTICS: "true" REDIS_URL: redis-service:6379 REDIS_PASSWORD: ${REDIS_PASSWORD} + volumes: + - ./logs:/logs depends_on: - worker-service @@ -46,6 +48,8 @@ services: INTERNAL_API_KEY: ${INTERNAL_API_KEY} REDIS_URL: redis-service:6379 REDIS_PASSWORD: ${REDIS_PASSWORD} + volumes: + - ./logs:/logs depends_on: - redis-service - minio-service @@ -109,6 +113,21 @@ services: - "${REDIS_PORT}:6379" volumes: - redis_data:/data + + watchtower-service: + image: containrrr/watchtower + volumes: + - /var/run/docker.sock:/var/run/docker.sock + command: --debug --http-api-update budibase/apps budibase/worker + environment: + - WATCHTOWER_HTTP_API=true + - WATCHTOWER_HTTP_API_TOKEN=budibase + - WATCHTOWER_CLEANUP=true + labels: + - "com.centurylinklabs.watchtower.enable=false" + ports: + - 6161:8080 + volumes: couchdb3_data: diff --git a/hosting/envoy.dev.yaml.hbs b/hosting/envoy.dev.yaml.hbs index 054ceb9d3f..080311ee49 100644 --- a/hosting/envoy.dev.yaml.hbs +++ b/hosting/envoy.dev.yaml.hbs @@ -133,4 +133,3 @@ static_resources: socket_address: address: {{ address }} port_value: 4002 - diff --git a/hosting/envoy.yaml b/hosting/envoy.yaml index 463b32ab60..20e912434a 100644 --- a/hosting/envoy.yaml +++ b/hosting/envoy.yaml @@ -21,6 +21,10 @@ static_resources: cluster: app-service prefix_rewrite: "/" + - match: { path: "/v1/update" } + route: + cluster: watchtower-service + - match: { prefix: "/builder/" } route: cluster: app-service @@ -123,3 +127,17 @@ static_resources: address: couchdb-service port_value: 5984 + - name: watchtower-service + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + load_assignment: + cluster_name: watchtower-service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: watchtower-service + port_value: 6161 + diff --git a/lerna.json b/lerna.json index 301a2ed2d7..105efb7cd5 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "0.9.21", + "version": "0.9.27", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/auth/package.json b/packages/auth/package.json index c4be809e08..d2704c8618 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/auth", - "version": "0.9.21", + "version": "0.9.27", "description": "Authentication middlewares for budibase builder and apps", "main": "src/index.js", "author": "Budibase", diff --git a/packages/auth/src/index.js b/packages/auth/src/index.js index d2ba86a524..9582d6ffd6 100644 --- a/packages/auth/src/index.js +++ b/packages/auth/src/index.js @@ -2,7 +2,7 @@ const passport = require("koa-passport") const LocalStrategy = require("passport-local").Strategy const JwtStrategy = require("passport-jwt").Strategy const { StaticDatabases } = require("./db/utils") -const { jwt, local, authenticated, google } = require("./middleware") +const { jwt, local, authenticated, google, auditLog } = require("./middleware") const { setDB, getDB } = require("./db") // Strategies @@ -45,6 +45,7 @@ module.exports = { passport, google, jwt: require("jsonwebtoken"), + auditLog, }, StaticDatabases, constants: require("./constants"), diff --git a/packages/auth/src/middleware/auditLog.js b/packages/auth/src/middleware/auditLog.js new file mode 100644 index 0000000000..c9063ae2e0 --- /dev/null +++ b/packages/auth/src/middleware/auditLog.js @@ -0,0 +1,4 @@ +module.exports = async (ctx, next) => { + // Placeholder for audit log middleware + return next() +} diff --git a/packages/auth/src/middleware/index.js b/packages/auth/src/middleware/index.js index 519233eda4..2a249ce0f9 100644 --- a/packages/auth/src/middleware/index.js +++ b/packages/auth/src/middleware/index.js @@ -2,10 +2,12 @@ const jwt = require("./passport/jwt") const local = require("./passport/local") const google = require("./passport/google") const authenticated = require("./authenticated") +const auditLog = require("./auditLog") module.exports = { google, jwt, local, authenticated, + auditLog, } diff --git a/packages/auth/src/objectStore/index.js b/packages/auth/src/objectStore/index.js index a157332ae5..80875fdfee 100644 --- a/packages/auth/src/objectStore/index.js +++ b/packages/auth/src/objectStore/index.js @@ -159,7 +159,7 @@ exports.upload = async ({ * Similar to the upload function but can be used to send a file stream * through to the object store. */ -exports.streamUpload = async (bucketName, filename, stream) => { +exports.streamUpload = async (bucketName, filename, stream, extra = {}) => { const objectStore = exports.ObjectStore(bucketName) await exports.makeSureBucketExists(objectStore, bucketName) @@ -167,6 +167,7 @@ exports.streamUpload = async (bucketName, filename, stream) => { Bucket: sanitizeBucket(bucketName), Key: sanitizeKey(filename), Body: stream, + ...extra, } return objectStore.upload(params).promise() } diff --git a/packages/auth/src/security/roles.js b/packages/auth/src/security/roles.js index d652c25b00..53e1b90d73 100644 --- a/packages/auth/src/security/roles.js +++ b/packages/auth/src/security/roles.js @@ -13,7 +13,6 @@ const BUILTIN_IDS = { POWER: "POWER", BASIC: "BASIC", PUBLIC: "PUBLIC", - BUILDER: "BUILDER", } // exclude internal roles like builder diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 48ea168f97..834e9dcd60 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": "0.9.21", + "version": "0.9.27", "license": "AGPL-3.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/bbui/src/Form/Core/RadioGroup.svelte b/packages/bbui/src/Form/Core/RadioGroup.svelte index 4ead9ed311..d7941b2518 100644 --- a/packages/bbui/src/Form/Core/RadioGroup.svelte +++ b/packages/bbui/src/Form/Core/RadioGroup.svelte @@ -37,3 +37,9 @@ {/each} {/if} + + diff --git a/packages/builder/package.json b/packages/builder/package.json index a78d619569..5c19608dab 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "0.9.21", + "version": "0.9.27", "license": "AGPL-3.0", "private": true, "scripts": { @@ -65,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^0.9.21", - "@budibase/client": "^0.9.21", + "@budibase/bbui": "^0.9.27", + "@budibase/client": "^0.9.27", "@budibase/colorpicker": "1.1.2", - "@budibase/string-templates": "^0.9.21", + "@budibase/string-templates": "^0.9.27", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index 89532e3bc3..5ce8e407c1 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -136,7 +136,7 @@ const getContextBindings = (asset, componentId) => { if (!datasource) { return } - const info = getSchemaForDatasource(datasource) + const info = getSchemaForDatasource(asset, datasource) schema = info.schema readablePrefix = info.table?.name } @@ -191,7 +191,7 @@ const getContextBindings = (asset, componentId) => { */ const getUserBindings = () => { let bindings = [] - const { schema } = getSchemaForDatasource({ + const { schema } = getSchemaForDatasource(null, { type: "table", tableId: TableNames.USERS, }) @@ -244,11 +244,15 @@ const getUrlBindings = asset => { /** * Gets a schema for a datasource object. */ -export const getSchemaForDatasource = (datasource, isForm = false) => { +export const getSchemaForDatasource = (asset, datasource, isForm = false) => { let schema, table if (datasource) { const { type } = datasource - if (type === "query") { + if (type === "provider") { + const component = findComponent(asset.props, datasource.providerId) + const source = getDatasourceForProvider(asset, component) + return getSchemaForDatasource(asset, source, isForm) + } else if (type === "query") { const queries = get(queriesStores).list table = queries.find(query => query._id === datasource._id) } else { diff --git a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js index 02b3c20a2f..e234a1a770 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js +++ b/packages/builder/src/builderStore/store/screenTemplates/utils/commonComponents.js @@ -174,7 +174,7 @@ const fieldTypeToComponentMap = { } export function makeDatasourceFormComponents(datasource) { - const { schema } = getSchemaForDatasource(datasource, true) + const { schema } = getSchemaForDatasource(null, datasource, true) let components = [] let fields = Object.keys(schema || {}) fields.forEach(field => { diff --git a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte index f68cc95e24..152f2e72c8 100644 --- a/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/CreateEditColumn.svelte @@ -43,6 +43,7 @@ } let originalName = field.name + const linkEditDisabled = originalName != null let primaryDisplay = $tables.selected.primaryDisplay == null || $tables.selected.primaryDisplay === field.name @@ -198,7 +199,7 @@ - -