mirror of
https://github.com/n8n-io/n8n.git
synced 2026-09-01 05:38:33 +08:00
feat(core): Register type-availability-policies module scaffold (no-changelog) (#36707)
This commit is contained in:
@@ -38,6 +38,7 @@ export const MODULE_NAMES = [
|
||||
'workflow-reviews',
|
||||
'engine-v2',
|
||||
'policy-infrastructure',
|
||||
'type-availability-policies',
|
||||
] as const;
|
||||
|
||||
export type ModuleName = (typeof MODULE_NAMES)[number];
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
import { ModuleMetadata } from '@n8n/decorators';
|
||||
import { Container } from '@n8n/di';
|
||||
|
||||
// Importing the module runs the @BackendModule decorator, registering its metadata.
|
||||
import { TypeAvailabilityPoliciesModule } from '../type-availability-policies.module';
|
||||
|
||||
describe('TypeAvailabilityPoliciesModule', () => {
|
||||
it('registers itself under the correct module name', () => {
|
||||
const entry = Container.get(ModuleMetadata).get('type-availability-policies');
|
||||
|
||||
expect(entry).toBeDefined();
|
||||
});
|
||||
|
||||
it('initializes with no side effects (empty scaffold)', async () => {
|
||||
const module = new TypeAvailabilityPoliciesModule();
|
||||
|
||||
await expect(module.init()).resolves.toBeUndefined();
|
||||
});
|
||||
});
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import type { ModuleInterface } from '@n8n/decorators';
|
||||
import { BackendModule } from '@n8n/decorators';
|
||||
|
||||
@BackendModule({ name: 'type-availability-policies' })
|
||||
export class TypeAvailabilityPoliciesModule implements ModuleInterface {
|
||||
async init() {}
|
||||
}
|
||||
Reference in New Issue
Block a user