Rename serverlessFunction to logicFunction (#17494)
## Summary Rename "Serverless Function" to "Logic Function" across the codebase for clearer naming. ### Environment Variable Changes | Old | New | |-----|-----| | `SERVERLESS_TYPE` | `LOGIC_FUNCTION_TYPE` | | `SERVERLESS_LAMBDA_REGION` | `LOGIC_FUNCTION_LAMBDA_REGION` | | `SERVERLESS_LAMBDA_ROLE` | `LOGIC_FUNCTION_LAMBDA_ROLE` | | `SERVERLESS_LAMBDA_SUBHOSTING_URL` | `LOGIC_FUNCTION_LAMBDA_SUBHOSTING_URL` | | `SERVERLESS_LAMBDA_ACCESS_KEY_ID` | `LOGIC_FUNCTION_LAMBDA_ACCESS_KEY_ID` | | `SERVERLESS_LAMBDA_SECRET_ACCESS_KEY` | `LOGIC_FUNCTION_LAMBDA_SECRET_ACCESS_KEY` | ### Breaking Changes - Environment variables must be updated in production deployments - Database migration renames `serverlessFunction` → `logicFunction` tables
This commit is contained in:
+3
-15
@@ -20,7 +20,7 @@ import { FLAT_VIEW_FILTER_GROUP_EDITABLE_PROPERTIES } from 'src/engine/metadata-
|
||||
import { FLAT_VIEW_FILTER_EDITABLE_PROPERTIES } from 'src/engine/metadata-modules/flat-view-filter/constants/flat-view-filter-editable-properties.constant';
|
||||
import { FLAT_VIEW_GROUP_EDITABLE_PROPERTIES } from 'src/engine/metadata-modules/flat-view-group/constants/flat-view-group-editable-properties.constant';
|
||||
import { FLAT_VIEW_EDITABLE_PROPERTIES } from 'src/engine/metadata-modules/flat-view/constants/flat-view-editable-properties.constant';
|
||||
import { FLAT_SERVERLESS_FUNCTION_EDITABLE_PROPERTIES } from 'src/engine/metadata-modules/serverless-function/constants/flat-serverless-function-editable-properties.constant';
|
||||
import { FLAT_LOGIC_FUNCTION_EDITABLE_PROPERTIES } from 'src/engine/metadata-modules/logic-function/constants/flat-logic-function-editable-properties.constant';
|
||||
|
||||
type OneFlatEntityConfiguration<T extends AllMetadataName> = {
|
||||
propertiesToCompare: (keyof MetadataFlatEntity<T>)[];
|
||||
@@ -73,9 +73,9 @@ export const ALL_FLAT_ENTITY_PROPERTIES_TO_COMPARE_AND_STRINGIFY = {
|
||||
],
|
||||
propertiesToStringify: ['flatIndexFieldMetadatas'],
|
||||
},
|
||||
serverlessFunction: {
|
||||
logicFunction: {
|
||||
propertiesToCompare: [
|
||||
...FLAT_SERVERLESS_FUNCTION_EDITABLE_PROPERTIES.filter(
|
||||
...FLAT_LOGIC_FUNCTION_EDITABLE_PROPERTIES.filter(
|
||||
(property) => property !== 'code',
|
||||
),
|
||||
'deletedAt',
|
||||
@@ -84,18 +84,6 @@ export const ALL_FLAT_ENTITY_PROPERTIES_TO_COMPARE_AND_STRINGIFY = {
|
||||
],
|
||||
propertiesToStringify: ['toolInputSchema', 'publishedVersions'],
|
||||
},
|
||||
cronTrigger: {
|
||||
propertiesToCompare: [],
|
||||
propertiesToStringify: [],
|
||||
},
|
||||
databaseEventTrigger: {
|
||||
propertiesToCompare: [],
|
||||
propertiesToStringify: [],
|
||||
},
|
||||
routeTrigger: {
|
||||
propertiesToCompare: [],
|
||||
propertiesToStringify: [],
|
||||
},
|
||||
viewFilter: {
|
||||
propertiesToCompare: [
|
||||
'viewId',
|
||||
|
||||
+2
-5
@@ -16,7 +16,7 @@ import { RoleTargetEntity } from 'src/engine/metadata-modules/role-target/role-t
|
||||
import { RoleEntity } from 'src/engine/metadata-modules/role/role.entity';
|
||||
import { RowLevelPermissionPredicateGroupEntity } from 'src/engine/metadata-modules/row-level-permission-predicate/entities/row-level-permission-predicate-group.entity';
|
||||
import { RowLevelPermissionPredicateEntity } from 'src/engine/metadata-modules/row-level-permission-predicate/entities/row-level-permission-predicate.entity';
|
||||
import { ServerlessFunctionEntity } from 'src/engine/metadata-modules/serverless-function/serverless-function.entity';
|
||||
import { LogicFunctionEntity } from 'src/engine/metadata-modules/logic-function/logic-function.entity';
|
||||
import { SkillEntity } from 'src/engine/metadata-modules/skill/entities/skill.entity';
|
||||
import { ViewFieldEntity } from 'src/engine/metadata-modules/view-field/entities/view-field.entity';
|
||||
import { ViewFilterGroupEntity } from 'src/engine/metadata-modules/view-filter-group/entities/view-filter-group.entity';
|
||||
@@ -36,14 +36,11 @@ export const ALL_METADATA_ENTITY_BY_METADATA_NAME = {
|
||||
view: ViewEntity,
|
||||
index: IndexMetadataEntity,
|
||||
pageLayoutTab: PageLayoutTabEntity,
|
||||
routeTrigger: ServerlessFunctionEntity,
|
||||
cronTrigger: ServerlessFunctionEntity,
|
||||
databaseEventTrigger: ServerlessFunctionEntity,
|
||||
frontComponent: FrontComponentEntity,
|
||||
fieldMetadata: FieldMetadataEntity,
|
||||
pageLayout: PageLayoutEntity,
|
||||
skill: SkillEntity,
|
||||
serverlessFunction: ServerlessFunctionEntity,
|
||||
logicFunction: LogicFunctionEntity,
|
||||
objectMetadata: ObjectMetadataEntity,
|
||||
role: RoleEntity,
|
||||
agent: AgentEntity,
|
||||
|
||||
+2
-26
@@ -261,35 +261,11 @@ export const ALL_METADATA_RELATIONS = {
|
||||
indexFieldMetadatas: null,
|
||||
},
|
||||
},
|
||||
serverlessFunction: {
|
||||
logicFunction: {
|
||||
manyToOne: {
|
||||
workspace: null,
|
||||
application: null,
|
||||
serverlessFunctionLayer: null,
|
||||
},
|
||||
oneToMany: {},
|
||||
},
|
||||
cronTrigger: {
|
||||
manyToOne: {
|
||||
application: null,
|
||||
serverlessFunctionLayer: null,
|
||||
workspace: null,
|
||||
},
|
||||
oneToMany: {},
|
||||
},
|
||||
databaseEventTrigger: {
|
||||
manyToOne: {
|
||||
application: null,
|
||||
serverlessFunctionLayer: null,
|
||||
workspace: null,
|
||||
},
|
||||
oneToMany: {},
|
||||
},
|
||||
routeTrigger: {
|
||||
manyToOne: {
|
||||
application: null,
|
||||
serverlessFunctionLayer: null,
|
||||
workspace: null,
|
||||
logicFunctionLayer: null,
|
||||
},
|
||||
oneToMany: {},
|
||||
},
|
||||
|
||||
+1
-10
@@ -31,16 +31,7 @@ export const ALL_METADATA_REQUIRED_METADATA_FOR_VALIDATION = {
|
||||
objectMetadata: true,
|
||||
fieldMetadata: true,
|
||||
},
|
||||
serverlessFunction: {},
|
||||
cronTrigger: {
|
||||
serverlessFunction: true,
|
||||
},
|
||||
databaseEventTrigger: {
|
||||
serverlessFunction: true,
|
||||
},
|
||||
routeTrigger: {
|
||||
serverlessFunction: true,
|
||||
},
|
||||
logicFunction: {},
|
||||
viewFilter: {
|
||||
view: true,
|
||||
fieldMetadata: true,
|
||||
|
||||
Reference in New Issue
Block a user