diff --git a/.github/workflows/release-develop.yml b/.github/workflows/release-develop.yml index 6618884369..c724b717e2 100644 --- a/.github/workflows/release-develop.yml +++ b/.github/workflows/release-develop.yml @@ -37,7 +37,7 @@ jobs: with: node-version: 14.x - - run: yarn + - run: yarn install --frozen-lockfile - name: Update versions run: | version=$(cat lerna.json \ diff --git a/.github/workflows/release-master.yml b/.github/workflows/release-master.yml index 6b2aecbf7d..4959194064 100644 --- a/.github/workflows/release-master.yml +++ b/.github/workflows/release-master.yml @@ -42,7 +42,7 @@ jobs: with: node-version: 14.x - - run: yarn + - run: yarn install --frozen-lockfile - name: Update versions run: | version=$(cat lerna.json \ diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 6e667d23a8..ac35929be1 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -144,8 +144,6 @@ The following commands can be executed to manually get Budibase up and running ( `yarn` to install project dependencies -`yarn bootstrap` will install all budibase modules and symlink them together using lerna. - `yarn build` will build all budibase packages. #### 4. Running @@ -243,7 +241,7 @@ An overview of the CI pipelines can be found [here](../.github/workflows/README. Note that only budibase maintainers will be able to access the pro repo. -The `yarn bootstrap` command can be used to replace the NPM supplied dependency with the local source aware version. This is achieved using the `yarn link` command. To see specifically how dependencies are linked see [scripts/link-dependencies.sh](../scripts/link-dependencies.sh). The same link script is used to link dependencies to account-portal in local dev. +By default, NX will make sure that dependencies are replaced with local source aware version. This is achieved using the `yarn link` command. To see specifically how dependencies are linked see [scripts/link-dependencies.sh](../scripts/link-dependencies.sh). The same link script is used to link dependencies to account-portal in local dev. ### Troubleshooting diff --git a/hosting/single/Dockerfile b/hosting/single/Dockerfile index fadcf235e9..64a6b01365 100644 --- a/hosting/single/Dockerfile +++ b/hosting/single/Dockerfile @@ -1,22 +1,22 @@ -FROM node:14-slim as build +FROM node:16-slim as build # install node-gyp dependencies RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends apt-utils cron g++ make python # add pin script WORKDIR / -ADD scripts/pinVersions.js scripts/cleanup.sh ./ +ADD scripts/cleanup.sh ./ RUN chmod +x /cleanup.sh # build server WORKDIR /app ADD packages/server . -RUN node /pinVersions.js && yarn && yarn build && /cleanup.sh +RUN yarn install --frozen-lockfile --production=true && /cleanup.sh # build worker WORKDIR /worker ADD packages/worker . -RUN node /pinVersions.js && yarn && yarn build && /cleanup.sh +RUN yarn install --frozen-lockfile --production=true && /cleanup.sh FROM budibase/couchdb ARG TARGETARCH @@ -31,9 +31,7 @@ COPY --from=build /worker /worker # install base dependencies RUN apt-get update && \ - apt-get install -y --no-install-recommends software-properties-common nginx uuid-runtime redis-server && \ - apt-add-repository 'deb http://security.debian.org/debian-security bullseye-security/updates main' && \ - apt-get update + apt-get install -y --no-install-recommends software-properties-common nginx uuid-runtime redis-server # install other dependencies, nodejs, oracle requirements, jdk8, redis, nginx WORKDIR /nodejs diff --git a/lerna.json b/lerna.json index 1362495320..6a1a54fb7b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.6.19-alpha.6", + "version": "2.6.19-alpha.12", "npmClient": "yarn", "packages": [ "packages/backend-core", diff --git a/package.json b/package.json index 70eceef4fd..edbb82b892 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "private": true, "devDependencies": { "@esbuild-plugins/node-resolve": "^0.2.2", + "@esbuild-plugins/tsconfig-paths": "^0.1.2", "@nx/esbuild": "16.2.1", "@nx/js": "16.2.1", "@rollup/plugin-json": "^4.0.2", @@ -29,8 +30,8 @@ }, "scripts": { "preinstall": "node scripts/syncProPackage.js", - "setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn bootstrap && yarn build && yarn dev", - "bootstrap": "./scripts/bootstrap.sh && ./scripts/link-dependencies.sh", + "setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn build && yarn dev", + "bootstrap": "./scripts/link-dependencies.sh && echo '***BOOTSTRAP ONLY REQUIRED FOR USE WITH ACCOUNT PORTAL***'", "build": "yarn nx run-many -t=build", "build:dev": "lerna run --stream prebuild && yarn nx run-many --target=build --output-style=dynamic --watch --preserveWatchOutput", "backend:bootstrap": "./scripts/scopeBackend.sh && yarn run bootstrap", @@ -60,16 +61,16 @@ "lint:fix:prettier": "prettier --write \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --write \"qa-core/**/*.{js,ts,svelte}\"", "lint:fix": "yarn run lint:fix:prettier && yarn run lint:fix:eslint", "build:specs": "lerna run --stream specs", - "build:docker": "lerna run --stream build:docker && npm run build:docker:proxy && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh $BUDIBASE_RELEASE_VERSION && cd -", + "build:docker": "lerna run --stream build:docker && yarn build:docker:proxy && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh $BUDIBASE_RELEASE_VERSION && cd -", "build:docker:pre": "lerna run --stream build && lerna run --stream predocker", "build:docker:proxy": "docker build hosting/proxy -t proxy-service", "build:docker:selfhost": "lerna run --stream build:docker && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh latest && cd -", - "build:docker:develop": "node scripts/pinVersions && lerna run --stream build:docker && npm run build:docker:proxy && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -", + "build:docker:develop": "node scripts/pinVersions && lerna run --stream build:docker && yarn build:docker:proxy && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh develop && cd -", "build:docker:airgap": "node hosting/scripts/airgapped/airgappedDockerBuild", "build:digitalocean": "cd hosting/digitalocean && ./build.sh && cd -", "build:docker:single:multiarch": "docker buildx build --platform linux/arm64,linux/amd64 -f hosting/single/Dockerfile -t budibase:latest .", "build:docker:single:image": "docker build -f hosting/single/Dockerfile -t budibase:latest .", - "build:docker:single": "npm run build:docker:pre && npm run build:docker:single:image", + "build:docker:single": "yarn build && lerna run --concurrency 1 predocker && yarn build:docker:single:image", "build:docker:dependencies": "docker build -f hosting/dependencies/Dockerfile -t budibase/dependencies:latest ./hosting", "publish:docker:couch": "docker buildx build --platform linux/arm64,linux/amd64 -f hosting/couchdb/Dockerfile -t budibase/couchdb:latest -t budibase/couchdb:v3.2.1 --push ./hosting/couchdb", "publish:docker:dependencies": "docker buildx build --platform linux/arm64,linux/amd64 -f hosting/dependencies/Dockerfile -t budibase/dependencies:latest -t budibase/dependencies:v3.2.1 --push ./hosting", diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index dfe30a3711..83e115ebf2 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -32,6 +32,7 @@ - + diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridImportButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridImportButton.svelte index 5aa530b028..5b89d92438 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridImportButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridImportButton.svelte @@ -4,11 +4,12 @@ export let disabled = false - const { rows, tableId } = getContext("grid") + const { rows, tableId, tableType } = getContext("grid") diff --git a/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte b/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte index 68968d5785..6cefe244bf 100644 --- a/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte @@ -113,17 +113,26 @@ }) download(data, `export.${exportFormat}`) } else if (filters || sorting) { - const data = await API.exportRows({ - tableId: view, - format: exportFormat, - search: { - query: luceneFilter, - sort: sorting?.sortColumn, - sortOrder: sorting?.sortOrder, - paginate: false, - }, - }) - download(data, `export.${exportFormat}`) + let response + try { + response = await API.exportRows({ + tableId: view, + format: exportFormat, + search: { + query: luceneFilter, + sort: sorting?.sortColumn, + sortOrder: sorting?.sortOrder, + paginate: false, + }, + }) + } catch (e) { + console.error("Failed to export", e) + notifications.error("Export Failed") + } + if (response) { + download(response, `export.${exportFormat}`) + notifications.success("Export Successful") + } } else { await exportView() } diff --git a/packages/builder/src/components/backend/DataTable/modals/ImportModal.svelte b/packages/builder/src/components/backend/DataTable/modals/ImportModal.svelte index 173fb88829..c020d1a7ac 100644 --- a/packages/builder/src/components/backend/DataTable/modals/ImportModal.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/ImportModal.svelte @@ -13,15 +13,18 @@ const dispatch = createEventDispatcher() export let tableId + export let tableType let rows = [] let allValid = false let displayColumn = null + let identifierFields = [] async function importData() { try { await API.importTableData({ tableId, rows, + identifierFields, }) notifications.success("Rows successfully imported") } catch (error) { @@ -45,6 +48,13 @@ - + diff --git a/packages/builder/src/components/backend/TableNavigator/ExistingTableDataImport.svelte b/packages/builder/src/components/backend/TableNavigator/ExistingTableDataImport.svelte index cb150f71fc..eba17e8ab9 100644 --- a/packages/builder/src/components/backend/TableNavigator/ExistingTableDataImport.svelte +++ b/packages/builder/src/components/backend/TableNavigator/ExistingTableDataImport.svelte @@ -1,5 +1,5 @@