@thisisagile/easy 15.14.3 → 15.15.0

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.
@@ -1,2 +1,4 @@
1
+ import { Optional } from '../types';
1
2
  export declare function log<T>(t: T): T;
2
3
  export declare function log<T>(label: string, t: T): T;
4
+ export declare function dir<T>(t?: T): Optional<T>;
package/dist/utils/Log.js CHANGED
@@ -18,6 +18,7 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var Log_exports = {};
20
20
  __export(Log_exports, {
21
+ dir: () => dir,
21
22
  log: () => log
22
23
  });
23
24
  module.exports = __toCommonJS(Log_exports);
@@ -30,8 +31,13 @@ function log(labelOrT, t) {
30
31
  return labelOrT;
31
32
  }
32
33
  }
34
+ function dir(t) {
35
+ console.dir(t, { depth: 200 });
36
+ return t;
37
+ }
33
38
  // Annotate the CommonJS export names for ESM import in node:
34
39
  0 && (module.exports = {
40
+ dir,
35
41
  log
36
42
  });
37
43
  //# sourceMappingURL=Log.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/Log.ts"],"sourcesContent":["export function log<T>(t: T): T;\nexport function log<T>(label: string, t: T): T;\nexport function log<T>(labelOrT: string | T, t?: T): T {\n if (t) {\n console.log(labelOrT as string, t);\n return t;\n } else {\n console.log(labelOrT);\n return labelOrT as T;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,SAAS,IAAO,UAAsB,GAAU;AACrD,MAAI,GAAG;AACL,YAAQ,IAAI,UAAoB,CAAC;AACjC,WAAO;AAAA,EACT,OAAO;AACL,YAAQ,IAAI,QAAQ;AACpB,WAAO;AAAA,EACT;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/Log.ts"],"sourcesContent":["import { Optional } from '../types';\n\nexport function log<T>(t: T): T;\nexport function log<T>(label: string, t: T): T;\nexport function log<T>(labelOrT: string | T, t?: T): T {\n if (t) {\n console.log(labelOrT as string, t);\n return t;\n } else {\n console.log(labelOrT);\n return labelOrT as T;\n }\n}\nexport function dir<T>(t?: T): Optional<T> {\n console.dir(t, { depth: 200 });\n return t;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,SAAS,IAAO,UAAsB,GAAU;AACrD,MAAI,GAAG;AACL,YAAQ,IAAI,UAAoB,CAAC;AACjC,WAAO;AAAA,EACT,OAAO;AACL,YAAQ,IAAI,QAAQ;AACpB,WAAO;AAAA,EACT;AACF;AACO,SAAS,IAAO,GAAoB;AACzC,UAAQ,IAAI,GAAG,EAAE,OAAO,IAAI,CAAC;AAC7B,SAAO;AACT;","names":[]}
@@ -8,7 +8,12 @@ function log(labelOrT, t) {
8
8
  return labelOrT;
9
9
  }
10
10
  }
11
+ function dir(t) {
12
+ console.dir(t, { depth: 200 });
13
+ return t;
14
+ }
11
15
  export {
16
+ dir,
12
17
  log
13
18
  };
14
19
  //# sourceMappingURL=Log.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/Log.ts"],"sourcesContent":["export function log<T>(t: T): T;\nexport function log<T>(label: string, t: T): T;\nexport function log<T>(labelOrT: string | T, t?: T): T {\n if (t) {\n console.log(labelOrT as string, t);\n return t;\n } else {\n console.log(labelOrT);\n return labelOrT as T;\n }\n}\n"],"mappings":";AAEO,SAAS,IAAO,UAAsB,GAAU;AACrD,MAAI,GAAG;AACL,YAAQ,IAAI,UAAoB,CAAC;AACjC,WAAO;AAAA,EACT,OAAO;AACL,YAAQ,IAAI,QAAQ;AACpB,WAAO;AAAA,EACT;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/Log.ts"],"sourcesContent":["import { Optional } from '../types';\n\nexport function log<T>(t: T): T;\nexport function log<T>(label: string, t: T): T;\nexport function log<T>(labelOrT: string | T, t?: T): T {\n if (t) {\n console.log(labelOrT as string, t);\n return t;\n } else {\n console.log(labelOrT);\n return labelOrT as T;\n }\n}\nexport function dir<T>(t?: T): Optional<T> {\n console.dir(t, { depth: 200 });\n return t;\n}\n"],"mappings":";AAIO,SAAS,IAAO,UAAsB,GAAU;AACrD,MAAI,GAAG;AACL,YAAQ,IAAI,UAAoB,CAAC;AACjC,WAAO;AAAA,EACT,OAAO;AACL,YAAQ,IAAI,QAAQ;AACpB,WAAO;AAAA,EACT;AACF;AACO,SAAS,IAAO,GAAoB;AACzC,UAAQ,IAAI,GAAG,EAAE,OAAO,IAAI,CAAC;AAC7B,SAAO;AACT;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thisisagile/easy",
3
- "version": "15.14.3",
3
+ "version": "15.15.0",
4
4
  "description": "Straightforward library for building domain-driven microservice architectures",
5
5
  "author": "Sander Hoogendoorn",
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "access": "public"
34
34
  },
35
35
  "devDependencies": {
36
- "@thisisagile/easy-test": "15.14.3",
36
+ "@thisisagile/easy-test": "15.15.0",
37
37
  "@types/form-urlencoded": "^4.4.0",
38
38
  "@types/jsonwebtoken": "^9.0.2",
39
39
  "@types/luxon": "3.2.0",
package/src/utils/Log.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Optional } from '../types';
2
+
1
3
  export function log<T>(t: T): T;
2
4
  export function log<T>(label: string, t: T): T;
3
5
  export function log<T>(labelOrT: string | T, t?: T): T {
@@ -9,3 +11,7 @@ export function log<T>(labelOrT: string | T, t?: T): T {
9
11
  return labelOrT as T;
10
12
  }
11
13
  }
14
+ export function dir<T>(t?: T): Optional<T> {
15
+ console.dir(t, { depth: 200 });
16
+ return t;
17
+ }