mol_time_all 1.1.222 → 1.1.225

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.deps.json CHANGED
@@ -1 +1 @@
1
- {"files":["LICENSE","README.md","lang.lang.tree","mam.jam.js","mam.ts","package.json","sandbox.config.json","tsconfig.json","tsfmt.json","yarn.lock","mol/CNAME","mol/CODE_OF_CONDUCT.md","mol/CONTRIBUTING.md","mol/LICENSE","mol/index.html","mol/mol.meta.tree","mol/readme.md","mol/time/readme.md","mol/time/base/base.ts","mol/time/duration/duration.ts","mol/time/duration/readme.md","mol/fail/fail.ts","mol/time/moment/moment.ts","mol/time/moment/readme.md","mol/time/interval/interval.ts","mol/time/interval/readme.md","mol/time/all/all.meta.tree","mol/time/all/package.json"],"mods":{},"deps_in":{"mol/time":{"mol/time/all":-9007199254740991,"mol/time/moment":-9007199254740991,"mol/time/duration":-9007199254740991,"mol/time/base":-9007199254740991,"mol/time/interval":-9007199254740991},"mol":{"mol/time":-9007199254740991,"mol/fail":-9007199254740991},"":{"mol":-9007199254740991},"mol/time/moment":{"mol/time/all":-9000,"mol/time/interval":-2},"mol/time/duration":{"mol/time/moment":-2,"mol/time/all":-9000,"mol/time/interval":-2},"mol/time/base":{"mol/time/duration":-1,"mol/time/moment":-1,"mol/time/interval":-1},"mol/fail":{"mol/time/moment":-2},"mol/time/interval":{"mol/time/all":-9000}},"deps_out":{"mol/time/all":{"mol/time":-9007199254740991,"mol/time/moment":-9000,"mol/time/duration":-9000,"mol/time/interval":-9000},"mol/time":{"mol":-9007199254740991},"mol":{"":-9007199254740991},"mol/time/moment":{"mol/time":-9007199254740991,"mol/time/duration":-2,"mol/fail":-2,"mol/time/base":-1},"mol/time/duration":{"mol/time":-9007199254740991,"mol/time/base":-1},"mol/time/base":{"mol/time":-9007199254740991},"mol/fail":{"mol":-9007199254740991},"mol/time/interval":{"mol/time":-9007199254740991,"mol/time/moment":-2,"mol/time/duration":-2,"mol/time/base":-1}},"sloc":{"LICENSE":113,"md":765,"tree":34,"js":10,"ts":586,"json":88,"lock":1277,"CNAME":1,"html":1},"deps":{"mol/time/all":{"..":-9007199254740991,"/mol/time/moment":-9000,"/mol/time/duration":-9000,"/mol/time/interval":-9000},"mol/time":{"..":-9007199254740991},"mol":{"..":-9007199254740991},"":{},"mol/time/moment":{"..":-9007199254740991,"/mol/time/moment/weekdays":-1,"/mol/time/moment/config":-1,"/mol/time/duration/config":-2,"/mol/fail":-2,"/mol/time/moment":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/time/moment/patterns":-4},"mol/time/duration":{"..":-9007199254740991,"/mol/time/duration/config":-1,"/mol/time/duration":-1,"/mol/time/base":-1},"mol/time/base":{"..":-9007199254740991,"/mol/time/base":-1},"mol/fail":{"..":-9007199254740991,"/mol/fail":-1},"mol/time/interval":{"..":-9007199254740991,"/mol/time/interval/config":-1,"/mol/time/moment/config":-2,"/mol/time/duration/config":-2,"/mol/time/interval":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/time/moment":-2}}}
1
+ {"files":["LICENSE","README.md","lang.lang.tree","mam.jam.js","mam.ts","package.json","sandbox.config.json","tsconfig.json","tsfmt.json","yarn.lock","mol/CNAME","mol/CODE_OF_CONDUCT.md","mol/CONTRIBUTING.md","mol/LICENSE","mol/index.html","mol/mol.meta.tree","mol/readme.md","mol/time/readme.md","mol/time/base/base.ts","mol/time/duration/duration.ts","mol/time/duration/readme.md","mol/fail/fail.ts","mol/time/moment/moment.ts","mol/time/moment/readme.md","mol/time/interval/interval.ts","mol/time/interval/readme.md","mol/time/all/all.meta.tree","mol/time/all/package.json"],"mods":{},"deps_in":{"mol/time":{"mol/time/all":-9007199254740991,"mol/time/moment":-9007199254740991,"mol/time/duration":-9007199254740991,"mol/time/base":-9007199254740991,"mol/time/interval":-9007199254740991},"mol":{"mol/time":-9007199254740991,"mol/fail":-9007199254740991},"":{"mol":-9007199254740991},"mol/time/moment":{"mol/time/all":-9000,"mol/time/interval":-2},"mol/time/duration":{"mol/time/moment":-2,"mol/time/all":-9000,"mol/time/interval":-2},"mol/time/base":{"mol/time/duration":-1,"mol/time/moment":-1,"mol/time/interval":-1},"mol/fail":{"mol/time/moment":-2},"mol/time/interval":{"mol/time/all":-9000}},"deps_out":{"mol/time/all":{"mol/time":-9007199254740991,"mol/time/moment":-9000,"mol/time/duration":-9000,"mol/time/interval":-9000},"mol/time":{"mol":-9007199254740991},"mol":{"":-9007199254740991},"mol/time/moment":{"mol/time":-9007199254740991,"mol/time/duration":-2,"mol/fail":-2,"mol/time/base":-1},"mol/time/duration":{"mol/time":-9007199254740991,"mol/time/base":-1},"mol/time/base":{"mol/time":-9007199254740991},"mol/fail":{"mol":-9007199254740991},"mol/time/interval":{"mol/time":-9007199254740991,"mol/time/moment":-2,"mol/time/duration":-2,"mol/time/base":-1}},"sloc":{"LICENSE":113,"md":765,"tree":34,"js":10,"ts":586,"json":88,"lock":995,"CNAME":1,"html":1},"deps":{"mol/time/all":{"..":-9007199254740991,"/mol/time/moment":-9000,"/mol/time/duration":-9000,"/mol/time/interval":-9000},"mol/time":{"..":-9007199254740991},"mol":{"..":-9007199254740991},"":{},"mol/time/moment":{"..":-9007199254740991,"/mol/time/moment/weekdays":-1,"/mol/time/moment/config":-1,"/mol/time/duration/config":-2,"/mol/fail":-2,"/mol/time/moment":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/time/moment/patterns":-4},"mol/time/duration":{"..":-9007199254740991,"/mol/time/duration/config":-1,"/mol/time/duration":-1,"/mol/time/base":-1},"mol/time/base":{"..":-9007199254740991,"/mol/time/base":-1},"mol/fail":{"..":-9007199254740991,"/mol/fail":-1},"mol/time/interval":{"..":-9007199254740991,"/mol/time/interval/config":-1,"/mol/time/moment/config":-2,"/mol/time/duration/config":-2,"/mol/time/interval":-1,"/mol/time/base":-1,"/mol/time/duration":-2,"/mol/time/moment":-2}}}
package/node.test.js CHANGED
@@ -782,6 +782,8 @@ var $node = new Proxy({ require }, {
782
782
  const mod = target.require('module');
783
783
  if (mod.builtinModules.indexOf(name) >= 0)
784
784
  return target.require(name);
785
+ if (name[0] === '.')
786
+ return target.require(name);
785
787
  const path = target.require('path');
786
788
  const fs = target.require('fs');
787
789
  let dir = path.resolve('.');
@@ -815,6 +817,161 @@ require = (req => Object.assign(function require(name) {
815
817
  ;
816
818
  "use strict";
817
819
  var $;
820
+ (function ($) {
821
+ function $mol_log3_area_lazy(event) {
822
+ const self = this;
823
+ const stack = self.$mol_log3_stack;
824
+ const deep = stack.length;
825
+ let logged = false;
826
+ stack.push(() => {
827
+ logged = true;
828
+ self.$mol_log3_area.call(self, event);
829
+ });
830
+ return () => {
831
+ if (logged)
832
+ self.console.groupEnd();
833
+ if (stack.length > deep)
834
+ stack.length = deep;
835
+ };
836
+ }
837
+ $.$mol_log3_area_lazy = $mol_log3_area_lazy;
838
+ $.$mol_log3_stack = [];
839
+ })($ || ($ = {}));
840
+ //mol/log3/log3.ts
841
+ ;
842
+ "use strict";
843
+ var $;
844
+ (function ($) {
845
+ class $mol_term_color {
846
+ static reset = this.ansi(0, 0);
847
+ static bold = this.ansi(1, 22);
848
+ static italic = this.ansi(3, 23);
849
+ static underline = this.ansi(4, 24);
850
+ static inverse = this.ansi(7, 27);
851
+ static hidden = this.ansi(8, 28);
852
+ static strike = this.ansi(9, 29);
853
+ static gray = this.ansi(90, 39);
854
+ static red = this.ansi(91, 39);
855
+ static green = this.ansi(92, 39);
856
+ static yellow = this.ansi(93, 39);
857
+ static blue = this.ansi(94, 39);
858
+ static magenta = this.ansi(95, 39);
859
+ static cyan = this.ansi(96, 39);
860
+ static white = this.ansi(97, 39);
861
+ static Red = (str) => this.inverse(this.red(str));
862
+ static Green = (str) => this.inverse(this.green(str));
863
+ static Yellow = (str) => this.inverse(this.yellow(str));
864
+ static Blue = (str) => this.inverse(this.blue(str));
865
+ static Magenta = (str) => this.inverse(this.magenta(str));
866
+ static Cyan = (str) => this.inverse(this.cyan(str));
867
+ static White = (str) => this.inverse(this.white(str));
868
+ static ansi(open, close) {
869
+ if (typeof process === 'undefined')
870
+ return String;
871
+ if (!process.stdout.isTTY)
872
+ return String;
873
+ const prefix = `\x1b[${open}m`;
874
+ const postfix = `\x1b[${close}m`;
875
+ const suffix_regexp = new RegExp(postfix.replace('[', '\\['), 'g');
876
+ return function colorer(str) {
877
+ str = String(str);
878
+ if (str === '')
879
+ return str;
880
+ const suffix = str.replace(suffix_regexp, prefix);
881
+ return prefix + suffix + postfix;
882
+ };
883
+ }
884
+ }
885
+ $.$mol_term_color = $mol_term_color;
886
+ })($ || ($ = {}));
887
+ //mol/term/color/color.ts
888
+ ;
889
+ "use strict";
890
+ var $;
891
+ (function ($) {
892
+ function $mol_log3_node_make(level, output, type, color) {
893
+ return function $mol_log3_logger(event) {
894
+ if (!event.time)
895
+ event = { time: new Date().toISOString(), ...event };
896
+ const tree = this.$mol_tree.fromJSON(event).clone({ type });
897
+ let str = color(tree.toString());
898
+ this.console[level](str);
899
+ const self = this;
900
+ return () => self.console.groupEnd();
901
+ };
902
+ }
903
+ $.$mol_log3_node_make = $mol_log3_node_make;
904
+ $.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come', $mol_term_color.blue);
905
+ $.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done', $mol_term_color.green);
906
+ $.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail', $mol_term_color.red);
907
+ $.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn', $mol_term_color.yellow);
908
+ $.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', $mol_term_color.magenta);
909
+ $.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', $mol_term_color.cyan);
910
+ })($ || ($ = {}));
911
+ //mol/log3/log3.node.ts
912
+ ;
913
+ "use strict";
914
+ var $;
915
+ (function ($_1) {
916
+ $mol_test_mocks.push($ => {
917
+ $.$mol_log3_come = () => { };
918
+ $.$mol_log3_done = () => { };
919
+ $.$mol_log3_fail = () => { };
920
+ $.$mol_log3_warn = () => { };
921
+ $.$mol_log3_rise = () => { };
922
+ $.$mol_log3_area = () => () => { };
923
+ });
924
+ })($ || ($ = {}));
925
+ //mol/log3/log3.test.ts
926
+ ;
927
+ "use strict";
928
+ var $;
929
+ (function ($) {
930
+ function $mol_env() {
931
+ return {};
932
+ }
933
+ $.$mol_env = $mol_env;
934
+ })($ || ($ = {}));
935
+ //mol/env/env.ts
936
+ ;
937
+ "use strict";
938
+ var $;
939
+ (function ($) {
940
+ $.$mol_env = function $mol_env() {
941
+ return this.process.env;
942
+ };
943
+ })($ || ($ = {}));
944
+ //mol/env/env.node.ts
945
+ ;
946
+ "use strict";
947
+ var $;
948
+ (function ($) {
949
+ function $mol_exec(dir, command, ...args) {
950
+ let [app, ...args0] = command.split(' ');
951
+ args = [...args0, ...args];
952
+ this.$mol_log3_come({
953
+ place: '$mol_exec',
954
+ dir: $node.path.relative('', dir),
955
+ message: 'Run',
956
+ command: `${app} ${args.join(' ')}`,
957
+ });
958
+ var res = $node['child_process'].spawnSync(app, args, {
959
+ cwd: $node.path.resolve(dir),
960
+ shell: true,
961
+ env: this.$mol_env(),
962
+ });
963
+ if (res.status || res.error)
964
+ return $mol_fail(res.error || new Error(res.stderr.toString()));
965
+ if (!res.stdout)
966
+ res.stdout = Buffer.from([]);
967
+ return res;
968
+ }
969
+ $.$mol_exec = $mol_exec;
970
+ })($ || ($ = {}));
971
+ //mol/exec/exec.node.ts
972
+ ;
973
+ "use strict";
974
+ var $;
818
975
  (function ($) {
819
976
  $.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
820
977
  })($ || ($ = {}));
@@ -1168,6 +1325,8 @@ var $;
1168
1325
  return Object.is(left.valueOf(), right['valueOf']());
1169
1326
  if (left instanceof RegExp)
1170
1327
  return left.source === right['source'] && left.flags === right['flags'];
1328
+ if (left instanceof Error)
1329
+ return left.stack === right['stack'];
1171
1330
  let left_cache = $.$mol_compare_deep_cache.get(left);
1172
1331
  if (left_cache) {
1173
1332
  const right_cache = left_cache.get(right);
@@ -1188,8 +1347,6 @@ var $;
1188
1347
  result = compare_set(left, right);
1189
1348
  else if (left instanceof Map)
1190
1349
  result = compare_map(left, right);
1191
- else if (left instanceof Error)
1192
- result = left.stack === right.stack;
1193
1350
  else if (ArrayBuffer.isView(left))
1194
1351
  result = compare_buffer(left, right);
1195
1352
  else if (Symbol.toPrimitive in left)
@@ -1427,72 +1584,6 @@ var $;
1427
1584
  ;
1428
1585
  "use strict";
1429
1586
  var $;
1430
- (function ($) {
1431
- function $mol_log3_area_lazy(event) {
1432
- const self = this;
1433
- const stack = self.$mol_log3_stack;
1434
- const deep = stack.length;
1435
- let logged = false;
1436
- stack.push(() => {
1437
- logged = true;
1438
- self.$mol_log3_area.call(self, event);
1439
- });
1440
- return () => {
1441
- if (logged)
1442
- self.console.groupEnd();
1443
- if (stack.length > deep)
1444
- stack.length = deep;
1445
- };
1446
- }
1447
- $.$mol_log3_area_lazy = $mol_log3_area_lazy;
1448
- $.$mol_log3_stack = [];
1449
- })($ || ($ = {}));
1450
- //mol/log3/log3.ts
1451
- ;
1452
- "use strict";
1453
- var $;
1454
- (function ($) {
1455
- function $mol_log3_node_make(level, output, type, color) {
1456
- return function $mol_log3_logger(event) {
1457
- if (!event.time)
1458
- event = { time: new Date().toISOString(), ...event };
1459
- const tree = this.$mol_tree.fromJSON(event).clone({ type });
1460
- let str = tree.toString();
1461
- if (process[output].isTTY) {
1462
- str = $node.colorette[color + 'Bright'](str);
1463
- }
1464
- ;
1465
- this.console[level](str);
1466
- const self = this;
1467
- return () => self.console.groupEnd();
1468
- };
1469
- }
1470
- $.$mol_log3_node_make = $mol_log3_node_make;
1471
- $.$mol_log3_come = $mol_log3_node_make('info', 'stdout', 'come', 'blue');
1472
- $.$mol_log3_done = $mol_log3_node_make('info', 'stdout', 'done', 'green');
1473
- $.$mol_log3_fail = $mol_log3_node_make('error', 'stderr', 'fail', 'red');
1474
- $.$mol_log3_warn = $mol_log3_node_make('warn', 'stderr', 'warn', 'yellow');
1475
- $.$mol_log3_rise = $mol_log3_node_make('log', 'stdout', 'rise', 'magenta');
1476
- $.$mol_log3_area = $mol_log3_node_make('log', 'stdout', 'area', 'cyan');
1477
- })($ || ($ = {}));
1478
- //mol/log3/log3.node.ts
1479
- ;
1480
- "use strict";
1481
- var $;
1482
- (function ($_1) {
1483
- $mol_test_mocks.push($ => {
1484
- $.$mol_log3_come = () => { };
1485
- $.$mol_log3_done = () => { };
1486
- $.$mol_log3_fail = () => { };
1487
- $.$mol_log3_warn = () => { };
1488
- $.$mol_log3_rise = () => { };
1489
- $.$mol_log3_area = () => () => { };
1490
- });
1491
- })($ || ($ = {}));
1492
- //mol/log3/log3.test.ts
1493
- ;
1494
- "use strict";
1495
- var $;
1496
1587
  (function ($) {
1497
1588
  $.$mol_ambient_ref = Symbol('$mol_ambient_ref');
1498
1589
  function $mol_ambient(overrides) {
@@ -2099,52 +2190,6 @@ var $;
2099
2190
  ;
2100
2191
  "use strict";
2101
2192
  var $;
2102
- (function ($) {
2103
- function $mol_env() {
2104
- return {};
2105
- }
2106
- $.$mol_env = $mol_env;
2107
- })($ || ($ = {}));
2108
- //mol/env/env.ts
2109
- ;
2110
- "use strict";
2111
- var $;
2112
- (function ($) {
2113
- $.$mol_env = function $mol_env() {
2114
- return this.process.env;
2115
- };
2116
- })($ || ($ = {}));
2117
- //mol/env/env.node.ts
2118
- ;
2119
- "use strict";
2120
- var $;
2121
- (function ($) {
2122
- function $mol_exec(dir, command, ...args) {
2123
- let [app, ...args0] = command.split(' ');
2124
- args = [...args0, ...args];
2125
- this.$mol_log3_come({
2126
- place: '$mol_exec',
2127
- dir: $node.path.relative('', dir),
2128
- message: 'Run',
2129
- command: `${app} ${args.join(' ')}`,
2130
- });
2131
- var res = $node['child_process'].spawnSync(app, args, {
2132
- cwd: $node.path.resolve(dir),
2133
- shell: true,
2134
- env: this.$mol_env(),
2135
- });
2136
- if (res.status || res.error)
2137
- return $mol_fail(res.error || new Error(res.stderr.toString()));
2138
- if (!res.stdout)
2139
- res.stdout = Buffer.from([]);
2140
- return res;
2141
- }
2142
- $.$mol_exec = $mol_exec;
2143
- })($ || ($ = {}));
2144
- //mol/exec/exec.node.ts
2145
- ;
2146
- "use strict";
2147
- var $;
2148
2193
  (function ($) {
2149
2194
  $mol_test({
2150
2195
  'parse and serial'() {