@everyonesoftware/common 9.0.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { C as CharacterWriteStream, A as AsyncResult, I as Iterable, f as JavascriptIterable, S as SyncResult, c as Iterator, E as EqualFunctions, T as ToStringFunctions, k as Type, g as JavascriptIterator, e as JavascriptAsyncIterator, P as PromiseAsyncResult, a as Comparable, h as JavascriptIteratorResult, b as Comparison, d as JavascriptAsyncIterable } from './characterWriteStream-ogvZec-U.cjs';
2
- export { J as JavascriptArray, i as JavascriptMap, j as JavascriptSet, l as as, m as asArray, n as asBoolean, o as asFunction, p as asFunctionWithParameterCount, q as asNull, r as asNumber, s as asObject, t as asObjectOrArrayOrNull, u as asString, v as getName, w as getParameterCount, x as getPropertyNames, y as hasFunction, z as hasProperty, B as instanceOf, D as instanceOfType, F as isArray, G as isAsyncIterable, H as isBoolean, K as isFunction, L as isFunctionWithParameterCount, M as isIterable, N as isJavascriptAsyncIterable, O as isJavascriptAsyncIterator, Q as isJavascriptIterable, R as isJavascriptIterator, U as isNull, V as isNumber, W as isObject, X as isObjectOrArrayOrNull, Y as isPromise, Z as isPromiseLike, _ as isString, $ as isUndefined, a0 as isUndefinedOrNull } from './characterWriteStream-ogvZec-U.cjs';
1
+ import { I as Iterable, f as JavascriptIterable, S as SyncResult, c as Iterator, E as EqualFunctions, T as ToStringFunctions, k as Type, g as JavascriptIterator, C as CharacterWriteStream, A as AsyncResult, e as JavascriptAsyncIterator, P as PromiseAsyncResult, a as Comparable, h as JavascriptIteratorResult, b as Comparison, d as JavascriptAsyncIterable } from './characterWriteStream-Bhad6oGq.cjs';
2
+ export { J as JavascriptArray, i as JavascriptMap, j as JavascriptSet, l as as, m as asArray, n as asBoolean, o as asFunction, p as asFunctionWithParameterCount, q as asNull, r as asNumber, s as asObject, t as asObjectOrArrayOrNull, u as asString, v as getName, w as getParameterCount, x as getPropertyNames, y as hasFunction, z as hasProperty, B as instanceOf, D as instanceOfType, F as isArray, G as isAsyncIterable, H as isBoolean, K as isFunction, L as isFunctionWithParameterCount, M as isIterable, N as isIterator, O as isJavascriptAsyncIterable, Q as isJavascriptAsyncIterator, R as isJavascriptIterable, U as isJavascriptIterator, V as isNull, W as isNumber, X as isObject, Y as isObjectOrArrayOrNull, Z as isPromise, _ as isPromiseLike, $ as isString, a0 as isUndefined, a1 as isUndefinedOrNull } from './characterWriteStream-Bhad6oGq.cjs';
3
3
  import * as http from 'http';
4
4
 
5
5
  declare class ANSIStyles {
@@ -12,30 +12,6 @@ declare class ANSIStyles {
12
12
  static blue(text: string): string;
13
13
  }
14
14
 
15
- declare class CharacterTable {
16
- private constructor();
17
- static create(): CharacterTable;
18
- }
19
-
20
- declare class IndentedCharacterWriteStream extends CharacterWriteStream {
21
- private readonly innerStream;
22
- private currentIndentationList;
23
- private currentIndentation;
24
- private singleIndent;
25
- private atLineStart;
26
- private constructor();
27
- static create(innerStream: CharacterWriteStream): IndentedCharacterWriteStream;
28
- getSingleIndent(): string;
29
- setSingleIndent(singleIndent: string): this;
30
- getCurrentIndentationCount(): number;
31
- getCurrentIndentation(): string;
32
- addIndentation(singleIndent?: string): this;
33
- removeIndentation(): string;
34
- indent(action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
35
- indent(singleIndent: string, action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
36
- writeString(text: string): AsyncResult<number>;
37
- }
38
-
39
15
  /**
40
16
  * A container that can be accessed using indexes.
41
17
  */
@@ -80,6 +56,34 @@ declare abstract class Indexable<T> implements Iterable<T> {
80
56
  static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
81
57
  }
82
58
 
59
+ declare class CharacterTable {
60
+ private readonly rows;
61
+ private constructor();
62
+ static create(): CharacterTable;
63
+ addRow(row: JavascriptIterable<string>): this;
64
+ addRows(rows: JavascriptIterable<JavascriptIterable<string>>): this;
65
+ getRows(): Indexable<Indexable<string>>;
66
+ }
67
+
68
+ declare class IndentedCharacterWriteStream extends CharacterWriteStream {
69
+ private readonly innerStream;
70
+ private currentIndentationList;
71
+ private currentIndentation;
72
+ private singleIndent;
73
+ private atLineStart;
74
+ private constructor();
75
+ static create(innerStream: CharacterWriteStream): IndentedCharacterWriteStream;
76
+ getSingleIndent(): string;
77
+ setSingleIndent(singleIndent: string): this;
78
+ getCurrentIndentationCount(): number;
79
+ getCurrentIndentation(): string;
80
+ addIndentation(singleIndent?: string): this;
81
+ removeIndentation(): string;
82
+ indent(action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
83
+ indent(singleIndent: string, action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
84
+ writeString(text: string): AsyncResult<number>;
85
+ }
86
+
83
87
  /**
84
88
  * An {@link Indexable} that can change it's values.
85
89
  */
@@ -123,6 +127,87 @@ declare abstract class MutableIndexable<T> implements Indexable<T> {
123
127
  static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
124
128
  }
125
129
 
130
+ declare class TokenType {
131
+ private readonly name;
132
+ private constructor();
133
+ private static create;
134
+ static readonly Whitespace: TokenType;
135
+ static readonly NewLine: TokenType;
136
+ static readonly Letters: TokenType;
137
+ static readonly Digits: TokenType;
138
+ static readonly LeftParenthesis: TokenType;
139
+ static readonly RightParenthesis: TokenType;
140
+ static readonly Backslash: TokenType;
141
+ static readonly ForwardSlash: TokenType;
142
+ static readonly Unknown: TokenType;
143
+ static readonly Period: TokenType;
144
+ static readonly Underscore: TokenType;
145
+ static readonly Colon: TokenType;
146
+ toString(): string;
147
+ }
148
+
149
+ declare class Token {
150
+ private static readonly newLineToken;
151
+ private static readonly carriageReturnNewLineToken;
152
+ private static readonly leftParenthesisToken;
153
+ private static readonly rightParenthesisToken;
154
+ private static readonly backslashToken;
155
+ private static readonly forwardSlashToken;
156
+ private static readonly periodToken;
157
+ private static readonly underscoreToken;
158
+ private static readonly colonToken;
159
+ private readonly text;
160
+ private readonly type;
161
+ private constructor();
162
+ private static create;
163
+ static whitespace(text: string): Token;
164
+ static newLine(text?: string): Token;
165
+ static leftParenthesis(): Token;
166
+ static rightParenthesis(): Token;
167
+ static backslash(): Token;
168
+ static forwardSlash(): Token;
169
+ static period(): Token;
170
+ static underscore(): Token;
171
+ static colon(): Token;
172
+ static letters(text: string): Token;
173
+ static digits(text: string): Token;
174
+ static unknown(text: string): Token;
175
+ getText(): string;
176
+ getType(): TokenType;
177
+ }
178
+
179
+ /**
180
+ * A type that converts a stream of characters into a stream of tokens.
181
+ */
182
+ declare class Tokenizer implements Iterator<Token> {
183
+ private readonly characters;
184
+ private currentToken;
185
+ private started;
186
+ private constructor();
187
+ static create(characters: JavascriptIterable<string>): Tokenizer;
188
+ hasStarted(): boolean;
189
+ hasCurrent(): boolean;
190
+ getCurrent(): Token;
191
+ next(): SyncResult<boolean>;
192
+ private readWhile;
193
+ start(): SyncResult<this>;
194
+ takeCurrent(): SyncResult<Token>;
195
+ any(): SyncResult<boolean>;
196
+ getCount(): SyncResult<number>;
197
+ toArray(): SyncResult<Token[]>;
198
+ concatenate(...toConcatenate: JavascriptIterable<Token>[]): Iterator<Token>;
199
+ where(condition: (value: Token) => (boolean | SyncResult<boolean>)): Iterator<Token>;
200
+ map<TOutput>(mapping: (value: Token) => TOutput | SyncResult<TOutput>): Iterator<TOutput>;
201
+ flatMap<TOutput>(mapping: (value: Token) => JavascriptIterable<TOutput>): Iterator<TOutput>;
202
+ whereInstanceOf<U extends Token>(typeCheck: (value: Token) => value is U): Iterator<U>;
203
+ whereInstanceOfType<U extends Token>(type: Type<U>): Iterator<U>;
204
+ first(condition?: ((value: Token) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<Token>;
205
+ last(condition?: ((value: Token) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<Token>;
206
+ take(maximumToTake: number): Iterator<Token>;
207
+ skip(maximumToSkip: number): Iterator<Token>;
208
+ [Symbol.iterator](): JavascriptIterator<Token>;
209
+ }
210
+
126
211
  /**
127
212
  * A collection of parameters that can be passed to an assert error message function.
128
213
  */
@@ -3419,4 +3504,4 @@ declare class WonderlandTrailClient implements HttpClient {
3419
3504
  }): PromiseAsyncResult<Iterable<WonderlandTrailItinerary>>;
3420
3505
  }
3421
3506
 
3422
- export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableIndexable, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
3507
+ export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableIndexable, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Token, TokenType, Tokenizer, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
@@ -1,5 +1,5 @@
1
- import { C as CharacterWriteStream, A as AsyncResult, I as Iterable, f as JavascriptIterable, S as SyncResult, c as Iterator, E as EqualFunctions, T as ToStringFunctions, k as Type, g as JavascriptIterator, e as JavascriptAsyncIterator, P as PromiseAsyncResult, a as Comparable, h as JavascriptIteratorResult, b as Comparison, d as JavascriptAsyncIterable } from './characterWriteStream-ogvZec-U.js';
2
- export { J as JavascriptArray, i as JavascriptMap, j as JavascriptSet, l as as, m as asArray, n as asBoolean, o as asFunction, p as asFunctionWithParameterCount, q as asNull, r as asNumber, s as asObject, t as asObjectOrArrayOrNull, u as asString, v as getName, w as getParameterCount, x as getPropertyNames, y as hasFunction, z as hasProperty, B as instanceOf, D as instanceOfType, F as isArray, G as isAsyncIterable, H as isBoolean, K as isFunction, L as isFunctionWithParameterCount, M as isIterable, N as isJavascriptAsyncIterable, O as isJavascriptAsyncIterator, Q as isJavascriptIterable, R as isJavascriptIterator, U as isNull, V as isNumber, W as isObject, X as isObjectOrArrayOrNull, Y as isPromise, Z as isPromiseLike, _ as isString, $ as isUndefined, a0 as isUndefinedOrNull } from './characterWriteStream-ogvZec-U.js';
1
+ import { I as Iterable, f as JavascriptIterable, S as SyncResult, c as Iterator, E as EqualFunctions, T as ToStringFunctions, k as Type, g as JavascriptIterator, C as CharacterWriteStream, A as AsyncResult, e as JavascriptAsyncIterator, P as PromiseAsyncResult, a as Comparable, h as JavascriptIteratorResult, b as Comparison, d as JavascriptAsyncIterable } from './characterWriteStream-Bhad6oGq.js';
2
+ export { J as JavascriptArray, i as JavascriptMap, j as JavascriptSet, l as as, m as asArray, n as asBoolean, o as asFunction, p as asFunctionWithParameterCount, q as asNull, r as asNumber, s as asObject, t as asObjectOrArrayOrNull, u as asString, v as getName, w as getParameterCount, x as getPropertyNames, y as hasFunction, z as hasProperty, B as instanceOf, D as instanceOfType, F as isArray, G as isAsyncIterable, H as isBoolean, K as isFunction, L as isFunctionWithParameterCount, M as isIterable, N as isIterator, O as isJavascriptAsyncIterable, Q as isJavascriptAsyncIterator, R as isJavascriptIterable, U as isJavascriptIterator, V as isNull, W as isNumber, X as isObject, Y as isObjectOrArrayOrNull, Z as isPromise, _ as isPromiseLike, $ as isString, a0 as isUndefined, a1 as isUndefinedOrNull } from './characterWriteStream-Bhad6oGq.js';
3
3
  import * as http from 'http';
4
4
 
5
5
  declare class ANSIStyles {
@@ -12,30 +12,6 @@ declare class ANSIStyles {
12
12
  static blue(text: string): string;
13
13
  }
14
14
 
15
- declare class CharacterTable {
16
- private constructor();
17
- static create(): CharacterTable;
18
- }
19
-
20
- declare class IndentedCharacterWriteStream extends CharacterWriteStream {
21
- private readonly innerStream;
22
- private currentIndentationList;
23
- private currentIndentation;
24
- private singleIndent;
25
- private atLineStart;
26
- private constructor();
27
- static create(innerStream: CharacterWriteStream): IndentedCharacterWriteStream;
28
- getSingleIndent(): string;
29
- setSingleIndent(singleIndent: string): this;
30
- getCurrentIndentationCount(): number;
31
- getCurrentIndentation(): string;
32
- addIndentation(singleIndent?: string): this;
33
- removeIndentation(): string;
34
- indent(action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
35
- indent(singleIndent: string, action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
36
- writeString(text: string): AsyncResult<number>;
37
- }
38
-
39
15
  /**
40
16
  * A container that can be accessed using indexes.
41
17
  */
@@ -80,6 +56,34 @@ declare abstract class Indexable<T> implements Iterable<T> {
80
56
  static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
81
57
  }
82
58
 
59
+ declare class CharacterTable {
60
+ private readonly rows;
61
+ private constructor();
62
+ static create(): CharacterTable;
63
+ addRow(row: JavascriptIterable<string>): this;
64
+ addRows(rows: JavascriptIterable<JavascriptIterable<string>>): this;
65
+ getRows(): Indexable<Indexable<string>>;
66
+ }
67
+
68
+ declare class IndentedCharacterWriteStream extends CharacterWriteStream {
69
+ private readonly innerStream;
70
+ private currentIndentationList;
71
+ private currentIndentation;
72
+ private singleIndent;
73
+ private atLineStart;
74
+ private constructor();
75
+ static create(innerStream: CharacterWriteStream): IndentedCharacterWriteStream;
76
+ getSingleIndent(): string;
77
+ setSingleIndent(singleIndent: string): this;
78
+ getCurrentIndentationCount(): number;
79
+ getCurrentIndentation(): string;
80
+ addIndentation(singleIndent?: string): this;
81
+ removeIndentation(): string;
82
+ indent(action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
83
+ indent(singleIndent: string, action: () => (void | number | PromiseLike<void | number>)): AsyncResult<number>;
84
+ writeString(text: string): AsyncResult<number>;
85
+ }
86
+
83
87
  /**
84
88
  * An {@link Indexable} that can change it's values.
85
89
  */
@@ -123,6 +127,87 @@ declare abstract class MutableIndexable<T> implements Indexable<T> {
123
127
  static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
124
128
  }
125
129
 
130
+ declare class TokenType {
131
+ private readonly name;
132
+ private constructor();
133
+ private static create;
134
+ static readonly Whitespace: TokenType;
135
+ static readonly NewLine: TokenType;
136
+ static readonly Letters: TokenType;
137
+ static readonly Digits: TokenType;
138
+ static readonly LeftParenthesis: TokenType;
139
+ static readonly RightParenthesis: TokenType;
140
+ static readonly Backslash: TokenType;
141
+ static readonly ForwardSlash: TokenType;
142
+ static readonly Unknown: TokenType;
143
+ static readonly Period: TokenType;
144
+ static readonly Underscore: TokenType;
145
+ static readonly Colon: TokenType;
146
+ toString(): string;
147
+ }
148
+
149
+ declare class Token {
150
+ private static readonly newLineToken;
151
+ private static readonly carriageReturnNewLineToken;
152
+ private static readonly leftParenthesisToken;
153
+ private static readonly rightParenthesisToken;
154
+ private static readonly backslashToken;
155
+ private static readonly forwardSlashToken;
156
+ private static readonly periodToken;
157
+ private static readonly underscoreToken;
158
+ private static readonly colonToken;
159
+ private readonly text;
160
+ private readonly type;
161
+ private constructor();
162
+ private static create;
163
+ static whitespace(text: string): Token;
164
+ static newLine(text?: string): Token;
165
+ static leftParenthesis(): Token;
166
+ static rightParenthesis(): Token;
167
+ static backslash(): Token;
168
+ static forwardSlash(): Token;
169
+ static period(): Token;
170
+ static underscore(): Token;
171
+ static colon(): Token;
172
+ static letters(text: string): Token;
173
+ static digits(text: string): Token;
174
+ static unknown(text: string): Token;
175
+ getText(): string;
176
+ getType(): TokenType;
177
+ }
178
+
179
+ /**
180
+ * A type that converts a stream of characters into a stream of tokens.
181
+ */
182
+ declare class Tokenizer implements Iterator<Token> {
183
+ private readonly characters;
184
+ private currentToken;
185
+ private started;
186
+ private constructor();
187
+ static create(characters: JavascriptIterable<string>): Tokenizer;
188
+ hasStarted(): boolean;
189
+ hasCurrent(): boolean;
190
+ getCurrent(): Token;
191
+ next(): SyncResult<boolean>;
192
+ private readWhile;
193
+ start(): SyncResult<this>;
194
+ takeCurrent(): SyncResult<Token>;
195
+ any(): SyncResult<boolean>;
196
+ getCount(): SyncResult<number>;
197
+ toArray(): SyncResult<Token[]>;
198
+ concatenate(...toConcatenate: JavascriptIterable<Token>[]): Iterator<Token>;
199
+ where(condition: (value: Token) => (boolean | SyncResult<boolean>)): Iterator<Token>;
200
+ map<TOutput>(mapping: (value: Token) => TOutput | SyncResult<TOutput>): Iterator<TOutput>;
201
+ flatMap<TOutput>(mapping: (value: Token) => JavascriptIterable<TOutput>): Iterator<TOutput>;
202
+ whereInstanceOf<U extends Token>(typeCheck: (value: Token) => value is U): Iterator<U>;
203
+ whereInstanceOfType<U extends Token>(type: Type<U>): Iterator<U>;
204
+ first(condition?: ((value: Token) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<Token>;
205
+ last(condition?: ((value: Token) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<Token>;
206
+ take(maximumToTake: number): Iterator<Token>;
207
+ skip(maximumToSkip: number): Iterator<Token>;
208
+ [Symbol.iterator](): JavascriptIterator<Token>;
209
+ }
210
+
126
211
  /**
127
212
  * A collection of parameters that can be passed to an assert error message function.
128
213
  */
@@ -3419,4 +3504,4 @@ declare class WonderlandTrailClient implements HttpClient {
3419
3504
  }): PromiseAsyncResult<Iterable<WonderlandTrailItinerary>>;
3420
3505
  }
3421
3506
 
3422
- export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableIndexable, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
3507
+ export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableIndexable, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Token, TokenType, Tokenizer, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
@@ -95,6 +95,9 @@ import {
95
95
  TakeAsyncIterator,
96
96
  TakeIterator,
97
97
  ToStringFunctions,
98
+ Token,
99
+ TokenType,
100
+ Tokenizer,
98
101
  WhereAsyncIterator,
99
102
  WhereIterable,
100
103
  WhereIterator,
@@ -136,6 +139,7 @@ import {
136
139
  isFunction,
137
140
  isFunctionWithParameterCount,
138
141
  isIterable,
142
+ isIterator,
139
143
  isJavascriptAsyncIterable,
140
144
  isJavascriptAsyncIterator,
141
145
  isJavascriptIterable,
@@ -163,7 +167,7 @@ import {
163
167
  parseHttpMethod,
164
168
  quote,
165
169
  toString
166
- } from "./chunk-OYMWB5SX.js";
170
+ } from "./chunk-U7O7WS5F.js";
167
171
  export {
168
172
  ANSIStyles,
169
173
  AsyncIterator,
@@ -261,6 +265,9 @@ export {
261
265
  TakeAsyncIterator,
262
266
  TakeIterator,
263
267
  ToStringFunctions,
268
+ Token,
269
+ TokenType,
270
+ Tokenizer,
264
271
  WhereAsyncIterator,
265
272
  WhereIterable,
266
273
  WhereIterator,
@@ -302,6 +309,7 @@ export {
302
309
  isFunction,
303
310
  isFunctionWithParameterCount,
304
311
  isIterable,
312
+ isIterator,
305
313
  isJavascriptAsyncIterable,
306
314
  isJavascriptAsyncIterator,
307
315
  isJavascriptIterable,
@@ -1505,11 +1505,9 @@ var Iterator = class _Iterator {
1505
1505
  PreCondition.assertNotUndefinedAndNotNull(iterator, "iterator");
1506
1506
  return SyncResult.create(() => {
1507
1507
  const result = [];
1508
- if (iterator.hasCurrent()) {
1509
- result.push(iterator.getCurrent());
1510
- }
1511
- while (iterator.next().await()) {
1512
- result.push(iterator.getCurrent());
1508
+ iterator.start().await();
1509
+ while (iterator.hasCurrent()) {
1510
+ result.push(iterator.takeCurrent().await());
1513
1511
  }
1514
1512
  return result;
1515
1513
  });
@@ -4548,6 +4546,112 @@ var IndentedCharacterWriteStream = class _IndentedCharacterWriteStream extends C
4548
4546
  }
4549
4547
  };
4550
4548
 
4549
+ // sources/TokenType.ts
4550
+ var TokenType = class _TokenType {
4551
+ name;
4552
+ constructor(name) {
4553
+ PreCondition.assertNotEmpty(name, "name");
4554
+ this.name = name;
4555
+ }
4556
+ static create(name) {
4557
+ return new _TokenType(name);
4558
+ }
4559
+ static Whitespace = _TokenType.create("Whitespace");
4560
+ static NewLine = _TokenType.create("NewLine");
4561
+ static Letters = _TokenType.create("Letters");
4562
+ static Digits = _TokenType.create("Digits");
4563
+ static LeftParenthesis = _TokenType.create("LeftParenthesis");
4564
+ static RightParenthesis = _TokenType.create("RightParenthesis");
4565
+ static Backslash = _TokenType.create("Backslash");
4566
+ static ForwardSlash = _TokenType.create("ForwardSlash");
4567
+ static Unknown = _TokenType.create("Unknown");
4568
+ static Period = _TokenType.create("Period");
4569
+ static Underscore = _TokenType.create("Underscore");
4570
+ static Colon = _TokenType.create("Colon");
4571
+ toString() {
4572
+ return this.name;
4573
+ }
4574
+ };
4575
+
4576
+ // sources/Token.ts
4577
+ var Token = class _Token {
4578
+ static newLineToken = _Token.create("\n", TokenType.NewLine);
4579
+ static carriageReturnNewLineToken = _Token.create("\r\n", TokenType.NewLine);
4580
+ static leftParenthesisToken = _Token.create("(", TokenType.LeftParenthesis);
4581
+ static rightParenthesisToken = _Token.create(")", TokenType.RightParenthesis);
4582
+ static backslashToken = _Token.create("\\", TokenType.Backslash);
4583
+ static forwardSlashToken = _Token.create("/", TokenType.ForwardSlash);
4584
+ static periodToken = _Token.create(".", TokenType.Period);
4585
+ static underscoreToken = _Token.create("_", TokenType.Underscore);
4586
+ static colonToken = _Token.create(":", TokenType.Colon);
4587
+ text;
4588
+ type;
4589
+ constructor(text, type) {
4590
+ PreCondition.assertNotEmpty(text, "text");
4591
+ PreCondition.assertNotUndefinedAndNotNull(type, "type");
4592
+ this.text = text;
4593
+ this.type = type;
4594
+ }
4595
+ static create(text, type) {
4596
+ return new _Token(text, type);
4597
+ }
4598
+ static whitespace(text) {
4599
+ return _Token.create(text, TokenType.Whitespace);
4600
+ }
4601
+ static newLine(text) {
4602
+ text ??= "\n";
4603
+ let result;
4604
+ switch (text) {
4605
+ case "\n":
4606
+ result = _Token.newLineToken;
4607
+ break;
4608
+ case "\r\n":
4609
+ result = _Token.carriageReturnNewLineToken;
4610
+ break;
4611
+ default:
4612
+ result = _Token.create(text, TokenType.NewLine);
4613
+ break;
4614
+ }
4615
+ return result;
4616
+ }
4617
+ static leftParenthesis() {
4618
+ return _Token.leftParenthesisToken;
4619
+ }
4620
+ static rightParenthesis() {
4621
+ return _Token.rightParenthesisToken;
4622
+ }
4623
+ static backslash() {
4624
+ return _Token.backslashToken;
4625
+ }
4626
+ static forwardSlash() {
4627
+ return _Token.forwardSlashToken;
4628
+ }
4629
+ static period() {
4630
+ return _Token.periodToken;
4631
+ }
4632
+ static underscore() {
4633
+ return _Token.underscoreToken;
4634
+ }
4635
+ static colon() {
4636
+ return _Token.colonToken;
4637
+ }
4638
+ static letters(text) {
4639
+ return _Token.create(text, TokenType.Letters);
4640
+ }
4641
+ static digits(text) {
4642
+ return _Token.create(text, TokenType.Digits);
4643
+ }
4644
+ static unknown(text) {
4645
+ return _Token.create(text, TokenType.Unknown);
4646
+ }
4647
+ getText() {
4648
+ return this.text;
4649
+ }
4650
+ getType() {
4651
+ return this.type;
4652
+ }
4653
+ };
4654
+
4551
4655
  // sources/english.ts
4552
4656
  function andList(values) {
4553
4657
  return list("and", values);
@@ -6304,10 +6408,10 @@ var BasicTestError = class _BasicTestError {
6304
6408
  getErrorString(options) {
6305
6409
  let result = this.error instanceof Error && this.error.stack ? this.error.stack : `${this.error}`;
6306
6410
  const currentFolderPath = process.cwd();
6307
- if (options?.removeNonProjectPaths ?? false) {
6411
+ if (options?.removeNonProjectPaths ?? true) {
6308
6412
  result = _BasicTestError.removeNonProjectPaths(result, currentFolderPath);
6309
6413
  }
6310
- if (options?.relativeFilePaths ?? false) {
6414
+ if (options?.relativeFilePaths ?? true) {
6311
6415
  result = _BasicTestError.makeFilePathsRelative(result, currentFolderPath);
6312
6416
  }
6313
6417
  return result;