Merge branch 'master' of github.com:Budibase/budibase into develop
This commit is contained in:
commit
fd4be9d003
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.84-alpha.0",
|
"version": "1.0.84",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/backend-core",
|
"name": "@budibase/backend-core",
|
||||||
"version": "1.0.84-alpha.0",
|
"version": "1.0.84",
|
||||||
"description": "Budibase backend core libraries used in server and worker",
|
"description": "Budibase backend core libraries used in server and worker",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/bbui",
|
"name": "@budibase/bbui",
|
||||||
"description": "A UI solution used in the different Budibase projects.",
|
"description": "A UI solution used in the different Budibase projects.",
|
||||||
"version": "1.0.84-alpha.0",
|
"version": "1.0.84",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"module": "dist/bbui.es.js",
|
"module": "dist/bbui.es.js",
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
||||||
"@budibase/string-templates": "^1.0.84-alpha.0",
|
"@budibase/string-templates": "^1.0.84",
|
||||||
"@spectrum-css/actionbutton": "^1.0.1",
|
"@spectrum-css/actionbutton": "^1.0.1",
|
||||||
"@spectrum-css/actiongroup": "^1.0.1",
|
"@spectrum-css/actiongroup": "^1.0.1",
|
||||||
"@spectrum-css/avatar": "^3.0.2",
|
"@spectrum-css/avatar": "^3.0.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "1.0.84-alpha.0",
|
"version": "1.0.84",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -65,10 +65,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.84-alpha.0",
|
"@budibase/bbui": "^1.0.84",
|
||||||
"@budibase/client": "^1.0.84-alpha.0",
|
"@budibase/client": "^1.0.84",
|
||||||
"@budibase/frontend-core": "^1.0.84-alpha.0",
|
"@budibase/frontend-core": "^1.0.84",
|
||||||
"@budibase/string-templates": "^1.0.84-alpha.0",
|
"@budibase/string-templates": "^1.0.84",
|
||||||
"@sentry/browser": "5.19.1",
|
"@sentry/browser": "5.19.1",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "1.0.84-alpha.0",
|
"version": "1.0.84",
|
||||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "1.0.84-alpha.0",
|
"version": "1.0.84",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"module": "dist/budibase-client.js",
|
"module": "dist/budibase-client.js",
|
||||||
"main": "dist/budibase-client.js",
|
"main": "dist/budibase-client.js",
|
||||||
|
@ -19,9 +19,9 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.84-alpha.0",
|
"@budibase/bbui": "^1.0.84",
|
||||||
"@budibase/frontend-core": "^1.0.84-alpha.0",
|
"@budibase/frontend-core": "^1.0.84",
|
||||||
"@budibase/string-templates": "^1.0.84-alpha.0",
|
"@budibase/string-templates": "^1.0.84",
|
||||||
"@spectrum-css/button": "^3.0.3",
|
"@spectrum-css/button": "^3.0.3",
|
||||||
"@spectrum-css/card": "^3.0.3",
|
"@spectrum-css/card": "^3.0.3",
|
||||||
"@spectrum-css/divider": "^1.0.3",
|
"@spectrum-css/divider": "^1.0.3",
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/frontend-core",
|
"name": "@budibase/frontend-core",
|
||||||
"version": "1.0.84-alpha.0",
|
"version": "1.0.84",
|
||||||
"description": "Budibase frontend core libraries used in builder and client",
|
"description": "Budibase frontend core libraries used in builder and client",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.84-alpha.0",
|
"@budibase/bbui": "^1.0.84",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"svelte": "^3.46.2"
|
"svelte": "^3.46.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.0.84-alpha.0",
|
"version": "1.0.84",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -71,9 +71,9 @@
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apidevtools/swagger-parser": "^10.0.3",
|
"@apidevtools/swagger-parser": "^10.0.3",
|
||||||
"@budibase/backend-core": "^1.0.84-alpha.0",
|
"@budibase/backend-core": "^1.0.84",
|
||||||
"@budibase/client": "^1.0.84-alpha.0",
|
"@budibase/client": "^1.0.84",
|
||||||
"@budibase/string-templates": "^1.0.84-alpha.0",
|
"@budibase/string-templates": "^1.0.84",
|
||||||
"@bull-board/api": "^3.7.0",
|
"@bull-board/api": "^3.7.0",
|
||||||
"@bull-board/koa": "^3.7.0",
|
"@bull-board/koa": "^3.7.0",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
|
|
|
@ -8,5 +8,6 @@ export interface DatasourcePlus extends IntegrationBase {
|
||||||
// if the datasource supports the use of bindings directly (to protect against SQL injection)
|
// if the datasource supports the use of bindings directly (to protect against SQL injection)
|
||||||
// this returns the format of the identifier
|
// this returns the format of the identifier
|
||||||
getBindingIdentifier(): string
|
getBindingIdentifier(): string
|
||||||
|
getStringConcat(parts: string[]): string
|
||||||
buildSchema(datasourceId: string, entities: Record<string, Table>): any
|
buildSchema(datasourceId: string, entities: Record<string, Table>): any
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,6 +115,10 @@ module GoogleSheetsModule {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getStringConcat(parts: string[]) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pull the spreadsheet ID out from a valid google sheets URL
|
* Pull the spreadsheet ID out from a valid google sheets URL
|
||||||
* @param spreadsheetId - the URL or standard spreadsheetId of the google sheet
|
* @param spreadsheetId - the URL or standard spreadsheetId of the google sheet
|
||||||
|
|
|
@ -126,7 +126,11 @@ module MSSQLModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
getBindingIdentifier(): string {
|
getBindingIdentifier(): string {
|
||||||
return `(@p${this.index++})`
|
return `@p${this.index++}`
|
||||||
|
}
|
||||||
|
|
||||||
|
getStringConcat(parts: string[]): string {
|
||||||
|
return `concat(${parts.join(", ")})`
|
||||||
}
|
}
|
||||||
|
|
||||||
async connect() {
|
async connect() {
|
||||||
|
|
|
@ -99,6 +99,10 @@ module MySQLModule {
|
||||||
return "?"
|
return "?"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getStringConcat(parts: string[]): string {
|
||||||
|
return `concat(${parts.join(", ")})`
|
||||||
|
}
|
||||||
|
|
||||||
async connect() {
|
async connect() {
|
||||||
this.client = await mysql.createConnection(this.config)
|
this.client = await mysql.createConnection(this.config)
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,6 +179,10 @@ module OracleModule {
|
||||||
return `:${this.index++}`
|
return `:${this.index++}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getStringConcat(parts: string[]): string {
|
||||||
|
return parts.join(" || ")
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map the flat tabular columns and constraints data into a nested object
|
* Map the flat tabular columns and constraints data into a nested object
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -148,6 +148,10 @@ module PostgresModule {
|
||||||
return `$${this.index++}`
|
return `$${this.index++}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getStringConcat(parts: string[]): string {
|
||||||
|
return parts.join(" || ")
|
||||||
|
}
|
||||||
|
|
||||||
async internalQuery(query: SqlQuery) {
|
async internalQuery(query: SqlQuery) {
|
||||||
const client = this.client
|
const client = this.client
|
||||||
this.index = 1
|
this.index = 1
|
||||||
|
|
|
@ -37,7 +37,23 @@ class QueryRunner {
|
||||||
for (let binding of bindings) {
|
for (let binding of bindings) {
|
||||||
let variable = integration.getBindingIdentifier()
|
let variable = integration.getBindingIdentifier()
|
||||||
variables.push(binding)
|
variables.push(binding)
|
||||||
sql = sql.replace(binding, variable)
|
// check if the variable was used as part of a string concat e.g. 'Hello {{binding}}'
|
||||||
|
const charConstRegex = new RegExp(`'[^']*${binding}[^']*'`)
|
||||||
|
const charConstMatch = sql.match(charConstRegex)
|
||||||
|
if (charConstMatch) {
|
||||||
|
let [part1, part2] = charConstMatch[0].split(binding)
|
||||||
|
part1 = `'${part1.substring(1)}'`
|
||||||
|
part2 = `'${part2.substring(0, part2.length - 1)}'`
|
||||||
|
sql = sql.replace(
|
||||||
|
charConstMatch[0],
|
||||||
|
integration.getStringConcat([part1, variable, part2])
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
sql = sql.replace(binding, variable)
|
||||||
|
}
|
||||||
|
// const indexOfBinding = sql.indexOf(binding)
|
||||||
|
// const constantStr = `'${binding}'`
|
||||||
|
// sql = sql.replace(sql.indexOf(constantStr) === indexOfBinding - 1 ? constantStr : binding, variable)
|
||||||
}
|
}
|
||||||
// replicate the knex structure
|
// replicate the knex structure
|
||||||
fields.sql = sql
|
fields.sql = sql
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "1.0.84-alpha.0",
|
"version": "1.0.84",
|
||||||
"description": "Handlebars wrapper for Budibase templating.",
|
"description": "Handlebars wrapper for Budibase templating.",
|
||||||
"main": "src/index.cjs",
|
"main": "src/index.cjs",
|
||||||
"module": "dist/bundle.mjs",
|
"module": "dist/bundle.mjs",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.0.84-alpha.0",
|
"version": "1.0.84",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "^1.0.84-alpha.0",
|
"@budibase/backend-core": "^1.0.84",
|
||||||
"@budibase/string-templates": "^1.0.84-alpha.0",
|
"@budibase/string-templates": "^1.0.84",
|
||||||
"@koa/router": "^8.0.0",
|
"@koa/router": "^8.0.0",
|
||||||
"@sentry/node": "^6.0.0",
|
"@sentry/node": "^6.0.0",
|
||||||
"@techpass/passport-openidconnect": "^0.3.0",
|
"@techpass/passport-openidconnect": "^0.3.0",
|
||||||
|
|
Loading…
Reference in New Issue