Dirty fix twenty cli ci build order issue (#16024)
# Introduction
- fix twenty-apps hello world deps lockfile
- improve error response format in application resolver
- fixed tests by adding applicationId back to serverless function
service v2
## New log format
We should have a tmp logs folder where we write the errors so the user
can see the whole of them such as what's done in yarn logs
```ts
console.log
✓ Client generated successfully!
at GenerateService.generateClient (src/services/generate.service.ts:58:13)
console.log
Generated files at: /Users/paulrastoin/ws/twenty/packages/twenty-apps/hello-world/generated
at GenerateService.generateClient (src/services/generate.service.ts:59:13)
console.error
❌ Serverless functions Sync failed: {
message: 'Multiple validation errors occurred while creating serverless function',
extensions: {
code: 'METADATA_VALIDATION_FAILED',
errors: {
fieldMetadata: [],
objectMetadata: [],
view: [],
viewField: [],
viewGroup: [],
index: [],
serverlessFunction: [Array],
cronTrigger: [],
databaseEventTrigger: [],
routeTrigger: [],
viewFilter: []
},
summary: {
invalidViewFilter: 0,
invalidObjectMetadata: 0,
invalidView: 0,
invalidViewField: 0,
invalidIndex: 0,
invalidServerlessFunction: 0,
invalidDatabaseEventTrigger: 0,
invalidCronTrigger: 0,
invalidRouteTrigger: 0,
invalidFieldMetadata: 0,
invalidViewGroup: 0,
totalErrors: 0
},
message: 'Validation failed for 0 object(s) and 0 field(s)',
userFriendlyMessage: 'Validation failed for 0 object(s) and 0 field(s)'
}
}
63 | JSON.stringify(serverlessSyncResult.error, null, 2),
64 | );
> 65 | console.error(
| ^
66 | chalk.red('❌ Serverless functions Sync failed:'),
67 | serverlessSyncResult.error,
68 | );
at AppSyncCommand.synchronize (src/commands/app-sync.command.ts:65:15)
at async AppSyncCommand.execute (src/commands/app-sync.command.ts:21:14)
at async Object.<anonymous> (src/__tests__/e2e/applications-install-delete-reinstall.e2e-spec.ts:28:22)
```
This commit is contained in:
+8
-1
@@ -30,10 +30,16 @@ export class ServerlessFunctionV2Service {
|
||||
async createOne({
|
||||
createServerlessFunctionInput,
|
||||
workspaceId,
|
||||
applicationId,
|
||||
}: {
|
||||
createServerlessFunctionInput: CreateServerlessFunctionInput & {
|
||||
serverlessFunctionLayerId: string;
|
||||
};
|
||||
/**
|
||||
* @deprecated do not use call validateBuildAndRunWorkspaceMigration contextually
|
||||
* when interacting with another application than workspace custom one
|
||||
* */
|
||||
applicationId?: string;
|
||||
workspaceId: string;
|
||||
}) {
|
||||
const { workspaceCustomFlatApplication } =
|
||||
@@ -58,7 +64,8 @@ export class ServerlessFunctionV2Service {
|
||||
fromCreateServerlessFunctionInputToFlatServerlessFunction({
|
||||
createServerlessFunctionInput,
|
||||
workspaceId,
|
||||
workspaceCustomApplicationId: workspaceCustomFlatApplication.id,
|
||||
workspaceCustomApplicationId:
|
||||
applicationId ?? workspaceCustomFlatApplication.id,
|
||||
});
|
||||
|
||||
const validateAndBuildResult =
|
||||
|
||||
Reference in New Issue
Block a user