@cosyte/astm 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -7
- package/README.md +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +29 -38
package/dist/index.d.cts
CHANGED
|
@@ -1369,7 +1369,7 @@ declare function primaryCode(u: UniversalTestId): string | undefined;
|
|
|
1369
1369
|
*/
|
|
1370
1370
|
interface AstmFramePosition {
|
|
1371
1371
|
/**
|
|
1372
|
-
* The frame's sequence number (`0
|
|
1372
|
+
* The frame's sequence number (`0` to `7`) when it could be read, or `undefined`
|
|
1373
1373
|
* when the frame was so truncated the number was not present.
|
|
1374
1374
|
*/
|
|
1375
1375
|
readonly frameNumber?: number;
|
|
@@ -6367,8 +6367,8 @@ interface FrameChecksum {
|
|
|
6367
6367
|
*/
|
|
6368
6368
|
interface AstmFrame {
|
|
6369
6369
|
/**
|
|
6370
|
-
* The frame's sequence number as read from the `FN` byte. Normally `0
|
|
6371
|
-
* value outside that range means the `FN` byte was not a `0
|
|
6370
|
+
* The frame's sequence number as read from the `FN` byte. Normally `0` to `7`; a
|
|
6371
|
+
* value outside that range means the `FN` byte was not a `0` to `7` digit (a
|
|
6372
6372
|
* corruption that also trips a sequence-gap warning). `undefined` when the frame
|
|
6373
6373
|
* was too truncated to carry a frame number at all.
|
|
6374
6374
|
*/
|
|
@@ -6663,7 +6663,7 @@ declare function decodeAstmFrames(bytes: Uint8Array, options?: FrameOptions): De
|
|
|
6663
6663
|
* - the **modulo-256 checksum** over `FN … terminator` (inclusive), emitted as two
|
|
6664
6664
|
* **uppercase** hex chars (the conservative-emit form the decoder accepts either
|
|
6665
6665
|
* case of);
|
|
6666
|
-
* - the **frame number** `0
|
|
6666
|
+
* - the **frame number** `0` to `7`, starting at `1` and rolling over `7 → 0 → 1`,
|
|
6667
6667
|
* continuous across every frame in the stream (as the decoder's sequence check
|
|
6668
6668
|
* expects); a caller may start the sequence elsewhere to compose one transfer
|
|
6669
6669
|
* across several calls, but only at a number a frame can actually carry;
|
|
@@ -7005,7 +7005,7 @@ declare function serializeFramedAstm(input: AstmMessage | readonly AstmRecord[],
|
|
|
7005
7005
|
* @param bytes - The full decoded byte stream.
|
|
7006
7006
|
* @param start - First index to include (the frame-number byte, one past `STX`).
|
|
7007
7007
|
* @param endInclusive - Last index to include (the `ETB`/`ETX` terminator byte).
|
|
7008
|
-
* @returns The checksum in `0
|
|
7008
|
+
* @returns The checksum in `0` to `255`.
|
|
7009
7009
|
* @example
|
|
7010
7010
|
* ```ts
|
|
7011
7011
|
* import { computeChecksum } from "@cosyte/astm";
|
|
@@ -7018,7 +7018,7 @@ declare function computeChecksum(bytes: Uint8Array, start: number, endInclusive:
|
|
|
7018
7018
|
* Format a checksum byte as the two **uppercase** hex characters ASTM puts on the
|
|
7019
7019
|
* wire (the conservative-emit form). Decode accepts lowercase; emit is uppercase.
|
|
7020
7020
|
*
|
|
7021
|
-
* @param checksum - A value in `0
|
|
7021
|
+
* @param checksum - A value in `0` to `255`.
|
|
7022
7022
|
* @returns Two uppercase hex characters, zero-padded (e.g. `"0A"`, `"75"`).
|
|
7023
7023
|
* @example
|
|
7024
7024
|
* ```ts
|
|
@@ -7036,7 +7036,7 @@ declare function toChecksumHex(checksum: number): string;
|
|
|
7036
7036
|
* @param bytes - The full decoded byte stream.
|
|
7037
7037
|
* @param i0 - Index of the high hex nibble (immediately after the terminator).
|
|
7038
7038
|
* @param i1 - Index of the low hex nibble.
|
|
7039
|
-
* @returns The declared checksum in `0
|
|
7039
|
+
* @returns The declared checksum in `0` to `255`, or `undefined` if unreadable.
|
|
7040
7040
|
* @example
|
|
7041
7041
|
* ```ts
|
|
7042
7042
|
* import { parseChecksumHex } from "@cosyte/astm";
|
package/dist/index.d.ts
CHANGED
|
@@ -1369,7 +1369,7 @@ declare function primaryCode(u: UniversalTestId): string | undefined;
|
|
|
1369
1369
|
*/
|
|
1370
1370
|
interface AstmFramePosition {
|
|
1371
1371
|
/**
|
|
1372
|
-
* The frame's sequence number (`0
|
|
1372
|
+
* The frame's sequence number (`0` to `7`) when it could be read, or `undefined`
|
|
1373
1373
|
* when the frame was so truncated the number was not present.
|
|
1374
1374
|
*/
|
|
1375
1375
|
readonly frameNumber?: number;
|
|
@@ -6367,8 +6367,8 @@ interface FrameChecksum {
|
|
|
6367
6367
|
*/
|
|
6368
6368
|
interface AstmFrame {
|
|
6369
6369
|
/**
|
|
6370
|
-
* The frame's sequence number as read from the `FN` byte. Normally `0
|
|
6371
|
-
* value outside that range means the `FN` byte was not a `0
|
|
6370
|
+
* The frame's sequence number as read from the `FN` byte. Normally `0` to `7`; a
|
|
6371
|
+
* value outside that range means the `FN` byte was not a `0` to `7` digit (a
|
|
6372
6372
|
* corruption that also trips a sequence-gap warning). `undefined` when the frame
|
|
6373
6373
|
* was too truncated to carry a frame number at all.
|
|
6374
6374
|
*/
|
|
@@ -6663,7 +6663,7 @@ declare function decodeAstmFrames(bytes: Uint8Array, options?: FrameOptions): De
|
|
|
6663
6663
|
* - the **modulo-256 checksum** over `FN … terminator` (inclusive), emitted as two
|
|
6664
6664
|
* **uppercase** hex chars (the conservative-emit form the decoder accepts either
|
|
6665
6665
|
* case of);
|
|
6666
|
-
* - the **frame number** `0
|
|
6666
|
+
* - the **frame number** `0` to `7`, starting at `1` and rolling over `7 → 0 → 1`,
|
|
6667
6667
|
* continuous across every frame in the stream (as the decoder's sequence check
|
|
6668
6668
|
* expects); a caller may start the sequence elsewhere to compose one transfer
|
|
6669
6669
|
* across several calls, but only at a number a frame can actually carry;
|
|
@@ -7005,7 +7005,7 @@ declare function serializeFramedAstm(input: AstmMessage | readonly AstmRecord[],
|
|
|
7005
7005
|
* @param bytes - The full decoded byte stream.
|
|
7006
7006
|
* @param start - First index to include (the frame-number byte, one past `STX`).
|
|
7007
7007
|
* @param endInclusive - Last index to include (the `ETB`/`ETX` terminator byte).
|
|
7008
|
-
* @returns The checksum in `0
|
|
7008
|
+
* @returns The checksum in `0` to `255`.
|
|
7009
7009
|
* @example
|
|
7010
7010
|
* ```ts
|
|
7011
7011
|
* import { computeChecksum } from "@cosyte/astm";
|
|
@@ -7018,7 +7018,7 @@ declare function computeChecksum(bytes: Uint8Array, start: number, endInclusive:
|
|
|
7018
7018
|
* Format a checksum byte as the two **uppercase** hex characters ASTM puts on the
|
|
7019
7019
|
* wire (the conservative-emit form). Decode accepts lowercase; emit is uppercase.
|
|
7020
7020
|
*
|
|
7021
|
-
* @param checksum - A value in `0
|
|
7021
|
+
* @param checksum - A value in `0` to `255`.
|
|
7022
7022
|
* @returns Two uppercase hex characters, zero-padded (e.g. `"0A"`, `"75"`).
|
|
7023
7023
|
* @example
|
|
7024
7024
|
* ```ts
|
|
@@ -7036,7 +7036,7 @@ declare function toChecksumHex(checksum: number): string;
|
|
|
7036
7036
|
* @param bytes - The full decoded byte stream.
|
|
7037
7037
|
* @param i0 - Index of the high hex nibble (immediately after the terminator).
|
|
7038
7038
|
* @param i1 - Index of the low hex nibble.
|
|
7039
|
-
* @returns The declared checksum in `0
|
|
7039
|
+
* @returns The declared checksum in `0` to `255`, or `undefined` if unreadable.
|
|
7040
7040
|
* @example
|
|
7041
7041
|
* ```ts
|
|
7042
7042
|
* import { parseChecksumHex } from "@cosyte/astm";
|
package/dist/index.mjs
CHANGED
|
@@ -3142,7 +3142,7 @@ function concatBytes3(chunks) {
|
|
|
3142
3142
|
}
|
|
3143
3143
|
|
|
3144
3144
|
// src/index.ts
|
|
3145
|
-
var VERSION = "0.1.
|
|
3145
|
+
var VERSION = "0.1.1";
|
|
3146
3146
|
|
|
3147
3147
|
export { ABNORMAL_FLAG_CODES, ABNORMAL_FLAG_VOCABULARY, ALL_ASTM_WARNING_CODES, AMBIGUOUS_CODES, ACK as ASTM_ACK, ENQ as ASTM_ENQ, EOT as ASTM_EOT, NAK as ASTM_NAK, AstmAmbiguousStreamError, AstmFrameEncodeError, AstmFrameStrictError, AstmParseError, AstmProfileDefinitionError, AstmSerializeError, AstmStrictError, CANONICAL_DELIMITERS, FATAL_CODES, FRAME_WARNING_CODES, LIVD_CATALOG_IDENTITY_UNDECLARED, LIVD_WARNING_CODES, LTP_WARNING_CODES, RESULT_STATUS_VOCABULARY, SAFETY_CRITICAL_CODES, TOLERABLE_CODES, VERSION, WARNING_CODES, alignmentShiftedComponents, alignmentShiftedFields, alignmentTruncatedField, ambiguousEscapeAlignment, ambiguousMessageKind, ambiguousValueSplit, applyAstmProfile, applyAstmProfileToWarnings, applyLivd, astmDateToLocalISO, astmProfiles, attachComments, buildAstmMessage, classifyMessage, comments, commentsFor, composeAstmFrames, computeChecksum, decodeAstmFrames, decodeEscapes, deepFreeze, defineAstmProfile, defineLivdCatalog, delimiterRoleCollision, delimiterSwallowedByEscape, delimitersRedeclared, describeVocabulary, detectFraming, encodeComponent, fieldScalar, fieldsUnseparated, frameBadChecksum, frameOversize, frameSequenceGap, frameUnterminated, getAstmProfile, getDefaultAstmProfile, hasCollidingRoles, interpretAbnormalFlag, interpretResultStatus, isNonStandard, isSafetyCriticalCode, listAstmProfiles, livdAmbiguousMapping, livdCatalogMissingLoincVersion, livdUnmappedCode, lookupLivdForRecord, ltpAmbiguousTransport, ltpFrameRejected, ltpInitialState, ltpReduce, ltpUnexpectedEvent, messages, nonStandardDelimiters, orders, orphanComment, parseAstmDate, parseAstmRecords, parseChecksumHex, parseFramedAstm, parseReferenceRange, partialTimestamp, patient, primaryCode, profileQuirkApplied, query, readDelimiterDeclaration, readDelimiters, recognizeUniversalTestId, resolveProfileTransport, results, serializeAstmRecord, serializeAstmRecords, serializeField, serializeFramedAstm, setDefaultAstmProfile, splitEscapeAware, toChecksumHex, toDate, toISO, toObject, tokenizeHeader, tokenizeRecord, undefinedAbnormalFlag, undefinedResultStatus, uninterpretedQueryStatus, unitsAbsent, unknownEscapeSequence, unknownRecordType, unpairedEscapeCharacter, unparseableReferenceRange, unreadableRedeclaration };
|
|
3148
3148
|
//# sourceMappingURL=index.mjs.map
|