@wavehouse/chtypes 0.5.2 → 1.0.2
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 +34 -0
- package/README.md +34 -38
- package/dist/abi1/buildinfo.d.ts +40 -0
- package/dist/abi1/buildinfo.d.ts.map +1 -0
- package/dist/abi1/buildinfo.js +83 -0
- package/dist/abi1/buildinfo.js.map +1 -0
- package/dist/abi1/calls.gen.d.ts +55 -0
- package/dist/abi1/calls.gen.d.ts.map +1 -0
- package/dist/abi1/calls.gen.js +110 -0
- package/dist/abi1/calls.gen.js.map +1 -0
- package/dist/abi1/decls.gen.d.ts +115 -0
- package/dist/abi1/decls.gen.d.ts.map +1 -0
- package/dist/abi1/decls.gen.js +1613 -0
- package/dist/abi1/decls.gen.js.map +1 -0
- package/dist/abi1/errmap.gen.d.ts +18 -0
- package/dist/abi1/errmap.gen.d.ts.map +1 -0
- package/dist/abi1/errmap.gen.js +66 -0
- package/dist/abi1/errmap.gen.js.map +1 -0
- package/dist/abi1/errors.d.ts +107 -0
- package/dist/abi1/errors.d.ts.map +1 -0
- package/dist/abi1/errors.js +134 -0
- package/dist/abi1/errors.js.map +1 -0
- package/dist/abi1/handles.d.ts +31 -0
- package/dist/abi1/handles.d.ts.map +1 -0
- package/dist/abi1/handles.js +76 -0
- package/dist/abi1/handles.js.map +1 -0
- package/dist/abi1/index.d.ts +17 -0
- package/dist/abi1/index.d.ts.map +1 -0
- package/dist/abi1/index.js +17 -0
- package/dist/abi1/index.js.map +1 -0
- package/dist/abi1/libc.d.ts +54 -0
- package/dist/abi1/libc.d.ts.map +1 -0
- package/dist/abi1/libc.gen.d.ts +12 -0
- package/dist/abi1/libc.gen.d.ts.map +1 -0
- package/dist/abi1/libc.gen.js +75 -0
- package/dist/abi1/libc.gen.js.map +1 -0
- package/dist/abi1/libc.js +109 -0
- package/dist/abi1/libc.js.map +1 -0
- package/dist/abi1/loader.d.ts +101 -0
- package/dist/abi1/loader.d.ts.map +1 -0
- package/dist/abi1/loader.js +274 -0
- package/dist/abi1/loader.js.map +1 -0
- package/dist/abi1/raw.d.ts +104 -0
- package/dist/abi1/raw.d.ts.map +1 -0
- package/dist/abi1/raw.js +296 -0
- package/dist/abi1/raw.js.map +1 -0
- package/dist/abi1/strictjson.d.ts +19 -0
- package/dist/abi1/strictjson.d.ts.map +1 -0
- package/dist/abi1/strictjson.js +78 -0
- package/dist/abi1/strictjson.js.map +1 -0
- package/dist/abi1/vocab.gen.d.ts +169 -0
- package/dist/abi1/vocab.gen.d.ts.map +1 -0
- package/dist/abi1/vocab.gen.js +306 -0
- package/dist/abi1/vocab.gen.js.map +1 -0
- package/dist/cli.d.ts +25 -26
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +206 -218
- package/dist/cli.js.map +1 -1
- package/dist/documents.d.ts +195 -0
- package/dist/documents.d.ts.map +1 -0
- package/dist/documents.js +389 -0
- package/dist/documents.js.map +1 -0
- package/dist/env.d.ts +16 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +57 -0
- package/dist/env.js.map +1 -0
- package/dist/index.d.ts +19 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -23
- package/dist/index.js.map +1 -1
- package/dist/json.d.ts +11 -89
- package/dist/json.d.ts.map +1 -1
- package/dist/json.js +16 -180
- package/dist/json.js.map +1 -1
- package/dist/library.d.ts +53 -309
- package/dist/library.d.ts.map +1 -1
- package/dist/library.js +77 -315
- package/dist/library.js.map +1 -1
- package/dist/ocifetch/constants.gen.d.ts +84 -0
- package/dist/ocifetch/constants.gen.d.ts.map +1 -0
- package/dist/ocifetch/constants.gen.js +92 -0
- package/dist/ocifetch/constants.gen.js.map +1 -0
- package/dist/ocifetch/dsse.d.ts +114 -0
- package/dist/ocifetch/dsse.d.ts.map +1 -0
- package/dist/ocifetch/dsse.js +331 -0
- package/dist/ocifetch/dsse.js.map +1 -0
- package/dist/ocifetch/ensure.d.ts +65 -0
- package/dist/ocifetch/ensure.d.ts.map +1 -0
- package/dist/ocifetch/ensure.js +775 -0
- package/dist/ocifetch/ensure.js.map +1 -0
- package/dist/ocifetch/errors.d.ts +92 -0
- package/dist/ocifetch/errors.d.ts.map +1 -0
- package/dist/ocifetch/errors.js +101 -0
- package/dist/ocifetch/errors.js.map +1 -0
- package/dist/ocifetch/goldens.d.ts +44 -0
- package/dist/ocifetch/goldens.d.ts.map +1 -0
- package/dist/ocifetch/goldens.js +62 -0
- package/dist/ocifetch/goldens.js.map +1 -0
- package/dist/ocifetch/http.d.ts +124 -0
- package/dist/ocifetch/http.d.ts.map +1 -0
- package/dist/ocifetch/http.js +549 -0
- package/dist/ocifetch/http.js.map +1 -0
- package/dist/ocifetch/index.d.ts +17 -0
- package/dist/ocifetch/index.d.ts.map +1 -0
- package/dist/ocifetch/index.js +14 -0
- package/dist/ocifetch/index.js.map +1 -0
- package/dist/ocifetch/layout.d.ts +126 -0
- package/dist/ocifetch/layout.d.ts.map +1 -0
- package/dist/ocifetch/layout.js +375 -0
- package/dist/ocifetch/layout.js.map +1 -0
- package/dist/ocifetch/localverify.d.ts +43 -0
- package/dist/ocifetch/localverify.d.ts.map +1 -0
- package/dist/ocifetch/localverify.js +164 -0
- package/dist/ocifetch/localverify.js.map +1 -0
- package/dist/ocifetch/lock.d.ts +39 -0
- package/dist/ocifetch/lock.d.ts.map +1 -0
- package/dist/ocifetch/lock.js +140 -0
- package/dist/ocifetch/lock.js.map +1 -0
- package/dist/ocifetch/oci.d.ts +100 -0
- package/dist/ocifetch/oci.d.ts.map +1 -0
- package/dist/ocifetch/oci.js +323 -0
- package/dist/ocifetch/oci.js.map +1 -0
- package/dist/ocifetch/referrers.d.ts +55 -0
- package/dist/ocifetch/referrers.d.ts.map +1 -0
- package/dist/ocifetch/referrers.js +132 -0
- package/dist/ocifetch/referrers.js.map +1 -0
- package/dist/ocifetch/types.d.ts +167 -0
- package/dist/ocifetch/types.d.ts.map +1 -0
- package/dist/ocifetch/types.js +88 -0
- package/dist/ocifetch/types.js.map +1 -0
- package/dist/ocifetch/unpack.d.ts +55 -0
- package/dist/ocifetch/unpack.d.ts.map +1 -0
- package/dist/ocifetch/unpack.js +205 -0
- package/dist/ocifetch/unpack.js.map +1 -0
- package/dist/registry.d.ts +38 -387
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +95 -819
- package/dist/registry.js.map +1 -1
- package/dist/schema.d.ts +77 -588
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +87 -549
- package/dist/schema.js.map +1 -1
- package/dist/settings.d.ts +27 -36
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +75 -25
- package/dist/settings.js.map +1 -1
- package/dist/setup.d.ts +46 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +79 -0
- package/dist/setup.js.map +1 -0
- package/dist/tar.d.ts +27 -11
- package/dist/tar.d.ts.map +1 -1
- package/dist/tar.js +54 -32
- package/dist/tar.js.map +1 -1
- package/package.json +2 -2
- package/dist/discover.d.ts +0 -142
- package/dist/discover.d.ts.map +0 -1
- package/dist/discover.js +0 -288
- package/dist/discover.js.map +0 -1
- package/dist/error-codes.d.ts +0 -80
- package/dist/error-codes.d.ts.map +0 -1
- package/dist/error-codes.js +0 -139
- package/dist/error-codes.js.map +0 -1
- package/dist/errors.d.ts +0 -284
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -321
- package/dist/errors.js.map +0 -1
- package/dist/fetch.d.ts +0 -382
- package/dist/fetch.d.ts.map +0 -1
- package/dist/fetch.js +0 -1498
- package/dist/fetch.js.map +0 -1
- package/dist/ffi.d.ts +0 -410
- package/dist/ffi.d.ts.map +0 -1
- package/dist/ffi.js +0 -1154
- package/dist/ffi.js.map +0 -1
- package/dist/format.d.ts +0 -128
- package/dist/format.d.ts.map +0 -1
- package/dist/format.js +0 -132
- package/dist/format.js.map +0 -1
- package/dist/numeric.d.ts +0 -20
- package/dist/numeric.d.ts.map +0 -1
- package/dist/numeric.js +0 -107
- package/dist/numeric.js.map +0 -1
- package/dist/paths.d.ts +0 -55
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js +0 -87
- package/dist/paths.js.map +0 -1
- package/dist/results.d.ts +0 -495
- package/dist/results.d.ts.map +0 -1
- package/dist/results.js +0 -406
- package/dist/results.js.map +0 -1
- package/dist/transform.d.ts +0 -73
- package/dist/transform.d.ts.map +0 -1
- package/dist/transform.js +0 -533
- package/dist/transform.js.map +0 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/** chs_status: the description's own numbers. */
|
|
2
|
+
export declare const Status: {
|
|
3
|
+
readonly Ok: 0;
|
|
4
|
+
readonly Rejected: 1;
|
|
5
|
+
readonly Declined: 2;
|
|
6
|
+
readonly InvalidArgument: 3;
|
|
7
|
+
readonly Internal: 4;
|
|
8
|
+
};
|
|
9
|
+
export type Status = (typeof Status)[keyof typeof Status];
|
|
10
|
+
/** chs_format: the description's own numbers. */
|
|
11
|
+
export declare const Format: {
|
|
12
|
+
readonly JSONEachRow: 0;
|
|
13
|
+
readonly CSV: 1;
|
|
14
|
+
readonly TSV: 2;
|
|
15
|
+
readonly Values: 3;
|
|
16
|
+
readonly JSONCompactEachRow: 4;
|
|
17
|
+
readonly RowBinary: 5;
|
|
18
|
+
readonly RowBinaryWithDefaults: 6;
|
|
19
|
+
readonly RowBinaryWithNamesAndTypesAndDefaults: 7;
|
|
20
|
+
readonly Native: 8;
|
|
21
|
+
readonly Buffers: 9;
|
|
22
|
+
readonly CSVWithNames: 10;
|
|
23
|
+
readonly TSVWithNames: 11;
|
|
24
|
+
};
|
|
25
|
+
export type Format = (typeof Format)[keyof typeof Format];
|
|
26
|
+
/** Each format's ClickHouse name, which is how `capabilities` lists one. */
|
|
27
|
+
export declare const FORMAT_CH_NAME: Readonly<Record<number, string>>;
|
|
28
|
+
export declare function formatChName(format: number): string | undefined;
|
|
29
|
+
/** transform_reason: the description's own values. */
|
|
30
|
+
export declare const Reason: {
|
|
31
|
+
readonly OverflowWrap: "overflow_wrap";
|
|
32
|
+
readonly NullToDefault: "null_to_default";
|
|
33
|
+
readonly NullLoss: "null_loss";
|
|
34
|
+
readonly DecimalTruncate: "decimal_truncate";
|
|
35
|
+
readonly DateClamp: "date_clamp";
|
|
36
|
+
readonly DatetimeWrap: "datetime_wrap";
|
|
37
|
+
readonly DateShift: "date_shift";
|
|
38
|
+
readonly UuidMangle: "uuid_mangle";
|
|
39
|
+
readonly IpMangle: "ip_mangle";
|
|
40
|
+
readonly FloatPrecision: "float_precision";
|
|
41
|
+
readonly LossyNumeric: "lossy_numeric";
|
|
42
|
+
readonly FixedstringPad: "fixedstring_pad";
|
|
43
|
+
readonly Emptied: "emptied";
|
|
44
|
+
readonly ElementChanged: "element_changed";
|
|
45
|
+
readonly EnumCoerce: "enum_coerce";
|
|
46
|
+
readonly ValueChanged: "value_changed";
|
|
47
|
+
readonly Poisoned: "poisoned";
|
|
48
|
+
readonly DuplicateKeyDropped: "duplicate_key_dropped";
|
|
49
|
+
readonly Reformat: "reformat";
|
|
50
|
+
readonly DefaultFilled: "default_filled";
|
|
51
|
+
readonly ZeroFilled: "zero_filled";
|
|
52
|
+
readonly DefaultMaterialized: "default_materialized";
|
|
53
|
+
readonly TtlExpired: "ttl_expired";
|
|
54
|
+
readonly TtlColumnExpired: "ttl_column_expired";
|
|
55
|
+
};
|
|
56
|
+
export type Reason = (typeof Reason)[keyof typeof Reason];
|
|
57
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
58
|
+
export declare const REASON_FALLBACK: Reason | null;
|
|
59
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
60
|
+
export declare function reasonOf(value: string): Reason | undefined;
|
|
61
|
+
/** The `lossy` fact for a value, read from the description; an unlisted value reads as the fallback's. */
|
|
62
|
+
export declare function reasonLossy(value: string): boolean | undefined;
|
|
63
|
+
/** value_src: the description's own values. */
|
|
64
|
+
export declare const Source: {
|
|
65
|
+
readonly Input: "input";
|
|
66
|
+
readonly Default: "default";
|
|
67
|
+
readonly DefaultSubstituted: "default_substituted";
|
|
68
|
+
readonly DefaultGenerated: "default_generated";
|
|
69
|
+
readonly Absent: "absent";
|
|
70
|
+
readonly MaterializedInput: "materialized_input";
|
|
71
|
+
readonly Skipped: "skipped";
|
|
72
|
+
readonly EphemeralInput: "ephemeral_input";
|
|
73
|
+
readonly DefaultExprUnsupported: "default_expr_unsupported";
|
|
74
|
+
readonly DefaultVolatileUnresolved: "default_volatile_unresolved";
|
|
75
|
+
readonly DefaultPending: "default_pending";
|
|
76
|
+
};
|
|
77
|
+
export type Source = (typeof Source)[keyof typeof Source];
|
|
78
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
79
|
+
export declare const SOURCE_FALLBACK: Source | null;
|
|
80
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
81
|
+
export declare function sourceOf(value: string): Source | undefined;
|
|
82
|
+
/** The `is_stored` fact for a value, read from the description; an unlisted value reads as the fallback's. */
|
|
83
|
+
export declare function sourceIsStored(value: string): boolean | undefined;
|
|
84
|
+
/** row_outcome: the description's own values. */
|
|
85
|
+
export declare const Outcome: {
|
|
86
|
+
readonly Accepted: "accepted";
|
|
87
|
+
readonly AcceptedPoisoned: "accepted_poisoned";
|
|
88
|
+
readonly Rejected: "rejected";
|
|
89
|
+
readonly Skipped: "skipped";
|
|
90
|
+
readonly Unsupported: "unsupported";
|
|
91
|
+
};
|
|
92
|
+
export type Outcome = (typeof Outcome)[keyof typeof Outcome];
|
|
93
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
94
|
+
export declare const OUTCOME_FALLBACK: Outcome | null;
|
|
95
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
96
|
+
export declare function outcomeOf(value: string): Outcome | undefined;
|
|
97
|
+
/** batch_outcome: the description's own values. */
|
|
98
|
+
export declare const BatchOutcome: {
|
|
99
|
+
readonly Accepted: "accepted";
|
|
100
|
+
readonly AcceptedPoisoned: "accepted_poisoned";
|
|
101
|
+
readonly Rejected: "rejected";
|
|
102
|
+
readonly Unsupported: "unsupported";
|
|
103
|
+
};
|
|
104
|
+
export type BatchOutcome = (typeof BatchOutcome)[keyof typeof BatchOutcome];
|
|
105
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
106
|
+
export declare const BATCH_OUTCOME_FALLBACK: BatchOutcome | null;
|
|
107
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
108
|
+
export declare function batchOutcomeOf(value: string): BatchOutcome | undefined;
|
|
109
|
+
/** filter_outcome: the description's own values. */
|
|
110
|
+
export declare const FilterOutcome: {
|
|
111
|
+
readonly Ok: "ok";
|
|
112
|
+
readonly Rejected: "rejected";
|
|
113
|
+
readonly Unsupported: "unsupported";
|
|
114
|
+
};
|
|
115
|
+
export type FilterOutcome = (typeof FilterOutcome)[keyof typeof FilterOutcome];
|
|
116
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
117
|
+
export declare const FILTER_OUTCOME_FALLBACK: FilterOutcome | null;
|
|
118
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
119
|
+
export declare function filterOutcomeOf(value: string): FilterOutcome | undefined;
|
|
120
|
+
/** filter_verdict: the description's own values. */
|
|
121
|
+
export declare const Verdict: {
|
|
122
|
+
readonly True: "t";
|
|
123
|
+
readonly False: "f";
|
|
124
|
+
readonly Error: "e";
|
|
125
|
+
readonly Decline: "d";
|
|
126
|
+
};
|
|
127
|
+
export type Verdict = (typeof Verdict)[keyof typeof Verdict];
|
|
128
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
129
|
+
export declare const VERDICT_FALLBACK: Verdict | null;
|
|
130
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
131
|
+
export declare function verdictOf(value: string): Verdict | undefined;
|
|
132
|
+
/** The `answered` fact for a value, read from the description; an unlisted value reads as the fallback's. */
|
|
133
|
+
export declare function verdictAnswered(value: string): boolean | undefined;
|
|
134
|
+
/** discover_query_param: the description's own values. */
|
|
135
|
+
export declare const DiscoverQueryParam: {
|
|
136
|
+
readonly Database: "database";
|
|
137
|
+
readonly Table: "table";
|
|
138
|
+
};
|
|
139
|
+
export type DiscoverQueryParam = (typeof DiscoverQueryParam)[keyof typeof DiscoverQueryParam];
|
|
140
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
141
|
+
export declare const DISCOVER_QUERY_PARAM_FALLBACK: DiscoverQueryParam | null;
|
|
142
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
143
|
+
export declare function discoverQueryParamOf(value: string): DiscoverQueryParam | undefined;
|
|
144
|
+
/** The `ch_type` fact for a value, read from the description; an unlisted value reads as the fallback's. */
|
|
145
|
+
export declare function discoverQueryParamChType(value: string): string | undefined;
|
|
146
|
+
/** default_kind: the description's own values. */
|
|
147
|
+
export declare const DefaultKind: {
|
|
148
|
+
readonly None: "";
|
|
149
|
+
readonly Default: "DEFAULT";
|
|
150
|
+
readonly Materialized: "MATERIALIZED";
|
|
151
|
+
readonly Alias: "ALIAS";
|
|
152
|
+
readonly Ephemeral: "EPHEMERAL";
|
|
153
|
+
};
|
|
154
|
+
export type DefaultKind = (typeof DefaultKind)[keyof typeof DefaultKind];
|
|
155
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
156
|
+
export declare const DEFAULT_KIND_FALLBACK: DefaultKind | null;
|
|
157
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
158
|
+
export declare function defaultKindOf(value: string): DefaultKind | undefined;
|
|
159
|
+
/** The document groups a batch call asks for (`CHS_DOC_*`), as bit flags. */
|
|
160
|
+
export declare const DocFlags: {
|
|
161
|
+
readonly Values: 1;
|
|
162
|
+
readonly Transforms: 2;
|
|
163
|
+
readonly Defaults: 4;
|
|
164
|
+
readonly All: 7;
|
|
165
|
+
};
|
|
166
|
+
export type DocFlags = number;
|
|
167
|
+
/** The `export_format` of a batch preview that exports nothing. */
|
|
168
|
+
export declare const EXPORT_NONE = -1;
|
|
169
|
+
//# sourceMappingURL=vocab.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vocab.gen.d.ts","sourceRoot":"","sources":["../../src/abi1/vocab.gen.ts"],"names":[],"mappings":"AAQA,iDAAiD;AACjD,eAAO,MAAM,MAAM;aACjB,EAAE,EAAE,CAAC;aACL,QAAQ,EAAE,CAAC;aACX,QAAQ,EAAE,CAAC;aACX,eAAe,EAAE,CAAC;aAClB,QAAQ,EAAE,CAAC;CACH,CAAC;AACX,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC;AAE1D,iDAAiD;AACjD,eAAO,MAAM,MAAM;aACjB,WAAW,EAAE,CAAC;aACd,GAAG,EAAE,CAAC;aACN,GAAG,EAAE,CAAC;aACN,MAAM,EAAE,CAAC;aACT,kBAAkB,EAAE,CAAC;aACrB,SAAS,EAAE,CAAC;aACZ,qBAAqB,EAAE,CAAC;aACxB,qCAAqC,EAAE,CAAC;aACxC,MAAM,EAAE,CAAC;aACT,OAAO,EAAE,CAAC;aACV,YAAY,EAAE,EAAE;aAChB,YAAY,EAAE,EAAE;CACR,CAAC;AACX,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC;AAE1D,4EAA4E;AAC5E,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAa3D,CAAC;AAEF,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE/D;AAED,sDAAsD;AACtD,eAAO,MAAM,MAAM;aACjB,YAAY,EAAE,eAAe;aAC7B,aAAa,EAAE,iBAAiB;aAChC,QAAQ,EAAE,WAAW;aACrB,eAAe,EAAE,kBAAkB;aACnC,SA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M,GAAG,MAAM,GAAG,SAAS,CAI1E;AAED,kDAAkD;AAClD,eAAO,MAAM,WAAW;aACtB,IAAI,EAAE,EAAE;aACR,OAAO,EAAE,SAAS;aAClB,YAAY,EAAE,cAAc;aAC5B,KAAK,EAAE,OAAO;aACd,SAAS,EAAE,WAAW;CACd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AASzE,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB,EAAE,WAAW,GAAG,IAAW,CAAC;AAE9D,6GAA6G;AAC7G,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAGpE;AAED,6EAA6E;AAC7E,eAAO,MAAM,QAAQ;aACnB,MAAM,EAAE,CAAC;aACT,UAAU,EAAE,CAAC;aACb,QAAQ,EAAE,CAAC;aACX,GAAG,EAAE,CAAC;CACE,CAAC;AACX,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAE9B,mEAAmE;AACnE,eAAO,MAAM,WAAW,KAAK,CAAC"}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
/* GENERATED by scripts/abi-v1/gen.py from spec/abi-v1/abi.json (CHS_ABI_FINGERPRINT sha256:856e5cb7543db291b4db716662bf6e487b2258973b959bbf5d58b4bd46d73285) — DO NOT EDIT */
|
|
2
|
+
/*
|
|
3
|
+
* Every vocabulary the description defines, with its numbers, spellings, facts and
|
|
4
|
+
* fallbacks. A fact (a reason's `lossy`, a source's `isStored`, a verdict's `answered`)
|
|
5
|
+
* is read by the generated function keyed by the value a document carries; no binding
|
|
6
|
+
* keeps a list of its own.
|
|
7
|
+
*/
|
|
8
|
+
/** chs_status: the description's own numbers. */
|
|
9
|
+
export const Status = {
|
|
10
|
+
Ok: 0,
|
|
11
|
+
Rejected: 1,
|
|
12
|
+
Declined: 2,
|
|
13
|
+
InvalidArgument: 3,
|
|
14
|
+
Internal: 4,
|
|
15
|
+
};
|
|
16
|
+
/** chs_format: the description's own numbers. */
|
|
17
|
+
export const Format = {
|
|
18
|
+
JSONEachRow: 0,
|
|
19
|
+
CSV: 1,
|
|
20
|
+
TSV: 2,
|
|
21
|
+
Values: 3,
|
|
22
|
+
JSONCompactEachRow: 4,
|
|
23
|
+
RowBinary: 5,
|
|
24
|
+
RowBinaryWithDefaults: 6,
|
|
25
|
+
RowBinaryWithNamesAndTypesAndDefaults: 7,
|
|
26
|
+
Native: 8,
|
|
27
|
+
Buffers: 9,
|
|
28
|
+
CSVWithNames: 10,
|
|
29
|
+
TSVWithNames: 11,
|
|
30
|
+
};
|
|
31
|
+
/** Each format's ClickHouse name, which is how `capabilities` lists one. */
|
|
32
|
+
export const FORMAT_CH_NAME = {
|
|
33
|
+
0: "JSONEachRow",
|
|
34
|
+
1: "CSV",
|
|
35
|
+
2: "TSV",
|
|
36
|
+
3: "Values",
|
|
37
|
+
4: "JSONCompactEachRow",
|
|
38
|
+
5: "RowBinary",
|
|
39
|
+
6: "RowBinaryWithDefaults",
|
|
40
|
+
7: "RowBinaryWithNamesAndTypesAndDefaults",
|
|
41
|
+
8: "Native",
|
|
42
|
+
9: "Buffers",
|
|
43
|
+
10: "CSVWithNames",
|
|
44
|
+
11: "TSVWithNames",
|
|
45
|
+
};
|
|
46
|
+
export function formatChName(format) {
|
|
47
|
+
return FORMAT_CH_NAME[format];
|
|
48
|
+
}
|
|
49
|
+
/** transform_reason: the description's own values. */
|
|
50
|
+
export const Reason = {
|
|
51
|
+
OverflowWrap: "overflow_wrap",
|
|
52
|
+
NullToDefault: "null_to_default",
|
|
53
|
+
NullLoss: "null_loss",
|
|
54
|
+
DecimalTruncate: "decimal_truncate",
|
|
55
|
+
DateClamp: "date_clamp",
|
|
56
|
+
DatetimeWrap: "datetime_wrap",
|
|
57
|
+
DateShift: "date_shift",
|
|
58
|
+
UuidMangle: "uuid_mangle",
|
|
59
|
+
IpMangle: "ip_mangle",
|
|
60
|
+
FloatPrecision: "float_precision",
|
|
61
|
+
LossyNumeric: "lossy_numeric",
|
|
62
|
+
FixedstringPad: "fixedstring_pad",
|
|
63
|
+
Emptied: "emptied",
|
|
64
|
+
ElementChanged: "element_changed",
|
|
65
|
+
EnumCoerce: "enum_coerce",
|
|
66
|
+
ValueChanged: "value_changed",
|
|
67
|
+
Poisoned: "poisoned",
|
|
68
|
+
DuplicateKeyDropped: "duplicate_key_dropped",
|
|
69
|
+
Reformat: "reformat",
|
|
70
|
+
DefaultFilled: "default_filled",
|
|
71
|
+
ZeroFilled: "zero_filled",
|
|
72
|
+
DefaultMaterialized: "default_materialized",
|
|
73
|
+
TtlExpired: "ttl_expired",
|
|
74
|
+
TtlColumnExpired: "ttl_column_expired",
|
|
75
|
+
};
|
|
76
|
+
const REASON_ENTRIES = {
|
|
77
|
+
"overflow_wrap": { "lossy": true },
|
|
78
|
+
"null_to_default": { "lossy": true },
|
|
79
|
+
"null_loss": { "lossy": true },
|
|
80
|
+
"decimal_truncate": { "lossy": true },
|
|
81
|
+
"date_clamp": { "lossy": true },
|
|
82
|
+
"datetime_wrap": { "lossy": true },
|
|
83
|
+
"date_shift": { "lossy": true },
|
|
84
|
+
"uuid_mangle": { "lossy": true },
|
|
85
|
+
"ip_mangle": { "lossy": true },
|
|
86
|
+
"float_precision": { "lossy": true },
|
|
87
|
+
"lossy_numeric": { "lossy": true },
|
|
88
|
+
"fixedstring_pad": { "lossy": true },
|
|
89
|
+
"emptied": { "lossy": true },
|
|
90
|
+
"element_changed": { "lossy": true },
|
|
91
|
+
"enum_coerce": { "lossy": true },
|
|
92
|
+
"value_changed": { "lossy": true },
|
|
93
|
+
"poisoned": { "lossy": true },
|
|
94
|
+
"duplicate_key_dropped": { "lossy": true },
|
|
95
|
+
"reformat": { "lossy": false },
|
|
96
|
+
"default_filled": { "lossy": false },
|
|
97
|
+
"zero_filled": { "lossy": false },
|
|
98
|
+
"default_materialized": { "lossy": false },
|
|
99
|
+
"ttl_expired": { "lossy": true },
|
|
100
|
+
"ttl_column_expired": { "lossy": true },
|
|
101
|
+
};
|
|
102
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
103
|
+
export const REASON_FALLBACK = "value_changed";
|
|
104
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
105
|
+
export function reasonOf(value) {
|
|
106
|
+
if (Object.hasOwn(REASON_ENTRIES, value))
|
|
107
|
+
return value;
|
|
108
|
+
return REASON_FALLBACK ?? undefined;
|
|
109
|
+
}
|
|
110
|
+
/** The `lossy` fact for a value, read from the description; an unlisted value reads as the fallback's. */
|
|
111
|
+
export function reasonLossy(value) {
|
|
112
|
+
const key = Object.hasOwn(REASON_ENTRIES, value) ? value : REASON_FALLBACK;
|
|
113
|
+
if (key === null)
|
|
114
|
+
return undefined;
|
|
115
|
+
return REASON_ENTRIES[key]?.["lossy"];
|
|
116
|
+
}
|
|
117
|
+
/** value_src: the description's own values. */
|
|
118
|
+
export const Source = {
|
|
119
|
+
Input: "input",
|
|
120
|
+
Default: "default",
|
|
121
|
+
DefaultSubstituted: "default_substituted",
|
|
122
|
+
DefaultGenerated: "default_generated",
|
|
123
|
+
Absent: "absent",
|
|
124
|
+
MaterializedInput: "materialized_input",
|
|
125
|
+
Skipped: "skipped",
|
|
126
|
+
EphemeralInput: "ephemeral_input",
|
|
127
|
+
DefaultExprUnsupported: "default_expr_unsupported",
|
|
128
|
+
DefaultVolatileUnresolved: "default_volatile_unresolved",
|
|
129
|
+
DefaultPending: "default_pending",
|
|
130
|
+
};
|
|
131
|
+
const SOURCE_ENTRIES = {
|
|
132
|
+
"input": { "is_stored": true },
|
|
133
|
+
"default": { "is_stored": true },
|
|
134
|
+
"default_substituted": { "is_stored": true },
|
|
135
|
+
"default_generated": { "is_stored": true },
|
|
136
|
+
"absent": { "is_stored": true },
|
|
137
|
+
"materialized_input": { "is_stored": true },
|
|
138
|
+
"skipped": { "is_stored": false },
|
|
139
|
+
"ephemeral_input": { "is_stored": false },
|
|
140
|
+
"default_expr_unsupported": { "is_stored": false },
|
|
141
|
+
"default_volatile_unresolved": { "is_stored": false },
|
|
142
|
+
"default_pending": { "is_stored": false },
|
|
143
|
+
};
|
|
144
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
145
|
+
export const SOURCE_FALLBACK = null;
|
|
146
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
147
|
+
export function sourceOf(value) {
|
|
148
|
+
if (Object.hasOwn(SOURCE_ENTRIES, value))
|
|
149
|
+
return value;
|
|
150
|
+
return SOURCE_FALLBACK ?? undefined;
|
|
151
|
+
}
|
|
152
|
+
/** The `is_stored` fact for a value, read from the description; an unlisted value reads as the fallback's. */
|
|
153
|
+
export function sourceIsStored(value) {
|
|
154
|
+
const key = Object.hasOwn(SOURCE_ENTRIES, value) ? value : SOURCE_FALLBACK;
|
|
155
|
+
if (key === null)
|
|
156
|
+
return undefined;
|
|
157
|
+
return SOURCE_ENTRIES[key]?.["is_stored"];
|
|
158
|
+
}
|
|
159
|
+
/** row_outcome: the description's own values. */
|
|
160
|
+
export const Outcome = {
|
|
161
|
+
Accepted: "accepted",
|
|
162
|
+
AcceptedPoisoned: "accepted_poisoned",
|
|
163
|
+
Rejected: "rejected",
|
|
164
|
+
Skipped: "skipped",
|
|
165
|
+
Unsupported: "unsupported",
|
|
166
|
+
};
|
|
167
|
+
const OUTCOME_ENTRIES = {
|
|
168
|
+
"accepted": {},
|
|
169
|
+
"accepted_poisoned": {},
|
|
170
|
+
"rejected": {},
|
|
171
|
+
"skipped": {},
|
|
172
|
+
"unsupported": {},
|
|
173
|
+
};
|
|
174
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
175
|
+
export const OUTCOME_FALLBACK = "unsupported";
|
|
176
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
177
|
+
export function outcomeOf(value) {
|
|
178
|
+
if (Object.hasOwn(OUTCOME_ENTRIES, value))
|
|
179
|
+
return value;
|
|
180
|
+
return OUTCOME_FALLBACK ?? undefined;
|
|
181
|
+
}
|
|
182
|
+
/** batch_outcome: the description's own values. */
|
|
183
|
+
export const BatchOutcome = {
|
|
184
|
+
Accepted: "accepted",
|
|
185
|
+
AcceptedPoisoned: "accepted_poisoned",
|
|
186
|
+
Rejected: "rejected",
|
|
187
|
+
Unsupported: "unsupported",
|
|
188
|
+
};
|
|
189
|
+
const BATCH_OUTCOME_ENTRIES = {
|
|
190
|
+
"accepted": {},
|
|
191
|
+
"accepted_poisoned": {},
|
|
192
|
+
"rejected": {},
|
|
193
|
+
"unsupported": {},
|
|
194
|
+
};
|
|
195
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
196
|
+
export const BATCH_OUTCOME_FALLBACK = "unsupported";
|
|
197
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
198
|
+
export function batchOutcomeOf(value) {
|
|
199
|
+
if (Object.hasOwn(BATCH_OUTCOME_ENTRIES, value))
|
|
200
|
+
return value;
|
|
201
|
+
return BATCH_OUTCOME_FALLBACK ?? undefined;
|
|
202
|
+
}
|
|
203
|
+
/** filter_outcome: the description's own values. */
|
|
204
|
+
export const FilterOutcome = {
|
|
205
|
+
Ok: "ok",
|
|
206
|
+
Rejected: "rejected",
|
|
207
|
+
Unsupported: "unsupported",
|
|
208
|
+
};
|
|
209
|
+
const FILTER_OUTCOME_ENTRIES = {
|
|
210
|
+
"ok": {},
|
|
211
|
+
"rejected": {},
|
|
212
|
+
"unsupported": {},
|
|
213
|
+
};
|
|
214
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
215
|
+
export const FILTER_OUTCOME_FALLBACK = "unsupported";
|
|
216
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
217
|
+
export function filterOutcomeOf(value) {
|
|
218
|
+
if (Object.hasOwn(FILTER_OUTCOME_ENTRIES, value))
|
|
219
|
+
return value;
|
|
220
|
+
return FILTER_OUTCOME_FALLBACK ?? undefined;
|
|
221
|
+
}
|
|
222
|
+
/** filter_verdict: the description's own values. */
|
|
223
|
+
export const Verdict = {
|
|
224
|
+
True: "t",
|
|
225
|
+
False: "f",
|
|
226
|
+
Error: "e",
|
|
227
|
+
Decline: "d",
|
|
228
|
+
};
|
|
229
|
+
const VERDICT_ENTRIES = {
|
|
230
|
+
"t": { "answered": true },
|
|
231
|
+
"f": { "answered": true },
|
|
232
|
+
"e": { "answered": false },
|
|
233
|
+
"d": { "answered": false },
|
|
234
|
+
};
|
|
235
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
236
|
+
export const VERDICT_FALLBACK = "d";
|
|
237
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
238
|
+
export function verdictOf(value) {
|
|
239
|
+
if (Object.hasOwn(VERDICT_ENTRIES, value))
|
|
240
|
+
return value;
|
|
241
|
+
return VERDICT_FALLBACK ?? undefined;
|
|
242
|
+
}
|
|
243
|
+
/** The `answered` fact for a value, read from the description; an unlisted value reads as the fallback's. */
|
|
244
|
+
export function verdictAnswered(value) {
|
|
245
|
+
const key = Object.hasOwn(VERDICT_ENTRIES, value) ? value : VERDICT_FALLBACK;
|
|
246
|
+
if (key === null)
|
|
247
|
+
return undefined;
|
|
248
|
+
return VERDICT_ENTRIES[key]?.["answered"];
|
|
249
|
+
}
|
|
250
|
+
/** discover_query_param: the description's own values. */
|
|
251
|
+
export const DiscoverQueryParam = {
|
|
252
|
+
Database: "database",
|
|
253
|
+
Table: "table",
|
|
254
|
+
};
|
|
255
|
+
const DISCOVER_QUERY_PARAM_ENTRIES = {
|
|
256
|
+
"database": { "ch_type": "String" },
|
|
257
|
+
"table": { "ch_type": "String" },
|
|
258
|
+
};
|
|
259
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
260
|
+
export const DISCOVER_QUERY_PARAM_FALLBACK = null;
|
|
261
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
262
|
+
export function discoverQueryParamOf(value) {
|
|
263
|
+
if (Object.hasOwn(DISCOVER_QUERY_PARAM_ENTRIES, value))
|
|
264
|
+
return value;
|
|
265
|
+
return DISCOVER_QUERY_PARAM_FALLBACK ?? undefined;
|
|
266
|
+
}
|
|
267
|
+
/** The `ch_type` fact for a value, read from the description; an unlisted value reads as the fallback's. */
|
|
268
|
+
export function discoverQueryParamChType(value) {
|
|
269
|
+
const key = Object.hasOwn(DISCOVER_QUERY_PARAM_ENTRIES, value) ? value : DISCOVER_QUERY_PARAM_FALLBACK;
|
|
270
|
+
if (key === null)
|
|
271
|
+
return undefined;
|
|
272
|
+
return DISCOVER_QUERY_PARAM_ENTRIES[key]?.["ch_type"];
|
|
273
|
+
}
|
|
274
|
+
/** default_kind: the description's own values. */
|
|
275
|
+
export const DefaultKind = {
|
|
276
|
+
None: "",
|
|
277
|
+
Default: "DEFAULT",
|
|
278
|
+
Materialized: "MATERIALIZED",
|
|
279
|
+
Alias: "ALIAS",
|
|
280
|
+
Ephemeral: "EPHEMERAL",
|
|
281
|
+
};
|
|
282
|
+
const DEFAULT_KIND_ENTRIES = {
|
|
283
|
+
"": {},
|
|
284
|
+
"DEFAULT": {},
|
|
285
|
+
"MATERIALIZED": {},
|
|
286
|
+
"ALIAS": {},
|
|
287
|
+
"EPHEMERAL": {},
|
|
288
|
+
};
|
|
289
|
+
/** The description's fallback for a value it does not list, or null when it names none. */
|
|
290
|
+
export const DEFAULT_KIND_FALLBACK = null;
|
|
291
|
+
/** The value when listed, else the description's fallback, else undefined (the decoder's internal error). */
|
|
292
|
+
export function defaultKindOf(value) {
|
|
293
|
+
if (Object.hasOwn(DEFAULT_KIND_ENTRIES, value))
|
|
294
|
+
return value;
|
|
295
|
+
return DEFAULT_KIND_FALLBACK ?? undefined;
|
|
296
|
+
}
|
|
297
|
+
/** The document groups a batch call asks for (`CHS_DOC_*`), as bit flags. */
|
|
298
|
+
export const DocFlags = {
|
|
299
|
+
Values: 1,
|
|
300
|
+
Transforms: 2,
|
|
301
|
+
Defaults: 4,
|
|
302
|
+
All: 7,
|
|
303
|
+
};
|
|
304
|
+
/** The `export_format` of a batch preview that exports nothing. */
|
|
305
|
+
export const EXPORT_NONE = -1;
|
|
306
|
+
//# sourceMappingURL=vocab.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vocab.gen.js","sourceRoot":"","sources":["../../src/abi1/vocab.gen.ts"],"names":[],"mappings":"AAAA,8KAA8K;AAC9K;;;;;GAKG;AAEH,iDAAiD;AACjD,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,EAAE,EAAE,CAAC;IACL,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,eAAe,EAAE,CAAC;IAClB,QAAQ,EAAE,CAAC;CACH,CAAC;AAGX,iDAAiD;AACjD,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,WAAW,EAAE,CAAC;IACd,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;IACT,kBAAkB,EAAE,CAAC;IACrB,SAAS,EAAE,CAAC;IACZ,qBAAqB,EAAE,CAAC;IACxB,qCAAqC,EAAE,CAAC;IACxC,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,CAAC;IACV,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,EAAE;CACR,CAAC;AAGX,4EAA4E;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAqC;IAC9D,CAAC,EAAE,aAAa;IAChB,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,oBAAoB;IACvB,CAAC,EAAE,WAAW;IACd,CAAC,EAAE,uBAAuB;IAC1B,CAAC,EAAE,uCAAuC;IAC1C,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,SAAS;IACZ,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,cAAc;CACnB,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,OA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O,SAAS,CAAC;IACnC,OAAO,4BAA4B,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,CAAuB,CAAC;AAC9E,CAAC;AAED,kDAAkD;AAClD,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,cAAc;IAC5B,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;CACd,CAAC;AAGX,MAAM,oBAAoB,GAAyE;IACjG,EAAE,EAAE,EAAE;IACN,SAAS,EAAE,EAAE;IACb,cAAc,EAAE,EAAE;IAClB,OAAO,EAAE,EAAE;IACX,WAAW,EAAE,EAAE;CAChB,CAAC;AACF,2FAA2F;AAC3F,MAAM,CAAC,MAAM,qBAAqB,GAAuB,IAAI,CAAC;AAE9D,6GAA6G;AAC7G,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAI,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAAC;QAAE,OAAO,KAAoB,CAAC;IAC5E,OAAO,qBAAqB,IAAI,SAAS,CAAC;AAC5C,CAAC;AAED,6EAA6E;AAC7E,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,CAAC;IACb,QAAQ,EAAE,CAAC;IACX,GAAG,EAAE,CAAC;CACE,CAAC;AAGX,mEAAmE;AACnE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,CAAC"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* `chtypes
|
|
4
|
-
* spelled identically in all four:
|
|
3
|
+
* `chtypes`: the one CLI every SDK carries, over the v1 fetch layer
|
|
4
|
+
* (`docs/guides/fetch-v1.md`), spelled identically in all four:
|
|
5
5
|
*
|
|
6
|
-
* chtypes fetch <
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* chtypes
|
|
10
|
-
* chtypes list [--dest <dir>] what is installed, and what the release offers
|
|
11
|
-
* chtypes where the registry directory fetch would write to
|
|
6
|
+
* chtypes fetch <version>... | --all [--frozen] [--offline] [--lock <file>] [--update]
|
|
7
|
+
* chtypes verify re-hash every installed library against its verified record
|
|
8
|
+
* chtypes list what is installed, and the versions the registry publishes
|
|
9
|
+
* chtypes where the v1 cache root
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* Options per cli-common: `fetch` takes `--platform`, `--cache`, `--lock`, `--frozen`,
|
|
12
|
+
* `--offline`, `--update`; `verify`, `list` and `where` take `--cache` (`list` also
|
|
13
|
+
* `--offline`); `-h/--help` anywhere, `--version` at top level. The registry base
|
|
14
|
+
* comes only from `CHTYPES_ARTIFACTS_URL`.
|
|
16
15
|
*
|
|
17
|
-
*
|
|
16
|
+
* Exit statuses: 0 ok, 2 usage, and for every fetch error the status the
|
|
17
|
+
* `errors` table of `spec/fetch-v1/constants.json` gives its code (generated
|
|
18
|
+
* into `ERROR_EXIT_CODES`; no number is repeated here). A failed `verify` exits
|
|
19
|
+
* with `CHTYPES_ARTIFACT_CORRUPT`'s. Progress goes to stderr; `fetch` prints one
|
|
20
|
+
* installed directory per request on stdout alone, so it composes:
|
|
18
21
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
22
|
+
* dir="$(npx @wavehouse/chtypes fetch 26.8)"
|
|
23
|
+
*
|
|
24
|
+
* `runCli` is exported so the suite can drive the command in-process; the file
|
|
25
|
+
* runs `main` only when it is the process's entry point (the `bin`).
|
|
21
26
|
*/
|
|
22
|
-
/** The
|
|
23
|
-
export declare const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
readonly usage: 2;
|
|
27
|
-
readonly sourceUnreachable: 3;
|
|
28
|
-
readonly unpublished: 4;
|
|
29
|
-
};
|
|
27
|
+
/** The exit status of a usage error: the one status the error table does not own. */
|
|
28
|
+
export declare const EXIT_USAGE = 2;
|
|
29
|
+
/** Success. */
|
|
30
|
+
export declare const EXIT_OK = 0;
|
|
30
31
|
/** Where the command writes; the suite captures both. */
|
|
31
32
|
export interface CliIo {
|
|
32
33
|
readonly stdout: (text: string) => void;
|
|
33
34
|
readonly stderr: (text: string) => void;
|
|
34
|
-
/** Whether stderr is a terminal (progress is redrawn in place only then). */
|
|
35
|
-
readonly tty?: boolean | undefined;
|
|
36
35
|
}
|
|
37
36
|
/**
|
|
38
37
|
* Run the command with `argv` (the arguments after the program name) and
|
|
39
|
-
* return its exit
|
|
40
|
-
*
|
|
38
|
+
* return its exit status. Never throws for a user-facing failure: every error
|
|
39
|
+
* is printed to stderr and mapped to its status.
|
|
41
40
|
*/
|
|
42
41
|
export declare function runCli(argv: readonly string[], io?: CliIo): Promise<number>;
|
|
43
42
|
//# sourceMappingURL=cli.d.ts.map
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAwBH,qFAAqF;AACrF,eAAO,MAAM,UAAU,IAAI,CAAC;AAC5B,eAAe;AACf,eAAO,MAAM,OAAO,IAAI,CAAC;AAKzB,yDAAyD;AACzD,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAqDD;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,GAAE,KAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgD5F"}
|