Remove logic function layer (#17697)

## Remove logic function layer

Package.json and yarn.lock are now on the application entity, so the
logic function layer is no longer used except as a legacy source for the
1.17 backfill. This PR removes all layer usage outside of that migration
and keeps only the entity for backfill.

### Summary

- **Kept:** `LogicFunctionLayerEntity` and its table, only used by the
1.17 backfill command to read legacy layer data and backfill application
package files.
- **Removed:** All other layer logic: CRUD, cache, resolvers, services,
DTOs, and frontend types. Logic functions now depend only on the
application for package/dependency context.


### Why Dependencies instead of Source for package files

Package.json and yarn.lock are the application’s dependency set and are
stored under the application in **FileFolder.Dependencies**. The build
service and drivers now read them only from Dependencies; nothing is
written to Source for these files.
This commit is contained in:
Charles Bochet
2026-02-04 10:17:27 +01:00
committed by GitHub
parent e10e0b337e
commit 402d149ee1
36 changed files with 171 additions and 643 deletions
@@ -7,7 +7,6 @@ import { type FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/
import { type FlatWorkspaceMemberMaps } from 'src/engine/core-modules/user/types/flat-workspace-member-maps.type';
import { type FlatRoleTargetByAgentIdMaps } from 'src/engine/metadata-modules/flat-agent/types/flat-role-target-by-agent-id-maps.type';
import { type AllFlatEntityMaps } from 'src/engine/metadata-modules/flat-entity/types/all-flat-entity-maps.type';
import { type LogicFunctionLayerCacheMaps } from 'src/engine/metadata-modules/logic-function-layer/types/logic-function-layer-cache-maps.type';
import { type UserWorkspaceRoleMap } from 'src/engine/metadata-modules/role-target/services/workspace-user-workspace-role-map-cache.service';
import { type FlatRowLevelPermissionPredicateGroupMaps } from 'src/engine/metadata-modules/row-level-permission-predicate/types/flat-row-level-permission-predicate-group-maps.type';
import { type FlatRowLevelPermissionPredicateMaps } from 'src/engine/metadata-modules/row-level-permission-predicate/types/flat-row-level-permission-predicate-maps.type';
@@ -45,7 +44,6 @@ export const WORKSPACE_CACHE_KEYS_V2 = {
flatFrontComponentMaps: 'flat-maps:front-component',
flatWebhookMaps: 'flat-maps:webhook',
flatWorkspaceMemberMaps: 'flat-maps:workspace-member',
logicFunctionLayerMaps: 'cache:logic-function-layer',
applicationVariableMaps: 'cache:application-variable',
} as const satisfies Record<WorkspaceCacheKeyName, string>;
@@ -60,7 +58,6 @@ export type AdditionalCacheDataMaps = {
flatRowLevelPermissionPredicateMaps: FlatRowLevelPermissionPredicateMaps;
flatRowLevelPermissionPredicateGroupMaps: FlatRowLevelPermissionPredicateGroupMaps;
flatWorkspaceMemberMaps: FlatWorkspaceMemberMaps;
logicFunctionLayerMaps: LogicFunctionLayerCacheMaps;
applicationVariableMaps: ApplicationVariableCacheMaps;
};