diff --git a/lerna.json b/lerna.json index f7afef9948..03a6c0f4e6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.76-alpha.3", + "version": "1.0.76-alpha.5", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/package.json b/package.json index 5111ad204f..22f5963bd2 100644 --- a/package.json +++ b/package.json @@ -42,8 +42,8 @@ "lint:fix:prettier": "prettier --write \"packages/**/*.{js,ts,svelte}\"", "lint:fix:ts": "lerna run lint:fix", "lint:fix": "yarn run lint:fix:ts && yarn run lint:fix:prettier && yarn run lint:fix:eslint", - "test:e2e": "lerna run cy:test", - "test:e2e:ci": "lerna run cy:ci", + "test:e2e": "lerna run cy:test --stream", + "test:e2e:ci": "lerna run cy:ci --stream", "build:docker": "lerna run build:docker && npm run build:docker:proxy:compose && cd hosting/scripts/linux/ && ./release-to-docker-hub.sh $BUDIBASE_RELEASE_VERSION && cd -", "build:docker:proxy": "docker build hosting/proxy -t proxy-service", "build:docker:proxy:compose": "lerna run generate:proxy:compose && npm run build:docker:proxy", diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index bcacc06ab8..198c62df25 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.76-alpha.3", + "version": "1.0.76-alpha.5", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index eb1c3da6f5..064bc7a55a 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": "1.0.76-alpha.3", + "version": "1.0.76-alpha.5", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/cypress.json b/packages/builder/cypress.json index fb9953ae6c..edad1f39d3 100644 --- a/packages/builder/cypress.json +++ b/packages/builder/cypress.json @@ -1,9 +1,10 @@ { - "baseUrl": "http://localhost:10001", + "baseUrl": "http://localhost:4100", "video": false, "projectId": "bmbemn", "env": { - "PORT": "10001", + "PORT": "4100", + "WORKER_PORT": "4200", "JWT_SECRET": "test", "HOST_IP": "" } diff --git a/packages/builder/cypress/setup.js b/packages/builder/cypress/setup.js index ca5a65c7f5..e19c931ed9 100644 --- a/packages/builder/cypress/setup.js +++ b/packages/builder/cypress/setup.js @@ -4,17 +4,17 @@ const path = require("path") const tmpdir = path.join(require("os").tmpdir(), ".budibase") // normal development system -const WORKER_PORT = "10002" -const MAIN_PORT = cypressConfig.env.PORT +const SERVER_PORT = cypressConfig.env.PORT +const WORKER_PORT = cypressConfig.env.WORKER_PORT + process.env.BUDIBASE_API_KEY = "6BE826CB-6B30-4AEC-8777-2E90464633DE" process.env.NODE_ENV = "cypress" process.env.ENABLE_ANALYTICS = "false" -process.env.PORT = MAIN_PORT process.env.JWT_SECRET = cypressConfig.env.JWT_SECRET process.env.COUCH_URL = `leveldb://${tmpdir}/.data/` process.env.SELF_HOSTED = 1 -process.env.WORKER_URL = "http://localhost:10002/" -process.env.APPS_URL = `http://localhost:${MAIN_PORT}/` +process.env.WORKER_URL = `http://localhost:${WORKER_PORT}/` +process.env.APPS_URL = `http://localhost:${SERVER_PORT}/` process.env.MINIO_URL = `http://localhost:4004` process.env.MINIO_ACCESS_KEY = "budibase" process.env.MINIO_SECRET_KEY = "budibase" @@ -33,11 +33,14 @@ exports.run = ( // require("dotenv").config({ path: resolve(dir, ".env") }) // don't make this a variable or top level require // it will cause environment module to be loaded prematurely - require(serverLoc) + + // override the port with the worker port temporarily process.env.PORT = WORKER_PORT require(workerLoc) - // reload main port for rest of system - process.env.PORT = MAIN_PORT + + // override the port with the server port + process.env.PORT = SERVER_PORT + require(serverLoc) } if (require.main === module) { diff --git a/packages/builder/package.json b/packages/builder/package.json index 3ca2a167b8..23f3d9f7dd 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.76-alpha.3", + "version": "1.0.76-alpha.5", "license": "GPL-3.0", "private": true, "scripts": { @@ -11,12 +11,13 @@ "rollup": "rollup -c -w", "cy:setup": "ts-node ./cypress/ts/setup.ts", "cy:setup:ci": "node ./cypress/setup.js", - "cy:run": "xvfb-run cypress run --headed --browser chrome", "cy:open": "cypress open", - "cy:run:ci": "cypress run --record", - "cy:test": "start-server-and-test cy:setup http://localhost:10001/builder cy:run", - "cy:ci": "start-server-and-test cy:setup:ci http://localhost:10001/builder cy:run", - "cy:debug": "start-server-and-test cy:setup http://localhost:10001/builder cy:open" + "cy:run": "cypress run", + "cy:run:ci": "xvfb-run cypress run --headed --browser chrome --record", + "cy:test": "start-server-and-test cy:setup http://localhost:4100/builder cy:run", + "cy:ci": "start-server-and-test cy:setup:ci http://localhost:4100/builder cy:run:ci", + "cy:debug": "start-server-and-test cy:setup http://localhost:4100/builder cy:open", + "cy:debug:ci": "start-server-and-test cy:setup:ci http://localhost:4100/builder cy:open" }, "jest": { "globals": { @@ -64,10 +65,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.76-alpha.3", - "@budibase/client": "^1.0.76-alpha.3", - "@budibase/frontend-core": "^1.0.76-alpha.3", - "@budibase/string-templates": "^1.0.76-alpha.3", + "@budibase/bbui": "^1.0.76-alpha.5", + "@budibase/client": "^1.0.76-alpha.5", + "@budibase/frontend-core": "^1.0.76-alpha.5", + "@budibase/string-templates": "^1.0.76-alpha.5", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/builder/src/pages/builder/app/[application]/design/[assetType]/index.svelte b/packages/builder/src/pages/builder/app/[application]/design/[assetType]/index.svelte index a767b56b4f..444835de22 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[assetType]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[assetType]/index.svelte @@ -45,6 +45,14 @@ store.actions.screens.select(id) } } + + // If we didn't find a valid asset, just update the preview type + if (!id) { + store.update(state => { + state.currentFrontEndType = assetType + return state + }) + } } diff --git a/packages/cli/package.json b/packages/cli/package.json index 49b4376d7d..c3343949ff 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.76-alpha.3", + "version": "1.0.76-alpha.5", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 1eed59e1f5..16c41d1e24 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.76-alpha.3", + "version": "1.0.76-alpha.5", "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.76-alpha.3", - "@budibase/frontend-core": "^1.0.76-alpha.3", - "@budibase/string-templates": "^1.0.76-alpha.3", + "@budibase/bbui": "^1.0.76-alpha.5", + "@budibase/frontend-core": "^1.0.76-alpha.5", + "@budibase/string-templates": "^1.0.76-alpha.5", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/client/src/components/ClientApp.svelte b/packages/client/src/components/ClientApp.svelte index 5bd5d2d46f..06b240f3ee 100644 --- a/packages/client/src/components/ClientApp.svelte +++ b/packages/client/src/components/ClientApp.svelte @@ -108,7 +108,7 @@