@everyonesoftware/common 6.0.0 → 8.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,7 +1,128 @@
1
- import { e as JavascriptAsyncIterator, P as PromiseAsyncResult, k as Type, a as Comparable, h as JavascriptIteratorResult, A as AsyncResult, S as SyncResult, I as Iterable, f as JavascriptIterable, E as EqualFunctions, c as Iterator, T as ToStringFunctions, g as JavascriptIterator, C as CharacterWriteStream, b as Comparison, d as JavascriptAsyncIterable } from './characterWriteStream-DUlG_bx_.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-DUlG_bx_.cjs';
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';
3
3
  import * as http from 'http';
4
4
 
5
+ declare class ANSIStyles {
6
+ private constructor();
7
+ private static color;
8
+ static black(text: string): string;
9
+ static red(text: string): string;
10
+ static green(text: string): string;
11
+ static yellow(text: string): string;
12
+ static blue(text: string): string;
13
+ }
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
+ /**
40
+ * A container that can be accessed using indexes.
41
+ */
42
+ declare abstract class Indexable<T> implements Iterable<T> {
43
+ static create<T>(values?: JavascriptIterable<T>): Indexable<T>;
44
+ /**
45
+ * Get the value at the provided index.
46
+ * @param index The index of the value to return.
47
+ */
48
+ abstract get(index: number): SyncResult<T>;
49
+ /**
50
+ * Iterate over the values in this {@link Indexable}.
51
+ */
52
+ abstract iterate(): Iterator<T>;
53
+ toArray(): SyncResult<T[]>;
54
+ static toArray<T>(indexable: Indexable<T>): SyncResult<T[]>;
55
+ any(): SyncResult<boolean>;
56
+ static any<T>(indexable: Indexable<T>): SyncResult<boolean>;
57
+ getCount(): SyncResult<number>;
58
+ static getCount<T>(indexable: Indexable<T>): SyncResult<number>;
59
+ equals(right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
60
+ static equals<T>(left: Indexable<T>, right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
61
+ toString(toStringFunctions?: ToStringFunctions): string;
62
+ static toString<T>(indexable: Indexable<T>, toStringFunctions?: ToStringFunctions): string;
63
+ concatenate(...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
64
+ static concatenate<T>(indexable: Indexable<T>, ...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
65
+ map<TOutput>(mapping: (value: T) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
66
+ static map<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
67
+ flatMap<TOutput>(mapping: (value: T) => JavascriptIterable<TOutput>): Iterable<TOutput>;
68
+ static flatMap<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => JavascriptIterable<TOutput>): Iterable<TOutput>;
69
+ where(condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
70
+ static where<T>(indexable: Indexable<T>, condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
71
+ instanceOf<TOutput extends T>(typeOrTypeCheck: Type<TOutput> | ((value: T) => value is TOutput)): Iterable<TOutput>;
72
+ static instanceOf<TInput, TOutput extends TInput>(indexable: Indexable<TInput>, typeOrTypeCheck: Type<TOutput> | ((value: TInput) => value is TOutput)): Iterable<TOutput>;
73
+ first(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
74
+ static first<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
75
+ last(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
76
+ static last<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
77
+ [Symbol.iterator](): JavascriptIterator<T>;
78
+ static [Symbol.iterator]<T>(indexable: Indexable<T>): JavascriptIterator<T>;
79
+ contains(value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
80
+ static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
81
+ }
82
+
83
+ /**
84
+ * An {@link Indexable} that can change it's values.
85
+ */
86
+ declare abstract class MutableIndexable<T> implements Indexable<T> {
87
+ static create<T>(values?: JavascriptIterable<T>): MutableIndexable<T>;
88
+ abstract get(index: number): SyncResult<T>;
89
+ /**
90
+ * Set the value at the provided index to the be the provided value.
91
+ * @param index The index of the value to set.
92
+ * @param value The value to set.
93
+ */
94
+ abstract set(index: number, value: T): this;
95
+ abstract iterate(): Iterator<T>;
96
+ toArray(): SyncResult<T[]>;
97
+ static toArray<T>(indexable: Indexable<T>): SyncResult<T[]>;
98
+ any(): SyncResult<boolean>;
99
+ static any<T>(indexable: Indexable<T>): SyncResult<boolean>;
100
+ getCount(): SyncResult<number>;
101
+ static getCount<T>(indexable: Indexable<T>): SyncResult<number>;
102
+ equals(right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
103
+ static equals<T>(left: Indexable<T>, right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
104
+ toString(toStringFunctions?: ToStringFunctions): string;
105
+ static toString<T>(indexable: Indexable<T>, toStringFunctions?: ToStringFunctions): string;
106
+ concatenate(...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
107
+ static concatenate<T>(indexable: Indexable<T>, ...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
108
+ map<TOutput>(mapping: (value: T) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
109
+ static map<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
110
+ flatMap<TOutput>(mapping: (value: T) => JavascriptIterable<TOutput>): Iterable<TOutput>;
111
+ static flatMap<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => JavascriptIterable<TOutput>): Iterable<TOutput>;
112
+ where(condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
113
+ static where<T>(indexable: Indexable<T>, condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
114
+ instanceOf<TOutput extends T>(typeOrTypeCheck: Type<TOutput> | ((value: T) => value is TOutput)): Iterable<TOutput>;
115
+ static instanceOf<TInput, TOutput extends TInput>(indexable: Indexable<TInput>, typeOrTypeCheck: Type<TOutput> | ((value: TInput) => value is TOutput)): Iterable<TOutput>;
116
+ first(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
117
+ static first<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
118
+ last(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
119
+ static last<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
120
+ [Symbol.iterator](): JavascriptIterator<T>;
121
+ static [Symbol.iterator]<T>(indexable: Indexable<T>): JavascriptIterator<T>;
122
+ contains(value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
123
+ static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
124
+ }
125
+
5
126
  /**
6
127
  * A collection of parameters that can be passed to an assert error message function.
7
128
  */
@@ -228,7 +349,7 @@ declare class SyncDisposable implements Disposable {
228
349
  isDisposed(): boolean;
229
350
  }
230
351
 
231
- declare abstract class List<T> implements Iterable<T> {
352
+ declare abstract class List<T> implements MutableIndexable<T> {
232
353
  static create<T>(values?: JavascriptIterable<T>): List<T>;
233
354
  /**
234
355
  * Add the provided value to the end of this {@link List}.
@@ -538,43 +659,49 @@ declare class CharacterReadStreamAsyncIterator implements AsyncIterator<string>
538
659
  }
539
660
 
540
661
  /**
541
- * An individual parameter from a {@link CommandLineParameters} object.
662
+ * A class that can be used to define and interact with an application's command line interface.
542
663
  */
543
- declare class CommandLineParameter<T> {
544
- /**
545
- * The full name of this {@link CommandLineParameter}.
546
- */
547
- private readonly name;
548
- /**
549
- * The description for this {@link CommandLineParameter}.
550
- */
551
- private readonly description;
552
- /**
553
- * The function that can be invoked to get this {@link CommandLineParameter}'s value.
554
- */
555
- private readonly valueGetter;
664
+ declare class CommandLineParameters {
665
+ private readonly args;
666
+ private readonly parameters;
556
667
  private constructor();
668
+ static create(args: JavascriptIterable<string>): CommandLineParameters;
669
+ static getArgumentName(arg: string): string | undefined;
670
+ getArguments(): Iterable<string>;
557
671
  /**
558
- * Create a new {@link CommandLineParameter}.
559
- * @param name The full name of the {@link CommandLineParameter}.
560
- * @param description The description for the {@link CommandLineParameter}.
561
- * @param valueGetter The function that will be used to get the returned
562
- * {@link CommandLineParameter}'s value.
563
- */
564
- static create<T>(name: string, description: string, valueGetter: () => T): CommandLineParameter<T>;
565
- /**
566
- * Get the value for this {@link CommandLineParameter}.
672
+ * Get the value of the first argument that matches one of the provided names.
673
+ * @param names The possible names to look for.
567
674
  */
568
- getValue(): T;
675
+ getNamedArgumentStringValue(nameOrNames: string | JavascriptIterable<string>): SyncResult<string>;
676
+ nameOrAliasExists(nameOrAlias: string): boolean;
677
+ add(name: string): CommandLineParameter<string>;
569
678
  }
570
679
 
571
680
  /**
572
- * A class that can be used to define and interact with an application's command line interface.
681
+ * An individual parameter from a {@link CommandLineParameters} object.
573
682
  */
574
- declare class CommandLineParameters {
575
- private readonly args;
683
+ declare class CommandLineParameter<T> {
684
+ private readonly owner;
685
+ private readonly name;
686
+ private aliases;
687
+ private description;
576
688
  private constructor();
577
- static create(args: JavascriptIterable<string>): CommandLineParameters;
689
+ static create<T>(owner: CommandLineParameters, name: string): CommandLineParameter<T>;
690
+ static create<T>(properties: {
691
+ owner: CommandLineParameters;
692
+ name: string;
693
+ }): CommandLineParameter<T>;
694
+ /**
695
+ * Get the name of this {@link CommandLineParameter}.
696
+ */
697
+ getName(): string;
698
+ getAliases(): Iterable<string>;
699
+ private nameOrAliasExists;
700
+ addAlias(alias: string): this;
701
+ addAliases(aliases: JavascriptIterable<string>): this;
702
+ getNameAndAliases(): Iterable<string>;
703
+ getDescription(): string;
704
+ setDescription(description: string): this;
578
705
  }
579
706
 
580
707
  /**
@@ -1396,7 +1523,7 @@ declare class CurrentProcess {
1396
1523
  private constructor();
1397
1524
  static create(): CurrentProcess;
1398
1525
  static run(action: (currentProcess: CurrentProcess) => void | number | Promise<void | number>): Promise<void>;
1399
- getArguments(): JavascriptIterable<string>;
1526
+ getArguments(): Iterable<string>;
1400
1527
  setArguments(args: JavascriptIterable<string>): this;
1401
1528
  getParameters(): CommandLineParameters;
1402
1529
  getOutputWriteStream(): CharacterWriteStream;
@@ -2109,6 +2236,10 @@ declare abstract class Stack<T> {
2109
2236
  * Get whether there are any values in this {@link Stack}.
2110
2237
  */
2111
2238
  abstract any(): AsyncResult<boolean>;
2239
+ /**
2240
+ * Get the number of values that are currently in this {@link Stack}.
2241
+ */
2242
+ abstract getCount(): AsyncResult<number>;
2112
2243
  /**
2113
2244
  * Push the provided value onto the top of this {@link Stack}.
2114
2245
  * @param value The value to push on the top of this {@link Stack}.
@@ -2136,6 +2267,7 @@ declare class ListStack<T> implements Stack<T> {
2136
2267
  private constructor();
2137
2268
  static create<T>(list?: List<T>): ListStack<T>;
2138
2269
  any(): SyncResult<boolean>;
2270
+ getCount(): SyncResult<number>;
2139
2271
  add(value: T): SyncResult<void>;
2140
2272
  addAll(values: JavascriptIterable<T>): SyncResult<void>;
2141
2273
  remove(): SyncResult<T>;
@@ -3287,4 +3419,4 @@ declare class WonderlandTrailClient implements HttpClient {
3287
3419
  }): PromiseAsyncResult<Iterable<WonderlandTrailItinerary>>;
3288
3420
  }
3289
3421
 
3290
- export { type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, 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, 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, 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 };
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 };
@@ -1,7 +1,128 @@
1
- import { e as JavascriptAsyncIterator, P as PromiseAsyncResult, k as Type, a as Comparable, h as JavascriptIteratorResult, A as AsyncResult, S as SyncResult, I as Iterable, f as JavascriptIterable, E as EqualFunctions, c as Iterator, T as ToStringFunctions, g as JavascriptIterator, C as CharacterWriteStream, b as Comparison, d as JavascriptAsyncIterable } from './characterWriteStream-DUlG_bx_.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-DUlG_bx_.js';
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';
3
3
  import * as http from 'http';
4
4
 
5
+ declare class ANSIStyles {
6
+ private constructor();
7
+ private static color;
8
+ static black(text: string): string;
9
+ static red(text: string): string;
10
+ static green(text: string): string;
11
+ static yellow(text: string): string;
12
+ static blue(text: string): string;
13
+ }
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
+ /**
40
+ * A container that can be accessed using indexes.
41
+ */
42
+ declare abstract class Indexable<T> implements Iterable<T> {
43
+ static create<T>(values?: JavascriptIterable<T>): Indexable<T>;
44
+ /**
45
+ * Get the value at the provided index.
46
+ * @param index The index of the value to return.
47
+ */
48
+ abstract get(index: number): SyncResult<T>;
49
+ /**
50
+ * Iterate over the values in this {@link Indexable}.
51
+ */
52
+ abstract iterate(): Iterator<T>;
53
+ toArray(): SyncResult<T[]>;
54
+ static toArray<T>(indexable: Indexable<T>): SyncResult<T[]>;
55
+ any(): SyncResult<boolean>;
56
+ static any<T>(indexable: Indexable<T>): SyncResult<boolean>;
57
+ getCount(): SyncResult<number>;
58
+ static getCount<T>(indexable: Indexable<T>): SyncResult<number>;
59
+ equals(right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
60
+ static equals<T>(left: Indexable<T>, right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
61
+ toString(toStringFunctions?: ToStringFunctions): string;
62
+ static toString<T>(indexable: Indexable<T>, toStringFunctions?: ToStringFunctions): string;
63
+ concatenate(...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
64
+ static concatenate<T>(indexable: Indexable<T>, ...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
65
+ map<TOutput>(mapping: (value: T) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
66
+ static map<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
67
+ flatMap<TOutput>(mapping: (value: T) => JavascriptIterable<TOutput>): Iterable<TOutput>;
68
+ static flatMap<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => JavascriptIterable<TOutput>): Iterable<TOutput>;
69
+ where(condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
70
+ static where<T>(indexable: Indexable<T>, condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
71
+ instanceOf<TOutput extends T>(typeOrTypeCheck: Type<TOutput> | ((value: T) => value is TOutput)): Iterable<TOutput>;
72
+ static instanceOf<TInput, TOutput extends TInput>(indexable: Indexable<TInput>, typeOrTypeCheck: Type<TOutput> | ((value: TInput) => value is TOutput)): Iterable<TOutput>;
73
+ first(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
74
+ static first<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
75
+ last(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
76
+ static last<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
77
+ [Symbol.iterator](): JavascriptIterator<T>;
78
+ static [Symbol.iterator]<T>(indexable: Indexable<T>): JavascriptIterator<T>;
79
+ contains(value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
80
+ static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
81
+ }
82
+
83
+ /**
84
+ * An {@link Indexable} that can change it's values.
85
+ */
86
+ declare abstract class MutableIndexable<T> implements Indexable<T> {
87
+ static create<T>(values?: JavascriptIterable<T>): MutableIndexable<T>;
88
+ abstract get(index: number): SyncResult<T>;
89
+ /**
90
+ * Set the value at the provided index to the be the provided value.
91
+ * @param index The index of the value to set.
92
+ * @param value The value to set.
93
+ */
94
+ abstract set(index: number, value: T): this;
95
+ abstract iterate(): Iterator<T>;
96
+ toArray(): SyncResult<T[]>;
97
+ static toArray<T>(indexable: Indexable<T>): SyncResult<T[]>;
98
+ any(): SyncResult<boolean>;
99
+ static any<T>(indexable: Indexable<T>): SyncResult<boolean>;
100
+ getCount(): SyncResult<number>;
101
+ static getCount<T>(indexable: Indexable<T>): SyncResult<number>;
102
+ equals(right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
103
+ static equals<T>(left: Indexable<T>, right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
104
+ toString(toStringFunctions?: ToStringFunctions): string;
105
+ static toString<T>(indexable: Indexable<T>, toStringFunctions?: ToStringFunctions): string;
106
+ concatenate(...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
107
+ static concatenate<T>(indexable: Indexable<T>, ...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
108
+ map<TOutput>(mapping: (value: T) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
109
+ static map<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
110
+ flatMap<TOutput>(mapping: (value: T) => JavascriptIterable<TOutput>): Iterable<TOutput>;
111
+ static flatMap<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => JavascriptIterable<TOutput>): Iterable<TOutput>;
112
+ where(condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
113
+ static where<T>(indexable: Indexable<T>, condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
114
+ instanceOf<TOutput extends T>(typeOrTypeCheck: Type<TOutput> | ((value: T) => value is TOutput)): Iterable<TOutput>;
115
+ static instanceOf<TInput, TOutput extends TInput>(indexable: Indexable<TInput>, typeOrTypeCheck: Type<TOutput> | ((value: TInput) => value is TOutput)): Iterable<TOutput>;
116
+ first(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
117
+ static first<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
118
+ last(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
119
+ static last<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
120
+ [Symbol.iterator](): JavascriptIterator<T>;
121
+ static [Symbol.iterator]<T>(indexable: Indexable<T>): JavascriptIterator<T>;
122
+ contains(value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
123
+ static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
124
+ }
125
+
5
126
  /**
6
127
  * A collection of parameters that can be passed to an assert error message function.
7
128
  */
@@ -228,7 +349,7 @@ declare class SyncDisposable implements Disposable {
228
349
  isDisposed(): boolean;
229
350
  }
230
351
 
231
- declare abstract class List<T> implements Iterable<T> {
352
+ declare abstract class List<T> implements MutableIndexable<T> {
232
353
  static create<T>(values?: JavascriptIterable<T>): List<T>;
233
354
  /**
234
355
  * Add the provided value to the end of this {@link List}.
@@ -538,43 +659,49 @@ declare class CharacterReadStreamAsyncIterator implements AsyncIterator<string>
538
659
  }
539
660
 
540
661
  /**
541
- * An individual parameter from a {@link CommandLineParameters} object.
662
+ * A class that can be used to define and interact with an application's command line interface.
542
663
  */
543
- declare class CommandLineParameter<T> {
544
- /**
545
- * The full name of this {@link CommandLineParameter}.
546
- */
547
- private readonly name;
548
- /**
549
- * The description for this {@link CommandLineParameter}.
550
- */
551
- private readonly description;
552
- /**
553
- * The function that can be invoked to get this {@link CommandLineParameter}'s value.
554
- */
555
- private readonly valueGetter;
664
+ declare class CommandLineParameters {
665
+ private readonly args;
666
+ private readonly parameters;
556
667
  private constructor();
668
+ static create(args: JavascriptIterable<string>): CommandLineParameters;
669
+ static getArgumentName(arg: string): string | undefined;
670
+ getArguments(): Iterable<string>;
557
671
  /**
558
- * Create a new {@link CommandLineParameter}.
559
- * @param name The full name of the {@link CommandLineParameter}.
560
- * @param description The description for the {@link CommandLineParameter}.
561
- * @param valueGetter The function that will be used to get the returned
562
- * {@link CommandLineParameter}'s value.
563
- */
564
- static create<T>(name: string, description: string, valueGetter: () => T): CommandLineParameter<T>;
565
- /**
566
- * Get the value for this {@link CommandLineParameter}.
672
+ * Get the value of the first argument that matches one of the provided names.
673
+ * @param names The possible names to look for.
567
674
  */
568
- getValue(): T;
675
+ getNamedArgumentStringValue(nameOrNames: string | JavascriptIterable<string>): SyncResult<string>;
676
+ nameOrAliasExists(nameOrAlias: string): boolean;
677
+ add(name: string): CommandLineParameter<string>;
569
678
  }
570
679
 
571
680
  /**
572
- * A class that can be used to define and interact with an application's command line interface.
681
+ * An individual parameter from a {@link CommandLineParameters} object.
573
682
  */
574
- declare class CommandLineParameters {
575
- private readonly args;
683
+ declare class CommandLineParameter<T> {
684
+ private readonly owner;
685
+ private readonly name;
686
+ private aliases;
687
+ private description;
576
688
  private constructor();
577
- static create(args: JavascriptIterable<string>): CommandLineParameters;
689
+ static create<T>(owner: CommandLineParameters, name: string): CommandLineParameter<T>;
690
+ static create<T>(properties: {
691
+ owner: CommandLineParameters;
692
+ name: string;
693
+ }): CommandLineParameter<T>;
694
+ /**
695
+ * Get the name of this {@link CommandLineParameter}.
696
+ */
697
+ getName(): string;
698
+ getAliases(): Iterable<string>;
699
+ private nameOrAliasExists;
700
+ addAlias(alias: string): this;
701
+ addAliases(aliases: JavascriptIterable<string>): this;
702
+ getNameAndAliases(): Iterable<string>;
703
+ getDescription(): string;
704
+ setDescription(description: string): this;
578
705
  }
579
706
 
580
707
  /**
@@ -1396,7 +1523,7 @@ declare class CurrentProcess {
1396
1523
  private constructor();
1397
1524
  static create(): CurrentProcess;
1398
1525
  static run(action: (currentProcess: CurrentProcess) => void | number | Promise<void | number>): Promise<void>;
1399
- getArguments(): JavascriptIterable<string>;
1526
+ getArguments(): Iterable<string>;
1400
1527
  setArguments(args: JavascriptIterable<string>): this;
1401
1528
  getParameters(): CommandLineParameters;
1402
1529
  getOutputWriteStream(): CharacterWriteStream;
@@ -2109,6 +2236,10 @@ declare abstract class Stack<T> {
2109
2236
  * Get whether there are any values in this {@link Stack}.
2110
2237
  */
2111
2238
  abstract any(): AsyncResult<boolean>;
2239
+ /**
2240
+ * Get the number of values that are currently in this {@link Stack}.
2241
+ */
2242
+ abstract getCount(): AsyncResult<number>;
2112
2243
  /**
2113
2244
  * Push the provided value onto the top of this {@link Stack}.
2114
2245
  * @param value The value to push on the top of this {@link Stack}.
@@ -2136,6 +2267,7 @@ declare class ListStack<T> implements Stack<T> {
2136
2267
  private constructor();
2137
2268
  static create<T>(list?: List<T>): ListStack<T>;
2138
2269
  any(): SyncResult<boolean>;
2270
+ getCount(): SyncResult<number>;
2139
2271
  add(value: T): SyncResult<void>;
2140
2272
  addAll(values: JavascriptIterable<T>): SyncResult<void>;
2141
2273
  remove(): SyncResult<T>;
@@ -3287,4 +3419,4 @@ declare class WonderlandTrailClient implements HttpClient {
3287
3419
  }): PromiseAsyncResult<Iterable<WonderlandTrailItinerary>>;
3288
3420
  }
3289
3421
 
3290
- export { type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, 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, 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, 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 };
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 };