From 788cce2b9a67c565486cd5db893602cc6385121b Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Thu, 4 Jul 2024 11:08:18 +0000 Subject: [PATCH 1/3] Bump version to 2.29.13 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index d991a1e813..c3419a3f87 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "2.29.12", + "version": "2.29.13", "npmClient": "yarn", "packages": [ "packages/*", From 6d412cdf32b0629ac1c7f1fd526781267d8f9f6a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 4 Jul 2024 13:54:08 +0200 Subject: [PATCH 2/3] Ellipsis on long emails --- .../users/_components/EmailTableRenderer.svelte | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/portal/users/users/_components/EmailTableRenderer.svelte b/packages/builder/src/pages/builder/portal/users/users/_components/EmailTableRenderer.svelte index 99ba5abc2f..e2d1671b60 100644 --- a/packages/builder/src/pages/builder/portal/users/users/_components/EmailTableRenderer.svelte +++ b/packages/builder/src/pages/builder/portal/users/users/_components/EmailTableRenderer.svelte @@ -5,7 +5,17 @@ export let row -{value} + + {value} + {#if row.scimInfo?.isSync} {/if} + + From 332bf0911675316607605a09448f9bb445e88c41 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 4 Jul 2024 14:50:59 +0100 Subject: [PATCH 3/3] Fixing up the typing in the gen collection script so that it is valid TS again and will work. --- .../scripts/gen-collection-info.ts | 49 ++++++++++++------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/packages/string-templates/scripts/gen-collection-info.ts b/packages/string-templates/scripts/gen-collection-info.ts index ae2a726661..d176665a5b 100644 --- a/packages/string-templates/scripts/gen-collection-info.ts +++ b/packages/string-templates/scripts/gen-collection-info.ts @@ -1,16 +1,23 @@ -const HELPER_LIBRARY = "@budibase/handlebars-helpers" -const helpers = require(HELPER_LIBRARY) -const { HelperFunctionBuiltin } = require("../src/helpers/constants") -const fs = require("fs") +import { HelperFunctionBuiltin } from "../src/helpers/constants" +import { readFileSync, writeFileSync } from "fs" +import { marked } from "marked" +import { join, dirname } from "path" + +const helpers = require("@budibase/handlebars-helpers") const doctrine = require("doctrine") -const marked = require("marked") + +type HelperInfo = { + acceptsInline?: boolean + acceptsBlock?: boolean + example?: string + description: string + tags?: any[] +} /** * full list of supported helpers can be found here: * https://github.com/budibase/handlebars-helpers */ -const { join } = require("path") -const path = require("path") const COLLECTIONS = [ "math", @@ -23,7 +30,7 @@ const COLLECTIONS = [ "uuid", ] const FILENAME = join(__dirname, "..", "src", "manifest.json") -const outputJSON = {} +const outputJSON: any = {} const ADDED_HELPERS = { date: { date: { @@ -43,7 +50,7 @@ const ADDED_HELPERS = { }, } -function fixSpecialCases(name, obj) { +function fixSpecialCases(name: string, obj: any) { const args = obj.args if (name === "ifNth") { args[0] = "a" @@ -61,7 +68,7 @@ function fixSpecialCases(name, obj) { return obj } -function lookForward(lines, funcLines, idx) { +function lookForward(lines: string[], funcLines: string[], idx: number) { const funcLen = funcLines.length for (let i = idx, j = 0; i < idx + funcLen; ++i, j++) { if (!lines[i].includes(funcLines[j])) { @@ -71,7 +78,7 @@ function lookForward(lines, funcLines, idx) { return true } -function getCommentInfo(file, func) { +function getCommentInfo(file: string, func: string): HelperInfo { const lines = file.split("\n") const funcLines = func.split("\n") let comment = null @@ -98,7 +105,13 @@ function getCommentInfo(file, func) { if (comment == null) { return { description: "" } } - const docs = doctrine.parse(comment, { unwrap: true }) + const docs: { + acceptsInline?: boolean + acceptsBlock?: boolean + example: string + description: string + tags: any[] + } = doctrine.parse(comment, { unwrap: true }) // some hacky fixes docs.description = docs.description.replace(/\n/g, " ") docs.description = docs.description.replace(/[ ]{2,}/g, " ") @@ -120,7 +133,7 @@ function getCommentInfo(file, func) { return docs } -const excludeFunctions = { string: ["raw"] } +const excludeFunctions: Record = { string: ["raw"] } /** * This script is very specific to purpose, parsing the handlebars-helpers files to attempt to get information about them. @@ -128,11 +141,13 @@ const excludeFunctions = { string: ["raw"] } function run() { const foundNames: string[] = [] for (let collection of COLLECTIONS) { - const collectionFile = fs.readFileSync( - `${path.dirname(require.resolve(HELPER_LIBRARY))}/lib/${collection}.js`, + const collectionFile = readFileSync( + `${dirname( + require.resolve("@budibase/handlebars-helpers") + )}/lib/${collection}.js`, "utf8" ) - const collectionInfo = {} + const collectionInfo: any = {} // collect information about helper let hbsHelperInfo = helpers[collection]() for (let entry of Object.entries(hbsHelperInfo)) { @@ -181,7 +196,7 @@ function run() { helper.description = marked.parse(helper.description) } } - fs.writeFileSync(FILENAME, JSON.stringify(outputJSON, null, 2)) + writeFileSync(FILENAME, JSON.stringify(outputJSON, null, 2)) } run()