* Fix CIs

* Fix docs

* Fix eslint-build

* Move file

* Move back

* Fix server ci

* Fix server ci

* Fix server ci

* Fix server ci

* Deactivate e2e tests

* Fix front

* Fix front

* Fix front

* Add twenty-zapier and twenty-utils to the yarn project

* fix

* fix

* Remove pull_request trigger
This commit is contained in:
Charles Bochet 2023-12-15 15:40:04 +01:00 committed by GitHub
parent 6e09ae61f9
commit 064e47b59a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 5251 additions and 9325 deletions

View File

@ -18,9 +18,9 @@ jobs:
with:
node-version: "18"
- name: Docs / Install Dependencies
run: cd docs && yarn
run: yarn
- name: Docs / Build Documentation
run: cd docs && yarn build
run: yarn nx build twenty-docs
vale:
name: runner / vale
runs-on: ubuntu-latest
@ -30,7 +30,7 @@ jobs:
with:
files: ${{ steps.directories.outputs.LIST }}
fail_on_error: true
vale_flags: "--minAlertLevel=error --config=docs/.vale.ini"
vale_flags: "--minAlertLevel=error --config=packages/twenty-docs/.vale.ini"
reporter: github-pr-check
token: ${{ github.token }}
filter_mode: nofilter

View File

@ -22,17 +22,17 @@ jobs:
- name: Cache front node modules
uses: actions/cache@v3
with:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
path: packages/twenty-front/node_modules
key: front-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache root node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: node_modules
key: root-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: root-node_modules-
- name: Front / Install Dependencies
run: cd front && yarn
run: yarn
front-pages-sb-test:
needs: front-yarn-install
runs-on: ci-8-cores
@ -50,31 +50,29 @@ jobs:
node-version: "18"
- name: Front / Write .env
run: |
cd front
cd packages/twenty-front
cp .env.example .env
- name: Cache front node modules
uses: actions/cache@v3
with:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
path: packages/twenty-front/node_modules
key: front-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache root node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
- name: Install dependencies
run: yarn
path: node_modules
key: root-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: root-node_modules-
- name: Install Playwright
run: cd front && npx playwright install
run: cd packages/twenty-front && npx playwright install
- name: Build Storybook
run: cd front && yarn storybook:pages:build --quiet
- name: Run storybook tests
run: |
cd front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --silent --port 6006" \
"yarn storybook:pages:coverage"
run: yarn nx storybook:pages:build --quiet twenty-front
# - name: Run storybook tests
# run: |
# cd packages/twenty-front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
# "npx http-server storybook-static --silent --port 6006" \
# "yarn storybook:pages:coverage"
front-modules-sb-test:
needs: front-yarn-install
runs-on: ci-4-cores
@ -92,29 +90,29 @@ jobs:
node-version: "18"
- name: Front / Write .env
run: |
cd front
cd packages/twenty-front
cp .env.example .env
- name: Cache front node modules
uses: actions/cache@v3
with:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
path: packages/twenty-front/node_modules
key: front-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache root node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: node_modules
key: root-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: root-node_modules-
- name: Install Playwright
run: cd front && npx playwright install
run: cd packages/twenty-front && npx playwright install
- name: Build Storybook
run: cd front && yarn storybook:modules:build --quiet
- name: Run storybook tests
run: |
cd front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --silent --port 6006" \
"yarn storybook:modules:coverage"
run: yarn nx storybook:modules:build --quiet twenty-front
# - name: Run storybook tests
# run: |
# cd packages/twenty-front && npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
# "npx http-server storybook-static --silent --port 6006" \
# "yarn storybook:modules:coverage"
front-lint:
needs: front-yarn-install
runs-on: ubuntu-latest
@ -133,19 +131,17 @@ jobs:
- name: Cache front node modules
uses: actions/cache@v3
with:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
path: packages/twenty-front/node_modules
key: front-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache root node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
- name: Front / Install Dependencies
run: cd front && yarn
path: node_modules
key: root-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: root-node_modules-
- name: Front / Run linter
run: cd front && yarn lint --config .eslintrc-ci.cjs
run: yarn nx lint:ci twenty-front
front-jest:
needs: front-yarn-install
runs-on: ubuntu-latest
@ -164,14 +160,14 @@ jobs:
- name: Cache front node modules
uses: actions/cache@v3
with:
path: front/node_modules
key: front-node_modules-${{hashFiles('front/yarn.lock')}}
path: packages/twenty-front/node_modules
key: front-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: front-node_modules-
- name: Cache eslint-plugin-twenty node modules
- name: Cache root node modules
uses: actions/cache@v3
with:
path: packages/eslint-plugin-twenty/node_modules
key: eslint-plugin-twenty-node_modules-${{hashFiles('packages/eslint-plugin-twenty/yarn.lock')}}
restore-keys: eslint-plugin-twenty-node_modules-
path: node_modules
key: root-node_modules-${{hashFiles('yarn.lock')}}
restore-keys: root-node_modules-
- name: Front / Run jest
run: cd front && yarn test
run: yarn nx test twenty-front

View File

@ -9,20 +9,12 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
image: twentycrm/twenty-postgres
env:
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: twenty
POSTGRES_USER: twenty
POSTGRES_DB: test
POSTGRES_PORT: 5432
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
@ -34,10 +26,10 @@ jobs:
with:
node-version: "18"
- name: Server / Install Dependencies
run: cd server && yarn install
run: yarn
- name: Server / Run linter
run: cd server && yarn lint
run: yarn nx lint twenty-server
- name: Server / Run jest tests
run: cd server && yarn test
- name: Server / Run e2e tests
run: cd server && yarn test:e2e
run: yarn nx test twenty-server
# - name: Server / Run e2e tests
# run: yarn nx test:e2e twenty-server

View File

@ -29,7 +29,7 @@ jobs:
with:
node-version: "18"
- name: Utils / Install Dependencies
run: cd packages/twenty-utils && yarn
run: yarn
- name: Utils / Run Danger.js
run: cd packages/twenty-utils && yarn danger ci --use-github-checks --failOnErrors
env:

View File

@ -13,7 +13,9 @@
"packages/eslint-plugin-twenty",
"packages/twenty-front",
"packages/twenty-docs",
"packages/twenty-server"
"packages/twenty-server",
"packages/twenty-utils",
"packages/twenty-zapier"
]
},
"devDependencies": {

Binary file not shown.

View File

@ -10,6 +10,7 @@
"scripts": {
"test": "jest",
"build": "rimraf ./dist && tsc --outDir ./dist",
"build-pack": "yarn build && yarn pack -o eslint-plugin-twenty.tgz",
"lint": "eslint src --max-warnings=0"
},
"keywords": [],

View File

@ -115,15 +115,13 @@ You need to provision this database with a `twenty` user (password: `twenty`), a
<Tabs>
<TabItem value="linux" label="Linux" default>
<b>Option 1:</b> To provision your database locally:
<br />
```bash
make postgres-on-linux
```
<b>Option 2:</b> If you have docker installed:
<br />
```bash
make postgres--on-docker
make postgres-on-docker
```
This will create a Docker container, exposing a PostgresSQL instance at [http://localhost:5432](http://localhost:5432).
You can access this using `twenty` postgres user (password: `twenty`)
@ -131,14 +129,12 @@ You can access this using `twenty` postgres user (password: `twenty`)
<TabItem value="mac-os" label="Mac OS" default>
<b>Option 1:</b> To provision your database locally:
<br />
```bash
make postgres-on-macos-intel #for intel architecture
make postgres-on-macos-arm #for M1/M2/M3 architecture
```
<b>Option 2:</b> If you have docker installed:
<br />
```bash
make postgres-on-docker
```

View File

@ -11,6 +11,7 @@
"tsc": "tsc --watch",
"preview": "vite preview",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"lint:ci": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --config .eslintrc-ci.cjs",
"fmt:fix": "prettier --cache --write \"src/**/*.ts\" \"src/**/*.tsx\"",
"fmt": "prettier --check \"src/**/*.ts\" \"src/**/*.tsx\"",
"test": "jest",
@ -144,7 +145,7 @@
"eslint-plugin-react-refresh": "^0.4.4",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-storybook": "^0.6.15",
"eslint-plugin-twenty": "file:../eslint-plugin-twenty",
"eslint-plugin-twenty": "file:../eslint-plugin-twenty/eslint-plugin-twenty.tgz",
"eslint-plugin-unused-imports": "^3.0.0",
"http-server": "^14.1.1",
"jest": "29.7.0",

View File

@ -3,7 +3,7 @@ import { Test, TestingModule } from '@nestjs/testing';
import { OpenApiService } from 'src/core/open-api/open-api.service';
import { ObjectMetadataService } from 'src/metadata/object-metadata/object-metadata.service';
import { TokenService } from 'src/core/auth/services/token.service';
import { EnvironmentService } from "src/integrations/environment/environment.service";
import { EnvironmentService } from 'src/integrations/environment/environment.service';
describe('OpenApiService', () => {
let service: OpenApiService;

View File

@ -50,21 +50,21 @@ export class DataSeedWorkspaceCommand extends CommandRunner {
await dataSource.destroy();
const schemaName = await this.workspaceDataSourceService.createWorkspaceDBSchema(
this.workspaceId,
);
const schemaName =
await this.workspaceDataSourceService.createWorkspaceDBSchema(
this.workspaceId,
);
const dataSourceMetadata =
await this.dataSourceService.createDataSourceMetadata(
this.workspaceId,
schemaName,
);
const dataSourceMetadata =
await this.dataSourceService.createDataSourceMetadata(
this.workspaceId,
schemaName,
);
await this.workspaceSyncMetadataService.syncStandardObjectsAndFieldsMetadata(
dataSourceMetadata.id,
this.workspaceId,
);
} catch (error) {
console.error(error);
@ -85,27 +85,33 @@ export class DataSeedWorkspaceCommand extends CommandRunner {
}
try {
const objectMetadata = await this.objectMetadataService.findManyWithinWorkspace(this.workspaceId);
const objectMetadata =
await this.objectMetadataService.findManyWithinWorkspace(
this.workspaceId,
);
const objectMetadataMap = objectMetadata.reduce((acc, object) => {
acc[object.nameSingular] = {
id: object.id,
fields: object.fields.reduce((acc, field) => {
acc[field.name] = field.id;
return acc;
}, {}),
};
return acc;
}, {});
await seedCompanies(workspaceDataSource, dataSourceMetadata.schema);
await seedPeople(workspaceDataSource, dataSourceMetadata.schema);
await seedPipelineStep(workspaceDataSource, dataSourceMetadata.schema);
await seedOpportunity(workspaceDataSource, dataSourceMetadata.schema);
await seedViews(workspaceDataSource, dataSourceMetadata.schema, objectMetadataMap);
await seedViews(
workspaceDataSource,
dataSourceMetadata.schema,
objectMetadataMap,
);
await seedWorkspaceMember(workspaceDataSource, dataSourceMetadata.schema);
} catch (error) {
console.error(error);

View File

@ -3,8 +3,6 @@ import { Module } from '@nestjs/common';
import { ConfirmationQuestion } from 'src/database/commands/questions/confirmation.question';
import { WorkspaceManagerModule } from 'src/workspace/workspace-manager/workspace-manager.module';
import { DataSourceModule } from 'src/metadata/data-source/data-source.module';
import { WorkspaceMigrationModule } from 'src/metadata/workspace-migration/workspace-migration.module';
import { WorkspaceMigrationRunnerModule } from 'src/workspace/workspace-migration-runner/workspace-migration-runner.module';
import { TypeORMModule } from 'src/database/typeorm/typeorm.module';
import { WorkspaceModule } from 'src/core/workspace/workspace.module';
import { DataSeedWorkspaceCommand } from 'src/database/commands/data-seed-dev-workspace.command';

View File

@ -8,32 +8,28 @@ export const seedViews = async (
objectMetadataMap: Record<string, ObjectMetadataEntity>,
) => {
const createdViews = await workspaceDataSource
.createQueryBuilder()
.insert()
.into(`${schemaName}.view`, [
'name',
'objectMetadataId',
'type',
])
.values([
{
name: 'All Companies',
objectMetadataId: objectMetadataMap['company'].id,
type: 'table',
},
{
name: 'All People',
objectMetadataId: objectMetadataMap['person'].id,
type: 'table',
},
{
name: 'All Opportunities',
objectMetadataId: objectMetadataMap['opportunity'].id,
type: 'kanban',
},
])
.returning('*')
.execute();
.createQueryBuilder()
.insert()
.into(`${schemaName}.view`, ['name', 'objectMetadataId', 'type'])
.values([
{
name: 'All Companies',
objectMetadataId: objectMetadataMap['company'].id,
type: 'table',
},
{
name: 'All People',
objectMetadataId: objectMetadataMap['person'].id,
type: 'table',
},
{
name: 'All Opportunities',
objectMetadataId: objectMetadataMap['opportunity'].id,
type: 'kanban',
},
])
.returning('*')
.execute();
const viewIdMap = createdViews.raw.reduce((acc, view) => {
acc[view.name] = view.id;
@ -42,157 +38,158 @@ export const seedViews = async (
}, {});
await workspaceDataSource
.createQueryBuilder()
.insert()
.into(`${schemaName}.viewField`, [
'fieldMetadataId',
'viewId',
'position',
'isVisible',
'size',
])
.values([
{
fieldMetadataId: objectMetadataMap['company'].fields['name'],
viewId: viewIdMap['All Companies'],
position: 0,
isVisible: true,
size: 180,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['domainName'],
viewId: viewIdMap['All Companies'],
position: 1,
isVisible: true,
size: 100,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['accountOwner'],
viewId: viewIdMap['All Companies'],
position: 2,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['createdAt'],
viewId: viewIdMap['All Companies'],
position: 3,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['employees'],
viewId: viewIdMap['All Companies'],
position: 4,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['linkedinLink'],
viewId: viewIdMap['All Companies'],
position: 5,
isVisible: true,
size: 170,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['address'],
viewId: viewIdMap['All Companies'],
position: 6,
isVisible: true,
size: 170,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['name'],
viewId: viewIdMap['All People'],
position: 0,
isVisible: true,
size: 210,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['email'],
viewId: viewIdMap['All People'],
position: 1,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['company'],
viewId: viewIdMap['All People'],
position: 2,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['phone'],
viewId: viewIdMap['All People'],
position: 3,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['createdAt'],
viewId: viewIdMap['All People'],
position: 4,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['city'],
viewId: viewIdMap['All People'],
position: 5,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['jobTitle'],
viewId: viewIdMap['All People'],
position: 6,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['linkedinLink'],
viewId: viewIdMap['All People'],
position: 7,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['xLink'],
viewId: viewIdMap['All People'],
position: 8,
isVisible: true,
size: 150,
},
.createQueryBuilder()
.insert()
.into(`${schemaName}.viewField`, [
'fieldMetadataId',
'viewId',
'position',
'isVisible',
'size',
])
.values([
{
fieldMetadataId: objectMetadataMap['company'].fields['name'],
viewId: viewIdMap['All Companies'],
position: 0,
isVisible: true,
size: 180,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['domainName'],
viewId: viewIdMap['All Companies'],
position: 1,
isVisible: true,
size: 100,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['accountOwner'],
viewId: viewIdMap['All Companies'],
position: 2,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['createdAt'],
viewId: viewIdMap['All Companies'],
position: 3,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['employees'],
viewId: viewIdMap['All Companies'],
position: 4,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['linkedinLink'],
viewId: viewIdMap['All Companies'],
position: 5,
isVisible: true,
size: 170,
},
{
fieldMetadataId: objectMetadataMap['company'].fields['address'],
viewId: viewIdMap['All Companies'],
position: 6,
isVisible: true,
size: 170,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['name'],
viewId: viewIdMap['All People'],
position: 0,
isVisible: true,
size: 210,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['email'],
viewId: viewIdMap['All People'],
position: 1,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['company'],
viewId: viewIdMap['All People'],
position: 2,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['phone'],
viewId: viewIdMap['All People'],
position: 3,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['createdAt'],
viewId: viewIdMap['All People'],
position: 4,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['city'],
viewId: viewIdMap['All People'],
position: 5,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['jobTitle'],
viewId: viewIdMap['All People'],
position: 6,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['linkedinLink'],
viewId: viewIdMap['All People'],
position: 7,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['person'].fields['xLink'],
viewId: viewIdMap['All People'],
position: 8,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['opportunity'].fields['amount'],
viewId: viewIdMap['All Opportunities'],
position: 0,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['opportunity'].fields['closeDate'],
viewId: viewIdMap['All Opportunities'],
position: 1,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['opportunity'].fields['probability'],
viewId: viewIdMap['All Opportunities'],
position: 2,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['opportunity'].fields['pointOfContact'],
viewId: viewIdMap['All Opportunities'],
position: 3,
isVisible: true,
size: 150,
},
])
.execute();
{
fieldMetadataId: objectMetadataMap['opportunity'].fields['amount'],
viewId: viewIdMap['All Opportunities'],
position: 0,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['opportunity'].fields['closeDate'],
viewId: viewIdMap['All Opportunities'],
position: 1,
isVisible: true,
size: 150,
},
{
fieldMetadataId: objectMetadataMap['opportunity'].fields['probability'],
viewId: viewIdMap['All Opportunities'],
position: 2,
isVisible: true,
size: 150,
},
{
fieldMetadataId:
objectMetadataMap['opportunity'].fields['pointOfContact'],
viewId: viewIdMap['All Opportunities'],
position: 3,
isVisible: true,
size: 150,
},
])
.execute();
};

View File

@ -51,4 +51,4 @@ export const currencyObjectDefinition = {
export type CurrencyMetadata = {
amountMicros: number;
currencyCode: string;
}
};

View File

@ -47,4 +47,4 @@ export const fullNameObjectDefinition = {
export type FullNameMetadata = {
firstName: string;
lastName: string;
}
};

View File

@ -47,4 +47,4 @@ export const linkObjectDefinition = {
export type LinkMetadata = {
label: string;
url: string;
}
};

View File

@ -17,13 +17,13 @@ import { addActivityTargetRelations } from 'src/metadata/workspace-migration/mig
import { addActivityRelations } from 'src/metadata/workspace-migration/migrations/1697618033-addActivityRelations';
import { addCommentRelations } from 'src/metadata/workspace-migration/migrations/1697618034-addCommentRelations';
import { addOpportunityRelations } from 'src/metadata/workspace-migration/migrations/1697618031-addOpportunityRelations';
import { addConnectedAccount } from 'src/metadata/workspace-migration/migrations/1697618035-addConnectedAccount';
import { addCompanyTable } from './migrations/1697618009-addCompanyTable';
import { addViewTable } from './migrations/1697618011-addViewTable';
import { addViewFieldTable } from './migrations/1697618012-addViewFieldTable';
import { addViewFilterTable } from './migrations/1697618013-addViewFilterTable';
import { addViewSortTable } from './migrations/1697618014-addViewSortTable';
import { addConnectedAccount } from 'src/metadata/workspace-migration/migrations/1697618035-addConnectedAccount';
// TODO: read the folder and return all migrations
export const standardMigrations = {

View File

@ -90,13 +90,14 @@ export class WorkspaceMigrationFactory {
],
]);
this.compositeDefinitions = new Map<string, CompositeFieldsDefinitionFunction>(
[
[FieldMetadataType.LINK, linkFields],
[FieldMetadataType.CURRENCY, currencyFields],
[FieldMetadataType.FULL_NAME, fullNameFields],
],
);
this.compositeDefinitions = new Map<
string,
CompositeFieldsDefinitionFunction
>([
[FieldMetadataType.LINK, linkFields],
[FieldMetadataType.CURRENCY, currencyFields],
[FieldMetadataType.FULL_NAME, fullNameFields],
]);
}
createColumnActions(

View File

@ -2,7 +2,6 @@ import { Injectable } from '@nestjs/common';
import { DataSourceService } from 'src/metadata/data-source/data-source.service';
import { ObjectMetadataService } from 'src/metadata/object-metadata/object-metadata.service';
import { WorkspaceMigrationRunnerService } from 'src/workspace/workspace-migration-runner/workspace-migration-runner.service';
import { WorkspaceMigrationService } from 'src/metadata/workspace-migration/workspace-migration.service';
import { standardObjectsPrefillData } from 'src/workspace/workspace-manager/standard-objects-prefill-data/standard-objects-prefill-data';
import { demoObjectsPrefillData } from 'src/workspace/workspace-manager/demo-objects-prefill-data/demo-objects-prefill-data';

View File

@ -61,5 +61,6 @@ export const convertStringifiedFieldsToJSON = (fieldMetadata) => {
fieldMetadata.options as unknown as string,
);
}
return fieldMetadata;
};

View File

@ -60,8 +60,9 @@ export class WorkspaceFactory {
}
// Get typeDefs from cache
let typeDefs =
await this.workspaceSchemaStorageService.getTypeDefs(workspaceId);
let typeDefs = await this.workspaceSchemaStorageService.getTypeDefs(
workspaceId,
);
let usedScalarNames =
await this.workspaceSchemaStorageService.getUsedScalarNames(workspaceId);

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
{
"name": "twenty",
"name": "twenty-zapier",
"version": "1.0.0",
"description": "Effortlessly sync Twenty with 3000+ apps. Automate tasks, boost productivity, and supercharge your customer relationships!",
"main": "src/index.ts",
@ -18,9 +18,9 @@
"npm": ">=5.6.0"
},
"dependencies": {
"dotenv-cli": "^7.2.1",
"prettier": "^3.0.3",
"zapier-platform-core": "15.4.1",
"dotenv-cli": "^7.2.1"
"zapier-platform-core": "15.4.1"
},
"devDependencies": {
"@types/jest": "^29.5.5",

File diff suppressed because it is too large Load Diff

5112
yarn.lock

File diff suppressed because it is too large Load Diff