Serverless function improvements (#6769)
- add layer for lambda execution - add layer for local execution - add package resolve for the monaco editor - add route to get installed package for serverless functions - add layer versioning
This commit is contained in:
@ -20,10 +20,9 @@ import { useParams } from 'react-router-dom';
|
||||
import { useRecoilValue, useSetRecoilState } from 'recoil';
|
||||
import { IconCode, IconFunction, IconSettings, IconTestPipe } from 'twenty-ui';
|
||||
import { isDefined } from '~/utils/isDefined';
|
||||
import { useDebouncedCallback } from 'use-debounce';
|
||||
import { useGetOneServerlessFunctionSourceCode } from '@/settings/serverless-functions/hooks/useGetOneServerlessFunctionSourceCode';
|
||||
import { useState } from 'react';
|
||||
import isEmpty from 'lodash.isempty';
|
||||
import { usePreventOverlapCallback } from '~/hooks/usePreventOverlapCallback';
|
||||
|
||||
const TAB_LIST_COMPONENT_ID = 'serverless-function-detail';
|
||||
|
||||
@ -53,9 +52,6 @@ export const SettingsServerlessFunctionDetail = () => {
|
||||
|
||||
const save = async () => {
|
||||
try {
|
||||
if (isEmpty(formValues.name)) {
|
||||
return;
|
||||
}
|
||||
await updateOneServerlessFunction({
|
||||
id: serverlessFunctionId,
|
||||
name: formValues.name,
|
||||
@ -72,7 +68,7 @@ export const SettingsServerlessFunctionDetail = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleSave = useDebouncedCallback(save, 500);
|
||||
const handleSave = usePreventOverlapCallback(save, 1000);
|
||||
|
||||
const onChange = (key: string) => {
|
||||
return async (value: string | undefined) => {
|
||||
|
||||
Reference in New Issue
Block a user