Skip to content

Commit 6284ae7

Browse files
authored
Merge pull request #1739 from lowcoder-org/dev
Dev -> Main for 2.7.1
2 parents e751d1e + 248262a commit 6284ae7

File tree

4 files changed

+79
-5
lines changed

4 files changed

+79
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ server/api-service/lowcoder-server/src/main/resources/application-local-dev.yaml
1919
translations/locales/node_modules/
2020
server/api-service/lowcoder-server/src/main/resources/application-local-dev-ee.yaml
2121
node_modules
22+
23+
# Local Netlify folder
24+
.netlify

client/README.md

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,73 @@ When you finish developing and testing the plugin, you can publish it into the n
116116
yarn build --publish
117117
```
118118

119-
You can check a code demo here: [Code Demo on Github](https://github.com/lowcoder-org/lowcoder/tree/main/client/packages/lowcoder-plugin-demo)
119+
You can check a code demo here: [Code Demo on Github](https://github.com/lowcoder-org/lowcoder/tree/main/client/packages/lowcoder-plugin-demo)
120+
121+
# Deployment of the Lowcoder Frontend to Netlify (Local Build Flow)
122+
123+
## ⚙️ Prerequisites
124+
125+
* Node.js & Yarn installed
126+
* Netlify CLI installed:
127+
128+
```bash
129+
npm install -g netlify-cli
130+
```
131+
132+
* Netlify CLI authenticated:
133+
134+
```bash
135+
netlify login
136+
```
137+
138+
* The project is linked to the correct Netlify site:
139+
140+
```bash
141+
cd client
142+
netlify link
143+
```
144+
145+
---
146+
147+
## 🛠 Setup `netlify.toml` (only once)
148+
149+
Inside the `client/` folder, create or update `netlify.toml`:
150+
151+
```toml
152+
[build]
153+
base = "client"
154+
command = "yarn workspace lowcoder build"
155+
publish = "client/packages/lowcoder/build"
156+
```
157+
158+
This ensures Netlify uses the correct build and publish paths when building locally.
159+
160+
---
161+
162+
## 🚀 Deployment Steps
163+
164+
1️⃣ Navigate into the `client` folder:
165+
166+
```bash
167+
cd client
168+
```
169+
170+
2️⃣ Run local build (with Netlify environment variables injected):
171+
172+
```bash
173+
netlify build
174+
```
175+
176+
3️⃣ Deploy to production:
177+
178+
```bash
179+
netlify deploy --prod --dir=packages/lowcoder/build
180+
```
181+
182+
---
183+
184+
## 🔧 Notes
185+
186+
* This local build flow fully honors the environment variables configured in Netlify.
187+
* No build happens on Netlify servers — only the deploy step runs on Netlify.
188+
* This approach avoids Netlify’s build memory limits.

client/netlify.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
from = "/*"
33
to = "/"
44
status = 200
5-
[[plugins]]
6-
package = "@netlify/plugin-cache"
5+
[build]
6+
base = "client"
7+
command = "yarn workspace lowcoder build"
8+
publish = "client/packages/lowcoder/build"

server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/plugin/client/DatasourcePluginClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public Mono<QueryExecutionResult> executeQuery(String pluginName, Object queryDs
138138
String json = OBJECT_MAPPER.writeValueAsString(body);
139139

140140
boolean encryptionEnabled = !(commonConfig.getJsExecutor().getPassword().isEmpty() || commonConfig.getJsExecutor().getSalt().isEmpty());
141-
String payload;
141+
Object payload;
142142
WebClient.RequestBodySpec requestSpec = WEB_CLIENT
143143
.post()
144144
.uri(nodeServerHelper.createUri(RUN_PLUGIN_QUERY))
@@ -148,7 +148,7 @@ public Mono<QueryExecutionResult> executeQuery(String pluginName, Object queryDs
148148
payload = encryptionService.encryptStringForNodeServer(json);
149149
requestSpec = requestSpec.header("X-Encrypted", "true");
150150
} else {
151-
payload = json;
151+
payload = body;
152152
}
153153

154154
return requestSpec

0 commit comments

Comments
 (0)