Skip to content

Commit aba7b75

Browse files
author
Thomasr
committed
resolve conflict while merging
2 parents fe61f04 + ae950a9 commit aba7b75

File tree

5 files changed

+35
-4
lines changed

5 files changed

+35
-4
lines changed

client/packages/lowcoder/src/comps/utils/remote.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function parseCompType(compType: string) {
3939
}
4040

4141
export async function getNpmPackageMeta(packageName: string) {
42-
const res = await axios.get<NpmPackageMeta>(`${NPM_REGISTRY_URL}/${packageName}/`);
42+
const res = await axios.get<NpmPackageMeta>(`${NPM_REGISTRY_URL}/${packageName}`);
4343
if (res.status >= 400) {
4444
return null;
4545
}

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,6 +2623,8 @@ export const en = {
26232623
"APIConsumptionDescription": "Here you can see the API Consumption for All Apps in the Current Workspace.",
26242624
"overallAPIConsumption": "Overall API Consumption in this Workspace till now",
26252625
"lastMonthAPIConsumption": "Last Month API Consumption, in this Workspace",
2626+
"npmRegistryTitle": "Custom NPM Registry",
2627+
"npmRegistryHelp": "Setup a custom NPM Registry to enable fetching of plugins from a private NPM registry.",
26262628
"showHeaderInPublicApps": "Show Header In Public View",
26272629
"showHeaderInPublicAppsHelp": "Set visibility of header in public view for all apps",
26282630
},
@@ -2988,6 +2990,20 @@ export const en = {
29882990
"createAppContent": "Welcome! Click 'App' and Start to Create Your First Application.",
29892991
"createAppTitle": "Create App"
29902992
},
2993+
"npmRegistry": {
2994+
"npmRegistryEnable": "Enable custom NPM Registry",
2995+
"npmRegistryUrl": "NPM Registry Url",
2996+
"npmRegistryUrlRequired": "Please input the registry URL",
2997+
"npmRegistryUrlInvalid": "Please input a valid URL",
2998+
"npmRegistryScope": "Package Scope",
2999+
"npmRegistryPattern": "Pattern",
3000+
"npmRegistryPatternInvalid": "Please input a valid pattern (starting with @ for oragnizations).",
3001+
"npmRegistryAuth": "Authentication",
3002+
"npmRegistryAuthType": "Authentication Type",
3003+
"npmRegistryAuthCredentials": "Authentication Credentials",
3004+
"npmRegistryAuthCredentialsRequired": "Please input the registry credentials",
3005+
"npmRegistryAuthCredentialsHelp": "For basic auth provide the base64 encoded username and password in the format 'base64(username:password)', for token auth provide the token.",
3006+
},
29913007

29923008

29933009
// nineteenth part

client/packages/lowcoder/src/pages/editor/right/PluginPanel/PluginItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function PluginItem(props: PluginViewProps) {
6767

6868
useEffect(() => {
6969
setLoading(true);
70-
axios.get<NpmPackageMeta>(`${NPM_REGISTRY_URL}/${name}/`).then((res) => {
70+
axios.get<NpmPackageMeta>(`${NPM_REGISTRY_URL}/${name}`).then((res) => {
7171
if (res.status >= 400) {
7272
return;
7373
}

client/packages/lowcoder/src/pages/setting/advanced/AdvancedSetting.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { EmptyContent } from "components/EmptyContent";
22
import { HelpText } from "components/HelpText";
33
import { GreyTextColor } from "constants/style";
44
import { CustomModal, CustomSelect, TacoButton } from "lowcoder-design";
5-
import React, { lazy, useEffect, useState } from "react";
5+
import { lazy, useEffect, useState } from "react";
66
import { useDispatch, useSelector } from "react-redux";
77
import { fetchCommonSettings, setCommonSettings } from "redux/reduxActions/commonSettingsActions";
88
import { getCommonSettings } from "redux/selectors/commonSettingSelectors";
@@ -25,6 +25,8 @@ import { getGlobalSettings } from "comps/utils/globalSettings";
2525
import { fetchJSLibrary } from "util/jsLibraryUtils";
2626
import { evalFunc } from "lowcoder-core";
2727
import { messageInstance } from "lowcoder-design/src/components/GlobalInstances";
28+
import { NpmRegistryConfig } from "@lowcoder-ee/components/NpmRegistryConfig";
29+
import { NpmRegistryConfigEntry } from "@lowcoder-ee/redux/reducers/uiReducers/commonSettingsReducer";
2830
import { default as Switch } from "antd/es/switch";
2931

3032
const CodeEditor = lazy(
@@ -306,6 +308,20 @@ export function AdvancedSetting() {
306308
/>
307309
)}
308310
</div>
311+
<div className="section-title">{trans("advanced.npmRegistryTitle")}</div>
312+
<HelpText style={{ marginBottom: 12 }}>{trans("advanced.npmRegistryHelp")}</HelpText>
313+
<div className="section-content">
314+
<div>
315+
<NpmRegistryConfig initialData={settings.npmRegistries?.at(0)} onSave={(config: NpmRegistryConfigEntry|null) => {
316+
// Wrap in array to enable future option for multiple registries
317+
if (config === null) {
318+
handleSave("npmRegistries")([]);
319+
} else {
320+
handleSave("npmRegistries")([config]);
321+
}
322+
}} />
323+
</div>
324+
</div>
309325
{extraAdvanceSettings}
310326
<div className="section-title">{trans("advanced.APIConsumption")}</div>
311327
<HelpText style={{ marginBottom: 12 }}>{trans("advanced.APIConsumptionDescription")}</HelpText>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import couchdbPlugin from "./couchdb";
88
import wooCommercePlugin from "./woocommerce";
99
import openAiPlugin from "./openAi";
1010
import athenaPlugin from "./athena";
11-
// we have troubles with the Binaries and need to fix it asap
1211
// import duckdbPlugin from "./duckdb";
1312
import lambdaPlugin from "./lambda";
1413
import googleCloudStorage from "./googleCloudStorage";

0 commit comments

Comments
 (0)