mirror of
https://github.com/n8n-io/n8n.git
synced 2024-09-19 22:37:31 -07:00
Compare commits
21 commits
f06ad4f93b
...
a8eccda849
Author | SHA1 | Date | |
---|---|---|---|
a8eccda849 | |||
48294e7ec1 | |||
e9fd2be0b3 | |||
f19fcb2c0b | |||
fdef6c9f0d | |||
8fb31e8459 | |||
047b1d13c0 | |||
9b0b0fbf57 | |||
0706149672 | |||
52368f2e8e | |||
c3a4bf59e2 | |||
b78883f465 | |||
37d6ca5cf4 | |||
912c94e541 | |||
5ecfae6320 | |||
4db437d85a | |||
d62b174db4 | |||
1c768b7199 | |||
c7ed0485f9 | |||
3a7afbd481 | |||
2b06cb91c7 |
|
@ -72,7 +72,6 @@
|
|||
"chokidar": "3.5.2",
|
||||
"esbuild": "^0.20.2",
|
||||
"formidable": "3.5.1",
|
||||
"prettier": "^3.2.5",
|
||||
"pug": "^3.0.3",
|
||||
"semver": "^7.5.4",
|
||||
"tslib": "^2.6.2",
|
||||
|
|
|
@ -3,8 +3,9 @@ import { check } from 'k6';
|
|||
|
||||
const apiBaseUrl = __ENV.API_BASE_URL;
|
||||
|
||||
const file = open(__ENV.SCRIPT_FILE_PATH, 'b');
|
||||
const filename = String(__ENV.SCRIPT_FILE_PATH).split('/').pop();
|
||||
// This creates a 2MB file (16 * 128 * 1024 = 2 * 1024 * 1024 = 2MB)
|
||||
const file = Array.from({ length: 128 * 1024 }, () => Math.random().toString().slice(2)).join('');
|
||||
const filename = 'test.bin';
|
||||
|
||||
export default function () {
|
||||
const data = {
|
||||
|
|
|
@ -77,7 +77,6 @@ export function handleSummary(data) {
|
|||
env: {
|
||||
API_BASE_URL: this.opts.n8nApiBaseUrl,
|
||||
K6_CLOUD_TOKEN: this.opts.k6ApiToken,
|
||||
SCRIPT_FILE_PATH: augmentedTestScriptPath,
|
||||
},
|
||||
stdio: 'inherit',
|
||||
})`${k6ExecutablePath} run ${flattedFlags} ${augmentedTestScriptPath}`;
|
||||
|
|
|
@ -25,7 +25,6 @@ module.exports = {
|
|||
},
|
||||
{
|
||||
files: ['**/*.vue'],
|
||||
plugins: isCI ? [] : ['eslint-plugin-prettier'],
|
||||
rules: {
|
||||
'vue/no-deprecated-slot-attribute': 'error',
|
||||
'vue/no-deprecated-slot-scope-attribute': 'error',
|
||||
|
@ -68,14 +67,6 @@ module.exports = {
|
|||
],
|
||||
'vue/no-v-html': 'error',
|
||||
|
||||
...(isCI
|
||||
? {}
|
||||
: {
|
||||
'prettier/prettier': ['error', { endOfLine: 'auto' }],
|
||||
'arrow-body-style': 'off',
|
||||
'prefer-arrow-callback': 'off',
|
||||
}),
|
||||
|
||||
// TODO: remove these
|
||||
'vue/no-mutating-props': 'warn',
|
||||
'vue/no-side-effects-in-computed-properties': 'warn',
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
"@types/eslint": "^8.56.5",
|
||||
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
||||
"@typescript-eslint/parser": "^7.2.0",
|
||||
"@vue/eslint-config-prettier": "^9.0.0",
|
||||
"@vue/eslint-config-typescript": "^13.0.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-airbnb-typescript": "^18.0.0",
|
||||
|
@ -15,7 +14,6 @@
|
|||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-lodash": "^7.4.0",
|
||||
"eslint-plugin-n8n-local-rules": "^1.0.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-unicorn": "^51.0.1",
|
||||
"eslint-plugin-unused-imports": "^3.1.0",
|
||||
"eslint-plugin-vue": "^9.23.0",
|
||||
|
|
|
@ -94,10 +94,17 @@ describe('ActiveExecutions', () => {
|
|||
});
|
||||
|
||||
test('Should remove an existing execution', async () => {
|
||||
// ARRANGE
|
||||
const newExecution = mockExecutionData();
|
||||
const executionId = await activeExecutions.add(newExecution);
|
||||
activeExecutions.remove(executionId);
|
||||
|
||||
// ACT
|
||||
activeExecutions.finalizeExecution(executionId);
|
||||
|
||||
// Wait until the next tick to ensure that the post-execution promise has settled
|
||||
await new Promise(setImmediate);
|
||||
|
||||
// ASSERT
|
||||
expect(activeExecutions.getActiveExecutions().length).toBe(0);
|
||||
});
|
||||
|
||||
|
@ -110,7 +117,7 @@ describe('ActiveExecutions', () => {
|
|||
setTimeout(res, 100);
|
||||
});
|
||||
const fakeOutput = mockFullRunData();
|
||||
activeExecutions.remove(executionId, fakeOutput);
|
||||
activeExecutions.finalizeExecution(executionId, fakeOutput);
|
||||
|
||||
await expect(postExecutePromise).resolves.toEqual(fakeOutput);
|
||||
});
|
||||
|
@ -126,7 +133,7 @@ describe('ActiveExecutions', () => {
|
|||
const cancellablePromise = mockCancelablePromise();
|
||||
cancellablePromise.cancel = cancelExecution;
|
||||
activeExecutions.attachWorkflowExecution(executionId, cancellablePromise);
|
||||
void activeExecutions.stopExecution(executionId);
|
||||
activeExecutions.stopExecution(executionId);
|
||||
|
||||
expect(cancelExecution).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { WorkflowHooks, type ExecutionError, type IWorkflowExecuteHooks } from 'n8n-workflow';
|
||||
import Container from 'typedi';
|
||||
|
||||
import { ActiveExecutions } from '@/active-executions';
|
||||
import config from '@/config';
|
||||
import type { User } from '@/databases/entities/user';
|
||||
import { Telemetry } from '@/telemetry';
|
||||
|
@ -72,6 +73,10 @@ test('processError should process error', async () => {
|
|||
},
|
||||
workflow,
|
||||
);
|
||||
await Container.get(ActiveExecutions).add(
|
||||
{ executionMode: 'webhook', workflowData: workflow },
|
||||
execution.id,
|
||||
);
|
||||
config.set('executions.mode', 'regular');
|
||||
await runner.processError(
|
||||
new Error('test') as ExecutionError,
|
||||
|
|
|
@ -5,17 +5,13 @@ import type {
|
|||
ExecutionStatus,
|
||||
IWorkflowExecutionDataProcess,
|
||||
} from 'n8n-workflow';
|
||||
import {
|
||||
ApplicationError,
|
||||
createDeferredPromise,
|
||||
ExecutionCancelledError,
|
||||
sleep,
|
||||
} from 'n8n-workflow';
|
||||
import { createDeferredPromise, ExecutionCancelledError, sleep } from 'n8n-workflow';
|
||||
import { strict as assert } from 'node:assert';
|
||||
import type PCancelable from 'p-cancelable';
|
||||
import { Service } from 'typedi';
|
||||
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { ExecutionNotFoundError } from '@/errors/execution-not-found-error';
|
||||
import type {
|
||||
ExecutionPayload,
|
||||
IExecutingWorkflowData,
|
||||
|
@ -95,13 +91,29 @@ export class ActiveExecutions {
|
|||
await this.executionRepository.updateExistingExecution(executionId, execution);
|
||||
}
|
||||
|
||||
const postExecutePromise = createDeferredPromise<IRun | undefined>();
|
||||
|
||||
this.activeExecutions[executionId] = {
|
||||
executionData,
|
||||
startedAt: new Date(),
|
||||
postExecutePromises: [],
|
||||
postExecutePromise,
|
||||
status: executionStatus,
|
||||
};
|
||||
|
||||
// Automatically remove execution once the postExecutePromise settles
|
||||
void postExecutePromise.promise
|
||||
.catch((error) => {
|
||||
if (error instanceof ExecutionCancelledError) return;
|
||||
throw error;
|
||||
})
|
||||
.finally(() => {
|
||||
this.concurrencyControl.release({ mode: executionData.executionMode });
|
||||
delete this.activeExecutions[executionId];
|
||||
this.logger.debug('Execution removed', { executionId });
|
||||
});
|
||||
|
||||
this.logger.debug('Execution added', { executionId });
|
||||
|
||||
return executionId;
|
||||
}
|
||||
|
||||
|
@ -125,68 +137,26 @@ export class ActiveExecutions {
|
|||
execution?.responsePromise?.resolve(response);
|
||||
}
|
||||
|
||||
getPostExecutePromiseCount(executionId: string): number {
|
||||
return this.activeExecutions[executionId]?.postExecutePromises.length ?? 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an active execution
|
||||
*/
|
||||
remove(executionId: string, fullRunData?: IRun): void {
|
||||
const execution = this.activeExecutions[executionId];
|
||||
if (execution === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Resolve all the waiting promises
|
||||
for (const promise of execution.postExecutePromises) {
|
||||
promise.resolve(fullRunData);
|
||||
}
|
||||
|
||||
this.postExecuteCleanup(executionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Forces an execution to stop
|
||||
*/
|
||||
/** Cancel the execution promise and reject its post-execution promise. */
|
||||
stopExecution(executionId: string): void {
|
||||
const execution = this.activeExecutions[executionId];
|
||||
if (execution === undefined) {
|
||||
// There is no execution running with that id
|
||||
return;
|
||||
}
|
||||
|
||||
execution.workflowExecution!.cancel();
|
||||
|
||||
// Reject all the waiting promises
|
||||
const reason = new ExecutionCancelledError(executionId);
|
||||
for (const promise of execution.postExecutePromises) {
|
||||
promise.reject(reason);
|
||||
}
|
||||
|
||||
this.postExecuteCleanup(executionId);
|
||||
const execution = this.getExecution(executionId);
|
||||
execution.workflowExecution?.cancel();
|
||||
execution.postExecutePromise.reject(new ExecutionCancelledError(executionId));
|
||||
this.logger.debug('Execution cancelled', { executionId });
|
||||
}
|
||||
|
||||
private postExecuteCleanup(executionId: string) {
|
||||
const execution = this.activeExecutions[executionId];
|
||||
if (execution === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove from the list of active executions
|
||||
delete this.activeExecutions[executionId];
|
||||
|
||||
this.concurrencyControl.release({ mode: execution.executionData.executionMode });
|
||||
/** Resolve the post-execution promise in an execution. */
|
||||
finalizeExecution(executionId: string, fullRunData?: IRun) {
|
||||
const execution = this.getExecution(executionId);
|
||||
execution.postExecutePromise.resolve(fullRunData);
|
||||
this.logger.debug('Execution finalized', { executionId });
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a promise which will resolve with the data of the execution with the given id
|
||||
*/
|
||||
async getPostExecutePromise(executionId: string): Promise<IRun | undefined> {
|
||||
// Create the promise which will be resolved when the execution finished
|
||||
const waitPromise = createDeferredPromise<IRun | undefined>();
|
||||
this.getExecution(executionId).postExecutePromises.push(waitPromise);
|
||||
return await waitPromise.promise;
|
||||
return await this.getExecution(executionId).postExecutePromise.promise;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -252,7 +222,7 @@ export class ActiveExecutions {
|
|||
private getExecution(executionId: string): IExecutingWorkflowData {
|
||||
const execution = this.activeExecutions[executionId];
|
||||
if (!execution) {
|
||||
throw new ApplicationError('No active execution found', { extra: { executionId } });
|
||||
throw new ExecutionNotFoundError(executionId);
|
||||
}
|
||||
return execution;
|
||||
}
|
||||
|
|
7
packages/cli/src/errors/execution-not-found-error.ts
Normal file
7
packages/cli/src/errors/execution-not-found-error.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { ApplicationError } from 'n8n-workflow';
|
||||
|
||||
export class ExecutionNotFoundError extends ApplicationError {
|
||||
constructor(executionId: string) {
|
||||
super('No active execution found', { extra: { executionId } });
|
||||
}
|
||||
}
|
|
@ -193,7 +193,8 @@ export interface IExecutionsCurrentSummary {
|
|||
export interface IExecutingWorkflowData {
|
||||
executionData: IWorkflowExecutionDataProcess;
|
||||
startedAt: Date;
|
||||
postExecutePromises: Array<IDeferredPromise<IRun | undefined>>;
|
||||
/** This promise rejects when the execution is stopped. When the execution finishes (successfully or not), the promise resolves. */
|
||||
postExecutePromise: IDeferredPromise<IRun | undefined>;
|
||||
responsePromise?: IDeferredPromise<IExecuteResponsePromiseData>;
|
||||
workflowExecution?: PCancelable<IRun>;
|
||||
status: ExecutionStatus;
|
||||
|
|
|
@ -879,8 +879,7 @@ async function executeWorkflow(
|
|||
fullExecutionData.workflowId = workflowData.id;
|
||||
}
|
||||
|
||||
// remove execution from active executions
|
||||
activeExecutions.remove(executionId, fullRunData);
|
||||
activeExecutions.finalizeExecution(executionId, fullRunData);
|
||||
|
||||
await executionRepository.updateExistingExecution(executionId, fullExecutionData);
|
||||
throw objectToError(
|
||||
|
@ -906,11 +905,11 @@ async function executeWorkflow(
|
|||
if (data.finished === true || data.status === 'waiting') {
|
||||
// Workflow did finish successfully
|
||||
|
||||
activeExecutions.remove(executionId, data);
|
||||
activeExecutions.finalizeExecution(executionId, data);
|
||||
const returnData = WorkflowHelpers.getDataLastExecutedNodeData(data);
|
||||
return returnData!.data!.main;
|
||||
}
|
||||
activeExecutions.remove(executionId, data);
|
||||
activeExecutions.finalizeExecution(executionId, data);
|
||||
|
||||
// Workflow did fail
|
||||
const { error } = data.data.resultData;
|
||||
|
|
|
@ -26,7 +26,6 @@ import { ActiveExecutions } from '@/active-executions';
|
|||
import config from '@/config';
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import type { IExecutionResponse } from '@/interfaces';
|
||||
import { Logger } from '@/logger';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import type { ScalingService } from '@/scaling/scaling.service';
|
||||
|
@ -102,7 +101,7 @@ export class WorkflowRunner {
|
|||
|
||||
// Remove from active execution with empty data. That will
|
||||
// set the execution to failed.
|
||||
this.activeExecutions.remove(executionId, fullRunData);
|
||||
this.activeExecutions.finalizeExecution(executionId, fullRunData);
|
||||
|
||||
if (hooks) {
|
||||
await hooks.executeHookFunctions('workflowExecuteAfter', [fullRunData]);
|
||||
|
@ -132,7 +131,7 @@ export class WorkflowRunner {
|
|||
await workflowHooks.executeHookFunctions('workflowExecuteBefore', []);
|
||||
await workflowHooks.executeHookFunctions('workflowExecuteAfter', [runData]);
|
||||
responsePromise?.reject(error);
|
||||
this.activeExecutions.remove(executionId);
|
||||
this.activeExecutions.finalizeExecution(executionId);
|
||||
return executionId;
|
||||
}
|
||||
|
||||
|
@ -336,7 +335,7 @@ export class WorkflowRunner {
|
|||
fullRunData.finished = false;
|
||||
}
|
||||
fullRunData.status = this.activeExecutions.getStatus(executionId);
|
||||
this.activeExecutions.remove(executionId, fullRunData);
|
||||
this.activeExecutions.finalizeExecution(executionId, fullRunData);
|
||||
})
|
||||
.catch(
|
||||
async (error) =>
|
||||
|
@ -505,45 +504,24 @@ export class WorkflowRunner {
|
|||
reject(error);
|
||||
}
|
||||
|
||||
// optimization: only pull and unflatten execution data from the Db when it is needed
|
||||
const executionHasPostExecutionPromises =
|
||||
this.activeExecutions.getPostExecutePromiseCount(executionId) > 0;
|
||||
|
||||
if (executionHasPostExecutionPromises) {
|
||||
this.logger.debug(
|
||||
`Reading execution data for execution ${executionId} from db for PostExecutionPromise.`,
|
||||
);
|
||||
} else {
|
||||
this.logger.debug(
|
||||
`Skipping execution data for execution ${executionId} since there are no PostExecutionPromise.`,
|
||||
);
|
||||
}
|
||||
|
||||
const fullExecutionData = await this.executionRepository.findSingleExecution(executionId, {
|
||||
includeData: executionHasPostExecutionPromises,
|
||||
unflattenData: executionHasPostExecutionPromises,
|
||||
includeData: true,
|
||||
unflattenData: true,
|
||||
});
|
||||
if (!fullExecutionData) {
|
||||
return reject(new Error(`Could not find execution with id "${executionId}"`));
|
||||
}
|
||||
|
||||
const runData: IRun = {
|
||||
data: {},
|
||||
finished: fullExecutionData.finished,
|
||||
mode: fullExecutionData.mode,
|
||||
startedAt: fullExecutionData.startedAt,
|
||||
stoppedAt: fullExecutionData.stoppedAt,
|
||||
status: fullExecutionData.status,
|
||||
} as IRun;
|
||||
data: fullExecutionData.data,
|
||||
};
|
||||
|
||||
if (executionHasPostExecutionPromises) {
|
||||
runData.data = (fullExecutionData as IExecutionResponse).data;
|
||||
}
|
||||
|
||||
// NOTE: due to the optimization of not loading the execution data from the db when no post execution promises are present,
|
||||
// the execution data in runData.data MAY not be available here.
|
||||
// This means that any function expecting with runData has to check if the runData.data defined from this point
|
||||
this.activeExecutions.remove(executionId, runData);
|
||||
this.activeExecutions.finalizeExecution(executionId, runData);
|
||||
|
||||
// Normally also static data should be supplied here but as it only used for sending
|
||||
// data to editor-UI is not needed.
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import { defineProps, withDefaults } from 'vue';
|
||||
|
||||
import AssistantAvatar from '../AskAssistantAvatar/AssistantAvatar.vue';
|
||||
|
||||
withDefaults(
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
"n8n-design-system": "workspace:*",
|
||||
"n8n-workflow": "workspace:*",
|
||||
"pinia": "^2.1.6",
|
||||
"prettier": "^3.1.0",
|
||||
"prettier": "^3.3.3",
|
||||
"qrcode.vue": "^3.3.4",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"timeago.js": "^4.0.2",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { computed, defineProps, defineEmits } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import TagsContainer from './TagsContainer.vue';
|
||||
import { useAnnotationTagsStore } from '@/stores/tags.store';
|
||||
import type { ITag } from '@/Interface';
|
||||
|
|
|
@ -77,7 +77,7 @@ const onDrag = (event: MouseEvent) => {
|
|||
if (!isDragging.value && draggingElement.value) {
|
||||
isDragging.value = true;
|
||||
|
||||
const data = props.targetDataKey ? draggingElement.value.dataset.value : props.data ?? '';
|
||||
const data = props.targetDataKey ? draggingElement.value.dataset.value : (props.data ?? '');
|
||||
|
||||
ndvStore.draggableStartDragging({
|
||||
type: props.type,
|
||||
|
|
|
@ -417,7 +417,7 @@ export default defineComponent({
|
|||
type="secondary"
|
||||
hide-icon
|
||||
:transparent="true"
|
||||
:node-name="isActiveNodeConfig ? rootNode : currentNodeName ?? ''"
|
||||
:node-name="isActiveNodeConfig ? rootNode : (currentNodeName ?? '')"
|
||||
:label="$locale.baseText('ndv.input.noOutputData.executePrevious')"
|
||||
telemetry-source="inputs"
|
||||
data-test-id="execute-previous-node"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts" setup>
|
||||
import { withDefaults, defineProps, defineEmits, ref, computed } from 'vue';
|
||||
import { ref, computed } from 'vue';
|
||||
import {
|
||||
WEBHOOK_NODE_TYPE,
|
||||
MANUAL_TRIGGER_NODE_TYPE,
|
||||
|
|
|
@ -26,7 +26,7 @@ const emit = defineEmits<{
|
|||
projectRemoved: [value: ProjectSharingData];
|
||||
}>();
|
||||
|
||||
const selectedProject = ref(Array.isArray(model.value) ? '' : model.value?.id ?? '');
|
||||
const selectedProject = ref(Array.isArray(model.value) ? '' : (model.value?.id ?? ''));
|
||||
const filter = ref('');
|
||||
const selectPlaceholder = computed(
|
||||
() => props.placeholder ?? locale.baseText('projects.sharing.select.placeholder'),
|
||||
|
|
|
@ -41,7 +41,7 @@ export default defineComponent({
|
|||
const projectId = props.projectId ?? inferProjectIdFromRoute(route);
|
||||
const resourceType = props.resourceType ?? inferResourceTypeFromRoute(route);
|
||||
const resourceId = resourceType
|
||||
? props.resourceId ?? inferResourceIdFromRoute(route)
|
||||
? (props.resourceId ?? inferResourceIdFromRoute(route))
|
||||
: undefined;
|
||||
|
||||
return rbacStore.hasScope(
|
||||
|
|
|
@ -25,7 +25,7 @@ const i18n = useI18n();
|
|||
|
||||
const saveButtonLabel = computed(() => {
|
||||
return props.isSaving
|
||||
? props.savingLabel ?? i18n.baseText('saveButton.saving')
|
||||
? (props.savingLabel ?? i18n.baseText('saveButton.saving'))
|
||||
: i18n.baseText('saveButton.save');
|
||||
});
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ const valueToDisplay = computed<NodeParameterValue>(() => {
|
|||
}
|
||||
|
||||
if (isListMode.value) {
|
||||
return props.modelValue ? props.modelValue.cachedResultName ?? props.modelValue.value : '';
|
||||
return props.modelValue ? (props.modelValue.cachedResultName ?? props.modelValue.value) : '';
|
||||
}
|
||||
|
||||
return props.modelValue ? props.modelValue.value : '';
|
||||
|
|
|
@ -37,7 +37,7 @@ const plusLineSize = computed(
|
|||
small: 46,
|
||||
medium: 66,
|
||||
large: 80,
|
||||
})[renderOptions.value.outputs?.labelSize ?? runData.value ? 'large' : 'small'],
|
||||
})[(renderOptions.value.outputs?.labelSize ?? runData.value) ? 'large' : 'small'],
|
||||
);
|
||||
|
||||
function onMouseEnter() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, onBeforeUnmount, defineProps } from 'vue';
|
||||
import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { useI18n } from '@/composables/useI18n';
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<script setup lang="ts">
|
||||
import { defineProps, defineEmits } from 'vue';
|
||||
import type { AnnotationVote } from 'n8n-workflow';
|
||||
|
||||
defineProps<{
|
||||
|
|
|
@ -39,7 +39,7 @@ const router = useRouter();
|
|||
const temporaryExecution = computed<ExecutionSummary | undefined>(() =>
|
||||
props.executions.find((execution) => execution.id === props.execution?.id)
|
||||
? undefined
|
||||
: props.execution ?? undefined,
|
||||
: (props.execution ?? undefined),
|
||||
);
|
||||
|
||||
const hidePreview = computed(() => {
|
||||
|
|
|
@ -935,7 +935,7 @@ const workflowPermissions = computed(() => {
|
|||
const projectPermissions = computed(() => {
|
||||
const project = route.query?.projectId
|
||||
? projectsStore.myProjects.find((p) => p.id === route.query.projectId)
|
||||
: projectsStore.currentProject ?? projectsStore.personalProject;
|
||||
: (projectsStore.currentProject ?? projectsStore.personalProject);
|
||||
return getResourcePermissions(project?.scopes);
|
||||
});
|
||||
|
||||
|
|
|
@ -507,7 +507,7 @@ export default defineComponent({
|
|||
projectPermissions() {
|
||||
const project = this.$route.query?.projectId
|
||||
? this.projectsStore.myProjects.find((p) => p.id === this.$route.query.projectId)
|
||||
: this.projectsStore.currentProject ?? this.projectsStore.personalProject;
|
||||
: (this.projectsStore.currentProject ?? this.projectsStore.personalProject);
|
||||
return getResourcePermissions(project?.scopes);
|
||||
},
|
||||
},
|
||||
|
|
|
@ -124,7 +124,7 @@ function resetNewVariablesList() {
|
|||
const resourceToEnvironmentVariable = (data: IResource): EnvironmentVariable => ({
|
||||
id: data.id,
|
||||
key: data.name,
|
||||
value: 'value' in data ? data.value ?? '' : '',
|
||||
value: 'value' in data ? (data.value ?? '') : '',
|
||||
});
|
||||
|
||||
const environmentVariableToResource = (data: EnvironmentVariable): IResource => ({
|
||||
|
|
|
@ -88,7 +88,6 @@ overrides:
|
|||
chokidar: 3.5.2
|
||||
esbuild: ^0.20.2
|
||||
formidable: 3.5.1
|
||||
prettier: ^3.2.5
|
||||
pug: ^3.0.3
|
||||
semver: ^7.5.4
|
||||
tslib: ^2.6.2
|
||||
|
@ -623,9 +622,6 @@ importers:
|
|||
'@typescript-eslint/parser':
|
||||
specifier: ^7.2.0
|
||||
version: 7.2.0(eslint@8.57.0)(typescript@5.6.2)
|
||||
'@vue/eslint-config-prettier':
|
||||
specifier: ^9.0.0
|
||||
version: 9.0.0(@types/eslint@8.56.5)(eslint@8.57.0)(prettier@3.2.5)
|
||||
'@vue/eslint-config-typescript':
|
||||
specifier: ^13.0.0
|
||||
version: 13.0.0(eslint-plugin-vue@9.23.0(eslint@8.57.0))(eslint@8.57.0)(typescript@5.6.2)
|
||||
|
@ -650,9 +646,6 @@ importers:
|
|||
eslint-plugin-n8n-local-rules:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
eslint-plugin-prettier:
|
||||
specifier: ^5.1.3
|
||||
version: 5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5)
|
||||
eslint-plugin-unicorn:
|
||||
specifier: ^51.0.1
|
||||
version: 51.0.1(eslint@8.57.0)
|
||||
|
@ -1392,8 +1385,8 @@ importers:
|
|||
specifier: ^2.1.6
|
||||
version: 2.1.6(typescript@5.6.2)(vue@3.4.21(typescript@5.6.2))
|
||||
prettier:
|
||||
specifier: ^3.2.5
|
||||
version: 3.2.5
|
||||
specifier: ^3.3.3
|
||||
version: 3.3.3
|
||||
qrcode.vue:
|
||||
specifier: ^3.3.4
|
||||
version: 3.3.4(vue@3.4.21(typescript@5.6.2))
|
||||
|
@ -3819,10 +3812,6 @@ packages:
|
|||
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
|
||||
engines: {node: '>=14'}
|
||||
|
||||
'@pkgr/core@0.1.1':
|
||||
resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==}
|
||||
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||
|
||||
'@protobufjs/aspromise@1.1.2':
|
||||
resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==}
|
||||
|
||||
|
@ -5435,12 +5424,6 @@ packages:
|
|||
'@vue/devtools-api@6.5.0':
|
||||
resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==}
|
||||
|
||||
'@vue/eslint-config-prettier@9.0.0':
|
||||
resolution: {integrity: sha512-z1ZIAAUS9pKzo/ANEfd2sO+v2IUalz7cM/cTLOZ7vRFOPk5/xuRKQteOu1DErFLAh/lYGXMVZ0IfYKlyInuDVg==}
|
||||
peerDependencies:
|
||||
eslint: '>= 8.0.0'
|
||||
prettier: ^3.2.5
|
||||
|
||||
'@vue/eslint-config-typescript@13.0.0':
|
||||
resolution: {integrity: sha512-MHh9SncG/sfqjVqjcuFLOLD6Ed4dRAis4HNt0dXASeAuLqIAx4YMB1/m2o4pUKK1vCt8fUvYG8KKX2Ot3BVZTg==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
|
@ -7171,20 +7154,6 @@ packages:
|
|||
resolution: {integrity: sha512-Qj8S+YgymYkt/5Fr1buwOTjl0jAERJBp3MA5V8M6NR1HYfErKazVjpOPEy5+04c0vAQZO1mPLGAzanxqqNUIng==}
|
||||
engines: {node: '>=20.15', pnpm: '>=9.6'}
|
||||
|
||||
eslint-plugin-prettier@5.1.3:
|
||||
resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
'@types/eslint': '>=8.0.0'
|
||||
eslint: '>=8.0.0'
|
||||
eslint-config-prettier: '*'
|
||||
prettier: ^3.2.5
|
||||
peerDependenciesMeta:
|
||||
'@types/eslint':
|
||||
optional: true
|
||||
eslint-config-prettier:
|
||||
optional: true
|
||||
|
||||
eslint-plugin-unicorn@51.0.1:
|
||||
resolution: {integrity: sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==}
|
||||
engines: {node: '>=16'}
|
||||
|
@ -7388,9 +7357,6 @@ packages:
|
|||
fast-deep-equal@3.1.3:
|
||||
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
||||
|
||||
fast-diff@1.2.0:
|
||||
resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==}
|
||||
|
||||
fast-glob@3.2.12:
|
||||
resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==}
|
||||
engines: {node: '>=8.6.0'}
|
||||
|
@ -10440,12 +10406,8 @@ packages:
|
|||
pretender@3.4.7:
|
||||
resolution: {integrity: sha512-jkPAvt1BfRi0RKamweJdEcnjkeu7Es8yix3bJ+KgBC5VpG/Ln4JE3hYN6vJym4qprm8Xo5adhWpm3HCoft1dOw==}
|
||||
|
||||
prettier-linter-helpers@1.0.0:
|
||||
resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
|
||||
prettier@3.2.5:
|
||||
resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==}
|
||||
prettier@3.3.3:
|
||||
resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
|
||||
|
@ -11516,10 +11478,6 @@ packages:
|
|||
symbol-tree@3.2.4:
|
||||
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
|
||||
|
||||
synckit@0.8.8:
|
||||
resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==}
|
||||
engines: {node: ^14.18.0 || >=16.0.0}
|
||||
|
||||
syslog-client@1.1.1:
|
||||
resolution: {integrity: sha512-c3qKw8JzCuHt0mwrzKQr8eqOc3RB28HgOpFuwGMO3GLscVpfR+0ECevWLZq/yIJTbx3WTb3QXBFVpTFtKAPDrw==}
|
||||
|
||||
|
@ -15578,8 +15536,6 @@ snapshots:
|
|||
'@pkgjs/parseargs@0.11.0':
|
||||
optional: true
|
||||
|
||||
'@pkgr/core@0.1.1': {}
|
||||
|
||||
'@protobufjs/aspromise@1.1.2': {}
|
||||
|
||||
'@protobufjs/base64@1.1.2': {}
|
||||
|
@ -17814,15 +17770,6 @@ snapshots:
|
|||
|
||||
'@vue/devtools-api@6.5.0': {}
|
||||
|
||||
'@vue/eslint-config-prettier@9.0.0(@types/eslint@8.56.5)(eslint@8.57.0)(prettier@3.2.5)':
|
||||
dependencies:
|
||||
eslint: 8.57.0
|
||||
eslint-config-prettier: 9.1.0(eslint@8.57.0)
|
||||
eslint-plugin-prettier: 5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5)
|
||||
prettier: 3.2.5
|
||||
transitivePeerDependencies:
|
||||
- '@types/eslint'
|
||||
|
||||
'@vue/eslint-config-typescript@13.0.0(eslint-plugin-vue@9.23.0(eslint@8.57.0))(eslint@8.57.0)(typescript@5.6.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 7.2.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2)
|
||||
|
@ -19909,16 +19856,6 @@ snapshots:
|
|||
- supports-color
|
||||
- typescript
|
||||
|
||||
eslint-plugin-prettier@5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5):
|
||||
dependencies:
|
||||
eslint: 8.57.0
|
||||
prettier: 3.2.5
|
||||
prettier-linter-helpers: 1.0.0
|
||||
synckit: 0.8.8
|
||||
optionalDependencies:
|
||||
'@types/eslint': 8.56.5
|
||||
eslint-config-prettier: 9.1.0(eslint@8.57.0)
|
||||
|
||||
eslint-plugin-unicorn@51.0.1(eslint@8.57.0):
|
||||
dependencies:
|
||||
'@babel/helper-validator-identifier': 7.22.20
|
||||
|
@ -20233,8 +20170,6 @@ snapshots:
|
|||
|
||||
fast-deep-equal@3.1.3: {}
|
||||
|
||||
fast-diff@1.2.0: {}
|
||||
|
||||
fast-glob@3.2.12:
|
||||
dependencies:
|
||||
'@nodelib/fs.stat': 2.0.5
|
||||
|
@ -23882,11 +23817,7 @@ snapshots:
|
|||
fake-xml-http-request: 2.1.2
|
||||
route-recognizer: 0.3.4
|
||||
|
||||
prettier-linter-helpers@1.0.0:
|
||||
dependencies:
|
||||
fast-diff: 1.2.0
|
||||
|
||||
prettier@3.2.5: {}
|
||||
prettier@3.3.3: {}
|
||||
|
||||
pretty-bytes@5.6.0: {}
|
||||
|
||||
|
@ -25252,11 +25183,6 @@ snapshots:
|
|||
|
||||
symbol-tree@3.2.4: {}
|
||||
|
||||
synckit@0.8.8:
|
||||
dependencies:
|
||||
'@pkgr/core': 0.1.1
|
||||
tslib: 2.6.2
|
||||
|
||||
syslog-client@1.1.1: {}
|
||||
|
||||
tailwindcss@3.4.3(ts-node@10.9.2(@types/node@18.16.16)(typescript@5.6.2)):
|
||||
|
|
Loading…
Reference in a new issue