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:
@@ -235,7 +235,7 @@ export class ApiService {
|
||||
}
|
||||
}
|
||||
|
||||
async findServerlessFunctions(): Promise<
|
||||
async findLogicFunctions(): Promise<
|
||||
ApiResponse<
|
||||
Array<{
|
||||
id: string;
|
||||
@@ -247,8 +247,8 @@ export class ApiService {
|
||||
> {
|
||||
try {
|
||||
const query = `
|
||||
query FindManyServerlessFunctions {
|
||||
findManyServerlessFunctions {
|
||||
query FindManyLogicFunctions {
|
||||
findManyLogicFunctions {
|
||||
id
|
||||
name
|
||||
universalIdentifier
|
||||
@@ -278,7 +278,7 @@ export class ApiService {
|
||||
|
||||
return {
|
||||
success: true,
|
||||
data: response.data.data.findManyServerlessFunctions,
|
||||
data: response.data.data.findManyLogicFunctions,
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
@@ -288,7 +288,7 @@ export class ApiService {
|
||||
}
|
||||
}
|
||||
|
||||
async executeServerlessFunction({
|
||||
async executeLogicFunction({
|
||||
functionId,
|
||||
payload,
|
||||
version = 'latest',
|
||||
@@ -311,8 +311,8 @@ export class ApiService {
|
||||
> {
|
||||
try {
|
||||
const mutation = `
|
||||
mutation ExecuteOneServerlessFunction($input: ExecuteServerlessFunctionInput!) {
|
||||
executeOneServerlessFunction(input: $input) {
|
||||
mutation ExecuteOneLogicFunction($input: ExecuteLogicFunctionInput!) {
|
||||
executeOneLogicFunction(input: $input) {
|
||||
data
|
||||
logs
|
||||
duration
|
||||
@@ -349,13 +349,13 @@ export class ApiService {
|
||||
success: false,
|
||||
error:
|
||||
response.data.errors[0]?.message ||
|
||||
'Failed to execute serverless function',
|
||||
'Failed to execute logic function',
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
data: response.data.data.executeOneServerlessFunction,
|
||||
data: response.data.data.executeOneLogicFunction,
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
@@ -386,8 +386,8 @@ export class ApiService {
|
||||
});
|
||||
|
||||
const query = `
|
||||
subscription SubscribeToLogs($input: ServerlessFunctionLogsInput!) {
|
||||
serverlessFunctionLogs(input: $input) {
|
||||
subscription SubscribeToLogs($input: LogicFunctionLogsInput!) {
|
||||
logicFunctionLogs(input: $input) {
|
||||
logs
|
||||
}
|
||||
}
|
||||
@@ -401,13 +401,13 @@ export class ApiService {
|
||||
},
|
||||
};
|
||||
|
||||
wsClient.subscribe<{ serverlessFunctionLogs: { logs: string } }>(
|
||||
wsClient.subscribe<{ logicFunctionLogs: { logs: string } }>(
|
||||
{
|
||||
query,
|
||||
variables,
|
||||
},
|
||||
{
|
||||
next: ({ data }) => console.log(data?.serverlessFunctionLogs.logs),
|
||||
next: ({ data }) => console.log(data?.logicFunctionLogs.logs),
|
||||
error: (err: unknown) => console.error(err),
|
||||
complete: () => console.log('Completed'),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user