diff --git a/.github/workflows/smoke_test.yaml b/.github/workflows/smoke_test.yaml
index 04c0c7b5e3..b26d0386fc 100644
--- a/.github/workflows/smoke_test.yaml
+++ b/.github/workflows/smoke_test.yaml
@@ -28,6 +28,7 @@ jobs:
- name: Cypress run
id: cypress
+ continue-on-error: true
uses: cypress-io/github-action@v2
with:
install: false
diff --git a/lerna.json b/lerna.json
index 83d4eae0ac..ca4316f8f6 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.105-alpha.5",
+ "version": "1.0.105-alpha.11",
"npmClient": "yarn",
"packages": [
"packages/*"
diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json
index 0ce51f147e..47695c63c3 100644
--- a/packages/backend-core/package.json
+++ b/packages/backend-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
- "version": "1.0.105-alpha.5",
+ "version": "1.0.105-alpha.11",
"description": "Budibase backend core libraries used in server and worker",
"main": "src/index.js",
"author": "Budibase",
diff --git a/packages/backend-core/src/security/sessions.js b/packages/backend-core/src/security/sessions.js
index bbe6be299d..1720eeb820 100644
--- a/packages/backend-core/src/security/sessions.js
+++ b/packages/backend-core/src/security/sessions.js
@@ -14,22 +14,7 @@ function makeSessionID(userId, sessionId) {
return `${userId}/${sessionId}`
}
-exports.createASession = async (userId, session) => {
- const client = await redis.getSessionClient()
- const sessionId = session.sessionId
- if (!session.csrfToken) {
- session.csrfToken = uuidv4()
- }
- session = {
- createdAt: new Date().toISOString(),
- lastAccessedAt: new Date().toISOString(),
- ...session,
- userId,
- }
- await client.store(makeSessionID(userId, sessionId), session, EXPIRY_SECONDS)
-}
-
-exports.invalidateSessions = async (userId, sessionIds = null) => {
+async function invalidateSessions(userId, sessionIds = null) {
let sessions = []
// If no sessionIds, get all the sessions for the user
@@ -55,6 +40,24 @@ exports.invalidateSessions = async (userId, sessionIds = null) => {
await Promise.all(promises)
}
+exports.createASession = async (userId, session) => {
+ // invalidate all other sessions
+ await invalidateSessions(userId)
+
+ const client = await redis.getSessionClient()
+ const sessionId = session.sessionId
+ if (!session.csrfToken) {
+ session.csrfToken = uuidv4()
+ }
+ session = {
+ createdAt: new Date().toISOString(),
+ lastAccessedAt: new Date().toISOString(),
+ ...session,
+ userId,
+ }
+ await client.store(makeSessionID(userId, sessionId), session, EXPIRY_SECONDS)
+}
+
exports.updateSessionTTL = async session => {
const client = await redis.getSessionClient()
const key = makeSessionID(session.userId, session.sessionId)
@@ -67,8 +70,6 @@ exports.endSession = async (userId, sessionId) => {
await client.delete(makeSessionID(userId, sessionId))
}
-exports.getUserSessions = getSessionsForUser
-
exports.getSession = async (userId, sessionId) => {
try {
const client = await redis.getSessionClient()
@@ -84,3 +85,6 @@ exports.getAllSessions = async () => {
const sessions = await client.scan()
return sessions.map(session => session.value)
}
+
+exports.getUserSessions = getSessionsForUser
+exports.invalidateSessions = invalidateSessions
diff --git a/packages/bbui/package.json b/packages/bbui/package.json
index 710ed35636..f44afd0365 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.105-alpha.5",
+ "version": "1.0.105-alpha.11",
"license": "MPL-2.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
@@ -38,7 +38,7 @@
],
"dependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
- "@budibase/string-templates": "^1.0.105-alpha.5",
+ "@budibase/string-templates": "^1.0.105-alpha.11",
"@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2",
diff --git a/packages/builder/package.json b/packages/builder/package.json
index 582120c76f..0a99b9bdb3 100644
--- a/packages/builder/package.json
+++ b/packages/builder/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
- "version": "1.0.105-alpha.5",
+ "version": "1.0.105-alpha.11",
"license": "GPL-3.0",
"private": true,
"scripts": {
@@ -65,10 +65,10 @@
}
},
"dependencies": {
- "@budibase/bbui": "^1.0.105-alpha.5",
- "@budibase/client": "^1.0.105-alpha.5",
- "@budibase/frontend-core": "^1.0.105-alpha.5",
- "@budibase/string-templates": "^1.0.105-alpha.5",
+ "@budibase/bbui": "^1.0.105-alpha.11",
+ "@budibase/client": "^1.0.105-alpha.11",
+ "@budibase/frontend-core": "^1.0.105-alpha.11",
+ "@budibase/string-templates": "^1.0.105-alpha.11",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
diff --git a/packages/builder/src/builderStore/store/screenTemplates/utils/sanitizeUrl.js b/packages/builder/src/builderStore/store/screenTemplates/utils/sanitizeUrl.js
index 16224a45bc..4d00c503fb 100644
--- a/packages/builder/src/builderStore/store/screenTemplates/utils/sanitizeUrl.js
+++ b/packages/builder/src/builderStore/store/screenTemplates/utils/sanitizeUrl.js
@@ -2,9 +2,15 @@ export default function (url) {
return url
.split("/")
.map(part => {
- // if parameter, then use as is
- if (part.startsWith(":")) return part
- return encodeURIComponent(part.replace(/ /g, "-"))
+ part = decodeURIComponent(part)
+ part = part.replace(/ /g, "-")
+
+ // If parameter, then use as is
+ if (!part.startsWith(":")) {
+ part = encodeURIComponent(part)
+ }
+
+ return part
})
.join("/")
.toLowerCase()
diff --git a/packages/builder/src/components/common/TemplateCard.svelte b/packages/builder/src/components/common/TemplateCard.svelte
index 1271f6aa24..5ab8c3d774 100644
--- a/packages/builder/src/components/common/TemplateCard.svelte
+++ b/packages/builder/src/components/common/TemplateCard.svelte
@@ -6,15 +6,10 @@
export let overlayEnabled = true
let imageError = false
- let imageLoaded = false
const imageRenderError = () => {
imageError = true
}
-
- const imageLoadSuccess = () => {
- imageLoaded = true
- }
@@ -23,8 +18,7 @@
alt={name}
src={imageSrc}
on:error={imageRenderError}
- on:load={imageLoadSuccess}
- class={`${imageLoaded ? "loaded" : ""}`}
+ class:error={imageError}
/>