refactor(editor): Apply Prettier (no-changelog) (#4920)
* ⚡ Adjust `format` script * 🔥 Remove exemption for `editor-ui` * 🎨 Prettify * 👕 Fix lint
This commit is contained in:
@@ -2,12 +2,17 @@ import { IRestApiContext } from '@/Interface';
|
||||
import { PublicInstalledPackage } from 'n8n-workflow';
|
||||
import { get, post, makeRestApiRequest } from '@/utils';
|
||||
|
||||
export async function getInstalledCommunityNodes(context: IRestApiContext): Promise<PublicInstalledPackage[]> {
|
||||
export async function getInstalledCommunityNodes(
|
||||
context: IRestApiContext,
|
||||
): Promise<PublicInstalledPackage[]> {
|
||||
const response = await get(context.baseUrl, '/nodes');
|
||||
return response.data || [];
|
||||
}
|
||||
|
||||
export async function installNewPackage(context: IRestApiContext, name: string): Promise<PublicInstalledPackage> {
|
||||
export async function installNewPackage(
|
||||
context: IRestApiContext,
|
||||
name: string,
|
||||
): Promise<PublicInstalledPackage> {
|
||||
return await post(context.baseUrl, '/nodes', { name });
|
||||
}
|
||||
|
||||
@@ -15,6 +20,9 @@ export async function uninstallPackage(context: IRestApiContext, name: string):
|
||||
return await makeRestApiRequest(context, 'DELETE', '/nodes', { name });
|
||||
}
|
||||
|
||||
export async function updatePackage(context: IRestApiContext, name: string): Promise<PublicInstalledPackage> {
|
||||
export async function updatePackage(
|
||||
context: IRestApiContext,
|
||||
name: string,
|
||||
): Promise<PublicInstalledPackage> {
|
||||
return await makeRestApiRequest(context, 'PATCH', '/nodes', { name });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user