Browse Source

chore: lint

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 2 years ago
parent
commit
e039b51ef5
  1. 2
      packages/nocodb-nest/src/controllers/api-docs/api-docs.controller.spec.ts
  2. 2
      packages/nocodb-nest/src/controllers/api-tokens.controller.spec.ts
  3. 2
      packages/nocodb-nest/src/controllers/attachments.controller.spec.ts
  4. 2
      packages/nocodb-nest/src/controllers/audits.controller.spec.ts
  5. 2
      packages/nocodb-nest/src/controllers/auth.controller.spec.ts
  6. 2
      packages/nocodb-nest/src/controllers/bases.controller.spec.ts
  7. 2
      packages/nocodb-nest/src/controllers/caches.controller.spec.ts
  8. 2
      packages/nocodb-nest/src/controllers/columns.controller.spec.ts
  9. 2
      packages/nocodb-nest/src/controllers/data-alias.controller.spec.ts
  10. 2
      packages/nocodb-nest/src/controllers/datas.controller.spec.ts
  11. 2
      packages/nocodb-nest/src/controllers/filters.controller.spec.ts
  12. 2
      packages/nocodb-nest/src/controllers/form-columns.controller.spec.ts
  13. 2
      packages/nocodb-nest/src/controllers/forms.controller.spec.ts
  14. 2
      packages/nocodb-nest/src/controllers/galleries.controller.spec.ts
  15. 2
      packages/nocodb-nest/src/controllers/grid-columns.controller.spec.ts
  16. 2
      packages/nocodb-nest/src/controllers/grids.controller.spec.ts
  17. 2
      packages/nocodb-nest/src/controllers/hook-filters.controller.spec.ts
  18. 2
      packages/nocodb-nest/src/controllers/hooks.controller.spec.ts
  19. 2
      packages/nocodb-nest/src/controllers/imports/import.controller.spec.ts
  20. 2
      packages/nocodb-nest/src/controllers/kanbans.controller.spec.ts
  21. 2
      packages/nocodb-nest/src/controllers/maps.controller.spec.ts
  22. 2
      packages/nocodb-nest/src/controllers/meta-diffs.controller.spec.ts
  23. 2
      packages/nocodb-nest/src/controllers/model-visibilities.controller.spec.ts
  24. 2
      packages/nocodb-nest/src/controllers/org-lcense.controller.spec.ts
  25. 2
      packages/nocodb-nest/src/controllers/org-tokens.controller.spec.ts
  26. 2
      packages/nocodb-nest/src/controllers/org-users.controller.spec.ts
  27. 2
      packages/nocodb-nest/src/controllers/plugins.controller.spec.ts
  28. 2
      packages/nocodb-nest/src/controllers/project-users.controller.spec.ts
  29. 2
      packages/nocodb-nest/src/controllers/projects.controller.spec.ts
  30. 2
      packages/nocodb-nest/src/controllers/public-datas-export.controller.spec.ts
  31. 2
      packages/nocodb-nest/src/controllers/public-datas.controller.spec.ts
  32. 4
      packages/nocodb-nest/src/controllers/public-datas.controller.ts
  33. 2
      packages/nocodb-nest/src/controllers/public-metas.controller.spec.ts
  34. 2
      packages/nocodb-nest/src/controllers/shared-bases.controller.spec.ts
  35. 2
      packages/nocodb-nest/src/controllers/sorts.controller.spec.ts
  36. 2
      packages/nocodb-nest/src/controllers/sync.controller.spec.ts
  37. 2
      packages/nocodb-nest/src/controllers/tables.controller.spec.ts
  38. 2
      packages/nocodb-nest/src/controllers/test/test.controller.spec.ts
  39. 2
      packages/nocodb-nest/src/controllers/users/users.controller.spec.ts
  40. 6
      packages/nocodb-nest/src/controllers/users/users.controller.ts
  41. 2
      packages/nocodb-nest/src/controllers/utils.controller.spec.ts
  42. 2
      packages/nocodb-nest/src/controllers/view-columns.controller.spec.ts
  43. 2
      packages/nocodb-nest/src/controllers/views.controller.spec.ts
  44. 18
      packages/nocodb-nest/src/modules/datas/datas.module.ts
  45. 110
      packages/nocodb-nest/src/modules/metas/metas.module.ts
  46. 2
      packages/nocodb-nest/src/services/auth.service.ts
  47. 5
      packages/nocodb-nest/src/services/data-alias-nested.service.ts
  48. 4
      packages/nocodb-nest/src/services/meta-diffs.service.ts
  49. 12
      packages/nocodb-nest/src/services/tables.service.ts
  50. 11
      packages/nocodb-nest/src/services/users/users.service.ts

2
packages/nocodb-nest/src/controllers/api-docs/api-docs.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ApiDocsController } from './api-docs.controller';
import { ApiDocsService } from '../../services/api-docs/api-docs.service'; import { ApiDocsService } from '../../services/api-docs/api-docs.service';
import { ApiDocsController } from './api-docs.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ApiDocsController', () => { describe('ApiDocsController', () => {

2
packages/nocodb-nest/src/controllers/api-tokens.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ApiTokensController } from './api-tokens.controller';
import { ApiTokensService } from '../services/api-tokens.service'; import { ApiTokensService } from '../services/api-tokens.service';
import { ApiTokensController } from './api-tokens.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ApiTokensController', () => { describe('ApiTokensController', () => {

2
packages/nocodb-nest/src/controllers/attachments.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { AttachmentsController } from './attachments.controller';
import { AttachmentsService } from '../services/attachments.service'; import { AttachmentsService } from '../services/attachments.service';
import { AttachmentsController } from './attachments.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('AttachmentsController', () => { describe('AttachmentsController', () => {

2
packages/nocodb-nest/src/controllers/audits.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { AuditsController } from './audits.controller';
import { AuditsService } from '../services/audits.service'; import { AuditsService } from '../services/audits.service';
import { AuditsController } from './audits.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('AuditsController', () => { describe('AuditsController', () => {

2
packages/nocodb-nest/src/controllers/auth.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { AuthController } from './auth.controller';
import { AuthService } from '../services/auth.service'; import { AuthService } from '../services/auth.service';
import { AuthController } from './auth.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('AuthController', () => { describe('AuthController', () => {

2
packages/nocodb-nest/src/controllers/bases.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { BasesController } from './bases.controller';
import { BasesService } from '../services/bases.service'; import { BasesService } from '../services/bases.service';
import { BasesController } from './bases.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('BasesController', () => { describe('BasesController', () => {

2
packages/nocodb-nest/src/controllers/caches.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { CachesController } from './caches.controller';
import { CachesService } from '../services/caches.service'; import { CachesService } from '../services/caches.service';
import { CachesController } from './caches.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('CachesController', () => { describe('CachesController', () => {

2
packages/nocodb-nest/src/controllers/columns.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ColumnsController } from './columns.controller';
import { ColumnsService } from '../services/columns.service'; import { ColumnsService } from '../services/columns.service';
import { ColumnsController } from './columns.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ColumnsController', () => { describe('ColumnsController', () => {

2
packages/nocodb-nest/src/controllers/data-alias.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { DataAliasController } from './data-alias.controller';
import { DatasService } from '../services/datas.service'; import { DatasService } from '../services/datas.service';
import { DataAliasController } from './data-alias.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('DataAliasController', () => { describe('DataAliasController', () => {

2
packages/nocodb-nest/src/controllers/datas.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { DatasController } from './datas.controller';
import { DatasService } from '../services/datas.service'; import { DatasService } from '../services/datas.service';
import { DatasController } from './datas.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('DatasController', () => { describe('DatasController', () => {

2
packages/nocodb-nest/src/controllers/filters.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { FiltersController } from './filters.controller';
import { FiltersService } from '../services/filters.service'; import { FiltersService } from '../services/filters.service';
import { FiltersController } from './filters.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('FiltersController', () => { describe('FiltersController', () => {

2
packages/nocodb-nest/src/controllers/form-columns.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { FormColumnsController } from './form-columns.controller';
import { FormColumnsService } from '../services/form-columns.service'; import { FormColumnsService } from '../services/form-columns.service';
import { FormColumnsController } from './form-columns.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('FormColumnsController', () => { describe('FormColumnsController', () => {

2
packages/nocodb-nest/src/controllers/forms.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { FormsController } from './forms.controller';
import { FormsService } from '../services/forms.service'; import { FormsService } from '../services/forms.service';
import { FormsController } from './forms.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('FormsController', () => { describe('FormsController', () => {

2
packages/nocodb-nest/src/controllers/galleries.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { GalleriesController } from './galleries.controller';
import { GalleriesService } from '../services/galleries.service'; import { GalleriesService } from '../services/galleries.service';
import { GalleriesController } from './galleries.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('GalleriesController', () => { describe('GalleriesController', () => {

2
packages/nocodb-nest/src/controllers/grid-columns.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { GridColumnsController } from './grid-columns.controller';
import { GridColumnsService } from '../services/grid-columns.service'; import { GridColumnsService } from '../services/grid-columns.service';
import { GridColumnsController } from './grid-columns.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('GridColumnsController', () => { describe('GridColumnsController', () => {

2
packages/nocodb-nest/src/controllers/grids.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { GridsController } from './grids.controller';
import { GridsService } from '../services/grids.service'; import { GridsService } from '../services/grids.service';
import { GridsController } from './grids.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('GridsController', () => { describe('GridsController', () => {

2
packages/nocodb-nest/src/controllers/hook-filters.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { HookFiltersController } from './hook-filters.controller';
import { HookFiltersService } from '../services/hook-filters.service'; import { HookFiltersService } from '../services/hook-filters.service';
import { HookFiltersController } from './hook-filters.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('HookFiltersController', () => { describe('HookFiltersController', () => {

2
packages/nocodb-nest/src/controllers/hooks.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { HooksController } from './hooks.controller';
import { HooksService } from '../services/hooks.service'; import { HooksService } from '../services/hooks.service';
import { HooksController } from './hooks.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('HooksController', () => { describe('HooksController', () => {

2
packages/nocodb-nest/src/controllers/imports/import.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ImportController } from './import.controller';
import { ImportService } from '../../services/import.service'; import { ImportService } from '../../services/import.service';
import { ImportController } from './import.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ImportController', () => { describe('ImportController', () => {

2
packages/nocodb-nest/src/controllers/kanbans.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { KanbansController } from './kanbans.controller';
import { KanbansService } from '../services/kanbans.service'; import { KanbansService } from '../services/kanbans.service';
import { KanbansController } from './kanbans.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('KanbansController', () => { describe('KanbansController', () => {

2
packages/nocodb-nest/src/controllers/maps.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { MapsController } from './maps.controller';
import { MapsService } from '../services/maps.service'; import { MapsService } from '../services/maps.service';
import { MapsController } from './maps.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('MapsController', () => { describe('MapsController', () => {

2
packages/nocodb-nest/src/controllers/meta-diffs.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { MetaDiffsController } from './meta-diffs.controller';
import { MetaDiffsService } from '../services/meta-diffs.service'; import { MetaDiffsService } from '../services/meta-diffs.service';
import { MetaDiffsController } from './meta-diffs.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('MetaDiffsController', () => { describe('MetaDiffsController', () => {

2
packages/nocodb-nest/src/controllers/model-visibilities.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ModelVisibilitiesController } from './model-visibilities.controller';
import { ModelVisibilitiesService } from '../services/model-visibilities.service'; import { ModelVisibilitiesService } from '../services/model-visibilities.service';
import { ModelVisibilitiesController } from './model-visibilities.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ModelVisibilitiesController', () => { describe('ModelVisibilitiesController', () => {

2
packages/nocodb-nest/src/controllers/org-lcense.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { OrgLcenseController } from './org-lcense.controller';
import { OrgLcenseService } from '../services/org-lcense.service'; import { OrgLcenseService } from '../services/org-lcense.service';
import { OrgLcenseController } from './org-lcense.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('OrgLcenseController', () => { describe('OrgLcenseController', () => {

2
packages/nocodb-nest/src/controllers/org-tokens.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { OrgTokensController } from './org-tokens.controller';
import { OrgTokensService } from '../services/org-tokens.service'; import { OrgTokensService } from '../services/org-tokens.service';
import { OrgTokensController } from './org-tokens.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('OrgTokensController', () => { describe('OrgTokensController', () => {

2
packages/nocodb-nest/src/controllers/org-users.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { OrgUsersController } from './org-users.controller';
import { OrgUsersService } from '../services/org-users.service'; import { OrgUsersService } from '../services/org-users.service';
import { OrgUsersController } from './org-users.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('OrgUsersController', () => { describe('OrgUsersController', () => {

2
packages/nocodb-nest/src/controllers/plugins.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { PluginsController } from './plugins.controller';
import { PluginsService } from '../services/plugins.service'; import { PluginsService } from '../services/plugins.service';
import { PluginsController } from './plugins.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('PluginsController', () => { describe('PluginsController', () => {

2
packages/nocodb-nest/src/controllers/project-users.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ProjectUsersController } from './project-users.controller';
import { ProjectUsersService } from '../services/project-users/project-users.service'; import { ProjectUsersService } from '../services/project-users/project-users.service';
import { ProjectUsersController } from './project-users.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ProjectUsersController', () => { describe('ProjectUsersController', () => {

2
packages/nocodb-nest/src/controllers/projects.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ProjectsController } from './projects.controller';
import { ProjectsService } from '../services/projects.service'; import { ProjectsService } from '../services/projects.service';
import { ProjectsController } from './projects.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ProjectsController', () => { describe('ProjectsController', () => {

2
packages/nocodb-nest/src/controllers/public-datas-export.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { PublicDatasExportController } from './public-datas-export.controller';
import { PublicDatasExportService } from '../services/public-datas-export.service'; import { PublicDatasExportService } from '../services/public-datas-export.service';
import { PublicDatasExportController } from './public-datas-export.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('PublicDatasExportController', () => { describe('PublicDatasExportController', () => {

2
packages/nocodb-nest/src/controllers/public-datas.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { PublicDatasController } from './public-datas.controller';
import { PublicDatasService } from '../services/public-datas.service'; import { PublicDatasService } from '../services/public-datas.service';
import { PublicDatasController } from './public-datas.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('PublicDatasController', () => { describe('PublicDatasController', () => {

4
packages/nocodb-nest/src/controllers/public-datas.controller.ts

@ -58,9 +58,7 @@ export class PublicDatasController {
// ); // );
@Post('/api/v1/db/public/shared-view/:sharedViewUuid/rows') @Post('/api/v1/db/public/shared-view/:sharedViewUuid/rows')
@HttpCode(200) @HttpCode(200)
@UseInterceptors( @UseInterceptors(AnyFilesInterceptor())
AnyFilesInterceptor(),
)
async dataInsert( async dataInsert(
@Request() req, @Request() req,
@Param('sharedViewUuid') sharedViewUuid: string, @Param('sharedViewUuid') sharedViewUuid: string,

2
packages/nocodb-nest/src/controllers/public-metas.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { PublicMetasController } from './public-metas.controller';
import { PublicMetasService } from '../services/public-metas.service'; import { PublicMetasService } from '../services/public-metas.service';
import { PublicMetasController } from './public-metas.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('PublicMetasController', () => { describe('PublicMetasController', () => {

2
packages/nocodb-nest/src/controllers/shared-bases.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { SharedBasesController } from './shared-bases.controller';
import { SharedBasesService } from '../services/shared-bases.service'; import { SharedBasesService } from '../services/shared-bases.service';
import { SharedBasesController } from './shared-bases.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('SharedBasesController', () => { describe('SharedBasesController', () => {

2
packages/nocodb-nest/src/controllers/sorts.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { SortsController } from './sorts.controller';
import { SortsService } from '../services/sorts.service'; import { SortsService } from '../services/sorts.service';
import { SortsController } from './sorts.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('SortsController', () => { describe('SortsController', () => {

2
packages/nocodb-nest/src/controllers/sync.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { SyncController } from './sync.controller';
import { SyncService } from '../services/sync.service'; import { SyncService } from '../services/sync.service';
import { SyncController } from './sync.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('SyncController', () => { describe('SyncController', () => {

2
packages/nocodb-nest/src/controllers/tables.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { TablesController } from './tables.controller';
import { TablesService } from '../services/tables.service'; import { TablesService } from '../services/tables.service';
import { TablesController } from './tables.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('TablesController', () => { describe('TablesController', () => {

2
packages/nocodb-nest/src/controllers/test/test.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { TestController } from './test.controller';
import { TestService } from '../../modules/test/test.service'; import { TestService } from '../../modules/test/test.service';
import { TestController } from './test.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('TestController', () => { describe('TestController', () => {

2
packages/nocodb-nest/src/controllers/users/users.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { UsersController } from './users.controller';
import { UsersService } from '../../services/users/users.service'; import { UsersService } from '../../services/users/users.service';
import { UsersController } from './users.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('UsersController', () => { describe('UsersController', () => {

6
packages/nocodb-nest/src/controllers/users/users.controller.ts

@ -22,7 +22,11 @@ import {
import Noco from '../../Noco'; import Noco from '../../Noco';
import extractRolesObj from '../../utils/extractRolesObj'; import extractRolesObj from '../../utils/extractRolesObj';
import { Audit, User } from '../../models'; import { Audit, User } from '../../models';
import { genJwt, randomTokenString, setTokenCookie } from '../../services/users/helpers'; import {
genJwt,
randomTokenString,
setTokenCookie,
} from '../../services/users/helpers';
import { UsersService } from '../../services/users/users.service'; import { UsersService } from '../../services/users/users.service';
@Controller() @Controller()

2
packages/nocodb-nest/src/controllers/utils.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { UtilsController } from './utils.controller';
import { UtilsService } from '../services/utils.service'; import { UtilsService } from '../services/utils.service';
import { UtilsController } from './utils.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('UtilsController', () => { describe('UtilsController', () => {

2
packages/nocodb-nest/src/controllers/view-columns.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ViewColumnsController } from './view-columns.controller';
import { ViewColumnsService } from '../services/view-columns.service'; import { ViewColumnsService } from '../services/view-columns.service';
import { ViewColumnsController } from './view-columns.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ViewColumnsController', () => { describe('ViewColumnsController', () => {

2
packages/nocodb-nest/src/controllers/views.controller.spec.ts

@ -1,6 +1,6 @@
import { Test } from '@nestjs/testing'; import { Test } from '@nestjs/testing';
import { ViewsController } from './views.controller';
import { ViewsService } from '../services/views.service'; import { ViewsService } from '../services/views.service';
import { ViewsController } from './views.controller';
import type { TestingModule } from '@nestjs/testing'; import type { TestingModule } from '@nestjs/testing';
describe('ViewsController', () => { describe('ViewsController', () => {

18
packages/nocodb-nest/src/modules/datas/datas.module.ts

@ -1,10 +1,10 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { MulterModule } from '@nestjs/platform-express' import { MulterModule } from '@nestjs/platform-express';
import multer from 'multer' import multer from 'multer';
import { NC_ATTACHMENT_FIELD_SIZE } from '../../constants' import { NC_ATTACHMENT_FIELD_SIZE } from '../../constants';
import { DataAliasController } from '../../controllers/data-alias.controller'; import { DataAliasController } from '../../controllers/data-alias.controller';
import { PublicDatasExportController } from '../../controllers/public-datas-export.controller' import { PublicDatasExportController } from '../../controllers/public-datas-export.controller';
import { PublicDatasController } from '../../controllers/public-datas.controller' import { PublicDatasController } from '../../controllers/public-datas.controller';
import { DatasService } from '../../services/datas.service'; import { DatasService } from '../../services/datas.service';
import { DatasController } from '../../controllers/datas.controller'; import { DatasController } from '../../controllers/datas.controller';
import { BulkDataAliasController } from '../../controllers/bulk-data-alias.controller'; import { BulkDataAliasController } from '../../controllers/bulk-data-alias.controller';
@ -14,8 +14,8 @@ import { OldDatasController } from '../../controllers/old-datas/old-datas.contro
import { BulkDataAliasService } from '../../services/bulk-data-alias.service'; import { BulkDataAliasService } from '../../services/bulk-data-alias.service';
import { DataAliasNestedService } from '../../services/data-alias-nested.service'; import { DataAliasNestedService } from '../../services/data-alias-nested.service';
import { OldDatasService } from '../../controllers/old-datas/old-datas.service'; import { OldDatasService } from '../../controllers/old-datas/old-datas.service';
import { PublicDatasExportService } from '../../services/public-datas-export.service' import { PublicDatasExportService } from '../../services/public-datas-export.service';
import { PublicDatasService } from '../../services/public-datas.service' import { PublicDatasService } from '../../services/public-datas.service';
@Module({ @Module({
imports: [ imports: [
@ -34,7 +34,7 @@ import { PublicDatasService } from '../../services/public-datas.service'
DataAliasExportController, DataAliasExportController,
OldDatasController, OldDatasController,
PublicDatasController, PublicDatasController,
PublicDatasExportController PublicDatasExportController,
], ],
providers: [ providers: [
DatasService, DatasService,
@ -42,7 +42,7 @@ import { PublicDatasService } from '../../services/public-datas.service'
DataAliasNestedService, DataAliasNestedService,
OldDatasService, OldDatasService,
PublicDatasService, PublicDatasService,
PublicDatasExportService PublicDatasExportService,
], ],
}) })
export class DatasModule {} export class DatasModule {}

110
packages/nocodb-nest/src/modules/metas/metas.module.ts

@ -9,67 +9,67 @@ import { AuditsController } from '../../controllers/audits.controller';
import { BasesController } from '../../controllers/bases.controller'; import { BasesController } from '../../controllers/bases.controller';
import { CachesController } from '../../controllers/caches.controller'; import { CachesController } from '../../controllers/caches.controller';
import { ColumnsController } from '../../controllers/columns.controller'; import { ColumnsController } from '../../controllers/columns.controller';
import { FiltersController } from '../../controllers/filters.controller' import { FiltersController } from '../../controllers/filters.controller';
import { FormColumnsController } from '../../controllers/form-columns.controller' import { FormColumnsController } from '../../controllers/form-columns.controller';
import { FormsController } from '../../controllers/forms.controller' import { FormsController } from '../../controllers/forms.controller';
import { GalleriesController } from '../../controllers/galleries.controller' import { GalleriesController } from '../../controllers/galleries.controller';
import { GridColumnsController } from '../../controllers/grid-columns.controller' import { GridColumnsController } from '../../controllers/grid-columns.controller';
import { GridsController } from '../../controllers/grids.controller' import { GridsController } from '../../controllers/grids.controller';
import { HooksController } from '../../controllers/hooks.controller' import { HooksController } from '../../controllers/hooks.controller';
import { ImportController } from '../../controllers/imports/import.controller' import { ImportController } from '../../controllers/imports/import.controller';
import { KanbansController } from '../../controllers/kanbans.controller' import { KanbansController } from '../../controllers/kanbans.controller';
import { MapsController } from '../../controllers/maps.controller' import { MapsController } from '../../controllers/maps.controller';
import { MetaDiffsController } from '../../controllers/meta-diffs.controller' import { MetaDiffsController } from '../../controllers/meta-diffs.controller';
import { ModelVisibilitiesController } from '../../controllers/model-visibilities.controller' import { ModelVisibilitiesController } from '../../controllers/model-visibilities.controller';
import { OrgLcenseController } from '../../controllers/org-lcense.controller' import { OrgLcenseController } from '../../controllers/org-lcense.controller';
import { OrgTokensController } from '../../controllers/org-tokens.controller' import { OrgTokensController } from '../../controllers/org-tokens.controller';
import { OrgUsersController } from '../../controllers/org-users.controller' import { OrgUsersController } from '../../controllers/org-users.controller';
import { PluginsController } from '../../controllers/plugins.controller' import { PluginsController } from '../../controllers/plugins.controller';
import { ProjectsController } from '../../controllers/projects.controller' import { ProjectsController } from '../../controllers/projects.controller';
import { PublicMetasController } from '../../controllers/public-metas.controller' import { PublicMetasController } from '../../controllers/public-metas.controller';
import { SharedBasesController } from '../../controllers/shared-bases.controller' import { SharedBasesController } from '../../controllers/shared-bases.controller';
import { SortsController } from '../../controllers/sorts.controller' import { SortsController } from '../../controllers/sorts.controller';
import { SyncController } from '../../controllers/sync.controller' import { SyncController } from '../../controllers/sync.controller';
import { TablesController } from '../../controllers/tables.controller' import { TablesController } from '../../controllers/tables.controller';
import { UtilsController } from '../../controllers/utils.controller' import { UtilsController } from '../../controllers/utils.controller';
import { ViewColumnsController } from '../../controllers/view-columns.controller' import { ViewColumnsController } from '../../controllers/view-columns.controller';
import { ViewsController } from '../../controllers/views.controller' import { ViewsController } from '../../controllers/views.controller';
import { ExtractProjectIdMiddleware } from '../../middlewares/extract-project-id/extract-project-id.middleware' import { ExtractProjectIdMiddleware } from '../../middlewares/extract-project-id/extract-project-id.middleware';
import { ApiTokensService } from '../../services/api-tokens.service'; import { ApiTokensService } from '../../services/api-tokens.service';
import { AttachmentsService } from '../../services/attachments.service'; import { AttachmentsService } from '../../services/attachments.service';
import { AuditsService } from '../../services/audits.service'; import { AuditsService } from '../../services/audits.service';
import { BasesService } from '../../services/bases.service'; import { BasesService } from '../../services/bases.service';
import { CachesService } from '../../services/caches.service'; import { CachesService } from '../../services/caches.service';
import { ColumnsService } from '../../services/columns.service'; import { ColumnsService } from '../../services/columns.service';
import { FiltersService } from '../../services/filters.service' import { FiltersService } from '../../services/filters.service';
import { FormColumnsService } from '../../services/form-columns.service' import { FormColumnsService } from '../../services/form-columns.service';
import { FormsService } from '../../services/forms.service' import { FormsService } from '../../services/forms.service';
import { GalleriesService } from '../../services/galleries.service' import { GalleriesService } from '../../services/galleries.service';
import { GridColumnsService } from '../../services/grid-columns.service' import { GridColumnsService } from '../../services/grid-columns.service';
import { GridsService } from '../../services/grids.service' import { GridsService } from '../../services/grids.service';
import { HooksService } from '../../services/hooks.service' import { HooksService } from '../../services/hooks.service';
import { KanbansService } from '../../services/kanbans.service' import { KanbansService } from '../../services/kanbans.service';
import { MapsService } from '../../services/maps.service' import { MapsService } from '../../services/maps.service';
import { MetaDiffsService } from '../../services/meta-diffs.service' import { MetaDiffsService } from '../../services/meta-diffs.service';
import { ModelVisibilitiesService } from '../../services/model-visibilities.service' import { ModelVisibilitiesService } from '../../services/model-visibilities.service';
import { OrgLcenseService } from '../../services/org-lcense.service' import { OrgLcenseService } from '../../services/org-lcense.service';
import { OrgTokensEeService } from '../../services/org-tokens-ee.service' import { OrgTokensEeService } from '../../services/org-tokens-ee.service';
import { OrgTokensService } from '../../services/org-tokens.service' import { OrgTokensService } from '../../services/org-tokens.service';
import { OrgUsersService } from '../../services/org-users.service' import { OrgUsersService } from '../../services/org-users.service';
import { PluginsService } from '../../services/plugins.service' import { PluginsService } from '../../services/plugins.service';
import { ProjectsService } from '../../services/projects.service' import { ProjectsService } from '../../services/projects.service';
import { PublicMetasService } from '../../services/public-metas.service' import { PublicMetasService } from '../../services/public-metas.service';
import { SharedBasesService } from '../../services/shared-bases.service' import { SharedBasesService } from '../../services/shared-bases.service';
import { SortsService } from '../../services/sorts.service' import { SortsService } from '../../services/sorts.service';
import { SyncService } from '../../services/sync.service' import { SyncService } from '../../services/sync.service';
import { TablesService } from '../../services/tables.service' import { TablesService } from '../../services/tables.service';
import { UtilsService } from '../../services/utils.service' import { UtilsService } from '../../services/utils.service';
import { ViewColumnsService } from '../../services/view-columns.service' import { ViewColumnsService } from '../../services/view-columns.service';
import { ViewsService } from '../../services/views.service' import { ViewsService } from '../../services/views.service';
import { ApiDocsService } from '../../services/api-docs/api-docs.service'; import { ApiDocsService } from '../../services/api-docs/api-docs.service';
import { GlobalModule } from '../global/global.module' import { GlobalModule } from '../global/global.module';
import { ProjectUsersController } from '../../controllers/project-users.controller' import { ProjectUsersController } from '../../controllers/project-users.controller';
import { ProjectUsersService } from '../../services/project-users/project-users.service' import { ProjectUsersService } from '../../services/project-users/project-users.service';
@Module({ @Module({
imports: [ imports: [
@ -114,7 +114,7 @@ import { ProjectUsersService } from '../../services/project-users/project-users.
TablesController, TablesController,
SyncController, SyncController,
SortsController, SortsController,
SharedBasesController SharedBasesController,
], ],
providers: [ providers: [
ApiDocsService, ApiDocsService,

2
packages/nocodb-nest/src/services/auth.service.ts

@ -5,9 +5,9 @@ import * as bcrypt from 'bcryptjs';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import Noco from '../Noco'; import Noco from '../Noco';
import { Connection } from '../connection/connection';
import { genJwt } from './users/helpers'; import { genJwt } from './users/helpers';
import { UsersService } from './users/users.service'; import { UsersService } from './users/users.service';
import { Connection } from '../connection/connection';
import type { CreateUserDto } from '../controllers/auth.controller'; import type { CreateUserDto } from '../controllers/auth.controller';
@Injectable() @Injectable()

5
packages/nocodb-nest/src/services/data-alias-nested.service.ts

@ -4,7 +4,10 @@ import { NcError } from '../helpers/catchError';
import { PagedResponseImpl } from '../helpers/PagedResponse'; import { PagedResponseImpl } from '../helpers/PagedResponse';
import { Base, Model } from '../models'; import { Base, Model } from '../models';
import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2'; import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2';
import { getColumnByIdOrName, getViewAndModelByAliasOrId } from '../modules/datas/helpers'; import {
getColumnByIdOrName,
getViewAndModelByAliasOrId,
} from '../modules/datas/helpers';
import type { PathParams } from '../modules/datas/helpers'; import type { PathParams } from '../modules/datas/helpers';
@Injectable() @Injectable()

4
packages/nocodb-nest/src/services/meta-diffs.service.ts

@ -4,9 +4,7 @@ import { T } from 'nc-help';
import { Base, Column, Model, Project } from '../models'; import { Base, Column, Model, Project } from '../models';
import ModelXcMetaFactory from '../db/sql-mgr/code/models/xc/ModelXcMetaFactory'; import ModelXcMetaFactory from '../db/sql-mgr/code/models/xc/ModelXcMetaFactory';
import getColumnUiType from '../helpers/getColumnUiType'; import getColumnUiType from '../helpers/getColumnUiType';
import getTableNameAlias, { import getTableNameAlias, { getColumnNameAlias } from '../helpers/getTableName';
getColumnNameAlias,
} from '../helpers/getTableName';
import { getUniqueColumnAliasName } from '../helpers/getUniqueName'; import { getUniqueColumnAliasName } from '../helpers/getUniqueName';
import mapDefaultDisplayValue from '../helpers/mapDefaultDisplayValue'; import mapDefaultDisplayValue from '../helpers/mapDefaultDisplayValue';
import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2'; import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2';

12
packages/nocodb-nest/src/services/tables.service.ts

@ -12,17 +12,9 @@ import ProjectMgrv2 from '../db/sql-mgr/v2/ProjectMgrv2';
import { NcError } from '../helpers/catchError'; import { NcError } from '../helpers/catchError';
import getColumnPropsFromUIDT from '../helpers/getColumnPropsFromUIDT'; import getColumnPropsFromUIDT from '../helpers/getColumnPropsFromUIDT';
import getColumnUiType from '../helpers/getColumnUiType'; import getColumnUiType from '../helpers/getColumnUiType';
import getTableNameAlias, { import getTableNameAlias, { getColumnNameAlias } from '../helpers/getTableName';
getColumnNameAlias,
} from '../helpers/getTableName';
import mapDefaultDisplayValue from '../helpers/mapDefaultDisplayValue'; import mapDefaultDisplayValue from '../helpers/mapDefaultDisplayValue';
import { import { Audit, Column, Model, ModelRoleVisibility, Project } from '../models';
Audit,
Column,
Model,
ModelRoleVisibility,
Project,
} from '../models';
import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2'; import NcConnectionMgrv2 from '../utils/common/NcConnectionMgrv2';
import { validatePayload } from '../helpers'; import { validatePayload } from '../helpers';
import type { LinkToAnotherRecordColumn, User, View } from '../models'; import type { LinkToAnotherRecordColumn, User, View } from '../models';

11
packages/nocodb-nest/src/services/users/users.service.ts

@ -188,8 +188,11 @@ export class UsersService {
token_version: null, token_version: null,
}); });
try { try {
const template = (await import('../../controllers/users/ui/emailTemplates/forgotPassword')) const template = (
.default; await import(
'../../controllers/users/ui/emailTemplates/forgotPassword'
)
).default;
await NcPluginMgrv2.emailAdapter().then((adapter) => await NcPluginMgrv2.emailAdapter().then((adapter) =>
adapter.mailSend({ adapter.mailSend({
to: user.email, to: user.email,
@ -443,7 +446,9 @@ export class UsersService {
user = await User.getByEmail(email); user = await User.getByEmail(email);
try { try {
const template = (await import('../../controllers/users/ui/emailTemplates/verify')).default; const template = (
await import('../../controllers/users/ui/emailTemplates/verify')
).default;
await ( await (
await NcPluginMgrv2.emailAdapter() await NcPluginMgrv2.emailAdapter()
).mailSend({ ).mailSend({

Loading…
Cancel
Save