From e751d1ec33f351664a8221e81f0620196321fe5c Mon Sep 17 00:00:00 2001 From: Falk Wolsky Date: Mon, 2 Jun 2025 23:49:08 +0200 Subject: [PATCH 1/4] Update netlify.toml --- client/netlify.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/netlify.toml b/client/netlify.toml index 1cb2010f3..4d549283c 100644 --- a/client/netlify.toml +++ b/client/netlify.toml @@ -2,3 +2,5 @@ from = "/*" to = "/" status = 200 +[[plugins]] + package = "@netlify/plugin-cache" From 77135def900182d5f0b0d661ca7fab51cac9c2c9 Mon Sep 17 00:00:00 2001 From: FalkWolsky Date: Tue, 3 Jun 2025 00:07:13 +0200 Subject: [PATCH 2/4] Update Netlify Config to support local build --- .gitignore | 3 +++ client/netlify.toml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index d2a57a1fe..f015f9056 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,6 @@ server/api-service/lowcoder-server/src/main/resources/application-local-dev.yaml translations/locales/node_modules/ server/api-service/lowcoder-server/src/main/resources/application-local-dev-ee.yaml node_modules + +# Local Netlify folder +.netlify diff --git a/client/netlify.toml b/client/netlify.toml index 1cb2010f3..7c0369167 100644 --- a/client/netlify.toml +++ b/client/netlify.toml @@ -2,3 +2,7 @@ from = "/*" to = "/" status = 200 +[build] + base = "client" + command = "yarn workspace lowcoder build" + publish = "client/packages/lowcoder/build" \ No newline at end of file From 72abc0b39fcc98d6744e3151c91ad8b2750cdecd Mon Sep 17 00:00:00 2001 From: FalkWolsky Date: Tue, 3 Jun 2025 00:27:43 +0200 Subject: [PATCH 3/4] Update Netlify Build Process in Readme --- client/README.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/client/README.md b/client/README.md index 2c848ec18..b7c9918ad 100644 --- a/client/README.md +++ b/client/README.md @@ -116,4 +116,73 @@ When you finish developing and testing the plugin, you can publish it into the n yarn build --publish ``` -You can check a code demo here: [Code Demo on Github](https://github.com/lowcoder-org/lowcoder/tree/main/client/packages/lowcoder-plugin-demo) \ No newline at end of file +You can check a code demo here: [Code Demo on Github](https://github.com/lowcoder-org/lowcoder/tree/main/client/packages/lowcoder-plugin-demo) + +# Deployment of the Lowcoder Frontend to Netlify (Local Build Flow) + +## ⚙️ Prerequisites + +* Node.js & Yarn installed +* Netlify CLI installed: + +```bash +npm install -g netlify-cli +``` + +* Netlify CLI authenticated: + +```bash +netlify login +``` + +* The project is linked to the correct Netlify site: + +```bash +cd client +netlify link +``` + +--- + +## 🛠 Setup `netlify.toml` (only once) + +Inside the `client/` folder, create or update `netlify.toml`: + +```toml +[build] + base = "client" + command = "yarn workspace lowcoder build" + publish = "client/packages/lowcoder/build" +``` + +This ensures Netlify uses the correct build and publish paths when building locally. + +--- + +## 🚀 Deployment Steps + +1️⃣ Navigate into the `client` folder: + +```bash +cd client +``` + +2️⃣ Run local build (with Netlify environment variables injected): + +```bash +netlify build +``` + +3️⃣ Deploy to production: + +```bash +netlify deploy --prod --dir=packages/lowcoder/build +``` + +--- + +## 🔧 Notes + +* This local build flow fully honors the environment variables configured in Netlify. +* No build happens on Netlify servers — only the deploy step runs on Netlify. +* This approach avoids Netlify’s build memory limits. \ No newline at end of file From 9464ae361c41c08af4b872ad05299788c2e44fbf Mon Sep 17 00:00:00 2001 From: Thomasr Date: Tue, 3 Jun 2025 03:31:02 -0400 Subject: [PATCH 4/4] Resolved issue where plugins were not being detected. --- .../lowcoder/domain/plugin/client/DatasourcePluginClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java index cae767e6f..aba0cacc0 100644 --- a/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java +++ b/server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java @@ -138,7 +138,7 @@ public Mono executeQuery(String pluginName, Object queryDs String json = OBJECT_MAPPER.writeValueAsString(body); boolean encryptionEnabled = !(commonConfig.getJsExecutor().getPassword().isEmpty() || commonConfig.getJsExecutor().getSalt().isEmpty()); - String payload; + Object payload; WebClient.RequestBodySpec requestSpec = WEB_CLIENT .post() .uri(nodeServerHelper.createUri(RUN_PLUGIN_QUERY)) @@ -148,7 +148,7 @@ public Mono executeQuery(String pluginName, Object queryDs payload = encryptionService.encryptStringForNodeServer(json); requestSpec = requestSpec.header("X-Encrypted", "true"); } else { - payload = json; + payload = body; } return requestSpec