@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.
Files changed (195) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +34 -38
  3. package/dist/abi1/buildinfo.d.ts +40 -0
  4. package/dist/abi1/buildinfo.d.ts.map +1 -0
  5. package/dist/abi1/buildinfo.js +83 -0
  6. package/dist/abi1/buildinfo.js.map +1 -0
  7. package/dist/abi1/calls.gen.d.ts +55 -0
  8. package/dist/abi1/calls.gen.d.ts.map +1 -0
  9. package/dist/abi1/calls.gen.js +110 -0
  10. package/dist/abi1/calls.gen.js.map +1 -0
  11. package/dist/abi1/decls.gen.d.ts +115 -0
  12. package/dist/abi1/decls.gen.d.ts.map +1 -0
  13. package/dist/abi1/decls.gen.js +1613 -0
  14. package/dist/abi1/decls.gen.js.map +1 -0
  15. package/dist/abi1/errmap.gen.d.ts +18 -0
  16. package/dist/abi1/errmap.gen.d.ts.map +1 -0
  17. package/dist/abi1/errmap.gen.js +66 -0
  18. package/dist/abi1/errmap.gen.js.map +1 -0
  19. package/dist/abi1/errors.d.ts +107 -0
  20. package/dist/abi1/errors.d.ts.map +1 -0
  21. package/dist/abi1/errors.js +134 -0
  22. package/dist/abi1/errors.js.map +1 -0
  23. package/dist/abi1/handles.d.ts +31 -0
  24. package/dist/abi1/handles.d.ts.map +1 -0
  25. package/dist/abi1/handles.js +76 -0
  26. package/dist/abi1/handles.js.map +1 -0
  27. package/dist/abi1/index.d.ts +17 -0
  28. package/dist/abi1/index.d.ts.map +1 -0
  29. package/dist/abi1/index.js +17 -0
  30. package/dist/abi1/index.js.map +1 -0
  31. package/dist/abi1/libc.d.ts +54 -0
  32. package/dist/abi1/libc.d.ts.map +1 -0
  33. package/dist/abi1/libc.gen.d.ts +12 -0
  34. package/dist/abi1/libc.gen.d.ts.map +1 -0
  35. package/dist/abi1/libc.gen.js +75 -0
  36. package/dist/abi1/libc.gen.js.map +1 -0
  37. package/dist/abi1/libc.js +109 -0
  38. package/dist/abi1/libc.js.map +1 -0
  39. package/dist/abi1/loader.d.ts +101 -0
  40. package/dist/abi1/loader.d.ts.map +1 -0
  41. package/dist/abi1/loader.js +274 -0
  42. package/dist/abi1/loader.js.map +1 -0
  43. package/dist/abi1/raw.d.ts +104 -0
  44. package/dist/abi1/raw.d.ts.map +1 -0
  45. package/dist/abi1/raw.js +296 -0
  46. package/dist/abi1/raw.js.map +1 -0
  47. package/dist/abi1/strictjson.d.ts +19 -0
  48. package/dist/abi1/strictjson.d.ts.map +1 -0
  49. package/dist/abi1/strictjson.js +78 -0
  50. package/dist/abi1/strictjson.js.map +1 -0
  51. package/dist/abi1/vocab.gen.d.ts +169 -0
  52. package/dist/abi1/vocab.gen.d.ts.map +1 -0
  53. package/dist/abi1/vocab.gen.js +306 -0
  54. package/dist/abi1/vocab.gen.js.map +1 -0
  55. package/dist/cli.d.ts +25 -26
  56. package/dist/cli.d.ts.map +1 -1
  57. package/dist/cli.js +206 -218
  58. package/dist/cli.js.map +1 -1
  59. package/dist/documents.d.ts +195 -0
  60. package/dist/documents.d.ts.map +1 -0
  61. package/dist/documents.js +389 -0
  62. package/dist/documents.js.map +1 -0
  63. package/dist/env.d.ts +16 -0
  64. package/dist/env.d.ts.map +1 -0
  65. package/dist/env.js +57 -0
  66. package/dist/env.js.map +1 -0
  67. package/dist/index.d.ts +19 -24
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +17 -23
  70. package/dist/index.js.map +1 -1
  71. package/dist/json.d.ts +11 -89
  72. package/dist/json.d.ts.map +1 -1
  73. package/dist/json.js +16 -180
  74. package/dist/json.js.map +1 -1
  75. package/dist/library.d.ts +53 -309
  76. package/dist/library.d.ts.map +1 -1
  77. package/dist/library.js +77 -315
  78. package/dist/library.js.map +1 -1
  79. package/dist/ocifetch/constants.gen.d.ts +84 -0
  80. package/dist/ocifetch/constants.gen.d.ts.map +1 -0
  81. package/dist/ocifetch/constants.gen.js +92 -0
  82. package/dist/ocifetch/constants.gen.js.map +1 -0
  83. package/dist/ocifetch/dsse.d.ts +114 -0
  84. package/dist/ocifetch/dsse.d.ts.map +1 -0
  85. package/dist/ocifetch/dsse.js +331 -0
  86. package/dist/ocifetch/dsse.js.map +1 -0
  87. package/dist/ocifetch/ensure.d.ts +65 -0
  88. package/dist/ocifetch/ensure.d.ts.map +1 -0
  89. package/dist/ocifetch/ensure.js +775 -0
  90. package/dist/ocifetch/ensure.js.map +1 -0
  91. package/dist/ocifetch/errors.d.ts +92 -0
  92. package/dist/ocifetch/errors.d.ts.map +1 -0
  93. package/dist/ocifetch/errors.js +101 -0
  94. package/dist/ocifetch/errors.js.map +1 -0
  95. package/dist/ocifetch/goldens.d.ts +44 -0
  96. package/dist/ocifetch/goldens.d.ts.map +1 -0
  97. package/dist/ocifetch/goldens.js +62 -0
  98. package/dist/ocifetch/goldens.js.map +1 -0
  99. package/dist/ocifetch/http.d.ts +124 -0
  100. package/dist/ocifetch/http.d.ts.map +1 -0
  101. package/dist/ocifetch/http.js +549 -0
  102. package/dist/ocifetch/http.js.map +1 -0
  103. package/dist/ocifetch/index.d.ts +17 -0
  104. package/dist/ocifetch/index.d.ts.map +1 -0
  105. package/dist/ocifetch/index.js +14 -0
  106. package/dist/ocifetch/index.js.map +1 -0
  107. package/dist/ocifetch/layout.d.ts +126 -0
  108. package/dist/ocifetch/layout.d.ts.map +1 -0
  109. package/dist/ocifetch/layout.js +375 -0
  110. package/dist/ocifetch/layout.js.map +1 -0
  111. package/dist/ocifetch/localverify.d.ts +43 -0
  112. package/dist/ocifetch/localverify.d.ts.map +1 -0
  113. package/dist/ocifetch/localverify.js +164 -0
  114. package/dist/ocifetch/localverify.js.map +1 -0
  115. package/dist/ocifetch/lock.d.ts +39 -0
  116. package/dist/ocifetch/lock.d.ts.map +1 -0
  117. package/dist/ocifetch/lock.js +140 -0
  118. package/dist/ocifetch/lock.js.map +1 -0
  119. package/dist/ocifetch/oci.d.ts +100 -0
  120. package/dist/ocifetch/oci.d.ts.map +1 -0
  121. package/dist/ocifetch/oci.js +323 -0
  122. package/dist/ocifetch/oci.js.map +1 -0
  123. package/dist/ocifetch/referrers.d.ts +55 -0
  124. package/dist/ocifetch/referrers.d.ts.map +1 -0
  125. package/dist/ocifetch/referrers.js +132 -0
  126. package/dist/ocifetch/referrers.js.map +1 -0
  127. package/dist/ocifetch/types.d.ts +167 -0
  128. package/dist/ocifetch/types.d.ts.map +1 -0
  129. package/dist/ocifetch/types.js +88 -0
  130. package/dist/ocifetch/types.js.map +1 -0
  131. package/dist/ocifetch/unpack.d.ts +55 -0
  132. package/dist/ocifetch/unpack.d.ts.map +1 -0
  133. package/dist/ocifetch/unpack.js +205 -0
  134. package/dist/ocifetch/unpack.js.map +1 -0
  135. package/dist/registry.d.ts +38 -387
  136. package/dist/registry.d.ts.map +1 -1
  137. package/dist/registry.js +95 -819
  138. package/dist/registry.js.map +1 -1
  139. package/dist/schema.d.ts +77 -588
  140. package/dist/schema.d.ts.map +1 -1
  141. package/dist/schema.js +87 -549
  142. package/dist/schema.js.map +1 -1
  143. package/dist/settings.d.ts +27 -36
  144. package/dist/settings.d.ts.map +1 -1
  145. package/dist/settings.js +75 -25
  146. package/dist/settings.js.map +1 -1
  147. package/dist/setup.d.ts +46 -0
  148. package/dist/setup.d.ts.map +1 -0
  149. package/dist/setup.js +79 -0
  150. package/dist/setup.js.map +1 -0
  151. package/dist/tar.d.ts +27 -11
  152. package/dist/tar.d.ts.map +1 -1
  153. package/dist/tar.js +54 -32
  154. package/dist/tar.js.map +1 -1
  155. package/package.json +2 -2
  156. package/dist/discover.d.ts +0 -142
  157. package/dist/discover.d.ts.map +0 -1
  158. package/dist/discover.js +0 -288
  159. package/dist/discover.js.map +0 -1
  160. package/dist/error-codes.d.ts +0 -80
  161. package/dist/error-codes.d.ts.map +0 -1
  162. package/dist/error-codes.js +0 -139
  163. package/dist/error-codes.js.map +0 -1
  164. package/dist/errors.d.ts +0 -284
  165. package/dist/errors.d.ts.map +0 -1
  166. package/dist/errors.js +0 -321
  167. package/dist/errors.js.map +0 -1
  168. package/dist/fetch.d.ts +0 -382
  169. package/dist/fetch.d.ts.map +0 -1
  170. package/dist/fetch.js +0 -1498
  171. package/dist/fetch.js.map +0 -1
  172. package/dist/ffi.d.ts +0 -410
  173. package/dist/ffi.d.ts.map +0 -1
  174. package/dist/ffi.js +0 -1154
  175. package/dist/ffi.js.map +0 -1
  176. package/dist/format.d.ts +0 -128
  177. package/dist/format.d.ts.map +0 -1
  178. package/dist/format.js +0 -132
  179. package/dist/format.js.map +0 -1
  180. package/dist/numeric.d.ts +0 -20
  181. package/dist/numeric.d.ts.map +0 -1
  182. package/dist/numeric.js +0 -107
  183. package/dist/numeric.js.map +0 -1
  184. package/dist/paths.d.ts +0 -55
  185. package/dist/paths.d.ts.map +0 -1
  186. package/dist/paths.js +0 -87
  187. package/dist/paths.js.map +0 -1
  188. package/dist/results.d.ts +0 -495
  189. package/dist/results.d.ts.map +0 -1
  190. package/dist/results.js +0 -406
  191. package/dist/results.js.map +0 -1
  192. package/dist/transform.d.ts +0 -73
  193. package/dist/transform.d.ts.map +0 -1
  194. package/dist/transform.js +0 -533
  195. package/dist/transform.js.map +0 -1
package/dist/library.js CHANGED
@@ -1,339 +1,101 @@
1
1
  /**
2
- * One loaded ClickHouse build. It names itself — `chs_clickhouse_version()` —
3
- * and nothing is ever inferred from the directory or the file name.
2
+ * `Library`: one loaded image (`docs/reference/bindings-v1.md` §2, "The
3
+ * library"). Every method is one ABI call over the generated, typed layer,
4
+ * decoded without computing anything. There is no `close`: an image is never
5
+ * unloaded, so nothing is owed. TypeScript runs one isolate, so every method
6
+ * is trivially safe to call in any order.
4
7
  */
5
- import { reconstructDdlWith } from './discover.js';
6
- import { ErrorCodeCache } from './error-codes.js';
7
- import { schemaErrorFor } from './errors.js';
8
+ import { openUnverified as loadUnverified } from './abi1/index.js';
9
+ import { decodeDiscovery, decodeErrorCodes, decodeLiveHandles, } from './documents.js';
8
10
  import { Schema } from './schema.js';
9
- import { encodeSettings } from './settings.js';
10
- /**
11
- * The minor line: the first two dot-separated components of the reported
12
- * version. `25.10` is a *later* minor than `25.8`, so string comparison of minor
13
- * lines is meaningless and must not be used for ordering.
14
- *
15
- * @param version - an exact patch (`"25.8.28.1-lts"`) or already a minor line.
16
- * @returns the minor line (`"25.8"`); a string with fewer than two components
17
- * is returned unchanged. Never throws.
18
- */
19
- export function minorOf(version) {
20
- const parts = version.split('.');
21
- if (parts.length < 2)
22
- return version;
23
- return `${parts[0]}.${parts[1]}`;
24
- }
25
- /**
26
- * The compile MODE — how the profile handed to `compileDdl` relates to the
27
- * settings this build compiles under. Numeric values are part of the C ABI
28
- * (bindings pass an int), exactly like `Format`.
29
- */
30
- export const CompileMode = {
31
- /**
32
- * The only defined mode: every setting the profile names takes the
33
- * caller's value, every setting it does not name keeps the library's own
34
- * permissive compile base. A partial profile can admit a schema the server
35
- * might refuse, but can never fabricate a rejection. Any other value is
36
- * refused loudly (an `UnsupportedError`), reserved for a future
37
- * COMPLETE-profile mode.
38
- */
39
- Declared: 0,
40
- };
41
- /**
42
- * One loaded ClickHouse build — the entry point for compiling schemas and
43
- * canonicalizing types under that release's exact semantics. Obtained from
44
- * `Registry#for`; never constructed directly.
45
- *
46
- * Thread-safety: every call here is synchronous on the JS thread, so ordinary
47
- * single-threaded Node code needs no locking. `setDefaultSettings` and
48
- * `shutdown` mutate per-library process state and refuse loudly if called from
49
- * inside another chtypes call (a reentrancy guard, not a lock). Two
50
- * `worker_threads` share one dlopen'd image and one set of C globals, which no
51
- * per-isolate guard can see — seed settings before starting workers, or
52
- * serialize the seed yourself (docs/reference/bindings.md §Concurrency).
53
- */
11
+ import { commitSetup, settleSetup } from './setup.js';
12
+ import { bytesIn, encodeSettings } from './settings.js';
54
13
  export class Library {
55
- native;
56
- /** The exact patch this build is, e.g. "25.8.28.1-lts". */
57
- version;
58
- /** The line callers and the rigs ask in, e.g. "25.8". */
59
- minor;
60
- /** The shared library that was loaded. */
61
- path;
62
- /**
63
- * The chs_* ABI revision this ARTIFACT was built from, or 0 when it predates
64
- * `chs_abi_revision`. A `Library` that exists reports either `ABI_REVISION`
65
- * or 0 — a different nonzero revision is refused at load (the C ABI contract
66
- * §ABI identity).
67
- */
68
- abiRevision;
69
- /**
70
- * This library's own error-code table, once built (see `errorCodes`). Per
71
- * Library and never shared: the table is a property of the build.
72
- */
73
- errorCodeCache = new ErrorCodeCache();
74
- /** @internal — obtained from a `Registry`. */
75
- constructor(native) {
76
- this.native = native;
77
- this.version = native.version;
78
- this.minor = minorOf(native.version);
79
- this.path = native.path;
80
- this.abiRevision = native.abiRevision;
14
+ #image;
15
+ #calls;
16
+ #errorCodes;
17
+ /** The fetch record this library was opened by; undefined when opened unverified. */
18
+ resolved;
19
+ /** Not for callers: use `Registry.for` or `openUnverified`. */
20
+ constructor(image, resolved) {
21
+ this.#image = image;
22
+ this.#calls = image.calls;
23
+ this.resolved = resolved;
81
24
  }
82
- /**
83
- * Parse and canonicalize one type expression, e.g. `DECIMAL(18,4)` ->
84
- * `Decimal(18, 4)`. The library's spelling is authoritative: pass it through
85
- * verbatim and never normalize its whitespace.
86
- *
87
- * Note that this alone is insufficient for a schema — `x Int64 DEFAULT NULL`
88
- * canonicalizes the *column* to `Nullable(Int64)`, which only `compileDdl` sees.
89
- *
90
- * @param typeExpr - a ClickHouse type expression, e.g. `"Nullable(Decimal(18,4))"`.
91
- * @returns the canonical spelling, e.g. `"Nullable(Decimal(18, 4))"`.
92
- * @throws {SchemaError} when ClickHouse itself refuses the expression —
93
- * `code` is its own code (`50` `Unknown data type family` for a typo) and
94
- * the message its own text.
95
- * @throws {UnsupportedError} when this build declines to construct the type
96
- * (an unsafe family), or the artifact predates `chs_validate_type`.
97
- */
98
- validateType(typeExpr) {
99
- const r = this.native.validateType(typeExpr);
100
- if (!r.ok)
101
- throw schemaErrorFor(r.code, r.message);
102
- return r.canonical;
25
+ /** What the library is, read once by the loader. */
26
+ get buildInfo() {
27
+ return this.#image.buildInfo;
103
28
  }
104
- /**
105
- * Compile a ClickHouse column-declaration list — not a CREATE TABLE:
106
- * `"a UInt8, b Nullable(String) DEFAULT 'x', c DateTime MATERIALIZED now()"`.
107
- * It is parsed by ClickHouse's own `ParserColumnDeclarationList`, so DEFAULT
108
- * expressions are validated as real SQL. Column-level TTL clauses belong here.
109
- *
110
- * With `options.settings` the schema is compiled under that DECLARED profile,
111
- * exactly as a real CREATE TABLE under those settings: `{ flatten_nested: '0' }`
112
- * keeps `n Nested(a,b)` ONE column `n` of type `Nested(…)` where the default
113
- * flattens it to the `n.a`/`n.b` Array columns, and every downstream shape —
114
- * `columns`, JSONEachRow name lookup, positional arity, the RowBinary wire —
115
- * follows the compiled shape. The profile is compile-time only and immutable
116
- * for the schema's life; per-call settings still govern row parsing, and only
117
- * row parsing.
118
- *
119
- * Absent/empty settings are structurally the plain compile: `chs_schema_compile`
120
- * takes settings "{}" and `mode` `CompileMode.Declared` (0) either way. An
121
- * unknown setting name fails the compile with the server's own code 115.
122
- *
123
- * @param ddl - a column-declaration list, e.g. `"x UInt8, s String DEFAULT 'x'"`.
124
- * @param options - the declared settings profile and compile mode.
125
- * @returns the compiled `Schema`. Release it with `close()` (or `using`).
126
- * @throws {SchemaError} when the compile is REFUSED with a positive code: a
127
- * bad type or DEFAULT carries ClickHouse's own code and message; an
128
- * unknown setting name in `options.settings` carries the server's own 115
129
- * (with its did-you-mean hint), and nothing is compiled; a type gate
130
- * declared at a refusing value fails with the server's own 455/44, exactly
131
- * as that server's CREATE; an Enum DEFAULT outside the declared domain
132
- * follows that server's CREATE too — 691 (or 70 for an out-of-range
133
- * literal) where it refuses the table (26.x); on 24.8–25.10 it compiles,
134
- * and a row relying on the default answers `accepted_poisoned`.
135
- * @throws {UnsupportedError} when this build DECLINES rather than guesses —
136
- * a `mode` other than `CompileMode.Declared`, or a DEFAULT it refuses to
137
- * evaluate (server-property functions like `hostName()`, `sleep`, an
138
- * admission-budget overrun). Validate cautiously; do not blame the tenant.
139
- */
140
- compileDdl(ddl, options) {
141
- const settingsJson = encodeSettings(options?.settings);
142
- const mode = options?.mode ?? CompileMode.Declared;
143
- return new Schema(this.native, this.native.schemaCompile(ddl, settingsJson, mode), ddl);
29
+ /** `clickhouse_version` from the build info, read rather than derived: four parts, no channel. */
30
+ get version() {
31
+ return this.#image.buildInfo.clickhouseVersion;
144
32
  }
145
- /**
146
- * Does this artifact export the consolidated, settings-aware
147
- * `chs_schema_compile`? True on every artifact this repo builds — the
148
- * symbol is one of the mandatory four. Kept for a `Registry` that may
149
- * someday load a third-party-built artifact that lacks it, in which case
150
- * `compileDdl` with a non-empty `settings` and `setEngine` with non-empty
151
- * `mergeTreeSettings` throw an `UnsupportedError` instead of
152
- * crashing.
153
- */
154
- hasCompileSettings() {
155
- return this.native.hasCompileSettings();
33
+ /** `clickhouse_minor` from the build info, read rather than derived. */
34
+ get minor() {
35
+ return this.#image.buildInfo.clickhouseMinor;
156
36
  }
157
- /**
158
- * Seed the settings every later call starts from. ClickHouse gates several type
159
- * families at column-creation time (`allow_suspicious_low_cardinality_types`,
160
- * `allow_experimental_json_type`, …); those are properties of the server the
161
- * table lives on, not of the row, so a gateway sets them once here. Anything a
162
- * per-call settings map sets still wins.
163
- *
164
- * Prefer `compileDdl(ddl, { settings })` for a gate that belongs to a
165
- * particular tenant's table: a gate declared in the compile profile binds
166
- * where a real server binds it — once, at CREATE — and then outranks the
167
- * per-call map for that handle (measured on live 25.10.7.6 and 26.7.3.19;
168
- * the C ABI contract, "Server-level type gates"). This process-wide seed stays the
169
- * right channel only for gateway-uniform policy.
170
- *
171
- * @param settings - the seed. An unknown name refuses the WHOLE payload with
172
- * the server's own 115 and nothing is committed — a gateway can never
173
- * believe a default profile is in force when part of it never applied.
174
- * @throws {ChtypesError} when the payload is refused (the message carries
175
- * the server's own text, did-you-mean hint included), when a value is a JS
176
- * `number`, or when called from inside another chtypes call — it replaces
177
- * process-global state the row path reads by reference, so it must never
178
- * overlap another call on this library. In a `worker_threads` setup, seed
179
- * BEFORE starting workers; the guard cannot see across isolates.
180
- * @throws {UnsupportedError} when the artifact predates
181
- * `chs_set_default_settings`.
182
- */
183
- setDefaultSettings(settings) {
184
- this.native.setDefaultSettings(encodeSettings(settings));
37
+ /** The loaded file's path. */
38
+ get path() {
39
+ return this.#image.path;
185
40
  }
186
- /**
187
- * Diagnostic: the widened reference type this build compares against —
188
- * `UInt8` → `Int256`, `DateTime` → `DateTime64(0, 'UTC')`. Not needed to
189
- * function (the reference parse is already applied inside `row`/`rows` and
190
- * reported per column); it makes transformation findings explainable.
191
- *
192
- * @param typeExpr - a ClickHouse type expression.
193
- * @returns the reference type, or `''` for a type with no wider type to
194
- * compare against (`String`, `Float64`).
195
- * @throws {UnsupportedError} when the artifact predates `chs_reference_type`.
196
- */
197
- referenceType(typeExpr) {
198
- return this.native.referenceType(typeExpr);
41
+ /** ClickHouse's own canonical spelling of a type expression, or its own refusal. */
42
+ validateType(typeExpr) {
43
+ return this.#calls.typeValidate(bytesIn(typeExpr));
199
44
  }
200
- /**
201
- * Spell `name` as a back-quoted identifier — ALWAYS quoted, which is the
202
- * safe default and the one to reach for without thinking
203
- * (`chs_quote_identifier`, the vendored `backQuote`).
204
- *
205
- * The bytes are this library's own: an embedded back-quote comes back in the
206
- * spelling the server's formatter prints, not in a spelling of ours. Reach
207
- * for `quoteIdentifierIfNeeded` only when the bare spelling matters to
208
- * something downstream.
209
- *
210
- * @param name - a table, column or alias name.
211
- * @returns the quoted identifier.
212
- * @throws {UnsupportedError} when the artifact predates
213
- * `chs_quote_identifier`.
214
- */
45
+ /** A name quoted the way ClickHouse's own `backQuote` quotes it: always quoted. */
215
46
  quoteIdentifier(name) {
216
- return this.quote('chs_quote_identifier', name);
47
+ return this.#calls.backQuote(bytesIn(name));
217
48
  }
218
- /**
219
- * Spell `name` bare where THIS library's ClickHouse says a bare spelling is
220
- * legal, and back-quote it otherwise (`chs_quote_identifier_if_needed`, the
221
- * vendored `backQuoteIfNeed`).
222
- *
223
- * Which names it leaves bare is a property of the vendored build, not of
224
- * this package, and it CHANGES between builds — ask the library you will
225
- * compile against rather than caching an answer across versions.
226
- *
227
- * @param name - a table, column or alias name.
228
- * @returns the identifier, bare or quoted.
229
- * @throws {UnsupportedError} when the artifact predates
230
- * `chs_quote_identifier_if_needed`.
231
- */
49
+ /** A name quoted only where this build says it must be. */
232
50
  quoteIdentifierIfNeeded(name) {
233
- return this.quote('chs_quote_identifier_if_needed', name);
51
+ return this.#calls.backQuoteIfNeeded(bytesIn(name));
234
52
  }
235
- /**
236
- * Spell `text` as a ClickHouse string literal, quotes and escapes included
237
- * (`chs_quote_literal`, the vendored `quoteString`) — the call to reach for
238
- * when a value is spliced into DDL, e.g. a DEFAULT expression.
239
- *
240
- * The input is counted, so a value carrying a NUL byte is quoted correctly;
241
- * the answer is escaped and therefore NUL-free.
242
- *
243
- * @param text - the string value.
244
- * @returns the ClickHouse string literal.
245
- * @throws {UnsupportedError} when the artifact predates `chs_quote_literal`.
246
- */
53
+ /** A string literal quoted the way ClickHouse quotes one. */
247
54
  quoteLiteral(text) {
248
- return this.quote('chs_quote_literal', text);
55
+ return this.#calls.quoteString(bytesIn(text));
249
56
  }
250
- quote(symbol, text) {
251
- const r = this.native.quote(symbol, text);
252
- if (!r.ok)
253
- throw schemaErrorFor(r.code, r.message || `${symbol} refused the input`);
254
- return r.quoted;
57
+ /** This build's error-code table, built on the first call and kept for the library's life on success only. */
58
+ errorCodes() {
59
+ this.#errorCodes ??= decodeErrorCodes(this.#calls.errorCodes());
60
+ return this.#errorCodes;
255
61
  }
256
- /**
257
- * Turn `QUERY_TABLE_COLUMNS`' rows back into the column-declaration list
258
- * `compileDdl` takes.
259
- *
260
- * It hangs off a Library because the one thing it spells — the column NAME —
261
- * is spelled by this library's own `quoteIdentifier`; see `discover.ts` for
262
- * what reconstruction does and does not promise.
263
- *
264
- * @param cols - the discovered columns, e.g. from `parseColumnsResult`.
265
- * @returns the column-declaration list for `compileDdl`.
266
- * @throws {ChtypesError} when a column is inconsistent, or there are none.
267
- * @throws {UnsupportedError} when the artifact predates
268
- * `chs_quote_identifier`.
269
- */
270
- reconstructDdl(cols) {
271
- return reconstructDdlWith(cols, (name) => this.quoteIdentifier(name));
62
+ /** The discovery query, which the caller runs against its server with its own client, binding `{database:String}` and `{table:String}`. */
63
+ discoverQuery() {
64
+ return this.#calls.discoverQuery();
272
65
  }
273
- /**
274
- * Every type family in this build's own runtime registry (139 entries on
275
- * 25.8) — the answer to "does this build track upstream type families?"
276
- * without a hand-maintained table. Part of the three-question introspection
277
- * surface every SDK exposes (docs/reference/bindings.md §Introspection).
278
- *
279
- * @returns the family names, one per registry entry.
280
- * @throws {UnsupportedError} when the artifact predates
281
- * `chs_registered_families`.
282
- */
283
- registeredFamilies() {
284
- return this.native.registeredFamilies();
66
+ /** Read a server's `system.columns` answer (`FORMAT JSONEachRow`) into column declarations. */
67
+ discoverColumns(rows) {
68
+ return decodeDiscovery(this.#calls.discoverColumns(rows));
285
69
  }
286
- /**
287
- * THIS library's own error-code table (`chs_error_codes`, revision 6): every
288
- * code the vendored ClickHouse names, with the name it gives it — the table
289
- * the server's `system.errors` enumerates and the name it prints after
290
- * "Code: N." in an exception message.
291
- *
292
- * The table belongs to the build, not to this package: codes join and leave
293
- * between lines, and one number can name different errors on two lines (903
294
- * differs between 25.8 and 26.2). Ask the library whose line you are
295
- * answering for; there is no package-level table.
296
- *
297
- * Built on the first call and kept for this library's life — the answer never
298
- * changes for a loaded library. Only a table that was actually built is kept.
299
- *
300
- * @returns the table; `name(code)` / `code(name)` answer `undefined` for
301
- * anything the build's own table does not hold.
302
- * @throws {ChtypesError} when the library could not build the document (a
303
- * guarded exception) — nothing is cached, and the next call asks again.
304
- * @throws {UnsupportedError} when the artifact predates `chs_error_codes`.
305
- */
306
- errorCodes() {
307
- return this.errorCodeCache.get(() => this.native.errorCodes());
70
+ /** Live handle counts per kind in this image: a diagnostic. */
71
+ liveHandles() {
72
+ return decodeLiveHandles(this.#calls.liveHandles());
308
73
  }
309
- /**
310
- * The TSV audit of every registered function's volatility
311
- * (`chs_function_flags`), VERBATIM: one function per line, six
312
- * tab-separated fields — `name`, `deterministic`, `deterministic_in_query`,
313
- * `server_constant`, `stateful`, `resolver_error_code`. ClickHouse's own
314
- * answers off this build's own registry, and the input to the statelessness
315
- * gate (the build's function-flags generator). Part of the three-question
316
- * introspection surface every SDK exposes (docs/reference/bindings.md
317
- * §Introspection).
318
- *
319
- * @returns the audit text, verbatim.
320
- * @throws {UnsupportedError} when the artifact predates
321
- * `chs_function_flags`.
322
- */
323
- functionFlags() {
324
- return this.native.functionFlags();
74
+ /** Compile exactly one `CREATE TABLE` statement. */
75
+ compileTable(createTable, options = {}) {
76
+ return new Schema(this.#calls, this.#calls.schemaCreate(bytesIn(createTable), encodeSettings(options.settings, options.sessionTimezone)));
325
77
  }
326
- /**
327
- * Join the DEFAULT evaluator's background threads. `chs_init` registers this
328
- * with `atexit`, so an ordinary process needs no call; it is REQUIRED before
329
- * an explicit unload, and useful in tests that must not depend on `atexit`.
330
- * Idempotent.
331
- *
332
- * @throws {ChtypesError} when called from inside another chtypes call on
333
- * this library (the same reentrancy guard as `setDefaultSettings`).
334
- */
335
- shutdown() {
336
- this.native.shutdown();
78
+ }
79
+ const libraries = new Map();
80
+ /** The one `Library` of an image: two registries, two spellings or a hardlink of one artifact share one image and one object. */
81
+ export function libraryOf(image, resolved) {
82
+ let lib = libraries.get(image);
83
+ if (lib === undefined) {
84
+ lib = new Library(image, resolved);
85
+ libraries.set(image, lib);
337
86
  }
87
+ return lib;
88
+ }
89
+ /**
90
+ * Open a local build with no signed statement, such as an unpublished library
91
+ * under test. It refuses with a `UsageError` unless the caller passes
92
+ * `{ allow: true }` AND `CHTYPES_ALLOW_UNVERIFIED_LIBRARY=1` is set, warns once
93
+ * per path, skips loader steps 1 and 5, and runs step 7 under the process setup
94
+ * like any open. It is not reachable through a registry, and its `Library` has
95
+ * no `resolved`, unless a registry had already opened the same image.
96
+ */
97
+ export function openUnverified(path, options) {
98
+ const setup = commitSetup();
99
+ return libraryOf(loadUnverified(path, { allow: options.allow, timezone: setup.timezone, defaults: setup.defaults, settle: settleSetup }), undefined);
338
100
  }
339
101
  //# sourceMappingURL=library.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"library.js","sourceRoot":"","sources":["../src/library.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAyB,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,cAAc,EAAiB,MAAM,eAAe,CAAC;AAE9D;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CAAC,OAAe;IACrC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IACrC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACnC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB;;;;;;;OAOG;IACH,QAAQ,EAAE,CAAC;CACH,CAAC;AA2BX;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,OAAO;IAsBW,MAAM;IArBnC,2DAA2D;IAClD,OAAO,CAAS;IACzB,yDAAyD;IAChD,KAAK,CAAS;IACvB,0CAA0C;IACjC,IAAI,CAAS;IACtB;;;;;OAKG;IACM,WAAW,CAAS;IAE7B;;;OAGG;IACc,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;IAEvD,8CAA8C;IAC9C,YAA6B,MAAqB;sBAArB,MAAM;QACjC,IAAI,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M,CACf,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAC1G,CAAC;IACJ,CAAC;CACF;AAED,MAAM,SAAS,GAAG,IAAI,GAAG,EAAwB,CAAC;AAElD,iIAAiI;AACjI,MAAM,UAAU,SAAS,CAAC,KAAkB,EAAE,QAA8B;IAC1E,IAAI,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/B,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,GAAG,GAAG,IAAI,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACnC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,OAAoC;IAC/E,MAAM,KAAK,GAAG,WAAW,EAAE,CAAC;IAC5B,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;AACvJ,CAAC"}
@@ -0,0 +1,84 @@
1
+ export declare const SCHEMA_VERSION: 1;
2
+ export declare const ABI_GENERATION: 1;
3
+ export declare const ENV_BASES_NAME: "CHTYPES_ARTIFACTS_URL";
4
+ export declare const BASE_SEPARATOR: ",";
5
+ export declare const FIXTURES_REPO_SUFFIX: "/sdk-fetch-fixtures";
6
+ export declare const DEFAULT_BASES: readonly ["https://registry.wavehouse.dev/chtypes/v1"];
7
+ export declare const ALLOWED_SCHEMES: readonly ["https", "http", "file"];
8
+ export declare const ENV_CACHE_NAME: "CHTYPES_CACHE";
9
+ export declare const ENV_TOKEN_NAME: "CHTYPES_DOWNLOAD_TOKEN";
10
+ export declare const ENV_TRUSTED_KEYS_NAME: "CHTYPES_TRUSTED_KEYS";
11
+ export declare const ENV_ALLOW_UNSIGNED_NAME: "CHTYPES_ALLOW_UNSIGNED";
12
+ export declare const ENV_AUTOFETCH_NAME: "CHTYPES_AUTOFETCH";
13
+ export declare const ENV_TARGET_NAME: "CHTYPES_TARGET";
14
+ export declare const ENV_RETIRED: readonly ["CHTYPES_REGISTRY"];
15
+ export declare const SPELLING_REGEX: "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))?)?$";
16
+ export declare const SPELLING_REFUSE_HINT_REGEX: "^v|-(lts|stable)$";
17
+ export declare const PLATFORMS: readonly [{
18
+ readonly key: "linux-amd64";
19
+ readonly os: "linux";
20
+ readonly architecture: "amd64";
21
+ }, {
22
+ readonly key: "linux-arm64";
23
+ readonly os: "linux";
24
+ readonly architecture: "arm64";
25
+ }, {
26
+ readonly key: "darwin-arm64";
27
+ readonly os: "darwin";
28
+ readonly architecture: "arm64";
29
+ }];
30
+ export declare const MEDIA_TYPE_INDEX: "application/vnd.oci.image.index.v1+json";
31
+ export declare const MEDIA_TYPE_MANIFEST: "application/vnd.oci.image.manifest.v1+json";
32
+ export declare const MEDIA_TYPE_EMPTY_CONFIG: "application/vnd.oci.empty.v1+json";
33
+ export declare const MEDIA_TYPE_CONFIG: "application/vnd.wavehouse.chtypes.config.v1+json";
34
+ export declare const MEDIA_TYPE_LAYER: "application/vnd.oci.image.layer.v1.tar+zstd";
35
+ export declare const MEDIA_TYPE_BUNDLE: "application/vnd.dev.sigstore.bundle.v0.3+json";
36
+ export declare const ARTIFACT_TYPE: "application/vnd.wavehouse.chtypes.artifact.v1";
37
+ export declare const GOLDENS_ARTIFACT_TYPE: "application/vnd.wavehouse.chtypes.goldens.v1";
38
+ export declare const FIXTURES_ARTIFACT_TYPE: "application/vnd.wavehouse.chtypes.sdk-fetch-fixtures.v1";
39
+ export declare const CHANNEL_ARTIFACT_TYPE: "application/vnd.wavehouse.chtypes.channel.v1";
40
+ export declare const DSSE_PAYLOAD_TYPE: "application/vnd.in-toto+json";
41
+ export declare const DSSE_MAX_SIGNATURES: 4;
42
+ export declare const STATEMENT_TYPE: "https://in-toto.io/Statement/v1";
43
+ export declare const PREDICATE_TYPE_ARTIFACT: "https://artifacts.wavehouse.dev/spec/artifact/v1";
44
+ export declare const PREDICATE_TYPE_GOLDENS: "https://artifacts.wavehouse.dev/spec/goldens/v1";
45
+ export declare const PREDICATE_TYPE_FIXTURES: "https://artifacts.wavehouse.dev/spec/sdk-fetch-fixtures/v1";
46
+ export declare const PREDICATE_TYPE_CHANNEL: "https://artifacts.wavehouse.dev/spec/channel/v1";
47
+ export declare const KEYID_ALGORITHM: "sha256-first16hex";
48
+ export declare const RELEASE_KEYS: readonly [{
49
+ readonly keyid: "deb275922dbff76e";
50
+ readonly ed25519Hex: "fdb5f06a8d4c9918d049a5f1748fa2e3b3238c3f2000986d5bb9e31beff778fc";
51
+ }];
52
+ export declare const TEST_KEYS: readonly [{
53
+ readonly keyid: "6c3468e4ec653ac0";
54
+ readonly ed25519Hex: "b9b314491f92f6c4b93fc69f932164739a619965ed79dbbcea7a4ae2da611ce2";
55
+ readonly trustedByDefault: false;
56
+ }];
57
+ export declare const RETRY_ATTEMPTS: 5;
58
+ export declare const RETRY_FIRST_WAIT_S: 4;
59
+ export declare const RETRY_MULTIPLIER: 2;
60
+ export declare const RETRY_STATUSES: number[];
61
+ export declare const RETRY_AFTER_STATUSES: number[];
62
+ export declare const RETRY_AFTER_OVER_BUDGET: "refuse";
63
+ export declare const DIGEST_404_POLICY: "next_base_then_retry_on_last";
64
+ export declare const TAG_404_POLICY: "next_base_then_unpublished";
65
+ export declare const CONNECT_TIMEOUT_S: 30;
66
+ export declare const IDLE_READ_TIMEOUT_S: 60;
67
+ export declare const MANIFEST_MAX_BYTES: 4194304;
68
+ export declare const BUNDLE_MAX_BYTES: 1048576;
69
+ export declare const TAGS_LIST_MAX_BYTES: 8388608;
70
+ export declare const LAYOUT_INDEX_MAX_BYTES: 8388608;
71
+ export declare const MAX_REFERRERS: 16;
72
+ export declare const MAX_REDIRECTS: 5;
73
+ export declare const MAX_UNPACKED_BYTES: 4294967296;
74
+ export declare const ZSTD_WINDOW_LOG_MAX: 27;
75
+ export declare const CACHE_ROOT_TEMPLATE: "${XDG_CACHE_HOME:-$HOME/.cache}/chtypes/v1";
76
+ export declare const SYSTEM_CACHE_DIRS: readonly ["/usr/local/share/chtypes/v1", "/opt/chtypes/v1"];
77
+ export declare const CACHE_UNPACKED_DIR: "unpacked/sha256";
78
+ export declare const CACHE_VERIFIED_RECORD: "verified.json";
79
+ export declare const CACHE_ANNOTATION_PREFIX: "dev.wavehouse.chtypes.";
80
+ export declare const LOCK_SCHEMA: 3;
81
+ export declare const LOCK_DEFAULT_FILE: "chtypes.lock";
82
+ export declare const AUTOFETCH_UNPUBLISHED_MEMO_S: 300;
83
+ export declare const ERROR_EXIT_CODES: Readonly<Record<string, number>>;
84
+ //# sourceMappingURL=constants.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.gen.d.ts","sourceRoot":"","sources":["../../src/ocifetch/constants.gen.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,EAAG,CAAU,CAAC;AACzC,eAAO,MAAM,cAAc,EAAG,CAAU,CAAC;AAEzC,eAAO,MAAM,cAAc,EAAG,uBAAgC,CAAC;AAC/D,eAAO,MAAM,cAAc,EAAG,GAAY,CAAC;AAC3C,eAAO,MAAM,oBAAoB,EAAG,qBAA8B,CAAC;AACnE,eAAO,MAAM,aAAa,YAAI,2CAA2C,CAAU,CAAC;AACpF,eAAO,MAAM,eAAe,YAAI,OAAO,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AA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;AACtD,eAAO,MAAM,mBAAmB,EAAG,EAAW,CAAC;AAG/C,eAAO,MAAM,mBAAmB,EAAG,4CAAqD,CAAC;AACzF,eAAO,MAAM,iBAAiB,YAAI,6BAA6B,EAAE,iBAAiB,CAAU,CAAC;AAC7F,eAAO,MAAM,kBAAkB,EAAG,iBAA0B,CAAC;AAC7D,eAAO,MAAM,qBAAqB,EAAG,eAAwB,CAAC;AAC9D,eAAO,MAAM,uBAAuB,EAAG,wBAAiC,CAAC;AAEzE,eAAO,MAAM,WAAW,EAAG,CAAU,CAAC;AACtC,eAAO,MAAM,iBAAiB,EAAG,cAAuB,CAAC;AAEzD,eAAO,MAAM,4BAA4B,EAAG,GAAc,CAAC;AAK3D,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAW7D,CAAC"}
@@ -0,0 +1,92 @@
1
+ // Code generated by scripts/fetch-v1/gen-constants.py from
2
+ // spec/fetch-v1/constants.json (sha256:bf19d75118f2d10a1aac28e7e4e44022d59d36d7bbea2f9c7b0c327dcc5a73fc). DO NOT EDIT.
3
+ export const SCHEMA_VERSION = 1;
4
+ export const ABI_GENERATION = 1;
5
+ export const ENV_BASES_NAME = "CHTYPES_ARTIFACTS_URL";
6
+ export const BASE_SEPARATOR = ",";
7
+ export const FIXTURES_REPO_SUFFIX = "/sdk-fetch-fixtures";
8
+ export const DEFAULT_BASES = ["https://registry.wavehouse.dev/chtypes/v1"];
9
+ export const ALLOWED_SCHEMES = ["https", "http", "file"];
10
+ export const ENV_CACHE_NAME = "CHTYPES_CACHE";
11
+ export const ENV_TOKEN_NAME = "CHTYPES_DOWNLOAD_TOKEN";
12
+ export const ENV_TRUSTED_KEYS_NAME = "CHTYPES_TRUSTED_KEYS";
13
+ export const ENV_ALLOW_UNSIGNED_NAME = "CHTYPES_ALLOW_UNSIGNED";
14
+ export const ENV_AUTOFETCH_NAME = "CHTYPES_AUTOFETCH";
15
+ export const ENV_TARGET_NAME = "CHTYPES_TARGET";
16
+ export const ENV_RETIRED = ["CHTYPES_REGISTRY"];
17
+ export const SPELLING_REGEX = "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*)(\\.(0|[1-9][0-9]*))?)?$";
18
+ export const SPELLING_REFUSE_HINT_REGEX = "^v|-(lts|stable)$";
19
+ export const PLATFORMS = [
20
+ { key: "linux-amd64", os: "linux", architecture: "amd64" },
21
+ { key: "linux-arm64", os: "linux", architecture: "arm64" },
22
+ { key: "darwin-arm64", os: "darwin", architecture: "arm64" },
23
+ ];
24
+ export const MEDIA_TYPE_INDEX = "application/vnd.oci.image.index.v1+json";
25
+ export const MEDIA_TYPE_MANIFEST = "application/vnd.oci.image.manifest.v1+json";
26
+ export const MEDIA_TYPE_EMPTY_CONFIG = "application/vnd.oci.empty.v1+json";
27
+ export const MEDIA_TYPE_CONFIG = "application/vnd.wavehouse.chtypes.config.v1+json";
28
+ export const MEDIA_TYPE_LAYER = "application/vnd.oci.image.layer.v1.tar+zstd";
29
+ export const MEDIA_TYPE_BUNDLE = "application/vnd.dev.sigstore.bundle.v0.3+json";
30
+ export const ARTIFACT_TYPE = "application/vnd.wavehouse.chtypes.artifact.v1";
31
+ export const GOLDENS_ARTIFACT_TYPE = "application/vnd.wavehouse.chtypes.goldens.v1";
32
+ export const FIXTURES_ARTIFACT_TYPE = "application/vnd.wavehouse.chtypes.sdk-fetch-fixtures.v1";
33
+ export const CHANNEL_ARTIFACT_TYPE = "application/vnd.wavehouse.chtypes.channel.v1";
34
+ export const DSSE_PAYLOAD_TYPE = "application/vnd.in-toto+json";
35
+ export const DSSE_MAX_SIGNATURES = 4;
36
+ export const STATEMENT_TYPE = "https://in-toto.io/Statement/v1";
37
+ export const PREDICATE_TYPE_ARTIFACT = "https://artifacts.wavehouse.dev/spec/artifact/v1";
38
+ export const PREDICATE_TYPE_GOLDENS = "https://artifacts.wavehouse.dev/spec/goldens/v1";
39
+ export const PREDICATE_TYPE_FIXTURES = "https://artifacts.wavehouse.dev/spec/sdk-fetch-fixtures/v1";
40
+ export const PREDICATE_TYPE_CHANNEL = "https://artifacts.wavehouse.dev/spec/channel/v1";
41
+ export const KEYID_ALGORITHM = "sha256-first16hex";
42
+ export const RELEASE_KEYS = [
43
+ { keyid: "deb275922dbff76e", ed25519Hex: "fdb5f06a8d4c9918d049a5f1748fa2e3b3238c3f2000986d5bb9e31beff778fc" },
44
+ ];
45
+ // Fixture-only keys. A conformance case trusts one only by explicitly naming
46
+ // it; trustedByDefault is always false and never consulted for real trust.
47
+ export const TEST_KEYS = [
48
+ { keyid: "6c3468e4ec653ac0", ed25519Hex: "b9b314491f92f6c4b93fc69f932164739a619965ed79dbbcea7a4ae2da611ce2", trustedByDefault: false },
49
+ ];
50
+ export const RETRY_ATTEMPTS = 5;
51
+ export const RETRY_FIRST_WAIT_S = 4.0;
52
+ export const RETRY_MULTIPLIER = 2.0;
53
+ export const RETRY_STATUSES = [408, 429, 500, 502, 503, 504];
54
+ export const RETRY_AFTER_STATUSES = [429, 503];
55
+ export const RETRY_AFTER_OVER_BUDGET = "refuse";
56
+ export const DIGEST_404_POLICY = "next_base_then_retry_on_last";
57
+ export const TAG_404_POLICY = "next_base_then_unpublished";
58
+ export const CONNECT_TIMEOUT_S = 30.0;
59
+ export const IDLE_READ_TIMEOUT_S = 60.0;
60
+ export const MANIFEST_MAX_BYTES = 4194304;
61
+ export const BUNDLE_MAX_BYTES = 1048576;
62
+ export const TAGS_LIST_MAX_BYTES = 8388608;
63
+ export const LAYOUT_INDEX_MAX_BYTES = 8388608;
64
+ export const MAX_REFERRERS = 16;
65
+ export const MAX_REDIRECTS = 5;
66
+ export const MAX_UNPACKED_BYTES = 4294967296;
67
+ export const ZSTD_WINDOW_LOG_MAX = 27;
68
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: a shell path template, not JS
69
+ export const CACHE_ROOT_TEMPLATE = "${XDG_CACHE_HOME:-$HOME/.cache}/chtypes/v1";
70
+ export const SYSTEM_CACHE_DIRS = ["/usr/local/share/chtypes/v1", "/opt/chtypes/v1"];
71
+ export const CACHE_UNPACKED_DIR = "unpacked/sha256";
72
+ export const CACHE_VERIFIED_RECORD = "verified.json";
73
+ export const CACHE_ANNOTATION_PREFIX = "dev.wavehouse.chtypes.";
74
+ export const LOCK_SCHEMA = 3;
75
+ export const LOCK_DEFAULT_FILE = "chtypes.lock";
76
+ export const AUTOFETCH_UNPUBLISHED_MEMO_S = 300.0;
77
+ // docs/guides/fetch-v1.md §8: the six v0 codes carry v0's own real, measured
78
+ // mapping (ts/src/cli.ts EXIT / errorToExitCode; Go, Python and Rust agree);
79
+ // the four new v1-only codes are assigned here, not inherited.
80
+ export const ERROR_EXIT_CODES = {
81
+ "CHTYPES_ARTIFACT_MISSING": 1,
82
+ "CHTYPES_ARTIFACT_UNTRUSTED": 1,
83
+ "CHTYPES_ARTIFACT_CORRUPT": 1,
84
+ "CHTYPES_ARTIFACT_PINNED": 1,
85
+ "CHTYPES_ARTIFACT_UNPUBLISHED": 4,
86
+ "CHTYPES_SOURCE_UNREACHABLE": 3,
87
+ "CHTYPES_SOURCE_UNAUTHORIZED": 5,
88
+ "CHTYPES_SOURCE_FORBIDDEN": 6,
89
+ "CHTYPES_SOURCE_INCOMPATIBLE": 7,
90
+ "CHTYPES_ARTIFACT_INCOMPATIBLE": 8,
91
+ };
92
+ //# sourceMappingURL=constants.gen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.gen.js","sourceRoot":"","sources":["../../src/ocifetch/constants.gen.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,uHAAuH;AAEvH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAU,CAAC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,cAAc,GAAG,uBAAgC,CAAC;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,GAAY,CAAC;AAC3C,MAAM,CAAC,MA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