@cosyte/x12 0.0.5 → 0.0.6

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.cts CHANGED
@@ -12528,8 +12528,20 @@ interface InterchangeSpec {
12528
12528
  declare function buildInterchange(spec: InterchangeSpec): X12Interchange;
12529
12529
 
12530
12530
  /**
12531
- * The single route a caller-supplied value takes into a `build*` refusal
12532
- * message.
12531
+ * The single route a caller-supplied value takes into a refusal message
12532
+ * thrown by this library: every `build*` refusal, and every
12533
+ * `defineProfile()` refusal.
12534
+ *
12535
+ * ## The names say `BUILD_REFUSAL_*` and the scope is wider than that
12536
+ *
12537
+ * The two exported constants were introduced by `X12-BUILDER-BOUNDS`, which
12538
+ * bounded the `build*` sites only, and they are published under those names.
12539
+ * `X12-CALLER-VALUE-RESIDUALS` then routed `src/profiles/validate.ts` through
12540
+ * the same renderers, so `X12ProfileError` is bounded by the same numbers.
12541
+ * **The names were deliberately NOT changed**: one ceiling under one name
12542
+ * cannot drift, whereas a second name for the same number is exactly how two
12543
+ * bounds start disagreeing. Read `BUILD_REFUSAL_` as naming where the bound was
12544
+ * introduced, not the only place it applies.
12533
12545
  *
12534
12546
  * ## Why this exists
12535
12547
  *
@@ -12586,8 +12598,9 @@ declare function buildInterchange(spec: InterchangeSpec): X12Interchange;
12586
12598
  * mirrors, which is the one deliberate place a *document's* bytes are copied.
12587
12599
  */
12588
12600
  /**
12589
- * How many characters of a caller-supplied value survive into a `build*`
12590
- * refusal message. Set to mirror the parser's own `SNIPPET_MAX_INPUT` (63),
12601
+ * How many characters of a caller-supplied value survive into a refusal
12602
+ * message, whether it comes from a `build*` function or from
12603
+ * `defineProfile()`. Set to mirror the parser's own `SNIPPET_MAX_INPUT` (63),
12591
12604
  * so the two bounded copies in this library agree rather than each picking a
12592
12605
  * number. Comfortably wider than every slot it guards: an ISA-13 / IEA-02
12593
12606
  * control number is 9, a TA1-05 note code 3, an ST-01 transaction set id 3, an
@@ -12604,6 +12617,8 @@ declare const BUILD_REFUSAL_VALUE_MAX_LENGTH = 63;
12604
12617
  * Hard ceiling, in characters, on the fragment {@link renderCallerValue}
12605
12618
  * returns: {@link BUILD_REFUSAL_VALUE_MAX_LENGTH} surviving characters, two
12606
12619
  * quotes, one ellipsis, and the ` (N characters)` suffix at its widest.
12620
+ * {@link renderCallerJson} is held to the same ceiling and comes in two
12621
+ * characters under it, because JSON supplies its own quotes.
12607
12622
  *
12608
12623
  * **This is the bound on the FRAGMENT, not on the message.** A refusal message
12609
12624
  * is this plus the site's own fixed template text, which differs per site, so
package/dist/index.d.ts CHANGED
@@ -12528,8 +12528,20 @@ interface InterchangeSpec {
12528
12528
  declare function buildInterchange(spec: InterchangeSpec): X12Interchange;
12529
12529
 
12530
12530
  /**
12531
- * The single route a caller-supplied value takes into a `build*` refusal
12532
- * message.
12531
+ * The single route a caller-supplied value takes into a refusal message
12532
+ * thrown by this library: every `build*` refusal, and every
12533
+ * `defineProfile()` refusal.
12534
+ *
12535
+ * ## The names say `BUILD_REFUSAL_*` and the scope is wider than that
12536
+ *
12537
+ * The two exported constants were introduced by `X12-BUILDER-BOUNDS`, which
12538
+ * bounded the `build*` sites only, and they are published under those names.
12539
+ * `X12-CALLER-VALUE-RESIDUALS` then routed `src/profiles/validate.ts` through
12540
+ * the same renderers, so `X12ProfileError` is bounded by the same numbers.
12541
+ * **The names were deliberately NOT changed**: one ceiling under one name
12542
+ * cannot drift, whereas a second name for the same number is exactly how two
12543
+ * bounds start disagreeing. Read `BUILD_REFUSAL_` as naming where the bound was
12544
+ * introduced, not the only place it applies.
12533
12545
  *
12534
12546
  * ## Why this exists
12535
12547
  *
@@ -12586,8 +12598,9 @@ declare function buildInterchange(spec: InterchangeSpec): X12Interchange;
12586
12598
  * mirrors, which is the one deliberate place a *document's* bytes are copied.
12587
12599
  */
12588
12600
  /**
12589
- * How many characters of a caller-supplied value survive into a `build*`
12590
- * refusal message. Set to mirror the parser's own `SNIPPET_MAX_INPUT` (63),
12601
+ * How many characters of a caller-supplied value survive into a refusal
12602
+ * message, whether it comes from a `build*` function or from
12603
+ * `defineProfile()`. Set to mirror the parser's own `SNIPPET_MAX_INPUT` (63),
12591
12604
  * so the two bounded copies in this library agree rather than each picking a
12592
12605
  * number. Comfortably wider than every slot it guards: an ISA-13 / IEA-02
12593
12606
  * control number is 9, a TA1-05 note code 3, an ST-01 transaction set id 3, an
@@ -12604,6 +12617,8 @@ declare const BUILD_REFUSAL_VALUE_MAX_LENGTH = 63;
12604
12617
  * Hard ceiling, in characters, on the fragment {@link renderCallerValue}
12605
12618
  * returns: {@link BUILD_REFUSAL_VALUE_MAX_LENGTH} surviving characters, two
12606
12619
  * quotes, one ellipsis, and the ` (N characters)` suffix at its widest.
12620
+ * {@link renderCallerJson} is held to the same ceiling and comes in two
12621
+ * characters under it, because JSON supplies its own quotes.
12607
12622
  *
12608
12623
  * **This is the bound on the FRAGMENT, not on the message.** A refusal message
12609
12624
  * is this plus the site's own fixed template text, which differs per site, so