mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
chore(core): Rename Data Store module to Data Table (no-changelog) (#18675)
This commit is contained in:
@@ -15,8 +15,8 @@ beforeEach(() => {
|
|||||||
|
|
||||||
describe('eligibleModules', () => {
|
describe('eligibleModules', () => {
|
||||||
it('should consider all default modules eligible', () => {
|
it('should consider all default modules eligible', () => {
|
||||||
// 'data-store' isn't (yet) eligible module by default
|
// 'data-table' isn't (yet) eligible module by default
|
||||||
const expectedModules = MODULE_NAMES.filter((name) => name !== 'data-store');
|
const expectedModules = MODULE_NAMES.filter((name) => name !== 'data-table');
|
||||||
expect(Container.get(ModuleRegistry).eligibleModules).toEqual(expectedModules);
|
expect(Container.get(ModuleRegistry).eligibleModules).toEqual(expectedModules);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -29,12 +29,12 @@ describe('eligibleModules', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should consider a module eligible if it was enabled via env var', () => {
|
it('should consider a module eligible if it was enabled via env var', () => {
|
||||||
process.env.N8N_ENABLED_MODULES = 'data-store';
|
process.env.N8N_ENABLED_MODULES = 'data-table';
|
||||||
expect(Container.get(ModuleRegistry).eligibleModules).toEqual([
|
expect(Container.get(ModuleRegistry).eligibleModules).toEqual([
|
||||||
'insights',
|
'insights',
|
||||||
'external-secrets',
|
'external-secrets',
|
||||||
'community-packages',
|
'community-packages',
|
||||||
'data-store',
|
'data-table',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export const MODULE_NAMES = [
|
|||||||
'insights',
|
'insights',
|
||||||
'external-secrets',
|
'external-secrets',
|
||||||
'community-packages',
|
'community-packages',
|
||||||
'data-store',
|
'data-table',
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export type ModuleName = (typeof MODULE_NAMES)[number];
|
export type ModuleName = (typeof MODULE_NAMES)[number];
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export const LOG_SCOPES = [
|
|||||||
'insights',
|
'insights',
|
||||||
'workflow-activation',
|
'workflow-activation',
|
||||||
'ssh-client',
|
'ssh-client',
|
||||||
'data-store',
|
'data-table',
|
||||||
'cron',
|
'cron',
|
||||||
'community-nodes',
|
'community-nodes',
|
||||||
'legacy-sqlite-execution-recovery',
|
'legacy-sqlite-execution-recovery',
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import {
|
|||||||
SubworkflowPolicyChecker,
|
SubworkflowPolicyChecker,
|
||||||
} from '@/executions/pre-execution-checks';
|
} from '@/executions/pre-execution-checks';
|
||||||
import { ExternalHooks } from '@/external-hooks';
|
import { ExternalHooks } from '@/external-hooks';
|
||||||
import { DataStoreProxyService } from '@/modules/data-store/data-store-proxy.service';
|
import { DataStoreProxyService } from '@/modules/data-table/data-store-proxy.service';
|
||||||
import { UrlService } from '@/services/url.service';
|
import { UrlService } from '@/services/url.service';
|
||||||
import { WorkflowStatisticsService } from '@/services/workflow-statistics.service';
|
import { WorkflowStatisticsService } from '@/services/workflow-statistics.service';
|
||||||
import { Telemetry } from '@/telemetry';
|
import { Telemetry } from '@/telemetry';
|
||||||
|
|||||||
@@ -6,11 +6,12 @@ import {
|
|||||||
testDb,
|
testDb,
|
||||||
} from '@n8n/backend-test-utils';
|
} from '@n8n/backend-test-utils';
|
||||||
import type { Project, User } from '@n8n/db';
|
import type { Project, User } from '@n8n/db';
|
||||||
|
import { DateTime } from 'luxon';
|
||||||
|
|
||||||
import { createDataStore } from '@test-integration/db/data-stores';
|
import { createDataStore } from '@test-integration/db/data-stores';
|
||||||
import { createOwner, createMember, createAdmin } from '@test-integration/db/users';
|
import { createOwner, createMember, createAdmin } from '@test-integration/db/users';
|
||||||
import type { SuperAgentTest } from '@test-integration/types';
|
import type { SuperAgentTest } from '@test-integration/types';
|
||||||
import * as utils from '@test-integration/utils';
|
import * as utils from '@test-integration/utils';
|
||||||
import { DateTime } from 'luxon';
|
|
||||||
|
|
||||||
let owner: User;
|
let owner: User;
|
||||||
let member: User;
|
let member: User;
|
||||||
@@ -22,8 +23,8 @@ let ownerProject: Project;
|
|||||||
let memberProject: Project;
|
let memberProject: Project;
|
||||||
|
|
||||||
const testServer = utils.setupTestServer({
|
const testServer = utils.setupTestServer({
|
||||||
endpointGroups: ['data-store'],
|
endpointGroups: ['data-table'],
|
||||||
modules: ['data-store'],
|
modules: ['data-table'],
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
@@ -10,7 +10,7 @@ import { DataStoreAggregateService } from '../data-store-aggregate.service';
|
|||||||
import { DataStoreService } from '../data-store.service';
|
import { DataStoreService } from '../data-store.service';
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await testModules.loadModules(['data-store']);
|
await testModules.loadModules(['data-table']);
|
||||||
await testDb.init();
|
await testDb.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ import type { DataStoreService } from '../data-store.service';
|
|||||||
const PROJECT_ID = 'project-id';
|
const PROJECT_ID = 'project-id';
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await testModules.loadModules(['data-store']);
|
await testModules.loadModules(['data-table']);
|
||||||
await testDb.init();
|
await testDb.init();
|
||||||
});
|
});
|
||||||
describe('DataStoreProxyService', () => {
|
describe('DataStoreProxyService', () => {
|
||||||
@@ -29,8 +29,8 @@ let ownerProject: Project;
|
|||||||
let memberProject: Project;
|
let memberProject: Project;
|
||||||
|
|
||||||
const testServer = utils.setupTestServer({
|
const testServer = utils.setupTestServer({
|
||||||
endpointGroups: ['data-store'],
|
endpointGroups: ['data-table'],
|
||||||
modules: ['data-store'],
|
modules: ['data-table'],
|
||||||
});
|
});
|
||||||
let projectRepository: ProjectRepository;
|
let projectRepository: ProjectRepository;
|
||||||
let dataStoreRepository: DataStoreRepository;
|
let dataStoreRepository: DataStoreRepository;
|
||||||
@@ -13,7 +13,7 @@ import { DataStoreNotFoundError } from '../errors/data-store-not-found.error';
|
|||||||
import { DataStoreValidationError } from '../errors/data-store-validation.error';
|
import { DataStoreValidationError } from '../errors/data-store-validation.error';
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await testModules.loadModules(['data-store']);
|
await testModules.loadModules(['data-table']);
|
||||||
await testDb.init();
|
await testDb.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ export class DataStoreAggregateService {
|
|||||||
private readonly projectService: ProjectService,
|
private readonly projectService: ProjectService,
|
||||||
private readonly logger: Logger,
|
private readonly logger: Logger,
|
||||||
) {
|
) {
|
||||||
this.logger = this.logger.scoped('data-store');
|
this.logger = this.logger.scoped('data-table');
|
||||||
}
|
}
|
||||||
async start() {}
|
async start() {}
|
||||||
async shutdown() {}
|
async shutdown() {}
|
||||||
@@ -30,7 +30,7 @@ export class DataStoreProxyService implements DataStoreProxyProvider {
|
|||||||
private readonly ownershipService: OwnershipService,
|
private readonly ownershipService: OwnershipService,
|
||||||
private readonly logger: Logger,
|
private readonly logger: Logger,
|
||||||
) {
|
) {
|
||||||
this.logger = this.logger.scoped('data-store');
|
this.logger = this.logger.scoped('data-table');
|
||||||
}
|
}
|
||||||
|
|
||||||
private validateRequest(node: INode) {
|
private validateRequest(node: INode) {
|
||||||
@@ -30,7 +30,7 @@ export class DataStoreService {
|
|||||||
private readonly dataStoreRowsRepository: DataStoreRowsRepository,
|
private readonly dataStoreRowsRepository: DataStoreRowsRepository,
|
||||||
private readonly logger: Logger,
|
private readonly logger: Logger,
|
||||||
) {
|
) {
|
||||||
this.logger = this.logger.scoped('data-store');
|
this.logger = this.logger.scoped('data-table');
|
||||||
}
|
}
|
||||||
|
|
||||||
async start() {}
|
async start() {}
|
||||||
@@ -3,8 +3,8 @@ import { BackendModule, OnShutdown } from '@n8n/decorators';
|
|||||||
import { Container } from '@n8n/di';
|
import { Container } from '@n8n/di';
|
||||||
import { BaseEntity } from '@n8n/typeorm';
|
import { BaseEntity } from '@n8n/typeorm';
|
||||||
|
|
||||||
@BackendModule({ name: 'data-store' })
|
@BackendModule({ name: 'data-table' })
|
||||||
export class DataStoreModule implements ModuleInterface {
|
export class DataTableModule implements ModuleInterface {
|
||||||
async init() {
|
async init() {
|
||||||
await import('./data-store.controller');
|
await import('./data-store.controller');
|
||||||
await import('./data-store-aggregate.controller');
|
await import('./data-store-aggregate.controller');
|
||||||
@@ -23,7 +23,7 @@ import { WorkflowStaticDataService } from '@/workflows/workflow-static-data.serv
|
|||||||
|
|
||||||
import { JobProcessor } from '../job-processor';
|
import { JobProcessor } from '../job-processor';
|
||||||
import type { Job } from '../scaling.types';
|
import type { Job } from '../scaling.types';
|
||||||
import { DataStoreProxyService } from '@/modules/data-store/data-store-proxy.service';
|
import { DataStoreProxyService } from '@/modules/data-table/data-store-proxy.service';
|
||||||
|
|
||||||
mockInstance(VariablesService, {
|
mockInstance(VariablesService, {
|
||||||
getAllCached: jest.fn().mockResolvedValue([]),
|
getAllCached: jest.fn().mockResolvedValue([]),
|
||||||
|
|||||||
@@ -378,9 +378,9 @@ export async function getBase(
|
|||||||
const eventService = Container.get(EventService);
|
const eventService = Container.get(EventService);
|
||||||
|
|
||||||
const moduleRegistry = Container.get(ModuleRegistry);
|
const moduleRegistry = Container.get(ModuleRegistry);
|
||||||
const dataStoreProxyProvider = moduleRegistry.isActive('data-store')
|
const dataStoreProxyProvider = moduleRegistry.isActive('data-table')
|
||||||
? Container.get(
|
? Container.get(
|
||||||
(await import('@/modules/data-store/data-store-proxy.service')).DataStoreProxyService,
|
(await import('@/modules/data-table/data-store-proxy.service')).DataStoreProxyService,
|
||||||
)
|
)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import type { Project } from '@n8n/db';
|
|||||||
import { Container } from '@n8n/di';
|
import { Container } from '@n8n/di';
|
||||||
import type { DataStoreRows } from 'n8n-workflow';
|
import type { DataStoreRows } from 'n8n-workflow';
|
||||||
|
|
||||||
import { DataStoreColumnRepository } from '@/modules/data-store/data-store-column.repository';
|
import { DataStoreColumnRepository } from '@/modules/data-table/data-store-column.repository';
|
||||||
import { DataStoreRowsRepository } from '@/modules/data-store/data-store-rows.repository';
|
import { DataStoreRowsRepository } from '@/modules/data-table/data-store-rows.repository';
|
||||||
import { DataStoreRepository } from '@/modules/data-store/data-store.repository';
|
import { DataStoreRepository } from '@/modules/data-table/data-store.repository';
|
||||||
|
|
||||||
export const createDataStore = async (
|
export const createDataStore = async (
|
||||||
project: Project,
|
project: Project,
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ type EndpointGroup =
|
|||||||
| 'ai'
|
| 'ai'
|
||||||
| 'folder'
|
| 'folder'
|
||||||
| 'insights'
|
| 'insights'
|
||||||
| 'data-store'
|
| 'data-table'
|
||||||
| 'module-settings';
|
| 'module-settings';
|
||||||
|
|
||||||
type ModuleName = 'insights' | 'external-secrets' | 'community-packages' | 'data-store';
|
type ModuleName = 'insights' | 'external-secrets' | 'community-packages' | 'data-table';
|
||||||
|
|
||||||
export interface SetupProps {
|
export interface SetupProps {
|
||||||
endpointGroups?: EndpointGroup[];
|
endpointGroups?: EndpointGroup[];
|
||||||
|
|||||||
@@ -306,8 +306,8 @@ export const setupTestServer = ({
|
|||||||
await import('@/modules/insights/insights.module');
|
await import('@/modules/insights/insights.module');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'data-store':
|
case 'data-table':
|
||||||
await import('@/modules/data-store/data-store.module');
|
await import('@/modules/data-table/data-table.module');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'module-settings':
|
case 'module-settings':
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ export const MIN_LOADING_TIME = 500; // ms
|
|||||||
export const NULL_VALUE = 'Null';
|
export const NULL_VALUE = 'Null';
|
||||||
export const EMPTY_VALUE = 'Empty';
|
export const EMPTY_VALUE = 'Empty';
|
||||||
|
|
||||||
export const DATA_STORE_MODULE_NAME = 'data-store';
|
export const DATA_STORE_MODULE_NAME = 'data-table';
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const DataStoreDetailsView = async () =>
|
|||||||
await import('@/features/dataStore/DataStoreDetailsView.vue');
|
await import('@/features/dataStore/DataStoreDetailsView.vue');
|
||||||
|
|
||||||
export const DataStoreModule: FrontendModuleDescription = {
|
export const DataStoreModule: FrontendModuleDescription = {
|
||||||
id: 'data-store',
|
id: 'data-table',
|
||||||
name: 'Data Store',
|
name: 'Data Store',
|
||||||
description: 'Manage and store data efficiently with the Data Store module.',
|
description: 'Manage and store data efficiently with the Data Store module.',
|
||||||
icon: 'database',
|
icon: 'database',
|
||||||
|
|||||||
@@ -250,11 +250,11 @@ export const useUIStore = defineStore(STORES.UI, () => {
|
|||||||
* Module name is also added to the key so that we can check if the module is active
|
* Module name is also added to the key so that we can check if the module is active
|
||||||
* when tabs are rendered.\
|
* when tabs are rendered.\
|
||||||
* @example
|
* @example
|
||||||
* uiStore.registerCustomTabs('overview', 'data-store', [
|
* uiStore.registerCustomTabs('overview', 'data-table', [
|
||||||
* {
|
* {
|
||||||
* label: 'Data Store',
|
* label: 'Data Table',
|
||||||
* value: 'data-store',
|
* value: 'data-table',
|
||||||
* to: { name: 'data-store' },
|
* to: { name: 'data-table' },
|
||||||
* },
|
* },
|
||||||
* ]);
|
* ]);
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user