Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/client/mermaid-10.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
FalkWolsky authored Jul 5, 2023
2 parents 94bac7f + a35e9d6 commit 4ae6924
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 35 deletions.
4 changes: 2 additions & 2 deletions deploy/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ CMD [ "/bin/sh", "/lowcoder/node-service/entrypoint.sh" ]
##
## Build lowcoder client application
##
FROM node:20.0-slim AS build-client
FROM node:20.3-slim AS build-client
COPY ./client /lowcoder-client
WORKDIR /lowcoder-client
RUN yarn --immutable
Expand All @@ -132,7 +132,7 @@ RUN yarn build
## To create a separate image out of it, build it with:
## DOCKER_BUILDKIT=1 docker build -f deploy/docker/Dockerfile -t lowcoderorg/lowcoder-ce-frontend --target lowcoder-ce-frontend .
##
FROM nginx:1.23.4 as lowcoder-ce-frontend
FROM nginx:1.25.1 as lowcoder-ce-frontend
LABEL maintainer="lowcoder"

# Change default nginx user into lowcoder user and remove default nginx config
Expand Down
1 change: 1 addition & 0 deletions server/api-service/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ package-lock.json
coverage-summary.json
app/client/cypress/locators/Widgets.json
/openblocks-domain/logs/
application-lowcoder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
import static org.lowcoder.sdk.util.ExceptionUtils.ofError;

import java.time.Instant;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import java.util.stream.Collectors;

import javax.annotation.Nonnull;
Expand Down Expand Up @@ -366,8 +363,8 @@ public Mono<ApplicationView> publish(String applicationId) {
}

public Mono<Boolean> grantPermission(String applicationId,
Set<String> userIds,
Set<String> groupIds, ResourceRole role) {
Set<String> userIds,
Set<String> groupIds, ResourceRole role) {
if (userIds.isEmpty() && groupIds.isEmpty()) {
return Mono.just(true);
}
Expand Down Expand Up @@ -502,11 +499,48 @@ private Map<String, Object> sanitizeDsl(Map<String, Object> applicationDsl) {
if (applicationDsl.get("queries") instanceof List<?> queries) {
List<Map<String, Object>> list = queries.stream().map(this::doSanitizeQuery).toList();
applicationDsl.put("queries", list);
removeTestVariablesFromProductionView(applicationDsl);
return applicationDsl;
}
removeTestVariablesFromProductionView(applicationDsl);
return applicationDsl;
}

private void removeTestVariablesFromProductionView(Map<String, Object> applicationDsl) {
/**Remove "test" object if it exists within "applicationDSL**/
if (applicationDsl.containsKey("ui")) {
Map<String, Object> dataObject = (Map<String, Object>) applicationDsl.get("ui");
if (dataObject.containsKey("comp")) {
Map<String, Object> applicationDSL = (Map<String, Object>) dataObject.get("comp");
doRemoveTestVariablesFromProductionView(applicationDSL);
}
}
}

private void doRemoveTestVariablesFromProductionView(Map<String, Object> map) {
if (map.containsKey("io")) {
Map<String, Object> io = (Map<String, Object>) map.get("io");
if (io.containsKey("inputs")) {
List<Map<String, Object>> inputs = (List<Map<String, Object>>) io.get("inputs");
for (Map<String, Object> inputMap : inputs) {
if (inputMap.containsKey("test")) {
inputMap.remove("test");
}
}
}

if (io.containsKey("outputs")) {
List<Map<String, Object>> outputs = (List<Map<String, Object>>) io.get("outputs");
for (Map<String, Object> inputMap : outputs) {
if (inputMap.containsKey("test")) {
inputMap.remove("test");
}
}
}
}
}


@SuppressWarnings("unchecked")
private Map<String, Object> doSanitizeQuery(Object query) {
if (!(query instanceof Map)) {
Expand Down
4 changes: 2 additions & 2 deletions server/node-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@aws-sdk/s3-request-presigner": "^3.332.0",
"@google-cloud/bigquery": "^6.1.0",
"@google-cloud/storage": "^6.10.1",
"@supabase/supabase-js": "^2.10.0",
"@supabase/supabase-js": "^2.26.0",
"@types/axios": "^0.14.0",
"@types/express": "^4.17.14",
"@types/jsonpath": "^0.2.0",
Expand Down Expand Up @@ -64,7 +64,7 @@
"pino": "^8.14.1",
"prom-client": "^14.2.0",
"proxy-agent": "^5.0.0",
"stylis": "^4.1.3",
"stylis": "^4.3.0",
"swagger-client": "^3.19.7",
"typescript": "^4.9.3",
"yaml": "^2.2.2"
Expand Down
50 changes: 25 additions & 25 deletions server/node-service/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2615,32 +2615,32 @@ __metadata:
languageName: node
linkType: hard

"@supabase/gotrue-js@npm:^2.26.0":
version: 2.27.2
resolution: "@supabase/gotrue-js@npm:2.27.2"
"@supabase/gotrue-js@npm:^2.31.0":
version: 2.37.0
resolution: "@supabase/gotrue-js@npm:2.37.0"
dependencies:
cross-fetch: ^3.1.5
checksum: e591a70654310428b5728feb0aced0e86fafe7b6bea1a416ac11c2851b20953892c11df7a429a836d20b1e7409d3c0c2aa6e2d63e89cade2b30c87e5d083c92e
checksum: 58275e0fde14e218ba69af4c33b095347a18f268149d1a78aa2bd9301190255fbad33aa20eaed5544a760354c94cbb2bab6dd5fe59653787836fb9e1236fabcf
languageName: node
linkType: hard

"@supabase/postgrest-js@npm:^1.1.1":
version: 1.6.1
resolution: "@supabase/postgrest-js@npm:1.6.1"
"@supabase/postgrest-js@npm:^1.7.0":
version: 1.7.1
resolution: "@supabase/postgrest-js@npm:1.7.1"
dependencies:
cross-fetch: ^3.1.5
checksum: 3001ca15a15f9ff8e75105f4b3ef1afcb30929b4b2a7f8ab54aa233d6eb2317b9b01f6acba4aba0ddbe09eb50e42325e2e29433277e5c69a5b2795db410552ca
checksum: 97f6e45a0420a304a20e89e7c2cf5790315708800965565ef34aa42b96dc97849462f2fd5c6e16095f29dc03c15d4671cd5f607a7f596095fc15e225e9e8074a
languageName: node
linkType: hard

"@supabase/realtime-js@npm:^2.7.2":
version: 2.7.2
resolution: "@supabase/realtime-js@npm:2.7.2"
"@supabase/realtime-js@npm:^2.7.3":
version: 2.7.3
resolution: "@supabase/realtime-js@npm:2.7.3"
dependencies:
"@types/phoenix": ^1.5.4
"@types/websocket": ^1.0.3
websocket: ^1.0.34
checksum: 0d6071991dfeeafcbfada30f39f6ed76ae83aefbdede611788879d493f7500c796050e0bef0bd589b9cf79cce0e170defe8a1d364e8cec3c8783cc4ac5314a3c
checksum: a6e789098ef7c388faf3a3b483ae91e1d45f8b7d02ae4ae1ad8ef0d7246678777aab1e0f3f2cbaf25549b27926c94bce9adc5c90f3f2693e1ccf780d5941411d
languageName: node
linkType: hard

Expand All @@ -2653,17 +2653,17 @@ __metadata:
languageName: node
linkType: hard

"@supabase/supabase-js@npm:^2.10.0":
version: 2.22.0
resolution: "@supabase/supabase-js@npm:2.22.0"
"@supabase/supabase-js@npm:^2.26.0":
version: 2.26.0
resolution: "@supabase/supabase-js@npm:2.26.0"
dependencies:
"@supabase/functions-js": ^2.1.0
"@supabase/gotrue-js": ^2.26.0
"@supabase/postgrest-js": ^1.1.1
"@supabase/realtime-js": ^2.7.2
"@supabase/gotrue-js": ^2.31.0
"@supabase/postgrest-js": ^1.7.0
"@supabase/realtime-js": ^2.7.3
"@supabase/storage-js": ^2.5.1
cross-fetch: ^3.1.5
checksum: ede087eb21c8aaf6f2e6cecffb63bedeaa2adae0683d10057d38ceeb7ab24da2a49e57f32d12399764a08e42880fa08d4c32bfc46d3180a97c278558249be704
checksum: bf53886a2314e8e0b119be224fdd08976ad3ce1da35db095dbbc960c1bfe7e1458054bcf11bdd72dd83d3bbaec2c78f8e897e225afe5cf1767233094b72a02dc
languageName: node
linkType: hard

Expand Down Expand Up @@ -8861,10 +8861,10 @@ __metadata:
languageName: node
linkType: hard

"stylis@npm:^4.1.3":
version: 4.2.0
resolution: "stylis@npm:4.2.0"
checksum: 0eb6cc1b866dc17a6037d0a82ac7fa877eba6a757443e79e7c4f35bacedbf6421fadcab4363b39667b43355cbaaa570a3cde850f776498e5450f32ed2f9b7584
"stylis@npm:^4.3.0":
version: 4.3.0
resolution: "stylis@npm:4.3.0"
checksum: 6120de3f03eacf3b5adc8e7919c4cca991089156a6badc5248752a3088106afaaf74996211a6817a7760ebeadca09004048eea31875bd8d4df51386365c50025
languageName: node
linkType: hard

Expand Down Expand Up @@ -8955,7 +8955,7 @@ __metadata:
"@aws-sdk/s3-request-presigner": ^3.332.0
"@google-cloud/bigquery": ^6.1.0
"@google-cloud/storage": ^6.10.1
"@supabase/supabase-js": ^2.10.0
"@supabase/supabase-js": ^2.26.0
"@types/axios": ^0.14.0
"@types/express": ^4.17.14
"@types/jest": ^29.2.4
Expand Down Expand Up @@ -8990,7 +8990,7 @@ __metadata:
postman-to-openapi: ^3.0.1
prom-client: ^14.2.0
proxy-agent: ^5.0.0
stylis: ^4.1.3
stylis: ^4.3.0
svgo: ^3.0.2
swagger-client: ^3.19.7
ts-jest: ^29.0.3
Expand Down

0 comments on commit 4ae6924

Please sign in to comment.