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/node.mjs CHANGED
@@ -945,44 +945,10 @@ var $;
945
945
  "use strict";
946
946
  var $;
947
947
  (function ($) {
948
- function $mol_diff_path(...paths) {
949
- const limit = Math.min(...paths.map(path => path.length));
950
- lookup: for (var i = 0; i < limit; ++i) {
951
- const first = paths[0][i];
952
- for (let j = 1; j < paths.length; ++j) {
953
- if (paths[j][i] !== first)
954
- break lookup;
955
- }
956
- }
957
- return {
958
- prefix: paths[0].slice(0, i),
959
- suffix: paths.map(path => path.slice(i)),
960
- };
961
- }
962
- $.$mol_diff_path = $mol_diff_path;
963
- })($ || ($ = {}));
964
- //mol/diff/path/path.ts
965
- ;
966
- "use strict";
967
- var $;
968
- (function ($) {
969
- class $mol_error_mix extends Error {
970
- errors;
948
+ class $mol_error_mix extends AggregateError {
949
+ name = '$mol_error_mix';
971
950
  constructor(message, ...errors) {
972
- super(message);
973
- this.errors = errors;
974
- if (errors.length) {
975
- const stacks = [...errors.map(error => error.stack), this.stack];
976
- const diff = $mol_diff_path(...stacks.map(stack => {
977
- if (!stack)
978
- return [];
979
- return stack.split('\n').reverse();
980
- }));
981
- const head = diff.prefix.reverse().join('\n');
982
- const tails = diff.suffix.map(path => path.reverse().map(line => line.replace(/^(?!\s+at)/, '\tat (.) ')).join('\n')).join('\n\tat (.) -----\n');
983
- this.stack = `Error: ${this.constructor.name}\n\tat (.) /"""\\\n${tails}\n\tat (.) \\___/\n${head}`;
984
- this.message += errors.map(error => '\n' + error.message).join('');
985
- }
951
+ super(errors, [message, ...errors.map(e => ' ' + e.message)].join('\n'));
986
952
  }
987
953
  toJSON() {
988
954
  return this.message;
@@ -996,6 +962,7 @@ var $;
996
962
  var $;
997
963
  (function ($) {
998
964
  class $mol_data_error extends $mol_error_mix {
965
+ name = '$mol_data_error';
999
966
  }
1000
967
  $.$mol_data_error = $mol_data_error;
1001
968
  })($ || ($ = {}));
@@ -1261,6 +1228,9 @@ var $;
1261
1228
  if (typeof val === 'function') {
1262
1229
  return $mol_dev_format_native(val);
1263
1230
  }
1231
+ if (Symbol.toStringTag in val) {
1232
+ return $mol_dev_format_native(val);
1233
+ }
1264
1234
  return null;
1265
1235
  },
1266
1236
  hasBody: val => val[$.$mol_dev_format_body],
package/node.test.js CHANGED
@@ -936,44 +936,10 @@ var $;
936
936
  "use strict";
937
937
  var $;
938
938
  (function ($) {
939
- function $mol_diff_path(...paths) {
940
- const limit = Math.min(...paths.map(path => path.length));
941
- lookup: for (var i = 0; i < limit; ++i) {
942
- const first = paths[0][i];
943
- for (let j = 1; j < paths.length; ++j) {
944
- if (paths[j][i] !== first)
945
- break lookup;
946
- }
947
- }
948
- return {
949
- prefix: paths[0].slice(0, i),
950
- suffix: paths.map(path => path.slice(i)),
951
- };
952
- }
953
- $.$mol_diff_path = $mol_diff_path;
954
- })($ || ($ = {}));
955
- //mol/diff/path/path.ts
956
- ;
957
- "use strict";
958
- var $;
959
- (function ($) {
960
- class $mol_error_mix extends Error {
961
- errors;
939
+ class $mol_error_mix extends AggregateError {
940
+ name = '$mol_error_mix';
962
941
  constructor(message, ...errors) {
963
- super(message);
964
- this.errors = errors;
965
- if (errors.length) {
966
- const stacks = [...errors.map(error => error.stack), this.stack];
967
- const diff = $mol_diff_path(...stacks.map(stack => {
968
- if (!stack)
969
- return [];
970
- return stack.split('\n').reverse();
971
- }));
972
- const head = diff.prefix.reverse().join('\n');
973
- const tails = diff.suffix.map(path => path.reverse().map(line => line.replace(/^(?!\s+at)/, '\tat (.) ')).join('\n')).join('\n\tat (.) -----\n');
974
- this.stack = `Error: ${this.constructor.name}\n\tat (.) /"""\\\n${tails}\n\tat (.) \\___/\n${head}`;
975
- this.message += errors.map(error => '\n' + error.message).join('');
976
- }
942
+ super(errors, [message, ...errors.map(e => ' ' + e.message)].join('\n'));
977
943
  }
978
944
  toJSON() {
979
945
  return this.message;
@@ -987,6 +953,7 @@ var $;
987
953
  var $;
988
954
  (function ($) {
989
955
  class $mol_data_error extends $mol_error_mix {
956
+ name = '$mol_data_error';
990
957
  }
991
958
  $.$mol_data_error = $mol_data_error;
992
959
  })($ || ($ = {}));
@@ -1252,6 +1219,9 @@ var $;
1252
1219
  if (typeof val === 'function') {
1253
1220
  return $mol_dev_format_native(val);
1254
1221
  }
1222
+ if (Symbol.toStringTag in val) {
1223
+ return $mol_dev_format_native(val);
1224
+ }
1255
1225
  return null;
1256
1226
  },
1257
1227
  hasBody: val => val[$.$mol_dev_format_body],
@@ -5661,42 +5631,6 @@ var $;
5661
5631
  ;
5662
5632
  "use strict";
5663
5633
  var $;
5664
- (function ($) {
5665
- $mol_test({
5666
- 'equal paths'() {
5667
- const diff = $mol_diff_path([1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]);
5668
- $mol_assert_like(diff, {
5669
- prefix: [1, 2, 3, 4],
5670
- suffix: [[], [], []],
5671
- });
5672
- },
5673
- 'different suffix'() {
5674
- const diff = $mol_diff_path([1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 5, 4]);
5675
- $mol_assert_like(diff, {
5676
- prefix: [1, 2],
5677
- suffix: [[3, 4], [3, 5], [5, 4]],
5678
- });
5679
- },
5680
- 'one contains other'() {
5681
- const diff = $mol_diff_path([1, 2, 3, 4], [1, 2], [1, 2, 3]);
5682
- $mol_assert_like(diff, {
5683
- prefix: [1, 2],
5684
- suffix: [[3, 4], [], [3]],
5685
- });
5686
- },
5687
- 'fully different'() {
5688
- const diff = $mol_diff_path([1, 2], [3, 4], [5, 6]);
5689
- $mol_assert_like(diff, {
5690
- prefix: [],
5691
- suffix: [[1, 2], [3, 4], [5, 6]],
5692
- });
5693
- },
5694
- });
5695
- })($ || ($ = {}));
5696
- //mol/diff/path/path.test.ts
5697
- ;
5698
- "use strict";
5699
- var $;
5700
5634
  (function ($) {
5701
5635
  let sex;
5702
5636
  (function (sex) {