@n8n/decorators 1.26.2 → 1.27.1
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/controller/index.d.ts +1 -1
- package/dist/controller/index.js +2 -1
- package/dist/controller/index.js.map +1 -1
- package/dist/controller/rate-limit.d.ts +1 -0
- package/dist/controller/rate-limit.js +7 -1
- package/dist/controller/rate-limit.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 +10 -10
|
@@ -7,4 +7,4 @@ export { ControllerRegistryMetadata } from './controller-registry-metadata';
|
|
|
7
7
|
export { Licensed } from './licensed';
|
|
8
8
|
export { GlobalScope, ProjectScope } from './scoped';
|
|
9
9
|
export type { AccessScope, Controller, CorsOptions, Method, StaticRouterMetadata, } from './types';
|
|
10
|
-
export { type RateLimiterLimits, type BodyKeyedRateLimiterConfig, type UserKeyedRateLimiterConfig, type KeyedRateLimiterConfig, createBodyKeyedRateLimiter, createUserKeyedRateLimiter, } from './rate-limit';
|
|
10
|
+
export { type RateLimiterLimits, type BodyKeyedRateLimiterConfig, type UserKeyedRateLimiterConfig, type KeyedRateLimiterConfig, createBodyKeyedRateLimiter, createUserKeyedRateLimiter, createIpRateLimit, } from './rate-limit';
|
package/dist/controller/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createUserKeyedRateLimiter = exports.createBodyKeyedRateLimiter = exports.ProjectScope = exports.GlobalScope = exports.Licensed = exports.ControllerRegistryMetadata = exports.Middleware = exports.Options = exports.Head = exports.Delete = exports.Patch = exports.Put = exports.Post = exports.Get = exports.RootLevelController = exports.RestController = exports.Param = exports.Query = exports.Body = void 0;
|
|
3
|
+
exports.createIpRateLimit = exports.createUserKeyedRateLimiter = exports.createBodyKeyedRateLimiter = exports.ProjectScope = exports.GlobalScope = exports.Licensed = exports.ControllerRegistryMetadata = exports.Middleware = exports.Options = exports.Head = exports.Delete = exports.Patch = exports.Put = exports.Post = exports.Get = exports.RootLevelController = exports.RestController = exports.Param = exports.Query = exports.Body = void 0;
|
|
4
4
|
var args_1 = require("./args");
|
|
5
5
|
Object.defineProperty(exports, "Body", { enumerable: true, get: function () { return args_1.Body; } });
|
|
6
6
|
Object.defineProperty(exports, "Query", { enumerable: true, get: function () { return args_1.Query; } });
|
|
@@ -29,4 +29,5 @@ Object.defineProperty(exports, "ProjectScope", { enumerable: true, get: function
|
|
|
29
29
|
var rate_limit_1 = require("./rate-limit");
|
|
30
30
|
Object.defineProperty(exports, "createBodyKeyedRateLimiter", { enumerable: true, get: function () { return rate_limit_1.createBodyKeyedRateLimiter; } });
|
|
31
31
|
Object.defineProperty(exports, "createUserKeyedRateLimiter", { enumerable: true, get: function () { return rate_limit_1.createUserKeyedRateLimiter; } });
|
|
32
|
+
Object.defineProperty(exports, "createIpRateLimit", { enumerable: true, get: function () { return rate_limit_1.createIpRateLimit; } });
|
|
32
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/controller/index.ts"],"names":[],"mappings":";;;AAAA,+BAA4C;AAAnC,4FAAA,IAAI,OAAA;AAAE,6FAAA,KAAK,OAAA;AAAE,6FAAA,KAAK,OAAA;AAC3B,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAC5B,iCAAuE;AAA9D,4FAAA,GAAG,OAAA;AAAE,6FAAA,IAAI,OAAA;AAAE,4FAAA,GAAG,OAAA;AAAE,8FAAA,KAAK,OAAA;AAAE,+FAAA,MAAM,OAAA;AAAE,6FAAA,IAAI,OAAA;AAAE,gGAAA,OAAO,OAAA;AACrD,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+EAA4E;AAAnE,0IAAA,0BAA0B,OAAA;AACnC,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,mCAAqD;AAA5C,qGAAA,WAAW,OAAA;AAAE,sGAAA,YAAY,OAAA;AAQlC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/controller/index.ts"],"names":[],"mappings":";;;AAAA,+BAA4C;AAAnC,4FAAA,IAAI,OAAA;AAAE,6FAAA,KAAK,OAAA;AAAE,6FAAA,KAAK,OAAA;AAC3B,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AACvB,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAC5B,iCAAuE;AAA9D,4FAAA,GAAG,OAAA;AAAE,6FAAA,IAAI,OAAA;AAAE,4FAAA,GAAG,OAAA;AAAE,8FAAA,KAAK,OAAA;AAAE,+FAAA,MAAM,OAAA;AAAE,6FAAA,IAAI,OAAA;AAAE,gGAAA,OAAO,OAAA;AACrD,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,+EAA4E;AAAnE,0IAAA,0BAA0B,OAAA;AACnC,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,mCAAqD;AAA5C,qGAAA,WAAW,OAAA;AAAE,sGAAA,YAAY,OAAA;AAQlC,2CAQsB;AAHrB,wHAAA,0BAA0B,OAAA;AAC1B,wHAAA,0BAA0B,OAAA;AAC1B,+GAAA,iBAAiB,OAAA"}
|
|
@@ -10,6 +10,7 @@ export interface UserKeyedRateLimiterConfig extends RateLimiterLimits {
|
|
|
10
10
|
source: 'user';
|
|
11
11
|
}
|
|
12
12
|
export type KeyedRateLimiterConfig = BodyKeyedRateLimiterConfig | UserKeyedRateLimiterConfig;
|
|
13
|
+
export declare const createIpRateLimit: (limit: number, windowMs?: number) => false | RateLimiterLimits;
|
|
13
14
|
export declare const createBodyKeyedRateLimiter: <T extends object>({ limit, windowMs, field, }: RateLimiterLimits & {
|
|
14
15
|
field: keyof T & string;
|
|
15
16
|
}) => BodyKeyedRateLimiterConfig;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createUserKeyedRateLimiter = exports.createBodyKeyedRateLimiter = void 0;
|
|
3
|
+
exports.createUserKeyedRateLimiter = exports.createBodyKeyedRateLimiter = exports.createIpRateLimit = void 0;
|
|
4
|
+
const createIpRateLimit = (limit, windowMs) => {
|
|
5
|
+
if (limit <= 0)
|
|
6
|
+
return false;
|
|
7
|
+
return windowMs === undefined ? { limit } : { limit, windowMs };
|
|
8
|
+
};
|
|
9
|
+
exports.createIpRateLimit = createIpRateLimit;
|
|
4
10
|
const createBodyKeyedRateLimiter = ({ limit, windowMs, field, }) => ({
|
|
5
11
|
source: 'body',
|
|
6
12
|
limit,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rate-limit.js","sourceRoot":"","sources":["../../src/controller/rate-limit.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"rate-limit.js","sourceRoot":"","sources":["../../src/controller/rate-limit.ts"],"names":[],"mappings":";;;AA4CO,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,QAAiB,EAA6B,EAAE;IAChG,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC7B,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACjE,CAAC,CAAC;AAHW,QAAA,iBAAiB,qBAG5B;AAcK,MAAM,0BAA0B,GAAG,CAAmB,EAC5D,KAAK,EACL,QAAQ,EACR,KAAK,GAGL,EAA8B,EAAE,CAAC,CAAC;IAClC,MAAM,EAAE,MAAM;IACd,KAAK;IACL,QAAQ;IACR,KAAK;CACL,CAAC,CAAC;AAXU,QAAA,0BAA0B,8BAWpC;AAYI,MAAM,0BAA0B,GAAG,CAAC,EAC1C,KAAK,EACL,QAAQ,GACW,EAA8B,EAAE,CAAC,CAAC;IACrD,MAAM,EAAE,MAAM;IACd,KAAK;IACL,QAAQ;CACR,CAAC,CAAC;AAPU,QAAA,0BAA0B,8BAOpC"}
|
|
@@ -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' | 'community-package-install' | 'community-package-uninstall' | 'community-package-update' | 'get-worker-status' | '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-chat-human-message' | 'relay-chat-message-edit' | 'reload-sso-provisioning-configuration' | 'reload-source-control-config' | 'reload-mcp-registry' | 'cancel-test-run' | 'cancel-collection' | 'agent-chat-integration-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' | 'community-package-install' | 'community-package-uninstall' | 'community-package-update' | 'get-worker-status' | '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-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';
|
|
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;AAmD3B,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;AAVY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,YAAO,GAAE;GACG,cAAc,CAU1B"}
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@n8n/decorators",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "src/index.ts",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist/**/*",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"LICENSE_EE.md",
|
|
10
|
+
"LICENSE.md"
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/express": "^5.0.1",
|
|
14
14
|
"@types/lodash": "4.17.17",
|
|
15
15
|
"vitest": "^4.1.1",
|
|
16
16
|
"zod": "3.25.67",
|
|
17
|
-
"@n8n/
|
|
18
|
-
"@n8n/
|
|
17
|
+
"@n8n/typescript-config": "1.6.0",
|
|
18
|
+
"@n8n/vitest-config": "1.15.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"lodash": "4.18.1",
|
|
22
|
-
"@n8n/
|
|
23
|
-
"@n8n/
|
|
24
|
-
"@n8n/
|
|
25
|
-
"@n8n/
|
|
26
|
-
"n8n-workflow": "2.
|
|
22
|
+
"@n8n/api-types": "1.27.0",
|
|
23
|
+
"@n8n/di": "0.14.0",
|
|
24
|
+
"@n8n/permissions": "0.64.0",
|
|
25
|
+
"@n8n/constants": "0.27.0",
|
|
26
|
+
"n8n-workflow": "2.27.0"
|
|
27
27
|
},
|
|
28
28
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
29
29
|
"homepage": "https://n8n.io",
|