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:
martmull
2024-09-02 15:25:20 +02:00
committed by GitHub
parent f8890689ee
commit 7e03419c16
41 changed files with 4834 additions and 164 deletions

View File

@ -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) => {