diff --git a/packages/nocodb/src/db/genRollupSelectv2.ts b/packages/nocodb/src/db/genRollupSelectv2.ts index d39ff51fc8..decf600942 100644 --- a/packages/nocodb/src/db/genRollupSelectv2.ts +++ b/packages/nocodb/src/db/genRollupSelectv2.ts @@ -1,5 +1,5 @@ import { RelationTypes } from 'nocodb-sdk'; -import { LinksColumn } from '../models' +import type { LinksColumn } from '../models'; import type { RollupColumn } from '../models'; import type { XKnex } from '../db/CustomKnex'; import type { LinkToAnotherRecordColumn } from '../models'; diff --git a/packages/nocodb/src/helpers/populateMeta.ts b/packages/nocodb/src/helpers/populateMeta.ts index a2b9f95d7b..d4d3e437ea 100644 --- a/packages/nocodb/src/helpers/populateMeta.ts +++ b/packages/nocodb/src/helpers/populateMeta.ts @@ -1,7 +1,7 @@ import { ModelTypes, UITypes, ViewTypes } from 'nocodb-sdk'; import { isVirtualCol, RelationTypes } from 'nocodb-sdk'; import { pluralize, singularize } from 'inflection'; -import { isLinksOrLTAR } from 'nocodb-sdk' +import { isLinksOrLTAR } from 'nocodb-sdk'; import { GridViewColumn } from '../models'; import Column from '../models/Column'; import Model from '../models/Model'; diff --git a/packages/nocodb/src/models/Column.ts b/packages/nocodb/src/models/Column.ts index b7f1eab8f4..758458a4b3 100644 --- a/packages/nocodb/src/models/Column.ts +++ b/packages/nocodb/src/models/Column.ts @@ -12,7 +12,6 @@ import { NcError } from '../helpers/catchError'; import { extractProps } from '../helpers/extractProps'; import { stringifyMetaProp } from '../utils/modelUtils'; import FormulaColumn from './FormulaColumn'; -import { LinksColumn } from './index'; import LinkToAnotherRecordColumn from './LinkToAnotherRecordColumn'; import LookupColumn from './LookupColumn'; import RollupColumn from './RollupColumn'; @@ -23,6 +22,7 @@ import Sort from './Sort'; import Filter from './Filter'; import QrCodeColumn from './QrCodeColumn'; import BarcodeColumn from './BarcodeColumn'; +import { LinksColumn } from './index'; import type { ColumnReqType, ColumnType } from 'nocodb-sdk'; export default class Column implements ColumnType { diff --git a/packages/nocodb/src/models/View.ts b/packages/nocodb/src/models/View.ts index 9a4fd88f2f..3135666e86 100644 --- a/packages/nocodb/src/models/View.ts +++ b/packages/nocodb/src/models/View.ts @@ -1,4 +1,3 @@ -import { title } from 'process'; import { isSystemColumn, UITypes, ViewTypes } from 'nocodb-sdk'; import Noco from '../Noco'; import { diff --git a/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts b/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts index fddf61c6c0..d83f34668a 100644 --- a/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts +++ b/packages/nocodb/src/modules/jobs/jobs/at-import/at-import.processor.ts @@ -1972,9 +1972,7 @@ export class AtImportProcessor { migrationStatsObj.aTbl.rollup = aTblRollup.length; const ncTbl = await nc_getTableSchema(aTblSchema[idx].name); - const linkColumn = ncTbl.columns.filter( - (x) => isLinksOrLTAR(x) - ); + const linkColumn = ncTbl.columns.filter((x) => isLinksOrLTAR(x)); const lookup = ncTbl.columns.filter((x) => x.uidt === UITypes.Lookup); const rollup = ncTbl.columns.filter((x) => x.uidt === UITypes.Rollup); diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts index 5e598a3180..a37e1bed6b 100644 --- a/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts +++ b/packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts @@ -1,5 +1,5 @@ import { Readable } from 'stream'; -import { isLinksOrLTAR, UITypes, ViewTypes } from 'nocodb-sdk' +import { isLinksOrLTAR, UITypes, ViewTypes } from 'nocodb-sdk'; import { unparse } from 'papaparse'; import { Injectable, Logger } from '@nestjs/common'; import NcConnectionMgrv2 from '../../../../utils/common/NcConnectionMgrv2'; @@ -357,9 +357,7 @@ export class ExportService { .join(','); const mmColumns = model.columns.filter( - (col) => - isLinksOrLTAR(col) && - col.colOptions?.type === 'mm', + (col) => isLinksOrLTAR(col) && col.colOptions?.type === 'mm', ); const hasLink = mmColumns.length > 0; diff --git a/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts b/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts index 887d6a7f31..25ff538589 100644 --- a/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts +++ b/packages/nocodb/src/modules/jobs/jobs/export-import/import.service.ts @@ -166,9 +166,7 @@ export class ImportService { const modelData = data.model; const table = tableReferences.get(modelData.id); - const linkedColumnSet = modelData.columns.filter( - (a) => isLinksOrLTAR(a) - ); + const linkedColumnSet = modelData.columns.filter((a) => isLinksOrLTAR(a)); for (const col of linkedColumnSet) { if (col.colOptions) { diff --git a/packages/nocodb/src/services/bases.service.ts b/packages/nocodb/src/services/bases.service.ts index f68b6c01ee..9268f6718c 100644 --- a/packages/nocodb/src/services/bases.service.ts +++ b/packages/nocodb/src/services/bases.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { T } from 'nc-help'; import { populateMeta, validatePayload } from '../helpers'; -import { populateRollupColumnAndHideLTAR } from '../helpers/populateMeta' +import { populateRollupColumnAndHideLTAR } from '../helpers/populateMeta'; import { syncBaseMigration } from '../helpers/syncMigration'; import { Base, Project } from '../models'; import type { BaseReqType } from 'nocodb-sdk'; diff --git a/packages/nocodb/src/services/projects.service.ts b/packages/nocodb/src/services/projects.service.ts index 3fcaba554d..eb93634a4f 100644 --- a/packages/nocodb/src/services/projects.service.ts +++ b/packages/nocodb/src/services/projects.service.ts @@ -7,7 +7,6 @@ import { OrgUserRoles } from 'nocodb-sdk'; import { populateMeta, validatePayload } from '../helpers'; import { NcError } from '../helpers/catchError'; import { extractPropsAndSanitize } from '../helpers/extractProps'; -import { populateRollupColumnAndHideLTAR } from '../helpers/populateMeta' import syncMigration from '../helpers/syncMigration'; import { Project, ProjectUser } from '../models'; import Noco from '../Noco'; diff --git a/packages/nocodb/src/services/public-metas.service.ts b/packages/nocodb/src/services/public-metas.service.ts index b8dacc286d..71cff386ac 100644 --- a/packages/nocodb/src/services/public-metas.service.ts +++ b/packages/nocodb/src/services/public-metas.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { ErrorMessages, RelationTypes, UITypes } from 'nocodb-sdk'; -import { isLinksOrLTAR } from 'nocodb-sdk' +import { isLinksOrLTAR } from 'nocodb-sdk'; import { NcError } from '../helpers/catchError'; import { Base, Column, Model, Project, View } from '../models'; import type { LinkToAnotherRecordColumn, LookupColumn } from '../models'; diff --git a/packages/nocodb/src/services/tables.service.ts b/packages/nocodb/src/services/tables.service.ts index a2b6c22bd9..5e2af65221 100644 --- a/packages/nocodb/src/services/tables.service.ts +++ b/packages/nocodb/src/services/tables.service.ts @@ -2,11 +2,12 @@ import { Injectable } from '@nestjs/common'; import DOMPurify from 'isomorphic-dompurify'; import { AuditOperationSubTypes, - AuditOperationTypes, isLinksOrLTAR, + AuditOperationTypes, + isLinksOrLTAR, isVirtualCol, ModelTypes, UITypes, -} from 'nocodb-sdk' +} from 'nocodb-sdk'; import { T } from 'nc-help'; import ProjectMgrv2 from '../db/sql-mgr/v2/ProjectMgrv2'; import { NcError } from '../helpers/catchError'; @@ -14,13 +15,7 @@ import getColumnPropsFromUIDT from '../helpers/getColumnPropsFromUIDT'; import getColumnUiType from '../helpers/getColumnUiType'; import getTableNameAlias, { getColumnNameAlias } from '../helpers/getTableName'; import mapDefaultDisplayValue from '../helpers/mapDefaultDisplayValue'; -import { - Audit, - Column, - Model, - ModelRoleVisibility, - Project, -} from '../models'; +import { Audit, Column, Model, ModelRoleVisibility, Project } from '../models'; import Noco from '../Noco'; import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2'; import { validatePayload } from '../helpers'; @@ -156,9 +151,7 @@ export class TablesService { const project = await Project.getWithInfo(table.project_id); const base = project.bases.find((b) => b.id === table.base_id); - const relationColumns = table.columns.filter( - (c) => isLinksOrLTAR(c), - ); + const relationColumns = table.columns.filter((c) => isLinksOrLTAR(c)); if (relationColumns?.length && !base.is_meta) { const referredTables = await Promise.all(