@leftium/gg 0.0.12 → 0.0.14
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/gg.js +3 -4
- package/package.json +4 -11
- package/patches/debug+4.4.1.patch +0 -35
package/dist/gg.js
CHANGED
|
@@ -57,10 +57,9 @@ function openInEditorUrl(fileName) {
|
|
|
57
57
|
return ggConfig.openInEditorUrlTemplate.replace('$FILENAME', encodeURIComponent(fileName).replaceAll('%2F', '/'));
|
|
58
58
|
}
|
|
59
59
|
// http://localhost:5173/__open-in-editor?file=src%2Froutes%2F%2Bpage.svelte
|
|
60
|
-
const ggLog = debugFactory('gg');
|
|
61
60
|
// Log some gg info to the JS console/terminal:
|
|
62
61
|
if (ggConfig.showHints) {
|
|
63
|
-
const ggLogTest =
|
|
62
|
+
const ggLogTest = debugFactory('gg:TEST');
|
|
64
63
|
let ggMessage = '\n';
|
|
65
64
|
// Utilities for forming ggMessage:
|
|
66
65
|
const message = (s) => (ggMessage += `${s}\n`);
|
|
@@ -112,9 +111,9 @@ export function gg(...args) {
|
|
|
112
111
|
if (callpoint.length < 80 && callpoint.length > maxCallpointLength) {
|
|
113
112
|
maxCallpointLength = callpoint.length;
|
|
114
113
|
}
|
|
115
|
-
const namespace =
|
|
114
|
+
const namespace = `gg:${callpoint.padEnd(maxCallpointLength, ' ')}${ggConfig.editorLink ? url : ''}`;
|
|
116
115
|
const ggLogFunction = namespaceToLogFunction.get(namespace) ||
|
|
117
|
-
namespaceToLogFunction.set(namespace,
|
|
116
|
+
namespaceToLogFunction.set(namespace, debugFactory(namespace)).get(namespace);
|
|
118
117
|
if (!args.length) {
|
|
119
118
|
ggLogFunction(` 📝📝 ${url} 👀👀`);
|
|
120
119
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leftium/gg",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/Leftium/gg.git"
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
16
16
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
17
17
|
"format": "prettier --write .",
|
|
18
|
-
"lint": "prettier --check . && eslint ."
|
|
19
|
-
"postinstall": "PATCH_PACKAGE_IGNORE_LOCKFILE=true patch-package --patch-dir ./patches"
|
|
18
|
+
"lint": "prettier --check . && eslint ."
|
|
20
19
|
},
|
|
21
20
|
"files": [
|
|
22
21
|
"dist",
|
|
@@ -69,19 +68,13 @@
|
|
|
69
68
|
"pnpm": {
|
|
70
69
|
"onlyBuiltDependencies": [
|
|
71
70
|
"esbuild"
|
|
72
|
-
]
|
|
73
|
-
"peerDependencyRules": {
|
|
74
|
-
"ignoreMissing": [
|
|
75
|
-
"debug"
|
|
76
|
-
]
|
|
77
|
-
}
|
|
71
|
+
]
|
|
78
72
|
},
|
|
79
73
|
"dependencies": {
|
|
80
74
|
"debug": "^4.4.1",
|
|
81
75
|
"dotenv": "^17.2.1",
|
|
82
76
|
"error-stack-parser": "^2.1.4",
|
|
83
77
|
"esm-env": "^1.2.2",
|
|
84
|
-
"launch-editor": "^2.11.1"
|
|
85
|
-
"patch-package": "^8.0.0"
|
|
78
|
+
"launch-editor": "^2.11.1"
|
|
86
79
|
}
|
|
87
80
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js
|
|
2
|
-
index 5993451..a2eb7c6 100644
|
|
3
|
-
--- a/node_modules/debug/src/browser.js
|
|
4
|
-
+++ b/node_modules/debug/src/browser.js
|
|
5
|
-
@@ -148,11 +148,11 @@ function useColors() {
|
|
6
|
-
|
|
7
|
-
function formatArgs(args) {
|
|
8
|
-
args[0] = (this.useColors ? '%c' : '') +
|
|
9
|
-
- this.namespace +
|
|
10
|
-
+ `${('+' + module.exports.humanize(this.diff)).padStart(6)} ${this.namespace}` +
|
|
11
|
-
(this.useColors ? ' %c' : ' ') +
|
|
12
|
-
args[0] +
|
|
13
|
-
(this.useColors ? '%c ' : ' ') +
|
|
14
|
-
- '+' + module.exports.humanize(this.diff);
|
|
15
|
-
+ '';
|
|
16
|
-
|
|
17
|
-
if (!this.useColors) {
|
|
18
|
-
return;
|
|
19
|
-
diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js
|
|
20
|
-
index 715560a..3829ba3 100644
|
|
21
|
-
--- a/node_modules/debug/src/node.js
|
|
22
|
-
+++ b/node_modules/debug/src/node.js
|
|
23
|
-
@@ -170,10 +170,10 @@ function formatArgs(args) {
|
|
24
|
-
if (useColors) {
|
|
25
|
-
const c = this.color;
|
|
26
|
-
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
|
|
27
|
-
- const prefix = ` ${colorCode};1m${name} \u001B[0m`;
|
|
28
|
-
+ const prefix = `${colorCode};1m${('+' + module.exports.humanize(this.diff)).padStart(6)} ${name} \u001B[0m`;
|
|
29
|
-
|
|
30
|
-
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
|
31
|
-
- args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
|
|
32
|
-
+ args.push(colorCode + '' + '\u001B[0m');
|
|
33
|
-
} else {
|
|
34
|
-
args[0] = getDate() + name + ' ' + args[0];
|
|
35
|
-
}
|