hyoo_sync_client 0.0.327 → 0.0.329

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/web.mjs CHANGED
@@ -349,44 +349,10 @@ var $;
349
349
  "use strict";
350
350
  var $;
351
351
  (function ($) {
352
- function $mol_diff_path(...paths) {
353
- const limit = Math.min(...paths.map(path => path.length));
354
- lookup: for (var i = 0; i < limit; ++i) {
355
- const first = paths[0][i];
356
- for (let j = 1; j < paths.length; ++j) {
357
- if (paths[j][i] !== first)
358
- break lookup;
359
- }
360
- }
361
- return {
362
- prefix: paths[0].slice(0, i),
363
- suffix: paths.map(path => path.slice(i)),
364
- };
365
- }
366
- $.$mol_diff_path = $mol_diff_path;
367
- })($ || ($ = {}));
368
- //mol/diff/path/path.ts
369
- ;
370
- "use strict";
371
- var $;
372
- (function ($) {
373
- class $mol_error_mix extends Error {
374
- errors;
352
+ class $mol_error_mix extends AggregateError {
353
+ name = '$mol_error_mix';
375
354
  constructor(message, ...errors) {
376
- super(message);
377
- this.errors = errors;
378
- if (errors.length) {
379
- const stacks = [...errors.map(error => error.stack), this.stack];
380
- const diff = $mol_diff_path(...stacks.map(stack => {
381
- if (!stack)
382
- return [];
383
- return stack.split('\n').reverse();
384
- }));
385
- const head = diff.prefix.reverse().join('\n');
386
- const tails = diff.suffix.map(path => path.reverse().map(line => line.replace(/^(?!\s+at)/, '\tat (.) ')).join('\n')).join('\n\tat (.) -----\n');
387
- this.stack = `Error: ${this.constructor.name}\n\tat (.) /"""\\\n${tails}\n\tat (.) \\___/\n${head}`;
388
- this.message += errors.map(error => '\n' + error.message).join('');
389
- }
355
+ super(errors, [message, ...errors.map(e => ' ' + e.message)].join('\n'));
390
356
  }
391
357
  toJSON() {
392
358
  return this.message;
@@ -400,6 +366,7 @@ var $;
400
366
  var $;
401
367
  (function ($) {
402
368
  class $mol_data_error extends $mol_error_mix {
369
+ name = '$mol_data_error';
403
370
  }
404
371
  $.$mol_data_error = $mol_data_error;
405
372
  })($ || ($ = {}));
@@ -683,6 +650,9 @@ var $;
683
650
  if (typeof val === 'function') {
684
651
  return $mol_dev_format_native(val);
685
652
  }
653
+ if (Symbol.toStringTag in val) {
654
+ return $mol_dev_format_native(val);
655
+ }
686
656
  return null;
687
657
  },
688
658
  hasBody: val => val[$.$mol_dev_format_body],
package/web.test.js CHANGED
@@ -850,42 +850,6 @@ var $;
850
850
  ;
851
851
  "use strict";
852
852
  var $;
853
- (function ($) {
854
- $mol_test({
855
- 'equal paths'() {
856
- const diff = $mol_diff_path([1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]);
857
- $mol_assert_like(diff, {
858
- prefix: [1, 2, 3, 4],
859
- suffix: [[], [], []],
860
- });
861
- },
862
- 'different suffix'() {
863
- const diff = $mol_diff_path([1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 5, 4]);
864
- $mol_assert_like(diff, {
865
- prefix: [1, 2],
866
- suffix: [[3, 4], [3, 5], [5, 4]],
867
- });
868
- },
869
- 'one contains other'() {
870
- const diff = $mol_diff_path([1, 2, 3, 4], [1, 2], [1, 2, 3]);
871
- $mol_assert_like(diff, {
872
- prefix: [1, 2],
873
- suffix: [[3, 4], [], [3]],
874
- });
875
- },
876
- 'fully different'() {
877
- const diff = $mol_diff_path([1, 2], [3, 4], [5, 6]);
878
- $mol_assert_like(diff, {
879
- prefix: [],
880
- suffix: [[1, 2], [3, 4], [5, 6]],
881
- });
882
- },
883
- });
884
- })($ || ($ = {}));
885
- //mol/diff/path/path.test.ts
886
- ;
887
- "use strict";
888
- var $;
889
853
  (function ($) {
890
854
  let sex;
891
855
  (function (sex) {