@paxtonterrydev/quicklog 1.0.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+ - Initial project setup
12
+
13
+ ## [1.0.0] - YYYY-MM-DD
14
+
15
+ ### Added
16
+ - Initial release
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2026, PaxtonTerryDev
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,4 @@
1
+ # Quicklog
2
+
3
+ Dead simple logging utility for Javascript
4
+
@@ -0,0 +1,13 @@
1
+ export declare const log: Log;
2
+ type LogFunction = (message: string, ...args: unknown[]) => void;
3
+ interface Log {
4
+ timestamp: boolean;
5
+ debug: LogFunction;
6
+ info: LogFunction;
7
+ warn: LogFunction;
8
+ error: LogFunction;
9
+ fatal: LogFunction;
10
+ object: (object: Object) => void;
11
+ }
12
+ export {};
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,EAAE,GAsBjB,CAAA;AAED,KAAK,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAEjE,UAAU,GAAG;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC"}
package/dist/index.js ADDED
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.log = void 0;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ exports.log = {
9
+ timestamp: false,
10
+ debug: function (message) {
11
+ if (isProduction())
12
+ return;
13
+ console.log(formatMessage({ level: "debug", message }));
14
+ },
15
+ info: function (message) {
16
+ console.log(formatMessage({ level: "info", message }));
17
+ },
18
+ warn: function (message) {
19
+ console.warn(formatMessage({ level: "warn", message }));
20
+ },
21
+ error: function (message) {
22
+ console.error(formatMessage({ level: "error", message }));
23
+ },
24
+ fatal: function (message) {
25
+ console.error(formatMessage({ level: "fatal", message }));
26
+ process.exitCode = 1;
27
+ },
28
+ object: (object) => {
29
+ console.dir(object, { depth: null });
30
+ }
31
+ };
32
+ const colors = {
33
+ debug: {
34
+ level: chalk_1.default.green,
35
+ message: chalk_1.default.white,
36
+ },
37
+ info: {
38
+ level: chalk_1.default.blue,
39
+ message: chalk_1.default.white,
40
+ },
41
+ warn: {
42
+ level: chalk_1.default.yellow,
43
+ message: chalk_1.default.yellow,
44
+ },
45
+ error: {
46
+ level: chalk_1.default.red,
47
+ message: chalk_1.default.red,
48
+ },
49
+ fatal: {
50
+ level: chalk_1.default.bgRedBright,
51
+ message: chalk_1.default.bgRedBright,
52
+ },
53
+ };
54
+ function formatMessage(msg) {
55
+ const levelColor = colors[msg.level].level;
56
+ const messageColor = colors[msg.level].message;
57
+ const levelStr = `[${msg.level.toUpperCase()}]`;
58
+ return `${exports.log.timestamp ? `${createTimestamp()} ` : ""}${levelColor(levelStr.padEnd(7, " "))} ${messageColor(msg.message)}`;
59
+ }
60
+ function createTimestamp() {
61
+ const now = new Date();
62
+ const localDate = now.toLocaleDateString();
63
+ const localTime = now.toLocaleTimeString();
64
+ return `[${localDate} ${localTime}]`;
65
+ }
66
+ function isProduction() {
67
+ return process.env.NODE_ENV === 'production';
68
+ }
69
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEZ,QAAA,GAAG,GAAQ;IACtB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,UAAS,OAAe;QAC7B,IAAI,YAAY,EAAE;YAAE,OAAO;QAC3B,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;IACzD,CAAC;IACD,IAAI,EAAE,UAAS,OAAe;QAC5B,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;IACxD,CAAC;IACD,IAAI,EAAE,UAAS,OAAe;QAC5B,OAAO,CAAC,IAAI,CAAC,aAA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C,KAAK,CAAC,CAAC,OAAO,CAAC;IAE/C,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,CAAA;IAC/C,OAAO,GAAG,WAAG,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,eAAe,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAA;AAC7H,CAAC;AAED,SAAS,eAAe;IACtB,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,MAAM,SAAS,GAAG,GAAG,CAAC,kBAAkB,EAAE,CAAC;IAC3C,MAAM,SAAS,GAAG,GAAG,CAAC,kBAAkB,EAAE,CAAC;IAC3C,OAAO,IAAI,SAAS,IAAI,SAAS,GAAG,CAAA;AACtC,CAAC;AAED,SAAS,YAAY;IACnB,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function logObject(title: string, object: Object): void;
2
+ //# sourceMappingURL=log-object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-object.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/log-object.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAK7D"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.logObject = logObject;
4
+ function logObject(title, object) {
5
+ console.log("--");
6
+ console.log(`-- ${title}`);
7
+ console.log("--");
8
+ console.dir(object, { depth: null });
9
+ }
10
+ //# sourceMappingURL=log-object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-object.js","sourceRoot":"","sources":["../../../src/lib/utils/log-object.ts"],"names":[],"mappings":";;AAAA,8BAKC;AALD,SAAgB,SAAS,CAAC,KAAa,EAAE,MAAc;IACrD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC;IAC3B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;AACtC,CAAC"}
package/dist/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":""}
package/dist/main.js ADDED
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const log_object_1 = require("./lib/utils/log-object");
4
+ (0, log_object_1.logObject)("Test Object", {
5
+ name: {
6
+ first: "Paxton",
7
+ last: "Terry",
8
+ },
9
+ email: "TestEmail@outlook.com"
10
+ });
11
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uDAAmD;AAEnD,IAAA,sBAAS,EAAC,aAAa,EAAE;IACvB,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,OAAO;KACd;IACD,KAAK,EAAE,uBAAuB;CAC/B,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@paxtonterrydev/quicklog",
3
+ "version": "1.0.0",
4
+ "description": "Simple logging utility for typescript",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js"
11
+ }
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "README.md",
16
+ "LICENSE",
17
+ "CHANGELOG.md"
18
+ ],
19
+ "scripts": {
20
+ "dev": "tsx --watch src/index.ts",
21
+ "build": "tsc",
22
+ "publish": "npm publish --access=public",
23
+ "prepublishOnly": "npm run build",
24
+ "prepare": "npm run build"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/PaxtonTerryDev/quicklog.git"
29
+ },
30
+ "author": "PaxtonTerryDev",
31
+ "license": "ISC",
32
+ "bugs": {
33
+ "url": "https://github.com/PaxtonTerryDev/quicklog/issues"
34
+ },
35
+ "homepage": "https://github.com/PaxtonTerryDev/quicklog#readme",
36
+ "devDependencies": {
37
+ "@types/node": "^25.0.9",
38
+ "tsx": "^4.21.0",
39
+ "typescript": "^5.9.3"
40
+ },
41
+ "dependencies": {
42
+ "chalk": "^5.6.2",
43
+ "dotenv": "^17.2.3"
44
+ }
45
+ }