Skip to content

Commit

Permalink
Share stand-in key
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Dec 31, 2024
1 parent ba205b6 commit 17ff5a1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
9 changes: 5 additions & 4 deletions packages/cli/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readFileSync } from 'fs';
import type { n8n } from 'n8n-core';
import type { ITaskDataConnections } from 'n8n-workflow';
import { jsonParse } from 'n8n-workflow';
import { jsonParse, TRIMMED_TASK_DATA_CONNECTIONS_KEY } from 'n8n-workflow';
import { resolve, join, dirname } from 'path';

const { NODE_ENV, E2E_TESTS } = process.env;
Expand Down Expand Up @@ -161,14 +161,15 @@ export const ARTIFICIAL_TASK_DATA = {
};

/**
* Stand-in for a manual execution data item too large to be sent live via pubsub.
* This signals to the client to direct the user to the execution history.
* Connections for an item standing in for a manual execution data item too
* large to be sent live via pubsub. This signals to the client to direct the
* user to the execution history.
*/
export const TRIMMED_TASK_DATA_CONNECTIONS: ITaskDataConnections = {
main: [
[
{
json: { __isTrimmedManualExecutionDataItem: true },
json: { [TRIMMED_TASK_DATA_CONNECTIONS_KEY]: true },
pairedItem: undefined,
},
],
Expand Down
5 changes: 3 additions & 2 deletions packages/editor-ui/src/components/RunData.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { useStorage } from '@/composables/useStorage';
import { saveAs } from 'file-saver';
import type {
import {

Check failure on line 4 in packages/editor-ui/src/components/RunData.vue

View workflow job for this annotation

GitHub Actions / Lint / Lint

Imports "IBinaryData", "IConnectedNode", "IDataObject", "INodeExecutionData", "INodeOutputConfiguration", "IRunData", "IRunExecutionData", "ITaskMetadata", "NodeError", "NodeHint" and "Workflow" are only used as types
IBinaryData,
IConnectedNode,
IDataObject,
Expand All @@ -13,6 +13,7 @@ import type {
NodeError,
NodeHint,
Workflow,
TRIMMED_TASK_DATA_CONNECTIONS_KEY,
} from 'n8n-workflow';
import { NodeConnectionType, NodeHelpers } from 'n8n-workflow';
import { computed, defineAsyncComponent, onBeforeUnmount, onMounted, ref, toRef, watch } from 'vue';
Expand Down Expand Up @@ -276,7 +277,7 @@ const isArtificialRecoveredEventItem = computed(
);
const isTrimmedManualExecutionDataItem = computed(
() => rawInputData.value?.[0]?.json?.__isTrimmedManualExecutionDataItem,
() => rawInputData.value?.[0]?.json?.[TRIMMED_TASK_DATA_CONNECTIONS_KEY],
);
const subworkflowExecutionError = computed(() => {
Expand Down
7 changes: 7 additions & 0 deletions packages/workflow/src/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,10 @@ export const LANGCHAIN_CUSTOM_TOOLS = [
export const SEND_AND_WAIT_OPERATION = 'sendAndWait';
export const AI_TRANSFORM_CODE_GENERATED_FOR_PROMPT = 'codeGeneratedForPrompt';
export const AI_TRANSFORM_JS_CODE = 'jsCode';

/**
* Key for an item standing in for a manual execution data item too large to be
* sent live via pubsub. See {@link TRIMMED_TASK_DATA_CONNECTIONS} in constants
* in `cli` package.
*/
export const TRIMMED_TASK_DATA_CONNECTIONS_KEY = '__isTrimmedManualExecutionDataItem';

0 comments on commit 17ff5a1

Please sign in to comment.