@leftium/gg 0.0.31 → 0.0.34

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,3 +0,0 @@
1
- // @ts-nocheck
2
- // Auto-generated bundled debug library - type checking disabled
3
- import e from"tty";import t from"util";function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var s,o,i,c,a,u={exports:{}},l={exports:{}};function f(){if(o)return s;o=1;var e=1e3,t=60*e,r=60*t,n=24*r,i=7*n,c=365.25*n;function a(e,t,r,n){var s=t>=1.5*r;return Math.round(e/r)+" "+n+(s?"s":"")}return s=function(s,o){o=o||{};var u=typeof s;if("string"===u&&s.length>0)return function(s){if((s=String(s)).length>100)return;var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!o)return;var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*c;case"weeks":case"week":case"w":return a*i;case"days":case"day":case"d":return a*n;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(s);if("number"===u&&isFinite(s))return o.long?function(s){var o=Math.abs(s);if(o>=n)return a(s,o,n,"day");if(o>=r)return a(s,o,r,"hour");if(o>=t)return a(s,o,t,"minute");if(o>=e)return a(s,o,e,"second");return s+" ms"}(s):function(s){var o=Math.abs(s);if(o>=n)return Math.round(s/n)+"d";if(o>=r)return Math.round(s/r)+"h";if(o>=t)return Math.round(s/t)+"m";if(o>=e)return Math.round(s/e)+"s";return s+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}function p(){if(c)return i;return c=1,i=function(e){function t(e){let n,s,o,i=null;function c(...e){if(!c.enabled)return;const r=c,s=Number(new Date),o=s-(n||s);r.diff=o,r.prev=n,r.curr=s,n=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,s)=>{if("%%"===n)return"%";i++;const o=t.formatters[s];if("function"==typeof o){const t=e[i];n=o.call(r,t),e.splice(i,1),i--}return n}),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=r,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(s!==t.namespaces&&(s=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(c),c}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e,t){let r=0,n=0,s=-1,o=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(s=n,o=r,n++):(r++,n++);else{if(-1===s)return!1;n=s+1,o++,r=o}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(n(e,r))return!1;for(const r of t.names)if(n(e,r))return!0;return!1},t.humanize=f(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t},i}var d={exports:{}};const C=(()=>{if(!("navigator"in globalThis))return 0;if(globalThis.navigator.userAgentData){const e=navigator.userAgentData.brands.find(({brand:e})=>"Chromium"===e);if(e?.version>93)return 3}return/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)?1:0})(),m=0!==C&&{level:C,hasBasic:!0,has256:C>=2,has16m:C>=3},g={stdout:m,stderr:m};var h,F,y=n(Object.freeze({__proto__:null,default:g}));function b(){return h||(h=1,function(r,n){const s=e,o=t;n.init=function(e){e.inspectOpts={};const t=Object.keys(n.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=n.inspectOpts[t[r]]},n.log=function(...e){return process.stderr.write(o.formatWithOptions(n.inspectOpts,...e)+"\n")},n.formatArgs=function(e){const{namespace:t,useColors:s}=this;if(s){const n=this.color,s="[3"+(n<8?n:"8;5;"+n),o=`${s};1m${("+"+r.exports.humanize(this.diff)).padStart(6)} ${t} `;e[0]=o+e[0].split("\n").join("\n"+o),e.push(s+"")}else e[0]=function(){if(n.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+t+" "+e[0]},n.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},n.load=function(){return process.env.DEBUG},n.useColors=function(){return"colors"in n.inspectOpts?Boolean(n.inspectOpts.colors):s.isatty(process.stderr.fd)},n.destroy=o.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),n.colors=[6,2,3,4,5,1];try{const e=y;e&&(e.stderr||e).level>=2&&(n.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}n.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e},{}),r.exports=p()(n);const{formatters:i}=r.exports;i.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},i.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}}(d,d.exports)),d.exports}var v=(F||(F=1,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?u.exports=(a||(a=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+`${("+"+e.exports.humanize(this.diff)).padStart(6)} ${this.namespace}`+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" "),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,s=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(s=n))}),t.splice(s,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=p()(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(l,l.exports)),l.exports):u.exports=b()),u.exports),w=r(v);export{w as default};
package/dist/debug.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export default debug;
2
- import debug from 'debug';
package/dist/debug.js DELETED
@@ -1,15 +0,0 @@
1
- /**
2
- * Re-export patched debug library
3
- * This file bundles the patched version of debug into the library distribution.
4
- *
5
- * The patch moves time diff display before namespace:
6
- * Standard: gg:file +123ms
7
- * Patched: +123ms gg:file
8
- */
9
-
10
- // In dev mode: use debug from node_modules (with patch applied via pnpm)
11
- // After build: this file is replaced by a direct import of the bundled version
12
- // See: scripts/bundle-debug.js which creates dist/debug-bundled.js
13
- import debug from './debug-bundled.js';
14
-
15
- export default debug;
@@ -1,35 +0,0 @@
1
- diff --git a/src/browser.js b/src/browser.js
2
- index 5993451b82e6b27d981e202b349641816d867ccf..a2eb7c60fb7f5a8b93b2310acb15d6f89c3a1195 100644
3
- --- a/src/browser.js
4
- +++ b/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/src/node.js b/src/node.js
20
- index 715560a4ca8fb4c8dd6353eafdde6e83af28f05e..3829ba356e038a60408f9f7f0ed742baab527c6b 100644
21
- --- a/src/node.js
22
- +++ b/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
- }