@rotorsoft/act 2.1.6 → 2.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ import {
11
11
  LruMap,
12
12
  MAX_SHUTDOWN_GRACE_MS,
13
13
  cache,
14
+ check_scan_options,
14
15
  check_store,
15
16
  config,
16
17
  current_autoclose_window,
@@ -39,7 +40,7 @@ import {
39
40
  store,
40
41
  unscoped_ports,
41
42
  validate
42
- } from "./chunk-ADMH76IO.js";
43
+ } from "./chunk-GUMG5AVZ.js";
43
44
  import {
44
45
  checkAppends,
45
46
  checkVersion,
@@ -4233,6 +4234,7 @@ var Act = class {
4233
4234
  * @see {@link Store.restore} for the underlying driver-pattern primitive.
4234
4235
  */
4235
4236
  async restore(source, opts = {}, sink) {
4237
+ check_scan_options(opts);
4236
4238
  return this._scoped(async () => {
4237
4239
  const started = Date.now();
4238
4240
  if (opts.dry_run) {
@@ -5405,10 +5407,8 @@ var CsvFile = class {
5405
5407
  const event = {
5406
5408
  id: Number.parseInt(fields[0], 10),
5407
5409
  name: fields[1],
5408
- // Revive dates like every Store adapter does — a Date in an event
5409
- // payload must not depend on whether it came back through a store or
5410
- // through a CSV restore. The `created` column below has
5411
- // always been parsed explicitly; the JSON columns were missed.
5410
+ // Plain JSON, as every store returns it: a date in `data` stays its
5411
+ // ISO string here, and a load revives it from the event's schema.
5412
5412
  data: JSON.parse(fields[2]),
5413
5413
  stream: fields[3],
5414
5414
  version: Number.parseInt(fields[4], 10),