Skip to content

Commit 8847dae

Browse files
author
FalkWolsky
committed
Adapting URL ROUTE Names and changing NPM Repository Paths
1 parent 89421f0 commit 8847dae

File tree

14 files changed

+26
-28
lines changed

14 files changed

+26
-28
lines changed

client/packages/lowcoder-cli/client.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ declare var PUBLIC_URL: string;
2929
declare var REACT_APP_EDITION: string;
3030
declare var REACT_APP_LANGUAGES: string;
3131
declare var REACT_APP_COMMIT_ID: string;
32-
declare var REACT_APP_API_HOST: string;
33-
declare var LOWCODER_NODE_SERVICE_URL: string;
32+
declare var REACT_APP_API_SERVICE_URL: string;
33+
declare var REACT_APP_NODE_SERVICE_URL: string;
3434
declare var REACT_APP_ENV: string;
3535
declare var REACT_APP_BUILD_ID: string;
3636
declare var REACT_APP_LOG_LEVEL: string;

client/packages/lowcoder-cli/dev-utils/buildVars.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ export const buildVars = [
1616
defaultValue: "00000",
1717
},
1818
{
19-
name: "REACT_APP_API_HOST",
19+
name: "REACT_APP_API_SERVICE_URL",
2020
defaultValue: "",
2121
},
2222
{
23-
name: "LOWCODER_NODE_SERVICE_URL",
23+
name: "REACT_APP_NODE_SERVICE_URL",
2424
defaultValue: "",
2525
},
2626
{

client/packages/lowcoder-sdk-webpack-bundle/src/dev-utils/buildVars.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const buildVars = [
1616
defaultValue: "00000",
1717
},
1818
{
19-
name: "REACT_APP_API_HOST",
19+
name: "REACT_APP_API_SERVICE_URL",
2020
defaultValue: "",
2121
},
2222
{
23-
name: "LOWCODER_NODE_SERVICE_URL",
23+
name: "REACT_APP_NODE_SERVICE_URL",
2424
defaultValue: "",
2525
},
2626
{

client/packages/lowcoder-sdk-webpack-bundle/webpack.config.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ module.exports = {
102102
plugins: [
103103
new webpack.DefinePlugin({
104104
...define,
105-
REACT_APP_API_HOST: JSON.stringify(apiBaseUrl),
105+
REACT_APP_API_SERVICE_URL: JSON.stringify(apiBaseUrl),
106106
REACT_APP_BUNDLE_TYPE: JSON.stringify("sdk"),
107107
}),
108108
new webpack.IgnorePlugin({

client/packages/lowcoder-sdk/src/dev-utils/buildVars.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ export const buildVars = [
1616
defaultValue: "00000",
1717
},
1818
{
19-
name: "REACT_APP_API_HOST",
19+
name: "REACT_APP_API_SERVICE_URL",
2020
defaultValue: "",
2121
},
2222
{
23-
name: "LOWCODER_NODE_SERVICE_URL",
23+
name: "REACT_APP_NODE_SERVICE_URL",
2424
defaultValue: "",
2525
},
2626
{

client/packages/lowcoder-sdk/vite.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const apiBaseUrl = "http://localhost:8000";
2121
export const viteConfig: UserConfig = {
2222
define: {
2323
...define,
24-
REACT_APP_API_HOST: JSON.stringify(apiBaseUrl),
24+
REACT_APP_API_SERVICE_URL: JSON.stringify(apiBaseUrl),
2525
REACT_APP_BUNDLE_TYPE: JSON.stringify("sdk"),
2626
},
2727
assetsInclude: ["**/*.md"],

client/packages/lowcoder/src/app-env.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ declare var PUBLIC_URL: string;
3535
declare var REACT_APP_EDITION: string;
3636
declare var REACT_APP_LANGUAGES: string;
3737
declare var REACT_APP_COMMIT_ID: string;
38-
declare var REACT_APP_API_HOST: string;
39-
declare var LOWCODER_NODE_SERVICE_URL: string;
38+
declare var REACT_APP_API_SERVICE_URL: string;
39+
declare var REACT_APP_NODE_SERVICE_URL: string;
4040
declare var REACT_APP_ENV: string;
4141
declare var REACT_APP_BUILD_ID: string;
4242
declare var REACT_APP_LOG_LEVEL: string;

client/packages/lowcoder/src/constants/apiConstants.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ export type PaginationParam = {
5151
export const API_REQUEST_HEADERS: RawAxiosRequestHeaders = {
5252
"Content-Type": "application/json",
5353
};
54-
export const SERVER_HOST = `${REACT_APP_API_HOST ?? ""}`;
54+
export const SERVER_HOST = `${REACT_APP_API_SERVICE_URL ?? ""}`;
5555
export const ASSETS_URI = (id: string) => `${SERVER_HOST}/api/v1/assets/${id}`;
5656
export const USER_HEAD_UPLOAD_URL = `${SERVER_HOST}/api/v1/users/photo`;
57-
export const ORG_ICON_UPLOAD_URL = (orgId: string) =>
58-
`${SERVER_HOST}/api/v1/organizations/${orgId}/logo`;
57+
export const ORG_ICON_UPLOAD_URL = (orgId: string) => `${SERVER_HOST}/api/v1/organizations/${orgId}/logo`;
5958

6059
export type ApiRequestStatus = "init" | "requesting" | "success" | "error";
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { sdkConfig } from "./sdkConfig";
2-
3-
const baseUrl = sdkConfig.baseURL || LOWCODER_NODE_SERVICE_URL || "";
4-
export const NPM_REGISTRY_URL = `${baseUrl}/node-service/api/npm/registry`;
5-
export const NPM_PLUGIN_ASSETS_BASE_URL = `${baseUrl}/node-service/api/npm/package`;
1+
export const SERVER_HOST = `${REACT_APP_API_SERVICE_URL ?? ""}`;
2+
export const NPM_REGISTRY_URL = `${SERVER_HOST}/api/npm/registry`;
3+
export const NPM_PLUGIN_ASSETS_BASE_URL = `${SERVER_HOST}/api/npm/package`;

client/packages/lowcoder/src/dev-utils/buildVars.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ export const buildVars = [
1616
defaultValue: "00000",
1717
},
1818
{
19-
name: "REACT_APP_API_HOST",
19+
name: "REACT_APP_API_SERVICE_URL",
2020
defaultValue: "",
2121
},
2222
{
23-
name: "LOWCODER_NODE_SERVICE_URL",
23+
name: "REACT_APP_NODE_SERVICE_URL",
2424
defaultValue: "",
2525
},
2626
{

client/packages/lowcoder/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ function hideLoading() {
3232

3333
debug(`REACT_APP_EDITION: ${REACT_APP_EDITION}`);
3434
debug(`REACT_APP_LANGUAGES:, ${REACT_APP_LANGUAGES}`);
35-
debug(`REACT_APP_API_HOST:, ${REACT_APP_API_HOST}`);
35+
debug(`REACT_APP_API_SERVICE_URL:, ${REACT_APP_API_SERVICE_URL}`);
36+
debug(`REACT_APP_NODE_SERVICE_URL:, ${REACT_APP_NODE_SERVICE_URL}`);
3637
debug(`REACT_APP_ENV:, ${REACT_APP_ENV}`);
3738
debug(`REACT_APP_LOG_LEVEL:, ${REACT_APP_LOG_LEVEL}`);
3839

client/packages/lowcoder/src/util/bottomResUtils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const LargeBottomResIconWrapper = styled(IconWrapper)`
6464
function getBottomResIconInnerByUrl(type: BottomResType, url: string) {
6565
let fullUrl = url;
6666
if (!fullUrl.startsWith("http")) {
67-
fullUrl = `${LOWCODER_NODE_SERVICE_URL !== "" ? LOWCODER_NODE_SERVICE_URL : REACT_APP_API_HOST}/node-service/plugin-icons/${url}`;
67+
fullUrl = `${REACT_APP_NODE_SERVICE_URL !== "" ? REACT_APP_NODE_SERVICE_URL : REACT_APP_API_SERVICE_URL}/node-service/plugin-icons/${url}`;
6868
}
6969
return <img style={{ width: "100%", height: "100%" }} src={fullUrl} alt="" />;
7070
}

client/scripts/buildVars.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ export const buildVars = [
1616
defaultValue: "00000",
1717
},
1818
{
19-
name: "REACT_APP_API_HOST",
19+
name: "REACT_APP_API_SERVICE_URL",
2020
defaultValue: "",
2121
},
2222
{
23-
name: "LOWCODER_NODE_SERVICE_URL",
23+
name: "REACT_APP_NODE_SERVICE_URL",
2424
defaultValue: "",
2525
},
2626
{

server/node-service/src/plugins/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import couchdbPlugin from "./couchdb";
88
import wooCommercePlugin from "./woocommerce";
99
import openAiPlugin from "./openAi";
1010
import athenaPlugin from "./athena";
11-
import duckdbPlugin from "./duckdb";
11+
// import duckdbPlugin from "./duckdb";
1212
import lambdaPlugin from "./lambda";
1313
import googleCloudStorage from "./googleCloudStorage";
1414
import stripePlugin from "./stripe";
@@ -43,7 +43,7 @@ let plugins: (DataSourcePlugin | DataSourcePluginFactory)[] = [
4343
// Databases
4444
dynamoDBPlugin,
4545
couchdbPlugin,
46-
duckdbPlugin,
46+
// duckdbPlugin,
4747
faunaPlugin,
4848
tursoPlugin,
4949

0 commit comments

Comments
 (0)