@effect-dynamodb/schema 1.39.0 → 1.41.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.
Files changed (122) hide show
  1. package/dist/Aggregate.d.ts +11 -4
  2. package/dist/Aggregate.d.ts.map +1 -1
  3. package/dist/Aggregate.js +12 -2
  4. package/dist/Aggregate.js.map +1 -1
  5. package/dist/DynamoModel.d.ts +48 -7
  6. package/dist/DynamoModel.d.ts.map +1 -1
  7. package/dist/DynamoModel.js +34 -16
  8. package/dist/DynamoModel.js.map +1 -1
  9. package/dist/DynamoSchema.d.ts +25 -0
  10. package/dist/DynamoSchema.d.ts.map +1 -1
  11. package/dist/DynamoSchema.js.map +1 -1
  12. package/dist/Entity.d.ts +66 -11
  13. package/dist/Entity.d.ts.map +1 -1
  14. package/dist/Entity.js +261 -34
  15. package/dist/Entity.js.map +1 -1
  16. package/dist/Errors.d.ts +61 -4
  17. package/dist/Errors.d.ts.map +1 -1
  18. package/dist/Errors.js +83 -6
  19. package/dist/Errors.js.map +1 -1
  20. package/dist/KeyComposer.d.ts +196 -5
  21. package/dist/KeyComposer.d.ts.map +1 -1
  22. package/dist/KeyComposer.js +490 -54
  23. package/dist/KeyComposer.js.map +1 -1
  24. package/dist/VectorIndex.d.ts.map +1 -1
  25. package/dist/VectorIndex.js +5 -4
  26. package/dist/VectorIndex.js.map +1 -1
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +1 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/internal/AggregateEdges.d.ts +3 -3
  32. package/dist/internal/AggregateSchemas.d.ts +306 -14
  33. package/dist/internal/AggregateSchemas.d.ts.map +1 -1
  34. package/dist/internal/AggregateSchemas.js +733 -54
  35. package/dist/internal/AggregateSchemas.js.map +1 -1
  36. package/dist/internal/AggregateTypes.d.ts +396 -36
  37. package/dist/internal/AggregateTypes.d.ts.map +1 -1
  38. package/dist/internal/CompositeCodec.d.ts +298 -8
  39. package/dist/internal/CompositeCodec.d.ts.map +1 -1
  40. package/dist/internal/CompositeCodec.js +940 -34
  41. package/dist/internal/CompositeCodec.js.map +1 -1
  42. package/dist/internal/EffectInstances.d.ts +87 -0
  43. package/dist/internal/EffectInstances.d.ts.map +1 -0
  44. package/dist/internal/EffectInstances.js +662 -0
  45. package/dist/internal/EffectInstances.js.map +1 -0
  46. package/dist/internal/EntityPacked.d.ts.map +1 -1
  47. package/dist/internal/EntityPacked.js +5 -4
  48. package/dist/internal/EntityPacked.js.map +1 -1
  49. package/dist/internal/EntitySchemas.d.ts +239 -30
  50. package/dist/internal/EntitySchemas.d.ts.map +1 -1
  51. package/dist/internal/EntitySchemas.js +1600 -197
  52. package/dist/internal/EntitySchemas.js.map +1 -1
  53. package/dist/internal/EntityTypes.d.ts +114 -25
  54. package/dist/internal/EntityTypes.d.ts.map +1 -1
  55. package/dist/internal/FailingAsBefore.d.ts +25 -0
  56. package/dist/internal/FailingAsBefore.d.ts.map +1 -0
  57. package/dist/internal/FailingAsBefore.js +42 -0
  58. package/dist/internal/FailingAsBefore.js.map +1 -0
  59. package/dist/internal/InstanceReads.d.ts +40 -0
  60. package/dist/internal/InstanceReads.d.ts.map +1 -0
  61. package/dist/internal/InstanceReads.js +183 -0
  62. package/dist/internal/InstanceReads.js.map +1 -0
  63. package/dist/internal/KeyReadings.d.ts +30 -0
  64. package/dist/internal/KeyReadings.d.ts.map +1 -0
  65. package/dist/internal/KeyReadings.js +99 -0
  66. package/dist/internal/KeyReadings.js.map +1 -0
  67. package/dist/internal/KeyText136.d.ts +4 -2
  68. package/dist/internal/KeyText136.d.ts.map +1 -1
  69. package/dist/internal/KeyText136.js +46 -13
  70. package/dist/internal/KeyText136.js.map +1 -1
  71. package/dist/internal/LostValues.d.ts +50 -0
  72. package/dist/internal/LostValues.d.ts.map +1 -0
  73. package/dist/internal/LostValues.js +465 -0
  74. package/dist/internal/LostValues.js.map +1 -0
  75. package/dist/internal/NumericKey.d.ts +21 -2
  76. package/dist/internal/NumericKey.d.ts.map +1 -1
  77. package/dist/internal/NumericKey.js +19 -1
  78. package/dist/internal/NumericKey.js.map +1 -1
  79. package/dist/internal/ObjectKeyText.d.ts +29 -0
  80. package/dist/internal/ObjectKeyText.d.ts.map +1 -0
  81. package/dist/internal/ObjectKeyText.js +50 -0
  82. package/dist/internal/ObjectKeyText.js.map +1 -0
  83. package/dist/internal/OwnNames.d.ts +205 -0
  84. package/dist/internal/OwnNames.d.ts.map +1 -0
  85. package/dist/internal/OwnNames.js +415 -0
  86. package/dist/internal/OwnNames.js.map +1 -0
  87. package/dist/internal/PackedCodec.d.ts +7 -1
  88. package/dist/internal/PackedCodec.d.ts.map +1 -1
  89. package/dist/internal/PackedCodec.js +83 -21
  90. package/dist/internal/PackedCodec.js.map +1 -1
  91. package/dist/internal/RestoredKeyText.d.ts +10 -0
  92. package/dist/internal/RestoredKeyText.d.ts.map +1 -0
  93. package/dist/internal/RestoredKeyText.js +50 -0
  94. package/dist/internal/RestoredKeyText.js.map +1 -0
  95. package/dist/internal/SchemaAccessors.d.ts +280 -1
  96. package/dist/internal/SchemaAccessors.d.ts.map +1 -1
  97. package/dist/internal/SchemaAccessors.js +1717 -1
  98. package/dist/internal/SchemaAccessors.js.map +1 -1
  99. package/dist/internal/SchemaIssue.d.ts +21 -0
  100. package/dist/internal/SchemaIssue.d.ts.map +1 -0
  101. package/dist/internal/SchemaIssue.js +34 -0
  102. package/dist/internal/SchemaIssue.js.map +1 -0
  103. package/dist/internal/SharedKeyAttribute.d.ts +60 -6
  104. package/dist/internal/SharedKeyAttribute.d.ts.map +1 -1
  105. package/dist/internal/SharedKeyAttribute.js +129 -13
  106. package/dist/internal/SharedKeyAttribute.js.map +1 -1
  107. package/dist/internal/SparseKey.d.ts +46 -0
  108. package/dist/internal/SparseKey.d.ts.map +1 -0
  109. package/dist/internal/SparseKey.js +69 -0
  110. package/dist/internal/SparseKey.js.map +1 -0
  111. package/dist/internal/StoredForm.d.ts +139 -0
  112. package/dist/internal/StoredForm.d.ts.map +1 -0
  113. package/dist/internal/StoredForm.js +503 -0
  114. package/dist/internal/StoredForm.js.map +1 -0
  115. package/dist/internal/ZOrderCurve.d.ts.map +1 -1
  116. package/dist/internal/ZOrderCurve.js +2 -1
  117. package/dist/internal/ZOrderCurve.js.map +1 -1
  118. package/dist/internal/ZoneKeyText.d.ts +55 -0
  119. package/dist/internal/ZoneKeyText.d.ts.map +1 -0
  120. package/dist/internal/ZoneKeyText.js +264 -0
  121. package/dist/internal/ZoneKeyText.js.map +1 -0
  122. package/package.json +4 -4
@@ -0,0 +1,465 @@
1
+ /**
2
+ * @internal What DynamoDB doesn't store of a value at a position no schema types (`Schema.Unknown`,
3
+ * `Schema.Any`), the one decision for a native write and a packed one alike (`EDD-9161`).
4
+ *
5
+ * The marshaller stores an object as the map of its enumerable properties. A value whose meaning is
6
+ * somewhere else is stored as less than it is, and read back as that, with no error anywhere: a
7
+ * `Date` is an empty map and reads back as `{}`. Where a schema declares the field, its encoding
8
+ * stores the value; where none does, nothing can, so the write is refused before anything is sent.
9
+ * {@link lostAs} says what of one value is lost; {@link lostIn} looks through a value for the first
10
+ * such part, as the marshaller walks it. Packed storage asks {@link lostAs} at each part it
11
+ * serialises, so the two refuse the same values with the same words.
12
+ *
13
+ * What's lost: a `Date` (valid or not) and a `RegExp`, stored as an empty map; a `WeakMap`,
14
+ * `WeakSet`, `WeakRef`, `FinalizationRegistry` or `Promise`, whose content isn't in its properties;
15
+ * an `Error` holding a `message` or a `cause` that isn't one of its enumerable properties; Effect's
16
+ * `Redacted`, whose value is held outside it; a `Map` with a key that isn't a string, whose keys are
17
+ * stored as text; and binary data measured on 1.40.0 to be stored as less than it is or not sent: an
18
+ * `ArrayBuffer`, a `DataView` or a `Blob` is stored as empty bytes, a `SharedArrayBuffer` as an empty
19
+ * map, a subclass of any of them without its bytes, and the AWS SDK fails to send ten typed arrays
20
+ * (a `TypeError`), named one by one. Any other binary kind is stored as it was. A cookie's expiry is
21
+ * the exception to a `Date`: the marshaller writes it as ISO text.
22
+ * `undefined`, a function or a hole in a list isn't one: the list closes up, as it always has, and a
23
+ * caller can rely on that (a documented limit). Everything is read from descriptors, so no getter is
24
+ * called.
25
+ *
26
+ * What's behind a getter (an enumerable accessor the marshaller reads, or one at a list's index) is
27
+ * only known by calling it, and the marshaller calls it once. So {@link lostIn} doesn't: it marks
28
+ * the value, and each object on the way to the getter, and the marshaller reads a marked value
29
+ * through {@link readJudged}, which judges what each getter returns, as the marshaller calls it, by
30
+ * the same rules. A getter is called as often as it was before, and what it returns is judged where
31
+ * it's stored.
32
+ */
33
+ import { COOKIE_PROTO, expiryText } from "./StoredForm.js";
34
+ export const isLostAt = (value) => typeof value === "object" && value !== null && value._tag === "LostAt";
35
+ const REDACTED_MARKER = "~effect/Redacted";
36
+ const EMPTY_MAP = "it's written as an empty map, which reads back as {}";
37
+ /** Built-ins whose content lives in internal slots, none of it in a property. */
38
+ const SLOTTED = [
39
+ [WeakMap, "WeakMap"],
40
+ [WeakSet, "WeakSet"],
41
+ [Promise, "Promise"],
42
+ ...(typeof WeakRef === "function" ? [[WeakRef, "WeakRef"]] : []),
43
+ ...(typeof FinalizationRegistry === "function"
44
+ ? [[FinalizationRegistry, "FinalizationRegistry"]]
45
+ : []),
46
+ ];
47
+ /** Whether a value carries a marker on its prototype, as Effect's instance does (not a stored map). */
48
+ const inherits = (value, marker) => {
49
+ if (Object.hasOwn(value, marker))
50
+ return false;
51
+ for (let at = Object.getPrototypeOf(value); at !== null; at = Object.getPrototypeOf(at)) {
52
+ if (Object.hasOwn(at, marker))
53
+ return true;
54
+ }
55
+ return false;
56
+ };
57
+ /** A property's descriptor, own or inherited. */
58
+ const descriptorOf = (value, key) => {
59
+ for (let at = value; at !== null; at = Object.getPrototypeOf(at)) {
60
+ const descriptor = Object.getOwnPropertyDescriptor(at, key);
61
+ if (descriptor !== undefined)
62
+ return descriptor;
63
+ }
64
+ return undefined;
65
+ };
66
+ /** Whether an error holds something marshalling leaves out: a message or a cause it doesn't store. */
67
+ const errorHolds = (error) => {
68
+ for (const key of ["message", "cause"]) {
69
+ const descriptor = descriptorOf(error, key);
70
+ if (descriptor === undefined || descriptor.enumerable === true || !("value" in descriptor)) {
71
+ continue;
72
+ }
73
+ const held = descriptor.value;
74
+ if (key === "message" ? typeof held === "string" && held !== "" : held !== undefined)
75
+ return key;
76
+ }
77
+ return undefined;
78
+ };
79
+ /**
80
+ * Binary data whose bytes are held outside its properties: an instance of any of these, a subclass's
81
+ * included, is stored without them. Measured on 1.40.0: an `ArrayBuffer`, a `DataView` and a `Blob`
82
+ * (a `File` is one) were stored as empty bytes, a `SharedArrayBuffer` as an empty map, and a subclass
83
+ * of each as the map of its enumerable properties, which holds none of its bytes.
84
+ */
85
+ const HELD_BYTES = [
86
+ ArrayBuffer,
87
+ DataView,
88
+ ...(typeof SharedArrayBuffer === "function" ? [SharedArrayBuffer] : []),
89
+ ...(typeof Blob === "function" ? [Blob] : []),
90
+ ];
91
+ /**
92
+ * The typed arrays the AWS SDK fails to send (a `TypeError` while serialising), each by its own
93
+ * prototype: measured on 1.40.0, each failed the write with a `DynamoError`. Any other kind, a
94
+ * `Float16Array` and a subclass of one of these included, is stored as the map of its elements, which
95
+ * reads back as their numbers, as it was, and so is a kind a later runtime adds.
96
+ */
97
+ const UNSENT_ARRAYS = new Set([
98
+ Int8Array.prototype,
99
+ Uint8ClampedArray.prototype,
100
+ Int16Array.prototype,
101
+ Uint16Array.prototype,
102
+ Int32Array.prototype,
103
+ Uint32Array.prototype,
104
+ Float32Array.prototype,
105
+ Float64Array.prototype,
106
+ BigInt64Array.prototype,
107
+ BigUint64Array.prototype,
108
+ ]);
109
+ /** Whether DynamoDB is sent less of this binary value than it is, or fails to be sent it. */
110
+ const isLostBinary = (value) => {
111
+ if (ArrayBuffer.isView(value) && UNSENT_ARRAYS.has(Object.getPrototypeOf(value)))
112
+ return true;
113
+ for (const kind of HELD_BYTES)
114
+ if (value instanceof kind)
115
+ return true;
116
+ return false;
117
+ };
118
+ const binaryName = (value) => {
119
+ const kind = descriptorOf(value, "constructor")?.value;
120
+ const name = typeof kind === "function" ? kind.name : "";
121
+ return name === "" ? "binary data" : `binary data (${name})`;
122
+ };
123
+ /**
124
+ * What of this value, by itself, DynamoDB doesn't store, or `undefined`. Its parts are judged where
125
+ * they are ({@link lostIn}).
126
+ */
127
+ export const lostAs = (value) => {
128
+ if (value instanceof Date) {
129
+ return {
130
+ what: "a Date",
131
+ why: EMPTY_MAP,
132
+ use: "Declare the field, as Schema.Date or Schema.DateTimeUtc, or store its ISO text",
133
+ };
134
+ }
135
+ if (value instanceof RegExp) {
136
+ return { what: "a RegExp", why: EMPTY_MAP, use: "Store its source text" };
137
+ }
138
+ for (const [kind, name] of SLOTTED) {
139
+ if (value instanceof kind) {
140
+ return {
141
+ what: `a ${name}`,
142
+ why: `what it holds isn't in its properties, so ${EMPTY_MAP}`,
143
+ use: "Store what it holds instead",
144
+ };
145
+ }
146
+ }
147
+ if (value instanceof Error) {
148
+ const held = errorHolds(value);
149
+ if (held !== undefined) {
150
+ return {
151
+ what: `an Error with a ${held}`,
152
+ why: `its ${held} isn't one of its enumerable properties, which are all DynamoDB stores of it`,
153
+ use: "Store a struct of what you need of it, such as its message",
154
+ };
155
+ }
156
+ }
157
+ if (inherits(value, REDACTED_MARKER)) {
158
+ return {
159
+ what: "a Redacted",
160
+ why: "its value is held outside it, so only its marker is stored",
161
+ use: "Declare the field as Schema.Redacted, which stores the value",
162
+ };
163
+ }
164
+ if (value instanceof Map) {
165
+ for (const key of value.keys()) {
166
+ if (typeof key !== "string") {
167
+ return {
168
+ what: `a Map with a ${key === null ? "null" : typeof key} key`,
169
+ why: "a map's keys are stored as text, so the key reads back as a string",
170
+ use: "Give it string keys, or store a list of its entries",
171
+ };
172
+ }
173
+ }
174
+ }
175
+ if (isLostBinary(value)) {
176
+ return {
177
+ what: binaryName(value),
178
+ why: "only a Uint8Array is stored as its bytes, and a read hands back a Uint8Array",
179
+ use: "Store a Uint8Array of its bytes",
180
+ };
181
+ }
182
+ return undefined;
183
+ };
184
+ /**
185
+ * The enumerable data properties marshalling stores of an object, its prototypes' included, in the
186
+ * order it walks them: without a function or `undefined`, and without calling a getter. `getters`
187
+ * says whether it walks an enumerable accessor too, whose value only a call says.
188
+ */
189
+ const storedProperties = (value) => {
190
+ const properties = [];
191
+ const named = new Set();
192
+ let getters = false;
193
+ for (let at = value; at !== null; at = Object.getPrototypeOf(at)) {
194
+ const descriptors = Object.getOwnPropertyDescriptors(at);
195
+ for (const key of Object.keys(descriptors)) {
196
+ if (named.has(key))
197
+ continue;
198
+ named.add(key);
199
+ const descriptor = descriptors[key];
200
+ if (!descriptor.enumerable)
201
+ continue;
202
+ if (!("value" in descriptor)) {
203
+ getters = true;
204
+ continue;
205
+ }
206
+ const property = descriptor.value;
207
+ if (property !== undefined && typeof property !== "function")
208
+ properties.push([key, property]);
209
+ }
210
+ }
211
+ return { properties, getters };
212
+ };
213
+ /**
214
+ * The values {@link lostIn} looked through holding a part behind a getter, and each object on the
215
+ * way to it: what the getter returns is judged when the marshaller calls it ({@link readJudged}).
216
+ */
217
+ const behindGetters = new WeakSet();
218
+ /** Whether anything has been marked: until then, nothing is judged as it's read, and nothing looked for. */
219
+ let marking = false;
220
+ const mark = (value) => {
221
+ behindGetters.add(value);
222
+ marking = true;
223
+ };
224
+ /** Whether {@link lostIn} found a part of this value behind a getter, which it didn't call. */
225
+ export const holdsGetters = (value) => typeof value === "object" && value !== null && behindGetters.has(value);
226
+ const found = (lost, path) => ({
227
+ _tag: "LostAt",
228
+ ...lost,
229
+ path,
230
+ });
231
+ /**
232
+ * The first lost part of a value, or whether it holds a part behind a getter (marking it, and each
233
+ * object on the way, in {@link behindGetters}).
234
+ */
235
+ const walk = (value, path, open) => {
236
+ if (typeof value !== "object" || value === null || open.has(value))
237
+ return false;
238
+ const lost = lostAs(value);
239
+ if (lost !== undefined)
240
+ return found(lost, path);
241
+ // A set holds strings, numbers or bytes, or marshalling refuses it; bytes are stored whole.
242
+ if (value instanceof Set || value instanceof Uint8Array)
243
+ return false;
244
+ open.add(value);
245
+ try {
246
+ let getters = false;
247
+ const inside = (part, at) => {
248
+ const walked = walk(part, at, open);
249
+ if (walked === true)
250
+ getters = true;
251
+ return typeof walked === "boolean" ? undefined : walked;
252
+ };
253
+ if (Array.isArray(value)) {
254
+ for (let index = 0; index < value.length; index++) {
255
+ const descriptor = Object.getOwnPropertyDescriptor(value, index);
256
+ if (descriptor === undefined)
257
+ continue;
258
+ if (!("value" in descriptor)) {
259
+ getters = true;
260
+ continue;
261
+ }
262
+ const lostInside = inside(descriptor.value, [...path, index]);
263
+ if (lostInside !== undefined)
264
+ return lostInside;
265
+ }
266
+ }
267
+ else if (value instanceof Map) {
268
+ for (const [key, entry] of value) {
269
+ const lostInside = inside(entry, [...path, String(key)]);
270
+ if (lostInside !== undefined)
271
+ return lostInside;
272
+ }
273
+ }
274
+ else {
275
+ // One of Effect's cookies: the marshaller writes its expiry as ISO text.
276
+ const cookie = Object.getPrototypeOf(value) === COOKIE_PROTO;
277
+ const stored = storedProperties(value);
278
+ if (stored.getters)
279
+ getters = true;
280
+ for (const [key, property] of stored.properties) {
281
+ if (cookie && key === "options" && typeof property === "object" && property !== null) {
282
+ const options = walkOptions(property, [...path, key], open);
283
+ if (options === true)
284
+ getters = true;
285
+ if (typeof options !== "boolean")
286
+ return options;
287
+ continue;
288
+ }
289
+ const lostInside = inside(property, [...path, key]);
290
+ if (lostInside !== undefined)
291
+ return lostInside;
292
+ }
293
+ }
294
+ if (getters)
295
+ mark(value);
296
+ return getters;
297
+ }
298
+ finally {
299
+ open.delete(value);
300
+ }
301
+ };
302
+ /** A cookie's options: an expiry the marshaller writes as text is stored. */
303
+ const walkOptions = (options, path, open) => {
304
+ if (open.has(options))
305
+ return false;
306
+ open.add(options);
307
+ try {
308
+ const stored = storedProperties(options);
309
+ let getters = stored.getters;
310
+ for (const [key, property] of stored.properties) {
311
+ if (key === "expires" && expiryText(property) !== undefined)
312
+ continue;
313
+ const walked = walk(property, [...path, key], open);
314
+ if (walked === true)
315
+ getters = true;
316
+ else if (walked !== false)
317
+ return walked;
318
+ }
319
+ if (getters)
320
+ mark(options);
321
+ return getters;
322
+ }
323
+ finally {
324
+ open.delete(options);
325
+ }
326
+ };
327
+ /**
328
+ * The first part of a value, depth first as the marshaller walks it, that DynamoDB doesn't store
329
+ * ({@link lostAs}), with its path; `undefined` when it stores all of it. A
330
+ * cycle isn't followed: the marshaller refuses one itself (`EDD-9124`). A part behind a getter isn't
331
+ * called for: the value is marked, and judged as the marshaller reads it ({@link readJudged}).
332
+ */
333
+ export const lostIn = (value) => {
334
+ const walked = walk(value, [], new Set());
335
+ return typeof walked === "boolean" ? undefined : walked;
336
+ };
337
+ const INDEX = /^(?:0|[1-9][0-9]*)$/;
338
+ /**
339
+ * The parts of `value` that are marked ({@link holdsGetters}) or hold one that is, the value's own
340
+ * included, read from descriptors: a value the library built around a marked one (a copy of the
341
+ * struct holding it, say) leads to it. A marked part isn't looked into: what's behind a getter in it
342
+ * is marked in turn.
343
+ */
344
+ const holdersIn = (value, holders, seen) => {
345
+ if (typeof value !== "object" || value === null)
346
+ return false;
347
+ if (behindGetters.has(value)) {
348
+ holders.add(value);
349
+ return true;
350
+ }
351
+ if (seen.has(value))
352
+ return holders.has(value);
353
+ seen.add(value);
354
+ if (value instanceof Set || value instanceof ArrayBuffer || ArrayBuffer.isView(value))
355
+ return false;
356
+ let holds = false;
357
+ const parts = value instanceof Map
358
+ ? Map.prototype.values.call(value)
359
+ : Array.isArray(value)
360
+ ? Object.values(Object.getOwnPropertyDescriptors(value)).flatMap((descriptor) => "value" in descriptor ? [descriptor.value] : [])
361
+ : storedProperties(value).properties.map(([, property]) => property);
362
+ for (const part of parts)
363
+ if (holdersIn(part, holders, seen))
364
+ holds = true;
365
+ if (holds)
366
+ holders.add(value);
367
+ return holds;
368
+ };
369
+ /**
370
+ * Whether a value is or holds a part {@link lostIn} marked ({@link holdsGetters}), read from
371
+ * descriptors: one whose getters the marshaller calls through {@link readJudged}.
372
+ */
373
+ export const holdsMarked = (value) => marking && holdersIn(value, new Set(), new Set());
374
+ /**
375
+ * The value as the marshaller is to read it. Where it holds a part {@link lostIn} marked
376
+ * ({@link holdsGetters}), a view whose getters, each called as the marshaller calls it and once for
377
+ * each time it does, have what they return judged by {@link lostIn} where it's stored. A lost part
378
+ * calls `refuse` with where it is, from `path`; any other is handed on, viewed in turn where it's
379
+ * marked. Any other value is itself, and until anything has been marked nothing is looked for.
380
+ *
381
+ * The view forwards every read to the value, so the marshaller takes the branch it always took and
382
+ * stores what it always stored: the same prototype, the same keys in the same order, the same
383
+ * values. Only a part that is or holds a marked one is a view; the rest is the value's own. A view's
384
+ * target is a stand-in (an empty list for a list), so a frozen value can be viewed: a proxy can only
385
+ * report another value of a property its own target lets it.
386
+ */
387
+ export const readJudged = (value, path, refuse) => {
388
+ if (!marking || typeof value !== "object" || value === null)
389
+ return value;
390
+ const holders = new Set();
391
+ return holdersIn(value, holders, new Set())
392
+ ? viewOf(value, path, refuse, holders, new Map())
393
+ : value;
394
+ };
395
+ const viewOf = (real, path, refuse, holders, views) => {
396
+ const had = views.get(real);
397
+ if (had !== undefined)
398
+ return had;
399
+ const list = Array.isArray(real);
400
+ const map = real instanceof Map;
401
+ const part = (value, at) => holdsGetters(value) || (typeof value === "object" && value !== null && holders.has(value))
402
+ ? viewOf(value, at, refuse, holders, views)
403
+ : value;
404
+ const stand = list ? new Array(real.length) : {};
405
+ const view = new Proxy(stand, {
406
+ get: (_, key) => {
407
+ if (map && (key === Symbol.iterator || key === "entries")) {
408
+ return function* () {
409
+ for (const [entryKey, entry] of Map.prototype.entries.call(real)) {
410
+ yield [entryKey, part(entry, [...path, String(entryKey)])];
411
+ }
412
+ };
413
+ }
414
+ if (typeof key !== "string")
415
+ return Reflect.get(real, key);
416
+ const segment = list && INDEX.test(key) ? Number(key) : key;
417
+ const descriptor = descriptorOf(real, key);
418
+ if (descriptor !== undefined &&
419
+ !("value" in descriptor) &&
420
+ (descriptor.enumerable === true || typeof segment === "number")) {
421
+ // What the marshaller reads here: called once, as it calls it, and judged where `lostIn`
422
+ // marked it; a getter of a value built around a marked one is only called.
423
+ const read = Reflect.get(real, key);
424
+ if (!behindGetters.has(real))
425
+ return part(read, [...path, segment]);
426
+ const lost = lostIn(read);
427
+ if (lost !== undefined)
428
+ return refuse({ ...lost, path: [...path, segment, ...lost.path] });
429
+ return part(read, [...path, segment]);
430
+ }
431
+ const property = Reflect.get(real, key);
432
+ // A map's own methods run on the map itself; its constructor is handed on as it is.
433
+ if (map && key !== "constructor" && typeof property === "function") {
434
+ return property.bind(real);
435
+ }
436
+ return part(property, [...path, segment]);
437
+ },
438
+ has: (_, key) => Reflect.has(real, key),
439
+ ownKeys: () => Reflect.ownKeys(real),
440
+ getOwnPropertyDescriptor: (_, key) => {
441
+ const descriptor = Reflect.getOwnPropertyDescriptor(real, key);
442
+ if (descriptor === undefined)
443
+ return undefined;
444
+ // A list's length is its stand-in's, as long as it, and the rest reported as configurable,
445
+ // as a property of an extensible target that hasn't got it can be.
446
+ if (list && key === "length")
447
+ return Reflect.getOwnPropertyDescriptor(stand, key);
448
+ return { ...descriptor, configurable: true };
449
+ },
450
+ getPrototypeOf: () => Reflect.getPrototypeOf(real),
451
+ });
452
+ views.set(real, view);
453
+ return view;
454
+ };
455
+ const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
456
+ /** A path into a value from `root`, as a refusal names it: `f.a[0]["b c"]`. */
457
+ export const lostPath = (root, path) => path.reduce((at, segment) => typeof segment === "number"
458
+ ? `${at}[${segment}]`
459
+ : IDENTIFIER.test(segment)
460
+ ? `${at}.${segment}`
461
+ : `${at}[${JSON.stringify(segment)}]`, root);
462
+ /** The refusal in words: the value at `at` is lost (`EDD-9161`). */
463
+ export const lostRefusal = (at, lost) => `the value at ${at} is ${lost.what}, which DynamoDB doesn't store: ${lost.why}. Nothing was ` +
464
+ `written. ${lost.use}. [EDD-9161]`;
465
+ //# sourceMappingURL=LostValues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LostValues.js","sourceRoot":"","sources":["../../src/internal/LostValues.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAe1D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAmB,EAAE,CAC1D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAK,KAA4B,CAAC,IAAI,KAAK,QAAQ,CAAA;AAEhG,MAAM,eAAe,GAAG,kBAAkB,CAAA;AAE1C,MAAM,SAAS,GAAG,sDAAsD,CAAA;AAExE,iFAAiF;AACjF,MAAM,OAAO,GAA+C;IAC1D,CAAC,OAAO,EAAE,SAAS,CAAC;IACpB,CAAC,OAAO,EAAE,SAAS,CAAC;IACpB,CAAC,OAAO,EAAE,SAAS,CAAC;IACpB,GAAG,CAAC,OAAO,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACzE,GAAG,CAAC,OAAO,oBAAoB,KAAK,UAAU;QAC5C,CAAC,CAAC,CAAC,CAAC,oBAAoB,EAAE,sBAAsB,CAAU,CAAC;QAC3D,CAAC,CAAC,EAAE,CAAC;CACR,CAAA;AAED,uGAAuG;AACvG,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,MAAc,EAAW,EAAE;IAC1D,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC;QAAE,OAAO,KAAK,CAAA;IAC9C,KAAK,IAAI,EAAE,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,IAAI,EAAE,EAAE,GAAG,MAAM,CAAC,cAAc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AAE,CAC5D,gBAAgB,EAAE,OAAO,IAAI,CAAC,IAAI,mCAAmC,IAAI,CAAC,GAAG,gBAAgB;IAC7F,YAAY,IAAI,CAAC,GAAG,cAAc,CAAA"}
@@ -46,12 +46,16 @@ declare const KeyValueError_base: new <A extends Record<string, any> = {}>(args:
46
46
  /**
47
47
  * A value key composition can't place in sort order: `NaN`, or a bigint of
48
48
  * more than 1,000 digits. Thrown synchronously by `serializeValue`; the write
49
- * paths turn it into a `ValidationError`.
49
+ * paths turn it into a `ValidationError`. A composite's number its declared
50
+ * kind can't hold exactly is refused as one too (`CompositeCodec.refuseInexact`).
50
51
  */
51
52
  export declare class KeyValueError extends KeyValueError_base<{
52
53
  readonly value: unknown;
53
54
  readonly reason: string;
54
- /** Human-readable description, prefixed with `EDD-9096`. */
55
+ /**
56
+ * Human-readable description, prefixed with its code: `EDD-9096`, or `EDD-9050`
57
+ * for a number its composite's kind can't hold exactly.
58
+ */
55
59
  readonly message: string;
56
60
  }> {
57
61
  }
@@ -60,6 +64,21 @@ export declare class KeyValueError extends KeyValueError_base<{
60
64
  * this package (a consumer's and `effect-dynamodb`'s) still agree.
61
65
  */
62
66
  export declare const isKeyValueError: (u: unknown) => u is KeyValueError;
67
+ declare const StoredNaNTypeId: unique symbol;
68
+ /**
69
+ * The `NaN` of a number its field stores as a string, in key form. `Schema.NumberFromString`
70
+ * stores `"NaN"`, so a row can hold it: with `escapeKeys` off it composes the text 1.36 gave it
71
+ * (`0000000000000NaN`), as up to 1.39.0, where such a row was written, read, updated and deleted.
72
+ * A `number`'s own `NaN` has no stored form, so no row holds it and it has no key text under
73
+ * either setting. Only the field can tell the two apart, so the composite key form
74
+ * (`CompositeCodec`) hands the first on as this value and the composers compose it by the
75
+ * schema's setting. It is `NaN` to arithmetic and comparison.
76
+ */
77
+ export declare const STORED_NAN: {
78
+ readonly [StoredNaNTypeId]: true;
79
+ };
80
+ /** Is `u` {@link STORED_NAN}? By its id, so two copies of this package still agree. */
81
+ export declare const isStoredNaN: (u: unknown) => boolean;
63
82
  /**
64
83
  * The `number` {@link encodeNumber} composed `text` from, for `rekey`, which reads a value back out
65
84
  * of a row holding only its key. `NaN` when `text` is no such text; a caller checks by composing
@@ -1 +1 @@
1
- {"version":3,"file":"NumericKey.d.ts","sourceRoot":"","sources":["../../src/internal/NumericKey.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;;;;AAIH;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,mBAAkC;IACnE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,CAAC;CAAG;AAEL;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,aACV,CAAA;AAqExC;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,MAS3C,CAAA;AAED,mGAAmG;AACnG,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,MAAM,GAAG,SAYpD,CAAA;AAED,yFAAyF;AACzF,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,KAAG,MAQxC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,KAAG,MAQxC,CAAA"}
1
+ {"version":3,"file":"NumericKey.d.ts","sourceRoot":"","sources":["../../src/internal/NumericKey.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;;;;AAIH;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,mBAAkC;IACnE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,CAAC;CAAG;AAEL;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,aACV,CAAA;AAExC,QAAA,MAAM,eAAe,EAAE,OAAO,MAAwD,CAAA;AAEtF;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE;IAAE,QAAQ,CAAC,CAAC,eAAe,CAAC,EAAE,IAAI,CAAA;CAIzD,CAAA;AAEF,uFAAuF;AACvF,eAAO,MAAM,WAAW,GAAI,GAAG,OAAO,KAAG,OAAoD,CAAA;AAqE7F;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,MAS3C,CAAA;AAED,mGAAmG;AACnG,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,KAAG,MAAM,GAAG,SAYpD,CAAA;AAED,yFAAyF;AACzF,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,KAAG,MAQxC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,KAAG,MAQxC,CAAA"}
@@ -44,7 +44,8 @@ import { Data, Predicate } from "effect";
44
44
  /**
45
45
  * A value key composition can't place in sort order: `NaN`, or a bigint of
46
46
  * more than 1,000 digits. Thrown synchronously by `serializeValue`; the write
47
- * paths turn it into a `ValidationError`.
47
+ * paths turn it into a `ValidationError`. A composite's number its declared
48
+ * kind can't hold exactly is refused as one too (`CompositeCodec.refuseInexact`).
48
49
  */
49
50
  export class KeyValueError extends Data.TaggedError("KeyValueError") {
50
51
  }
@@ -53,6 +54,23 @@ export class KeyValueError extends Data.TaggedError("KeyValueError") {
53
54
  * this package (a consumer's and `effect-dynamodb`'s) still agree.
54
55
  */
55
56
  export const isKeyValueError = (u) => Predicate.isTagged(u, "KeyValueError");
57
+ const StoredNaNTypeId = Symbol.for("@effect-dynamodb/schema/StoredNaN");
58
+ /**
59
+ * The `NaN` of a number its field stores as a string, in key form. `Schema.NumberFromString`
60
+ * stores `"NaN"`, so a row can hold it: with `escapeKeys` off it composes the text 1.36 gave it
61
+ * (`0000000000000NaN`), as up to 1.39.0, where such a row was written, read, updated and deleted.
62
+ * A `number`'s own `NaN` has no stored form, so no row holds it and it has no key text under
63
+ * either setting. Only the field can tell the two apart, so the composite key form
64
+ * (`CompositeCodec`) hands the first on as this value and the composers compose it by the
65
+ * schema's setting. It is `NaN` to arithmetic and comparison.
66
+ */
67
+ export const STORED_NAN = Object.freeze({
68
+ [StoredNaNTypeId]: true,
69
+ valueOf: () => Number.NaN,
70
+ toString: () => "NaN",
71
+ });
72
+ /** Is `u` {@link STORED_NAN}? By its id, so two copies of this package still agree. */
73
+ export const isStoredNaN = (u) => Predicate.hasProperty(u, StoredNaNTypeId);
56
74
  const refuse = (value, shown, reason) => {
57
75
  throw new KeyValueError({
58
76
  value,
@@ -1 +1 @@
1
- {"version":3,"file":"NumericKey.js","sourceRoot":"","sources":["../../src/internal/NumericKey.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAExC;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,IAAI,CAAC,WAAW,CAAC,eAAe,CAKjE;CAAG;AAEL;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAU,EAAsB,EAAE,CAChE,SAAS,CAAC,QAAQ,CAAC,CAAC,EAAE,eAAe,CAAC,CAAA;AAExC,MAAM,MAAM,GAAG,CAAC,KAAc,EAAE,KAAa,EAAE,MAAc,EAAS,EAAE;IACtE,MAAM,IAAI,aAAa,CAAC;QACtB,KAAK;QACL,MAAM;QACN,OAAO,EACL,cAAc,KAAK,kCAAkC,MAAM,IAAI;YAC/D,6EAA6E;KAChF,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,kGAAkG;AAClG,MAAM,YAAY,GAAG,EAAE,CAAA;AACvB,kFAA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G,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAA;IACxC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,GAAG,YAAY,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,MAAM,eAAe,EAAE,6CAA6C,CAAC,CAAA;IACjG,CAAC;IACD,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;IACxE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AACrC,CAAC,CAAA"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @internal An object composed into a key (#242, `EDD-9162`): every object nothing gives other text
3
+ * to composes `[object Object]`, so rows written with different values would share one key.
4
+ *
5
+ * Not part of the public API.
6
+ */
7
+ import type * as DynamoSchema from "../DynamoSchema.js";
8
+ /**
9
+ * The key text a composite's key-form value composes when it's an object nothing gives other text
10
+ * to, `[object Object]` (or another `[object …]` tag), which every such value composes alike, so rows
11
+ * written with different values would share one key (#242, `EDD-9162`). `undefined` for any other
12
+ * value: text, a number, a date, a look-alike the key form makes an instance of, a class with a
13
+ * `toString` of its own. `text` is the text the value composed.
14
+ */
15
+ export declare const defaultObjectText: (value: unknown, text: string) => string | undefined;
16
+ /**
17
+ * The refusal of an object composed into a key for a write (`EDD-9162`): `what` names the field and
18
+ * what composes it, and `text` is the text it composed.
19
+ */
20
+ export declare const objectKeyRefusal: (what: string, text: string) => string;
21
+ /**
22
+ * The one decision, made where a key composer composes `value`'s `text` (`site` says where): under a
23
+ * write's own schema (`objectKeys`), a value composing default object text there throws the refusal,
24
+ * a value key composition can't place (`KeyValueError`), which every write path turns into a
25
+ * `ValidationError` with nothing sent. A key the write doesn't compose never reaches this, so it
26
+ * refuses nothing.
27
+ */
28
+ export declare const judgeObjectKeyText: (schema: DynamoSchema.DynamoSchema, value: unknown, text: string, site: () => DynamoSchema.ObjectKeySite) => void;
29
+ //# sourceMappingURL=ObjectKeyText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ObjectKeyText.d.ts","sourceRoot":"","sources":["../../src/internal/ObjectKeyText.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,YAAY,MAAM,oBAAoB,CAAA;AAGvD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,OAAO,EAAE,MAAM,MAAM,KAAG,MAAM,GAAG,SAG3D,CAAA;AAEf;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,KAAG,MAKtB,CAAA;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,YAAY,CAAC,YAAY,EACjC,OAAO,OAAO,EACd,MAAM,MAAM,EACZ,MAAM,MAAM,YAAY,CAAC,aAAa,KACrC,IAYF,CAAA"}