@n8n/decorators 1.32.2 → 1.34.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/build.tsbuildinfo +1 -1
- package/dist/context-establishment/context-establishment-hook-metadata.d.ts +2 -0
- package/dist/context-establishment/context-establishment-hook-metadata.js +5 -0
- package/dist/context-establishment/context-establishment-hook-metadata.js.map +1 -1
- package/dist/execution-lifecycle/lifecycle-metadata.d.ts +7 -1
- package/dist/execution-lifecycle/lifecycle-metadata.js.map +1 -1
- package/dist/pubsub/pubsub-metadata.d.ts +1 -1
- package/dist/pubsub/pubsub-metadata.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ContextEstablishmentHookClass } from './context-establishment-hook';
|
|
2
2
|
type ContextEstablishmentHookOptions = {
|
|
3
3
|
alwaysExecute: boolean;
|
|
4
|
+
runForSubExecution?: boolean;
|
|
4
5
|
};
|
|
5
6
|
type ContextEstablishmentHookEntry = {
|
|
6
7
|
class: ContextEstablishmentHookClass;
|
|
@@ -11,6 +12,7 @@ export declare class ContextEstablishmentHookMetadata {
|
|
|
11
12
|
register(hookEntry: ContextEstablishmentHookEntry): void;
|
|
12
13
|
getClasses(): ContextEstablishmentHookClass[];
|
|
13
14
|
getGlobalClasses(): ContextEstablishmentHookClass[];
|
|
15
|
+
getSubExecutionClasses(): ContextEstablishmentHookClass[];
|
|
14
16
|
}
|
|
15
17
|
export declare const ContextEstablishmentHook: <T extends ContextEstablishmentHookClass>(options?: ContextEstablishmentHookOptions) => (target: T) => any;
|
|
16
18
|
export {};
|
|
@@ -23,6 +23,11 @@ let ContextEstablishmentHookMetadata = class ContextEstablishmentHookMetadata {
|
|
|
23
23
|
.filter((entry) => entry.options?.alwaysExecute ?? false)
|
|
24
24
|
.map((entry) => entry.class);
|
|
25
25
|
}
|
|
26
|
+
getSubExecutionClasses() {
|
|
27
|
+
return [...this.contextEstablishmentHooks.values()]
|
|
28
|
+
.filter((entry) => entry.options?.runForSubExecution ?? false)
|
|
29
|
+
.map((entry) => entry.class);
|
|
30
|
+
}
|
|
26
31
|
};
|
|
27
32
|
exports.ContextEstablishmentHookMetadata = ContextEstablishmentHookMetadata;
|
|
28
33
|
exports.ContextEstablishmentHookMetadata = ContextEstablishmentHookMetadata = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-establishment-hook-metadata.js","sourceRoot":"","sources":["../../src/context-establishment/context-establishment-hook-metadata.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gCAA6C;
|
|
1
|
+
{"version":3,"file":"context-establishment-hook-metadata.js","sourceRoot":"","sources":["../../src/context-establishment/context-establishment-hook-metadata.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gCAA6C;AAwDtC,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAAtC;QAOW,8BAAyB,GAAuC,IAAI,GAAG,EAAE,CAAC;IAgE5F,CAAC;IAjDA,QAAQ,CAAC,SAAwC;QAChD,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/C,CAAC;IAgCD,UAAU;QACT,OAAO,CAAC,GAAG,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjF,CAAC;IAED,gBAAgB;QACf,OAAO,CAAC,GAAG,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,CAAC;aACjD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,aAAa,IAAI,KAAK,CAAC;aACxD,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED,sBAAsB;QACrB,OAAO,CAAC,GAAG,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,CAAC;aACjD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,kBAAkB,IAAI,KAAK,CAAC;aAC7D,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;CACD,CAAA;;2CAvEY,gCAAgC;IAD5C,IAAA,YAAO,GAAE;GACG,gCAAgC,CAuE5C;AAwEM,MAAM,wBAAwB,GACpC,CAA0C,OAAyC,EAAE,EAAE,CACvF,CAAC,MAAS,EAAE,EAAE;IAEb,cAAS,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC,QAAQ,CAAC;QACxD,KAAK,EAAE,MAAM;QACb,OAAO;KACP,CAAC,CAAC;IAIH,OAAO,IAAA,YAAO,GAAE,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC,CAAC;AAZU,QAAA,wBAAwB,GAAxB,wBAAwB,CAYlC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { IDataObject, IRun, IRunExecutionData, ITaskData, ITaskStartedData, IWorkflowBase, Workflow } from 'n8n-workflow';
|
|
1
|
+
import type { IDataObject, IRun, IRunExecutionData, ITaskData, ITaskStartedData, IWorkflowBase, Workflow, WorkflowExecuteMode, WorkflowExecutionSource } from 'n8n-workflow';
|
|
2
2
|
import type { Class } from '../types';
|
|
3
3
|
export type LifecycleHandlerClass = Class<Record<string, (ctx: LifecycleContext) => Promise<void> | void>>;
|
|
4
4
|
export type NodeExecuteBeforeContext = {
|
|
5
5
|
type: 'nodeExecuteBefore';
|
|
6
6
|
workflow: IWorkflowBase;
|
|
7
|
+
mode: WorkflowExecuteMode;
|
|
7
8
|
nodeName: string;
|
|
8
9
|
taskData: ITaskStartedData;
|
|
9
10
|
executionId: string;
|
|
@@ -11,6 +12,7 @@ export type NodeExecuteBeforeContext = {
|
|
|
11
12
|
export type NodeExecuteAfterContext = {
|
|
12
13
|
type: 'nodeExecuteAfter';
|
|
13
14
|
workflow: IWorkflowBase;
|
|
15
|
+
mode: WorkflowExecuteMode;
|
|
14
16
|
nodeName: string;
|
|
15
17
|
taskData: ITaskData;
|
|
16
18
|
executionData: IRunExecutionData;
|
|
@@ -19,6 +21,7 @@ export type NodeExecuteAfterContext = {
|
|
|
19
21
|
export type WorkflowExecuteBeforeContext = {
|
|
20
22
|
type: 'workflowExecuteBefore';
|
|
21
23
|
workflow: IWorkflowBase;
|
|
24
|
+
mode: WorkflowExecuteMode;
|
|
22
25
|
workflowInstance: Workflow;
|
|
23
26
|
executionData?: IRunExecutionData;
|
|
24
27
|
executionId: string;
|
|
@@ -26,14 +29,17 @@ export type WorkflowExecuteBeforeContext = {
|
|
|
26
29
|
export type WorkflowExecuteAfterContext = {
|
|
27
30
|
type: 'workflowExecuteAfter';
|
|
28
31
|
workflow: IWorkflowBase;
|
|
32
|
+
mode: WorkflowExecuteMode;
|
|
29
33
|
runData: IRun;
|
|
30
34
|
newStaticData: IDataObject;
|
|
31
35
|
executionId: string;
|
|
32
36
|
retryOf?: string;
|
|
37
|
+
source?: WorkflowExecutionSource;
|
|
33
38
|
};
|
|
34
39
|
export type WorkflowExecuteResumeContext = {
|
|
35
40
|
type: 'workflowExecuteResume';
|
|
36
41
|
workflow: IWorkflowBase;
|
|
42
|
+
mode: WorkflowExecuteMode;
|
|
37
43
|
workflowInstance: Workflow;
|
|
38
44
|
executionData: IRunExecutionData;
|
|
39
45
|
executionId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle-metadata.js","sourceRoot":"","sources":["../../src/execution-lifecycle/lifecycle-metadata.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gCAAkC;
|
|
1
|
+
{"version":3,"file":"lifecycle-metadata.js","sourceRoot":"","sources":["../../src/execution-lifecycle/lifecycle-metadata.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gCAAkC;AA0F3B,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAAvB;QACW,aAAQ,GAAuB,EAAE,CAAC;IASpD,CAAC;IAPA,QAAQ,CAAC,OAAyB;QACjC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED,WAAW;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;CACD,CAAA;;4BAVY,iBAAiB;IAD7B,IAAA,YAAO,GAAE;GACG,iBAAiB,CAU7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InstanceRole, InstanceType } from '@n8n/constants';
|
|
2
2
|
import type { EventHandler } from '../types';
|
|
3
|
-
export type PubSubEventName = 'add-webhooks-triggers-and-pollers' | 'remove-triggers-and-pollers' | 'clear-test-webhooks' | 'display-workflow-activation' | 'display-workflow-deactivation' | 'display-workflow-activation-error' | 'display-workflow-publication-status' | 'workflow-publish-wake-up' | 'community-package-install' | 'community-package-uninstall' | 'community-package-update' | 'get-worker-status' | 'stop-execution' | 'reload-external-secrets-providers' | 'reload-license' | 'reload-oidc-config' | 'reload-saml-config' | 'reload-overwrite-credentials' | 'response-to-get-worker-status' | 'restart-event-bus' | 'relay-execution-lifecycle-event' | 'relay-chat-stream-event' | 'relay-instance-ai-event' | 'relay-instance-ai-task-control' | 'relay-chat-human-message' | 'relay-chat-message-edit' | 'reload-sso-provisioning-configuration' | 'reload-source-control-config' | 'reload-mcp-registry' | 'reload-otel-config' | 'cancel-test-run' | 'cancel-collection' | 'agent-chat-integration-changed' | 'agent-chat-subscription-changed' | 'agent-config-changed' | 'agent-tasks-changed' | 'redaction-floor-changed';
|
|
3
|
+
export type PubSubEventName = 'add-webhooks-triggers-and-pollers' | 'remove-triggers-and-pollers' | 'clear-test-webhooks' | 'display-workflow-activation' | 'display-workflow-deactivation' | 'display-workflow-activation-error' | 'display-workflow-publication-status' | 'workflow-publish-wake-up' | 'community-package-install' | 'community-package-uninstall' | 'community-package-update' | 'get-worker-status' | 'stop-execution' | 'reload-external-secrets-providers' | 'reload-license' | 'reload-oidc-config' | 'reload-saml-config' | 'reload-overwrite-credentials' | 'response-to-get-worker-status' | 'restart-event-bus' | 'relay-execution-lifecycle-event' | 'relay-chat-stream-event' | 'relay-instance-ai-event' | 'relay-instance-ai-task-control' | 'relay-chat-human-message' | 'relay-chat-message-edit' | 'reload-sso-provisioning-configuration' | 'reload-source-control-config' | 'reload-mcp-registry' | 'reload-otel-config' | 'reload-instance-ai-settings' | 'cancel-test-run' | 'cancel-collection' | 'agent-chat-integration-changed' | 'agent-chat-subscription-changed' | 'agent-config-changed' | 'agent-tasks-changed' | 'redaction-floor-changed';
|
|
4
4
|
export type PubSubEventFilter = {
|
|
5
5
|
instanceType: 'main';
|
|
6
6
|
instanceRole?: Omit<InstanceRole, 'unset'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pubsub-metadata.js","sourceRoot":"","sources":["../../src/pubsub/pubsub-metadata.ts"],"names":[],"mappings":";;;;;;;;;AACA,gCAAkC;
|
|
1
|
+
{"version":3,"file":"pubsub-metadata.js","sourceRoot":"","sources":["../../src/pubsub/pubsub-metadata.ts"],"names":[],"mappings":";;;;;;;;;AACA,gCAAkC;AAyD3B,IAAM,cAAc,GAApB,MAAM,cAAc;IAApB;QACW,aAAQ,GAAyB,EAAE,CAAC;IAStD,CAAC;IAPA,QAAQ,CAAC,OAA2B;QACnC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED,WAAW;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;CACD,CAAA;;yBAVY,cAAc;IAD1B,IAAA,YAAO,GAAE;GACG,cAAc,CAU1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/decorators",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "src/index.ts",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"@types/lodash": "4.17.17",
|
|
15
15
|
"typescript": "7.0.2",
|
|
16
16
|
"vitest": "^4.1.9",
|
|
17
|
-
"zod": "3.25.
|
|
17
|
+
"zod": "3.25.76",
|
|
18
18
|
"@n8n/typescript-config": "1.9.0",
|
|
19
19
|
"@n8n/vitest-config": "1.19.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"lodash": "4.18.1",
|
|
23
|
-
"@n8n/api-types": "1.
|
|
23
|
+
"@n8n/api-types": "1.34.0",
|
|
24
|
+
"@n8n/constants": "0.33.0",
|
|
25
|
+
"@n8n/permissions": "0.71.0",
|
|
24
26
|
"@n8n/di": "0.16.0",
|
|
25
|
-
"
|
|
26
|
-
"@n8n/permissions": "0.69.0",
|
|
27
|
-
"n8n-workflow": "2.32.1"
|
|
27
|
+
"n8n-workflow": "2.34.0"
|
|
28
28
|
},
|
|
29
29
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
30
30
|
"homepage": "https://n8n.io",
|