Browse Source

update imports to have relative paths than absolute

feat/export-nest
starbirdtech383 2 years ago committed by mertmit
parent
commit
9efdc0c7e3
  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 { Global, Module } from '@nestjs/common';
import { JwtModule, JwtService } from '@nestjs/jwt'; import { JwtModule, JwtService } from '@nestjs/jwt';
import { ExtractJwt } from 'passport-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 { Connection } from '../../connection/connection';
import { GlobalGuard } from '../../guards/global/global.guard'; import { GlobalGuard } from '../../guards/global/global.guard';
import { MetaService } from '../../meta/meta.service'; 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 { InjectQueue } from '@nestjs/bull';
import { Controller, HttpCode, Post, Request, UseGuards } from '@nestjs/common'; import { Controller, HttpCode, Post, Request, UseGuards } from '@nestjs/common';
import { GlobalGuard } from 'src/guards/global/global.guard'; import { GlobalGuard } from '../../../guards/global/global.guard';
import { ExtractProjectIdMiddleware } from 'src/middlewares/extract-project-id/extract-project-id.middleware'; import { ExtractProjectIdMiddleware } from '../../../middlewares/extract-project-id/extract-project-id.middleware';
import { Queue } from 'bull'; import { Queue } from 'bull';
import { SyncSource } from 'src/models'; import { SyncSource } from '../../../models';
import { NcError } from 'src/helpers/catchError'; import { NcError } from '../../../helpers/catchError';
import { QueueService } from '../fallback-queue.service'; import { QueueService } from '../fallback-queue.service';
import { JobsService } from '../jobs.service'; import { JobsService } from '../jobs.service';

10
packages/nocodb-nest/src/modules/jobs/export-import/duplicate.controller.ts

@ -9,14 +9,14 @@ import {
UseGuards, UseGuards,
} from '@nestjs/common'; } from '@nestjs/common';
import { Queue } from 'bull'; import { Queue } from 'bull';
import { GlobalGuard } from 'src/guards/global/global.guard'; import { GlobalGuard } from '../../../guards/global/global.guard';
import { import {
Acl, Acl,
ExtractProjectIdMiddleware, ExtractProjectIdMiddleware,
} from 'src/middlewares/extract-project-id/extract-project-id.middleware'; } from '../../../middlewares/extract-project-id/extract-project-id.middleware';
import { ProjectsService } from 'src/services/projects.service'; import { ProjectsService } from '../../../services/projects.service';
import { Base, Project } from 'src/models'; import { Base, Project } from '../../../models';
import { generateUniqueName } from 'src/helpers/exportImportHelpers'; import { generateUniqueName } from '../../../helpers/exportImportHelpers';
import { QueueService } from '../fallback-queue.service'; import { QueueService } from '../fallback-queue.service';
@Controller() @Controller()

10
packages/nocodb-nest/src/modules/jobs/export-import/duplicate.processor.ts

@ -1,15 +1,15 @@
import { Readable } from 'stream'; import { Readable } from 'stream';
import { Process, Processor } from '@nestjs/bull'; 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 { Job } from 'bull';
import { ProjectsService } from 'src/services/projects.service'; import { ProjectsService } from '../../../services/projects.service';
import papaparse from 'papaparse'; import papaparse from 'papaparse';
import { findWithIdentifier } from 'src/helpers/exportImportHelpers'; import { findWithIdentifier } from '../../../helpers/exportImportHelpers';
import { BulkDataAliasService } from 'src/services/bulk-data-alias.service'; import { BulkDataAliasService } from '../../../services/bulk-data-alias.service';
import { UITypes } from 'nocodb-sdk'; import { UITypes } from 'nocodb-sdk';
import { ExportService } from './export.service'; import { ExportService } from './export.service';
import { ImportService } from './import.service'; import { ImportService } from './import.service';
import type { LinkToAnotherRecordColumn } from 'src/models'; import type { LinkToAnotherRecordColumn } from '../../../models';
const DEBUG = false; const DEBUG = false;

14
packages/nocodb-nest/src/modules/jobs/export-import/export.service.ts

@ -1,17 +1,17 @@
import { Readable } from 'stream'; import { Readable } from 'stream';
import { UITypes, ViewTypes } from 'nocodb-sdk'; import { UITypes, ViewTypes } from 'nocodb-sdk';
import { getViewAndModelByAliasOrId } from 'src/modules/datas/helpers'; import { getViewAndModelByAliasOrId } from '../../../modules/datas/helpers';
import { unparse } from 'papaparse'; import { unparse } from 'papaparse';
import { import {
clearPrefix, clearPrefix,
generateBaseIdMap, generateBaseIdMap,
} from 'src/helpers/exportImportHelpers'; } from '../../../helpers/exportImportHelpers';
import NcPluginMgrv2 from 'src/helpers/NcPluginMgrv2'; import NcPluginMgrv2 from '../../../helpers/NcPluginMgrv2';
import { NcError } from 'src/helpers/catchError'; import { NcError } from '../../../helpers/catchError';
import { Base, Model, Project } from 'src/models'; import { Base, Model, Project } from '../../../models';
import { DatasService } from 'src/services/datas.service'; import { DatasService } from '../../../services/datas.service';
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import type { LinkToAnotherRecordColumn, View } from 'src/models'; import type { LinkToAnotherRecordColumn, View } from '../../../models';
@Injectable() @Injectable()
export class ExportService { export class ExportService {

34
packages/nocodb-nest/src/modules/jobs/export-import/import.service.ts

@ -5,26 +5,26 @@ import {
reverseGet, reverseGet,
withoutId, withoutId,
withoutNull, withoutNull,
} from 'src/helpers/exportImportHelpers'; } from '../../../helpers/exportImportHelpers';
import { NcError } from 'src/helpers/catchError'; import { NcError } from '../../../helpers/catchError';
import { Base, Column, Model, Project } from 'src/models'; import { Base, Column, Model, Project } from '../../../models';
import { TablesService } from 'src/services/tables.service'; import { TablesService } from '../../../services/tables.service';
import { ColumnsService } from 'src/services/columns.service'; import { ColumnsService } from '../../../services/columns.service';
import { FiltersService } from 'src/services/filters.service'; import { FiltersService } from '../../../services/filters.service';
import { SortsService } from 'src/services/sorts.service'; import { SortsService } from '../../../services/sorts.service';
import { ViewColumnsService } from 'src/services/view-columns.service'; import { ViewColumnsService } from '../../../services/view-columns.service';
import { GridColumnsService } from 'src/services/grid-columns.service'; import { GridColumnsService } from '../../../services/grid-columns.service';
import { FormColumnsService } from 'src/services/form-columns.service'; import { FormColumnsService } from '../../../services/form-columns.service';
import { GridsService } from 'src/services/grids.service'; import { GridsService } from '../../../services/grids.service';
import { FormsService } from 'src/services/forms.service'; import { FormsService } from '../../../services/forms.service';
import { GalleriesService } from 'src/services/galleries.service'; import { GalleriesService } from '../../../services/galleries.service';
import { KanbansService } from 'src/services/kanbans.service'; import { KanbansService } from '../../../services/kanbans.service';
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import NcPluginMgrv2 from 'src/helpers/NcPluginMgrv2'; import NcPluginMgrv2 from '../../../helpers/NcPluginMgrv2';
import papaparse from 'papaparse'; 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 { ViewCreateReqType } from 'nocodb-sdk';
import type { LinkToAnotherRecordColumn, User, View } from 'src/models'; import type { LinkToAnotherRecordColumn, User, View } from '../../../models';
@Injectable() @Injectable()
export class ImportService { export class ImportService {

Loading…
Cancel
Save