ccstatusline 2.2.14 → 2.2.16
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 +2 -1
- package/dist/ccstatusline.js +185 -228
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,9 +47,10 @@
|
|
|
47
47
|
|
|
48
48
|
## 🆕 Recent Updates
|
|
49
49
|
|
|
50
|
-
### v2.2.14 - Version pinning
|
|
50
|
+
### v2.2.14 - v2.2.16 - Version pinning and npm trusted publishing with provenance attestation
|
|
51
51
|
|
|
52
52
|
- **📌 Version pinning support** - Added support for pinned global installs so Claude Code can keep running a specific ccstatusline version.
|
|
53
|
+
- **🔐 npm provenance attestations** - Published packages now use trusted publishing provenance so users can verify where releases were built while avoiding long-lived npm publish tokens.
|
|
53
54
|
- **🔄 Moving from auto-update installs** - If you currently use an auto-updating install, use the TUI uninstall option first, then reinstall to go through the version pinning flow. Your ccstatusline settings are preserved when uninstalling.
|
|
54
55
|
|
|
55
56
|
### v2.2.13 - Weekly model usage, voice status, hooks, and docs
|
package/dist/ccstatusline.js
CHANGED
|
@@ -9713,7 +9713,7 @@ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fet
|
|
|
9713
9713
|
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
|
|
9714
9714
|
offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
|
|
9715
9715
|
commitReconciliationEffects(finishedWork);
|
|
9716
|
-
if (flags & 8192 && (root = finishedWork.stateNode, root._visibility = hoistableRoot ? root._visibility & -2 : root._visibility | 1, hoistableRoot && (current2 === null || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || recursivelyTraverseDisappearLayoutEffects(finishedWork)), supportsMutation))
|
|
9716
|
+
if (flags & 8192 && (root = finishedWork.stateNode, root._visibility = hoistableRoot ? root._visibility & -2 : root._visibility | 1, hoistableRoot && (current2 === null || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || recursivelyTraverseDisappearLayoutEffects(finishedWork)), supportsMutation)) {
|
|
9717
9717
|
a:
|
|
9718
9718
|
if (current2 = null, supportsMutation)
|
|
9719
9719
|
for (root = finishedWork;; ) {
|
|
@@ -9753,6 +9753,7 @@ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fet
|
|
|
9753
9753
|
root.sibling.return = root.return;
|
|
9754
9754
|
root = root.sibling;
|
|
9755
9755
|
}
|
|
9756
|
+
}
|
|
9756
9757
|
flags & 4 && (flags = finishedWork.updateQueue, flags !== null && (current2 = flags.retryQueue, current2 !== null && (flags.retryQueue = null, attachSuspenseRetryListeners(finishedWork, current2))));
|
|
9757
9758
|
break;
|
|
9758
9759
|
case 19:
|
|
@@ -13315,21 +13316,23 @@ var require_react_reconciler = __commonJS((exports, module) => {
|
|
|
13315
13316
|
}
|
|
13316
13317
|
});
|
|
13317
13318
|
|
|
13318
|
-
// node_modules/
|
|
13319
|
+
// node_modules/ansi-regex/index.js
|
|
13319
13320
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
13320
13321
|
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
13321
|
-
const
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
].join("|");
|
|
13322
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
13323
|
+
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
13324
|
+
const pattern = `${osc}|${csi}`;
|
|
13325
13325
|
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
13326
13326
|
}
|
|
13327
13327
|
|
|
13328
|
-
// node_modules/
|
|
13328
|
+
// node_modules/strip-ansi/index.js
|
|
13329
13329
|
function stripAnsi(string) {
|
|
13330
13330
|
if (typeof string !== "string") {
|
|
13331
13331
|
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
13332
13332
|
}
|
|
13333
|
+
if (!string.includes("\x1B") && !string.includes("")) {
|
|
13334
|
+
return string;
|
|
13335
|
+
}
|
|
13333
13336
|
return string.replace(regex, "");
|
|
13334
13337
|
}
|
|
13335
13338
|
var regex;
|
|
@@ -13431,6 +13434,7 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
|
13431
13434
|
}
|
|
13432
13435
|
var init_get_east_asian_width = __esm(() => {
|
|
13433
13436
|
init_lookup();
|
|
13437
|
+
init_lookup();
|
|
13434
13438
|
});
|
|
13435
13439
|
|
|
13436
13440
|
// node_modules/emoji-regex/index.js
|
|
@@ -13532,30 +13536,6 @@ var init_measure_text = __esm(() => {
|
|
|
13532
13536
|
measure_text_default = measureText;
|
|
13533
13537
|
});
|
|
13534
13538
|
|
|
13535
|
-
// node_modules/ansi-regex/index.js
|
|
13536
|
-
function ansiRegex2({ onlyFirst = false } = {}) {
|
|
13537
|
-
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
13538
|
-
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
13539
|
-
const csi = "[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";
|
|
13540
|
-
const pattern = `${osc}|${csi}`;
|
|
13541
|
-
return new RegExp(pattern, onlyFirst ? undefined : "g");
|
|
13542
|
-
}
|
|
13543
|
-
|
|
13544
|
-
// node_modules/strip-ansi/index.js
|
|
13545
|
-
function stripAnsi2(string) {
|
|
13546
|
-
if (typeof string !== "string") {
|
|
13547
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
13548
|
-
}
|
|
13549
|
-
if (!string.includes("\x1B") && !string.includes("")) {
|
|
13550
|
-
return string;
|
|
13551
|
-
}
|
|
13552
|
-
return string.replace(regex2, "");
|
|
13553
|
-
}
|
|
13554
|
-
var regex2;
|
|
13555
|
-
var init_strip_ansi2 = __esm(() => {
|
|
13556
|
-
regex2 = ansiRegex2();
|
|
13557
|
-
});
|
|
13558
|
-
|
|
13559
13539
|
// node_modules/ansi-styles/index.js
|
|
13560
13540
|
function assembleStyles2() {
|
|
13561
13541
|
const codes = new Map;
|
|
@@ -13744,7 +13724,7 @@ var ESCAPES, END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC
|
|
|
13744
13724
|
const characters = [...word];
|
|
13745
13725
|
let isInsideEscape = false;
|
|
13746
13726
|
let isInsideLinkEscape = false;
|
|
13747
|
-
let visible = stringWidth(
|
|
13727
|
+
let visible = stringWidth(stripAnsi(rows.at(-1)));
|
|
13748
13728
|
for (const [index, character] of characters.entries()) {
|
|
13749
13729
|
const characterLength = stringWidth(character);
|
|
13750
13730
|
if (visible + characterLength <= columns) {
|
|
@@ -13880,7 +13860,7 @@ var ESCAPES, END_CODE = 39, ANSI_ESCAPE_BELL = "\x07", ANSI_CSI = "[", ANSI_OSC
|
|
|
13880
13860
|
};
|
|
13881
13861
|
var init_wrap_ansi = __esm(() => {
|
|
13882
13862
|
init_string_width();
|
|
13883
|
-
|
|
13863
|
+
init_strip_ansi();
|
|
13884
13864
|
init_ansi_styles2();
|
|
13885
13865
|
ESCAPES = new Set([
|
|
13886
13866
|
"\x1B",
|
|
@@ -18075,7 +18055,7 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
18075
18055
|
987: (module2, __unused_webpack_exports, __webpack_require__2) => {
|
|
18076
18056
|
if (true) {
|
|
18077
18057
|
module2.exports = __webpack_require__2(786);
|
|
18078
|
-
}
|
|
18058
|
+
}
|
|
18079
18059
|
},
|
|
18080
18060
|
126: (__unused_webpack_module, exports2, __webpack_require__2) => {
|
|
18081
18061
|
var process4 = __webpack_require__2(169);
|
|
@@ -18525,7 +18505,7 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
18525
18505
|
189: (module2, __unused_webpack_exports, __webpack_require__2) => {
|
|
18526
18506
|
if (true) {
|
|
18527
18507
|
module2.exports = __webpack_require__2(126);
|
|
18528
|
-
}
|
|
18508
|
+
}
|
|
18529
18509
|
},
|
|
18530
18510
|
206: function(module2, exports2, __webpack_require__2) {
|
|
18531
18511
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
|
|
@@ -18540,7 +18520,7 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
18540
18520
|
(function(root, factory) {
|
|
18541
18521
|
if (true) {
|
|
18542
18522
|
__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__2(430)], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports2, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module2.exports = __WEBPACK_AMD_DEFINE_RESULT__);
|
|
18543
|
-
}
|
|
18523
|
+
}
|
|
18544
18524
|
})(this, function ErrorStackParser(StackFrame) {
|
|
18545
18525
|
var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
|
|
18546
18526
|
var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
|
|
@@ -19236,7 +19216,7 @@ var require_backend = __commonJS((exports, module) => {
|
|
|
19236
19216
|
(function(root, factory) {
|
|
19237
19217
|
if (true) {
|
|
19238
19218
|
__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = factory, __WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports2, __WEBPACK_AMD_DEFINE_ARRAY__) : __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module2.exports = __WEBPACK_AMD_DEFINE_RESULT__);
|
|
19239
|
-
}
|
|
19219
|
+
}
|
|
19240
19220
|
})(this, function() {
|
|
19241
19221
|
function _isNumber(n) {
|
|
19242
19222
|
return !isNaN(parseFloat(n)) && isFinite(n);
|
|
@@ -24610,7 +24590,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
24610
24590
|
var suffix = "";
|
|
24611
24591
|
if (true) {
|
|
24612
24592
|
suffix = " (<anonymous>)";
|
|
24613
|
-
}
|
|
24593
|
+
}
|
|
24614
24594
|
return `
|
|
24615
24595
|
` + prefix + name + suffix;
|
|
24616
24596
|
}
|
|
@@ -27339,7 +27319,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
27339
27319
|
hasChanges = true;
|
|
27340
27320
|
updateMostRecentlyInspectedElementIfNecessary(devtoolsInstance.id);
|
|
27341
27321
|
}
|
|
27342
|
-
}
|
|
27322
|
+
}
|
|
27343
27323
|
}
|
|
27344
27324
|
} catch (err) {
|
|
27345
27325
|
_iterator2.e(err);
|
|
@@ -29118,7 +29098,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29118
29098
|
if (contentFiber === null) {
|
|
29119
29099
|
throw new Error("There should always be an Offscreen Fiber child in a hydrated Suspense boundary.");
|
|
29120
29100
|
}
|
|
29121
|
-
}
|
|
29101
|
+
}
|
|
29122
29102
|
var _isTimedOut = fiber.memoizedState !== null;
|
|
29123
29103
|
if (!_isTimedOut) {
|
|
29124
29104
|
newSuspenseNode.rects = measureInstance(newInstance);
|
|
@@ -29152,7 +29132,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29152
29132
|
if (_contentFiber === null) {
|
|
29153
29133
|
throw new Error("There should always be an Offscreen Fiber child in a hydrated Suspense boundary.");
|
|
29154
29134
|
}
|
|
29155
|
-
}
|
|
29135
|
+
}
|
|
29156
29136
|
var suspenseState = fiber.memoizedState;
|
|
29157
29137
|
var _isTimedOut3 = suspenseState !== null;
|
|
29158
29138
|
if (!_isTimedOut3) {
|
|
@@ -29252,7 +29232,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29252
29232
|
trackThrownPromisesFromRetryCache(newSuspenseNode, fiber.stateNode);
|
|
29253
29233
|
mountSuspenseChildrenRecursively(_contentFiber2, traceNearestHostComponentUpdate, stashedSuspenseParent, stashedSuspensePrevious, stashedSuspenseRemaining);
|
|
29254
29234
|
shouldPopSuspenseNode = false;
|
|
29255
|
-
}
|
|
29235
|
+
}
|
|
29256
29236
|
} else {
|
|
29257
29237
|
if (fiber.child !== null) {
|
|
29258
29238
|
mountChildrenRecursively(fiber.child, traceNearestHostComponentUpdate);
|
|
@@ -29838,7 +29818,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29838
29818
|
shouldPopSuspenseNode = false;
|
|
29839
29819
|
} else if (previousHydrated && !nextHydrated) {
|
|
29840
29820
|
throw new Error("Encountered a dehydrated Suspense boundary that was previously hydrated.");
|
|
29841
|
-
}
|
|
29821
|
+
}
|
|
29842
29822
|
} else {
|
|
29843
29823
|
if (nextFiber.child !== prevFiber.child) {
|
|
29844
29824
|
updateFlags |= updateChildrenRecursively(nextFiber.child, prevFiber.child, traceNearestHostComponentUpdate);
|
|
@@ -29884,8 +29864,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29884
29864
|
recordResetChildren(fiberInstance);
|
|
29885
29865
|
}
|
|
29886
29866
|
updateFlags &= ~ShouldResetChildren;
|
|
29887
|
-
}
|
|
29888
|
-
}
|
|
29867
|
+
}
|
|
29868
|
+
}
|
|
29889
29869
|
if ((updateFlags & ShouldResetSuspenseChildren) !== NoUpdate) {
|
|
29890
29870
|
if (fiberInstance !== null && fiberInstance.kind === FIBER_INSTANCE) {
|
|
29891
29871
|
var _suspenseNode3 = fiberInstance.suspenseNode;
|
|
@@ -29893,7 +29873,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29893
29873
|
recordResetSuspenseChildren(_suspenseNode3);
|
|
29894
29874
|
updateFlags &= ~ShouldResetSuspenseChildren;
|
|
29895
29875
|
}
|
|
29896
|
-
}
|
|
29876
|
+
}
|
|
29897
29877
|
}
|
|
29898
29878
|
if ((updateFlags & ShouldResetParentSuspenseChildren) !== NoUpdate) {
|
|
29899
29879
|
if (fiberInstance !== null && fiberInstance.kind === FIBER_INSTANCE) {
|
|
@@ -29902,7 +29882,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
29902
29882
|
updateFlags &= ~ShouldResetParentSuspenseChildren;
|
|
29903
29883
|
updateFlags |= ShouldResetSuspenseChildren;
|
|
29904
29884
|
}
|
|
29905
|
-
}
|
|
29885
|
+
}
|
|
29906
29886
|
}
|
|
29907
29887
|
return updateFlags;
|
|
29908
29888
|
} finally {
|
|
@@ -32966,7 +32946,7 @@ The error thrown in the component is:
|
|
|
32966
32946
|
rendererInterface = renderer_attach(hook, id, renderer, global2, shouldStartProfilingNow, profilingSettings);
|
|
32967
32947
|
} else if (renderer.ComponentTree) {
|
|
32968
32948
|
rendererInterface = legacy_renderer_attach(hook, id, renderer, global2);
|
|
32969
|
-
}
|
|
32949
|
+
}
|
|
32970
32950
|
}
|
|
32971
32951
|
return rendererInterface;
|
|
32972
32952
|
}
|
|
@@ -34421,8 +34401,8 @@ function indentString(string, count = 1, options = {}) {
|
|
|
34421
34401
|
if (count === 0) {
|
|
34422
34402
|
return string;
|
|
34423
34403
|
}
|
|
34424
|
-
const
|
|
34425
|
-
return string.replace(
|
|
34404
|
+
const regex2 = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
|
|
34405
|
+
return string.replace(regex2, indent.repeat(count));
|
|
34426
34406
|
}
|
|
34427
34407
|
|
|
34428
34408
|
// node_modules/ink/build/get-max-width.js
|
|
@@ -34528,7 +34508,7 @@ var require_cli_boxes = __commonJS((exports, module) => {
|
|
|
34528
34508
|
});
|
|
34529
34509
|
|
|
34530
34510
|
// node_modules/ink/build/colorize.js
|
|
34531
|
-
var rgbRegex,
|
|
34511
|
+
var rgbRegex, ansiRegex2, isNamedColor = (color) => {
|
|
34532
34512
|
return color in source_default;
|
|
34533
34513
|
}, colorize = (str, color, type) => {
|
|
34534
34514
|
if (!color) {
|
|
@@ -34545,7 +34525,7 @@ var rgbRegex, ansiRegex3, isNamedColor = (color) => {
|
|
|
34545
34525
|
return type === "foreground" ? source_default.hex(color)(str) : source_default.bgHex(color)(str);
|
|
34546
34526
|
}
|
|
34547
34527
|
if (color.startsWith("ansi256")) {
|
|
34548
|
-
const matches2 =
|
|
34528
|
+
const matches2 = ansiRegex2.exec(color);
|
|
34549
34529
|
if (!matches2) {
|
|
34550
34530
|
return str;
|
|
34551
34531
|
}
|
|
@@ -34567,7 +34547,7 @@ var rgbRegex, ansiRegex3, isNamedColor = (color) => {
|
|
|
34567
34547
|
var init_colorize = __esm(() => {
|
|
34568
34548
|
init_source();
|
|
34569
34549
|
rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/;
|
|
34570
|
-
|
|
34550
|
+
ansiRegex2 = /^ansi256\(\s?(\d+)\s?\)$/;
|
|
34571
34551
|
colorize_default = colorize;
|
|
34572
34552
|
});
|
|
34573
34553
|
|
|
@@ -34777,94 +34757,15 @@ var init_render_node_to_output = __esm(async () => {
|
|
|
34777
34757
|
render_node_to_output_default = renderNodeToOutput;
|
|
34778
34758
|
});
|
|
34779
34759
|
|
|
34780
|
-
// node_modules/slice-ansi/node_modules/is-fullwidth-code-point/node_modules/get-east-asian-width/lookup-data.js
|
|
34781
|
-
var ambiguousRanges2, fullwidthRanges2, halfwidthRanges2, narrowRanges2, wideRanges2;
|
|
34782
|
-
var init_lookup_data2 = __esm(() => {
|
|
34783
|
-
ambiguousRanges2 = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
34784
|
-
fullwidthRanges2 = [12288, 12288, 65281, 65376, 65504, 65510];
|
|
34785
|
-
halfwidthRanges2 = [8361, 8361, 65377, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65512, 65518];
|
|
34786
|
-
narrowRanges2 = [32, 126, 162, 163, 165, 166, 172, 172, 175, 175, 10214, 10221, 10629, 10630];
|
|
34787
|
-
wideRanges2 = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101589, 101631, 101662, 101760, 101874, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110882, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110951, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128728, 128732, 128735, 128747, 128748, 128756, 128764, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129674, 129678, 129734, 129736, 129736, 129741, 129756, 129759, 129770, 129775, 129784, 131072, 196605, 196608, 262141];
|
|
34788
|
-
});
|
|
34789
|
-
|
|
34790
|
-
// node_modules/slice-ansi/node_modules/is-fullwidth-code-point/node_modules/get-east-asian-width/utilities.js
|
|
34791
|
-
var isInRange2 = (ranges, codePoint) => {
|
|
34792
|
-
let low = 0;
|
|
34793
|
-
let high = Math.floor(ranges.length / 2) - 1;
|
|
34794
|
-
while (low <= high) {
|
|
34795
|
-
const mid = Math.floor((low + high) / 2);
|
|
34796
|
-
const i = mid * 2;
|
|
34797
|
-
if (codePoint < ranges[i]) {
|
|
34798
|
-
high = mid - 1;
|
|
34799
|
-
} else if (codePoint > ranges[i + 1]) {
|
|
34800
|
-
low = mid + 1;
|
|
34801
|
-
} else {
|
|
34802
|
-
return true;
|
|
34803
|
-
}
|
|
34804
|
-
}
|
|
34805
|
-
return false;
|
|
34806
|
-
};
|
|
34807
|
-
|
|
34808
|
-
// node_modules/slice-ansi/node_modules/is-fullwidth-code-point/node_modules/get-east-asian-width/lookup.js
|
|
34809
|
-
function findWideFastPathRange2(ranges) {
|
|
34810
|
-
let fastPathStart = ranges[0];
|
|
34811
|
-
let fastPathEnd = ranges[1];
|
|
34812
|
-
for (let index = 0;index < ranges.length; index += 2) {
|
|
34813
|
-
const start = ranges[index];
|
|
34814
|
-
const end = ranges[index + 1];
|
|
34815
|
-
if (commonCjkCodePoint2 >= start && commonCjkCodePoint2 <= end) {
|
|
34816
|
-
return [start, end];
|
|
34817
|
-
}
|
|
34818
|
-
if (end - start > fastPathEnd - fastPathStart) {
|
|
34819
|
-
fastPathStart = start;
|
|
34820
|
-
fastPathEnd = end;
|
|
34821
|
-
}
|
|
34822
|
-
}
|
|
34823
|
-
return [fastPathStart, fastPathEnd];
|
|
34824
|
-
}
|
|
34825
|
-
var minimumAmbiguousCodePoint2, maximumAmbiguousCodePoint2, minimumFullWidthCodePoint2, maximumFullWidthCodePoint2, minimumHalfWidthCodePoint2, maximumHalfWidthCodePoint2, minimumNarrowCodePoint2, maximumNarrowCodePoint2, minimumWideCodePoint2, maximumWideCodePoint2, commonCjkCodePoint2 = 19968, wideFastPathStart2, wideFastPathEnd2, isFullWidth2 = (codePoint) => {
|
|
34826
|
-
if (codePoint < minimumFullWidthCodePoint2 || codePoint > maximumFullWidthCodePoint2) {
|
|
34827
|
-
return false;
|
|
34828
|
-
}
|
|
34829
|
-
return isInRange2(fullwidthRanges2, codePoint);
|
|
34830
|
-
}, isWide2 = (codePoint) => {
|
|
34831
|
-
if (codePoint >= wideFastPathStart2 && codePoint <= wideFastPathEnd2) {
|
|
34832
|
-
return true;
|
|
34833
|
-
}
|
|
34834
|
-
if (codePoint < minimumWideCodePoint2 || codePoint > maximumWideCodePoint2) {
|
|
34835
|
-
return false;
|
|
34836
|
-
}
|
|
34837
|
-
return isInRange2(wideRanges2, codePoint);
|
|
34838
|
-
};
|
|
34839
|
-
var init_lookup2 = __esm(() => {
|
|
34840
|
-
init_lookup_data2();
|
|
34841
|
-
minimumAmbiguousCodePoint2 = ambiguousRanges2[0];
|
|
34842
|
-
maximumAmbiguousCodePoint2 = ambiguousRanges2.at(-1);
|
|
34843
|
-
minimumFullWidthCodePoint2 = fullwidthRanges2[0];
|
|
34844
|
-
maximumFullWidthCodePoint2 = fullwidthRanges2.at(-1);
|
|
34845
|
-
minimumHalfWidthCodePoint2 = halfwidthRanges2[0];
|
|
34846
|
-
maximumHalfWidthCodePoint2 = halfwidthRanges2.at(-1);
|
|
34847
|
-
minimumNarrowCodePoint2 = narrowRanges2[0];
|
|
34848
|
-
maximumNarrowCodePoint2 = narrowRanges2.at(-1);
|
|
34849
|
-
minimumWideCodePoint2 = wideRanges2[0];
|
|
34850
|
-
maximumWideCodePoint2 = wideRanges2.at(-1);
|
|
34851
|
-
[wideFastPathStart2, wideFastPathEnd2] = findWideFastPathRange2(wideRanges2);
|
|
34852
|
-
});
|
|
34853
|
-
|
|
34854
|
-
// node_modules/slice-ansi/node_modules/is-fullwidth-code-point/node_modules/get-east-asian-width/index.js
|
|
34855
|
-
var init_get_east_asian_width2 = __esm(() => {
|
|
34856
|
-
init_lookup2();
|
|
34857
|
-
});
|
|
34858
|
-
|
|
34859
34760
|
// node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js
|
|
34860
34761
|
function isFullwidthCodePoint2(codePoint) {
|
|
34861
34762
|
if (!Number.isInteger(codePoint)) {
|
|
34862
34763
|
return false;
|
|
34863
34764
|
}
|
|
34864
|
-
return
|
|
34765
|
+
return isFullWidth(codePoint) || isWide(codePoint);
|
|
34865
34766
|
}
|
|
34866
34767
|
var init_is_fullwidth_code_point = __esm(() => {
|
|
34867
|
-
|
|
34768
|
+
init_get_east_asian_width();
|
|
34868
34769
|
});
|
|
34869
34770
|
|
|
34870
34771
|
// node_modules/slice-ansi/index.js
|
|
@@ -34923,15 +34824,15 @@ function tokenize(string, endCharacter = Number.POSITIVE_INFINITY) {
|
|
|
34923
34824
|
continue;
|
|
34924
34825
|
}
|
|
34925
34826
|
}
|
|
34926
|
-
const
|
|
34827
|
+
const isFullWidth2 = isFullwidthCodePoint2(codePoint);
|
|
34927
34828
|
const character = String.fromCodePoint(codePoint);
|
|
34928
34829
|
returnValue.push({
|
|
34929
34830
|
type: "character",
|
|
34930
34831
|
value: character,
|
|
34931
|
-
isFullWidth:
|
|
34832
|
+
isFullWidth: isFullWidth2
|
|
34932
34833
|
});
|
|
34933
34834
|
index += character.length;
|
|
34934
|
-
visibleCount +=
|
|
34835
|
+
visibleCount += isFullWidth2 ? 2 : character.length;
|
|
34935
34836
|
if (visibleCount >= endCharacter) {
|
|
34936
34837
|
break;
|
|
34937
34838
|
}
|
|
@@ -39447,8 +39348,8 @@ function emoji() {
|
|
|
39447
39348
|
}
|
|
39448
39349
|
function timeSource(args) {
|
|
39449
39350
|
const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
|
|
39450
|
-
const
|
|
39451
|
-
return
|
|
39351
|
+
const regex2 = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
39352
|
+
return regex2;
|
|
39452
39353
|
}
|
|
39453
39354
|
function time(args) {
|
|
39454
39355
|
return new RegExp(`^${timeSource(args)}$`);
|
|
@@ -39477,8 +39378,8 @@ var cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uui
|
|
|
39477
39378
|
const escapedDelim = escapeRegex(delimiter ?? ":");
|
|
39478
39379
|
return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
|
|
39479
39380
|
}, cidrv4, cidrv6, base64, base64url, hostname, domain, e164, dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`, date, string = (params) => {
|
|
39480
|
-
const
|
|
39481
|
-
return new RegExp(`^${
|
|
39381
|
+
const regex2 = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
39382
|
+
return new RegExp(`^${regex2}$`);
|
|
39482
39383
|
}, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
|
|
39483
39384
|
var init_regexes = __esm(() => {
|
|
39484
39385
|
init_util();
|
|
@@ -49099,7 +49000,7 @@ function finalize(ctx, schema) {
|
|
|
49099
49000
|
result2.$schema = "http://json-schema.org/draft-07/schema#";
|
|
49100
49001
|
} else if (ctx.target === "draft-04") {
|
|
49101
49002
|
result2.$schema = "http://json-schema.org/draft-04/schema#";
|
|
49102
|
-
} else if (ctx.target === "openapi-3.0") {}
|
|
49003
|
+
} else if (ctx.target === "openapi-3.0") {}
|
|
49103
49004
|
if (ctx.external?.uri) {
|
|
49104
49005
|
const id = ctx.external.registry.get(schema)?.id;
|
|
49105
49006
|
if (!id)
|
|
@@ -49267,9 +49168,9 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
49267
49168
|
json.pattern = regexes[0].source;
|
|
49268
49169
|
else if (regexes.length > 1) {
|
|
49269
49170
|
json.allOf = [
|
|
49270
|
-
...regexes.map((
|
|
49171
|
+
...regexes.map((regex2) => ({
|
|
49271
49172
|
...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
|
|
49272
|
-
pattern:
|
|
49173
|
+
pattern: regex2.source
|
|
49273
49174
|
}))
|
|
49274
49175
|
];
|
|
49275
49176
|
}
|
|
@@ -49364,7 +49265,7 @@ var formatMap, stringProcessor = (schema, ctx, _json, _params) => {
|
|
|
49364
49265
|
if (val === undefined) {
|
|
49365
49266
|
if (ctx.unrepresentable === "throw") {
|
|
49366
49267
|
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
49367
|
-
}
|
|
49268
|
+
}
|
|
49368
49269
|
} else if (typeof val === "bigint") {
|
|
49369
49270
|
if (ctx.unrepresentable === "throw") {
|
|
49370
49271
|
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
@@ -50484,10 +50385,10 @@ function hex2(_params) {
|
|
|
50484
50385
|
function hash(alg, params) {
|
|
50485
50386
|
const enc = params?.enc ?? "hex";
|
|
50486
50387
|
const format = `${alg}_${enc}`;
|
|
50487
|
-
const
|
|
50488
|
-
if (!
|
|
50388
|
+
const regex2 = exports_regexes[format];
|
|
50389
|
+
if (!regex2)
|
|
50489
50390
|
throw new Error(`Unrecognized hash format: ${format}`);
|
|
50490
|
-
return _stringFormat(ZodCustomStringFormat, format,
|
|
50391
|
+
return _stringFormat(ZodCustomStringFormat, format, regex2, params);
|
|
50491
50392
|
}
|
|
50492
50393
|
function number2(params) {
|
|
50493
50394
|
return _number(ZodNumber, params);
|
|
@@ -55256,8 +55157,8 @@ function createUnicodePropertyRegex(pattern) {
|
|
|
55256
55157
|
return null;
|
|
55257
55158
|
}
|
|
55258
55159
|
}
|
|
55259
|
-
function matchesUnicodeProperty(character,
|
|
55260
|
-
return
|
|
55160
|
+
function matchesUnicodeProperty(character, regex2) {
|
|
55161
|
+
return regex2?.test(character) ?? false;
|
|
55261
55162
|
}
|
|
55262
55163
|
function isVariationSelector(codePoint) {
|
|
55263
55164
|
return codePoint >= VARIATION_SELECTOR_START && codePoint <= VARIATION_SELECTOR_END || codePoint >= VARIATION_SELECTOR_SUPPLEMENT_START && codePoint <= VARIATION_SELECTOR_SUPPLEMENT_END;
|
|
@@ -55748,8 +55649,8 @@ function getColorAnsiCode(colorName, colorLevel = "ansi16", isBackground = false
|
|
|
55748
55649
|
}
|
|
55749
55650
|
const colored = chalkFn("TEST");
|
|
55750
55651
|
const escapeChar = "\x1B";
|
|
55751
|
-
const
|
|
55752
|
-
const match =
|
|
55652
|
+
const ansiRegex3 = new RegExp(`^(${escapeChar.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\[[^m]+m)`);
|
|
55653
|
+
const match = ansiRegex3.exec(colored);
|
|
55753
55654
|
return match?.[1] ?? "";
|
|
55754
55655
|
}
|
|
55755
55656
|
function getColorDisplayName(colorName) {
|
|
@@ -56155,7 +56056,7 @@ function getTerminalWidth() {
|
|
|
56155
56056
|
function canDetectTerminalWidth() {
|
|
56156
56057
|
return probeTerminalWidth() !== null;
|
|
56157
56058
|
}
|
|
56158
|
-
var __dirname = "/
|
|
56059
|
+
var __dirname = "/home/runner/work/ccstatusline/ccstatusline/src/utils", PACKAGE_VERSION = "2.2.16";
|
|
56159
56060
|
var init_terminal = () => {};
|
|
56160
56061
|
|
|
56161
56062
|
// src/utils/renderer.ts
|
|
@@ -62026,17 +61927,17 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
62026
61927
|
}
|
|
62027
61928
|
const opts = options || {};
|
|
62028
61929
|
const posix = opts.windows;
|
|
62029
|
-
const
|
|
62030
|
-
const state =
|
|
62031
|
-
delete
|
|
61930
|
+
const regex2 = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
|
|
61931
|
+
const state = regex2.state;
|
|
61932
|
+
delete regex2.state;
|
|
62032
61933
|
let isIgnored = () => false;
|
|
62033
61934
|
if (opts.ignore) {
|
|
62034
61935
|
const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
62035
61936
|
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
62036
61937
|
}
|
|
62037
61938
|
const matcher = (input, returnObject = false) => {
|
|
62038
|
-
const { isMatch: isMatch2, match, output } = picomatch.test(input,
|
|
62039
|
-
const result2 = { glob, state, regex:
|
|
61939
|
+
const { isMatch: isMatch2, match, output } = picomatch.test(input, regex2, options, { glob, posix });
|
|
61940
|
+
const result2 = { glob, state, regex: regex2, posix, input, output, match, isMatch: isMatch2 };
|
|
62040
61941
|
if (typeof opts.onResult === "function") {
|
|
62041
61942
|
opts.onResult(result2);
|
|
62042
61943
|
}
|
|
@@ -62061,7 +61962,7 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
62061
61962
|
}
|
|
62062
61963
|
return matcher;
|
|
62063
61964
|
};
|
|
62064
|
-
picomatch.test = (input,
|
|
61965
|
+
picomatch.test = (input, regex2, options, { glob, posix } = {}) => {
|
|
62065
61966
|
if (typeof input !== "string") {
|
|
62066
61967
|
throw new TypeError("Expected input to be a string");
|
|
62067
61968
|
}
|
|
@@ -62078,16 +61979,16 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
62078
61979
|
}
|
|
62079
61980
|
if (match === false || opts.capture === true) {
|
|
62080
61981
|
if (opts.matchBase === true || opts.basename === true) {
|
|
62081
|
-
match = picomatch.matchBase(input,
|
|
61982
|
+
match = picomatch.matchBase(input, regex2, options, posix);
|
|
62082
61983
|
} else {
|
|
62083
|
-
match =
|
|
61984
|
+
match = regex2.exec(output);
|
|
62084
61985
|
}
|
|
62085
61986
|
}
|
|
62086
61987
|
return { isMatch: Boolean(match), match, output };
|
|
62087
61988
|
};
|
|
62088
61989
|
picomatch.matchBase = (input, glob, options) => {
|
|
62089
|
-
const
|
|
62090
|
-
return
|
|
61990
|
+
const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
61991
|
+
return regex2.test(utils.basename(input));
|
|
62091
61992
|
};
|
|
62092
61993
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
62093
61994
|
picomatch.parse = (pattern, options) => {
|
|
@@ -62107,11 +62008,11 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
62107
62008
|
if (state && state.negated === true) {
|
|
62108
62009
|
source = `^(?!${source}).*$`;
|
|
62109
62010
|
}
|
|
62110
|
-
const
|
|
62011
|
+
const regex2 = picomatch.toRegex(source, options);
|
|
62111
62012
|
if (returnState === true) {
|
|
62112
|
-
|
|
62013
|
+
regex2.state = state;
|
|
62113
62014
|
}
|
|
62114
|
-
return
|
|
62015
|
+
return regex2;
|
|
62115
62016
|
};
|
|
62116
62017
|
picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
|
|
62117
62018
|
if (!input || typeof input !== "string") {
|
|
@@ -64985,10 +64886,11 @@ class SessionUsageWidget {
|
|
|
64985
64886
|
return formatRawOrLabeledValue(item, "Session: ", `${previewPercent.toFixed(1)}%`);
|
|
64986
64887
|
}
|
|
64987
64888
|
const data = context.usageData ?? {};
|
|
64988
|
-
if (data.
|
|
64989
|
-
|
|
64990
|
-
|
|
64889
|
+
if (data.sessionUsage === undefined) {
|
|
64890
|
+
if (data.error)
|
|
64891
|
+
return getUsageErrorMessage(data.error);
|
|
64991
64892
|
return null;
|
|
64893
|
+
}
|
|
64992
64894
|
const percent = Math.max(0, Math.min(100, data.sessionUsage));
|
|
64993
64895
|
const renderedPercent = inverted ? 100 - percent : percent;
|
|
64994
64896
|
const getCursorOptions = () => {
|
|
@@ -65079,10 +64981,11 @@ class WeeklyUsageWidget {
|
|
|
65079
64981
|
return formatRawOrLabeledValue(item, "Weekly: ", `${previewPercent.toFixed(1)}%`);
|
|
65080
64982
|
}
|
|
65081
64983
|
const data = context.usageData ?? {};
|
|
65082
|
-
if (data.
|
|
65083
|
-
|
|
65084
|
-
|
|
64984
|
+
if (data.weeklyUsage === undefined) {
|
|
64985
|
+
if (data.error)
|
|
64986
|
+
return getUsageErrorMessage(data.error);
|
|
65085
64987
|
return null;
|
|
64988
|
+
}
|
|
65086
64989
|
const percent = Math.max(0, Math.min(100, data.weeklyUsage));
|
|
65087
64990
|
const renderedPercent = inverted ? 100 - percent : percent;
|
|
65088
64991
|
const getCursorOptions = () => {
|
|
@@ -65173,10 +65076,11 @@ class WeeklySonnetUsageWidget {
|
|
|
65173
65076
|
return formatRawOrLabeledValue(item, LABEL, `${previewPercent.toFixed(1)}%`);
|
|
65174
65077
|
}
|
|
65175
65078
|
const data = context.usageData ?? {};
|
|
65176
|
-
if (data.
|
|
65177
|
-
|
|
65178
|
-
|
|
65079
|
+
if (data.weeklySonnetUsage === undefined) {
|
|
65080
|
+
if (data.error)
|
|
65081
|
+
return getUsageErrorMessage(data.error);
|
|
65179
65082
|
return null;
|
|
65083
|
+
}
|
|
65180
65084
|
const percent = Math.max(0, Math.min(100, data.weeklySonnetUsage));
|
|
65181
65085
|
const renderedPercent = inverted ? 100 - percent : percent;
|
|
65182
65086
|
const getCursorOptions = () => {
|
|
@@ -65268,10 +65172,11 @@ class WeeklyOpusUsageWidget {
|
|
|
65268
65172
|
return formatRawOrLabeledValue(item, LABEL2, `${previewPercent.toFixed(1)}%`);
|
|
65269
65173
|
}
|
|
65270
65174
|
const data = context.usageData ?? {};
|
|
65271
|
-
if (data.
|
|
65272
|
-
|
|
65273
|
-
|
|
65175
|
+
if (data.weeklyOpusUsage === undefined) {
|
|
65176
|
+
if (data.error)
|
|
65177
|
+
return getUsageErrorMessage(data.error);
|
|
65274
65178
|
return null;
|
|
65179
|
+
}
|
|
65275
65180
|
const percent = Math.max(0, Math.min(100, data.weeklyOpusUsage));
|
|
65276
65181
|
const renderedPercent = inverted ? 100 - percent : percent;
|
|
65277
65182
|
const getCursorOptions = () => {
|
|
@@ -68510,7 +68415,7 @@ gradient.rainbow = rainbow;
|
|
|
68510
68415
|
gradient.pastel = pastel;
|
|
68511
68416
|
|
|
68512
68417
|
// node_modules/ink-gradient/dist/index.js
|
|
68513
|
-
|
|
68418
|
+
init_strip_ansi();
|
|
68514
68419
|
var Gradient = (props) => {
|
|
68515
68420
|
if (props.name && props.colors) {
|
|
68516
68421
|
throw new Error("The `name` and `colors` props are mutually exclusive");
|
|
@@ -68523,7 +68428,7 @@ var Gradient = (props) => {
|
|
|
68523
68428
|
} else {
|
|
68524
68429
|
throw new Error("Either `name` or `colors` prop must be provided");
|
|
68525
68430
|
}
|
|
68526
|
-
const applyGradient2 = (text) => gradient2.multiline(
|
|
68431
|
+
const applyGradient2 = (text) => gradient2.multiline(stripAnsi(text));
|
|
68527
68432
|
const containsBoxDescendant = (nodeChildren) => {
|
|
68528
68433
|
let hasBox = false;
|
|
68529
68434
|
const search = (value) => {
|
|
@@ -68659,6 +68564,13 @@ function splitCommandOutput(output) {
|
|
|
68659
68564
|
}
|
|
68660
68565
|
return paths;
|
|
68661
68566
|
}
|
|
68567
|
+
function isTransientBunxStatusLinePath(filePath) {
|
|
68568
|
+
const normalized = filePath.replace(/\\/g, "/");
|
|
68569
|
+
return /(?:^|\/)bunx-[^/]*ccstatusline@[^/]+\/node_modules\/\.bin\/ccstatusline(?:\.(?:cmd|ps1))?$/i.test(normalized);
|
|
68570
|
+
}
|
|
68571
|
+
function getPersistentCommandResolutionPaths(paths) {
|
|
68572
|
+
return paths.filter((path10) => !isTransientBunxStatusLinePath(path10));
|
|
68573
|
+
}
|
|
68662
68574
|
function getCommandResolutionPaths(command, { platform: platform2 = process.platform } = {}) {
|
|
68663
68575
|
try {
|
|
68664
68576
|
const output = platform2 === "win32" ? execFileSync5("where", [command], { encoding: "utf-8", timeout: COMMAND_LOOKUP_TIMEOUT_MS }) : execFileSync5("which", ["-a", command], { encoding: "utf-8", timeout: COMMAND_LOOKUP_TIMEOUT_MS });
|
|
@@ -68764,7 +68676,7 @@ Other matches: ${formatPathList(resolvedPaths.slice(1))}`;
|
|
|
68764
68676
|
return null;
|
|
68765
68677
|
}
|
|
68766
68678
|
function inspectGlobalCommandResolution(packageManager, options = {}) {
|
|
68767
|
-
const resolvedPaths = getCommandResolutionPaths("ccstatusline", options);
|
|
68679
|
+
const resolvedPaths = getPersistentCommandResolutionPaths(getCommandResolutionPaths("ccstatusline", options));
|
|
68768
68680
|
const expectedBinDir = getExpectedGlobalBinDir(packageManager, options);
|
|
68769
68681
|
return {
|
|
68770
68682
|
resolvedPaths,
|
|
@@ -68951,7 +68863,7 @@ function inspectActiveGlobalCommand({
|
|
|
68951
68863
|
commandAvailability,
|
|
68952
68864
|
platform: platform2 = process.platform
|
|
68953
68865
|
}) {
|
|
68954
|
-
const resolvedPaths = getCommandResolutionPaths("ccstatusline", { platform: platform2 });
|
|
68866
|
+
const resolvedPaths = getPersistentCommandResolutionPaths(getCommandResolutionPaths("ccstatusline", { platform: platform2 }));
|
|
68955
68867
|
const resolvedPath = resolvedPaths[0] ?? null;
|
|
68956
68868
|
const managerBins = {
|
|
68957
68869
|
npm: getManagerBinDir("npm", commandAvailability.npm, platform2),
|
|
@@ -68973,7 +68885,7 @@ function inspectGlobalPackageInstallations({
|
|
|
68973
68885
|
commandAvailability,
|
|
68974
68886
|
platform: platform2 = process.platform
|
|
68975
68887
|
}) {
|
|
68976
|
-
const resolvedPaths = getCommandResolutionPaths("ccstatusline", { platform: platform2 });
|
|
68888
|
+
const resolvedPaths = getPersistentCommandResolutionPaths(getCommandResolutionPaths("ccstatusline", { platform: platform2 }));
|
|
68977
68889
|
return [
|
|
68978
68890
|
inspectPackageManager("npm", commandAvailability.npm, resolvedPaths, platform2),
|
|
68979
68891
|
inspectPackageManager("bun", commandAvailability.bun, resolvedPaths, platform2)
|
|
@@ -75977,32 +75889,99 @@ var USAGE_WIDGET_TYPES = new Set([
|
|
|
75977
75889
|
"reset-timer",
|
|
75978
75890
|
"weekly-reset-timer"
|
|
75979
75891
|
]);
|
|
75980
|
-
var
|
|
75981
|
-
"
|
|
75982
|
-
"
|
|
75983
|
-
|
|
75892
|
+
var USAGE_DATA_FIELDS = [
|
|
75893
|
+
"sessionUsage",
|
|
75894
|
+
"sessionResetAt",
|
|
75895
|
+
"weeklyUsage",
|
|
75896
|
+
"weeklyResetAt",
|
|
75897
|
+
"weeklySonnetUsage",
|
|
75898
|
+
"weeklySonnetResetAt",
|
|
75899
|
+
"weeklyOpusUsage",
|
|
75900
|
+
"weeklyOpusResetAt",
|
|
75901
|
+
"extraUsageEnabled",
|
|
75902
|
+
"extraUsageLimit",
|
|
75903
|
+
"extraUsageUsed",
|
|
75904
|
+
"extraUsageUtilization"
|
|
75905
|
+
];
|
|
75906
|
+
var EMPTY_USAGE_REQUIREMENTS = [];
|
|
75907
|
+
var USAGE_WIDGET_REQUIREMENTS = {
|
|
75908
|
+
"session-usage": [{ field: "sessionUsage" }],
|
|
75909
|
+
"weekly-usage": [{ field: "weeklyUsage" }],
|
|
75910
|
+
"weekly-sonnet-usage": [{ field: "weeklySonnetUsage" }],
|
|
75911
|
+
"weekly-opus-usage": [{ field: "weeklyOpusUsage" }],
|
|
75912
|
+
"block-timer": [{ field: "sessionResetAt" }],
|
|
75913
|
+
"reset-timer": [{ field: "sessionResetAt" }],
|
|
75914
|
+
"weekly-reset-timer": [{ field: "weeklyResetAt" }]
|
|
75915
|
+
};
|
|
75916
|
+
var USAGE_CURSOR_REQUIREMENTS = {
|
|
75917
|
+
"session-usage": { field: "sessionResetAt" },
|
|
75918
|
+
"weekly-usage": { field: "weeklyResetAt" },
|
|
75919
|
+
"weekly-sonnet-usage": { field: "weeklySonnetResetAt", alternatives: ["weeklyResetAt"] },
|
|
75920
|
+
"weekly-opus-usage": { field: "weeklyOpusResetAt", alternatives: ["weeklyResetAt"] }
|
|
75921
|
+
};
|
|
75984
75922
|
function hasUsageDependentWidgets(lines) {
|
|
75985
75923
|
return lines.some((line) => line.some((item) => USAGE_WIDGET_TYPES.has(item.type)));
|
|
75986
75924
|
}
|
|
75987
|
-
function
|
|
75988
|
-
|
|
75989
|
-
|
|
75990
|
-
|
|
75991
|
-
|
|
75925
|
+
function isUsageCursorEnabled2(item) {
|
|
75926
|
+
return item.metadata?.cursor === "true";
|
|
75927
|
+
}
|
|
75928
|
+
function getUsageFieldRequirements(lines) {
|
|
75929
|
+
const requirements = [];
|
|
75992
75930
|
for (const line of lines) {
|
|
75993
75931
|
for (const item of line) {
|
|
75994
|
-
|
|
75995
|
-
|
|
75996
|
-
|
|
75997
|
-
|
|
75998
|
-
requirements.sonnet = true;
|
|
75999
|
-
} else if (item.type === "weekly-opus-usage") {
|
|
76000
|
-
requirements.opus = true;
|
|
75932
|
+
requirements.push(...USAGE_WIDGET_REQUIREMENTS[item.type] ?? EMPTY_USAGE_REQUIREMENTS);
|
|
75933
|
+
const cursorRequirement = USAGE_CURSOR_REQUIREMENTS[item.type];
|
|
75934
|
+
if (cursorRequirement && isUsageCursorEnabled2(item)) {
|
|
75935
|
+
requirements.push(cursorRequirement);
|
|
76001
75936
|
}
|
|
76002
75937
|
}
|
|
76003
75938
|
}
|
|
76004
75939
|
return requirements;
|
|
76005
75940
|
}
|
|
75941
|
+
function hasUsageDataField(data, field) {
|
|
75942
|
+
return data?.[field] !== undefined;
|
|
75943
|
+
}
|
|
75944
|
+
function isUsageRequirementSatisfied(data, requirement) {
|
|
75945
|
+
if (hasUsageDataField(data, requirement.field)) {
|
|
75946
|
+
return true;
|
|
75947
|
+
}
|
|
75948
|
+
return requirement.alternatives?.some((field) => hasUsageDataField(data, field)) ?? false;
|
|
75949
|
+
}
|
|
75950
|
+
function getMissingFetchFields(data, requirements) {
|
|
75951
|
+
const missing = new Set;
|
|
75952
|
+
for (const requirement of requirements) {
|
|
75953
|
+
if (!isUsageRequirementSatisfied(data, requirement)) {
|
|
75954
|
+
missing.add(requirement.field);
|
|
75955
|
+
}
|
|
75956
|
+
}
|
|
75957
|
+
return Array.from(missing);
|
|
75958
|
+
}
|
|
75959
|
+
function hasAnyUsageDataField(data) {
|
|
75960
|
+
return USAGE_DATA_FIELDS.some((field) => data?.[field] !== undefined);
|
|
75961
|
+
}
|
|
75962
|
+
function pickDefinedUsageFields(data) {
|
|
75963
|
+
return {
|
|
75964
|
+
...data?.sessionUsage !== undefined ? { sessionUsage: data.sessionUsage } : {},
|
|
75965
|
+
...data?.sessionResetAt !== undefined ? { sessionResetAt: data.sessionResetAt } : {},
|
|
75966
|
+
...data?.weeklyUsage !== undefined ? { weeklyUsage: data.weeklyUsage } : {},
|
|
75967
|
+
...data?.weeklyResetAt !== undefined ? { weeklyResetAt: data.weeklyResetAt } : {},
|
|
75968
|
+
...data?.weeklySonnetUsage !== undefined ? { weeklySonnetUsage: data.weeklySonnetUsage } : {},
|
|
75969
|
+
...data?.weeklySonnetResetAt !== undefined ? { weeklySonnetResetAt: data.weeklySonnetResetAt } : {},
|
|
75970
|
+
...data?.weeklyOpusUsage !== undefined ? { weeklyOpusUsage: data.weeklyOpusUsage } : {},
|
|
75971
|
+
...data?.weeklyOpusResetAt !== undefined ? { weeklyOpusResetAt: data.weeklyOpusResetAt } : {},
|
|
75972
|
+
...data?.extraUsageEnabled !== undefined ? { extraUsageEnabled: data.extraUsageEnabled } : {},
|
|
75973
|
+
...data?.extraUsageLimit !== undefined ? { extraUsageLimit: data.extraUsageLimit } : {},
|
|
75974
|
+
...data?.extraUsageUsed !== undefined ? { extraUsageUsed: data.extraUsageUsed } : {},
|
|
75975
|
+
...data?.extraUsageUtilization !== undefined ? { extraUsageUtilization: data.extraUsageUtilization } : {}
|
|
75976
|
+
};
|
|
75977
|
+
}
|
|
75978
|
+
function mergeUsageData(rateLimitsData, apiData) {
|
|
75979
|
+
return {
|
|
75980
|
+
...pickDefinedUsageFields(apiData),
|
|
75981
|
+
...pickDefinedUsageFields(rateLimitsData),
|
|
75982
|
+
...apiData.error ? { error: apiData.error } : {}
|
|
75983
|
+
};
|
|
75984
|
+
}
|
|
76006
75985
|
function epochSecondsToIsoString(epochSeconds) {
|
|
76007
75986
|
if (epochSeconds === null || epochSeconds === undefined || !Number.isFinite(epochSeconds)) {
|
|
76008
75987
|
return;
|
|
@@ -76021,10 +76000,7 @@ function extractUsageDataFromRateLimits(rateLimits) {
|
|
|
76021
76000
|
const weeklySonnetResetAt = epochSecondsToIsoString(rateLimits.seven_day_sonnet?.resets_at);
|
|
76022
76001
|
const weeklyOpusUsage = rateLimits.seven_day_opus === null ? 0 : rateLimits.seven_day_opus?.used_percentage ?? undefined;
|
|
76023
76002
|
const weeklyOpusResetAt = epochSecondsToIsoString(rateLimits.seven_day_opus?.resets_at);
|
|
76024
|
-
|
|
76025
|
-
return null;
|
|
76026
|
-
}
|
|
76027
|
-
return {
|
|
76003
|
+
const usageData = {
|
|
76028
76004
|
sessionUsage,
|
|
76029
76005
|
sessionResetAt,
|
|
76030
76006
|
weeklyUsage,
|
|
@@ -76034,39 +76010,20 @@ function extractUsageDataFromRateLimits(rateLimits) {
|
|
|
76034
76010
|
weeklyOpusUsage,
|
|
76035
76011
|
weeklyOpusResetAt
|
|
76036
76012
|
};
|
|
76037
|
-
|
|
76038
|
-
function hasCompleteRateLimitsUsageData(usageData, perModelRequirements) {
|
|
76039
|
-
if (usageData?.sessionUsage === undefined || usageData.sessionResetAt === undefined || usageData.weeklyUsage === undefined || usageData.weeklyResetAt === undefined) {
|
|
76040
|
-
return false;
|
|
76041
|
-
}
|
|
76042
|
-
if (perModelRequirements.sonnet && usageData.weeklySonnetUsage === undefined) {
|
|
76043
|
-
return false;
|
|
76044
|
-
}
|
|
76045
|
-
if (perModelRequirements.opus && usageData.weeklyOpusUsage === undefined) {
|
|
76046
|
-
return false;
|
|
76047
|
-
}
|
|
76048
|
-
return true;
|
|
76049
|
-
}
|
|
76050
|
-
function getRequiredUsageFields(perModelRequirements) {
|
|
76051
|
-
const requiredFields = [];
|
|
76052
|
-
if (perModelRequirements.sonnet) {
|
|
76053
|
-
requiredFields.push("weeklySonnetUsage");
|
|
76054
|
-
}
|
|
76055
|
-
if (perModelRequirements.opus) {
|
|
76056
|
-
requiredFields.push("weeklyOpusUsage");
|
|
76057
|
-
}
|
|
76058
|
-
return requiredFields;
|
|
76013
|
+
return hasAnyUsageDataField(usageData) ? usageData : null;
|
|
76059
76014
|
}
|
|
76060
76015
|
async function prefetchUsageDataIfNeeded(lines, data) {
|
|
76061
76016
|
if (!hasUsageDependentWidgets(lines)) {
|
|
76062
76017
|
return null;
|
|
76063
76018
|
}
|
|
76064
76019
|
const rateLimitsData = extractUsageDataFromRateLimits(data?.rate_limits);
|
|
76065
|
-
const
|
|
76066
|
-
|
|
76020
|
+
const requirements = getUsageFieldRequirements(lines);
|
|
76021
|
+
const missingFields = getMissingFetchFields(rateLimitsData, requirements);
|
|
76022
|
+
if (missingFields.length === 0) {
|
|
76067
76023
|
return rateLimitsData;
|
|
76068
76024
|
}
|
|
76069
|
-
|
|
76025
|
+
const apiData = await fetchUsageData({ requiredFields: missingFields });
|
|
76026
|
+
return mergeUsageData(rateLimitsData, apiData);
|
|
76070
76027
|
}
|
|
76071
76028
|
|
|
76072
76029
|
// src/ccstatusline.ts
|