@puq/debug 0.0.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/README.md +32 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/debug.d.ts +2 -0
- package/dist/lib/debug.d.ts.map +1 -0
- package/dist/lib/debug.js +17 -0
- package/dist/lib/debug.js.map +1 -0
- package/dist/lib/is-debug-mode.d.ts +2 -0
- package/dist/lib/is-debug-mode.d.ts.map +1 -0
- package/dist/lib/is-debug-mode.js +9 -0
- package/dist/lib/is-debug-mode.js.map +1 -0
- package/package.json +83 -0
package/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
<p align="center">
|
2
|
+
<img src="https://raw.githubusercontent.com/rbrightline/puq/refs/heads/main/libs/debug/favicon.png" alt="Logo" />
|
3
|
+
</p>
|
4
|
+
|
5
|
+
# @puq/debug
|
6
|
+
|
7
|
+
## Summary
|
8
|
+
|
9
|
+
debug
|
10
|
+
|
11
|
+
## Install
|
12
|
+
|
13
|
+
```bash
|
14
|
+
pnpm add @puq/debug
|
15
|
+
```
|
16
|
+
|
17
|
+
## Funding
|
18
|
+
|
19
|
+
Thank you for using `@puq/debug` It's an open-source project, and maintaining it takes time and effort. If you find this library useful, please consider supporting its ongoing development. Your contributions help ensure that the project stays up-to-date, secure, and well-maintained.
|
20
|
+
|
21
|
+
[Instant Funding](https://cash.app/$puqlib)
|
22
|
+
|
23
|
+
### Your funding will go toward
|
24
|
+
|
25
|
+
- **Bug fixes and updates** to ensure compatibility with the latest versions of dependencies.
|
26
|
+
- **New features** that will make the library even more powerful.
|
27
|
+
- **Documentation** improvements to help users get the most out of [Your Library Name].
|
28
|
+
- **General maintenance** to keep the library running smoothly and securely.
|
29
|
+
|
30
|
+
Contact to the developer: [robert.brightline@gmail.com]
|
31
|
+
|
32
|
+
[Support the developer](https://cash.app/$puqlib)
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC"}
|
package/dist/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// @index(['./**/*.ts', '!./**/*.{spec,test}.ts'], f => `export * from '${f.path}.js'`)\nexport * from './lib/debug.js';\nexport * from './lib/is-debug-mode.js';\n"],"names":[],"rangeMappings":";;","mappings":"AAAA,uFAAuF;AACvF,cAAc,iBAAiB;AAC/B,cAAc,yBAAyB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/lib/debug.ts"],"names":[],"mappings":"AAEA,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { isDebugMode } from './is-debug-mode.js';
|
2
|
+
/**
|
3
|
+
* Debug console
|
4
|
+
* @returns
|
5
|
+
*/ export function debug(...message) {
|
6
|
+
if (!isDebugMode()) return;
|
7
|
+
if (message.every((e)=>{
|
8
|
+
return typeof e != 'object';
|
9
|
+
})) {
|
10
|
+
console.debug('[ Debug ]', ...message);
|
11
|
+
} else {
|
12
|
+
console.debug('[ Debug ]');
|
13
|
+
console.table(message);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
//# sourceMappingURL=debug.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/lib/debug.ts"],"sourcesContent":["import { isDebugMode } from './is-debug-mode.js';\n\nexport function debug<T>(record: T): void;\n/**\n * Debug console\n * @returns\n */\nexport function debug(...message: any[]): void {\n if (!isDebugMode()) return;\n\n if (\n message.every((e) => {\n return typeof e != 'object';\n })\n ) {\n console.debug('[ Debug ]', ...message);\n } else {\n console.debug('[ Debug ]');\n\n console.table(message);\n }\n}\n"],"names":["isDebugMode","debug","message","every","e","console","table"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,SAASA,WAAW,QAAQ,qBAAqB;AAGjD;;;CAGC,GACD,OAAO,SAASC,MAAM,GAAGC,OAAc;IACrC,IAAI,CAACF,eAAe;IAEpB,IACEE,QAAQC,KAAK,CAAC,CAACC;QACb,OAAO,OAAOA,KAAK;IACrB,IACA;QACAC,QAAQJ,KAAK,CAAC,gBAAgBC;IAChC,OAAO;QACLG,QAAQJ,KAAK,CAAC;QAEdI,QAAQC,KAAK,CAACJ;IAChB;AACF"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"is-debug-mode.d.ts","sourceRoot":"","sources":["../../src/lib/is-debug-mode.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,IAAI,OAAO,CAErC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/lib/is-debug-mode.ts"],"sourcesContent":["export function isDebugMode(): boolean {\r\n return [true, 'true', 1].some((e) => process.env.DEBUG_MODE === e);\r\n}\r\n"],"names":["isDebugMode","some","e","process","env","DEBUG_MODE"],"rangeMappings":";;;;;;","mappings":"AAAA,OAAO,SAASA;IACd,OAAO;QAAC;QAAM;QAAQ;KAAE,CAACC,IAAI,CAAC,CAACC,IAAMC,QAAQC,GAAG,CAACC,UAAU,KAAKH;AAClE"}
|
package/package.json
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
{
|
2
|
+
"name": "@puq/debug",
|
3
|
+
"license": "MIT",
|
4
|
+
"version": "0.0.1",
|
5
|
+
"publishConfig": {
|
6
|
+
"access": "public",
|
7
|
+
"tag": "latest"
|
8
|
+
},
|
9
|
+
"description": "debug",
|
10
|
+
"author": {
|
11
|
+
"email": "robert.brightline@gmail.com",
|
12
|
+
"name": "Robert Brightline",
|
13
|
+
"url": "https://rbrightline.github.io"
|
14
|
+
},
|
15
|
+
"keywords": [
|
16
|
+
"puq",
|
17
|
+
"debug"
|
18
|
+
],
|
19
|
+
"repository": {
|
20
|
+
"directory": "libs/debug",
|
21
|
+
"url": "https://github.com/rbrightline/puq/tree/main",
|
22
|
+
"type": "github"
|
23
|
+
},
|
24
|
+
"homepage": "https://rbrightline.github.io/puq/debug",
|
25
|
+
"bugs": {
|
26
|
+
"email": "robert.brightline@gmail.com",
|
27
|
+
"url": "https://rbrightline.github.io"
|
28
|
+
},
|
29
|
+
"categories": [
|
30
|
+
"Other"
|
31
|
+
],
|
32
|
+
"contributors": [
|
33
|
+
{
|
34
|
+
"email": "robert.brightline@gmail.com",
|
35
|
+
"name": "Robert Brightline",
|
36
|
+
"url": "https://rbrightline.github.io"
|
37
|
+
}
|
38
|
+
],
|
39
|
+
"funding": [
|
40
|
+
"https://cash.app/$puqlib"
|
41
|
+
],
|
42
|
+
"icon": "https://raw.githubusercontent.com/rbrightline/puq/refs/heads/main/libs/debug/favicon.png",
|
43
|
+
"type": "module",
|
44
|
+
"main": "./dist/index.js",
|
45
|
+
"module": "./dist/index.js",
|
46
|
+
"types": "./dist/index.d.ts",
|
47
|
+
"exports": {
|
48
|
+
"./package.json": "./package.json",
|
49
|
+
".": {
|
50
|
+
"types": "./dist/index.d.ts",
|
51
|
+
"import": "./dist/index.js",
|
52
|
+
"default": "./dist/index.js"
|
53
|
+
}
|
54
|
+
},
|
55
|
+
"files": [
|
56
|
+
"dist",
|
57
|
+
"!**/*.tsbuildinfo"
|
58
|
+
],
|
59
|
+
"nx": {
|
60
|
+
"sourceRoot": "libs/debug/src",
|
61
|
+
"targets": {
|
62
|
+
"build": {
|
63
|
+
"executor": "@nx/js:swc",
|
64
|
+
"outputs": [
|
65
|
+
"{options.outputPath}"
|
66
|
+
],
|
67
|
+
"options": {
|
68
|
+
"outputPath": "libs/debug/dist",
|
69
|
+
"main": "libs/debug/src/index.ts",
|
70
|
+
"tsConfig": "libs/debug/tsconfig.lib.json",
|
71
|
+
"skipTypeCheck": false,
|
72
|
+
"stripLeadingPaths": true
|
73
|
+
}
|
74
|
+
},
|
75
|
+
"doc": {
|
76
|
+
"command": "cd libs/debug && npx compodoc -d ../../public/debug -p tsconfig.lib.json -n debug"
|
77
|
+
}
|
78
|
+
}
|
79
|
+
},
|
80
|
+
"devDependencies": {
|
81
|
+
"@swc/helpers": "~0.5.11"
|
82
|
+
}
|
83
|
+
}
|