@libreflare/worker-runtime 0.10.5 → 0.10.7

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.
Files changed (77) hide show
  1. package/README.md +86 -31
  2. package/dist/rule-evaluator/access-values.d.ts +27 -3
  3. package/dist/rule-evaluator/access-values.d.ts.map +1 -1
  4. package/dist/rule-evaluator/access-values.js +30 -9
  5. package/dist/rule-evaluator/access-values.js.map +1 -1
  6. package/dist/rule-evaluator/byte-strings.d.ts +6 -0
  7. package/dist/rule-evaluator/byte-strings.d.ts.map +1 -1
  8. package/dist/rule-evaluator/byte-strings.js +8 -0
  9. package/dist/rule-evaluator/byte-strings.js.map +1 -1
  10. package/dist/rule-evaluator/constants.d.ts +1 -1
  11. package/dist/rule-evaluator/constants.d.ts.map +1 -1
  12. package/dist/rule-evaluator/constants.js +5 -0
  13. package/dist/rule-evaluator/constants.js.map +1 -1
  14. package/dist/rule-evaluator/country-codes.generated.js +1 -1
  15. package/dist/rule-evaluator/diagnostics.d.ts +1 -1
  16. package/dist/rule-evaluator/diagnostics.d.ts.map +1 -1
  17. package/dist/rule-evaluator/diagnostics.js +5 -0
  18. package/dist/rule-evaluator/diagnostics.js.map +1 -1
  19. package/dist/rule-evaluator/edge-evaluation.d.ts +1 -1
  20. package/dist/rule-evaluator/edge-evaluation.d.ts.map +1 -1
  21. package/dist/rule-evaluator/edge-field-gaps.d.ts +30 -8
  22. package/dist/rule-evaluator/edge-field-gaps.d.ts.map +1 -1
  23. package/dist/rule-evaluator/edge-field-gaps.js +141 -16
  24. package/dist/rule-evaluator/edge-field-gaps.js.map +1 -1
  25. package/dist/rule-evaluator/edge-record.d.ts +3 -2
  26. package/dist/rule-evaluator/edge-record.d.ts.map +1 -1
  27. package/dist/rule-evaluator/edge-record.js +93 -21
  28. package/dist/rule-evaluator/edge-record.js.map +1 -1
  29. package/dist/rule-evaluator/engine-observations.generated.d.ts +38 -1
  30. package/dist/rule-evaluator/engine-observations.generated.d.ts.map +1 -1
  31. package/dist/rule-evaluator/engine-observations.generated.js +19 -2
  32. package/dist/rule-evaluator/engine-observations.generated.js.map +1 -1
  33. package/dist/rule-evaluator/explain.d.ts.map +1 -1
  34. package/dist/rule-evaluator/explain.js +45 -19
  35. package/dist/rule-evaluator/explain.js.map +1 -1
  36. package/dist/rule-evaluator/function-descriptions.d.ts +2 -0
  37. package/dist/rule-evaluator/function-descriptions.d.ts.map +1 -1
  38. package/dist/rule-evaluator/function-descriptions.generated.d.ts +131 -15
  39. package/dist/rule-evaluator/function-descriptions.generated.d.ts.map +1 -1
  40. package/dist/rule-evaluator/function-descriptions.generated.js +1173 -341
  41. package/dist/rule-evaluator/function-descriptions.generated.js.map +1 -1
  42. package/dist/rule-evaluator/function-descriptions.js.map +1 -1
  43. package/dist/rule-evaluator/function-signature-validation.d.ts.map +1 -1
  44. package/dist/rule-evaluator/function-signature-validation.js +33 -3
  45. package/dist/rule-evaluator/function-signature-validation.js.map +1 -1
  46. package/dist/rule-evaluator/functions.d.ts +17 -4
  47. package/dist/rule-evaluator/functions.d.ts.map +1 -1
  48. package/dist/rule-evaluator/functions.js +181 -38
  49. package/dist/rule-evaluator/functions.js.map +1 -1
  50. package/dist/rule-evaluator/minifier.d.ts +9 -0
  51. package/dist/rule-evaluator/minifier.d.ts.map +1 -1
  52. package/dist/rule-evaluator/minifier.js +23 -0
  53. package/dist/rule-evaluator/minifier.js.map +1 -1
  54. package/dist/rule-evaluator/operators.d.ts.map +1 -1
  55. package/dist/rule-evaluator/operators.js +15 -6
  56. package/dist/rule-evaluator/operators.js.map +1 -1
  57. package/dist/rule-evaluator/parse-cache.d.ts +3 -1
  58. package/dist/rule-evaluator/parse-cache.d.ts.map +1 -1
  59. package/dist/rule-evaluator/parse-cache.js +4 -0
  60. package/dist/rule-evaluator/parse-cache.js.map +1 -1
  61. package/dist/rule-evaluator/parser.d.ts +7 -1
  62. package/dist/rule-evaluator/parser.d.ts.map +1 -1
  63. package/dist/rule-evaluator/parser.js +14 -0
  64. package/dist/rule-evaluator/parser.js.map +1 -1
  65. package/dist/rule-evaluator/quantifier.d.ts +2 -0
  66. package/dist/rule-evaluator/quantifier.d.ts.map +1 -1
  67. package/dist/rule-evaluator/quantifier.js +18 -9
  68. package/dist/rule-evaluator/quantifier.js.map +1 -1
  69. package/dist/rule-evaluator/validation.d.ts +1 -0
  70. package/dist/rule-evaluator/validation.d.ts.map +1 -1
  71. package/dist/rule-evaluator/validation.js +103 -19
  72. package/dist/rule-evaluator/validation.js.map +1 -1
  73. package/dist/rule-evaluator/wildcard.d.ts +2 -0
  74. package/dist/rule-evaluator/wildcard.d.ts.map +1 -1
  75. package/dist/rule-evaluator/wildcard.js +7 -8
  76. package/dist/rule-evaluator/wildcard.js.map +1 -1
  77. package/package.json +1 -1
package/README.md CHANGED
@@ -54,14 +54,14 @@ Analysis:
54
54
 
55
55
  Validation:
56
56
 
57
- - `validateRuleExpressionSyntax`: syntax, length, and field availability validation for Cloudflare URL Rewrite Rule filter expressions by default. Pass an explicit config object for minification, length enforcement, preset, field availability, deprecated-field notices, and list-reference policy. The presets are `url-rewrite-filter`, `url-rewrite-target`, `custom-rule` for the Custom Rules of a zone, and `logging-source-key`. With minification enabled it validates the minified expression against Cloudflare's 4096-character rule limit by default; when minification is disabled, the result omits `minifiedExpression` and `minifiedLength`.
57
+ - `validateRuleExpressionSyntax`: syntax, length, and field availability validation for Cloudflare URL Rewrite Rule filter expressions by default. Pass an explicit config object for minification, length enforcement, preset, field availability, deprecated-field notices, and list-reference policy. The presets are `url-rewrite-filter`, `url-rewrite-target`, which reads the expression as one value rather than a condition, `custom-rule` for the Custom Rules of a zone, and `logging-source-key`. With minification enabled it validates the minified expression against Cloudflare's 4096-character rule limit by default; when minification is disabled, the result omits `minifiedExpression` and `minifiedLength`.
58
58
  - `validateLoggingSourceKeyRuleExpressionSyntax`: runtime-only source-key rule validation using the pre-origin field context, without Custom List references or deployment length enforcement.
59
59
  - `trimRuleExpression`: the expression without the whitespace Cloudflare trims off its ends, which is every character Unicode counts as whitespace: unlike `String.prototype.trim()`, it keeps U+FEFF and trims U+0085. Validation reads the expression trimmed this way, so its diagnostic positions count from the first character that is not whitespace, `source.search(/\P{White_Space}/u)`.
60
60
 
61
61
  Formatting:
62
62
 
63
63
  - `normalizeRuleExpression`: syntax-aware readable formatter that preserves operator notation, grouping, and string literal spelling while canonicalizing grammar whitespace.
64
- - `minifyRuleExpression`: syntax-aware minifier for Cloudflare Rules expressions before Rewrite Rule deployment. It uses C-like operators, removes precedence-redundant grouping, and preserves string literal spelling. Syntax-invalid source is returned unchanged with diagnostics.
64
+ - `minifyRuleExpression`: syntax-aware minifier for Cloudflare Rules expressions before Rewrite Rule deployment. It uses C-like operators, removes precedence-redundant grouping, and preserves string literal spelling. Syntax-invalid source is returned unchanged with diagnostics. It reads the expression as a condition; `validateRuleExpressionSyntax` with the `url-rewrite-target` preset gives a rewrite target's `minifiedExpression`.
65
65
 
66
66
  String literals:
67
67
 
@@ -128,7 +128,7 @@ documented fields and the observed differences apart, and `fieldAvailability`
128
128
  can still allow a field the engine was observed to reject. Cloudflare documents
129
129
  no field list for Custom Rules, so theirs is the observed one. The catalog also
130
130
  has fields and functions that Cloudflare's references lack and dry runs accepted,
131
- such as `cf.zone.plan`, `encode_hex()` and `filter()`. Source-key rules run in
131
+ such as `cf.zone.plan` and `filter()`. Source-key rules run in
132
132
  the Worker rather than in a Cloudflare phase, so the URL rewrite phase's
133
133
  observed differences do not apply to them.
134
134
 
@@ -178,12 +178,24 @@ results that large round, and so do the comparisons and `to_string()` output
178
178
  that use them. An integer `hash_in_range()` seed that large gives an unknown
179
179
  result instead, since a rounded seed hashes into an unrelated bucket.
180
180
 
181
+ A rewrite target is one field, with or without access, such as
182
+ `http.request.headers["x"][0]`, or one function call, and it must give a
183
+ String, as Cloudflare reads it. A literal gets
184
+ `syntax.literal_instead_of_field_or_call`. A target in parentheses, or a
185
+ condition, gets `syntax.condition_instead_of_value`, with no other checks of
186
+ what it holds. A field or call of another type, such as `ssl`, `len(...)` or
187
+ `http.request.headers.names[*]`, gets `rule_expression.result_type_mismatch`,
188
+ whose `expectedType` is `String`. A target gets no
189
+ `field.header_index_requires_guard`, since its `has_key()` guard can go only
190
+ in the rule's filter.
191
+
181
192
  URL rewrite filters and rewrite targets also reject the functions the URL
182
193
  rewrite phase does not accept, such as `split()` in either and `to_string()`
183
- in filters, with `function.unavailable`. Rewrite targets reject operators,
184
- quantifiers, and conditions used as function arguments, such as `eq`, `any()`,
185
- and `to_string((ssl))`, with `operator.unavailable`. In both, `concat()` can
186
- appear only once.
194
+ and `format_date()` in filters, with `function.unavailable`. Rewrite targets
195
+ reject operators and quantifiers, as in `to_string(http.host eq "x")` and
196
+ `any(...)`, and conditions used as function arguments, as in
197
+ `to_string((ssl))`, with `operator.unavailable`.
198
+ `concat()` can appear only once in filters, and three times in rewrite targets.
187
199
 
188
200
  Custom Rules also reject some functions with `function.unavailable`, such as
189
201
  `split()`, or `join()` and `wildcard_replace()`, which URL rewrite filters
@@ -262,9 +274,10 @@ values are converted to that type, so a numeric `request.cf` value that
262
274
  arrives as decimal text still compares as a number. Strings are ordered by code
263
275
  point, which matches Cloudflare's byte order, with bytes that are not UTF-8
264
276
  ordered as bytes, and IP addresses are compared as addresses rather than as
265
- text. A field value that does not represent its declared type, such as other
266
- text for a Number field or a number for a String field, is unknown, with a
267
- warning.
277
+ text. IP addresses are ordered within one IP version: an IPv4 and an IPv6
278
+ address are unordered, so `lt`, `le`, `gt` and `ge` never match them. A
279
+ field value that does not represent its declared type, such as other text for
280
+ a Number field or a number for a String field, is unknown, with a warning.
268
281
 
269
282
  ### Literals and Inline Lists
270
283
 
@@ -678,8 +691,9 @@ Values the evaluator cannot resolve are unknown rather than nil. These include
678
691
  `raw.*` URI fields in Worker context, request metadata missing from the
679
692
  request, such as `request.cf` properties or the `cf-connecting-ip` header behind
680
693
  `ip.src`, which the Remove visitor IP headers Managed Transform removes, and
681
- results of functions it cannot reproduce, such as `hmac_sha256()`, the hash
682
- functions `md5()`, `sha1()`, `sha256()` and `sha512()`, and `is_jwt_valid()`,
694
+ results of functions it cannot reproduce, such as the HMAC functions and
695
+ `sign_sigv4_hmac_sha256()`, the hash functions `md5()`, `sha1()`, `sha256()`
696
+ and `sha512()`, and `is_jwt_valid()`,
683
697
  or whose result holds more than 524,288 characters, counting each array element
684
698
  as at least 8, or just 8 in `concat()` of arrays; the elements of an array that
685
699
  fit stay known. An unknown value makes the functions and comparisons that use it
@@ -785,8 +799,9 @@ rewrite matched. When several rewrites match, the last one sets the path,
785
799
  since each reads the visitor's values.
786
800
 
787
801
  `evaluateEdgeRecordRules()` evaluates every Custom Rule a record lists, each
788
- once, with the rule version, route application and logged fields in effect at
789
- the record's time, its `_time`, which Cloudflare's `EdgeStartTimestamp` sets:
802
+ once and in the order it is last listed, with the rule version, route
803
+ application and logged fields in effect at the record's time, its `_time`,
804
+ which Cloudflare's `EdgeStartTimestamp` sets:
790
805
 
791
806
  - When the last route rewrite in `MatchedRules`, by each application's
792
807
  `rewriteRuleId`, is a route's, every rule is evaluated with that route's
@@ -844,15 +859,14 @@ expression alone, so that a dashboard can say what evaluation will leave
844
859
  unknown and what would fix it:
845
860
 
846
861
  - `fields`: fields no record holds, as [Fields](#fields) lists them. A
847
- header map read whole, its names and values, the Host header's values, and
848
- the X-Forwarded-Proto and Cookie headers are among them. So are Range,
849
- which Cloudflare accepts as a custom field but does not log, and a header
850
- or cookie name that is not a token, which no custom field can log.
851
- Logpush keys a cookie by its name in lowercase, so two cookies whose names
852
- differ only in case cannot both be logged: a cookie is among them when
853
- another logged cookie's name differs from its only in case, or, when the
854
- zone does not log it, another token that the expression reads and the zone
855
- does not log.
862
+ header map read whole, its names and values, unless looked up by name as
863
+ `headers` tells, and the Host header's values are among them. So is a
864
+ cookie name that is not a token, which no custom field can log. Logpush
865
+ keys a cookie by its name in lowercase, so two cookies whose names differ
866
+ only in case cannot both be logged: a cookie is among them when another
867
+ logged cookie's name differs from its only in case, or, when the zone does
868
+ not log it, another token that the expression reads and the zone does not
869
+ log.
856
870
  - `tlsHashes`: the two TLS client hashes, unless the zone copies them.
857
871
  - `headers`: request headers the zone does not log raw, in lowercase,
858
872
  including those it logs transformed. A header counts as read by name
@@ -864,7 +878,25 @@ unknown and what would fix it:
864
878
  Host's values, or a call such as `lower()` of operands that never are.
865
879
  Called for each element of an array, as `[*]` on its first operand makes
866
880
  any call, a call gives nil only when that array is nil, and `coalesce()`
867
- takes each element, which is never nil. Logging it raw adds it.
881
+ takes each element, which is never nil. A header also counts as looked up
882
+ by name among the header names, plain or raw, in a lookup that the record
883
+ decides for a header the zone logs raw, by the name in lowercase (see
884
+ [Fields](#fields)), but where `any()` or `all()` pairs the names with
885
+ another list's elements, whose places they do not share. Logging it raw
886
+ adds it.
887
+ - `unresolvableHeaders`: request headers that logging leaves unknown,
888
+ whatever the zone logs. Read or looked up by name, as `headers` tells, in
889
+ lowercase: the Cookie header, which holds cookies the zone may not log,
890
+ X-Forwarded-Proto, which Cloudflare adds but not to the request it rebuilds
891
+ on a challenge solve, Range, which Cloudflare accepts as a custom field but
892
+ does not log, and a name that is not a token, which no custom field can
893
+ log.
894
+ - `headerPatterns`: the patterns with a `*` that `wildcard` or
895
+ `strict wildcard` compares each header name with in `any()` or `all()`,
896
+ as `headers` tells of lookups by name, which logging leaves unknown too: a
897
+ record shows a logged header that matches, but not that no other one does.
898
+ As written, but with ASCII letters in lowercase for `wildcard`, which
899
+ ignores their case. A pattern without `*` looks a header up by name.
868
900
  - `cookies`: cookies read by name that the zone does not log, matched by
869
901
  case. Logging it adds it.
870
902
 
@@ -877,6 +909,12 @@ counts as taking the values, so the gaps can list a header whose value the
877
909
  evaluator does not need, such as Host in
878
910
  `len(coalesce(http.request.headers["host"][*], ""))`, or one compared with
879
911
  each element of an array of which only the length is read.
912
+ A lookup among the header names counts by its name or pattern alone, so the
913
+ gaps list one that Host's name decides, which holds or fails on every
914
+ request, such as `any(http.request.headers.names[*] ne "x-a")`. They list
915
+ the names as a field when `coalesce()` gives them. Logging a header looked
916
+ up by a name in a case the names do not have leaves the lookup unknown where
917
+ the client sent the header (see [Limits](#limits)).
880
918
  A header map key with uppercase letters reads no header, as the engine's
881
919
  keys are lowercase. The match-all expression `true` reads no field. A field
882
920
  a record holds can still be missing from one, such as the TLS version over
@@ -973,13 +1011,25 @@ or other live requests showed equal, or what follows from it:
973
1011
  `Content-Length`, which the engine spells in title case over HTTP/2. Over
974
1012
  HTTP/1, names keep the client's spelling, so only `Host`, `Connection`,
975
1013
  `Upgrade` and `Content-Length`, which the engine spells itself, are known.
1014
+ - A header name the record does not show is still known not to be some
1015
+ names, in any case of their letters. One it lists over HTTP/1 is its
1016
+ key in another case, and the names of the headers the zone did not log
1017
+ are not Host's, nor a header's the zone logs raw that the client did not
1018
+ send. So the record decides a lookup of such a header among the names: a
1019
+ comparison of each name with a string by `eq` or `ne`, with an inline
1020
+ list of strings by `in`, or with a pattern without `*` by `wildcard` or
1021
+ `strict wildcard`, in `any()` or `all()`, also through `lower()` and
1022
+ `upper()`, which change only the case of letters, and `has_value()` of
1023
+ the names or of `lower()` or `upper()` of them. Through other calls, and
1024
+ in arrays made from the names, as `concat()` and `filter()` make them,
1025
+ the names the record does not show are unknown.
976
1026
  - The order of the header names and values is unknown, and so are the
977
1027
  headers the zone did not log. So `any()` or `all()` over them with an
978
1028
  inline list, which names the member the first header matched, gives a
979
1029
  branch for each member a value can match first, those the record's headers
980
1030
  match first. A header the zone did not log is taken as able to hold any
981
- value, even through a function such as `lower()`, so a branch can be listed
982
- that the function cannot give.
1031
+ value but the names it surely is not, even through a function such as
1032
+ `lower()`, so a branch can be listed that the function cannot give.
983
1033
  - `cf.verified_bot_category` reads the record's category, and is empty
984
1034
  without one, so `cf.client.bot` is false. A record without `request.cf`
985
1035
  leaves both unknown.
@@ -1000,10 +1050,13 @@ otherwise.
1000
1050
  condition on one is evaluated both ways, for up to three in one condition,
1001
1051
  and is unknown where the two differ. Past three, it is unknown, with a
1002
1052
  branch for each inline list member it can name, and for an `all()`, the
1003
- one that names none. So a condition on a logged header's
1004
- value, such as `any(http.request.headers["sec-fetch-dest"][*] eq
1005
- "empty")`, stays known, while one on its presence, such as `has_key()`, is
1006
- never decided by its absence. Its chain carries the mark, so its hash
1053
+ one that names none. Where lookups among the header names make it pass
1054
+ three, it is tried again with them reading only the headers it reads
1055
+ otherwise when none was sent, and is known if that settles it, with the
1056
+ branches of both tries. So a condition on a logged header's value, such
1057
+ as `any(http.request.headers["sec-fetch-dest"][*] eq "empty")`, stays
1058
+ known, while one on its presence, such as `has_key()` or a
1059
+ lookup among the header names, is never decided by its absence. Its chain carries the mark, so its hash
1007
1060
  differs from the Managed Worker's for the same branch. An empty `Referer` or
1008
1061
  `User-Agent` reads as empty either way, though the engine lists the header.
1009
1062
  A record read with `keepsEmptyValues` is not read both ways, but for
@@ -1015,7 +1068,9 @@ otherwise.
1015
1068
  gives a branch for each member, even members the record's value rules out.
1016
1069
  - A header sent twice is taken as sent once, with its first value, which is
1017
1070
  all Logpush logs. The engine has both values. Cookies are taken as sent once
1018
- too.
1071
+ too. The header names list a header the record holds once, so the names it
1072
+ does not show may repeat it, which leaves a lookup that its listed name does
1073
+ not decide unknown, as one by its name in another case.
1019
1074
  - A rewrite rule of the operator's own is not evaluated. With no route
1020
1075
  rewrite listed, a rule that reads a path one of them changed is
1021
1076
  `disagreed`, and after a route's rewrite, the path is unknown. The query
@@ -19,6 +19,16 @@ export declare class OptionalElement {
19
19
  }
20
20
  /** An element a partly known array lists. */
21
21
  export type ArrayElement = ElementValue | OptionalElement;
22
+ /**
23
+ * Whether an element of a partly known array surely is not a value, in any
24
+ * case of its ASCII letters: the element listed at an index, or, at or past
25
+ * the elements it lists, any it does not list. It tells only of elements it
26
+ * does not know. Calls that change only the case of letters, such as
27
+ * lower(), keep it true of their results. With `inEveryReading`, it is true
28
+ * only where no reading of an edge record changes it, and records no read;
29
+ * see EdgeFieldSource.eitherWay().
30
+ */
31
+ export type ElementExclusion = (index: number, value: CfValue, inEveryReading?: boolean) => boolean;
22
32
  /** The element listed, as it is where the array has it. */
23
33
  export declare function listedElement(listed: ArrayElement): ElementValue;
24
34
  /** An element in the place of one listed, which an array lacks where it lacks that one. */
@@ -40,6 +50,15 @@ export declare class PartialArrayValue {
40
50
  readonly more: UnknownElement | undefined;
41
51
  /** How many of the elements listed come before any that is not. */
42
52
  readonly moreFrom: number;
53
+ /**
54
+ * What its unknown elements surely are not, when that is known. Only the
55
+ * array a field gives has it, and the array lower() or upper() gives from
56
+ * one, which a call such as coalesce() may give back as it is: another
57
+ * made from it, by access, another call or a condition, holds other
58
+ * elements, or the same in other places, or other elements it does not
59
+ * list, as concat() joins them.
60
+ */
61
+ readonly excludes?: ElementExclusion | undefined;
43
62
  /** How many elements the array surely has. */
44
63
  readonly shortest: number;
45
64
  /** How many elements at its start have certain positions. */
@@ -50,10 +69,15 @@ export declare class PartialArrayValue {
50
69
  /**
51
70
  * An array of elements, known in part when one is unknown or may be lacking,
52
71
  * or when it may hold `more`, which then come after the first `moreFrom`.
72
+ * `excludes` tells what its unknown elements surely are not.
73
+ */
74
+ static from(elements: readonly ArrayElement[], more?: UnknownElement, moreFrom?: number, excludes?: ElementExclusion): CfValue[] | PartialArrayValue;
75
+ /**
76
+ * Why the array may hold a matching element besides the known ones it
77
+ * surely has, when it may. Only `sought` matches, when it is given, so an
78
+ * unknown element that surely is not it cannot.
53
79
  */
54
- static from(elements: readonly ArrayElement[], more?: UnknownElement, moreFrom?: number): CfValue[] | PartialArrayValue;
55
- /** Why the array may hold a matching element besides the known ones it surely has, when it may. */
56
- unknownMatch(matches: (value: CfValue) => boolean): UnknownElement | undefined;
80
+ unknownMatch(matches: (value: CfValue) => boolean, sought?: CfValue): UnknownElement | undefined;
57
81
  /** Why the whole array is unknown. */
58
82
  unknown(): Unknown;
59
83
  /** The first reason why the array is not known whole. */
@@ -1 +1 @@
1
- {"version":3,"file":"access-values.d.ts","sourceRoot":"","sources":["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wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,UAAU,EAAE,GAAG,OAAO,CAE/F"}
@@ -35,6 +35,7 @@ export class PartialArrayValue {
35
35
  elements;
36
36
  more;
37
37
  moreFrom;
38
+ excludes;
38
39
  /** How many elements the array surely has. */
39
40
  shortest;
40
41
  /** How many elements at its start have certain positions. */
@@ -45,10 +46,20 @@ export class PartialArrayValue {
45
46
  /** Why the array may hold elements it does not list, when it may. */
46
47
  more,
47
48
  /** How many of the elements listed come before any that is not. */
48
- moreFrom) {
49
+ moreFrom,
50
+ /**
51
+ * What its unknown elements surely are not, when that is known. Only the
52
+ * array a field gives has it, and the array lower() or upper() gives from
53
+ * one, which a call such as coalesce() may give back as it is: another
54
+ * made from it, by access, another call or a condition, holds other
55
+ * elements, or the same in other places, or other elements it does not
56
+ * list, as concat() joins them.
57
+ */
58
+ excludes) {
49
59
  this.elements = elements;
50
60
  this.more = more;
51
61
  this.moreFrom = moreFrom;
62
+ this.excludes = excludes;
52
63
  let optional = 0;
53
64
  let leading = moreFrom;
54
65
  let unknownLength = more;
@@ -69,28 +80,38 @@ export class PartialArrayValue {
69
80
  /**
70
81
  * An array of elements, known in part when one is unknown or may be lacking,
71
82
  * or when it may hold `more`, which then come after the first `moreFrom`.
83
+ * `excludes` tells what its unknown elements surely are not.
72
84
  */
73
- static from(elements, more, moreFrom = 0) {
85
+ static from(elements, more, moreFrom = 0, excludes) {
74
86
  if (more)
75
- return new PartialArrayValue(elements, more, moreFrom);
87
+ return new PartialArrayValue(elements, more, moreFrom, excludes);
76
88
  const values = [];
77
89
  for (const listed of elements) {
78
90
  if (listed instanceof OptionalElement || isUnknownElement(listed))
79
- return new PartialArrayValue(elements, undefined, elements.length);
91
+ return new PartialArrayValue(elements, undefined, elements.length, excludes);
80
92
  values.push(listed.value);
81
93
  }
82
94
  return values;
83
95
  }
84
- /** Why the array may hold a matching element besides the known ones it surely has, when it may. */
85
- unknownMatch(matches) {
86
- for (const listed of this.elements) {
96
+ /**
97
+ * Why the array may hold a matching element besides the known ones it
98
+ * surely has, when it may. Only `sought` matches, when it is given, so an
99
+ * unknown element that surely is not it cannot.
100
+ */
101
+ unknownMatch(matches, sought) {
102
+ const excluded = (index) => sought !== undefined && this.excludes?.(index, sought) === true;
103
+ for (let index = 0; index < this.elements.length; index++) {
104
+ const listed = this.elements[index];
87
105
  const element = listedElement(listed);
88
- if (isUnknownElement(element))
106
+ if (isUnknownElement(element)) {
107
+ if (excluded(index))
108
+ continue;
89
109
  return element;
110
+ }
90
111
  if (listed instanceof OptionalElement && matches(element.value))
91
112
  return listed.reason;
92
113
  }
93
- return this.more;
114
+ return this.more && !excluded(this.elements.length) ? this.more : undefined;
94
115
  }
95
116
  /** Why the whole array is unknown. */
96
117
  unknown() {
@@ -1 +1 @@
1
- {"version":3,"file":"access-values.js","sourceRoot":"","sources":["../../src/rule-evaluator/access-values.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,KAAK,EAA4C,MAAM,cAAc,CAAC;AAe1F,MAAM,UAAU,gBAAgB,CAAC,OAAsB;IACtD,OAAO,OAAO,OAAO,KAAK,UAAU,CAAC;AACtC,CAAC;AAED,sEAAsE;AACtE,MAAM,OAAO,eAAe;IAEjB;IACA;IAFV,YACU,OAAqB,EACrB,MAAsB;QADtB,YAAO,GAAP,OAAO,CAAc;QACrB,WAAM,GAAN,MAAM,CAAgB;IAC7B,CAAC;CACJ;AAKD,2DAA2D;AAC3D,MAAM,UAAU,aAAa,CAAC,MAAoB;IACjD,OAAO,MAAM,YAAY,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;AACpE,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,SAAS,CAAC,MAAoB,EAAE,OAAqB;IACpE,OAAO,MAAM,YAAY,eAAe,CA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ED,OAAO,OAAO,CAAC;AAChB,CAAC"}
@@ -10,6 +10,12 @@
10
10
  */
11
11
  /** Holds bytes as a string, escaping each byte that is not part of a UTF-8 character. */
12
12
  export declare function bytesToText(bytes: Uint8Array): string;
13
+ /**
14
+ * Lowercases the ASCII letters, the only ones Cloudflare folds. JavaScript's
15
+ * toLowerCase() folds others too, and makes some ASCII, such as the Kelvin
16
+ * sign, which becomes `k`.
17
+ */
18
+ export declare function asciiLowerCase(text: string): string;
13
19
  /** Returns a string in the one form bytesToText() gives its bytes. */
14
20
  export declare function canonicalText(text: string): string;
15
21
  /** Returns the bytes a string holds. */
@@ -1 +1 @@
1
- {"version":3,"file":"byte-strings.d.ts","sourceRoot":"","sources":["../../src/rule-evaluator/byte-strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAYH,yFAAyF;AACzF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMrD;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wCAAwC;AACxC,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CA2BpD;AAED,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAY/C;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAMxE;AAED,mGAAmG;AACnG,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD"}
1
+ {"version":3,"file":"byte-strings.d.ts","sourceRoot":"","sources":["../../src/rule-evaluator/byte-strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAYH,yFAAyF;AACzF,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAMrD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wCAAwC;AACxC,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CA2BpD;AAED,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAY/C;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,CAMxE;AAED,mGAAmG;AACnG,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD"}
@@ -25,6 +25,14 @@ export function bytesToText(bytes) {
25
25
  return decodeEscaping(bytes);
26
26
  }
27
27
  }
28
+ /**
29
+ * Lowercases the ASCII letters, the only ones Cloudflare folds. JavaScript's
30
+ * toLowerCase() folds others too, and makes some ASCII, such as the Kelvin
31
+ * sign, which becomes `k`.
32
+ */
33
+ export function asciiLowerCase(text) {
34
+ return text.replace(/[A-Z]+/g, letters => letters.toLowerCase());
35
+ }
28
36
  /** Returns a string in the one form bytesToText() gives its bytes. */
29
37
  export function canonicalText(text) {
30
38
  return text.isWellFormed() ? text : bytesToText(textToBytes(text));
@@ -1 +1 @@
1
- {"version":3,"file":"byte-strings.js","sourceRoot":"","sources":["../../src/rule-evaluator/byte-strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC;AACvC,+EAA+E;AAC/E,uCAAuC;AACvC,MAAM,YAAY,GAAG,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAEhF,uDAAuD;AACvD,MAAM,WAAW,GAAG,MAAM,CAAC;AAC3B,iFAAiF;AACjF,MAAM,2BAA2B,GAAG,CAAC,IAAI,E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ChC,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,GAAG,GAAG,IAAI,MAAM,GAAG,GAAG;QAAE,OAAO,CAAC,CAAC;IACnE,KAAK,IAAI,IAAI,GAAG,KAAK,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC;QAC1D,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,GAAG,IAAI,IAAI,IAAI,GAAG,IAAI;YAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC7B,OAAO,IAAI,IAAI,WAAW,GAAG,IAAI,IAAI,IAAI,IAAI,WAAW,GAAG,IAAI,CAAC;AACjE,CAAC;AAED,SAAS,eAAe,CAAC,IAAY;IACpC,OAAO,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC;AACzC,CAAC;AAED,SAAS,cAAc,CAAC,IAAY;IACnC,OAAO,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC;AACzC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export declare const RULE_EXPRESSION_OPERATORS: readonly ["eq", "ne", "lt", "le", "gt", "ge", "contains", "matches", "wildcard", "in", "and", "or", "xor", "not", "strict"];
2
- export declare const RULE_EXPRESSION_FUNCTIONS: readonly ["all", "any", "bit_slice", "cidr", "cidr6", "coalesce", "concat", "decode_base64", "encode_base64", "encode_hex", "ends_with", "filter", "has_key", "has_value", "hash_in_range", "hmac_sha256", "is_jwt_present", "is_jwt_valid", "is_timed_hmac_valid_v0", "join", "len", "lookup_json_integer", "lookup_json_string", "lower", "md5", "regex_replace", "remove_bytes", "remove_query_args", "sha1", "sha256", "sha512", "split", "starts_with", "substring", "to_string", "trim", "trim_end", "trim_start", "upper", "url_decode", "uuidv4", "wildcard_replace"];
2
+ export declare const RULE_EXPRESSION_FUNCTIONS: readonly ["all", "any", "bit_slice", "cidr", "cidr6", "coalesce", "concat", "decode_base64", "encode_base64", "encode_hex", "ends_with", "filter", "format_date", "has_key", "has_value", "hash_in_range", "hmac_md5", "hmac_sha1", "hmac_sha256", "hmac_sha512", "is_jwt_present", "is_jwt_valid", "is_timed_hmac_valid_v0", "join", "len", "lookup_json_integer", "lookup_json_string", "lower", "md5", "regex_replace", "remove_bytes", "remove_query_args", "sha1", "sha256", "sha512", "sign_sigv4_hmac_sha256", "split", "starts_with", "substring", "to_string", "trim", "trim_end", "trim_start", "upper", "url_decode", "uuidv4", "wildcard_replace"];
3
3
  /**
4
4
  * The only place Cloudflare accepts `true`: as an entire expression, which
5
5
  * matches every request. The rules language has no Boolean literals, so
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/rule-evaluator/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,6HAI5B,CAAC;AAEX,eAAO,MAAM,yBAAyB,+iBA2C5B,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,SAAS,CAAC;AAE3D,MAAM,MAAM,sBAAsB,GAAG,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/rule-evaluator/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,6HAI5B,CAAC;AAEX,eAAO,MAAM,yBAAyB,goBAgD5B,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,SAAS,CAAC;AAE3D,MAAM,MAAM,sBAAsB,GAAG,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,OAAO,yBAAyB,CAAC,MAAM,CAAC,CAAC"}
@@ -16,10 +16,14 @@ export const RULE_EXPRESSION_FUNCTIONS = [
16
16
  'encode_hex',
17
17
  'ends_with',
18
18
  'filter',
19
+ 'format_date',
19
20
  'has_key',
20
21
  'has_value',
21
22
  'hash_in_range',
23
+ 'hmac_md5',
24
+ 'hmac_sha1',
22
25
  'hmac_sha256',
26
+ 'hmac_sha512',
23
27
  'is_jwt_present',
24
28
  'is_jwt_valid',
25
29
  'is_timed_hmac_valid_v0',
@@ -35,6 +39,7 @@ export const RULE_EXPRESSION_FUNCTIONS = [
35
39
  'sha1',
36
40
  'sha256',
37
41
  'sha512',
42
+ 'sign_sigv4_hmac_sha256',
38
43
  'split',
39
44
  'starts_with',
40
45
  'substring',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/rule-evaluator/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAClC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI;IACvC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ;CAC1B,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,KAAK;IACL,KAAK;IACL,WAAW;IACX,MAAM;IACN,OAAO;IACP,UAAU;IACV,QAAQ;IACR,eAAe;IACf,eAAe;IACf,YAAY;IACZ,WAAW;IACX,QAAQ;IACR,SAAS;IACT,WAAW;IACX,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,wBAAwB;IACxB,MAAM;IACN,KAAK;IACL,qBAAqB;IACrB,oBAAoB;IACpB,OAAO;IACP,KAAK;IACL,eAAe;IACf,cAAc;IACd,mBAAmB;IACnB,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,aAAa;IACb,WAAW;IACX,WAAW;IACX,MAAM;IACN,UAAU;IACV,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,kBAAkB;CACT,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/rule-evaluator/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IAClC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI;IACvC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ;CAC1B,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,KAAK;IACL,KAAK;IACL,WAAW;IACX,MAAM;IACN,OAAO;IACP,UAAU;IACV,QAAQ;IACR,eAAe;IACf,eAAe;IACf,YAAY;IACZ,WAAW;IACX,QAAQ;IACR,aAAa;IACb,SAAS;IACT,WAAW;IACX,eAAe;IACf,UAAU;IACV,WAAW;IACX,aAAa;IACb,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,wBAAwB;IACxB,MAAM;IACN,KAAK;IACL,qBAAqB;IACrB,oBAAoB;IACpB,OAAO;IACP,KAAK;IACL,eAAe;IACf,cAAc;IACd,mBAAmB;IACnB,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,wBAAwB;IACxB,OAAO;IACP,aAAa;IACb,WAAW;IACX,WAAW;IACX,MAAM;IACN,UAAU;IACV,YAAY;IACZ,OAAO;IACP,YAAY;IACZ,QAAQ;IACR,kBAAkB;CACT,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,MAAM,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * Generated by `npm run build:country-codes`. Do not edit manually.
3
3
  *
4
- * Source: @cloudflare/workers-types 5.20261125.1, Iso3166Alpha2Code.
4
+ * Source: @cloudflare/workers-types 5.20261127.1, Iso3166Alpha2Code.
5
5
  * License: MIT OR Apache-2.0.
6
6
  */
7
7
  /** ISO 3166-1 alpha-2 codes exposed by the pinned Cloudflare Workers types. */
@@ -1,6 +1,6 @@
1
1
  export type RuleExpressionDiagnosticSeverity = 'error' | 'warning' | 'notice';
2
2
  export type RuleExpressionDiagnosticSource = 'expression' | 'minifiedExpression';
3
- export declare const RULE_EXPRESSION_DIAGNOSTIC_IDS: readonly ["access.type_mismatch", "access.uppercase_map_key", "array_expansion.direct_comparison", "array_expansion.function_first_argument_only", "array_expansion.unaligned_arrays", "config.custom_lists.invalid_ip_item", "config.custom_lists.invalid_items_type", "config.custom_lists.invalid_list_type", "config.custom_lists.invalid_name", "config.custom_lists.invalid_type", "config.custom_lists.unsupported_kind", "config.field_availability.unknown_field", "config.field_availability.unknown_prefix", "field.deprecated", "field.header_dropped_on_challenge_solve", "field.header_index_requires_guard", "field.header_order_unreliable", "field.predicate_type_mismatch", "field.unavailable", "field.unknown", "field.value.invalid_country_code", "function.call_limit", "function.coalesce.never_nil_argument", "function.nested_replacement", "function.parameter.collection_element_type_mismatch", "function.parameter.comparison_type_mismatch", "function.parameter.greater_than_previous", "function.parameter.max_offset_from_previous", "function.parameter.may_be_nil", "function.parameter.rejects_literal", "function.parameter.required", "function.parameter.requires_allowed_field", "function.parameter.requires_array_expansion", "function.parameter.requires_array_collection", "function.parameter.requires_array_comparison", "function.parameter.requires_collection", "function.parameter.requires_distinct_bytes", "function.parameter.requires_field", "function.parameter.requires_field_usage_kind", "function.parameter.requires_integer_literal", "function.parameter.requires_integer_literal_range", "function.parameter.requires_literal", "function.parameter.requires_literal_comparison_value", "function.parameter.requires_map", "function.parameter.requires_non_empty_string_literal", "function.parameter.requires_number_literal", "function.parameter.requires_number_literal_range", "function.parameter.requires_scalar_map", "function.parameter.requires_string_literal", "function.parameter.requires_typed_field", "function.parameter.requires_typed_value", "function.parameter.type_mismatch", "function.result_type_mismatch", "function.single_use", "function.too_many_arguments", "function.unavailable", "function.unreliable", "inline_list.mixed_element_types", "inline_list.requires_in_operator", "inline_list.short_ipv4_address", "list.invalid_name", "list.reference_not_allowed", "list.reference_not_configured", "list.reference_requires_in_operator", "list.reference_type_mismatch", "logical.operand_type_mismatch", "operator.in_requires_list", "operator.requires_literal_value", "operator.requires_type", "operator.type_mismatch", "operator.unavailable", "operator.unsupported_type", "replacement.invalid_reference", "replacement.too_many_references", "replacement.unknown_capture", "rule_expression.boolean_literal", "rule_expression.required", "rule_expression.too_long", "syntax.cidr_host_bits", "syntax.condition_instead_of_value", "syntax.field_access_without_comparison", "syntax.hex_integer_argument", "syntax.integer_literal_out_of_range", "syntax.invalid_access_value", "syntax.invalid_array_index", "syntax.invalid_cidr_prefix", "syntax.invalid_integer_literal", "syntax.invalid_ip_address", "syntax.invalid_octal_literal", "syntax.invalid_string_escape", "syntax.ip_range_requires_list", "syntax.missing_closing_block_comment", "syntax.missing_closing_bracket", "syntax.missing_closing_brace", "syntax.missing_closing_parenthesis", "syntax.missing_closing_raw_string", "syntax.missing_closing_string_quote", "syntax.missing_function_argument", "syntax.missing_function_argument_comma", "syntax.missing_function_closing_parenthesis", "syntax.missing_function_opening_parenthesis", "syntax.missing_operator_value", "syntax.mixed_ip_range", "syntax.multiline_string_literal", "syntax.non_utf8_map_key", "syntax.raw_string_map_key", "syntax.reversed_range", "syntax.space_before_access", "syntax.unexpected_char", "syntax.unexpected_token", "syntax.unexpected_token_in_set_literal", "syntax.unexpected_tokens_after_expression_end", "syntax.unparenthesized_logical_argument", "syntax.unquoted_string_literal", "syntax.unsupported_hex_bytes_literal", "syntax.unsupported_whitespace", "wildcard.consecutive_wildcards", "wildcard.incomplete_escape", "wildcard.invalid_escape", "wildcard.too_many_wildcards"];
3
+ export declare const RULE_EXPRESSION_DIAGNOSTIC_IDS: readonly ["access.type_mismatch", "access.uppercase_map_key", "array_expansion.direct_comparison", "array_expansion.function_first_argument_only", "array_expansion.unaligned_arrays", "config.custom_lists.invalid_ip_item", "config.custom_lists.invalid_items_type", "config.custom_lists.invalid_list_type", "config.custom_lists.invalid_name", "config.custom_lists.invalid_type", "config.custom_lists.unsupported_kind", "config.field_availability.unknown_field", "config.field_availability.unknown_prefix", "field.deprecated", "field.header_dropped_on_challenge_solve", "field.header_index_requires_guard", "field.header_order_unreliable", "field.predicate_type_mismatch", "field.unavailable", "field.unknown", "field.value.invalid_country_code", "function.call_limit", "function.coalesce.never_nil_argument", "function.nested_replacement", "function.parameter.collection_element_type_mismatch", "function.parameter.comparison_type_mismatch", "function.parameter.greater_than_previous", "function.parameter.max_offset_from_previous", "function.parameter.may_be_nil", "function.parameter.rejects_empty_string_literal", "function.parameter.rejects_literal", "function.parameter.required", "function.parameter.requires_allowed_field", "function.parameter.requires_array_expansion", "function.parameter.requires_array_collection", "function.parameter.requires_array_comparison", "function.parameter.requires_collection", "function.parameter.requires_distinct_bytes", "function.parameter.requires_field", "function.parameter.requires_field_usage_kind", "function.parameter.requires_integer_literal", "function.parameter.requires_integer_literal_range", "function.parameter.requires_literal", "function.parameter.requires_literal_comparison_value", "function.parameter.requires_map", "function.parameter.requires_non_empty_string_literal", "function.parameter.requires_number_literal", "function.parameter.requires_number_literal_range", "function.parameter.requires_scalar_map", "function.parameter.requires_string_literal", "function.parameter.requires_typed_field", "function.parameter.requires_typed_value", "function.parameter.requires_utf8_string_literal", "function.parameter.type_mismatch", "function.parameter.unsupported_date_directive", "function.result_type_mismatch", "function.single_use", "function.too_many_arguments", "function.unavailable", "function.unreliable", "inline_list.mixed_element_types", "inline_list.requires_in_operator", "inline_list.short_ipv4_address", "list.invalid_name", "list.reference_not_allowed", "list.reference_not_configured", "list.reference_requires_in_operator", "list.reference_type_mismatch", "logical.operand_type_mismatch", "operator.in_requires_list", "operator.requires_literal_value", "operator.requires_type", "operator.type_mismatch", "operator.unavailable", "operator.unsupported_type", "replacement.invalid_reference", "replacement.too_many_references", "replacement.unknown_capture", "rule_expression.boolean_literal", "rule_expression.required", "rule_expression.result_type_mismatch", "rule_expression.too_long", "syntax.cidr_host_bits", "syntax.condition_instead_of_value", "syntax.field_access_without_comparison", "syntax.hex_integer_argument", "syntax.integer_literal_out_of_range", "syntax.invalid_access_value", "syntax.invalid_array_index", "syntax.invalid_cidr_prefix", "syntax.invalid_integer_literal", "syntax.invalid_ip_address", "syntax.invalid_octal_literal", "syntax.invalid_string_escape", "syntax.ip_range_requires_list", "syntax.literal_instead_of_field_or_call", "syntax.missing_closing_block_comment", "syntax.missing_closing_bracket", "syntax.missing_closing_brace", "syntax.missing_closing_parenthesis", "syntax.missing_closing_raw_string", "syntax.missing_closing_string_quote", "syntax.missing_function_argument", "syntax.missing_function_argument_comma", "syntax.missing_function_closing_parenthesis", "syntax.missing_function_opening_parenthesis", "syntax.missing_operator_value", "syntax.mixed_ip_range", "syntax.multiline_string_literal", "syntax.non_utf8_map_key", "syntax.raw_string_map_key", "syntax.reversed_range", "syntax.space_before_access", "syntax.unexpected_char", "syntax.unexpected_token", "syntax.unexpected_token_in_set_literal", "syntax.unexpected_tokens_after_expression_end", "syntax.unparenthesized_logical_argument", "syntax.unquoted_string_literal", "syntax.unsupported_hex_bytes_literal", "syntax.unsupported_whitespace", "wildcard.consecutive_wildcards", "wildcard.incomplete_escape", "wildcard.invalid_escape", "wildcard.too_many_wildcards"];
4
4
  export type RuleExpressionKnownDiagnosticId = typeof RULE_EXPRESSION_DIAGNOSTIC_IDS[number];
5
5
  export type RuleExpressionDiagnosticId = RuleExpressionKnownDiagnosticId | (string & {});
6
6
  export type RuleExpressionDiagnosticParamPrimitive = string | number | boolean | null;
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/rule-evaluator/diagnostics.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gCAAgC,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC9E,MAAM,MAAM,8BAA8B,GAAG,YAAY,GAAG,oBAAoB,CAAC;AAEjF,eAAO,MAAM,8BAA8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8BAA8B,GACxC,sCAAsC,CAQxC;AAED,kFAAkF;AAClF,wBAAgB,wBAAwB,CACvC,UAAU,EAAE,8BAA8B,EAC1C,MAAM,EAAE,8BAA8B,GACpC,wBAAwB,CAK1B"}
@@ -28,6 +28,7 @@ export const RULE_EXPRESSION_DIAGNOSTIC_IDS = [
28
28
  'function.parameter.greater_than_previous',
29
29
  'function.parameter.max_offset_from_previous',
30
30
  'function.parameter.may_be_nil',
31
+ 'function.parameter.rejects_empty_string_literal',
31
32
  'function.parameter.rejects_literal',
32
33
  'function.parameter.required',
33
34
  'function.parameter.requires_allowed_field',
@@ -50,7 +51,9 @@ export const RULE_EXPRESSION_DIAGNOSTIC_IDS = [
50
51
  'function.parameter.requires_string_literal',
51
52
  'function.parameter.requires_typed_field',
52
53
  'function.parameter.requires_typed_value',
54
+ 'function.parameter.requires_utf8_string_literal',
53
55
  'function.parameter.type_mismatch',
56
+ 'function.parameter.unsupported_date_directive',
54
57
  'function.result_type_mismatch',
55
58
  'function.single_use',
56
59
  'function.too_many_arguments',
@@ -76,6 +79,7 @@ export const RULE_EXPRESSION_DIAGNOSTIC_IDS = [
76
79
  'replacement.unknown_capture',
77
80
  'rule_expression.boolean_literal',
78
81
  'rule_expression.required',
82
+ 'rule_expression.result_type_mismatch',
79
83
  'rule_expression.too_long',
80
84
  'syntax.cidr_host_bits',
81
85
  'syntax.condition_instead_of_value',
@@ -90,6 +94,7 @@ export const RULE_EXPRESSION_DIAGNOSTIC_IDS = [
90
94
  'syntax.invalid_octal_literal',
91
95
  'syntax.invalid_string_escape',
92
96
  'syntax.ip_range_requires_list',
97
+ 'syntax.literal_instead_of_field_or_call',
93
98
  'syntax.missing_closing_block_comment',
94
99
  'syntax.missing_closing_bracket',
95
100
  'syntax.missing_closing_brace',