Browse Source

update imports to have relative paths than absolute

feat/export-nest-dir-restructure
starbirdtech383 2 years ago
parent
commit
5db1c74577
  1. 2
      packages/nocodb-nest/src/modules/global/global.module.ts
  2. 8
      packages/nocodb-nest/src/modules/jobs/at-import/at-import.controller.ts
  3. 10
      packages/nocodb-nest/src/modules/jobs/export-import/duplicate.controller.ts
  4. 10
      packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts
  5. 14
      packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts
  6. 34
      packages/nocodb-nest/src/modules/jobs/export-import/import.service.ts

2
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';

8
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';

10
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()

10
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;

14
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 {

34
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 {

Loading…
Cancel
Save