@imcms/core 1.0.1 → 1.0.2

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
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
6
10
  var __copyProps = (to, from, except, desc) => {
7
11
  if (from && typeof from === "object" || typeof from === "function") {
8
12
  for (let key of __getOwnPropNames(from))
@@ -15,4 +19,27 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
15
19
 
16
20
  // src/index.ts
17
21
  var index_exports = {};
22
+ __export(index_exports, {
23
+ DefaultLogger: () => DefaultLogger
24
+ });
18
25
  module.exports = __toCommonJS(index_exports);
26
+
27
+ // src/defaultLogger.ts
28
+ var DefaultLogger = {
29
+ info: (msg, ...i) => {
30
+ console.info(msg, ...i);
31
+ },
32
+ error: (msg, ...i) => {
33
+ console.error(msg, ...i);
34
+ },
35
+ warn: (msg, ...i) => {
36
+ console.warn(msg, ...i);
37
+ },
38
+ debug: (msg, ...i) => {
39
+ console.debug(msg, ...i);
40
+ }
41
+ };
42
+ // Annotate the CommonJS export names for ESM import in node:
43
+ 0 && (module.exports = {
44
+ DefaultLogger
45
+ });
package/dist/index.d.cts CHANGED
@@ -20,4 +20,7 @@ type OperationResult<T = unknown> = {
20
20
  status: "error";
21
21
  };
22
22
 
23
+ declare const DefaultLogger: Logger;
24
+
25
+ export { DefaultLogger };
23
26
  export type { DefaultParams, Logger, OperationResult };
package/dist/index.d.ts CHANGED
@@ -20,4 +20,7 @@ type OperationResult<T = unknown> = {
20
20
  status: "error";
21
21
  };
22
22
 
23
+ declare const DefaultLogger: Logger;
24
+
25
+ export { DefaultLogger };
23
26
  export type { DefaultParams, Logger, OperationResult };
package/dist/index.js CHANGED
@@ -0,0 +1,18 @@
1
+ // src/defaultLogger.ts
2
+ var DefaultLogger = {
3
+ info: (msg, ...i) => {
4
+ console.info(msg, ...i);
5
+ },
6
+ error: (msg, ...i) => {
7
+ console.error(msg, ...i);
8
+ },
9
+ warn: (msg, ...i) => {
10
+ console.warn(msg, ...i);
11
+ },
12
+ debug: (msg, ...i) => {
13
+ console.debug(msg, ...i);
14
+ }
15
+ };
16
+ export {
17
+ DefaultLogger
18
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imcms/core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -31,9 +31,6 @@
31
31
  "tsx": "^4.23.15",
32
32
  "typescript": "^5.9.3"
33
33
  },
34
- "dependencies": {
35
- "@types/node": "^26.6.5"
36
- },
37
34
  "scripts": {
38
35
  "test": "echo \"Error: no test specified\" && exit 1"
39
36
  }
@@ -0,0 +1,16 @@
1
+ import type { Logger } from "./logger.js";
2
+
3
+ export const DefaultLogger: Logger = {
4
+ info: (msg, ...i) => {
5
+ console.info(msg, ...i)
6
+ },
7
+ error: (msg, ...i) => {
8
+ console.error(msg, ...i)
9
+ },
10
+ warn: (msg, ...i) => {
11
+ console.warn(msg, ...i)
12
+ },
13
+ debug: (msg, ...i) => {
14
+ console.debug(msg, ...i)
15
+ }
16
+ }
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./defaultParams.js"
2
2
  export * from "./logger.js"
3
- export * from "./operationResult.js"
3
+ export * from "./operationResult.js"
4
+ export * from "./defaultLogger.js"