@n8n/stores 2.36.2 → 2.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composables/useBasePageRedirectionHelper.cjs +28 -8
- package/dist/composables/useBasePageRedirectionHelper.cjs.map +1 -1
- package/dist/composables/useBasePageRedirectionHelper.d.cts +7 -0
- package/dist/composables/useBasePageRedirectionHelper.d.mts +7 -0
- package/dist/composables/useBasePageRedirectionHelper.mjs +28 -8
- package/dist/composables/useBasePageRedirectionHelper.mjs.map +1 -1
- package/dist/constants2.cjs +1 -0
- package/dist/constants2.cjs.map +1 -1
- package/dist/constants2.d.cts +1 -0
- package/dist/constants2.d.mts +1 -0
- package/dist/constants2.mjs +1 -0
- package/dist/constants2.mjs.map +1 -1
- package/dist/notifications.store.d.cts +2 -2
- package/dist/pageRedirection.d.cts +2 -2
- package/dist/pageRedirection.d.mts +2 -2
- package/dist/rbac.store.cjs +1 -0
- package/dist/rbac.store.cjs.map +1 -1
- package/dist/rbac.store.d.cts +51 -45
- package/dist/rbac.store.d.mts +51 -45
- package/dist/rbac.store.mjs +1 -0
- package/dist/rbac.store.mjs.map +1 -1
- package/dist/roles.store.d.cts +21 -21
- package/dist/roles.store.d.mts +21 -21
- package/dist/settings.store.d.cts +250 -244
- package/dist/settings.store.d.mts +250 -244
- package/dist/settings2.store.cjs +9 -0
- package/dist/settings2.store.cjs.map +1 -1
- package/dist/settings2.store.mjs +9 -0
- package/dist/settings2.store.mjs.map +1 -1
- package/dist/useAgentRequestStore.d.cts +2 -2
- package/dist/useAgentRequestStore.d.mts +2 -2
- package/dist/useRootStore.d.cts +75 -75
- package/dist/useRootStore.d.mts +75 -75
- package/dist/users.store.d.cts +49 -49
- package/dist/users.store.d.mts +51 -51
- package/dist/versions.store.d.cts +30 -30
- package/dist/versions.store.d.mts +30 -30
- package/package.json +13 -13
package/dist/settings2.store.cjs
CHANGED
|
@@ -39,6 +39,7 @@ __n8n_rest_api_client_api_settings = __toESM(__n8n_rest_api_client_api_settings)
|
|
|
39
39
|
let __n8n_rest_api_client_api_templates = require("@n8n/rest-api-client/api/templates");
|
|
40
40
|
let bowser = require("bowser");
|
|
41
41
|
bowser = __toESM(bowser);
|
|
42
|
+
let n8n_workflow = require("n8n-workflow");
|
|
42
43
|
|
|
43
44
|
//#region src/settings.store.ts
|
|
44
45
|
/**
|
|
@@ -171,6 +172,12 @@ const useSettingsStore = (0, pinia.defineStore)(require_constants.STORES.SETTING
|
|
|
171
172
|
const isMultiMain = (0, vue.computed)(() => settings.value.isMultiMain);
|
|
172
173
|
const isWorkerViewAvailable = (0, vue.computed)(() => !!settings.value.enterprise?.workerView);
|
|
173
174
|
const workflowCallerPolicyDefaultOption = (0, vue.computed)(() => settings.value.workflowCallerPolicyDefaultOption);
|
|
175
|
+
const isNodeTypeExcluded = (nodeType) => {
|
|
176
|
+
const excludeNodes = settings.value.excludeNodes;
|
|
177
|
+
return Array.isArray(excludeNodes) && excludeNodes.includes(nodeType);
|
|
178
|
+
};
|
|
179
|
+
const isExecuteWorkflowNodeExcluded = (0, vue.computed)(() => isNodeTypeExcluded(n8n_workflow.EXECUTE_WORKFLOW_NODE_TYPE));
|
|
180
|
+
const isSubworkflowConversionDisabled = (0, vue.computed)(() => isExecuteWorkflowNodeExcluded.value || isNodeTypeExcluded(n8n_workflow.EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE));
|
|
174
181
|
const permanentlyDismissedBanners = (0, vue.computed)(() => settings.value.banners?.dismissed ?? []);
|
|
175
182
|
const isCommunityPlan = (0, vue.computed)(() => planName.value.toLowerCase() === "community");
|
|
176
183
|
const isDevRelease = (0, vue.computed)(() => settings.value.releaseChannel === "dev");
|
|
@@ -335,6 +342,8 @@ const useSettingsStore = (0, pinia.defineStore)(require_constants.STORES.SETTING
|
|
|
335
342
|
isMultiMain,
|
|
336
343
|
isWorkerViewAvailable,
|
|
337
344
|
workflowCallerPolicyDefaultOption,
|
|
345
|
+
isExecuteWorkflowNodeExcluded,
|
|
346
|
+
isSubworkflowConversionDisabled,
|
|
338
347
|
permanentlyDismissedBanners,
|
|
339
348
|
saveDataErrorExecution,
|
|
340
349
|
saveDataSuccessExecution,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings2.store.cjs","names":["i18n","STORES","AuthenticationMethod","Bowser","allowedModules","useRootStore","settingsApi","eventsApi","moduleSettingsApi","aiUsageApi"],"sources":["../src/settings.store.ts"],"sourcesContent":["import {\n\tAuthenticationMethod,\n\ttype IUserManagementSettings,\n\ttype FrontendSettings,\n\ttype FrontendModuleSettings,\n\ttype WorkflowReviewsPolicy,\n} from '@n8n/api-types';\nimport { i18n } from '@n8n/i18n';\nimport { makeRestApiRequest } from '@n8n/rest-api-client';\nimport * as aiUsageApi from '@n8n/rest-api-client/api/ai-usage';\nimport * as eventsApi from '@n8n/rest-api-client/api/events';\nimport * as moduleSettingsApi from '@n8n/rest-api-client/api/module-settings';\nimport * as settingsApi from '@n8n/rest-api-client/api/settings';\nimport { testHealthEndpoint } from '@n8n/rest-api-client/api/templates';\nimport Bowser from 'bowser';\nimport type { IDataObject, WorkflowSettings } from 'n8n-workflow';\nimport { defineStore } from 'pinia';\nimport { computed, ref } from 'vue';\n\nimport { STORES } from './constants';\nimport { useRootStore } from './useRootStore';\n\n/**\n * Full-page warning rendered when the instance requires a secure cookie but the\n * page is served over an insecure origin (or via Safari, which drops the cookie).\n * The copy is localized; the structural markup and inline styles stay in code\n * because this is written via `document.write` before the Vue app mounts.\n */\nconst buildInsecureConnectionWarning = () => `\n<body style=\"margin-top: 20px; font-family: 'Open Sans', sans-serif; text-align: center;\">\n<h1 style=\"font-size: 40px\">🚫</h1>\n<h2>${i18n.baseText('settings.authCookie.insecureConnection.title')}</h2>\n<br/>\n<div style=\"font-size: 18px; max-width: 640px; text-align: left; margin: 10px auto\">\n\t${i18n.baseText('settings.authCookie.insecureConnection.fixIntro')}\n\t<ul>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.tls')}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.localhost', { interpolate: { localhostUrl: 'http://localhost:5678' } })}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.disableSecureCookie', { interpolate: { envVar: 'N8N_SECURE_COOKIE' } })}</li>\n\t</ul>\n</div>\n</body>`;\n\nexport const useSettingsStore = defineStore(STORES.SETTINGS, () => {\n\tconst initialized = ref(false);\n\tconst settings = ref<FrontendSettings>({} as FrontendSettings);\n\tconst moduleSettings = ref<FrontendModuleSettings>({});\n\tconst userManagement = ref<IUserManagementSettings>({\n\t\tquota: -1,\n\t\tshowSetupOnFirstLoad: false,\n\t\tsmtpSetup: false,\n\t\tauthenticationMethod: AuthenticationMethod.Email,\n\t\tpasswordMinLength: 8,\n\t});\n\tconst templatesEndpointHealthy = ref(false);\n\tconst api = ref({\n\t\tenabled: false,\n\t\tlatestVersion: 0,\n\t\tpath: '/',\n\t\tswaggerUi: {\n\t\t\tenabled: false,\n\t\t},\n\t});\n\tconst mfa = ref({ enabled: false });\n\tconst folders = ref({ enabled: false });\n\n\tconst saveDataErrorExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveDataSuccessExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveManualExecutions = ref(false);\n\tconst saveDataProgressExecution = ref(false);\n\tconst isMFAEnforced = ref(false);\n\n\tconst isDocker = computed(() => settings.value?.isDocker ?? false);\n\n\tconst databaseType = computed(() => settings.value?.databaseType);\n\n\tconst planName = computed(() => settings.value?.license?.planName ?? 'Community');\n\n\tconst consumerId = computed(() => settings.value?.license?.consumerId);\n\n\tconst binaryDataMode = computed(() => settings.value?.binaryDataMode);\n\n\tconst pruning = computed(() => settings.value?.pruning);\n\n\tconst security = computed(() => ({\n\t\tblockFileAccessToN8nFiles: settings.value?.security?.blockFileAccessToN8nFiles,\n\t\tsecureCookie: settings.value?.authCookie?.secure,\n\t}));\n\n\tconst isEnterpriseFeatureEnabled = computed(() => settings.value.enterprise ?? {});\n\n\tconst nodeJsVersion = computed(() => settings.value.nodeJsVersion);\n\n\tconst nodeEnv = computed(() => settings.value.nodeEnv);\n\n\tconst concurrency = computed(() => settings.value.concurrency);\n\n\tconst isConcurrencyEnabled = computed(() => concurrency.value !== -1);\n\n\tconst isPublicApiEnabled = computed(() => api.value.enabled);\n\n\tconst isSwaggerUIEnabled = computed(() => api.value.swaggerUi?.enabled ?? false);\n\n\tconst isPreviewMode = computed(() => settings.value.previewMode);\n\n\tconst isE2ETestMode = computed(() => settings.value.inE2ETests);\n\n\tconst isCanvasOnly = computed(() => settings.value.canvasOnly);\n\n\tconst isCrdtCollaborationEnabled = computed(\n\t\t() => (settings.value.collaboration?.crdt ?? 'off') !== 'off',\n\t);\n\n\tconst publicApiLatestVersion = computed(() => api.value.latestVersion);\n\n\tconst publicApiPath = computed(() => api.value.path);\n\n\tconst isAiAssistantEnabled = computed(\n\t\t() => settings.value.aiAssistant?.enabled && settings.value.aiAssistant?.setup,\n\t);\n\n\tconst isAskAiEnabled = computed(() => settings.value.askAi?.enabled);\n\n\tconst isAiBuilderEnabled = computed(\n\t\t() => settings.value.aiBuilder?.enabled && settings.value.aiBuilder?.setup,\n\t);\n\n\tconst isAiAssistantOrBuilderEnabled = computed(\n\t\t() => isAiAssistantEnabled.value || isAiBuilderEnabled.value,\n\t);\n\n\tconst showSetupPage = computed(() => userManagement.value.showSetupOnFirstLoad);\n\n\tconst deploymentType = computed(() => settings.value.deployment?.type || 'default');\n\n\tconst isCloudDeployment = computed(() => settings.value.deployment?.type === 'cloud');\n\n\tconst activeModules = computed(() => settings.value.activeModules);\n\n\tconst isModuleActive = (moduleName: string) => {\n\t\treturn activeModules.value?.includes(moduleName);\n\t};\n\n\t/**\n\t * Checks whether an agents-module sub-feature token (listed in\n\t * `N8N_AGENTS_MODULES` on the backend) is enabled. Returns `false`\n\t * unless the top-level `agents` module is active AND the token is\n\t * present in the module settings' `modules` array.\n\t *\n\t * Known tokens: see `AGENTS_MODULE_NAMES` in `agents.config.ts`.\n\t */\n\tconst isAgentModuleActive = (name: string): boolean => {\n\t\treturn (\n\t\t\tisModuleActive('agents') && moduleSettings.value.agents?.modules?.includes(name) === true\n\t\t);\n\t};\n\n\tconst isAiCreditsEnabled = computed(\n\t\t() => settings.value.aiCredits?.enabled && settings.value.aiCredits?.setup,\n\t);\n\n\tconst aiCreditsQuota = computed(() => settings.value.aiCredits?.credits);\n\n\tconst isAiDataSharingEnabled = computed(\n\t\t() => settings.value.ai?.allowSendingParameterValues ?? true,\n\t);\n\n\tconst isAiGatewayEnabled = computed(() => settings.value.aiGateway?.enabled ?? false);\n\n\tconst isAiGatewayCloudUbbEnabled = computed(\n\t\t() => settings.value.aiGateway?.cloudUbbEnabled ?? false,\n\t);\n\n\tconst aiGatewayBudget = computed(() => settings.value.aiGateway?.budget ?? 0);\n\n\tconst isSmtpSetup = computed(() => userManagement.value.smtpSetup);\n\n\tconst isPersonalizationSurveyEnabled = computed(\n\t\t() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled,\n\t);\n\n\tconst telemetry = computed(() => settings.value.telemetry);\n\n\tconst logLevel = computed(() => settings.value.logLevel);\n\n\tconst isTelemetryEnabled = computed(() => settings.value.telemetry?.enabled);\n\n\tconst isMFAEnforcementLicensed = computed(() => {\n\t\treturn settings.value.enterprise?.mfaEnforcement ?? false;\n\t});\n\n\tconst isMfaFeatureEnabled = computed(() => mfa.value.enabled);\n\n\tconst isFoldersFeatureEnabled = computed(() => folders.value.enabled);\n\n\tconst isDataTableFeatureEnabled = computed(() => isModuleActive('data-table'));\n\n\tconst isChatFeatureEnabled = computed(\n\t\t() => isModuleActive('chat-hub') && moduleSettings.value['chat-hub']?.enabled === true,\n\t);\n\n\tconst isOtelCustomSpanAttributesEnabled = computed(() => {\n\t\tconst isOtelCustomSpanAttributesLicensed =\n\t\t\tsettings.value.enterprise?.otelCustomSpanAttributes ?? false;\n\t\tconst isOtelModuleActive =\n\t\t\tisModuleActive('otel') && moduleSettings.value.otel?.enabled === true;\n\n\t\treturn isOtelCustomSpanAttributesLicensed && isOtelModuleActive;\n\t});\n\n\t// Opt-in flag controlled by the backend's N8N_AGENTS_AI_SANDBOX_ENABLED setting.\n\tconst isAgentsKnowledgeBaseFeatureEnabled = computed(\n\t\t() => isModuleActive('agents') && moduleSettings.value.agents?.knowledgeBaseEnabled === true,\n\t);\n\n\tconst isPublicChatTriggerDisabled = computed(\n\t\t() => settings.value.chatTrigger?.disablePublicChat ?? false,\n\t);\n\n\tconst isCustomRolesFeatureEnabled = computed(\n\t\t() => settings.value.enterprise?.customRoles ?? false,\n\t);\n\n\tconst areTagsEnabled = computed(() =>\n\t\tsettings.value.workflowTagsDisabled !== undefined ? !settings.value.workflowTagsDisabled : true,\n\t);\n\n\tconst isAutosaveEnabled = computed(() =>\n\t\tsettings.value.workflowsAutosaveDisabled !== undefined\n\t\t\t? !settings.value.workflowsAutosaveDisabled\n\t\t\t: true,\n\t);\n\n\tconst isHiringBannerEnabled = computed(() => settings.value.hiringBannerEnabled);\n\n\tconst isTemplatesEnabled = computed(() => Boolean(settings.value.templates?.enabled));\n\n\tconst isTemplatesEndpointReachable = computed(() => templatesEndpointHealthy.value);\n\n\tconst templatesHost = computed(() => settings.value.templates?.host ?? '');\n\n\tconst pushBackend = computed(() => settings.value.pushBackend);\n\n\tconst isCommunityNodesFeatureEnabled = computed(() => settings.value.communityNodesEnabled);\n\n\tconst isUnverifiedPackagesEnabled = computed(\n\t\t() => settings.value.unverifiedCommunityNodesEnabled,\n\t);\n\n\tconst allowedModules = computed(() => settings.value.allowedModules);\n\n\tconst isQueueModeEnabled = computed(() => settings.value.executionMode === 'queue');\n\tconst isMultiMain = computed(() => settings.value.isMultiMain);\n\n\tconst isWorkerViewAvailable = computed(() => !!settings.value.enterprise?.workerView);\n\n\tconst workflowCallerPolicyDefaultOption = computed(\n\t\t() => settings.value.workflowCallerPolicyDefaultOption,\n\t);\n\n\tconst permanentlyDismissedBanners = computed(() => settings.value.banners?.dismissed ?? []);\n\n\tconst isCommunityPlan = computed(() => planName.value.toLowerCase() === 'community');\n\n\tconst isDevRelease = computed(() => settings.value.releaseChannel === 'dev');\n\n\tconst endpointHealth = computed(() => settings.value.endpointHealth);\n\n\tconst isWorkflowPublicationServiceEnabled = computed(\n\t\t() => settings.value.useWorkflowPublicationService ?? false,\n\t);\n\n\tconst setSettings = (newSettings: FrontendSettings) => {\n\t\tsettings.value = newSettings;\n\n\t\tuserManagement.value = newSettings.userManagement;\n\t\tif (userManagement.value) {\n\t\t\tuserManagement.value.showSetupOnFirstLoad =\n\t\t\t\t!!settings.value.userManagement.showSetupOnFirstLoad;\n\t\t}\n\n\t\tif (settings.value.publicApi) {\n\t\t\tapi.value = settings.value.publicApi;\n\t\t}\n\n\t\tmfa.value.enabled = settings.value.mfa?.enabled;\n\t\tfolders.value.enabled = settings.value.folders?.enabled;\n\n\t\tif (settings.value.versionCli) {\n\t\t\tuseRootStore().setVersionCli(settings.value.versionCli);\n\t\t}\n\n\t\tif (settings.value.authCookie.secure) {\n\t\t\tconst { browser } = Bowser.parse(navigator.userAgent);\n\t\t\tif (\n\t\t\t\tlocation.protocol === 'http:' &&\n\t\t\t\t(!['localhost', '127.0.0.1'].includes(location.hostname) || browser.name === 'Safari')\n\t\t\t) {\n\t\t\t\tdocument.write(buildInsecureConnectionWarning());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst setAllowedModules = (allowedModules: FrontendSettings['allowedModules']) => {\n\t\tsettings.value.allowedModules = allowedModules;\n\t};\n\n\tconst setWorkflowReviewsPolicy = (policy: WorkflowReviewsPolicy) => {\n\t\tsettings.value.workflowReviews = policy;\n\t};\n\n\tconst setSaveDataErrorExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataErrorExecution.value = newValue;\n\t};\n\n\tconst setSaveDataSuccessExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataSuccessExecution.value = newValue;\n\t};\n\n\tconst setSaveManualExecutions = (newValue: boolean) => {\n\t\tsaveManualExecutions.value = newValue;\n\t};\n\n\tconst setSaveDataProgressExecution = (newValue: boolean) => {\n\t\tsaveDataProgressExecution.value = newValue;\n\t};\n\n\tconst getSettings = async () => {\n\t\tconst rootStore = useRootStore();\n\t\tconst fetchedSettings = await settingsApi.getSettings(rootStore.restApiContext);\n\n\t\tsetSettings(fetchedSettings);\n\t\trootStore.setDefaultLocale(fetchedSettings.defaultLocale);\n\n\t\t// Set MFA enforced state even for public settings mode\n\t\t// as it is needed to determine if the MFA setup page should be shown\n\t\tisMFAEnforced.value = settings.value.mfa?.enforced ?? false;\n\n\t\tif (fetchedSettings.settingsMode === 'public') {\n\t\t\t// public settings mode is typically used for unauthenticated users\n\t\t\t// when public settings are returned we can skip the rest of the setup\n\t\t\t// that need the full set of authenticated settings\n\t\t\treturn;\n\t\t}\n\n\t\tsettings.value.communityNodesEnabled = fetchedSettings.communityNodesEnabled;\n\t\tsettings.value.unverifiedCommunityNodesEnabled =\n\t\t\tfetchedSettings.unverifiedCommunityNodesEnabled;\n\t\tsetAllowedModules(fetchedSettings.allowedModules);\n\t\tsetSaveDataErrorExecution(fetchedSettings.saveDataErrorExecution);\n\t\tsetSaveDataSuccessExecution(fetchedSettings.saveDataSuccessExecution);\n\t\tsetSaveDataProgressExecution(fetchedSettings.saveExecutionProgress);\n\t\tsetSaveManualExecutions(fetchedSettings.saveManualExecutions);\n\n\t\trootStore.setUrlBaseWebhook(fetchedSettings.urlBaseWebhook);\n\t\trootStore.setUrlBaseEditor(fetchedSettings.urlBaseEditor);\n\t\trootStore.setUrlBaseWebhookTest(fetchedSettings.urlBaseWebhookTest);\n\t\trootStore.setEndpointForm(fetchedSettings.endpointForm);\n\t\trootStore.setEndpointFormTest(fetchedSettings.endpointFormTest);\n\t\trootStore.setEndpointFormWaiting(fetchedSettings.endpointFormWaiting);\n\t\trootStore.setEndpointWebhook(fetchedSettings.endpointWebhook);\n\t\trootStore.setEndpointWebhookTest(fetchedSettings.endpointWebhookTest);\n\t\trootStore.setEndpointWebhookWaiting(fetchedSettings.endpointWebhookWaiting);\n\t\trootStore.setEndpointMcp(fetchedSettings.endpointMcp);\n\t\trootStore.setEndpointMcpTest(fetchedSettings.endpointMcpTest);\n\t\trootStore.setTimezone(fetchedSettings.timezone);\n\t\trootStore.setExecutionTimeout(fetchedSettings.executionTimeout);\n\t\trootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);\n\t\trootStore.setPublicApiPath(\n\t\t\t`${fetchedSettings.publicApi.path}/v${fetchedSettings.publicApi.latestVersion}`,\n\t\t);\n\t\trootStore.setInstanceId(fetchedSettings.instanceId);\n\t\trootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);\n\t\trootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});\n\t\trootStore.setBinaryDataMode(fetchedSettings.binaryDataMode);\n\n\t\tif (fetchedSettings.telemetry.enabled) {\n\t\t\tvoid eventsApi.sessionStarted(rootStore.restApiContext);\n\t\t}\n\t};\n\n\tconst initialize = async () => {\n\t\tif (initialized.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait getSettings();\n\n\t\tinitialized.value = true;\n\t};\n\n\tconst stopShowingSetupPage = () => {\n\t\tuserManagement.value.showSetupOnFirstLoad = false;\n\t};\n\n\tconst disableTemplates = () => {\n\t\tsettings.value = {\n\t\t\t...settings.value,\n\t\t\ttemplates: {\n\t\t\t\t...settings.value.templates,\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t};\n\t};\n\n\tconst testTemplatesEndpoint = async () => {\n\t\tconst timeout = new Promise((_, reject) =>\n\t\t\tsetTimeout(() => reject(new Error('Templates health check timed out')), 2000),\n\t\t);\n\t\tawait Promise.race([testHealthEndpoint(templatesHost.value), timeout]);\n\t\ttemplatesEndpointHealthy.value = true;\n\t};\n\n\tconst getTimezones = async (): Promise<IDataObject> => {\n\t\tconst rootStore = useRootStore();\n\t\treturn await makeRestApiRequest(rootStore.restApiContext, 'GET', '/options/timezones');\n\t};\n\n\tconst reset = () => {\n\t\tsettings.value = {} as FrontendSettings;\n\t};\n\n\tconst getModuleSettings = async () => {\n\t\tconst fetched = await moduleSettingsApi.getModuleSettings(useRootStore().restApiContext);\n\t\tmoduleSettings.value = fetched;\n\t};\n\n\tconst updateAiDataSharingSettings = async (allowSendingParameterValues: boolean) => {\n\t\tconst rootStore = useRootStore();\n\t\tawait aiUsageApi.updateAiUsageSettings(rootStore.restApiContext, {\n\t\t\tallowSendingParameterValues,\n\t\t});\n\t\tif (settings.value.ai) {\n\t\t\tsettings.value.ai.allowSendingParameterValues = allowSendingParameterValues;\n\t\t}\n\t};\n\n\treturn {\n\t\tsettings,\n\t\tuserManagement,\n\t\ttemplatesEndpointHealthy,\n\t\tapi,\n\t\tmfa,\n\t\tisDocker,\n\t\tisDevRelease,\n\t\tendpointHealth,\n\t\tisEnterpriseFeatureEnabled,\n\t\tdatabaseType,\n\t\tplanName,\n\t\tconsumerId,\n\t\tbinaryDataMode,\n\t\tpruning,\n\t\tsecurity,\n\t\tnodeJsVersion,\n\t\tnodeEnv,\n\t\tconcurrency,\n\t\tisConcurrencyEnabled,\n\t\tisPublicApiEnabled,\n\t\tisSwaggerUIEnabled,\n\t\tisPreviewMode,\n\t\tisE2ETestMode,\n\t\tisCanvasOnly,\n\t\tisCrdtCollaborationEnabled,\n\t\tpublicApiLatestVersion,\n\t\tpublicApiPath,\n\t\tshowSetupPage,\n\t\tdeploymentType,\n\t\tisCloudDeployment,\n\t\tisSmtpSetup,\n\t\tisPersonalizationSurveyEnabled,\n\t\ttelemetry,\n\t\tlogLevel,\n\t\tisTelemetryEnabled,\n\t\tisMfaFeatureEnabled,\n\t\tisFoldersFeatureEnabled,\n\t\tisAiAssistantEnabled,\n\t\tisCustomRolesFeatureEnabled,\n\t\tareTagsEnabled,\n\t\tisAutosaveEnabled,\n\t\tisHiringBannerEnabled,\n\t\tisTemplatesEnabled,\n\t\tisTemplatesEndpointReachable,\n\t\ttemplatesHost,\n\t\tpushBackend,\n\t\tisCommunityNodesFeatureEnabled,\n\t\tisUnverifiedPackagesEnabled,\n\t\tallowedModules,\n\t\tisQueueModeEnabled,\n\t\tisMultiMain,\n\t\tisWorkerViewAvailable,\n\t\tworkflowCallerPolicyDefaultOption,\n\t\tpermanentlyDismissedBanners,\n\t\tsaveDataErrorExecution,\n\t\tsaveDataSuccessExecution,\n\t\tsaveManualExecutions,\n\t\tsaveDataProgressExecution,\n\t\tisCommunityPlan,\n\t\tisAskAiEnabled,\n\t\tisAiBuilderEnabled,\n\t\tisAiAssistantOrBuilderEnabled,\n\t\tisAiCreditsEnabled,\n\t\taiCreditsQuota,\n\t\tisAiDataSharingEnabled,\n\t\tisAiGatewayEnabled,\n\t\tisAiGatewayCloudUbbEnabled,\n\t\taiGatewayBudget,\n\t\treset,\n\t\tgetTimezones,\n\t\ttestTemplatesEndpoint,\n\t\tdisableTemplates,\n\t\tstopShowingSetupPage,\n\t\tgetSettings,\n\t\tsetSettings,\n\t\tsetWorkflowReviewsPolicy,\n\t\tinitialize,\n\t\tgetModuleSettings,\n\t\tmoduleSettings,\n\t\tupdateAiDataSharingSettings,\n\t\tisMFAEnforcementLicensed,\n\t\tisMFAEnforced,\n\t\tactiveModules,\n\t\tisModuleActive,\n\t\tisAgentModuleActive,\n\t\tisDataTableFeatureEnabled,\n\t\tisChatFeatureEnabled,\n\t\tisOtelCustomSpanAttributesEnabled,\n\t\tisAgentsKnowledgeBaseFeatureEnabled,\n\t\tisPublicChatTriggerDisabled,\n\t\tisWorkflowPublicationServiceEnabled,\n\t};\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,uCAAuC;;;MAGvCA,gBAAK,SAAS,+CAA+C,CAAC;;;GAGjEA,gBAAK,SAAS,kDAAkD,CAAC;;QAE5DA,gBAAK,SAAS,oDAAoD,CAAC;QACnE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A;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
|
|
1
|
+
{"version":3,"file":"settings2.store.cjs","names":["i18n","STORES","AuthenticationMethod","EXECUTE_WORKFLOW_NODE_TYPE","EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE","Bowser","allowedModules","useRootStore","settingsApi","eventsApi","moduleSettingsApi","aiUsageApi"],"sources":["../src/settings.store.ts"],"sourcesContent":["import {\n\tAuthenticationMethod,\n\ttype IUserManagementSettings,\n\ttype FrontendSettings,\n\ttype FrontendModuleSettings,\n\ttype WorkflowReviewsPolicy,\n} from '@n8n/api-types';\nimport { i18n } from '@n8n/i18n';\nimport { makeRestApiRequest } from '@n8n/rest-api-client';\nimport * as aiUsageApi from '@n8n/rest-api-client/api/ai-usage';\nimport * as eventsApi from '@n8n/rest-api-client/api/events';\nimport * as moduleSettingsApi from '@n8n/rest-api-client/api/module-settings';\nimport * as settingsApi from '@n8n/rest-api-client/api/settings';\nimport { testHealthEndpoint } from '@n8n/rest-api-client/api/templates';\nimport Bowser from 'bowser';\nimport {\n\tEXECUTE_WORKFLOW_NODE_TYPE,\n\tEXECUTE_WORKFLOW_TRIGGER_NODE_TYPE,\n\ttype IDataObject,\n\ttype WorkflowSettings,\n} from 'n8n-workflow';\nimport { defineStore } from 'pinia';\nimport { computed, ref } from 'vue';\n\nimport { STORES } from './constants';\nimport { useRootStore } from './useRootStore';\n\n/**\n * Full-page warning rendered when the instance requires a secure cookie but the\n * page is served over an insecure origin (or via Safari, which drops the cookie).\n * The copy is localized; the structural markup and inline styles stay in code\n * because this is written via `document.write` before the Vue app mounts.\n */\nconst buildInsecureConnectionWarning = () => `\n<body style=\"margin-top: 20px; font-family: 'Open Sans', sans-serif; text-align: center;\">\n<h1 style=\"font-size: 40px\">🚫</h1>\n<h2>${i18n.baseText('settings.authCookie.insecureConnection.title')}</h2>\n<br/>\n<div style=\"font-size: 18px; max-width: 640px; text-align: left; margin: 10px auto\">\n\t${i18n.baseText('settings.authCookie.insecureConnection.fixIntro')}\n\t<ul>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.tls')}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.localhost', { interpolate: { localhostUrl: 'http://localhost:5678' } })}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.disableSecureCookie', { interpolate: { envVar: 'N8N_SECURE_COOKIE' } })}</li>\n\t</ul>\n</div>\n</body>`;\n\nexport const useSettingsStore = defineStore(STORES.SETTINGS, () => {\n\tconst initialized = ref(false);\n\tconst settings = ref<FrontendSettings>({} as FrontendSettings);\n\tconst moduleSettings = ref<FrontendModuleSettings>({});\n\tconst userManagement = ref<IUserManagementSettings>({\n\t\tquota: -1,\n\t\tshowSetupOnFirstLoad: false,\n\t\tsmtpSetup: false,\n\t\tauthenticationMethod: AuthenticationMethod.Email,\n\t\tpasswordMinLength: 8,\n\t});\n\tconst templatesEndpointHealthy = ref(false);\n\tconst api = ref({\n\t\tenabled: false,\n\t\tlatestVersion: 0,\n\t\tpath: '/',\n\t\tswaggerUi: {\n\t\t\tenabled: false,\n\t\t},\n\t});\n\tconst mfa = ref({ enabled: false });\n\tconst folders = ref({ enabled: false });\n\n\tconst saveDataErrorExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveDataSuccessExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveManualExecutions = ref(false);\n\tconst saveDataProgressExecution = ref(false);\n\tconst isMFAEnforced = ref(false);\n\n\tconst isDocker = computed(() => settings.value?.isDocker ?? false);\n\n\tconst databaseType = computed(() => settings.value?.databaseType);\n\n\tconst planName = computed(() => settings.value?.license?.planName ?? 'Community');\n\n\tconst consumerId = computed(() => settings.value?.license?.consumerId);\n\n\tconst binaryDataMode = computed(() => settings.value?.binaryDataMode);\n\n\tconst pruning = computed(() => settings.value?.pruning);\n\n\tconst security = computed(() => ({\n\t\tblockFileAccessToN8nFiles: settings.value?.security?.blockFileAccessToN8nFiles,\n\t\tsecureCookie: settings.value?.authCookie?.secure,\n\t}));\n\n\tconst isEnterpriseFeatureEnabled = computed(() => settings.value.enterprise ?? {});\n\n\tconst nodeJsVersion = computed(() => settings.value.nodeJsVersion);\n\n\tconst nodeEnv = computed(() => settings.value.nodeEnv);\n\n\tconst concurrency = computed(() => settings.value.concurrency);\n\n\tconst isConcurrencyEnabled = computed(() => concurrency.value !== -1);\n\n\tconst isPublicApiEnabled = computed(() => api.value.enabled);\n\n\tconst isSwaggerUIEnabled = computed(() => api.value.swaggerUi?.enabled ?? false);\n\n\tconst isPreviewMode = computed(() => settings.value.previewMode);\n\n\tconst isE2ETestMode = computed(() => settings.value.inE2ETests);\n\n\tconst isCanvasOnly = computed(() => settings.value.canvasOnly);\n\n\tconst isCrdtCollaborationEnabled = computed(\n\t\t() => (settings.value.collaboration?.crdt ?? 'off') !== 'off',\n\t);\n\n\tconst publicApiLatestVersion = computed(() => api.value.latestVersion);\n\n\tconst publicApiPath = computed(() => api.value.path);\n\n\tconst isAiAssistantEnabled = computed(\n\t\t() => settings.value.aiAssistant?.enabled && settings.value.aiAssistant?.setup,\n\t);\n\n\tconst isAskAiEnabled = computed(() => settings.value.askAi?.enabled);\n\n\tconst isAiBuilderEnabled = computed(\n\t\t() => settings.value.aiBuilder?.enabled && settings.value.aiBuilder?.setup,\n\t);\n\n\tconst isAiAssistantOrBuilderEnabled = computed(\n\t\t() => isAiAssistantEnabled.value || isAiBuilderEnabled.value,\n\t);\n\n\tconst showSetupPage = computed(() => userManagement.value.showSetupOnFirstLoad);\n\n\tconst deploymentType = computed(() => settings.value.deployment?.type || 'default');\n\n\tconst isCloudDeployment = computed(() => settings.value.deployment?.type === 'cloud');\n\n\tconst activeModules = computed(() => settings.value.activeModules);\n\n\tconst isModuleActive = (moduleName: string) => {\n\t\treturn activeModules.value?.includes(moduleName);\n\t};\n\n\t/**\n\t * Checks whether an agents-module sub-feature token (listed in\n\t * `N8N_AGENTS_MODULES` on the backend) is enabled. Returns `false`\n\t * unless the top-level `agents` module is active AND the token is\n\t * present in the module settings' `modules` array.\n\t *\n\t * Known tokens: see `AGENTS_MODULE_NAMES` in `agents.config.ts`.\n\t */\n\tconst isAgentModuleActive = (name: string): boolean => {\n\t\treturn (\n\t\t\tisModuleActive('agents') && moduleSettings.value.agents?.modules?.includes(name) === true\n\t\t);\n\t};\n\n\tconst isAiCreditsEnabled = computed(\n\t\t() => settings.value.aiCredits?.enabled && settings.value.aiCredits?.setup,\n\t);\n\n\tconst aiCreditsQuota = computed(() => settings.value.aiCredits?.credits);\n\n\tconst isAiDataSharingEnabled = computed(\n\t\t() => settings.value.ai?.allowSendingParameterValues ?? true,\n\t);\n\n\tconst isAiGatewayEnabled = computed(() => settings.value.aiGateway?.enabled ?? false);\n\n\tconst isAiGatewayCloudUbbEnabled = computed(\n\t\t() => settings.value.aiGateway?.cloudUbbEnabled ?? false,\n\t);\n\n\tconst aiGatewayBudget = computed(() => settings.value.aiGateway?.budget ?? 0);\n\n\tconst isSmtpSetup = computed(() => userManagement.value.smtpSetup);\n\n\tconst isPersonalizationSurveyEnabled = computed(\n\t\t() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled,\n\t);\n\n\tconst telemetry = computed(() => settings.value.telemetry);\n\n\tconst logLevel = computed(() => settings.value.logLevel);\n\n\tconst isTelemetryEnabled = computed(() => settings.value.telemetry?.enabled);\n\n\tconst isMFAEnforcementLicensed = computed(() => {\n\t\treturn settings.value.enterprise?.mfaEnforcement ?? false;\n\t});\n\n\tconst isMfaFeatureEnabled = computed(() => mfa.value.enabled);\n\n\tconst isFoldersFeatureEnabled = computed(() => folders.value.enabled);\n\n\tconst isDataTableFeatureEnabled = computed(() => isModuleActive('data-table'));\n\n\tconst isChatFeatureEnabled = computed(\n\t\t() => isModuleActive('chat-hub') && moduleSettings.value['chat-hub']?.enabled === true,\n\t);\n\n\tconst isOtelCustomSpanAttributesEnabled = computed(() => {\n\t\tconst isOtelCustomSpanAttributesLicensed =\n\t\t\tsettings.value.enterprise?.otelCustomSpanAttributes ?? false;\n\t\tconst isOtelModuleActive =\n\t\t\tisModuleActive('otel') && moduleSettings.value.otel?.enabled === true;\n\n\t\treturn isOtelCustomSpanAttributesLicensed && isOtelModuleActive;\n\t});\n\n\t// Opt-in flag controlled by the backend's N8N_AGENTS_AI_SANDBOX_ENABLED setting.\n\tconst isAgentsKnowledgeBaseFeatureEnabled = computed(\n\t\t() => isModuleActive('agents') && moduleSettings.value.agents?.knowledgeBaseEnabled === true,\n\t);\n\n\tconst isPublicChatTriggerDisabled = computed(\n\t\t() => settings.value.chatTrigger?.disablePublicChat ?? false,\n\t);\n\n\tconst isCustomRolesFeatureEnabled = computed(\n\t\t() => settings.value.enterprise?.customRoles ?? false,\n\t);\n\n\tconst areTagsEnabled = computed(() =>\n\t\tsettings.value.workflowTagsDisabled !== undefined ? !settings.value.workflowTagsDisabled : true,\n\t);\n\n\tconst isAutosaveEnabled = computed(() =>\n\t\tsettings.value.workflowsAutosaveDisabled !== undefined\n\t\t\t? !settings.value.workflowsAutosaveDisabled\n\t\t\t: true,\n\t);\n\n\tconst isHiringBannerEnabled = computed(() => settings.value.hiringBannerEnabled);\n\n\tconst isTemplatesEnabled = computed(() => Boolean(settings.value.templates?.enabled));\n\n\tconst isTemplatesEndpointReachable = computed(() => templatesEndpointHealthy.value);\n\n\tconst templatesHost = computed(() => settings.value.templates?.host ?? '');\n\n\tconst pushBackend = computed(() => settings.value.pushBackend);\n\n\tconst isCommunityNodesFeatureEnabled = computed(() => settings.value.communityNodesEnabled);\n\n\tconst isUnverifiedPackagesEnabled = computed(\n\t\t() => settings.value.unverifiedCommunityNodesEnabled,\n\t);\n\n\tconst allowedModules = computed(() => settings.value.allowedModules);\n\n\tconst isQueueModeEnabled = computed(() => settings.value.executionMode === 'queue');\n\tconst isMultiMain = computed(() => settings.value.isMultiMain);\n\n\tconst isWorkerViewAvailable = computed(() => !!settings.value.enterprise?.workerView);\n\n\tconst workflowCallerPolicyDefaultOption = computed(\n\t\t() => settings.value.workflowCallerPolicyDefaultOption,\n\t);\n\n\tconst isNodeTypeExcluded = (nodeType: string) => {\n\t\tconst excludeNodes = settings.value.excludeNodes;\n\t\treturn Array.isArray(excludeNodes) && excludeNodes.includes(nodeType);\n\t};\n\n\tconst isExecuteWorkflowNodeExcluded = computed(() =>\n\t\tisNodeTypeExcluded(EXECUTE_WORKFLOW_NODE_TYPE),\n\t);\n\n\tconst isSubworkflowConversionDisabled = computed(\n\t\t() =>\n\t\t\tisExecuteWorkflowNodeExcluded.value || isNodeTypeExcluded(EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE),\n\t);\n\n\tconst permanentlyDismissedBanners = computed(() => settings.value.banners?.dismissed ?? []);\n\n\tconst isCommunityPlan = computed(() => planName.value.toLowerCase() === 'community');\n\n\tconst isDevRelease = computed(() => settings.value.releaseChannel === 'dev');\n\n\tconst endpointHealth = computed(() => settings.value.endpointHealth);\n\n\tconst isWorkflowPublicationServiceEnabled = computed(\n\t\t() => settings.value.useWorkflowPublicationService ?? false,\n\t);\n\n\tconst setSettings = (newSettings: FrontendSettings) => {\n\t\tsettings.value = newSettings;\n\n\t\tuserManagement.value = newSettings.userManagement;\n\t\tif (userManagement.value) {\n\t\t\tuserManagement.value.showSetupOnFirstLoad =\n\t\t\t\t!!settings.value.userManagement.showSetupOnFirstLoad;\n\t\t}\n\n\t\tif (settings.value.publicApi) {\n\t\t\tapi.value = settings.value.publicApi;\n\t\t}\n\n\t\tmfa.value.enabled = settings.value.mfa?.enabled;\n\t\tfolders.value.enabled = settings.value.folders?.enabled;\n\n\t\tif (settings.value.versionCli) {\n\t\t\tuseRootStore().setVersionCli(settings.value.versionCli);\n\t\t}\n\n\t\tif (settings.value.authCookie.secure) {\n\t\t\tconst { browser } = Bowser.parse(navigator.userAgent);\n\t\t\tif (\n\t\t\t\tlocation.protocol === 'http:' &&\n\t\t\t\t(!['localhost', '127.0.0.1'].includes(location.hostname) || browser.name === 'Safari')\n\t\t\t) {\n\t\t\t\tdocument.write(buildInsecureConnectionWarning());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst setAllowedModules = (allowedModules: FrontendSettings['allowedModules']) => {\n\t\tsettings.value.allowedModules = allowedModules;\n\t};\n\n\tconst setWorkflowReviewsPolicy = (policy: WorkflowReviewsPolicy) => {\n\t\tsettings.value.workflowReviews = policy;\n\t};\n\n\tconst setSaveDataErrorExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataErrorExecution.value = newValue;\n\t};\n\n\tconst setSaveDataSuccessExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataSuccessExecution.value = newValue;\n\t};\n\n\tconst setSaveManualExecutions = (newValue: boolean) => {\n\t\tsaveManualExecutions.value = newValue;\n\t};\n\n\tconst setSaveDataProgressExecution = (newValue: boolean) => {\n\t\tsaveDataProgressExecution.value = newValue;\n\t};\n\n\tconst getSettings = async () => {\n\t\tconst rootStore = useRootStore();\n\t\tconst fetchedSettings = await settingsApi.getSettings(rootStore.restApiContext);\n\n\t\tsetSettings(fetchedSettings);\n\t\trootStore.setDefaultLocale(fetchedSettings.defaultLocale);\n\n\t\t// Set MFA enforced state even for public settings mode\n\t\t// as it is needed to determine if the MFA setup page should be shown\n\t\tisMFAEnforced.value = settings.value.mfa?.enforced ?? false;\n\n\t\tif (fetchedSettings.settingsMode === 'public') {\n\t\t\t// public settings mode is typically used for unauthenticated users\n\t\t\t// when public settings are returned we can skip the rest of the setup\n\t\t\t// that need the full set of authenticated settings\n\t\t\treturn;\n\t\t}\n\n\t\tsettings.value.communityNodesEnabled = fetchedSettings.communityNodesEnabled;\n\t\tsettings.value.unverifiedCommunityNodesEnabled =\n\t\t\tfetchedSettings.unverifiedCommunityNodesEnabled;\n\t\tsetAllowedModules(fetchedSettings.allowedModules);\n\t\tsetSaveDataErrorExecution(fetchedSettings.saveDataErrorExecution);\n\t\tsetSaveDataSuccessExecution(fetchedSettings.saveDataSuccessExecution);\n\t\tsetSaveDataProgressExecution(fetchedSettings.saveExecutionProgress);\n\t\tsetSaveManualExecutions(fetchedSettings.saveManualExecutions);\n\n\t\trootStore.setUrlBaseWebhook(fetchedSettings.urlBaseWebhook);\n\t\trootStore.setUrlBaseEditor(fetchedSettings.urlBaseEditor);\n\t\trootStore.setUrlBaseWebhookTest(fetchedSettings.urlBaseWebhookTest);\n\t\trootStore.setEndpointForm(fetchedSettings.endpointForm);\n\t\trootStore.setEndpointFormTest(fetchedSettings.endpointFormTest);\n\t\trootStore.setEndpointFormWaiting(fetchedSettings.endpointFormWaiting);\n\t\trootStore.setEndpointWebhook(fetchedSettings.endpointWebhook);\n\t\trootStore.setEndpointWebhookTest(fetchedSettings.endpointWebhookTest);\n\t\trootStore.setEndpointWebhookWaiting(fetchedSettings.endpointWebhookWaiting);\n\t\trootStore.setEndpointMcp(fetchedSettings.endpointMcp);\n\t\trootStore.setEndpointMcpTest(fetchedSettings.endpointMcpTest);\n\t\trootStore.setTimezone(fetchedSettings.timezone);\n\t\trootStore.setExecutionTimeout(fetchedSettings.executionTimeout);\n\t\trootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);\n\t\trootStore.setPublicApiPath(\n\t\t\t`${fetchedSettings.publicApi.path}/v${fetchedSettings.publicApi.latestVersion}`,\n\t\t);\n\t\trootStore.setInstanceId(fetchedSettings.instanceId);\n\t\trootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);\n\t\trootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});\n\t\trootStore.setBinaryDataMode(fetchedSettings.binaryDataMode);\n\n\t\tif (fetchedSettings.telemetry.enabled) {\n\t\t\tvoid eventsApi.sessionStarted(rootStore.restApiContext);\n\t\t}\n\t};\n\n\tconst initialize = async () => {\n\t\tif (initialized.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait getSettings();\n\n\t\tinitialized.value = true;\n\t};\n\n\tconst stopShowingSetupPage = () => {\n\t\tuserManagement.value.showSetupOnFirstLoad = false;\n\t};\n\n\tconst disableTemplates = () => {\n\t\tsettings.value = {\n\t\t\t...settings.value,\n\t\t\ttemplates: {\n\t\t\t\t...settings.value.templates,\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t};\n\t};\n\n\tconst testTemplatesEndpoint = async () => {\n\t\tconst timeout = new Promise((_, reject) =>\n\t\t\tsetTimeout(() => reject(new Error('Templates health check timed out')), 2000),\n\t\t);\n\t\tawait Promise.race([testHealthEndpoint(templatesHost.value), timeout]);\n\t\ttemplatesEndpointHealthy.value = true;\n\t};\n\n\tconst getTimezones = async (): Promise<IDataObject> => {\n\t\tconst rootStore = useRootStore();\n\t\treturn await makeRestApiRequest(rootStore.restApiContext, 'GET', '/options/timezones');\n\t};\n\n\tconst reset = () => {\n\t\tsettings.value = {} as FrontendSettings;\n\t};\n\n\tconst getModuleSettings = async () => {\n\t\tconst fetched = await moduleSettingsApi.getModuleSettings(useRootStore().restApiContext);\n\t\tmoduleSettings.value = fetched;\n\t};\n\n\tconst updateAiDataSharingSettings = async (allowSendingParameterValues: boolean) => {\n\t\tconst rootStore = useRootStore();\n\t\tawait aiUsageApi.updateAiUsageSettings(rootStore.restApiContext, {\n\t\t\tallowSendingParameterValues,\n\t\t});\n\t\tif (settings.value.ai) {\n\t\t\tsettings.value.ai.allowSendingParameterValues = allowSendingParameterValues;\n\t\t}\n\t};\n\n\treturn {\n\t\tsettings,\n\t\tuserManagement,\n\t\ttemplatesEndpointHealthy,\n\t\tapi,\n\t\tmfa,\n\t\tisDocker,\n\t\tisDevRelease,\n\t\tendpointHealth,\n\t\tisEnterpriseFeatureEnabled,\n\t\tdatabaseType,\n\t\tplanName,\n\t\tconsumerId,\n\t\tbinaryDataMode,\n\t\tpruning,\n\t\tsecurity,\n\t\tnodeJsVersion,\n\t\tnodeEnv,\n\t\tconcurrency,\n\t\tisConcurrencyEnabled,\n\t\tisPublicApiEnabled,\n\t\tisSwaggerUIEnabled,\n\t\tisPreviewMode,\n\t\tisE2ETestMode,\n\t\tisCanvasOnly,\n\t\tisCrdtCollaborationEnabled,\n\t\tpublicApiLatestVersion,\n\t\tpublicApiPath,\n\t\tshowSetupPage,\n\t\tdeploymentType,\n\t\tisCloudDeployment,\n\t\tisSmtpSetup,\n\t\tisPersonalizationSurveyEnabled,\n\t\ttelemetry,\n\t\tlogLevel,\n\t\tisTelemetryEnabled,\n\t\tisMfaFeatureEnabled,\n\t\tisFoldersFeatureEnabled,\n\t\tisAiAssistantEnabled,\n\t\tisCustomRolesFeatureEnabled,\n\t\tareTagsEnabled,\n\t\tisAutosaveEnabled,\n\t\tisHiringBannerEnabled,\n\t\tisTemplatesEnabled,\n\t\tisTemplatesEndpointReachable,\n\t\ttemplatesHost,\n\t\tpushBackend,\n\t\tisCommunityNodesFeatureEnabled,\n\t\tisUnverifiedPackagesEnabled,\n\t\tallowedModules,\n\t\tisQueueModeEnabled,\n\t\tisMultiMain,\n\t\tisWorkerViewAvailable,\n\t\tworkflowCallerPolicyDefaultOption,\n\t\tisExecuteWorkflowNodeExcluded,\n\t\tisSubworkflowConversionDisabled,\n\t\tpermanentlyDismissedBanners,\n\t\tsaveDataErrorExecution,\n\t\tsaveDataSuccessExecution,\n\t\tsaveManualExecutions,\n\t\tsaveDataProgressExecution,\n\t\tisCommunityPlan,\n\t\tisAskAiEnabled,\n\t\tisAiBuilderEnabled,\n\t\tisAiAssistantOrBuilderEnabled,\n\t\tisAiCreditsEnabled,\n\t\taiCreditsQuota,\n\t\tisAiDataSharingEnabled,\n\t\tisAiGatewayEnabled,\n\t\tisAiGatewayCloudUbbEnabled,\n\t\taiGatewayBudget,\n\t\treset,\n\t\tgetTimezones,\n\t\ttestTemplatesEndpoint,\n\t\tdisableTemplates,\n\t\tstopShowingSetupPage,\n\t\tgetSettings,\n\t\tsetSettings,\n\t\tsetWorkflowReviewsPolicy,\n\t\tinitialize,\n\t\tgetModuleSettings,\n\t\tmoduleSettings,\n\t\tupdateAiDataSharingSettings,\n\t\tisMFAEnforcementLicensed,\n\t\tisMFAEnforced,\n\t\tactiveModules,\n\t\tisModuleActive,\n\t\tisAgentModuleActive,\n\t\tisDataTableFeatureEnabled,\n\t\tisChatFeatureEnabled,\n\t\tisOtelCustomSpanAttributesEnabled,\n\t\tisAgentsKnowledgeBaseFeatureEnabled,\n\t\tisPublicChatTriggerDisabled,\n\t\tisWorkflowPublicationServiceEnabled,\n\t};\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,uCAAuC;;;MAGvCA,gBAAK,SAAS,+CAA+C,CAAC;;;GAGjEA,gBAAK,SAAS,kDAAkD,CAAC;;QAE5DA,gBAAK,SAAS,oDAAoD,CAAC;QACnEA,gBAAK,SAAS,2DAA2D,EAAE,aAAa,EAAE,cAAc,yBAAyB,EAAE,CAAC,CAAC;QACrIA,gBAAK,SAAS,qEAAqE,EAAE,aAAa,EAAE,QAAQ,qBAAqB,EAAE,CAAC,CAAC;;;;AAK7I,MAAa,0CAA+BC,yBAAO,gBAAgB;CAClE,MAAM,2BAAkB,MAAM;CAC9B,MAAM,wBAAiC,EAAE,CAAqB;CAC9D,MAAM,8BAA6C,EAAE,CAAC;CACtD,MAAM,8BAA8C;EACnD,OAAO;EACP,sBAAsB;EACtB,WAAW;EACX,sBAAsBC,qCAAqB;EAC3C,mBAAmB;EACnB,CAAC;CACF,MAAM,wCAA+B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A;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
|
package/dist/settings2.store.mjs
CHANGED
|
@@ -11,6 +11,7 @@ import * as moduleSettingsApi from "@n8n/rest-api-client/api/module-settings";
|
|
|
11
11
|
import * as settingsApi from "@n8n/rest-api-client/api/settings";
|
|
12
12
|
import { testHealthEndpoint } from "@n8n/rest-api-client/api/templates";
|
|
13
13
|
import Bowser from "bowser";
|
|
14
|
+
import { EXECUTE_WORKFLOW_NODE_TYPE, EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE } from "n8n-workflow";
|
|
14
15
|
|
|
15
16
|
//#region src/settings.store.ts
|
|
16
17
|
/**
|
|
@@ -143,6 +144,12 @@ const useSettingsStore = defineStore(STORES.SETTINGS, () => {
|
|
|
143
144
|
const isMultiMain = computed(() => settings.value.isMultiMain);
|
|
144
145
|
const isWorkerViewAvailable = computed(() => !!settings.value.enterprise?.workerView);
|
|
145
146
|
const workflowCallerPolicyDefaultOption = computed(() => settings.value.workflowCallerPolicyDefaultOption);
|
|
147
|
+
const isNodeTypeExcluded = (nodeType) => {
|
|
148
|
+
const excludeNodes = settings.value.excludeNodes;
|
|
149
|
+
return Array.isArray(excludeNodes) && excludeNodes.includes(nodeType);
|
|
150
|
+
};
|
|
151
|
+
const isExecuteWorkflowNodeExcluded = computed(() => isNodeTypeExcluded(EXECUTE_WORKFLOW_NODE_TYPE));
|
|
152
|
+
const isSubworkflowConversionDisabled = computed(() => isExecuteWorkflowNodeExcluded.value || isNodeTypeExcluded(EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE));
|
|
146
153
|
const permanentlyDismissedBanners = computed(() => settings.value.banners?.dismissed ?? []);
|
|
147
154
|
const isCommunityPlan = computed(() => planName.value.toLowerCase() === "community");
|
|
148
155
|
const isDevRelease = computed(() => settings.value.releaseChannel === "dev");
|
|
@@ -307,6 +314,8 @@ const useSettingsStore = defineStore(STORES.SETTINGS, () => {
|
|
|
307
314
|
isMultiMain,
|
|
308
315
|
isWorkerViewAvailable,
|
|
309
316
|
workflowCallerPolicyDefaultOption,
|
|
317
|
+
isExecuteWorkflowNodeExcluded,
|
|
318
|
+
isSubworkflowConversionDisabled,
|
|
310
319
|
permanentlyDismissedBanners,
|
|
311
320
|
saveDataErrorExecution,
|
|
312
321
|
saveDataSuccessExecution,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings2.store.mjs","names":["allowedModules"],"sources":["../src/settings.store.ts"],"sourcesContent":["import {\n\tAuthenticationMethod,\n\ttype IUserManagementSettings,\n\ttype FrontendSettings,\n\ttype FrontendModuleSettings,\n\ttype WorkflowReviewsPolicy,\n} from '@n8n/api-types';\nimport { i18n } from '@n8n/i18n';\nimport { makeRestApiRequest } from '@n8n/rest-api-client';\nimport * as aiUsageApi from '@n8n/rest-api-client/api/ai-usage';\nimport * as eventsApi from '@n8n/rest-api-client/api/events';\nimport * as moduleSettingsApi from '@n8n/rest-api-client/api/module-settings';\nimport * as settingsApi from '@n8n/rest-api-client/api/settings';\nimport { testHealthEndpoint } from '@n8n/rest-api-client/api/templates';\nimport Bowser from 'bowser';\nimport type { IDataObject, WorkflowSettings } from 'n8n-workflow';\nimport { defineStore } from 'pinia';\nimport { computed, ref } from 'vue';\n\nimport { STORES } from './constants';\nimport { useRootStore } from './useRootStore';\n\n/**\n * Full-page warning rendered when the instance requires a secure cookie but the\n * page is served over an insecure origin (or via Safari, which drops the cookie).\n * The copy is localized; the structural markup and inline styles stay in code\n * because this is written via `document.write` before the Vue app mounts.\n */\nconst buildInsecureConnectionWarning = () => `\n<body style=\"margin-top: 20px; font-family: 'Open Sans', sans-serif; text-align: center;\">\n<h1 style=\"font-size: 40px\">🚫</h1>\n<h2>${i18n.baseText('settings.authCookie.insecureConnection.title')}</h2>\n<br/>\n<div style=\"font-size: 18px; max-width: 640px; text-align: left; margin: 10px auto\">\n\t${i18n.baseText('settings.authCookie.insecureConnection.fixIntro')}\n\t<ul>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.tls')}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.localhost', { interpolate: { localhostUrl: 'http://localhost:5678' } })}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.disableSecureCookie', { interpolate: { envVar: 'N8N_SECURE_COOKIE' } })}</li>\n\t</ul>\n</div>\n</body>`;\n\nexport const useSettingsStore = defineStore(STORES.SETTINGS, () => {\n\tconst initialized = ref(false);\n\tconst settings = ref<FrontendSettings>({} as FrontendSettings);\n\tconst moduleSettings = ref<FrontendModuleSettings>({});\n\tconst userManagement = ref<IUserManagementSettings>({\n\t\tquota: -1,\n\t\tshowSetupOnFirstLoad: false,\n\t\tsmtpSetup: false,\n\t\tauthenticationMethod: AuthenticationMethod.Email,\n\t\tpasswordMinLength: 8,\n\t});\n\tconst templatesEndpointHealthy = ref(false);\n\tconst api = ref({\n\t\tenabled: false,\n\t\tlatestVersion: 0,\n\t\tpath: '/',\n\t\tswaggerUi: {\n\t\t\tenabled: false,\n\t\t},\n\t});\n\tconst mfa = ref({ enabled: false });\n\tconst folders = ref({ enabled: false });\n\n\tconst saveDataErrorExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveDataSuccessExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveManualExecutions = ref(false);\n\tconst saveDataProgressExecution = ref(false);\n\tconst isMFAEnforced = ref(false);\n\n\tconst isDocker = computed(() => settings.value?.isDocker ?? false);\n\n\tconst databaseType = computed(() => settings.value?.databaseType);\n\n\tconst planName = computed(() => settings.value?.license?.planName ?? 'Community');\n\n\tconst consumerId = computed(() => settings.value?.license?.consumerId);\n\n\tconst binaryDataMode = computed(() => settings.value?.binaryDataMode);\n\n\tconst pruning = computed(() => settings.value?.pruning);\n\n\tconst security = computed(() => ({\n\t\tblockFileAccessToN8nFiles: settings.value?.security?.blockFileAccessToN8nFiles,\n\t\tsecureCookie: settings.value?.authCookie?.secure,\n\t}));\n\n\tconst isEnterpriseFeatureEnabled = computed(() => settings.value.enterprise ?? {});\n\n\tconst nodeJsVersion = computed(() => settings.value.nodeJsVersion);\n\n\tconst nodeEnv = computed(() => settings.value.nodeEnv);\n\n\tconst concurrency = computed(() => settings.value.concurrency);\n\n\tconst isConcurrencyEnabled = computed(() => concurrency.value !== -1);\n\n\tconst isPublicApiEnabled = computed(() => api.value.enabled);\n\n\tconst isSwaggerUIEnabled = computed(() => api.value.swaggerUi?.enabled ?? false);\n\n\tconst isPreviewMode = computed(() => settings.value.previewMode);\n\n\tconst isE2ETestMode = computed(() => settings.value.inE2ETests);\n\n\tconst isCanvasOnly = computed(() => settings.value.canvasOnly);\n\n\tconst isCrdtCollaborationEnabled = computed(\n\t\t() => (settings.value.collaboration?.crdt ?? 'off') !== 'off',\n\t);\n\n\tconst publicApiLatestVersion = computed(() => api.value.latestVersion);\n\n\tconst publicApiPath = computed(() => api.value.path);\n\n\tconst isAiAssistantEnabled = computed(\n\t\t() => settings.value.aiAssistant?.enabled && settings.value.aiAssistant?.setup,\n\t);\n\n\tconst isAskAiEnabled = computed(() => settings.value.askAi?.enabled);\n\n\tconst isAiBuilderEnabled = computed(\n\t\t() => settings.value.aiBuilder?.enabled && settings.value.aiBuilder?.setup,\n\t);\n\n\tconst isAiAssistantOrBuilderEnabled = computed(\n\t\t() => isAiAssistantEnabled.value || isAiBuilderEnabled.value,\n\t);\n\n\tconst showSetupPage = computed(() => userManagement.value.showSetupOnFirstLoad);\n\n\tconst deploymentType = computed(() => settings.value.deployment?.type || 'default');\n\n\tconst isCloudDeployment = computed(() => settings.value.deployment?.type === 'cloud');\n\n\tconst activeModules = computed(() => settings.value.activeModules);\n\n\tconst isModuleActive = (moduleName: string) => {\n\t\treturn activeModules.value?.includes(moduleName);\n\t};\n\n\t/**\n\t * Checks whether an agents-module sub-feature token (listed in\n\t * `N8N_AGENTS_MODULES` on the backend) is enabled. Returns `false`\n\t * unless the top-level `agents` module is active AND the token is\n\t * present in the module settings' `modules` array.\n\t *\n\t * Known tokens: see `AGENTS_MODULE_NAMES` in `agents.config.ts`.\n\t */\n\tconst isAgentModuleActive = (name: string): boolean => {\n\t\treturn (\n\t\t\tisModuleActive('agents') && moduleSettings.value.agents?.modules?.includes(name) === true\n\t\t);\n\t};\n\n\tconst isAiCreditsEnabled = computed(\n\t\t() => settings.value.aiCredits?.enabled && settings.value.aiCredits?.setup,\n\t);\n\n\tconst aiCreditsQuota = computed(() => settings.value.aiCredits?.credits);\n\n\tconst isAiDataSharingEnabled = computed(\n\t\t() => settings.value.ai?.allowSendingParameterValues ?? true,\n\t);\n\n\tconst isAiGatewayEnabled = computed(() => settings.value.aiGateway?.enabled ?? false);\n\n\tconst isAiGatewayCloudUbbEnabled = computed(\n\t\t() => settings.value.aiGateway?.cloudUbbEnabled ?? false,\n\t);\n\n\tconst aiGatewayBudget = computed(() => settings.value.aiGateway?.budget ?? 0);\n\n\tconst isSmtpSetup = computed(() => userManagement.value.smtpSetup);\n\n\tconst isPersonalizationSurveyEnabled = computed(\n\t\t() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled,\n\t);\n\n\tconst telemetry = computed(() => settings.value.telemetry);\n\n\tconst logLevel = computed(() => settings.value.logLevel);\n\n\tconst isTelemetryEnabled = computed(() => settings.value.telemetry?.enabled);\n\n\tconst isMFAEnforcementLicensed = computed(() => {\n\t\treturn settings.value.enterprise?.mfaEnforcement ?? false;\n\t});\n\n\tconst isMfaFeatureEnabled = computed(() => mfa.value.enabled);\n\n\tconst isFoldersFeatureEnabled = computed(() => folders.value.enabled);\n\n\tconst isDataTableFeatureEnabled = computed(() => isModuleActive('data-table'));\n\n\tconst isChatFeatureEnabled = computed(\n\t\t() => isModuleActive('chat-hub') && moduleSettings.value['chat-hub']?.enabled === true,\n\t);\n\n\tconst isOtelCustomSpanAttributesEnabled = computed(() => {\n\t\tconst isOtelCustomSpanAttributesLicensed =\n\t\t\tsettings.value.enterprise?.otelCustomSpanAttributes ?? false;\n\t\tconst isOtelModuleActive =\n\t\t\tisModuleActive('otel') && moduleSettings.value.otel?.enabled === true;\n\n\t\treturn isOtelCustomSpanAttributesLicensed && isOtelModuleActive;\n\t});\n\n\t// Opt-in flag controlled by the backend's N8N_AGENTS_AI_SANDBOX_ENABLED setting.\n\tconst isAgentsKnowledgeBaseFeatureEnabled = computed(\n\t\t() => isModuleActive('agents') && moduleSettings.value.agents?.knowledgeBaseEnabled === true,\n\t);\n\n\tconst isPublicChatTriggerDisabled = computed(\n\t\t() => settings.value.chatTrigger?.disablePublicChat ?? false,\n\t);\n\n\tconst isCustomRolesFeatureEnabled = computed(\n\t\t() => settings.value.enterprise?.customRoles ?? false,\n\t);\n\n\tconst areTagsEnabled = computed(() =>\n\t\tsettings.value.workflowTagsDisabled !== undefined ? !settings.value.workflowTagsDisabled : true,\n\t);\n\n\tconst isAutosaveEnabled = computed(() =>\n\t\tsettings.value.workflowsAutosaveDisabled !== undefined\n\t\t\t? !settings.value.workflowsAutosaveDisabled\n\t\t\t: true,\n\t);\n\n\tconst isHiringBannerEnabled = computed(() => settings.value.hiringBannerEnabled);\n\n\tconst isTemplatesEnabled = computed(() => Boolean(settings.value.templates?.enabled));\n\n\tconst isTemplatesEndpointReachable = computed(() => templatesEndpointHealthy.value);\n\n\tconst templatesHost = computed(() => settings.value.templates?.host ?? '');\n\n\tconst pushBackend = computed(() => settings.value.pushBackend);\n\n\tconst isCommunityNodesFeatureEnabled = computed(() => settings.value.communityNodesEnabled);\n\n\tconst isUnverifiedPackagesEnabled = computed(\n\t\t() => settings.value.unverifiedCommunityNodesEnabled,\n\t);\n\n\tconst allowedModules = computed(() => settings.value.allowedModules);\n\n\tconst isQueueModeEnabled = computed(() => settings.value.executionMode === 'queue');\n\tconst isMultiMain = computed(() => settings.value.isMultiMain);\n\n\tconst isWorkerViewAvailable = computed(() => !!settings.value.enterprise?.workerView);\n\n\tconst workflowCallerPolicyDefaultOption = computed(\n\t\t() => settings.value.workflowCallerPolicyDefaultOption,\n\t);\n\n\tconst permanentlyDismissedBanners = computed(() => settings.value.banners?.dismissed ?? []);\n\n\tconst isCommunityPlan = computed(() => planName.value.toLowerCase() === 'community');\n\n\tconst isDevRelease = computed(() => settings.value.releaseChannel === 'dev');\n\n\tconst endpointHealth = computed(() => settings.value.endpointHealth);\n\n\tconst isWorkflowPublicationServiceEnabled = computed(\n\t\t() => settings.value.useWorkflowPublicationService ?? false,\n\t);\n\n\tconst setSettings = (newSettings: FrontendSettings) => {\n\t\tsettings.value = newSettings;\n\n\t\tuserManagement.value = newSettings.userManagement;\n\t\tif (userManagement.value) {\n\t\t\tuserManagement.value.showSetupOnFirstLoad =\n\t\t\t\t!!settings.value.userManagement.showSetupOnFirstLoad;\n\t\t}\n\n\t\tif (settings.value.publicApi) {\n\t\t\tapi.value = settings.value.publicApi;\n\t\t}\n\n\t\tmfa.value.enabled = settings.value.mfa?.enabled;\n\t\tfolders.value.enabled = settings.value.folders?.enabled;\n\n\t\tif (settings.value.versionCli) {\n\t\t\tuseRootStore().setVersionCli(settings.value.versionCli);\n\t\t}\n\n\t\tif (settings.value.authCookie.secure) {\n\t\t\tconst { browser } = Bowser.parse(navigator.userAgent);\n\t\t\tif (\n\t\t\t\tlocation.protocol === 'http:' &&\n\t\t\t\t(!['localhost', '127.0.0.1'].includes(location.hostname) || browser.name === 'Safari')\n\t\t\t) {\n\t\t\t\tdocument.write(buildInsecureConnectionWarning());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst setAllowedModules = (allowedModules: FrontendSettings['allowedModules']) => {\n\t\tsettings.value.allowedModules = allowedModules;\n\t};\n\n\tconst setWorkflowReviewsPolicy = (policy: WorkflowReviewsPolicy) => {\n\t\tsettings.value.workflowReviews = policy;\n\t};\n\n\tconst setSaveDataErrorExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataErrorExecution.value = newValue;\n\t};\n\n\tconst setSaveDataSuccessExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataSuccessExecution.value = newValue;\n\t};\n\n\tconst setSaveManualExecutions = (newValue: boolean) => {\n\t\tsaveManualExecutions.value = newValue;\n\t};\n\n\tconst setSaveDataProgressExecution = (newValue: boolean) => {\n\t\tsaveDataProgressExecution.value = newValue;\n\t};\n\n\tconst getSettings = async () => {\n\t\tconst rootStore = useRootStore();\n\t\tconst fetchedSettings = await settingsApi.getSettings(rootStore.restApiContext);\n\n\t\tsetSettings(fetchedSettings);\n\t\trootStore.setDefaultLocale(fetchedSettings.defaultLocale);\n\n\t\t// Set MFA enforced state even for public settings mode\n\t\t// as it is needed to determine if the MFA setup page should be shown\n\t\tisMFAEnforced.value = settings.value.mfa?.enforced ?? false;\n\n\t\tif (fetchedSettings.settingsMode === 'public') {\n\t\t\t// public settings mode is typically used for unauthenticated users\n\t\t\t// when public settings are returned we can skip the rest of the setup\n\t\t\t// that need the full set of authenticated settings\n\t\t\treturn;\n\t\t}\n\n\t\tsettings.value.communityNodesEnabled = fetchedSettings.communityNodesEnabled;\n\t\tsettings.value.unverifiedCommunityNodesEnabled =\n\t\t\tfetchedSettings.unverifiedCommunityNodesEnabled;\n\t\tsetAllowedModules(fetchedSettings.allowedModules);\n\t\tsetSaveDataErrorExecution(fetchedSettings.saveDataErrorExecution);\n\t\tsetSaveDataSuccessExecution(fetchedSettings.saveDataSuccessExecution);\n\t\tsetSaveDataProgressExecution(fetchedSettings.saveExecutionProgress);\n\t\tsetSaveManualExecutions(fetchedSettings.saveManualExecutions);\n\n\t\trootStore.setUrlBaseWebhook(fetchedSettings.urlBaseWebhook);\n\t\trootStore.setUrlBaseEditor(fetchedSettings.urlBaseEditor);\n\t\trootStore.setUrlBaseWebhookTest(fetchedSettings.urlBaseWebhookTest);\n\t\trootStore.setEndpointForm(fetchedSettings.endpointForm);\n\t\trootStore.setEndpointFormTest(fetchedSettings.endpointFormTest);\n\t\trootStore.setEndpointFormWaiting(fetchedSettings.endpointFormWaiting);\n\t\trootStore.setEndpointWebhook(fetchedSettings.endpointWebhook);\n\t\trootStore.setEndpointWebhookTest(fetchedSettings.endpointWebhookTest);\n\t\trootStore.setEndpointWebhookWaiting(fetchedSettings.endpointWebhookWaiting);\n\t\trootStore.setEndpointMcp(fetchedSettings.endpointMcp);\n\t\trootStore.setEndpointMcpTest(fetchedSettings.endpointMcpTest);\n\t\trootStore.setTimezone(fetchedSettings.timezone);\n\t\trootStore.setExecutionTimeout(fetchedSettings.executionTimeout);\n\t\trootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);\n\t\trootStore.setPublicApiPath(\n\t\t\t`${fetchedSettings.publicApi.path}/v${fetchedSettings.publicApi.latestVersion}`,\n\t\t);\n\t\trootStore.setInstanceId(fetchedSettings.instanceId);\n\t\trootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);\n\t\trootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});\n\t\trootStore.setBinaryDataMode(fetchedSettings.binaryDataMode);\n\n\t\tif (fetchedSettings.telemetry.enabled) {\n\t\t\tvoid eventsApi.sessionStarted(rootStore.restApiContext);\n\t\t}\n\t};\n\n\tconst initialize = async () => {\n\t\tif (initialized.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait getSettings();\n\n\t\tinitialized.value = true;\n\t};\n\n\tconst stopShowingSetupPage = () => {\n\t\tuserManagement.value.showSetupOnFirstLoad = false;\n\t};\n\n\tconst disableTemplates = () => {\n\t\tsettings.value = {\n\t\t\t...settings.value,\n\t\t\ttemplates: {\n\t\t\t\t...settings.value.templates,\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t};\n\t};\n\n\tconst testTemplatesEndpoint = async () => {\n\t\tconst timeout = new Promise((_, reject) =>\n\t\t\tsetTimeout(() => reject(new Error('Templates health check timed out')), 2000),\n\t\t);\n\t\tawait Promise.race([testHealthEndpoint(templatesHost.value), timeout]);\n\t\ttemplatesEndpointHealthy.value = true;\n\t};\n\n\tconst getTimezones = async (): Promise<IDataObject> => {\n\t\tconst rootStore = useRootStore();\n\t\treturn await makeRestApiRequest(rootStore.restApiContext, 'GET', '/options/timezones');\n\t};\n\n\tconst reset = () => {\n\t\tsettings.value = {} as FrontendSettings;\n\t};\n\n\tconst getModuleSettings = async () => {\n\t\tconst fetched = await moduleSettingsApi.getModuleSettings(useRootStore().restApiContext);\n\t\tmoduleSettings.value = fetched;\n\t};\n\n\tconst updateAiDataSharingSettings = async (allowSendingParameterValues: boolean) => {\n\t\tconst rootStore = useRootStore();\n\t\tawait aiUsageApi.updateAiUsageSettings(rootStore.restApiContext, {\n\t\t\tallowSendingParameterValues,\n\t\t});\n\t\tif (settings.value.ai) {\n\t\t\tsettings.value.ai.allowSendingParameterValues = allowSendingParameterValues;\n\t\t}\n\t};\n\n\treturn {\n\t\tsettings,\n\t\tuserManagement,\n\t\ttemplatesEndpointHealthy,\n\t\tapi,\n\t\tmfa,\n\t\tisDocker,\n\t\tisDevRelease,\n\t\tendpointHealth,\n\t\tisEnterpriseFeatureEnabled,\n\t\tdatabaseType,\n\t\tplanName,\n\t\tconsumerId,\n\t\tbinaryDataMode,\n\t\tpruning,\n\t\tsecurity,\n\t\tnodeJsVersion,\n\t\tnodeEnv,\n\t\tconcurrency,\n\t\tisConcurrencyEnabled,\n\t\tisPublicApiEnabled,\n\t\tisSwaggerUIEnabled,\n\t\tisPreviewMode,\n\t\tisE2ETestMode,\n\t\tisCanvasOnly,\n\t\tisCrdtCollaborationEnabled,\n\t\tpublicApiLatestVersion,\n\t\tpublicApiPath,\n\t\tshowSetupPage,\n\t\tdeploymentType,\n\t\tisCloudDeployment,\n\t\tisSmtpSetup,\n\t\tisPersonalizationSurveyEnabled,\n\t\ttelemetry,\n\t\tlogLevel,\n\t\tisTelemetryEnabled,\n\t\tisMfaFeatureEnabled,\n\t\tisFoldersFeatureEnabled,\n\t\tisAiAssistantEnabled,\n\t\tisCustomRolesFeatureEnabled,\n\t\tareTagsEnabled,\n\t\tisAutosaveEnabled,\n\t\tisHiringBannerEnabled,\n\t\tisTemplatesEnabled,\n\t\tisTemplatesEndpointReachable,\n\t\ttemplatesHost,\n\t\tpushBackend,\n\t\tisCommunityNodesFeatureEnabled,\n\t\tisUnverifiedPackagesEnabled,\n\t\tallowedModules,\n\t\tisQueueModeEnabled,\n\t\tisMultiMain,\n\t\tisWorkerViewAvailable,\n\t\tworkflowCallerPolicyDefaultOption,\n\t\tpermanentlyDismissedBanners,\n\t\tsaveDataErrorExecution,\n\t\tsaveDataSuccessExecution,\n\t\tsaveManualExecutions,\n\t\tsaveDataProgressExecution,\n\t\tisCommunityPlan,\n\t\tisAskAiEnabled,\n\t\tisAiBuilderEnabled,\n\t\tisAiAssistantOrBuilderEnabled,\n\t\tisAiCreditsEnabled,\n\t\taiCreditsQuota,\n\t\tisAiDataSharingEnabled,\n\t\tisAiGatewayEnabled,\n\t\tisAiGatewayCloudUbbEnabled,\n\t\taiGatewayBudget,\n\t\treset,\n\t\tgetTimezones,\n\t\ttestTemplatesEndpoint,\n\t\tdisableTemplates,\n\t\tstopShowingSetupPage,\n\t\tgetSettings,\n\t\tsetSettings,\n\t\tsetWorkflowReviewsPolicy,\n\t\tinitialize,\n\t\tgetModuleSettings,\n\t\tmoduleSettings,\n\t\tupdateAiDataSharingSettings,\n\t\tisMFAEnforcementLicensed,\n\t\tisMFAEnforced,\n\t\tactiveModules,\n\t\tisModuleActive,\n\t\tisAgentModuleActive,\n\t\tisDataTableFeatureEnabled,\n\t\tisChatFeatureEnabled,\n\t\tisOtelCustomSpanAttributesEnabled,\n\t\tisAgentsKnowledgeBaseFeatureEnabled,\n\t\tisPublicChatTriggerDisabled,\n\t\tisWorkflowPublicationServiceEnabled,\n\t};\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,uC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AO,IAAI,MAAM,mCAAmC,CAAC,EAAE,IAAK,CAC7E;AACD,QAAM,QAAQ,KAAK,CAAC,mBAAmB,cAAc,MAAM,EAAE,QAAQ,CAAC;AACtE,2BAAyB,QAAQ;;CAGlC,MAAM,eAAe,YAAkC;AAEtD,SAAO,MAAM,mBADK,cAAc,CACU,gBAAgB,OAAO,qBAAqB;;CAGvF,MAAM,cAAc;AACnB,WAAS,QAAQ,EAAE;;CAGpB,MAAM,oBAAoB,YAAY;AAErC,iBAAe,QADC,MAAM,kBAAkB,kBAAkB,cAAc,CAAC,eAAe;;CAIzF,MAAM,8BAA8B,OAAO,gCAAyC;EACnF,MAAM,YAAY,cAAc;AAChC,QAAM,WAAW,sBAAsB,UAAU,gBAAgB,EAChE,6BACA,CAAC;AACF,MAAI,SAAS,MAAM,GAClB,UAAS,MAAM,GAAG,8BAA8B;;AAIlD,QAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
|
|
1
|
+
{"version":3,"file":"settings2.store.mjs","names":["allowedModules"],"sources":["../src/settings.store.ts"],"sourcesContent":["import {\n\tAuthenticationMethod,\n\ttype IUserManagementSettings,\n\ttype FrontendSettings,\n\ttype FrontendModuleSettings,\n\ttype WorkflowReviewsPolicy,\n} from '@n8n/api-types';\nimport { i18n } from '@n8n/i18n';\nimport { makeRestApiRequest } from '@n8n/rest-api-client';\nimport * as aiUsageApi from '@n8n/rest-api-client/api/ai-usage';\nimport * as eventsApi from '@n8n/rest-api-client/api/events';\nimport * as moduleSettingsApi from '@n8n/rest-api-client/api/module-settings';\nimport * as settingsApi from '@n8n/rest-api-client/api/settings';\nimport { testHealthEndpoint } from '@n8n/rest-api-client/api/templates';\nimport Bowser from 'bowser';\nimport {\n\tEXECUTE_WORKFLOW_NODE_TYPE,\n\tEXECUTE_WORKFLOW_TRIGGER_NODE_TYPE,\n\ttype IDataObject,\n\ttype WorkflowSettings,\n} from 'n8n-workflow';\nimport { defineStore } from 'pinia';\nimport { computed, ref } from 'vue';\n\nimport { STORES } from './constants';\nimport { useRootStore } from './useRootStore';\n\n/**\n * Full-page warning rendered when the instance requires a secure cookie but the\n * page is served over an insecure origin (or via Safari, which drops the cookie).\n * The copy is localized; the structural markup and inline styles stay in code\n * because this is written via `document.write` before the Vue app mounts.\n */\nconst buildInsecureConnectionWarning = () => `\n<body style=\"margin-top: 20px; font-family: 'Open Sans', sans-serif; text-align: center;\">\n<h1 style=\"font-size: 40px\">🚫</h1>\n<h2>${i18n.baseText('settings.authCookie.insecureConnection.title')}</h2>\n<br/>\n<div style=\"font-size: 18px; max-width: 640px; text-align: left; margin: 10px auto\">\n\t${i18n.baseText('settings.authCookie.insecureConnection.fixIntro')}\n\t<ul>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.tls')}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.localhost', { interpolate: { localhostUrl: 'http://localhost:5678' } })}</li>\n\t\t<li>${i18n.baseText('settings.authCookie.insecureConnection.option.disableSecureCookie', { interpolate: { envVar: 'N8N_SECURE_COOKIE' } })}</li>\n\t</ul>\n</div>\n</body>`;\n\nexport const useSettingsStore = defineStore(STORES.SETTINGS, () => {\n\tconst initialized = ref(false);\n\tconst settings = ref<FrontendSettings>({} as FrontendSettings);\n\tconst moduleSettings = ref<FrontendModuleSettings>({});\n\tconst userManagement = ref<IUserManagementSettings>({\n\t\tquota: -1,\n\t\tshowSetupOnFirstLoad: false,\n\t\tsmtpSetup: false,\n\t\tauthenticationMethod: AuthenticationMethod.Email,\n\t\tpasswordMinLength: 8,\n\t});\n\tconst templatesEndpointHealthy = ref(false);\n\tconst api = ref({\n\t\tenabled: false,\n\t\tlatestVersion: 0,\n\t\tpath: '/',\n\t\tswaggerUi: {\n\t\t\tenabled: false,\n\t\t},\n\t});\n\tconst mfa = ref({ enabled: false });\n\tconst folders = ref({ enabled: false });\n\n\tconst saveDataErrorExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveDataSuccessExecution = ref<WorkflowSettings.SaveDataExecution>('all');\n\tconst saveManualExecutions = ref(false);\n\tconst saveDataProgressExecution = ref(false);\n\tconst isMFAEnforced = ref(false);\n\n\tconst isDocker = computed(() => settings.value?.isDocker ?? false);\n\n\tconst databaseType = computed(() => settings.value?.databaseType);\n\n\tconst planName = computed(() => settings.value?.license?.planName ?? 'Community');\n\n\tconst consumerId = computed(() => settings.value?.license?.consumerId);\n\n\tconst binaryDataMode = computed(() => settings.value?.binaryDataMode);\n\n\tconst pruning = computed(() => settings.value?.pruning);\n\n\tconst security = computed(() => ({\n\t\tblockFileAccessToN8nFiles: settings.value?.security?.blockFileAccessToN8nFiles,\n\t\tsecureCookie: settings.value?.authCookie?.secure,\n\t}));\n\n\tconst isEnterpriseFeatureEnabled = computed(() => settings.value.enterprise ?? {});\n\n\tconst nodeJsVersion = computed(() => settings.value.nodeJsVersion);\n\n\tconst nodeEnv = computed(() => settings.value.nodeEnv);\n\n\tconst concurrency = computed(() => settings.value.concurrency);\n\n\tconst isConcurrencyEnabled = computed(() => concurrency.value !== -1);\n\n\tconst isPublicApiEnabled = computed(() => api.value.enabled);\n\n\tconst isSwaggerUIEnabled = computed(() => api.value.swaggerUi?.enabled ?? false);\n\n\tconst isPreviewMode = computed(() => settings.value.previewMode);\n\n\tconst isE2ETestMode = computed(() => settings.value.inE2ETests);\n\n\tconst isCanvasOnly = computed(() => settings.value.canvasOnly);\n\n\tconst isCrdtCollaborationEnabled = computed(\n\t\t() => (settings.value.collaboration?.crdt ?? 'off') !== 'off',\n\t);\n\n\tconst publicApiLatestVersion = computed(() => api.value.latestVersion);\n\n\tconst publicApiPath = computed(() => api.value.path);\n\n\tconst isAiAssistantEnabled = computed(\n\t\t() => settings.value.aiAssistant?.enabled && settings.value.aiAssistant?.setup,\n\t);\n\n\tconst isAskAiEnabled = computed(() => settings.value.askAi?.enabled);\n\n\tconst isAiBuilderEnabled = computed(\n\t\t() => settings.value.aiBuilder?.enabled && settings.value.aiBuilder?.setup,\n\t);\n\n\tconst isAiAssistantOrBuilderEnabled = computed(\n\t\t() => isAiAssistantEnabled.value || isAiBuilderEnabled.value,\n\t);\n\n\tconst showSetupPage = computed(() => userManagement.value.showSetupOnFirstLoad);\n\n\tconst deploymentType = computed(() => settings.value.deployment?.type || 'default');\n\n\tconst isCloudDeployment = computed(() => settings.value.deployment?.type === 'cloud');\n\n\tconst activeModules = computed(() => settings.value.activeModules);\n\n\tconst isModuleActive = (moduleName: string) => {\n\t\treturn activeModules.value?.includes(moduleName);\n\t};\n\n\t/**\n\t * Checks whether an agents-module sub-feature token (listed in\n\t * `N8N_AGENTS_MODULES` on the backend) is enabled. Returns `false`\n\t * unless the top-level `agents` module is active AND the token is\n\t * present in the module settings' `modules` array.\n\t *\n\t * Known tokens: see `AGENTS_MODULE_NAMES` in `agents.config.ts`.\n\t */\n\tconst isAgentModuleActive = (name: string): boolean => {\n\t\treturn (\n\t\t\tisModuleActive('agents') && moduleSettings.value.agents?.modules?.includes(name) === true\n\t\t);\n\t};\n\n\tconst isAiCreditsEnabled = computed(\n\t\t() => settings.value.aiCredits?.enabled && settings.value.aiCredits?.setup,\n\t);\n\n\tconst aiCreditsQuota = computed(() => settings.value.aiCredits?.credits);\n\n\tconst isAiDataSharingEnabled = computed(\n\t\t() => settings.value.ai?.allowSendingParameterValues ?? true,\n\t);\n\n\tconst isAiGatewayEnabled = computed(() => settings.value.aiGateway?.enabled ?? false);\n\n\tconst isAiGatewayCloudUbbEnabled = computed(\n\t\t() => settings.value.aiGateway?.cloudUbbEnabled ?? false,\n\t);\n\n\tconst aiGatewayBudget = computed(() => settings.value.aiGateway?.budget ?? 0);\n\n\tconst isSmtpSetup = computed(() => userManagement.value.smtpSetup);\n\n\tconst isPersonalizationSurveyEnabled = computed(\n\t\t() => settings.value.telemetry?.enabled && settings.value.personalizationSurveyEnabled,\n\t);\n\n\tconst telemetry = computed(() => settings.value.telemetry);\n\n\tconst logLevel = computed(() => settings.value.logLevel);\n\n\tconst isTelemetryEnabled = computed(() => settings.value.telemetry?.enabled);\n\n\tconst isMFAEnforcementLicensed = computed(() => {\n\t\treturn settings.value.enterprise?.mfaEnforcement ?? false;\n\t});\n\n\tconst isMfaFeatureEnabled = computed(() => mfa.value.enabled);\n\n\tconst isFoldersFeatureEnabled = computed(() => folders.value.enabled);\n\n\tconst isDataTableFeatureEnabled = computed(() => isModuleActive('data-table'));\n\n\tconst isChatFeatureEnabled = computed(\n\t\t() => isModuleActive('chat-hub') && moduleSettings.value['chat-hub']?.enabled === true,\n\t);\n\n\tconst isOtelCustomSpanAttributesEnabled = computed(() => {\n\t\tconst isOtelCustomSpanAttributesLicensed =\n\t\t\tsettings.value.enterprise?.otelCustomSpanAttributes ?? false;\n\t\tconst isOtelModuleActive =\n\t\t\tisModuleActive('otel') && moduleSettings.value.otel?.enabled === true;\n\n\t\treturn isOtelCustomSpanAttributesLicensed && isOtelModuleActive;\n\t});\n\n\t// Opt-in flag controlled by the backend's N8N_AGENTS_AI_SANDBOX_ENABLED setting.\n\tconst isAgentsKnowledgeBaseFeatureEnabled = computed(\n\t\t() => isModuleActive('agents') && moduleSettings.value.agents?.knowledgeBaseEnabled === true,\n\t);\n\n\tconst isPublicChatTriggerDisabled = computed(\n\t\t() => settings.value.chatTrigger?.disablePublicChat ?? false,\n\t);\n\n\tconst isCustomRolesFeatureEnabled = computed(\n\t\t() => settings.value.enterprise?.customRoles ?? false,\n\t);\n\n\tconst areTagsEnabled = computed(() =>\n\t\tsettings.value.workflowTagsDisabled !== undefined ? !settings.value.workflowTagsDisabled : true,\n\t);\n\n\tconst isAutosaveEnabled = computed(() =>\n\t\tsettings.value.workflowsAutosaveDisabled !== undefined\n\t\t\t? !settings.value.workflowsAutosaveDisabled\n\t\t\t: true,\n\t);\n\n\tconst isHiringBannerEnabled = computed(() => settings.value.hiringBannerEnabled);\n\n\tconst isTemplatesEnabled = computed(() => Boolean(settings.value.templates?.enabled));\n\n\tconst isTemplatesEndpointReachable = computed(() => templatesEndpointHealthy.value);\n\n\tconst templatesHost = computed(() => settings.value.templates?.host ?? '');\n\n\tconst pushBackend = computed(() => settings.value.pushBackend);\n\n\tconst isCommunityNodesFeatureEnabled = computed(() => settings.value.communityNodesEnabled);\n\n\tconst isUnverifiedPackagesEnabled = computed(\n\t\t() => settings.value.unverifiedCommunityNodesEnabled,\n\t);\n\n\tconst allowedModules = computed(() => settings.value.allowedModules);\n\n\tconst isQueueModeEnabled = computed(() => settings.value.executionMode === 'queue');\n\tconst isMultiMain = computed(() => settings.value.isMultiMain);\n\n\tconst isWorkerViewAvailable = computed(() => !!settings.value.enterprise?.workerView);\n\n\tconst workflowCallerPolicyDefaultOption = computed(\n\t\t() => settings.value.workflowCallerPolicyDefaultOption,\n\t);\n\n\tconst isNodeTypeExcluded = (nodeType: string) => {\n\t\tconst excludeNodes = settings.value.excludeNodes;\n\t\treturn Array.isArray(excludeNodes) && excludeNodes.includes(nodeType);\n\t};\n\n\tconst isExecuteWorkflowNodeExcluded = computed(() =>\n\t\tisNodeTypeExcluded(EXECUTE_WORKFLOW_NODE_TYPE),\n\t);\n\n\tconst isSubworkflowConversionDisabled = computed(\n\t\t() =>\n\t\t\tisExecuteWorkflowNodeExcluded.value || isNodeTypeExcluded(EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE),\n\t);\n\n\tconst permanentlyDismissedBanners = computed(() => settings.value.banners?.dismissed ?? []);\n\n\tconst isCommunityPlan = computed(() => planName.value.toLowerCase() === 'community');\n\n\tconst isDevRelease = computed(() => settings.value.releaseChannel === 'dev');\n\n\tconst endpointHealth = computed(() => settings.value.endpointHealth);\n\n\tconst isWorkflowPublicationServiceEnabled = computed(\n\t\t() => settings.value.useWorkflowPublicationService ?? false,\n\t);\n\n\tconst setSettings = (newSettings: FrontendSettings) => {\n\t\tsettings.value = newSettings;\n\n\t\tuserManagement.value = newSettings.userManagement;\n\t\tif (userManagement.value) {\n\t\t\tuserManagement.value.showSetupOnFirstLoad =\n\t\t\t\t!!settings.value.userManagement.showSetupOnFirstLoad;\n\t\t}\n\n\t\tif (settings.value.publicApi) {\n\t\t\tapi.value = settings.value.publicApi;\n\t\t}\n\n\t\tmfa.value.enabled = settings.value.mfa?.enabled;\n\t\tfolders.value.enabled = settings.value.folders?.enabled;\n\n\t\tif (settings.value.versionCli) {\n\t\t\tuseRootStore().setVersionCli(settings.value.versionCli);\n\t\t}\n\n\t\tif (settings.value.authCookie.secure) {\n\t\t\tconst { browser } = Bowser.parse(navigator.userAgent);\n\t\t\tif (\n\t\t\t\tlocation.protocol === 'http:' &&\n\t\t\t\t(!['localhost', '127.0.0.1'].includes(location.hostname) || browser.name === 'Safari')\n\t\t\t) {\n\t\t\t\tdocument.write(buildInsecureConnectionWarning());\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t};\n\n\tconst setAllowedModules = (allowedModules: FrontendSettings['allowedModules']) => {\n\t\tsettings.value.allowedModules = allowedModules;\n\t};\n\n\tconst setWorkflowReviewsPolicy = (policy: WorkflowReviewsPolicy) => {\n\t\tsettings.value.workflowReviews = policy;\n\t};\n\n\tconst setSaveDataErrorExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataErrorExecution.value = newValue;\n\t};\n\n\tconst setSaveDataSuccessExecution = (newValue: WorkflowSettings.SaveDataExecution) => {\n\t\tsaveDataSuccessExecution.value = newValue;\n\t};\n\n\tconst setSaveManualExecutions = (newValue: boolean) => {\n\t\tsaveManualExecutions.value = newValue;\n\t};\n\n\tconst setSaveDataProgressExecution = (newValue: boolean) => {\n\t\tsaveDataProgressExecution.value = newValue;\n\t};\n\n\tconst getSettings = async () => {\n\t\tconst rootStore = useRootStore();\n\t\tconst fetchedSettings = await settingsApi.getSettings(rootStore.restApiContext);\n\n\t\tsetSettings(fetchedSettings);\n\t\trootStore.setDefaultLocale(fetchedSettings.defaultLocale);\n\n\t\t// Set MFA enforced state even for public settings mode\n\t\t// as it is needed to determine if the MFA setup page should be shown\n\t\tisMFAEnforced.value = settings.value.mfa?.enforced ?? false;\n\n\t\tif (fetchedSettings.settingsMode === 'public') {\n\t\t\t// public settings mode is typically used for unauthenticated users\n\t\t\t// when public settings are returned we can skip the rest of the setup\n\t\t\t// that need the full set of authenticated settings\n\t\t\treturn;\n\t\t}\n\n\t\tsettings.value.communityNodesEnabled = fetchedSettings.communityNodesEnabled;\n\t\tsettings.value.unverifiedCommunityNodesEnabled =\n\t\t\tfetchedSettings.unverifiedCommunityNodesEnabled;\n\t\tsetAllowedModules(fetchedSettings.allowedModules);\n\t\tsetSaveDataErrorExecution(fetchedSettings.saveDataErrorExecution);\n\t\tsetSaveDataSuccessExecution(fetchedSettings.saveDataSuccessExecution);\n\t\tsetSaveDataProgressExecution(fetchedSettings.saveExecutionProgress);\n\t\tsetSaveManualExecutions(fetchedSettings.saveManualExecutions);\n\n\t\trootStore.setUrlBaseWebhook(fetchedSettings.urlBaseWebhook);\n\t\trootStore.setUrlBaseEditor(fetchedSettings.urlBaseEditor);\n\t\trootStore.setUrlBaseWebhookTest(fetchedSettings.urlBaseWebhookTest);\n\t\trootStore.setEndpointForm(fetchedSettings.endpointForm);\n\t\trootStore.setEndpointFormTest(fetchedSettings.endpointFormTest);\n\t\trootStore.setEndpointFormWaiting(fetchedSettings.endpointFormWaiting);\n\t\trootStore.setEndpointWebhook(fetchedSettings.endpointWebhook);\n\t\trootStore.setEndpointWebhookTest(fetchedSettings.endpointWebhookTest);\n\t\trootStore.setEndpointWebhookWaiting(fetchedSettings.endpointWebhookWaiting);\n\t\trootStore.setEndpointMcp(fetchedSettings.endpointMcp);\n\t\trootStore.setEndpointMcpTest(fetchedSettings.endpointMcpTest);\n\t\trootStore.setTimezone(fetchedSettings.timezone);\n\t\trootStore.setExecutionTimeout(fetchedSettings.executionTimeout);\n\t\trootStore.setMaxExecutionTimeout(fetchedSettings.maxExecutionTimeout);\n\t\trootStore.setPublicApiPath(\n\t\t\t`${fetchedSettings.publicApi.path}/v${fetchedSettings.publicApi.latestVersion}`,\n\t\t);\n\t\trootStore.setInstanceId(fetchedSettings.instanceId);\n\t\trootStore.setOauthCallbackUrls(fetchedSettings.oauthCallbackUrls);\n\t\trootStore.setN8nMetadata(fetchedSettings.n8nMetadata ?? {});\n\t\trootStore.setBinaryDataMode(fetchedSettings.binaryDataMode);\n\n\t\tif (fetchedSettings.telemetry.enabled) {\n\t\t\tvoid eventsApi.sessionStarted(rootStore.restApiContext);\n\t\t}\n\t};\n\n\tconst initialize = async () => {\n\t\tif (initialized.value) {\n\t\t\treturn;\n\t\t}\n\n\t\tawait getSettings();\n\n\t\tinitialized.value = true;\n\t};\n\n\tconst stopShowingSetupPage = () => {\n\t\tuserManagement.value.showSetupOnFirstLoad = false;\n\t};\n\n\tconst disableTemplates = () => {\n\t\tsettings.value = {\n\t\t\t...settings.value,\n\t\t\ttemplates: {\n\t\t\t\t...settings.value.templates,\n\t\t\t\tenabled: false,\n\t\t\t},\n\t\t};\n\t};\n\n\tconst testTemplatesEndpoint = async () => {\n\t\tconst timeout = new Promise((_, reject) =>\n\t\t\tsetTimeout(() => reject(new Error('Templates health check timed out')), 2000),\n\t\t);\n\t\tawait Promise.race([testHealthEndpoint(templatesHost.value), timeout]);\n\t\ttemplatesEndpointHealthy.value = true;\n\t};\n\n\tconst getTimezones = async (): Promise<IDataObject> => {\n\t\tconst rootStore = useRootStore();\n\t\treturn await makeRestApiRequest(rootStore.restApiContext, 'GET', '/options/timezones');\n\t};\n\n\tconst reset = () => {\n\t\tsettings.value = {} as FrontendSettings;\n\t};\n\n\tconst getModuleSettings = async () => {\n\t\tconst fetched = await moduleSettingsApi.getModuleSettings(useRootStore().restApiContext);\n\t\tmoduleSettings.value = fetched;\n\t};\n\n\tconst updateAiDataSharingSettings = async (allowSendingParameterValues: boolean) => {\n\t\tconst rootStore = useRootStore();\n\t\tawait aiUsageApi.updateAiUsageSettings(rootStore.restApiContext, {\n\t\t\tallowSendingParameterValues,\n\t\t});\n\t\tif (settings.value.ai) {\n\t\t\tsettings.value.ai.allowSendingParameterValues = allowSendingParameterValues;\n\t\t}\n\t};\n\n\treturn {\n\t\tsettings,\n\t\tuserManagement,\n\t\ttemplatesEndpointHealthy,\n\t\tapi,\n\t\tmfa,\n\t\tisDocker,\n\t\tisDevRelease,\n\t\tendpointHealth,\n\t\tisEnterpriseFeatureEnabled,\n\t\tdatabaseType,\n\t\tplanName,\n\t\tconsumerId,\n\t\tbinaryDataMode,\n\t\tpruning,\n\t\tsecurity,\n\t\tnodeJsVersion,\n\t\tnodeEnv,\n\t\tconcurrency,\n\t\tisConcurrencyEnabled,\n\t\tisPublicApiEnabled,\n\t\tisSwaggerUIEnabled,\n\t\tisPreviewMode,\n\t\tisE2ETestMode,\n\t\tisCanvasOnly,\n\t\tisCrdtCollaborationEnabled,\n\t\tpublicApiLatestVersion,\n\t\tpublicApiPath,\n\t\tshowSetupPage,\n\t\tdeploymentType,\n\t\tisCloudDeployment,\n\t\tisSmtpSetup,\n\t\tisPersonalizationSurveyEnabled,\n\t\ttelemetry,\n\t\tlogLevel,\n\t\tisTelemetryEnabled,\n\t\tisMfaFeatureEnabled,\n\t\tisFoldersFeatureEnabled,\n\t\tisAiAssistantEnabled,\n\t\tisCustomRolesFeatureEnabled,\n\t\tareTagsEnabled,\n\t\tisAutosaveEnabled,\n\t\tisHiringBannerEnabled,\n\t\tisTemplatesEnabled,\n\t\tisTemplatesEndpointReachable,\n\t\ttemplatesHost,\n\t\tpushBackend,\n\t\tisCommunityNodesFeatureEnabled,\n\t\tisUnverifiedPackagesEnabled,\n\t\tallowedModules,\n\t\tisQueueModeEnabled,\n\t\tisMultiMain,\n\t\tisWorkerViewAvailable,\n\t\tworkflowCallerPolicyDefaultOption,\n\t\tisExecuteWorkflowNodeExcluded,\n\t\tisSubworkflowConversionDisabled,\n\t\tpermanentlyDismissedBanners,\n\t\tsaveDataErrorExecution,\n\t\tsaveDataSuccessExecution,\n\t\tsaveManualExecutions,\n\t\tsaveDataProgressExecution,\n\t\tisCommunityPlan,\n\t\tisAskAiEnabled,\n\t\tisAiBuilderEnabled,\n\t\tisAiAssistantOrBuilderEnabled,\n\t\tisAiCreditsEnabled,\n\t\taiCreditsQuota,\n\t\tisAiDataSharingEnabled,\n\t\tisAiGatewayEnabled,\n\t\tisAiGatewayCloudUbbEnabled,\n\t\taiGatewayBudget,\n\t\treset,\n\t\tgetTimezones,\n\t\ttestTemplatesEndpoint,\n\t\tdisableTemplates,\n\t\tstopShowingSetupPage,\n\t\tgetSettings,\n\t\tsetSettings,\n\t\tsetWorkflowReviewsPolicy,\n\t\tinitialize,\n\t\tgetModuleSettings,\n\t\tmoduleSettings,\n\t\tupdateAiDataSharingSettings,\n\t\tisMFAEnforcementLicensed,\n\t\tisMFAEnforced,\n\t\tactiveModules,\n\t\tisModuleActive,\n\t\tisAgentModuleActive,\n\t\tisDataTableFeatureEnabled,\n\t\tisChatFeatureEnabled,\n\t\tisOtelCustomSpanAttributesEnabled,\n\t\tisAgentsKnowledgeBaseFeatureEnabled,\n\t\tisPublicChatTriggerDisabled,\n\t\tisWorkflowPublicationServiceEnabled,\n\t};\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,uCAAuC;;;MAGvC,KAAK,SAAS,+CAA+C,CAAC;;;GAGjE,KAAK,SAAS,kDAAkD,CAAC;;QAE5D,KAAK,SAAS,oDAAoD,CAAC;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SAAS,MAAM;IAClB,SAAS;IACT;GACD;;CAGF,MAAM,wBAAwB,YAAY;EACzC,MAAM,UAAU,IAAI,SAAS,GAAG,WAC/B,iBAAiB,uBAAO,IAAI,MAAM,mCAAmC,CAAC,EAAE,IAAK,CAC7E;AACD,QAAM,QAAQ,KAAK,CAAC,mBAAmB,cAAc,MAAM,EAAE,QAAQ,CAAC;AACtE,2BAAyB,QAAQ;;CAGlC,MAAM,eAAe,YAAkC;AAEtD,SAAO,MAAM,mBADK,cAAc,CACU,gBAAgB,OAAO,qBAAqB;;CAGvF,MAAM,cAAc;AACnB,WAAS,QAAQ,EAAE;;CAGpB,MAAM,oBAAoB,YAAY;AAErC,iBAAe,QADC,MAAM,kBAAkB,kBAAkB,cAAc,CAAC,eAAe;;CAIzF,MAAM,8BAA8B,OAAO,gCAAyC;EACnF,MAAM,YAAY,cAAc;AAChC,QAAM,WAAW,sBAAsB,UAAU,gBAAgB,EAChE,6BACA,CAAC;AACF,MAAI,SAAS,MAAM,GAClB,UAAS,MAAM,GAAG,8BAA8B;;AAIlD,QAAO;EACN;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as pinia2 from "pinia";
|
|
2
2
|
import { AgentRequestQuery } from "n8n-workflow";
|
|
3
3
|
import * as _vueuse_core0 from "@vueuse/core";
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ interface IAgentRequestStoreState {
|
|
|
12
12
|
[nodeName: string]: IAgentRequest;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
declare const useAgentRequestStore:
|
|
15
|
+
declare const useAgentRequestStore: pinia2.StoreDefinition<"agentRequest", Pick<{
|
|
16
16
|
agentRequests: _vueuse_core0.RemovableRef<IAgentRequestStoreState>;
|
|
17
17
|
getAgentRequests: (workflowId: string, nodeId: string) => IAgentRequest["query"];
|
|
18
18
|
getQueryValue: (workflowId: string, nodeId: string, nodeName: string, paramName?: string) => unknown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as pinia2 from "pinia";
|
|
2
2
|
import { AgentRequestQuery } from "n8n-workflow";
|
|
3
3
|
import * as _vueuse_core0 from "@vueuse/core";
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ interface IAgentRequestStoreState {
|
|
|
12
12
|
[nodeName: string]: IAgentRequest;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
declare const useAgentRequestStore:
|
|
15
|
+
declare const useAgentRequestStore: pinia2.StoreDefinition<"agentRequest", Pick<{
|
|
16
16
|
agentRequests: _vueuse_core0.RemovableRef<IAgentRequestStoreState>;
|
|
17
17
|
getAgentRequests: (workflowId: string, nodeId: string) => IAgentRequest["query"];
|
|
18
18
|
getQueryValue: (workflowId: string, nodeId: string, nodeName: string, paramName?: string) => unknown;
|
package/dist/useRootStore.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as vue347 from "vue";
|
|
2
|
+
import * as pinia5 from "pinia";
|
|
3
3
|
|
|
4
4
|
//#region src/useRootStore.d.ts
|
|
5
5
|
type RootStoreState = {
|
|
@@ -31,36 +31,36 @@ type RootStoreState = {
|
|
|
31
31
|
instanceId: string;
|
|
32
32
|
binaryDataMode: 'default' | 'filesystem' | 's3' | 'azure' | 'database';
|
|
33
33
|
};
|
|
34
|
-
declare const useRootStore:
|
|
35
|
-
baseUrl:
|
|
36
|
-
formUrl:
|
|
37
|
-
formTestUrl:
|
|
38
|
-
formWaitingUrl:
|
|
39
|
-
mcpUrl:
|
|
40
|
-
mcpTestUrl:
|
|
41
|
-
webhookUrl:
|
|
42
|
-
webhookTestUrl:
|
|
43
|
-
webhookWaitingUrl:
|
|
44
|
-
restUrl:
|
|
45
|
-
restApiContext:
|
|
34
|
+
declare const useRootStore: pinia5.StoreDefinition<"root", Pick<{
|
|
35
|
+
baseUrl: vue347.ComputedRef<string>;
|
|
36
|
+
formUrl: vue347.ComputedRef<string>;
|
|
37
|
+
formTestUrl: vue347.ComputedRef<string>;
|
|
38
|
+
formWaitingUrl: vue347.ComputedRef<string>;
|
|
39
|
+
mcpUrl: vue347.ComputedRef<string>;
|
|
40
|
+
mcpTestUrl: vue347.ComputedRef<string>;
|
|
41
|
+
webhookUrl: vue347.ComputedRef<string>;
|
|
42
|
+
webhookTestUrl: vue347.ComputedRef<string>;
|
|
43
|
+
webhookWaitingUrl: vue347.ComputedRef<string>;
|
|
44
|
+
restUrl: vue347.ComputedRef<string>;
|
|
45
|
+
restApiContext: vue347.ComputedRef<{
|
|
46
46
|
baseUrl: string;
|
|
47
47
|
pushRef: string;
|
|
48
48
|
}>;
|
|
49
|
-
publicApiContext:
|
|
49
|
+
publicApiContext: vue347.ComputedRef<{
|
|
50
50
|
baseUrl: string;
|
|
51
51
|
}>;
|
|
52
|
-
urlBaseEditor:
|
|
53
|
-
urlBaseWebhook:
|
|
54
|
-
versionCli:
|
|
55
|
-
instanceId:
|
|
56
|
-
pushRef:
|
|
57
|
-
defaultLocale:
|
|
58
|
-
binaryDataMode:
|
|
59
|
-
OAuthCallbackUrls:
|
|
60
|
-
jwksUri:
|
|
61
|
-
executionTimeout:
|
|
62
|
-
maxExecutionTimeout:
|
|
63
|
-
timezone:
|
|
52
|
+
urlBaseEditor: vue347.ComputedRef<string>;
|
|
53
|
+
urlBaseWebhook: vue347.ComputedRef<string>;
|
|
54
|
+
versionCli: vue347.ComputedRef<string>;
|
|
55
|
+
instanceId: vue347.ComputedRef<string>;
|
|
56
|
+
pushRef: vue347.ComputedRef<string>;
|
|
57
|
+
defaultLocale: vue347.ComputedRef<string>;
|
|
58
|
+
binaryDataMode: vue347.ComputedRef<"default" | "filesystem" | "s3" | "azure" | "database">;
|
|
59
|
+
OAuthCallbackUrls: vue347.ComputedRef<object>;
|
|
60
|
+
jwksUri: vue347.ComputedRef<string>;
|
|
61
|
+
executionTimeout: vue347.ComputedRef<number>;
|
|
62
|
+
maxExecutionTimeout: vue347.ComputedRef<number>;
|
|
63
|
+
timezone: vue347.ComputedRef<string>;
|
|
64
64
|
setUrlBaseWebhook: (value: string) => void;
|
|
65
65
|
setUrlBaseEditor: (value: string) => void;
|
|
66
66
|
setUrlBaseWebhookTest: (value: string) => void;
|
|
@@ -85,35 +85,35 @@ declare const useRootStore: pinia6.StoreDefinition<"root", Pick<{
|
|
|
85
85
|
setPushRef: (value: string) => void;
|
|
86
86
|
setPublicApiPath: (value: string) => void;
|
|
87
87
|
}, never>, Pick<{
|
|
88
|
-
baseUrl:
|
|
89
|
-
formUrl:
|
|
90
|
-
formTestUrl:
|
|
91
|
-
formWaitingUrl:
|
|
92
|
-
mcpUrl:
|
|
93
|
-
mcpTestUrl:
|
|
94
|
-
webhookUrl:
|
|
95
|
-
webhookTestUrl:
|
|
96
|
-
webhookWaitingUrl:
|
|
97
|
-
restUrl:
|
|
98
|
-
restApiContext:
|
|
88
|
+
baseUrl: vue347.ComputedRef<string>;
|
|
89
|
+
formUrl: vue347.ComputedRef<string>;
|
|
90
|
+
formTestUrl: vue347.ComputedRef<string>;
|
|
91
|
+
formWaitingUrl: vue347.ComputedRef<string>;
|
|
92
|
+
mcpUrl: vue347.ComputedRef<string>;
|
|
93
|
+
mcpTestUrl: vue347.ComputedRef<string>;
|
|
94
|
+
webhookUrl: vue347.ComputedRef<string>;
|
|
95
|
+
webhookTestUrl: vue347.ComputedRef<string>;
|
|
96
|
+
webhookWaitingUrl: vue347.ComputedRef<string>;
|
|
97
|
+
restUrl: vue347.ComputedRef<string>;
|
|
98
|
+
restApiContext: vue347.ComputedRef<{
|
|
99
99
|
baseUrl: string;
|
|
100
100
|
pushRef: string;
|
|
101
101
|
}>;
|
|
102
|
-
publicApiContext:
|
|
102
|
+
publicApiContext: vue347.ComputedRef<{
|
|
103
103
|
baseUrl: string;
|
|
104
104
|
}>;
|
|
105
|
-
urlBaseEditor:
|
|
106
|
-
urlBaseWebhook:
|
|
107
|
-
versionCli:
|
|
108
|
-
instanceId:
|
|
109
|
-
pushRef:
|
|
110
|
-
defaultLocale:
|
|
111
|
-
binaryDataMode:
|
|
112
|
-
OAuthCallbackUrls:
|
|
113
|
-
jwksUri:
|
|
114
|
-
executionTimeout:
|
|
115
|
-
maxExecutionTimeout:
|
|
116
|
-
timezone:
|
|
105
|
+
urlBaseEditor: vue347.ComputedRef<string>;
|
|
106
|
+
urlBaseWebhook: vue347.ComputedRef<string>;
|
|
107
|
+
versionCli: vue347.ComputedRef<string>;
|
|
108
|
+
instanceId: vue347.ComputedRef<string>;
|
|
109
|
+
pushRef: vue347.ComputedRef<string>;
|
|
110
|
+
defaultLocale: vue347.ComputedRef<string>;
|
|
111
|
+
binaryDataMode: vue347.ComputedRef<"default" | "filesystem" | "s3" | "azure" | "database">;
|
|
112
|
+
OAuthCallbackUrls: vue347.ComputedRef<object>;
|
|
113
|
+
jwksUri: vue347.ComputedRef<string>;
|
|
114
|
+
executionTimeout: vue347.ComputedRef<number>;
|
|
115
|
+
maxExecutionTimeout: vue347.ComputedRef<number>;
|
|
116
|
+
timezone: vue347.ComputedRef<string>;
|
|
117
117
|
setUrlBaseWebhook: (value: string) => void;
|
|
118
118
|
setUrlBaseEditor: (value: string) => void;
|
|
119
119
|
setUrlBaseWebhookTest: (value: string) => void;
|
|
@@ -138,35 +138,35 @@ declare const useRootStore: pinia6.StoreDefinition<"root", Pick<{
|
|
|
138
138
|
setPushRef: (value: string) => void;
|
|
139
139
|
setPublicApiPath: (value: string) => void;
|
|
140
140
|
}, "executionTimeout" | "maxExecutionTimeout" | "jwksUri" | "timezone" | "urlBaseWebhook" | "urlBaseEditor" | "versionCli" | "binaryDataMode" | "instanceId" | "defaultLocale" | "baseUrl" | "pushRef" | "formUrl" | "formTestUrl" | "formWaitingUrl" | "mcpUrl" | "mcpTestUrl" | "webhookUrl" | "webhookTestUrl" | "webhookWaitingUrl" | "restUrl" | "restApiContext" | "publicApiContext" | "OAuthCallbackUrls">, Pick<{
|
|
141
|
-
baseUrl:
|
|
142
|
-
formUrl:
|
|
143
|
-
formTestUrl:
|
|
144
|
-
formWaitingUrl:
|
|
145
|
-
mcpUrl:
|
|
146
|
-
mcpTestUrl:
|
|
147
|
-
webhookUrl:
|
|
148
|
-
webhookTestUrl:
|
|
149
|
-
webhookWaitingUrl:
|
|
150
|
-
restUrl:
|
|
151
|
-
restApiContext:
|
|
141
|
+
baseUrl: vue347.ComputedRef<string>;
|
|
142
|
+
formUrl: vue347.ComputedRef<string>;
|
|
143
|
+
formTestUrl: vue347.ComputedRef<string>;
|
|
144
|
+
formWaitingUrl: vue347.ComputedRef<string>;
|
|
145
|
+
mcpUrl: vue347.ComputedRef<string>;
|
|
146
|
+
mcpTestUrl: vue347.ComputedRef<string>;
|
|
147
|
+
webhookUrl: vue347.ComputedRef<string>;
|
|
148
|
+
webhookTestUrl: vue347.ComputedRef<string>;
|
|
149
|
+
webhookWaitingUrl: vue347.ComputedRef<string>;
|
|
150
|
+
restUrl: vue347.ComputedRef<string>;
|
|
151
|
+
restApiContext: vue347.ComputedRef<{
|
|
152
152
|
baseUrl: string;
|
|
153
153
|
pushRef: string;
|
|
154
154
|
}>;
|
|
155
|
-
publicApiContext:
|
|
155
|
+
publicApiContext: vue347.ComputedRef<{
|
|
156
156
|
baseUrl: string;
|
|
157
157
|
}>;
|
|
158
|
-
urlBaseEditor:
|
|
159
|
-
urlBaseWebhook:
|
|
160
|
-
versionCli:
|
|
161
|
-
instanceId:
|
|
162
|
-
pushRef:
|
|
163
|
-
defaultLocale:
|
|
164
|
-
binaryDataMode:
|
|
165
|
-
OAuthCallbackUrls:
|
|
166
|
-
jwksUri:
|
|
167
|
-
executionTimeout:
|
|
168
|
-
maxExecutionTimeout:
|
|
169
|
-
timezone:
|
|
158
|
+
urlBaseEditor: vue347.ComputedRef<string>;
|
|
159
|
+
urlBaseWebhook: vue347.ComputedRef<string>;
|
|
160
|
+
versionCli: vue347.ComputedRef<string>;
|
|
161
|
+
instanceId: vue347.ComputedRef<string>;
|
|
162
|
+
pushRef: vue347.ComputedRef<string>;
|
|
163
|
+
defaultLocale: vue347.ComputedRef<string>;
|
|
164
|
+
binaryDataMode: vue347.ComputedRef<"default" | "filesystem" | "s3" | "azure" | "database">;
|
|
165
|
+
OAuthCallbackUrls: vue347.ComputedRef<object>;
|
|
166
|
+
jwksUri: vue347.ComputedRef<string>;
|
|
167
|
+
executionTimeout: vue347.ComputedRef<number>;
|
|
168
|
+
maxExecutionTimeout: vue347.ComputedRef<number>;
|
|
169
|
+
timezone: vue347.ComputedRef<string>;
|
|
170
170
|
setUrlBaseWebhook: (value: string) => void;
|
|
171
171
|
setUrlBaseEditor: (value: string) => void;
|
|
172
172
|
setUrlBaseWebhookTest: (value: string) => void;
|