unikvs 0.0.10 → 0.0.12

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 (59) hide show
  1. package/README.md +3 -0
  2. package/dist/src/_merge-variables.d.ts +13 -0
  3. package/dist/src/_merge-variables.d.ts.map +1 -0
  4. package/dist/src/_merge-variables.js +12 -0
  5. package/dist/src/_storage.d.ts +11 -11
  6. package/dist/src/_storage.d.ts.map +1 -1
  7. package/dist/src/_storage.js +31 -22
  8. package/dist/src/_streams.d.ts +20 -0
  9. package/dist/src/_streams.d.ts.map +1 -0
  10. package/dist/src/_streams.js +36 -0
  11. package/dist/src/_transformer.d.ts +7 -7
  12. package/dist/src/_transformer.d.ts.map +1 -1
  13. package/dist/src/_transformer.js +12 -12
  14. package/dist/src/_valibot.d.ts +2 -2
  15. package/dist/src/_valibot.d.ts.map +1 -1
  16. package/dist/src/_valibot.js +1 -1
  17. package/dist/src/_value-schemas.d.ts +179 -0
  18. package/dist/src/_value-schemas.d.ts.map +1 -0
  19. package/dist/src/_value-schemas.js +150 -0
  20. package/dist/src/errors.d.ts +60 -94
  21. package/dist/src/errors.d.ts.map +1 -1
  22. package/dist/src/errors.js +15 -31
  23. package/dist/src/index.d.ts +3 -3
  24. package/dist/src/index.d.ts.map +1 -1
  25. package/dist/src/index.js +2 -2
  26. package/dist/src/unikvs-config.d.ts +58 -139
  27. package/dist/src/unikvs-config.d.ts.map +1 -1
  28. package/dist/src/unikvs-config.js +42 -47
  29. package/dist/src/unikvs.d.ts +84 -166
  30. package/dist/src/unikvs.d.ts.map +1 -1
  31. package/dist/src/unikvs.js +230 -169
  32. package/dist/src/utils.types.d.ts +1 -3
  33. package/dist/src/utils.types.d.ts.map +1 -1
  34. package/dist/src/value-stream.types.d.ts +2 -8
  35. package/dist/src/value-stream.types.d.ts.map +1 -1
  36. package/dist/src/variables.types.d.ts +11 -0
  37. package/dist/src/variables.types.d.ts.map +1 -0
  38. package/package.json +17 -16
  39. package/src/_merge-variables.ts +19 -0
  40. package/src/_storage.ts +47 -24
  41. package/src/_streams.ts +47 -0
  42. package/src/_transformer.ts +13 -13
  43. package/src/_valibot.ts +4 -1
  44. package/src/_value-schemas.ts +362 -0
  45. package/src/errors.ts +60 -109
  46. package/src/index.ts +2 -3
  47. package/src/unikvs-config.ts +143 -168
  48. package/src/unikvs.ts +359 -290
  49. package/src/utils.types.ts +1 -3
  50. package/src/value-stream.types.ts +2 -8
  51. package/src/variables.types.ts +13 -0
  52. package/dist/src/_merge-context.d.ts +0 -13
  53. package/dist/src/_merge-context.d.ts.map +0 -1
  54. package/dist/src/_merge-context.js +0 -12
  55. package/dist/src/context.types.d.ts +0 -17
  56. package/dist/src/context.types.d.ts.map +0 -1
  57. package/src/_merge-context.ts +0 -19
  58. package/src/context.types.ts +0 -19
  59. /package/dist/src/{context.types.js → variables.types.js} +0 -0
package/src/errors.ts CHANGED
@@ -14,9 +14,7 @@ import type { BaseIssue } from "valibot";
14
14
  // -------------------------------------------------------------------------------------------------
15
15
 
16
16
  /**
17
- * 無効な入出力を表すエラーの基底クラスです。
18
- *
19
- * @template TMeta エラーのメタデータの型です。
17
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
20
18
  */
21
19
  export class InvalidUsageErrorBase<
22
20
  TMeta extends ErrorMeta | undefined = ErrorMeta | undefined,
@@ -25,44 +23,42 @@ export class InvalidUsageErrorBase<
25
23
  // -------------------------------------------------------------------------------------------------
26
24
 
27
25
  /**
28
- * バリデーションの問題を表す valibot のイシューです。
26
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
29
27
  */
30
28
  export type Issue = BaseIssue<unknown>;
31
29
 
32
30
  /**
33
- * InvalidInputError に付与されるメタデータです。
31
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
34
32
  */
35
33
  export type InvalidInputErrorMeta = {
36
34
  /**
37
- * 検証に失敗した入力値です。
35
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
38
36
  */
39
37
  readonly input: unknown;
40
38
 
41
39
  /**
42
- * 検証で検出されたイシューのリストです。
40
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
43
41
  */
44
42
  readonly issues: readonly [Issue, ...Issue[]];
45
43
  };
46
44
 
47
45
  /**
48
- * InvalidInputError のコンストラクター引数です。
49
- *
50
- * エラーの追加情報 (`cause`) も含みます。
46
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
51
47
  */
52
48
  export type InvalidInputErrorArgs = ErrorOptions & {
53
49
  /**
54
- * 検証の対象となった値です。
50
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
55
51
  */
56
52
  readonly value: unknown;
57
53
 
58
54
  /**
59
- * 検証で検出されたイシューのリストです。
55
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
60
56
  */
61
57
  readonly issues: readonly [Issue, ...Issue[]];
62
58
  };
63
59
 
64
60
  /**
65
- * 入力値が期待するスキーマに適合しない場合に投げられるエラーです。
61
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
66
62
  */
67
63
  export class InvalidInputError extends InvalidUsageErrorBase<InvalidInputErrorMeta> {
68
64
  static {
@@ -79,39 +75,37 @@ export class InvalidInputError extends InvalidUsageErrorBase<InvalidInputErrorMe
79
75
  // -------------------------------------------------------------------------------------------------
80
76
 
81
77
  /**
82
- * InvalidOutputError に付与されるメタデータです。
78
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
83
79
  */
84
80
  export type InvalidOutputErrorMeta = {
85
81
  /**
86
- * 検証に失敗した出力値です。
82
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
87
83
  */
88
84
  readonly output: unknown;
89
85
 
90
86
  /**
91
- * 検証で検出されたイシューのリストです。
87
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
92
88
  */
93
89
  readonly issues: readonly [Issue, ...Issue[]];
94
90
  };
95
91
 
96
92
  /**
97
- * InvalidOutputError のコンストラクター引数です。
98
- *
99
- * エラーの追加情報 (`cause`) も含みます。
93
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
100
94
  */
101
95
  export type InvalidOutputErrorArgs = ErrorOptions & {
102
96
  /**
103
- * 検証の対象となった値です。
97
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
104
98
  */
105
99
  readonly value: unknown;
106
100
 
107
101
  /**
108
- * 検証で検出されたイシューのリストです。
102
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
109
103
  */
110
104
  readonly issues: readonly [Issue, ...Issue[]];
111
105
  };
112
106
 
113
107
  /**
114
- * 出力値が期待するスキーマに適合しない場合に投げられるエラーです。
108
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
115
109
  */
116
110
  export class InvalidOutputError extends InvalidUsageErrorBase<InvalidOutputErrorMeta> {
117
111
  static {
@@ -132,7 +126,7 @@ export class InvalidOutputError extends InvalidUsageErrorBase<InvalidOutputError
132
126
  // -------------------------------------------------------------------------------------------------
133
127
 
134
128
  /**
135
- * すでに開いている UniKvs に対して再度オープン操作が行われた場合に投げられるエラーです。
129
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
136
130
  */
137
131
  export class UniKvsIsOpenError extends ErrorBase<undefined> {
138
132
  static {
@@ -147,7 +141,7 @@ export class UniKvsIsOpenError extends ErrorBase<undefined> {
147
141
  setErrorMessage(UniKvsIsOpenError, "UniKvs は開いています", "ja");
148
142
 
149
143
  /**
150
- * UniKvs が開かれていない状態で操作が行われた場合に投げられるエラーです。
144
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
151
145
  */
152
146
  export class UniKvsIsNotOpenError extends ErrorBase<undefined> {
153
147
  static {
@@ -162,24 +156,22 @@ export class UniKvsIsNotOpenError extends ErrorBase<undefined> {
162
156
  setErrorMessage(UniKvsIsNotOpenError, "UniKvs は開いていません", "ja");
163
157
 
164
158
  /**
165
- * KeyNotFoundError に付与されるメタデータです。
159
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
166
160
  */
167
161
  export type KeyNotFoundErrorMeta = {
168
162
  /**
169
- * 見つからなかったキーです。
163
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
170
164
  */
171
165
  readonly key: IStorage.Key;
172
166
  };
173
167
 
174
168
  /**
175
- * KeyNotFoundError のコンストラクター引数です。
176
- *
177
- * エラーの追加情報 (`cause`) も含みます。
169
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
178
170
  */
179
171
  export type KeyNotFoundErrorArgs = ErrorOptions & KeyNotFoundErrorMeta;
180
172
 
181
173
  /**
182
- * 指定したキーのデータがどのストレージにも存在しない場合に投げられるエラーです。
174
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
183
175
  */
184
176
  export class KeyNotFoundError extends ErrorBase<KeyNotFoundErrorMeta> {
185
177
  static {
@@ -224,24 +216,22 @@ setErrorMessage(
224
216
  // setErrorMessage(StorageIsOpenError, ({ name }) => `ストレージ "${name}" は開いています`, "ja");
225
217
 
226
218
  /**
227
- * StorageIsNotOpenError に付与されるメタデータです。
219
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
228
220
  */
229
221
  export type StorageIsNotOpenErrorMeta = {
230
222
  /**
231
- * 開かれていないストレージの名前です。
223
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
232
224
  */
233
225
  readonly name: string;
234
226
  };
235
227
 
236
228
  /**
237
- * StorageIsNotOpenError のコンストラクター引数です。
238
- *
239
- * エラーの追加情報 (`cause`) も含みます。
229
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
240
230
  */
241
231
  export type StorageIsNotOpenErrorArgs = ErrorOptions & StorageIsNotOpenErrorMeta;
242
232
 
243
233
  /**
244
- * ストレージが開かれていない状態で操作が行われた場合に投げられるエラーです。
234
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
245
235
  */
246
236
  export class StorageIsNotOpenError extends ErrorBase<StorageIsNotOpenErrorMeta> {
247
237
  static {
@@ -258,25 +248,23 @@ export class StorageIsNotOpenError extends ErrorBase<StorageIsNotOpenErrorMeta>
258
248
  setErrorMessage(StorageIsNotOpenError, ({ name }) => `ストレージ "${name}" は開いていません`, "ja");
259
249
 
260
250
  /**
261
- * WritableStreamNotSupportedError に付与されるメタデータです。
251
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
262
252
  */
263
253
  export type WritableStreamNotSupportedErrorMeta = {
264
254
  /**
265
- * 対象のストレージの名前です。
255
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
266
256
  */
267
257
  readonly name: string;
268
258
  };
269
259
 
270
260
  /**
271
- * WritableStreamNotSupportedError のコンストラクター引数です。
272
- *
273
- * エラーの追加情報 (`cause`) も含みます。
261
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
274
262
  */
275
263
  export type WritableStreamNotSupportedErrorArgs = ErrorOptions &
276
264
  WritableStreamNotSupportedErrorMeta;
277
265
 
278
266
  /**
279
- * ストレージが書き込み可能なストリームをサポートしていない場合に投げられるエラーです。
267
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
280
268
  */
281
269
  export class WritableStreamNotSupportedError extends ErrorBase<WritableStreamNotSupportedErrorMeta> {
282
270
  static {
@@ -297,25 +285,23 @@ setErrorMessage(
297
285
  );
298
286
 
299
287
  /**
300
- * ReadableStreamNotSupportedError に付与されるメタデータです。
288
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
301
289
  */
302
290
  export type ReadableStreamNotSupportedErrorMeta = {
303
291
  /**
304
- * 対象のストレージの名前です。
292
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
305
293
  */
306
294
  readonly name: string;
307
295
  };
308
296
 
309
297
  /**
310
- * ReadableStreamNotSupportedError のコンストラクター引数です。
311
- *
312
- * エラーの追加情報 (`cause`) も含みます。
298
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
313
299
  */
314
300
  export type ReadableStreamNotSupportedErrorArgs = ErrorOptions &
315
301
  ReadableStreamNotSupportedErrorMeta;
316
302
 
317
303
  /**
318
- * ストレージが読み取り可能なストリームをサポートしていない場合に投げられるエラーです。
304
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
319
305
  */
320
306
  export class ReadableStreamNotSupportedError extends ErrorBase<ReadableStreamNotSupportedErrorMeta> {
321
307
  static {
@@ -399,24 +385,22 @@ setErrorMessage(
399
385
  // setErrorMessage(TransformerIsOpenError, ({ name }) => `トランスフォーマー "${name}" は開いています`, "ja");
400
386
 
401
387
  /**
402
- * TransformerIsNotOpenError に付与されるメタデータです。
388
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
403
389
  */
404
390
  export type TransformerIsNotOpenErrorMeta = {
405
391
  /**
406
- * 開かれていないトランスフォーマーの名前です。
392
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
407
393
  */
408
394
  readonly name: string;
409
395
  };
410
396
 
411
397
  /**
412
- * TransformerIsNotOpenError のコンストラクター引数です。
413
- *
414
- * エラーの追加情報 (`cause`) も含みます。
398
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
415
399
  */
416
400
  export type TransformerIsNotOpenErrorArgs = ErrorOptions & TransformerIsNotOpenErrorMeta;
417
401
 
418
402
  /**
419
- * トランスフォーマーが開かれていない状態で操作が行われた場合に投げられるエラーです。
403
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
420
404
  */
421
405
  export class TransformerIsNotOpenError extends ErrorBase<TransformerIsNotOpenErrorMeta> {
422
406
  static {
@@ -437,25 +421,23 @@ setErrorMessage(
437
421
  );
438
422
 
439
423
  /**
440
- * EncodableStreamNotSupportedError に付与されるメタデータです。
424
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
441
425
  */
442
426
  export type EncodableStreamNotSupportedErrorMeta = {
443
427
  /**
444
- * 対象のトランスフォーマーの名前です。
428
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
445
429
  */
446
430
  readonly name: string;
447
431
  };
448
432
 
449
433
  /**
450
- * EncodableStreamNotSupportedError のコンストラクター引数です。
451
- *
452
- * エラーの追加情報 (`cause`) も含みます。
434
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
453
435
  */
454
436
  export type EncodableStreamNotSupportedErrorArgs = ErrorOptions &
455
437
  EncodableStreamNotSupportedErrorMeta;
456
438
 
457
439
  /**
458
- * トランスフォーマーがエンコード可能なストリームをサポートしていない場合に投げられるエラーです。
440
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
459
441
  */
460
442
  export class EncodableStreamNotSupportedError extends ErrorBase<EncodableStreamNotSupportedErrorMeta> {
461
443
  static {
@@ -476,25 +458,23 @@ setErrorMessage(
476
458
  );
477
459
 
478
460
  /**
479
- * DecodableStreamNotSupportedError に付与されるメタデータです。
461
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
480
462
  */
481
463
  export type DecodableStreamNotSupportedErrorMeta = {
482
464
  /**
483
- * 対象のトランスフォーマーの名前です。
465
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
484
466
  */
485
467
  readonly name: string;
486
468
  };
487
469
 
488
470
  /**
489
- * DecodableStreamNotSupportedError のコンストラクター引数です。
490
- *
491
- * エラーの追加情報 (`cause`) も含みます。
471
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
492
472
  */
493
473
  export type DecodableStreamNotSupportedErrorArgs = ErrorOptions &
494
474
  DecodableStreamNotSupportedErrorMeta;
495
475
 
496
476
  /**
497
- * トランスフォーマーがデコード可能なストリームをサポートしていない場合に投げられるエラーです。
477
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
498
478
  */
499
479
  export class DecodableStreamNotSupportedError extends ErrorBase<DecodableStreamNotSupportedErrorMeta> {
500
480
  static {
@@ -521,75 +501,67 @@ setErrorMessage(
521
501
  // -------------------------------------------------------------------------------------------------
522
502
 
523
503
  /**
524
- * PluginOperationAggregateError に付与されるメタデータです。
504
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
525
505
  */
526
506
  export type PluginOperationAggregateErrorMeta = {
527
507
  /**
528
- * 失敗した操作の対象となったプラグインの種別です。
529
- *
530
- * - `"plugin"`: 複数の種別のプラグインが混在しています。
531
- * - `"storage"`: ストレージです。
532
- * - `"transformer"`: トランスフォーマーです。
508
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
533
509
  */
534
510
  readonly plugin: "plugin" | "storage" | "transformer";
535
511
 
536
512
  /**
537
- * 失敗した操作の種類です。
513
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
538
514
  */
539
515
  readonly action: "open" | "close" | "write" | "read" | "delete" | "clear";
540
516
 
541
517
  /**
542
- * 失敗した各プラグインの操作と原因のリストです。
518
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
543
519
  */
544
520
  readonly errors: readonly {
545
521
  /**
546
- * 失敗したプラグインの種別です。
522
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
547
523
  */
548
524
  readonly plugin: "storage" | "transformer";
549
525
 
550
526
  /**
551
- * 操作が失敗した原因です。
527
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
552
528
  */
553
529
  readonly reason: unknown;
554
530
  }[];
555
531
  };
556
532
 
557
533
  /**
558
- * PluginOperationAggregateError のコンストラクター引数です。
559
- *
560
- * エラーの追加情報 (`cause`) も含みます。
534
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
561
535
  */
562
536
  export type PluginOperationAggregateErrorArgs = ErrorOptions & {
563
537
  /**
564
- * 失敗したプラグインの既定の種別です。
565
- *
566
- * 個々のエラーで種別が指定されていない場合に使用されます。
538
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
567
539
  */
568
540
  readonly plugin?: "storage" | "transformer";
569
541
 
570
542
  /**
571
- * 失敗した操作の種類です。
543
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
572
544
  */
573
545
  readonly action: "open" | "close" | "write" | "read" | "delete" | "clear";
574
546
 
575
547
  /**
576
- * 失敗した各プラグインの操作と原因のリストです。
548
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
577
549
  */
578
550
  readonly errors: readonly {
579
551
  /**
580
- * 失敗したプラグインの種別です。
552
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
581
553
  */
582
554
  readonly plugin?: "storage" | "transformer";
583
555
 
584
556
  /**
585
- * 操作が失敗した原因です。
557
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
586
558
  */
587
559
  readonly reason: unknown;
588
560
  }[];
589
561
  };
590
562
 
591
563
  /**
592
- * 複数のストレージやトランスフォーマーの操作が失敗した場合に投げられる、個々の失敗を集約したエラーです。
564
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
593
565
  */
594
566
  export class PluginOperationAggregateError extends ErrorBase<PluginOperationAggregateErrorMeta> {
595
567
  static {
@@ -631,7 +603,7 @@ setErrorMessage(
631
603
  // -------------------------------------------------------------------------------------------------
632
604
 
633
605
  /**
634
- * ストレージが一つも登録されていない状態で UniKvs を作成しようとした場合に投げられるエラーです。
606
+ * [API Reference](https://tai-kun.github.io/unikvs/packages/unikvs#errors)
635
607
  */
636
608
  export class MissingStorageError extends ErrorBase<undefined> {
637
609
  static {
@@ -648,24 +620,3 @@ setErrorMessage(
648
620
  "UniKvs を使用するためには最低 1 つのストレージが必要です",
649
621
  "ja",
650
622
  );
651
-
652
- // -------------------------------------------------------------------------------------------------
653
-
654
- /**
655
- * ストレージが登録された後にトランスフォーマーを追加しようとした場合に投げられるエラーです。
656
- */
657
- export class TransformerRegistrationError extends ErrorBase<undefined> {
658
- static {
659
- this.prototype.name = "UniKvsTransformerRegistrationError";
660
- }
661
-
662
- public constructor(options?: ErrorOptions) {
663
- super("Cannot add transformers after storage has already been registered", options);
664
- }
665
- }
666
-
667
- setErrorMessage(
668
- TransformerRegistrationError,
669
- "ストレージが登録された後にトランスフォーマーを追加することはできません",
670
- "ja",
671
- );
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type * from "./context.types.js";
1
+ export type * from "./variables.types.js";
2
2
 
3
3
  export type {
4
4
  DecodableStreamNotSupportedErrorArgs,
@@ -35,14 +35,13 @@ export {
35
35
  ReadableStreamNotSupportedError,
36
36
  StorageIsNotOpenError,
37
37
  TransformerIsNotOpenError,
38
- TransformerRegistrationError,
39
38
  UniKvsIsNotOpenError,
40
39
  UniKvsIsOpenError,
41
40
  WritableStreamNotSupportedError,
42
41
  } from "./errors.js";
43
42
 
44
43
  export type * from "./unikvs-config.js";
45
- export { default as UniKvsConfig } from "./unikvs-config.js";
44
+ export { PlainValue, StreamValue, Value, default as UniKvsConfig } from "./unikvs-config.js";
46
45
 
47
46
  export type * from "./unikvs.js";
48
47
  export { default as UniKvs } from "./unikvs.js";