@native-systems/utility 2.1.3 → 2.2.1

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.cjs CHANGED
@@ -737,6 +737,8 @@ var ConsoleLogger = /*#__PURE__*/ (function () {
737
737
  _define_property$3(this, 'log', void 0);
738
738
  _define_property$3(this, 'warn', void 0);
739
739
  _define_property$3(this, 'error', void 0);
740
+ _define_property$3(this, 'dev', void 0);
741
+ _define_property$3(this, 'debug', void 0);
740
742
  var level = (options || {}).level;
741
743
  this.error = console.error.bind(console);
742
744
  this.warn = NO_OP;
@@ -750,6 +752,11 @@ var ConsoleLogger = /*#__PURE__*/ (function () {
750
752
  this.log = console.log.bind(console);
751
753
  break;
752
754
  }
755
+ this.dev =
756
+ process.env.NODE_ENV === 'development'
757
+ ? console.log.bind(console)
758
+ : NO_OP;
759
+ this.debug = process.env.DEBUG === '1' ? console.log.bind(console) : NO_OP;
753
760
  }
754
761
  _create_class$4(ConsoleLogger, [
755
762
  {
@@ -764,6 +771,12 @@ var ConsoleLogger = /*#__PURE__*/ (function () {
764
771
  Object.defineProperty(this, 'log', {
765
772
  value: NO_OP,
766
773
  });
774
+ Object.defineProperty(this, 'dev', {
775
+ value: NO_OP,
776
+ });
777
+ Object.defineProperty(this, 'debug', {
778
+ value: NO_OP,
779
+ });
767
780
  },
768
781
  },
769
782
  {
@@ -778,6 +791,15 @@ var ConsoleLogger = /*#__PURE__*/ (function () {
778
791
  Object.defineProperty(this, 'log', {
779
792
  value: console.log.bind(console),
780
793
  });
794
+ Object.defineProperty(this, 'dev', {
795
+ value:
796
+ process.env.NODE_ENV === 'development'
797
+ ? console.log.bind(console)
798
+ : NO_OP,
799
+ });
800
+ Object.defineProperty(this, 'debug', {
801
+ value: process.env.DEBUG === '1' ? console.log.bind(console) : NO_OP,
802
+ });
781
803
  },
782
804
  },
783
805
  ]);
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ declare module "@native-systems/utility" {
3
3
  hasNextPage: boolean;
4
4
  hasPrevPage: boolean;
5
5
  totalPages: number;
6
+ resultCount?: number;
6
7
  data: T;
7
8
  };
8
9
  export type { Paginated };
@@ -707,11 +708,17 @@ declare module "@native-systems/utility" {
707
708
  log: LogFn;
708
709
  warn: LogFn;
709
710
  error: LogFn;
711
+ dev: LogFn;
712
+ debug: LogFn;
713
+ disable(): void;
714
+ enable(): void;
710
715
  }
711
716
  class ConsoleLogger implements Logger {
712
717
  readonly log: LogFn;
713
718
  readonly warn: LogFn;
714
719
  readonly error: LogFn;
720
+ readonly dev: LogFn;
721
+ readonly debug: LogFn;
715
722
  constructor(options?: {
716
723
  level?: LogLevel;
717
724
  });
package/dist/index.esm.js CHANGED
@@ -735,6 +735,8 @@ var ConsoleLogger = /*#__PURE__*/ (function () {
735
735
  _define_property$3(this, 'log', void 0);
736
736
  _define_property$3(this, 'warn', void 0);
737
737
  _define_property$3(this, 'error', void 0);
738
+ _define_property$3(this, 'dev', void 0);
739
+ _define_property$3(this, 'debug', void 0);
738
740
  var level = (options || {}).level;
739
741
  this.error = console.error.bind(console);
740
742
  this.warn = NO_OP;
@@ -748,6 +750,11 @@ var ConsoleLogger = /*#__PURE__*/ (function () {
748
750
  this.log = console.log.bind(console);
749
751
  break;
750
752
  }
753
+ this.dev =
754
+ process.env.NODE_ENV === 'development'
755
+ ? console.log.bind(console)
756
+ : NO_OP;
757
+ this.debug = process.env.DEBUG === '1' ? console.log.bind(console) : NO_OP;
751
758
  }
752
759
  _create_class$4(ConsoleLogger, [
753
760
  {
@@ -762,6 +769,12 @@ var ConsoleLogger = /*#__PURE__*/ (function () {
762
769
  Object.defineProperty(this, 'log', {
763
770
  value: NO_OP,
764
771
  });
772
+ Object.defineProperty(this, 'dev', {
773
+ value: NO_OP,
774
+ });
775
+ Object.defineProperty(this, 'debug', {
776
+ value: NO_OP,
777
+ });
765
778
  },
766
779
  },
767
780
  {
@@ -776,6 +789,15 @@ var ConsoleLogger = /*#__PURE__*/ (function () {
776
789
  Object.defineProperty(this, 'log', {
777
790
  value: console.log.bind(console),
778
791
  });
792
+ Object.defineProperty(this, 'dev', {
793
+ value:
794
+ process.env.NODE_ENV === 'development'
795
+ ? console.log.bind(console)
796
+ : NO_OP,
797
+ });
798
+ Object.defineProperty(this, 'debug', {
799
+ value: process.env.DEBUG === '1' ? console.log.bind(console) : NO_OP,
800
+ });
779
801
  },
780
802
  },
781
803
  ]);
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
- "version": "2.1.3",
13
+ "version": "2.2.1",
14
14
  "license": "MIT",
15
15
  "private": false,
16
16
  "engines": {
@@ -95,5 +95,6 @@
95
95
  "handlebars": "^4",
96
96
  "markdown-it": "^14",
97
97
  "sanitize-html": "^2.17"
98
- }
98
+ },
99
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
99
100
  }