From 5db1c745779c1b6a42007f377773b42c52d32f0b Mon Sep 17 00:00:00 2001 From: starbirdtech383 Date: Wed, 26 Apr 2023 22:16:05 +0530 Subject: [PATCH] update imports to have relative paths than absolute --- .../src/modules/global/global.module.ts | 2 +- .../jobs/at-import/at-import.controller.ts | 8 ++--- .../export-import/duplicate.controller.ts | 10 +++--- .../jobs/export-import/duplicate.processor.ts | 10 +++--- .../jobs/export-import/export.service.ts | 14 ++++---- .../jobs/export-import/import.service.ts | 34 +++++++++---------- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/packages/nocodb-nest/src/modules/global/global.module.ts b/packages/nocodb-nest/src/modules/global/global.module.ts index 644f98d4f4..361355d87e 100644 --- a/packages/nocodb-nest/src/modules/global/global.module.ts +++ b/packages/nocodb-nest/src/modules/global/global.module.ts @@ -1,7 +1,7 @@ import { Global, Module } from '@nestjs/common'; import { JwtModule, JwtService } from '@nestjs/jwt'; import { ExtractJwt } from 'passport-jwt'; -import { SocketGateway } from 'src/services/socket.gateway'; +import { SocketGateway } from '../../services/socket.gateway'; import { Connection } from '../../connection/connection'; import { GlobalGuard } from '../../guards/global/global.guard'; import { MetaService } from '../../meta/meta.service'; diff --git a/packages/nocodb-nest/src/modules/jobs/at-import/at-import.controller.ts b/packages/nocodb-nest/src/modules/jobs/at-import/at-import.controller.ts index 51ec6657ff..b255318c1b 100644 --- a/packages/nocodb-nest/src/modules/jobs/at-import/at-import.controller.ts +++ b/packages/nocodb-nest/src/modules/jobs/at-import/at-import.controller.ts @@ -1,10 +1,10 @@ import { InjectQueue } from '@nestjs/bull'; import { Controller, HttpCode, Post, Request, UseGuards } from '@nestjs/common'; -import { GlobalGuard } from 'src/guards/global/global.guard'; -import { ExtractProjectIdMiddleware } from 'src/middlewares/extract-project-id/extract-project-id.middleware'; +import { GlobalGuard } from '../../../guards/global/global.guard'; +import { ExtractProjectIdMiddleware } from '../../../middlewares/extract-project-id/extract-project-id.middleware'; import { Queue } from 'bull'; -import { SyncSource } from 'src/models'; -import { NcError } from 'src/helpers/catchError'; +import { SyncSource } from '../../../models'; +import { NcError } from '../../../helpers/catchError'; import { QueueService } from '../fallback-queue.service'; import { JobsService } from '../jobs.service'; diff --git a/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.controller.ts b/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.controller.ts index ced65903a6..2603518d34 100644 --- a/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.controller.ts +++ b/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.controller.ts @@ -9,14 +9,14 @@ import { UseGuards, } from '@nestjs/common'; import { Queue } from 'bull'; -import { GlobalGuard } from 'src/guards/global/global.guard'; +import { GlobalGuard } from '../../../guards/global/global.guard'; import { Acl, ExtractProjectIdMiddleware, -} from 'src/middlewares/extract-project-id/extract-project-id.middleware'; -import { ProjectsService } from 'src/services/projects.service'; -import { Base, Project } from 'src/models'; -import { generateUniqueName } from 'src/helpers/exportImportHelpers'; +} from '../../../middlewares/extract-project-id/extract-project-id.middleware'; +import { ProjectsService } from '../../../services/projects.service'; +import { Base, Project } from '../../../models'; +import { generateUniqueName } from '../../../helpers/exportImportHelpers'; import { QueueService } from '../fallback-queue.service'; @Controller() diff --git a/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts b/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts index 60ba3c1dda..bd0aa25190 100644 --- a/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts +++ b/packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts @@ -1,15 +1,15 @@ import { Readable } from 'stream'; import { Process, Processor } from '@nestjs/bull'; -import { Base, Column, Model, Project } from 'src/models'; +import { Base, Column, Model, Project } from '../../../models'; import { Job } from 'bull'; -import { ProjectsService } from 'src/services/projects.service'; +import { ProjectsService } from '../../../services/projects.service'; import papaparse from 'papaparse'; -import { findWithIdentifier } from 'src/helpers/exportImportHelpers'; -import { BulkDataAliasService } from 'src/services/bulk-data-alias.service'; +import { findWithIdentifier } from '../../../helpers/exportImportHelpers'; +import { BulkDataAliasService } from '../../../services/bulk-data-alias.service'; import { UITypes } from 'nocodb-sdk'; import { ExportService } from './export.service'; import { ImportService } from './import.service'; -import type { LinkToAnotherRecordColumn } from 'src/models'; +import type { LinkToAnotherRecordColumn } from '../../../models'; const DEBUG = false; diff --git a/packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts b/packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts index e1ee6fdd99..6d93aa71f9 100644 --- a/packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts +++ b/packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts @@ -1,17 +1,17 @@ import { Readable } from 'stream'; import { UITypes, ViewTypes } from 'nocodb-sdk'; -import { getViewAndModelByAliasOrId } from 'src/modules/datas/helpers'; +import { getViewAndModelByAliasOrId } from '../../../modules/datas/helpers'; import { unparse } from 'papaparse'; import { clearPrefix, generateBaseIdMap, -} from 'src/helpers/exportImportHelpers'; -import NcPluginMgrv2 from 'src/helpers/NcPluginMgrv2'; -import { NcError } from 'src/helpers/catchError'; -import { Base, Model, Project } from 'src/models'; -import { DatasService } from 'src/services/datas.service'; +} from '../../../helpers/exportImportHelpers'; +import NcPluginMgrv2 from '../../../helpers/NcPluginMgrv2'; +import { NcError } from '../../../helpers/catchError'; +import { Base, Model, Project } from '../../../models'; +import { DatasService } from '../../../services/datas.service'; import { Injectable } from '@nestjs/common'; -import type { LinkToAnotherRecordColumn, View } from 'src/models'; +import type { LinkToAnotherRecordColumn, View } from '../../../models'; @Injectable() export class ExportService { diff --git a/packages/nocodb-nest/src/modules/jobs/export-import/import.service.ts b/packages/nocodb-nest/src/modules/jobs/export-import/import.service.ts index 80394c3018..2e06b5fafe 100644 --- a/packages/nocodb-nest/src/modules/jobs/export-import/import.service.ts +++ b/packages/nocodb-nest/src/modules/jobs/export-import/import.service.ts @@ -5,26 +5,26 @@ import { reverseGet, withoutId, withoutNull, -} from 'src/helpers/exportImportHelpers'; -import { NcError } from 'src/helpers/catchError'; -import { Base, Column, Model, Project } from 'src/models'; -import { TablesService } from 'src/services/tables.service'; -import { ColumnsService } from 'src/services/columns.service'; -import { FiltersService } from 'src/services/filters.service'; -import { SortsService } from 'src/services/sorts.service'; -import { ViewColumnsService } from 'src/services/view-columns.service'; -import { GridColumnsService } from 'src/services/grid-columns.service'; -import { FormColumnsService } from 'src/services/form-columns.service'; -import { GridsService } from 'src/services/grids.service'; -import { FormsService } from 'src/services/forms.service'; -import { GalleriesService } from 'src/services/galleries.service'; -import { KanbansService } from 'src/services/kanbans.service'; +} from '../../../helpers/exportImportHelpers'; +import { NcError } from '../../../helpers/catchError'; +import { Base, Column, Model, Project } from '../../../models'; +import { TablesService } from '../../../services/tables.service'; +import { ColumnsService } from '../../../services/columns.service'; +import { FiltersService } from '../../../services/filters.service'; +import { SortsService } from '../../../services/sorts.service'; +import { ViewColumnsService } from '../../../services/view-columns.service'; +import { GridColumnsService } from '../../../services/grid-columns.service'; +import { FormColumnsService } from '../../../services/form-columns.service'; +import { GridsService } from '../../../services/grids.service'; +import { FormsService } from '../../../services/forms.service'; +import { GalleriesService } from '../../../services/galleries.service'; +import { KanbansService } from '../../../services/kanbans.service'; import { Injectable } from '@nestjs/common'; -import NcPluginMgrv2 from 'src/helpers/NcPluginMgrv2'; +import NcPluginMgrv2 from '../../../helpers/NcPluginMgrv2'; import papaparse from 'papaparse'; -import { BulkDataAliasService } from 'src/services/bulk-data-alias.service'; +import { BulkDataAliasService } from '../../../services/bulk-data-alias.service'; import type { ViewCreateReqType } from 'nocodb-sdk'; -import type { LinkToAnotherRecordColumn, User, View } from 'src/models'; +import type { LinkToAnotherRecordColumn, User, View } from '../../../models'; @Injectable() export class ImportService {