@clementine-solutions/jane-io 1.0.10 → 1.0.11

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 (165) hide show
  1. package/dist/core/common/events.d.ts +28 -0
  2. package/dist/core/common/events.js +50 -0
  3. package/dist/core/common/index.d.ts +1 -1
  4. package/dist/core/common/index.js +1 -1
  5. package/dist/core/normalizers/array/compact-sparse-array.js +1 -1
  6. package/dist/core/normalizers/array/flatten-one-level.js +1 -1
  7. package/dist/core/normalizers/array/remove-empty-string-items.js +1 -1
  8. package/dist/core/normalizers/array/remove-null-items.js +1 -1
  9. package/dist/core/normalizers/array/remove-undefined-items.js +1 -1
  10. package/dist/core/normalizers/date/invalid-date-to-undefined.js +1 -1
  11. package/dist/core/normalizers/number/infinity-to-undefined.js +1 -1
  12. package/dist/core/normalizers/number/nan-to-undefined.js +1 -1
  13. package/dist/core/normalizers/number/normalize-negative-zero.js +1 -1
  14. package/dist/core/normalizers/object/remove-empty-array-keys.js +1 -1
  15. package/dist/core/normalizers/object/remove-empty-object-keys.js +1 -1
  16. package/dist/core/normalizers/object/remove-empty-string-keys.js +1 -1
  17. package/dist/core/normalizers/object/remove-null-keys.js +1 -1
  18. package/dist/core/normalizers/object/remove-undefined-keys.js +1 -1
  19. package/dist/core/normalizers/string/collapse-whitespace.js +1 -1
  20. package/dist/core/normalizers/string/empty-to-undefined.js +1 -1
  21. package/dist/core/normalizers/string/trim.js +1 -1
  22. package/dist/core/parsers/parse-array-string.js +1 -1
  23. package/dist/core/parsers/parse-bigint-string.js +1 -1
  24. package/dist/core/parsers/parse-binary-string.js +1 -1
  25. package/dist/core/parsers/parse-boolean-string.js +1 -1
  26. package/dist/core/parsers/parse-date-string.js +1 -1
  27. package/dist/core/parsers/parse-duration-string.js +1 -1
  28. package/dist/core/parsers/parse-hex-string.js +1 -1
  29. package/dist/core/parsers/parse-integer-string.js +1 -1
  30. package/dist/core/parsers/parse-json-string.js +1 -1
  31. package/dist/core/parsers/parse-numeric-string.js +1 -1
  32. package/dist/core/parsers/parse-object-string.js +1 -1
  33. package/dist/core/parsers/parse-octal-string.js +1 -1
  34. package/dist/core/parsers/parse-scientific-notation-string.js +1 -1
  35. package/dist/core/parsers/parse-url-string.js +1 -1
  36. package/dist/core/pipeline/index.d.ts +4 -4
  37. package/dist/core/pipeline/index.js +4 -4
  38. package/dist/core/pipeline/normalize.d.ts +1 -8
  39. package/dist/core/pipeline/normalize.js +0 -10
  40. package/dist/core/pipeline/parse.d.ts +1 -8
  41. package/dist/core/pipeline/parse.js +1 -20
  42. package/dist/core/pipeline/scan.d.ts +1 -8
  43. package/dist/core/pipeline/scan.js +0 -10
  44. package/dist/core/pipeline/validate.d.ts +1 -8
  45. package/dist/core/pipeline/validate.js +0 -10
  46. package/dist/core/scanners/any/scan-for-sentinels.js +1 -1
  47. package/dist/core/scanners/array/array-is-deep.js +1 -1
  48. package/dist/core/scanners/array/array-is-heterogenous.js +1 -1
  49. package/dist/core/scanners/array/array-is-large.js +1 -1
  50. package/dist/core/scanners/bigint/bigint-is-large.js +1 -1
  51. package/dist/core/scanners/bigint/bigint-not-safe.js +1 -1
  52. package/dist/core/scanners/date/date-is-before-epoch.js +1 -1
  53. package/dist/core/scanners/date/date-is-far-future.js +1 -1
  54. package/dist/core/scanners/date/date-is-invalid.js +1 -1
  55. package/dist/core/scanners/number/number-is-infinite.js +1 -1
  56. package/dist/core/scanners/number/number-is-nan.js +1 -1
  57. package/dist/core/scanners/number/number-is-too-large.js +1 -1
  58. package/dist/core/scanners/number/number-is-unsafe-integer.js +1 -1
  59. package/dist/core/scanners/object/object-has-circular-references.js +1 -1
  60. package/dist/core/scanners/object/object-has-many-keys.js +1 -1
  61. package/dist/core/scanners/object/object-is-deep.js +1 -1
  62. package/dist/core/scanners/string/string-has-unsafe-unicode.js +1 -1
  63. package/dist/core/scanners/string/string-has-whitespace-edges.js +1 -1
  64. package/dist/core/scanners/string/string-is-long.js +1 -1
  65. package/dist/core/scanners/unknown/unknown-not-scannable.js +1 -1
  66. package/dist/core/validators/array/array-max-items.js +1 -1
  67. package/dist/core/validators/array/array-min-items.js +1 -1
  68. package/dist/core/validators/array/array.js +1 -1
  69. package/dist/core/validators/array/excludes.js +1 -1
  70. package/dist/core/validators/array/has-unique-items.js +1 -1
  71. package/dist/core/validators/array/includes.js +1 -1
  72. package/dist/core/validators/array/items-equal.js +1 -1
  73. package/dist/core/validators/array/no-empty-string-items.js +1 -1
  74. package/dist/core/validators/array/no-null-items.js +1 -1
  75. package/dist/core/validators/array/no-undefined-items.js +1 -1
  76. package/dist/core/validators/array/non-empty-array.js +1 -1
  77. package/dist/core/validators/array/not-sparse.js +1 -1
  78. package/dist/core/validators/bigint/bigint-equals.js +1 -1
  79. package/dist/core/validators/bigint/bigint-max.js +1 -1
  80. package/dist/core/validators/bigint/bigint-min.js +1 -1
  81. package/dist/core/validators/bigint/bigint-negative.js +1 -1
  82. package/dist/core/validators/bigint/bigint-non-negative.js +1 -1
  83. package/dist/core/validators/bigint/bigint-non-positive.js +1 -1
  84. package/dist/core/validators/bigint/bigint-positive.js +1 -1
  85. package/dist/core/validators/bigint/bigint-safe.js +1 -1
  86. package/dist/core/validators/bigint/bigint.js +1 -1
  87. package/dist/core/validators/boolean/boolean.js +1 -1
  88. package/dist/core/validators/boolean/is-false.js +1 -1
  89. package/dist/core/validators/boolean/is-true.js +1 -1
  90. package/dist/core/validators/common/is-country-code.js +1 -1
  91. package/dist/core/validators/common/is-currency-code.js +1 -1
  92. package/dist/core/validators/common/is-email-strict.js +1 -1
  93. package/dist/core/validators/common/is-email.js +1 -1
  94. package/dist/core/validators/common/is-ip.js +1 -1
  95. package/dist/core/validators/common/is-phone-strict.js +1 -1
  96. package/dist/core/validators/common/is-phone.js +1 -1
  97. package/dist/core/validators/common/is-port.js +1 -1
  98. package/dist/core/validators/common/is-postal-code.js +1 -1
  99. package/dist/core/validators/common/is-url.js +1 -1
  100. package/dist/core/validators/common/is-uuid.js +1 -1
  101. package/dist/core/validators/date/before-epoch.js +1 -1
  102. package/dist/core/validators/date/date-now-required.js +1 -1
  103. package/dist/core/validators/date/is-date.js +1 -1
  104. package/dist/core/validators/date/is-far-future.js +1 -1
  105. package/dist/core/validators/date/is-future.js +1 -1
  106. package/dist/core/validators/date/is-past.js +1 -1
  107. package/dist/core/validators/date/not-after.js +1 -1
  108. package/dist/core/validators/date/not-before.js +1 -1
  109. package/dist/core/validators/date/same-day.js +1 -1
  110. package/dist/core/validators/date/same-month.js +1 -1
  111. package/dist/core/validators/date/same-year.js +1 -1
  112. package/dist/core/validators/date/too-early.js +1 -1
  113. package/dist/core/validators/date/too-late.js +1 -1
  114. package/dist/core/validators/date/weekday.js +1 -1
  115. package/dist/core/validators/date/weekend.js +1 -1
  116. package/dist/core/validators/nullish/is-null-or-undefined.js +1 -1
  117. package/dist/core/validators/nullish/is-null.js +1 -1
  118. package/dist/core/validators/nullish/is-undefined.js +1 -1
  119. package/dist/core/validators/number/finite.js +1 -1
  120. package/dist/core/validators/number/integer.js +1 -1
  121. package/dist/core/validators/number/less-than.js +1 -1
  122. package/dist/core/validators/number/max.js +1 -1
  123. package/dist/core/validators/number/min.js +1 -1
  124. package/dist/core/validators/number/more-than.js +1 -1
  125. package/dist/core/validators/number/negative.js +1 -1
  126. package/dist/core/validators/number/non-negative.js +1 -1
  127. package/dist/core/validators/number/non-positive.js +1 -1
  128. package/dist/core/validators/number/number.js +1 -1
  129. package/dist/core/validators/number/positive.js +1 -1
  130. package/dist/core/validators/number/safe-integer.js +1 -1
  131. package/dist/core/validators/object/deep-equals.js +1 -1
  132. package/dist/core/validators/object/has-key.js +1 -1
  133. package/dist/core/validators/object/has-value.js +1 -1
  134. package/dist/core/validators/object/keys-equal.js +1 -1
  135. package/dist/core/validators/object/max-keys.js +1 -1
  136. package/dist/core/validators/object/min-keys.js +1 -1
  137. package/dist/core/validators/object/missing-key.js +1 -1
  138. package/dist/core/validators/object/no-empty-array-values.js +1 -1
  139. package/dist/core/validators/object/no-empty-object-values.js +1 -1
  140. package/dist/core/validators/object/no-null-values.js +1 -1
  141. package/dist/core/validators/object/no-undefined-values.js +1 -1
  142. package/dist/core/validators/object/non-empty-object.js +1 -1
  143. package/dist/core/validators/object/only-keys.js +1 -1
  144. package/dist/core/validators/object/plain-object.js +1 -1
  145. package/dist/core/validators/string/alpha-num.js +1 -1
  146. package/dist/core/validators/string/alpha.js +1 -1
  147. package/dist/core/validators/string/chars-equal.js +1 -1
  148. package/dist/core/validators/string/ends-with.js +1 -1
  149. package/dist/core/validators/string/is-ascii.js +1 -1
  150. package/dist/core/validators/string/is-printable.js +1 -1
  151. package/dist/core/validators/string/matches.js +1 -1
  152. package/dist/core/validators/string/max-length.js +1 -1
  153. package/dist/core/validators/string/min-length.js +1 -1
  154. package/dist/core/validators/string/no-lead-space.js +1 -1
  155. package/dist/core/validators/string/no-repeat-space.js +1 -1
  156. package/dist/core/validators/string/no-space.js +1 -1
  157. package/dist/core/validators/string/no-trail-space.js +1 -1
  158. package/dist/core/validators/string/non-empty.js +1 -1
  159. package/dist/core/validators/string/not-one-of.js +1 -1
  160. package/dist/core/validators/string/num-string.js +1 -1
  161. package/dist/core/validators/string/one-of.js +1 -1
  162. package/dist/core/validators/string/starts-with.js +1 -1
  163. package/dist/core/validators/string/string.js +1 -1
  164. package/dist/core/validators/string/trimmed.js +1 -1
  165. package/package.json +1 -1
@@ -35,3 +35,31 @@ export declare function createEvent(phase: PipelinePhase, kind: EventKind, code:
35
35
  * enter policy, explain, or replay logic.
36
36
  */
37
37
  export declare function isJaneEvent(value: unknown): value is JaneEvent;
38
+ /**
39
+ * Creates a normalization‑stage event.
40
+ *
41
+ * Wraps createEvent with the 'normalize' stage tag, producing structured
42
+ * messages emitted during value‑shaping operations.
43
+ */
44
+ export declare const normalizationEvent: (kind: EventKind, code: EventCode, path: FieldPath, message?: string, userMessage?: string, meta?: Record<string, unknown>) => JaneEvent;
45
+ /**
46
+ * Creates a parse‑stage event.
47
+ *
48
+ * Produces a structured event tagged with the 'parse' phase, used to
49
+ * surface observations or errors encountered while interpreting input.
50
+ */
51
+ export declare function parseEvent(kind: EventKind, code: EventCode, message: string, path: FieldPath, userMessage?: string, metadata?: Record<string, unknown>): JaneEvent;
52
+ /**
53
+ * Creates a scan‑stage event.
54
+ *
55
+ * Wraps createEvent with the 'scan' stage tag, producing structured
56
+ * observations emitted during the scan pipeline phase.
57
+ */
58
+ export declare const scanEvent: (kind: EventKind, code: EventCode, path: FieldPath, message: string, userMessage?: string, meta?: Record<string, unknown>) => JaneEvent;
59
+ /**
60
+ * Creates a validation‑stage event.
61
+ *
62
+ * Wraps createEvent with the 'validate' phase tag, producing correctness‑
63
+ * focused messages emitted during rule evaluation.
64
+ */
65
+ export declare const validationEvent: (kind: EventKind, code: EventCode, path: FieldPath, message?: string, userMessage?: string, meta?: Record<string, unknown>) => JaneEvent;
@@ -80,3 +80,53 @@ export function isJaneEvent(value) {
80
80
  messageIsValid &&
81
81
  pathIsValid);
82
82
  }
83
+ /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
84
+ |* Normalization Event *|
85
+ \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
86
+ /**
87
+ * Creates a normalization‑stage event.
88
+ *
89
+ * Wraps createEvent with the 'normalize' stage tag, producing structured
90
+ * messages emitted during value‑shaping operations.
91
+ */
92
+ export const normalizationEvent = (kind, code, path, message, userMessage, meta) => createEvent('normalize', kind, code, path, message, userMessage, meta);
93
+ /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
94
+ |* Parse Event *|
95
+ \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
96
+ /**
97
+ * Creates a parse‑stage event.
98
+ *
99
+ * Produces a structured event tagged with the 'parse' phase, used to
100
+ * surface observations or errors encountered while interpreting input.
101
+ */
102
+ export function parseEvent(kind, code, message, path, userMessage, metadata) {
103
+ return {
104
+ phase: 'parse',
105
+ kind,
106
+ code,
107
+ message,
108
+ userMessage,
109
+ path,
110
+ metadata,
111
+ };
112
+ }
113
+ /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
114
+ |* Scan Event *|
115
+ \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
116
+ /**
117
+ * Creates a scan‑stage event.
118
+ *
119
+ * Wraps createEvent with the 'scan' stage tag, producing structured
120
+ * observations emitted during the scan pipeline phase.
121
+ */
122
+ export const scanEvent = (kind, code, path, message, userMessage, meta) => createEvent('scan', kind, code, path, message, userMessage, meta);
123
+ /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
124
+ |* Validation Event *|
125
+ \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
126
+ /**
127
+ * Creates a validation‑stage event.
128
+ *
129
+ * Wraps createEvent with the 'validate' phase tag, producing correctness‑
130
+ * focused messages emitted during rule evaluation.
131
+ */
132
+ export const validationEvent = (kind, code, path, message, userMessage, meta) => createEvent('validate', kind, code, path, message, userMessage, meta);
@@ -9,7 +9,7 @@
9
9
  * @see https://jane-io.com
10
10
  * ----------------------------------------------------------------------------
11
11
  */
12
- export { createEvent, isJaneEvent } from './events.js';
12
+ export { createEvent, isJaneEvent, normalizationEvent, parseEvent, scanEvent, validationEvent, } from './events.js';
13
13
  export { attachFluentParsers, attachFluentValidators, createJane, toJaneBoundaryResult, toJaneResult, } from './fluent.js';
14
14
  export { applyEscalate, applyOverride, boundaryPolicyDefault, boundaryPolicyLax, boundaryPolicyStrict, clampSeverityIndex, compileSeverityMap, decideEvent, defaultPolicy, laxPolicy, normalizePolicy, mergeBoundaryPolicies, policyDecision, resolveLevel, resolvePolicy, severityIndex, SEVERITY_ORDER, strictPolicy, } from './policy.js';
15
15
  export { deepEqual, generateRunId, isObject, isPlainObject, isPrimitive, safeStringify, } from './utilities.js';
@@ -12,7 +12,7 @@
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Events *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
15
- export { createEvent, isJaneEvent } from './events.js';
15
+ export { createEvent, isJaneEvent, normalizationEvent, parseEvent, scanEvent, validationEvent, } from './events.js';
16
16
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
17
17
  |* Fluent *|
18
18
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -9,7 +9,7 @@
9
9
  * @see https://jane-io.com
10
10
  * ----------------------------------------------------------------------------
11
11
  */
12
- import { normalizationEvent } from '../../pipeline/index.js';
12
+ import { normalizationEvent } from '../../common/events.js';
13
13
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
14
14
  |* Implementation *|
15
15
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -9,7 +9,7 @@
9
9
  * @see https://jane-io.com
10
10
  * ----------------------------------------------------------------------------
11
11
  */
12
- import { normalizationEvent } from '../../pipeline/index.js';
12
+ import { normalizationEvent } from '../../common/events.js';
13
13
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
14
14
  |* Implementation *|
15
15
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -9,7 +9,7 @@
9
9
  * @see https://jane-io.com
10
10
  * ----------------------------------------------------------------------------
11
11
  */
12
- import { normalizationEvent } from '../../pipeline/index.js';
12
+ import { normalizationEvent } from '../../common/events.js';
13
13
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
14
14
  |* Implementation *|
15
15
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -9,7 +9,7 @@
9
9
  * @see https://jane-io.com
10
10
  * ----------------------------------------------------------------------------
11
11
  */
12
- import { normalizationEvent } from '../../pipeline/index.js';
12
+ import { normalizationEvent } from '../../common/events.js';
13
13
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
14
14
  |* Implementation *|
15
15
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -9,7 +9,7 @@
9
9
  * @see https://jane-io.com
10
10
  * ----------------------------------------------------------------------------
11
11
  */
12
- import { normalizationEvent } from '../../pipeline/index.js';
12
+ import { normalizationEvent } from '../../common/events.js';
13
13
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
14
14
  |* Implementation *|
15
15
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -9,7 +9,7 @@
9
9
  * @see https://jane-io.com
10
10
  * ----------------------------------------------------------------------------
11
11
  */
12
- import { normalizationEvent } from '../../pipeline/index.js';
12
+ import { normalizationEvent } from '../../common/events.js';
13
13
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
14
14
  |* Implementation *|
15
15
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { normalizationEvent } from '../../pipeline/index.js';
11
+ import { normalizationEvent } from '../../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import { parseEvent } from '../pipeline/index.js';
11
+ import { parseEvent } from '../common/events.js';
12
12
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
13
  |* Implementation *|
14
14
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -9,8 +9,8 @@
9
9
  */
10
10
  export { boundaryRuleRegistry, boundaryRunner, decideBoundary } from './boundary.js';
11
11
  export { ContainmentSentinel, containArray, containBigInt, containObject, containRecursive, containValue, createContainmentContext, deepClone, defaultContainmentOptions, isSentinel, safeObjectKeys, safePropertyDescriptor, sentinelEvent, } from './contain.js';
12
- export { normalizationEvent, normalizationRunner, selectNormalizationRules } from './normalize.js';
13
- export { isFluentParser, isParseFactory, parseEvent, parseRunner } from './parse.js';
12
+ export { normalizationRunner, selectNormalizationRules } from './normalize.js';
13
+ export { isFluentParser, isParseFactory, parseRunner } from './parse.js';
14
14
  export { createPipeline, pipelineRunner } from './pipeline.js';
15
- export { detectStructuralType, measureDepth, scanEvent, scanRunner, selectScanRules, } from './scan.js';
16
- export { isFluentValidator, isValidationFactory, validationEvent, validationRunner, } from './validate.js';
15
+ export { detectStructuralType, measureDepth, scanRunner, selectScanRules } from './scan.js';
16
+ export { isFluentValidator, isValidationFactory, validationRunner } from './validate.js';
@@ -18,11 +18,11 @@ export { ContainmentSentinel, containArray, containBigInt, containObject, contai
18
18
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
19
19
  |* Normalize *|
20
20
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
21
- export { normalizationEvent, normalizationRunner, selectNormalizationRules } from './normalize.js';
21
+ export { normalizationRunner, selectNormalizationRules } from './normalize.js';
22
22
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
23
23
  |* Parse *|
24
24
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
25
- export { isFluentParser, isParseFactory, parseEvent, parseRunner } from './parse.js';
25
+ export { isFluentParser, isParseFactory, parseRunner } from './parse.js';
26
26
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
27
27
  |* Pipeline *|
28
28
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
@@ -30,8 +30,8 @@ export { createPipeline, pipelineRunner } from './pipeline.js';
30
30
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
31
31
  |* Scan *|
32
32
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
33
- export { detectStructuralType, measureDepth, scanEvent, scanRunner, selectScanRules, } from './scan.js';
33
+ export { detectStructuralType, measureDepth, scanRunner, selectScanRules } from './scan.js';
34
34
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
35
35
  |* Validate *|
36
36
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
37
- export { isFluentValidator, isValidationFactory, validationEvent, validationRunner, } from './validate.js';
37
+ export { isFluentValidator, isValidationFactory, validationRunner } from './validate.js';
@@ -8,14 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import type { EventCode, EventKind, FieldPath, JaneEvent, NormalizationRule, NormalizationStageContext, NormalizationStageOutput } from '../shapes/index.js';
12
- /**
13
- * Creates a normalization‑stage event.
14
- *
15
- * Wraps createEvent with the 'normalize' stage tag, producing structured
16
- * messages emitted during value‑shaping operations.
17
- */
18
- export declare const normalizationEvent: (kind: EventKind, code: EventCode, path: FieldPath, message?: string, userMessage?: string, meta?: Record<string, unknown>) => JaneEvent;
11
+ import type { NormalizationRule, NormalizationStageContext, NormalizationStageOutput } from '../shapes/index.js';
19
12
  /**
20
13
  * Executes the normalization stage.
21
14
  *
@@ -13,16 +13,6 @@ import { rootPath } from '../field-path/index.js';
13
13
  import { normalizationRuleRegistry } from '../normalizers/index.js';
14
14
  import { detectStructuralType } from './scan.js';
15
15
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
16
- |* Normalization Event *|
17
- \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
18
- /**
19
- * Creates a normalization‑stage event.
20
- *
21
- * Wraps createEvent with the 'normalize' stage tag, producing structured
22
- * messages emitted during value‑shaping operations.
23
- */
24
- export const normalizationEvent = (kind, code, path, message, userMessage, meta) => createEvent('normalize', kind, code, path, message, userMessage, meta);
25
- /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
26
16
  |* Normalization Runner *|
27
17
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
28
18
  /**
@@ -8,14 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import type { EventCode, EventKind, FieldPath, JaneEvent, ParserFactory, ParserFluentRule, ParseRule, ParseStageContext, ParseStageOutput } from '../shapes/index.js';
12
- /**
13
- * Creates a parse‑stage event.
14
- *
15
- * Produces a structured event tagged with the 'parse' phase, used to
16
- * surface observations or errors encountered while interpreting input.
17
- */
18
- export declare function parseEvent(kind: EventKind, code: EventCode, message: string, path: FieldPath, userMessage?: string, metadata?: Record<string, unknown>): JaneEvent;
11
+ import type { ParserFactory, ParserFluentRule, ParseRule, ParseStageContext, ParseStageOutput } from '../shapes/index.js';
19
12
  /**
20
13
  * Determines whether a fluent parser entry is a factory.
21
14
  *
@@ -8,28 +8,9 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
+ import { parseEvent } from '../common/events.js';
11
12
  import { rootPath } from '../field-path/index.js';
12
13
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
13
- |* Parse Event *|
14
- \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
15
- /**
16
- * Creates a parse‑stage event.
17
- *
18
- * Produces a structured event tagged with the 'parse' phase, used to
19
- * surface observations or errors encountered while interpreting input.
20
- */
21
- export function parseEvent(kind, code, message, path, userMessage, metadata) {
22
- return {
23
- phase: 'parse',
24
- kind,
25
- code,
26
- message,
27
- userMessage,
28
- path,
29
- metadata,
30
- };
31
- }
32
- /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
33
14
  |* Is Parse Factory *|
34
15
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
35
16
  /**
@@ -8,7 +8,7 @@
8
8
  * @see https://jane-io.com
9
9
  * ----------------------------------------------------------------------------
10
10
  */
11
- import type { EventCode, EventKind, FieldPath, JaneEvent, ScanRule, ScanRunner, StructuralType } from '../shapes/index.js';
11
+ import type { ScanRule, ScanRunner, StructuralType } from '../shapes/index.js';
12
12
  /**
13
13
  * Classifies a raw value into one of Jane’s structural types.
14
14
  *
@@ -23,13 +23,6 @@ export declare function detectStructuralType(input: unknown): StructuralType;
23
23
  * ignoring non‑object values and null.
24
24
  */
25
25
  export declare function measureDepth(value: unknown, current?: number): number;
26
- /**
27
- * Creates a scan‑stage event.
28
- *
29
- * Wraps createEvent with the 'scan' stage tag, producing structured
30
- * observations emitted during the scan pipeline phase.
31
- */
32
- export declare const scanEvent: (kind: EventKind, code: EventCode, path: FieldPath, message: string, userMessage?: string, meta?: Record<string, unknown>) => JaneEvent;
33
26
  /**
34
27
  * Executes the scan stage for a single value.
35
28
  *
@@ -62,16 +62,6 @@ export function measureDepth(value, current = 0) {
62
62
  return max;
63
63
  }
64
64
  /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
65
- |* Scan Event *|
66
- \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
67
- /**
68
- * Creates a scan‑stage event.
69
- *
70
- * Wraps createEvent with the 'scan' stage tag, producing structured
71
- * observations emitted during the scan pipeline phase.
72
- */
73
- export const scanEvent = (kind, code, path, message, userMessage, meta) => createEvent('scan', kind, code, path, message, userMessage, meta);
74
- /* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— *\
75
65
  |* Scan Runner *|
76
66
  \* ——— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ————— * ——— */
77
67
  /**