diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 4ada96accc..f2e7f2eda9 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -175,6 +175,7 @@ jobs: uses: actions/checkout@v3 with: submodules: true + fetch-depth: 0 token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - name: Check pro commit @@ -183,10 +184,10 @@ jobs: cd packages/pro pro_commit=$(git rev-parse HEAD) - branch=${{ github.base_ref || github.ref_name }} + branch="${{ github.base_ref || github.ref_name }}" echo "Running on branch `$branch` (base_ref=${{ github.base_ref }}, ref_name=${{ github.head_ref }})" - if [[ "$branch" == "master" ]]; then + if [[ $branch == "master" ]]; then base_commit=$(git rev-parse origin/master) else base_commit=$(git rev-parse origin/develop) diff --git a/lerna.json b/lerna.json index 77e870260b..c7289c8010 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.7.37-alpha.10", + "version": "2.7.37-alpha.14", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/src/db/errors.ts b/packages/backend-core/src/db/errors.ts new file mode 100644 index 0000000000..17f76c667b --- /dev/null +++ b/packages/backend-core/src/db/errors.ts @@ -0,0 +1,14 @@ +export function checkErrorCode(error: any, code: number) { + const stringCode = code.toString() + if (typeof error === "object") { + return error.status === code || error.message?.includes(stringCode) + } else if (typeof error === "number") { + return error === code + } else if (typeof error === "string") { + return error.includes(stringCode) + } +} + +export function isDocumentConflictError(error: any) { + return checkErrorCode(error, 409) +} diff --git a/packages/backend-core/src/db/index.ts b/packages/backend-core/src/db/index.ts index cf71199ecf..c47d1793dc 100644 --- a/packages/backend-core/src/db/index.ts +++ b/packages/backend-core/src/db/index.ts @@ -9,3 +9,4 @@ export * from "../constants/db" export { getGlobalDBName, baseGlobalDBName } from "../context" export * from "./lucene" export * as searchIndexes from "./searchIndexes" +export * from "./errors" diff --git a/packages/backend-core/src/logging/alerts.ts b/packages/backend-core/src/logging/alerts.ts index 625ecfcf15..b7173bc436 100644 --- a/packages/backend-core/src/logging/alerts.ts +++ b/packages/backend-core/src/logging/alerts.ts @@ -21,6 +21,6 @@ export function logAlertWithInfo( logAlert(message, error) } -export function logWarn(message: string) { - console.warn(`bb-warn: ${message}`) +export function logWarn(message: string, e?: any) { + console.warn(`bb-warn: ${message}`, e) } diff --git a/packages/builder/src/components/backend/Datasources/TableImportSelection/tableSelectionStore.js b/packages/builder/src/components/backend/Datasources/TableImportSelection/tableSelectionStore.js index 46238e333c..826d7d84ba 100644 --- a/packages/builder/src/components/backend/Datasources/TableImportSelection/tableSelectionStore.js +++ b/packages/builder/src/components/backend/Datasources/TableImportSelection/tableSelectionStore.js @@ -10,7 +10,11 @@ export const createTableSelectionStore = (integration, datasource) => { datasources.getTableNames(datasource).then(tableNames => { tableNamesStore.set(tableNames) - selectedTableNamesStore.set(tableNames.filter(t => datasource.entities[t])) + + selectedTableNamesStore.set( + tableNames.filter(tableName => datasource.entities[tableName]) + ) + loadingStore.set(false) }) diff --git a/packages/builder/src/components/design/settings/controls/SectionSelect.svelte b/packages/builder/src/components/design/settings/controls/SectionSelect.svelte index 6b3cf72016..4394f47cef 100644 --- a/packages/builder/src/components/design/settings/controls/SectionSelect.svelte +++ b/packages/builder/src/components/design/settings/controls/SectionSelect.svelte @@ -17,6 +17,10 @@ name: "Sidebar with Main", icon: "ColumnTwoC", }, + oneColumn: { + name: "One column", + icon: "LoupeView", + }, twoColumns: { name: "Two columns", icon: "ColumnTwoA", diff --git a/packages/builder/src/stores/backend/datasources.js b/packages/builder/src/stores/backend/datasources.js index b1db99b5d8..7d2db44d6a 100644 --- a/packages/builder/src/stores/backend/datasources.js +++ b/packages/builder/src/stores/backend/datasources.js @@ -144,8 +144,7 @@ export function createDatasourcesStore() { const response = await API.createDatasource({ datasource, - fetchSchema: - integration.plus && integration.name !== IntegrationTypes.GOOGLE_SHEETS, + fetchSchema: integration.plus, }) return updateDatasource(response) diff --git a/packages/client/manifest.json b/packages/client/manifest.json index 649038c20e..212042d3c0 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -2350,6 +2350,16 @@ "value": "above" } ] + }, + { + "type": "section", + "label": "Type", + "key": "type", + "defaultValue": "oneColumn", + "dependsOn": { + "setting": "labelPosition", + "value": "above" + } } ] }, diff --git a/packages/client/src/components/app/Section.svelte b/packages/client/src/components/app/Section.svelte index 5bd3364b94..11f0f2978f 100644 --- a/packages/client/src/components/app/Section.svelte +++ b/packages/client/src/components/app/Section.svelte @@ -11,6 +11,7 @@ let layoutMap = { mainSidebar: 2, sidebarMain: 2, + oneColumn: 1, twoColumns: 2, threeColumns: 3, } @@ -54,6 +55,9 @@ .sidebarMain { grid-template-columns: 1fr 3fr; } + .oneColumn { + grid-template-columns: 1fr; + } .twoColumns { grid-template-columns: 1fr 1fr; } diff --git a/packages/client/src/components/app/forms/FieldGroup.svelte b/packages/client/src/components/app/forms/FieldGroup.svelte index a2fbe7d103..9b495338e1 100644 --- a/packages/client/src/components/app/forms/FieldGroup.svelte +++ b/packages/client/src/components/app/forms/FieldGroup.svelte @@ -1,7 +1,9 @@