@orthacms/utils-server 0.4.3 → 0.5.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/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { parseFilterTree } from './lib/filters/parse-filter-tree';
2
+ export { FILTER_MAX_LENGTH } from './lib/filters/budgets';
2
3
  export { applyFilterTree, type ApplyFilterTreeOptions, type FilterExtensionResolver } from './lib/filters/tree-to-drizzle';
3
4
  export type { DbLike, TableLike } from './lib/filters/table-helpers';
4
5
  export { FilterOperator, ScalarFieldType, RelationKind, WithinLastUnit } from './lib/filters/types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EACH,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC/B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACH,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,iBAAiB,EACjB,YAAY,EACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACR,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,UAAU,EACV,WAAW,EACX,UAAU,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,eAAe,EACf,eAAe,EACf,qBAAqB,EACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACH,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACH,OAAO,EACP,UAAU,EACV,eAAe,EACf,uBAAuB,EACvB,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,SAAS,EACT,KAAK,OAAO,EACf,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EACH,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC/B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACH,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAc,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,iBAAiB,EACjB,YAAY,EACf,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACR,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,UAAU,EACV,WAAW,EACX,UAAU,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,eAAe,EACf,eAAe,EACf,qBAAqB,EACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACH,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACH,OAAO,EACP,UAAU,EACV,eAAe,EACf,uBAAuB,EACvB,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,SAAS,EACT,KAAK,OAAO,EACf,MAAM,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NODE_ENVS = exports.defined = exports.when = exports.isProduction = exports.readNodeEnv = exports.readTrustProxy = exports.readFlag = exports.readOptionalList = exports.readList = exports.readOptionalPositiveInt = exports.readPositiveInt = exports.requireEnv = exports.readEnv = exports.violatedConstraint = exports.isUniqueViolation = exports.isForeignKeyViolation = exports.clampInt = exports.FilterSchemaException = exports.FilterErrorCode = exports.FilterException = exports.operatorsFor = exports.OPERATORS_BY_TYPE = exports.WithinLastUnit = exports.RelationKind = exports.ScalarFieldType = exports.FilterOperator = exports.applyFilterTree = exports.parseFilterTree = void 0;
3
+ exports.NODE_ENVS = exports.defined = exports.when = exports.isProduction = exports.readNodeEnv = exports.readTrustProxy = exports.readFlag = exports.readOptionalList = exports.readList = exports.readOptionalPositiveInt = exports.readPositiveInt = exports.requireEnv = exports.readEnv = exports.violatedConstraint = exports.isUniqueViolation = exports.isForeignKeyViolation = exports.clampInt = exports.FilterSchemaException = exports.FilterErrorCode = exports.FilterException = exports.operatorsFor = exports.OPERATORS_BY_TYPE = exports.WithinLastUnit = exports.RelationKind = exports.ScalarFieldType = exports.FilterOperator = exports.applyFilterTree = exports.FILTER_MAX_LENGTH = exports.parseFilterTree = void 0;
4
4
  var parse_filter_tree_1 = require("./lib/filters/parse-filter-tree");
5
5
  Object.defineProperty(exports, "parseFilterTree", { enumerable: true, get: function () { return parse_filter_tree_1.parseFilterTree; } });
6
+ var budgets_1 = require("./lib/filters/budgets");
7
+ Object.defineProperty(exports, "FILTER_MAX_LENGTH", { enumerable: true, get: function () { return budgets_1.FILTER_MAX_LENGTH; } });
6
8
  var tree_to_drizzle_1 = require("./lib/filters/tree-to-drizzle");
7
9
  Object.defineProperty(exports, "applyFilterTree", { enumerable: true, get: function () { return tree_to_drizzle_1.applyFilterTree; } });
8
10
  var types_1 = require("./lib/filters/types");
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Every ceiling the filter engine imposes, in one place.
3
+ *
4
+ * The engine's job is to accept a tree a stranger wrote. What stops that tree
5
+ * from being unbounded work is this file — nothing else. Four of these budgets
6
+ * count *structure* (how many rules, how deep, how long an `IN` list); the
7
+ * fifth counts *text*, and it was missing.
8
+ *
9
+ * ## What the DTO cap covers, and what it does not
10
+ *
11
+ * {@link FILTER_MAX_LENGTH} is the cap a caller's DTO puts on the whole
12
+ * serialised filter — `@MaxLength(FILTER_MAX_LENGTH)` on `?filter=`. It lives
13
+ * here rather than in each plugin because it was declared separately in four of
14
+ * them and one copy had drifted to 8192, so "the filter cap" meant two numbers
15
+ * depending on which endpoint you asked.
16
+ *
17
+ * It is a **transport** guard, and it only guards the paths where the filter
18
+ * arrives as a string. It does not reach:
19
+ *
20
+ * - **Alarm rules.** `CreateAlarmRuleDto.filter` is an already-parsed object
21
+ * (`@IsObject()`), because the authority on a filter tree's shape is this
22
+ * parser rather than a second copy of the grammar in decorators. `@MaxLength`
23
+ * is a string decorator and could not be applied to it.
24
+ * - **A stored alarm rule replayed from its `jsonb` column** — by the outbox
25
+ * subscriber, the periodic sweep, or `POST /rules/:id/rescan`. Nothing
26
+ * re-serialises it on the way out of the database, so there is no string to
27
+ * measure.
28
+ * - **The copilot's `admin_content_search` tool.** Its `filter` argument is an
29
+ * object too, and the registry's input check deliberately ignores `anyOf`, so
30
+ * the tree's contents reach the parser unexamined.
31
+ * - **GraphQL's entry loader**, which builds an id-`in` tree in code and casts
32
+ * past the DTO.
33
+ *
34
+ * On those four paths the parser *is* the boundary. That is why
35
+ * {@link DEFAULT_MAX_VALUE_LENGTH} exists: a budget declared on the DTO
36
+ * protects the endpoints that happen to have one, and a budget declared here
37
+ * protects every caller there will ever be.
38
+ */
39
+ /**
40
+ * Max length of a serialised filter payload, for the `@MaxLength` a caller
41
+ * puts on its own `?filter=` / `filter` DTO field.
42
+ *
43
+ * A coarse first latch ahead of the engine's own budgets: it refuses an
44
+ * oversized payload before `JSON.parse` sees it. It is deliberately generous —
45
+ * roughly a hundred UUID clauses — because it is not the real bound; the node,
46
+ * depth, list and value budgets below are.
47
+ *
48
+ * **The one number, and every DTO imports it from here.** `activity`,
49
+ * `content` and `users` each declared their own `4096` and `alarms` a `8192`
50
+ * that was applied to nothing at all; four declarations of one rule is three
51
+ * chances to answer a caller differently on two endpoints for the same filter.
52
+ */
53
+ export declare const FILTER_MAX_LENGTH = 4096;
54
+ /** Default `schema.maxDepth` — how many dotted relation hops a path may walk. */
55
+ export declare const DEFAULT_MAX_DEPTH = 3;
56
+ /** Default `schema.maxNodes` — how many groups + rules one tree may hold. */
57
+ export declare const DEFAULT_MAX_NODES = 50;
58
+ /** Default `schema.maxGroupDepth` — how deep `and`/`or` nesting may go. */
59
+ export declare const DEFAULT_MAX_GROUP_DEPTH = 5;
60
+ /** Default `schema.maxInListLength` — how many values one `in`/`nin` may name. */
61
+ export declare const DEFAULT_MAX_IN_LIST = 100;
62
+ /**
63
+ * Default `schema.maxValueLength` — how long one clause's **string** value may
64
+ * be, applied to each element of an `in` list as well as to a bare scalar.
65
+ *
66
+ * The number is {@link FILTER_MAX_LENGTH} on purpose, and the equality is the
67
+ * argument for it: a filter that arrives as a string is already capped at that
68
+ * length in total, so no value inside one can be longer. This budget therefore
69
+ * cannot refuse anything an HTTP caller could already send — it exists for the
70
+ * paths listed at the top of this file, which never meet the DTO at all, and
71
+ * where the alternative bound was the 1 MB body limit.
72
+ *
73
+ * What it stops is a single arbitrarily long `LIKE` pattern: `~~` is scanned
74
+ * against every candidate row, so the cost of one clause is the pattern's
75
+ * length times the table's, and nothing above the parser was measuring the
76
+ * first factor.
77
+ */
78
+ export declare const DEFAULT_MAX_VALUE_LENGTH = 4096;
79
+ //# sourceMappingURL=budgets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"budgets.d.ts","sourceRoot":"","sources":["../../../src/lib/filters/budgets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,wBAAwB,OAAoB,CAAC"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ /**
3
+ * Every ceiling the filter engine imposes, in one place.
4
+ *
5
+ * The engine's job is to accept a tree a stranger wrote. What stops that tree
6
+ * from being unbounded work is this file — nothing else. Four of these budgets
7
+ * count *structure* (how many rules, how deep, how long an `IN` list); the
8
+ * fifth counts *text*, and it was missing.
9
+ *
10
+ * ## What the DTO cap covers, and what it does not
11
+ *
12
+ * {@link FILTER_MAX_LENGTH} is the cap a caller's DTO puts on the whole
13
+ * serialised filter — `@MaxLength(FILTER_MAX_LENGTH)` on `?filter=`. It lives
14
+ * here rather than in each plugin because it was declared separately in four of
15
+ * them and one copy had drifted to 8192, so "the filter cap" meant two numbers
16
+ * depending on which endpoint you asked.
17
+ *
18
+ * It is a **transport** guard, and it only guards the paths where the filter
19
+ * arrives as a string. It does not reach:
20
+ *
21
+ * - **Alarm rules.** `CreateAlarmRuleDto.filter` is an already-parsed object
22
+ * (`@IsObject()`), because the authority on a filter tree's shape is this
23
+ * parser rather than a second copy of the grammar in decorators. `@MaxLength`
24
+ * is a string decorator and could not be applied to it.
25
+ * - **A stored alarm rule replayed from its `jsonb` column** — by the outbox
26
+ * subscriber, the periodic sweep, or `POST /rules/:id/rescan`. Nothing
27
+ * re-serialises it on the way out of the database, so there is no string to
28
+ * measure.
29
+ * - **The copilot's `admin_content_search` tool.** Its `filter` argument is an
30
+ * object too, and the registry's input check deliberately ignores `anyOf`, so
31
+ * the tree's contents reach the parser unexamined.
32
+ * - **GraphQL's entry loader**, which builds an id-`in` tree in code and casts
33
+ * past the DTO.
34
+ *
35
+ * On those four paths the parser *is* the boundary. That is why
36
+ * {@link DEFAULT_MAX_VALUE_LENGTH} exists: a budget declared on the DTO
37
+ * protects the endpoints that happen to have one, and a budget declared here
38
+ * protects every caller there will ever be.
39
+ */
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.DEFAULT_MAX_VALUE_LENGTH = exports.DEFAULT_MAX_IN_LIST = exports.DEFAULT_MAX_GROUP_DEPTH = exports.DEFAULT_MAX_NODES = exports.DEFAULT_MAX_DEPTH = exports.FILTER_MAX_LENGTH = void 0;
42
+ /**
43
+ * Max length of a serialised filter payload, for the `@MaxLength` a caller
44
+ * puts on its own `?filter=` / `filter` DTO field.
45
+ *
46
+ * A coarse first latch ahead of the engine's own budgets: it refuses an
47
+ * oversized payload before `JSON.parse` sees it. It is deliberately generous —
48
+ * roughly a hundred UUID clauses — because it is not the real bound; the node,
49
+ * depth, list and value budgets below are.
50
+ *
51
+ * **The one number, and every DTO imports it from here.** `activity`,
52
+ * `content` and `users` each declared their own `4096` and `alarms` a `8192`
53
+ * that was applied to nothing at all; four declarations of one rule is three
54
+ * chances to answer a caller differently on two endpoints for the same filter.
55
+ */
56
+ exports.FILTER_MAX_LENGTH = 4096;
57
+ /** Default `schema.maxDepth` — how many dotted relation hops a path may walk. */
58
+ exports.DEFAULT_MAX_DEPTH = 3;
59
+ /** Default `schema.maxNodes` — how many groups + rules one tree may hold. */
60
+ exports.DEFAULT_MAX_NODES = 50;
61
+ /** Default `schema.maxGroupDepth` — how deep `and`/`or` nesting may go. */
62
+ exports.DEFAULT_MAX_GROUP_DEPTH = 5;
63
+ /** Default `schema.maxInListLength` — how many values one `in`/`nin` may name. */
64
+ exports.DEFAULT_MAX_IN_LIST = 100;
65
+ /**
66
+ * Default `schema.maxValueLength` — how long one clause's **string** value may
67
+ * be, applied to each element of an `in` list as well as to a bare scalar.
68
+ *
69
+ * The number is {@link FILTER_MAX_LENGTH} on purpose, and the equality is the
70
+ * argument for it: a filter that arrives as a string is already capped at that
71
+ * length in total, so no value inside one can be longer. This budget therefore
72
+ * cannot refuse anything an HTTP caller could already send — it exists for the
73
+ * paths listed at the top of this file, which never meet the DTO at all, and
74
+ * where the alternative bound was the 1 MB body limit.
75
+ *
76
+ * What it stops is a single arbitrarily long `LIKE` pattern: `~~` is scanned
77
+ * against every candidate row, so the cost of one clause is the pattern's
78
+ * length times the table's, and nothing above the parser was measuring the
79
+ * first factor.
80
+ */
81
+ exports.DEFAULT_MAX_VALUE_LENGTH = exports.FILTER_MAX_LENGTH;
@@ -39,6 +39,13 @@ export declare const FilterErrorCode: {
39
39
  readonly EmptyInList: "FILTER_EMPTY_IN_LIST";
40
40
  /** `in`/`nin` value list exceeded `schema.maxInListLength` (default 100). */
41
41
  readonly MaxInListExceeded: "FILTER_MAX_IN_LIST_EXCEEDED";
42
+ /**
43
+ * A single clause's string value exceeded `schema.maxValueLength`
44
+ * (default 4096) — the engine's only budget over *text* rather than over
45
+ * the tree's structure. Reported per clause, naming the offending path, so
46
+ * a client can point at the rule rather than at the whole filter.
47
+ */
48
+ readonly ValueTooLong: "FILTER_VALUE_TOO_LONG";
42
49
  };
43
50
  /** One of the {@link FilterErrorCode} values. */
44
51
  export type FilterErrorCode = (typeof FilterErrorCode)[keyof typeof FilterErrorCode];
@@ -1 +1 @@
1
- {"version":3,"file":"filter-exceptions.d.ts","sourceRoot":"","sources":["../../../src/lib/filters/filter-exceptions.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,4BAA4B,EAC/B,MAAM,gBAAgB,CAAC;AAExB,sDAAsD;AACtD,eAAO,MAAM,eAAe;IACxB,2DAA2D;;IAE3D,mDAAmD;;IAEnD,iDAAiD;;IAEjD,sDAAsD;;IAEtD;;;;;;OAMG;;IAEH,8DAA8D;;IAE9D,oEAAoE;;IAEpE,uEAAuE;;IAEvE,uDAAuD;;IAEvD,2DAA2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C;AAE3D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,eAAgB,SAAQ,mBAAmB;IACpD,uCAAuC;IACvC,SAAgB,IAAI,EAAE,eAAe,CAAC;IACtC,yDAAyD;IACzD,SAAgB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;gBAGvD,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;CAkB5C;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,qBAAsB,SAAQ,4BAA4B;IACnE,wEAAwE;IACxE,SAAgB,IAAI,2BAA2B;gBAEnC,OAAO,EAAE,MAAM;CAQ9B"}
@@ -41,7 +41,14 @@ exports.FilterErrorCode = {
41
41
  */
42
42
  EmptyInList: 'FILTER_EMPTY_IN_LIST',
43
43
  /** `in`/`nin` value list exceeded `schema.maxInListLength` (default 100). */
44
- MaxInListExceeded: 'FILTER_MAX_IN_LIST_EXCEEDED'
44
+ MaxInListExceeded: 'FILTER_MAX_IN_LIST_EXCEEDED',
45
+ /**
46
+ * A single clause's string value exceeded `schema.maxValueLength`
47
+ * (default 4096) — the engine's only budget over *text* rather than over
48
+ * the tree's structure. Reported per clause, naming the offending path, so
49
+ * a client can point at the rule rather than at the whole filter.
50
+ */
51
+ ValueTooLong: 'FILTER_VALUE_TOO_LONG'
45
52
  };
46
53
  /**
47
54
  * Typed 400 exception thrown by the filter parser.
@@ -1 +1 @@
1
- {"version":3,"file":"parse-filter-tree.d.ts","sourceRoot":"","sources":["../../../src/lib/filters/parse-filter-tree.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAgB,UAAU,EAAE,MAAM,SAAS,CAAC;AAOtE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC3B,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,YAAY,GACrB,UAAU,GAAG,IAAI,CAoCnB"}
1
+ {"version":3,"file":"parse-filter-tree.d.ts","sourceRoot":"","sources":["../../../src/lib/filters/parse-filter-tree.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAgB,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAC3B,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,YAAY,GACrB,UAAU,GAAG,IAAI,CAqCnB"}
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseFilterTree = parseFilterTree;
4
+ const budgets_1 = require("./budgets");
4
5
  const filter_exceptions_1 = require("./filter-exceptions");
5
6
  const resolve_leaf_1 = require("./resolve-leaf");
6
- const DEFAULT_MAX_DEPTH = 3;
7
- const DEFAULT_MAX_NODES = 50;
8
- const DEFAULT_MAX_GROUP_DEPTH = 5;
9
- const DEFAULT_MAX_IN_LIST = 100;
10
7
  /**
11
8
  * Parse a `filter` payload into a tree the translator can walk. Two
12
9
  * input shapes are accepted:
@@ -44,10 +41,11 @@ function parseFilterTree(rawFilter, schema) {
44
41
  return null;
45
42
  const ctx = {
46
43
  nodeCount: 0,
47
- maxNodes: schema.maxNodes ?? DEFAULT_MAX_NODES,
48
- maxGroupDepth: schema.maxGroupDepth ?? DEFAULT_MAX_GROUP_DEPTH,
49
- maxDepth: schema.maxDepth ?? DEFAULT_MAX_DEPTH,
50
- maxInListLength: schema.maxInListLength ?? DEFAULT_MAX_IN_LIST
44
+ maxNodes: schema.maxNodes ?? budgets_1.DEFAULT_MAX_NODES,
45
+ maxGroupDepth: schema.maxGroupDepth ?? budgets_1.DEFAULT_MAX_GROUP_DEPTH,
46
+ maxDepth: schema.maxDepth ?? budgets_1.DEFAULT_MAX_DEPTH,
47
+ maxInListLength: schema.maxInListLength ?? budgets_1.DEFAULT_MAX_IN_LIST,
48
+ maxValueLength: schema.maxValueLength ?? budgets_1.DEFAULT_MAX_VALUE_LENGTH
51
49
  };
52
50
  return walkNode(obj, schema, 0, ctx);
53
51
  }
@@ -97,7 +95,7 @@ function walkNode(raw, schema, depth, ctx) {
97
95
  throw new filter_exceptions_1.FilterException(filter_exceptions_1.FilterErrorCode.InvalidNode, 'rule `op` must be a non-empty string');
98
96
  }
99
97
  const path = field.split('.');
100
- const leaf = (0, resolve_leaf_1.resolveLeaf)(path, op, node.value, schema, ctx.maxDepth, ctx.maxInListLength);
98
+ const leaf = (0, resolve_leaf_1.resolveLeaf)(path, op, node.value, schema, ctx);
101
99
  return toRule(leaf);
102
100
  }
103
101
  throw new filter_exceptions_1.FilterException(filter_exceptions_1.FilterErrorCode.InvalidNode, 'tree node must have `and`, `or`, or (`field` + `op`)');
@@ -1,8 +1,21 @@
1
1
  import type { FilterSchema, ParsedFilter } from './types';
2
+ /**
3
+ * The per-leaf budgets, passed as one object rather than as a growing tail of
4
+ * positional numbers — three `number` parameters in a row is a call site where
5
+ * transposing two of them typechecks.
6
+ */
7
+ export interface LeafLimits {
8
+ /** How many dotted relation hops the path may walk. */
9
+ maxDepth: number;
10
+ /** How many values one `in`/`nin` may name. */
11
+ maxInListLength: number;
12
+ /** How long one string value may be — see `budgets.ts`. */
13
+ maxValueLength: number;
14
+ }
2
15
  /**
3
16
  * Walk a single dotted path against the schema, validate the operator,
4
17
  * and coerce the value to the declared type. Produces the `ParsedFilter`
5
18
  * leaf shape the tree parser tags with `kind: 'rule'`.
6
19
  */
7
- export declare function resolveLeaf(path: string[], op: string, value: unknown, schema: FilterSchema, maxDepth: number, maxInListLength: number): ParsedFilter;
20
+ export declare function resolveLeaf(path: string[], op: string, value: unknown, schema: FilterSchema, limits: LeafLimits): ParsedFilter;
8
21
  //# sourceMappingURL=resolve-leaf.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-leaf.d.ts","sourceRoot":"","sources":["../../../src/lib/filters/resolve-leaf.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACR,YAAY,EACZ,YAAY,EAGf,MAAM,SAAS,CAAC;AAQjB;;;;GAIG;AACH,wBAAgB,WAAW,CACvB,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,GACxB,YAAY,CAkEd"}
1
+ {"version":3,"file":"resolve-leaf.d.ts","sourceRoot":"","sources":["../../../src/lib/filters/resolve-leaf.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACR,YAAY,EACZ,YAAY,EAGf,MAAM,SAAS,CAAC;AAQjB;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACvB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACvB,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,UAAU,GACnB,YAAY,CA6Dd"}
@@ -13,7 +13,8 @@ const UUID_CANONICAL = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f
13
13
  * and coerce the value to the declared type. Produces the `ParsedFilter`
14
14
  * leaf shape the tree parser tags with `kind: 'rule'`.
15
15
  */
16
- function resolveLeaf(path, op, value, schema, maxDepth, maxInListLength) {
16
+ function resolveLeaf(path, op, value, schema, limits) {
17
+ const { maxDepth } = limits;
17
18
  if (path.length === 0) {
18
19
  throw new filter_exceptions_1.FilterException(filter_exceptions_1.FilterErrorCode.EmptyPath, 'empty filter path');
19
20
  }
@@ -37,7 +38,7 @@ function resolveLeaf(path, op, value, schema, maxDepth, maxInListLength) {
37
38
  return {
38
39
  path,
39
40
  op: op,
40
- value: coerce(value, field, op, path, maxInListLength)
41
+ value: coerce(value, field, op, path, limits)
41
42
  };
42
43
  }
43
44
  const rel = (0, own_property_1.own)(relations, seg);
@@ -69,7 +70,8 @@ function assertOperatorAllowed(field, op, path) {
69
70
  }
70
71
  throw new filter_exceptions_1.FilterException(filter_exceptions_1.FilterErrorCode.OperatorNotAllowed, `operator "${op}" is not available on "${path.join('.')}" (a ${field.type} field)`, { path: path.join('.'), op, fieldType: field.type, allowed });
71
72
  }
72
- function coerce(raw, field, op, path, maxInListLength) {
73
+ function coerce(raw, field, op, path, limits) {
74
+ const { maxInListLength } = limits;
73
75
  const pathStr = path.join('.');
74
76
  if (op === types_1.FilterOperator.WithinLast) {
75
77
  return withinLastValue(raw, pathStr);
@@ -99,9 +101,9 @@ function coerce(raw, field, op, path, maxInListLength) {
99
101
  if (items.length > maxInListLength) {
100
102
  throw new filter_exceptions_1.FilterException(filter_exceptions_1.FilterErrorCode.MaxInListExceeded, `${op} value list exceeds max length ${maxInListLength}`, { path: pathStr, op, maxInListLength, length: items.length });
101
103
  }
102
- return items.map((v) => scalarOf(v, field, pathStr));
104
+ return items.map((v) => scalarOf(v, field, pathStr, limits));
103
105
  }
104
- return scalarOf(raw, field, pathStr);
106
+ return scalarOf(raw, field, pathStr, limits);
105
107
  }
106
108
  /** Units a `within_last` window may name, as a set for membership checks. */
107
109
  const WITHIN_LAST_UNITS = new Set(Object.values(types_1.WithinLastUnit));
@@ -131,7 +133,7 @@ function withinLastValue(raw, pathStr) {
131
133
  }
132
134
  return { n, unit: unit };
133
135
  }
134
- function scalarOf(v, field, pathStr) {
136
+ function scalarOf(v, field, pathStr, limits) {
135
137
  // A filter value has to be a scalar. `String(v)` on anything else produces
136
138
  // a plausible-looking string that is then MATCHED AGAINST rather than
137
139
  // rejected: `null` → `"null"`, a missing `value` key → `"undefined"`,
@@ -148,7 +150,24 @@ function scalarOf(v, field, pathStr) {
148
150
  ? 'value is required'
149
151
  : 'value must be a string, number or boolean', { path: pathStr, expectedType: field.type });
150
152
  }
153
+ // The only budget that counts *text*. Every other ceiling in this engine
154
+ // bounds the tree's structure — nodes, hops, group nesting, `in` list
155
+ // length — and a single clause can carry an arbitrarily long string through
156
+ // all of them. On the endpoints that own a DTO the `@MaxLength` on the
157
+ // whole serialised filter caps this first; on the paths that never meet one
158
+ // (an alarm rule replayed out of its `jsonb` column, the copilot's search
159
+ // tool, an internally-built tree) this check is the only bound there is,
160
+ // and the alternative was the 1 MB body limit. Applied to a `number` or
161
+ // `boolean` too, which is free: their `String(v)` is a handful of
162
+ // characters and can never trip it.
151
163
  const s = typeof v === 'string' ? v : String(v);
164
+ if (s.length > limits.maxValueLength) {
165
+ throw new filter_exceptions_1.FilterException(filter_exceptions_1.FilterErrorCode.ValueTooLong, `value exceeds max length ${limits.maxValueLength}`, {
166
+ path: pathStr,
167
+ maxValueLength: limits.maxValueLength,
168
+ length: s.length
169
+ });
170
+ }
152
171
  switch (field.type) {
153
172
  case types_1.ScalarFieldType.String:
154
173
  return s;
@@ -202,6 +202,16 @@ export interface FilterSchema {
202
202
  * elements inside one rule's value list).
203
203
  */
204
204
  maxInListLength?: number;
205
+ /**
206
+ * Longest string one clause's value may be — applied to each element of an
207
+ * `in` list as well as to a bare scalar. Defaults to 4096.
208
+ *
209
+ * The engine's only ceiling over **text**. Every other budget here bounds
210
+ * the tree's *structure*, and a caller that never passes a DTO (an alarm
211
+ * rule replayed out of storage, the copilot's search tool) can carry a
212
+ * megabyte-long `LIKE` pattern through all of them.
213
+ */
214
+ maxValueLength?: number;
205
215
  }
206
216
  /** Time units a {@link FilterOperator.WithinLast} window may be measured in. */
207
217
  export declare const WithinLastUnit: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/filters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE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E,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC5C,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,gFAAgF;AAChF,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,KAAK,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,UAAU,EAAE,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orthacms/utils-server",
3
- "version": "0.4.3",
3
+ "version": "0.5.0",
4
4
  "description": "@orthacms/utils-server — part of Ortha CMS.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/ortha-source/ortha-cms/tree/main/packages/utils/server",