mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-09-05 01:56:33 +02:00
refactor(core): Move instanceType to InstanceSettings (no-changelog) (#10640)
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import type { InstanceType } from 'n8n-core';
|
||||
import { ALPHABET } from 'n8n-workflow';
|
||||
import { customAlphabet } from 'nanoid';
|
||||
|
||||
import type { N8nInstanceType } from '@/interfaces';
|
||||
|
||||
const nanoid = customAlphabet(ALPHABET, 16);
|
||||
|
||||
export function generateNanoId() {
|
||||
return nanoid();
|
||||
}
|
||||
|
||||
export function generateHostInstanceId(instanceType: N8nInstanceType) {
|
||||
export function generateHostInstanceId(instanceType: InstanceType) {
|
||||
return `${instanceType}-${nanoid()}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user