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
{

0 commit comments

Comments
 (0)