@principal-ai/quality-lens-cli 0.1.46 → 0.1.47
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/cli.js +2 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -349,7 +349,7 @@ NOTE: as of Ohm v16, there is no default action for iteration nodes \u2014 see `
|
|
|
349
349
|
`],["terminal",{sourceInterval:[775,778]},"#"]]],["app",{sourceInterval:[780,783]},"any",[]]]]],UrlSpec:["define",{sourceInterval:[791,822]},null,[],["seq",{sourceInterval:[806,822]},["terminal",{sourceInterval:[806,809]},"@"],["app",{sourceInterval:[810,822]},"uriReference",[]]]],uriReference:["define",{sourceInterval:[827,859]},null,[],["alt",{sourceInterval:[842,859]},["app",{sourceInterval:[842,845]},"uri",[]],["app",{sourceInterval:[848,859]},"relativeRef",[]]]],uri:["define",{sourceInterval:[864,929]},null,[],["seq",{sourceInterval:[879,929]},["app",{sourceInterval:[879,885]},"scheme",[]],["terminal",{sourceInterval:[886,889]},":"],["opt",{sourceInterval:[890,899]},["app",{sourceInterval:[890,898]},"hierPart",[]]],["opt",{sourceInterval:[900,913]},["seq",{sourceInterval:[901,910]},["terminal",{sourceInterval:[901,904]},"?"],["app",{sourceInterval:[905,910]},"query",[]]]],["opt",{sourceInterval:[914,929]},["seq",{sourceInterval:[915,927]},["terminal",{sourceInterval:[915,918]},"#"],["app",{sourceInterval:[919,927]},"fragment",[]]]]]],hierPart_abempty:["define",{sourceInterval:[949,988]},null,[],["seq",{sourceInterval:[949,977]},["terminal",{sourceInterval:[950,954]},"//"],["app",{sourceInterval:[955,964]},"authority",[]],["app",{sourceInterval:[965,976]},"pathAbempty",[]]]],hierPart_absolute:["define",{sourceInterval:[1008,1032]},null,[],["app",{sourceInterval:[1008,1020]},"pathAbsolute",[]]],hierPart_rootless:["define",{sourceInterval:[1052,1076]},null,[],["app",{sourceInterval:[1052,1064]},"pathRootless",[]]],hierPart:["define",{sourceInterval:[934,1076]},null,[],["alt",{sourceInterval:[949,1076]},["app",{sourceInterval:[949,977]},"hierPart_abempty",[]],["app",{sourceInterval:[1008,1020]},"hierPart_absolute",[]],["app",{sourceInterval:[1052,1064]},"hierPart_rootless",[]]]],absoluteUri:["define",{sourceInterval:[1081,1130]},null,[],["seq",{sourceInterval:[1096,1130]},["app",{sourceInterval:[1096,1102]},"scheme",[]],["terminal",{sourceInterval:[1103,1106]},":"],["opt",{sourceInterval:[1107,1116]},["app",{sourceInterval:[1107,1115]},"hierPart",[]]],["opt",{sourceInterval:[1117,1130]},["seq",{sourceInterval:[1118,1127]},["terminal",{sourceInterval:[1118,1121]},"?"],["app",{sourceInterval:[1122,1127]},"query",[]]]]]],relativeRef:["define",{sourceInterval:[1135,1194]},null,[],["seq",{sourceInterval:[1150,1194]},["opt",{sourceInterval:[1150,1163]},["app",{sourceInterval:[1150,1162]},"relativePart",[]]],["opt",{sourceInterval:[1164,1177]},["seq",{sourceInterval:[1165,1174]},["terminal",{sourceInterval:[1165,1168]},"?"],["app",{sourceInterval:[1169,1174]},"query",[]]]],["opt",{sourceInterval:[1178,1194]},["seq",{sourceInterval:[1179,1191]},["terminal",{sourceInterval:[1179,1182]},"#"],["app",{sourceInterval:[1183,1191]},"fragment",[]]]]]],relativePart_abempty:["define",{sourceInterval:[1214,1251]},null,[],["seq",{sourceInterval:[1214,1240]},["terminal",{sourceInterval:[1214,1218]},"//"],["app",{sourceInterval:[1219,1228]},"authority",[]],["app",{sourceInterval:[1229,1240]},"pathAbempty",[]]]],relativePart_absolute:["define",{sourceInterval:[1271,1295]},null,[],["app",{sourceInterval:[1271,1283]},"pathAbsolute",[]]],relativePart_noscheme:["define",{sourceInterval:[1315,1339]},null,[],["app",{sourceInterval:[1315,1327]},"pathNoscheme",[]]],relativePart:["define",{sourceInterval:[1199,1339]},null,[],["alt",{sourceInterval:[1214,1339]},["app",{sourceInterval:[1214,1240]},"relativePart_abempty",[]],["app",{sourceInterval:[1271,1283]},"relativePart_absolute",[]],["app",{sourceInterval:[1315,1327]},"relativePart_noscheme",[]]]],scheme:["define",{sourceInterval:[1344,1392]},null,[],["seq",{sourceInterval:[1359,1392]},["app",{sourceInterval:[1359,1365]},"letter",[]],["star",{sourceInterval:[1366,1392]},["alt",{sourceInterval:[1367,1390]},["app",{sourceInterval:[1367,1372]},"alnum",[]],["terminal",{sourceInterval:[1375,1378]},"+"],["terminal",{sourceInterval:[1381,1384]},"-"],["terminal",{sourceInterval:[1387,1390]},"."]]]]],authority:["define",{sourceInterval:[1397,1446]},null,[],["seq",{sourceInterval:[1412,1446]},["opt",{sourceInterval:[1412,1428]},["seq",{sourceInterval:[1413,1425]},["app",{sourceInterval:[1413,1421]},"userinfo",[]],["terminal",{sourceInterval:[1422,1425]},"@"]]],["app",{sourceInterval:[1429,1433]},"host",[]],["opt",{sourceInterval:[1434,1446]},["seq",{sourceInterval:[1435,1443]},["terminal",{sourceInterval:[1435,1438]},":"],["app",{sourceInterval:[1439,1443]},"port",[]]]]]],userinfo:["define",{sourceInterval:[1451,1510]},null,[],["star",{sourceInterval:[1466,1510]},["alt",{sourceInterval:[1467,1508]},["app",{sourceInterval:[1467,1477]},"unreserved",[]],["app",{sourceInterval:[1480,1490]},"pctEncoded",[]],["app",{sourceInterval:[1493,1502]},"subDelims",[]],["terminal",{sourceInterval:[1505,1508]},":"]]]],host:["define",{sourceInterval:[1515,1563]},null,[],["alt",{sourceInterval:[1530,1563]},["app",{sourceInterval:[1530,1539]},"ipLiteral",[]],["app",{sourceInterval:[1542,1553]},"ipv4Address",[]],["app",{sourceInterval:[1556,1563]},"regName",[]]]],port:["define",{sourceInterval:[1568,1589]},null,[],["star",{sourceInterval:[1583,1589]},["app",{sourceInterval:[1583,1588]},"digit",[]]]],ipLiteral:["define",{sourceInterval:[1594,1642]},null,[],["seq",{sourceInterval:[1609,1642]},["terminal",{sourceInterval:[1609,1612]},"["],["alt",{sourceInterval:[1614,1637]},["app",{sourceInterval:[1614,1625]},"ipv6Address",[]],["app",{sourceInterval:[1628,1637]},"ipvFuture",[]]],["terminal",{sourceInterval:[1639,1642]},"]"]]],ipvFuture:["define",{sourceInterval:[1647,1709]},null,[],["seq",{sourceInterval:[1662,1709]},["terminal",{sourceInterval:[1662,1665]},"v"],["plus",{sourceInterval:[1666,1673]},["app",{sourceInterval:[1666,1672]},"hexdig",[]]],["terminal",{sourceInterval:[1674,1677]},"."],["plus",{sourceInterval:[1678,1709]},["alt",{sourceInterval:[1679,1707]},["app",{sourceInterval:[1679,1689]},"unreserved",[]],["app",{sourceInterval:[1692,1701]},"subDelims",[]],["terminal",{sourceInterval:[1704,1707]},":"]]]]],ipv6Address:["define",{sourceInterval:[1714,1750]},null,[],["plus",{sourceInterval:[1729,1750]},["alt",{sourceInterval:[1730,1748]},["app",{sourceInterval:[1730,1736]},"hexdig",[]],["terminal",{sourceInterval:[1739,1742]},":"],["terminal",{sourceInterval:[1745,1748]},"."]]]],ipv4Address:["define",{sourceInterval:[1825,1887]},null,[],["seq",{sourceInterval:[1840,1887]},["app",{sourceInterval:[1840,1848]},"decOctet",[]],["terminal",{sourceInterval:[1849,1852]},"."],["app",{sourceInterval:[1853,1861]},"decOctet",[]],["terminal",{sourceInterval:[1862,1865]},"."],["app",{sourceInterval:[1866,1874]},"decOctet",[]],["terminal",{sourceInterval:[1875,1878]},"."],["app",{sourceInterval:[1879,1887]},"decOctet",[]]]],nz:["define",{sourceInterval:[1892,1917]},null,[],["seq",{sourceInterval:[1907,1917]},["not",{sourceInterval:[1907,1911]},["terminal",{sourceInterval:[1908,1911]},"0"]],["app",{sourceInterval:[1912,1917]},"digit",[]]]],decOctet_zeroToNine:["define",{sourceInterval:[1937,1956]},null,[],["app",{sourceInterval:[1937,1942]},"digit",[]]],decOctet_tenToNinetyNine:["define",{sourceInterval:[1976,2003]},null,[],["seq",{sourceInterval:[1976,1984]},["app",{sourceInterval:[1976,1978]},"nz",[]],["app",{sourceInterval:[1979,1984]},"digit",[]]]],decOctet_oneHundredToOneNinetyNine:["define",{sourceInterval:[2023,2067]},null,[],["seq",{sourceInterval:[2023,2038]},["terminal",{sourceInterval:[2023,2026]},"1"],["app",{sourceInterval:[2027,2032]},"digit",[]],["app",{sourceInterval:[2033,2038]},"digit",[]]]],decOctet_twoHundredToTwoFortyNine:["define",{sourceInterval:[2087,2154]},null,[],["seq",{sourceInterval:[2087,2126]},["terminal",{sourceInterval:[2087,2090]},"2"],["alt",{sourceInterval:[2092,2119]},["terminal",{sourceInterval:[2092,2095]},"0"],["terminal",{sourceInterval:[2098,2101]},"1"],["terminal",{sourceInterval:[2104,2107]},"2"],["terminal",{sourceInterval:[2110,2113]},"3"],["terminal",{sourceInterval:[2116,2119]},"4"]],["app",{sourceInterval:[2121,2126]},"digit",[]]]],decOctet_twoFiftyToTwoFiftyFive:["define",{sourceInterval:[2174,2240]},null,[],["seq",{sourceInterval:[2174,2214]},["terminal",{sourceInterval:[2174,2178]},"25"],["alt",{sourceInterval:[2180,2213]},["terminal",{sourceInterval:[2180,2183]},"0"],["terminal",{sourceInterval:[2186,2189]},"1"],["terminal",{sourceInterval:[2192,2195]},"2"],["terminal",{sourceInterval:[2198,2201]},"3"],["terminal",{sourceInterval:[2204,2207]},"4"],["terminal",{sourceInterval:[2210,2213]},"5"]]]],decOctet:["define",{sourceInterval:[1922,2240]},null,[],["alt",{sourceInterval:[1937,2240]},["app",{sourceInterval:[1937,1942]},"decOctet_zeroToNine",[]],["app",{sourceInterval:[1976,1984]},"decOctet_tenToNinetyNine",[]],["app",{sourceInterval:[2023,2038]},"decOctet_oneHundredToOneNinetyNine",[]],["app",{sourceInterval:[2087,2126]},"decOctet_twoHundredToTwoFortyNine",[]],["app",{sourceInterval:[2174,2214]},"decOctet_twoFiftyToTwoFiftyFive",[]]]],regName:["define",{sourceInterval:[2245,2298]},null,[],["star",{sourceInterval:[2260,2298]},["alt",{sourceInterval:[2261,2296]},["app",{sourceInterval:[2261,2271]},"unreserved",[]],["app",{sourceInterval:[2274,2284]},"pctEncoded",[]],["app",{sourceInterval:[2287,2296]},"subDelims",[]]]]],path:["define",{sourceInterval:[2303,2523]},null,[],["alt",{sourceInterval:[2318,2523]},["app",{sourceInterval:[2318,2329]},"pathAbempty",[]],["app",{sourceInterval:[2380,2392]},"pathAbsolute",[]],["app",{sourceInterval:[2444,2456]},"pathNoscheme",[]],["app",{sourceInterval:[2511,2523]},"pathRootless",[]]]],pathAbempty:["define",{sourceInterval:[2553,2582]},null,[],["star",{sourceInterval:[2568,2582]},["seq",{sourceInterval:[2569,2580]},["terminal",{sourceInterval:[2569,2572]},"/"],["app",{sourceInterval:[2573,2580]},"segment",[]]]]],pathAbsolute:["define",{sourceInterval:[2587,2634]},null,[],["seq",{sourceInterval:[2602,2634]},["terminal",{sourceInterval:[2602,2605]},"/"],["opt",{sourceInterval:[2606,2634]},["seq",{sourceInterval:[2607,2631]},["app",{sourceInterval:[2607,2616]},"segmentNz",[]],["star",{sourceInterval:[2617,2631]},["seq",{sourceInterval:[2618,2629]},["terminal",{sourceInterval:[2618,2621]},"/"],["app",{sourceInterval:[2622,2629]},"segment",[]]]]]]]],pathNoscheme:["define",{sourceInterval:[2639,2680]},null,[],["seq",{sourceInterval:[2654,2680]},["app",{sourceInterval:[2654,2665]},"segmentNzNc",[]],["star",{sourceInterval:[2666,2680]},["seq",{sourceInterval:[2667,2678]},["terminal",{sourceInterval:[2667,2670]},"/"],["app",{sourceInterval:[2671,2678]},"segment",[]]]]]],pathRootless:["define",{sourceInterval:[2685,2724]},null,[],["seq",{sourceInterval:[2700,2724]},["app",{sourceInterval:[2700,2709]},"segmentNz",[]],["star",{sourceInterval:[2710,2724]},["seq",{sourceInterval:[2711,2722]},["terminal",{sourceInterval:[2711,2714]},"/"],["app",{sourceInterval:[2715,2722]},"segment",[]]]]]],segment:["define",{sourceInterval:[2729,2750]},null,[],["star",{sourceInterval:[2744,2750]},["app",{sourceInterval:[2744,2749]},"pchar",[]]]],segmentNz:["define",{sourceInterval:[2755,2776]},null,[],["plus",{sourceInterval:[2770,2776]},["app",{sourceInterval:[2770,2775]},"pchar",[]]]],segmentNzNc:["define",{sourceInterval:[2781,2840]},null,[],["plus",{sourceInterval:[2796,2840]},["alt",{sourceInterval:[2797,2838]},["app",{sourceInterval:[2797,2807]},"unreserved",[]],["app",{sourceInterval:[2810,2820]},"pctEncoded",[]],["app",{sourceInterval:[2823,2832]},"subDelims",[]],["terminal",{sourceInterval:[2835,2838]},"@"]]]],pchar:["define",{sourceInterval:[2894,2956]},null,[],["alt",{sourceInterval:[2909,2956]},["app",{sourceInterval:[2909,2919]},"unreserved",[]],["app",{sourceInterval:[2922,2932]},"pctEncoded",[]],["app",{sourceInterval:[2935,2944]},"subDelims",[]],["terminal",{sourceInterval:[2947,2950]},":"],["terminal",{sourceInterval:[2953,2956]},"@"]]],query:["define",{sourceInterval:[2961,2996]},null,[],["star",{sourceInterval:[2976,2996]},["alt",{sourceInterval:[2977,2994]},["app",{sourceInterval:[2977,2982]},"pchar",[]],["terminal",{sourceInterval:[2985,2988]},"/"],["terminal",{sourceInterval:[2991,2994]},"?"]]]],fragment:["define",{sourceInterval:[3001,3036]},null,[],["star",{sourceInterval:[3016,3036]},["alt",{sourceInterval:[3017,3034]},["app",{sourceInterval:[3017,3022]},"pchar",[]],["terminal",{sourceInterval:[3025,3028]},"/"],["terminal",{sourceInterval:[3031,3034]},"?"]]]],pctEncoded:["define",{sourceInterval:[3041,3066]},null,[],["seq",{sourceInterval:[3056,3066]},["terminal",{sourceInterval:[3056,3059]},"%"],["app",{sourceInterval:[3060,3066]},"hexdig",[]]]],unreserved:["define",{sourceInterval:[3071,3115]},null,[],["alt",{sourceInterval:[3086,3115]},["app",{sourceInterval:[3086,3091]},"alnum",[]],["terminal",{sourceInterval:[3094,3097]},"-"],["terminal",{sourceInterval:[3100,3103]},"."],["terminal",{sourceInterval:[3106,3109]},"_"],["terminal",{sourceInterval:[3112,3115]},"~"]]],reserved:["define",{sourceInterval:[3120,3156]},null,[],["alt",{sourceInterval:[3135,3156]},["app",{sourceInterval:[3135,3144]},"genDelims",[]],["app",{sourceInterval:[3147,3156]},"subDelims",[]]]],genDelims:["define",{sourceInterval:[3161,3216]},null,[],["alt",{sourceInterval:[3176,3216]},["terminal",{sourceInterval:[3176,3179]},":"],["terminal",{sourceInterval:[3182,3185]},"/"],["terminal",{sourceInterval:[3188,3191]},"?"],["terminal",{sourceInterval:[3194,3197]},"#"],["terminal",{sourceInterval:[3200,3203]},"("],["terminal",{sourceInterval:[3206,3210]},")?"],["terminal",{sourceInterval:[3213,3216]},"@"]]],subDelims:["define",{sourceInterval:[3221,3299]},null,[],["alt",{sourceInterval:[3236,3299]},["terminal",{sourceInterval:[3236,3239]},"!"],["terminal",{sourceInterval:[3242,3245]},"$"],["terminal",{sourceInterval:[3248,3251]},"&"],["terminal",{sourceInterval:[3254,3257]},"'"],["terminal",{sourceInterval:[3260,3263]},"("],["terminal",{sourceInterval:[3266,3269]},")"],["terminal",{sourceInterval:[3272,3275]},"*"],["terminal",{sourceInterval:[3278,3281]},"+"],["terminal",{sourceInterval:[3284,3287]},","],["terminal",{sourceInterval:[3290,3293]},";"],["terminal",{sourceInterval:[3296,3299]},"="]]],hexdig:["define",{sourceInterval:[3304,3396]},null,[],["alt",{sourceInterval:[3319,3396]},["app",{sourceInterval:[3319,3324]},"digit",[]],["terminal",{sourceInterval:[3327,3330]},"a"],["terminal",{sourceInterval:[3333,3336]},"A"],["terminal",{sourceInterval:[3339,3342]},"b"],["terminal",{sourceInterval:[3345,3348]},"B"],["terminal",{sourceInterval:[3351,3354]},"c"],["terminal",{sourceInterval:[3357,3360]},"C"],["terminal",{sourceInterval:[3363,3366]},"d"],["terminal",{sourceInterval:[3369,3372]},"D"],["terminal",{sourceInterval:[3375,3378]},"e"],["terminal",{sourceInterval:[3381,3384]},"E"],["terminal",{sourceInterval:[3387,3390]},"f"],["terminal",{sourceInterval:[3393,3396]},"F"]]],QuotedMarker:["define",{sourceInterval:[3429,3455]},null,[],["seq",{sourceInterval:[3445,3455]},["terminal",{sourceInterval:[3445,3448]},";"],["app",{sourceInterval:[3449,3455]},"Marker",[]]]],Marker:["define",{sourceInterval:[3460,3484]},null,[],["app",{sourceInterval:[3476,3484]},"MarkerOr",[]]],MarkerOr_node:["define",{sourceInterval:[3505,3537]},null,[],["seq",{sourceInterval:[3505,3529]},["app",{sourceInterval:[3505,3514]},"MarkerAnd",[]],["terminal",{sourceInterval:[3515,3519]},"or"],["app",{sourceInterval:[3520,3529]},"MarkerAnd",[]]]],MarkerOr_leaf:["define",{sourceInterval:[3558,3575]},null,[],["app",{sourceInterval:[3558,3567]},"MarkerAnd",[]]],MarkerOr:["define",{sourceInterval:[3489,3575]},null,[],["alt",{sourceInterval:[3505,3575]},["app",{sourceInterval:[3505,3529]},"MarkerOr_node",[]],["app",{sourceInterval:[3558,3567]},"MarkerOr_leaf",[]]]],MarkerAnd_node:["define",{sourceInterval:[3596,3631]},null,[],["seq",{sourceInterval:[3596,3623]},["app",{sourceInterval:[3596,3606]},"MarkerExpr",[]],["terminal",{sourceInterval:[3607,3612]},"and"],["app",{sourceInterval:[3613,3623]},"MarkerExpr",[]]]],MarkerAnd_leaf:["define",{sourceInterval:[3652,3670]},null,[],["app",{sourceInterval:[3652,3662]},"MarkerExpr",[]]],MarkerAnd:["define",{sourceInterval:[3580,3670]},null,[],["alt",{sourceInterval:[3596,3670]},["app",{sourceInterval:[3596,3623]},"MarkerAnd_node",[]],["app",{sourceInterval:[3652,3662]},"MarkerAnd_leaf",[]]]],MarkerExpr_leaf:["define",{sourceInterval:[3691,3727]},null,[],["seq",{sourceInterval:[3691,3719]},["app",{sourceInterval:[3691,3700]},"MarkerVar",[]],["app",{sourceInterval:[3701,3709]},"markerOp",[]],["app",{sourceInterval:[3710,3719]},"MarkerVar",[]]]],MarkerExpr_node:["define",{sourceInterval:[3748,3770]},null,[],["seq",{sourceInterval:[3748,3762]},["terminal",{sourceInterval:[3748,3751]},"("],["app",{sourceInterval:[3752,3758]},"Marker",[]],["terminal",{sourceInterval:[3759,3762]},")"]]],MarkerExpr:["define",{sourceInterval:[3675,3770]},null,[],["alt",{sourceInterval:[3691,3770]},["app",{sourceInterval:[3691,3719]},"MarkerExpr_leaf",[]],["app",{sourceInterval:[3748,3762]},"MarkerExpr_node",[]]]],MarkerVar:["define",{sourceInterval:[3775,3809]},null,[],["alt",{sourceInterval:[3791,3809]},["app",{sourceInterval:[3791,3797]},"envVar",[]],["app",{sourceInterval:[3800,3809]},"pythonStr",[]]]],markerOp_versionCmp:["define",{sourceInterval:[3830,3854]},null,[],["app",{sourceInterval:[3830,3840]},"versionCmp",[]]],markerOp_in:["define",{sourceInterval:[3875,3885]},null,[],["terminal",{sourceInterval:[3875,3879]},"in"]],markerOp_notIn:["define",{sourceInterval:[3906,3934]},null,[],["seq",{sourceInterval:[3906,3925]},["terminal",{sourceInterval:[3907,3912]},"not"],["plus",{sourceInterval:[3913,3919]},["app",{sourceInterval:[3913,3918]},"space",[]]],["terminal",{sourceInterval:[3920,3924]},"in"]]],markerOp:["define",{sourceInterval:[3814,3934]},null,[],["alt",{sourceInterval:[3830,3934]},["app",{sourceInterval:[3830,3840]},"markerOp_versionCmp",[]],["app",{sourceInterval:[3875,3879]},"markerOp_in",[]],["app",{sourceInterval:[3906,3925]},"markerOp_notIn",[]]]],pythonStr:["define",{sourceInterval:[3939,4039]},null,[],["alt",{sourceInterval:[3955,4039]},["seq",{sourceInterval:[3955,3986]},["terminal",{sourceInterval:[3955,3958]},"'"],["star",{sourceInterval:[3959,3982]},["alt",{sourceInterval:[3960,3980]},["app",{sourceInterval:[3960,3973]},"pythonStrChar",[]],["terminal",{sourceInterval:[3976,3980]},'"']]],["terminal",{sourceInterval:[3983,3986]},"'"]],["seq",{sourceInterval:[4007,4039]},["terminal",{sourceInterval:[4007,4011]},'"'],["star",{sourceInterval:[4012,4034]},["alt",{sourceInterval:[4013,4032]},["app",{sourceInterval:[4013,4026]},"pythonStrChar",[]],["terminal",{sourceInterval:[4029,4032]},"'"]]],["terminal",{sourceInterval:[4035,4039]},'"']]]],pythonStrChar:["define",{sourceInterval:[4044,4265]},null,[],["alt",{sourceInterval:[4060,4265]},["app",{sourceInterval:[4060,4065]},"space",[]],["app",{sourceInterval:[4068,4073]},"alnum",[]],["terminal",{sourceInterval:[4076,4079]},"("],["terminal",{sourceInterval:[4082,4085]},")"],["terminal",{sourceInterval:[4088,4091]},"."],["terminal",{sourceInterval:[4094,4097]},"{"],["terminal",{sourceInterval:[4100,4103]},"}"],["terminal",{sourceInterval:[4106,4109]},"-"],["terminal",{sourceInterval:[4112,4115]},"_"],["terminal",{sourceInterval:[4118,4121]},"*"],["terminal",{sourceInterval:[4124,4127]},"#"],["terminal",{sourceInterval:[4130,4133]},":"],["terminal",{sourceInterval:[4136,4139]},";"],["terminal",{sourceInterval:[4142,4145]},","],["terminal",{sourceInterval:[4148,4151]},"/"],["terminal",{sourceInterval:[4154,4157]},"?"],["terminal",{sourceInterval:[4178,4181]},"["],["terminal",{sourceInterval:[4184,4187]},"]"],["terminal",{sourceInterval:[4190,4193]},"!"],["terminal",{sourceInterval:[4196,4199]},"~"],["terminal",{sourceInterval:[4202,4205]},"`"],["terminal",{sourceInterval:[4208,4211]},"@"],["terminal",{sourceInterval:[4214,4217]},"$"],["terminal",{sourceInterval:[4220,4223]},"%"],["terminal",{sourceInterval:[4226,4229]},"^"],["terminal",{sourceInterval:[4232,4235]},"&"],["terminal",{sourceInterval:[4238,4241]},"="],["terminal",{sourceInterval:[4244,4247]},"+"],["terminal",{sourceInterval:[4250,4253]},"|"],["terminal",{sourceInterval:[4256,4259]},"<"],["terminal",{sourceInterval:[4262,4265]},">"]]],envVar:["define",{sourceInterval:[4270,4570]},null,[],["alt",{sourceInterval:[4286,4570]},["terminal",{sourceInterval:[4286,4302]},"python_version"],["terminal",{sourceInterval:[4305,4326]},"python_full_version"],["terminal",{sourceInterval:[4329,4338]},"os_name"],["terminal",{sourceInterval:[4341,4355]},"sys_platform"],["terminal",{sourceInterval:[4358,4376]},"platform_release"],["terminal",{sourceInterval:[4397,4414]},"platform_system"],["terminal",{sourceInterval:[4417,4435]},"platform_version"],["terminal",{sourceInterval:[4438,4456]},"platform_machine"],["terminal",{sourceInterval:[4459,4491]},"platform_python_implementation"],["terminal",{sourceInterval:[4512,4533]},"implementation_name"],["terminal",{sourceInterval:[4536,4560]},"implementation_version"],["terminal",{sourceInterval:[4563,4570]},"extra"]]],VersionSpec_parenthesized:["define",{sourceInterval:[4717,4753]},null,[],["seq",{sourceInterval:[4717,4736]},["terminal",{sourceInterval:[4717,4720]},"("],["app",{sourceInterval:[4721,4732]},"VersionMany",[]],["terminal",{sourceInterval:[4733,4736]},")"]]],VersionSpec_direct:["define",{sourceInterval:[4774,4795]},null,[],["app",{sourceInterval:[4774,4785]},"VersionMany",[]]],VersionSpec:["define",{sourceInterval:[4701,4795]},null,[],["alt",{sourceInterval:[4717,4795]},["app",{sourceInterval:[4717,4736]},"VersionSpec_parenthesized",[]],["app",{sourceInterval:[4774,4785]},"VersionSpec_direct",[]]]],VersionMany:["define",{sourceInterval:[4800,4839]},null,[],["app",{sourceInterval:[4816,4839]},"ListOf",[["app",{sourceInterval:[4823,4833]},"VersionOne",[]],["terminal",{sourceInterval:[4835,4838]},","]]]],VersionOne:["define",{sourceInterval:[4844,4878]},null,[],["seq",{sourceInterval:[4860,4878]},["app",{sourceInterval:[4860,4870]},"versionCmp",[]],["app",{sourceInterval:[4871,4878]},"version",[]]]],versionCmp:["define",{sourceInterval:[4883,4951]},null,[],["alt",{sourceInterval:[4899,4951]},["terminal",{sourceInterval:[4899,4903]},"<="],["terminal",{sourceInterval:[4906,4909]},"<"],["terminal",{sourceInterval:[4912,4916]},"!="],["terminal",{sourceInterval:[4919,4923]},"=="],["terminal",{sourceInterval:[4926,4930]},">="],["terminal",{sourceInterval:[4933,4936]},">"],["terminal",{sourceInterval:[4939,4943]},"~="],["terminal",{sourceInterval:[4946,4951]},"==="]]],version:["define",{sourceInterval:[4956,5017]},null,[],["plus",{sourceInterval:[4972,5017]},["alt",{sourceInterval:[4973,5014]},["app",{sourceInterval:[4973,4978]},"alnum",[]],["terminal",{sourceInterval:[4981,4984]},"-"],["terminal",{sourceInterval:[4987,4990]},"_"],["terminal",{sourceInterval:[4993,4996]},"."],["terminal",{sourceInterval:[4999,5002]},"*"],["terminal",{sourceInterval:[5005,5008]},"+"],["terminal",{sourceInterval:[5011,5014]},"!"]]]],comment:["define",{sourceInterval:[5023,5049]},null,[],["seq",{sourceInterval:[5033,5049]},["terminal",{sourceInterval:[5033,5036]},"#"],["star",{sourceInterval:[5037,5049]},["seq",{sourceInterval:[5038,5047]},["not",{sourceInterval:[5038,5043]},["terminal",{sourceInterval:[5039,5043]},`
|
|
350
350
|
`]],["app",{sourceInterval:[5044,5047]},"any",[]]]]]],space:["override",{sourceInterval:[5055,5074]},null,[],["alt",{sourceInterval:[5064,5074]},["terminal",{sourceInterval:[5064,5067]}," "],["terminal",{sourceInterval:[5070,5074]}," "]]],LooseFile:["define",{sourceInterval:[5291,5334]},null,[],["app",{sourceInterval:[5311,5334]},"ListOf",[["app",{sourceInterval:[5318,5327]},"LooseLine",[]],["terminal",{sourceInterval:[5329,5333]},`
|
|
351
351
|
`]]]],LooseLine:["define",{sourceInterval:[5339,5376]},null,[],["seq",{sourceInterval:[5359,5376]},["app",{sourceInterval:[5359,5367]},"LooseReq",[]],["opt",{sourceInterval:[5368,5376]},["app",{sourceInterval:[5368,5375]},"comment",[]]]]],LooseReq:["define",{sourceInterval:[5381,5431]},null,[],["alt",{sourceInterval:[5401,5431]},["app",{sourceInterval:[5401,5416]},"LooseNonNameReq",[]],["app",{sourceInterval:[5419,5431]},"LooseNameReq",[]]]],LooseNameReq:["define",{sourceInterval:[5436,5509]},null,[],["seq",{sourceInterval:[5456,5509]},["app",{sourceInterval:[5456,5460]},"Name",[]],["opt",{sourceInterval:[5461,5473]},["app",{sourceInterval:[5461,5472]},"LooseExtras",[]]],["app",{sourceInterval:[5474,5490]},"LooseVersionSpec",[]],["opt",{sourceInterval:[5491,5509]},["app",{sourceInterval:[5491,5508]},"LooseQuotedMarker",[]]]]],LooseNonNameReq:["define",{sourceInterval:[5514,5569]},null,[],["seq",{sourceInterval:[5534,5569]},["not",{sourceInterval:[5535,5554]},["seq",{sourceInterval:[5537,5553]},["not",{sourceInterval:[5537,5548]},["seq",{sourceInterval:[5539,5547]},["app",{sourceInterval:[5539,5543]},"Name",[]],["terminal",{sourceInterval:[5544,5547]},"@"]]],["app",{sourceInterval:[5549,5553]},"Name",[]]]],["app",{sourceInterval:[5555,5568]},"looseAnything",[]]]],LooseExtras:["define",{sourceInterval:[5634,5689]},null,[],["seq",{sourceInterval:[5654,5689]},["terminal",{sourceInterval:[5654,5657]},"["],["opt",{sourceInterval:[5658,5689]},["seq",{sourceInterval:[5659,5687]},["app",{sourceInterval:[5659,5682]},"ListOf",[["app",{sourceInterval:[5666,5676]},"identifier",[]],["terminal",{sourceInterval:[5678,5681]},","]]],["opt",{sourceInterval:[5683,5687]},["terminal",{sourceInterval:[5683,5686]},"]"]]]]]],LooseQuotedMarker:["define",{sourceInterval:[5694,5731]},null,[],["seq",{sourceInterval:[5714,5731]},["terminal",{sourceInterval:[5714,5717]},";"],["app",{sourceInterval:[5718,5731]},"looseAnything",[]]]],LooseVersionSpec_parenthesized:["define",{sourceInterval:[5756,5801]},null,[],["seq",{sourceInterval:[5756,5784]},["terminal",{sourceInterval:[5756,5759]},"("],["opt",{sourceInterval:[5760,5784]},["seq",{sourceInterval:[5761,5782]},["app",{sourceInterval:[5761,5777]},"LooseVersionMany",[]],["opt",{sourceInterval:[5778,5782]},["terminal",{sourceInterval:[5778,5781]},")"]]]]]],LooseVersionSpec_direct:["define",{sourceInterval:[5826,5852]},null,[],["app",{sourceInterval:[5826,5842]},"LooseVersionMany",[]]],LooseVersionSpec:["define",{sourceInterval:[5736,5852]},null,[],["alt",{sourceInterval:[5756,5852]},["app",{sourceInterval:[5756,5784]},"LooseVersionSpec_parenthesized",[]],["app",{sourceInterval:[5826,5842]},"LooseVersionSpec_direct",[]]]],LooseVersionMany:["define",{sourceInterval:[5857,5910]},null,[],["seq",{sourceInterval:[5877,5910]},["app",{sourceInterval:[5877,5905]},"ListOf",[["app",{sourceInterval:[5884,5899]},"LooseVersionOne",[]],["terminal",{sourceInterval:[5901,5904]},","]]],["opt",{sourceInterval:[5906,5910]},["terminal",{sourceInterval:[5906,5909]},","]]]],LooseVersionOne:["define",{sourceInterval:[5915,5967]},null,[],["opt",{sourceInterval:[5935,5967]},["seq",{sourceInterval:[5936,5965]},["app",{sourceInterval:[5936,5951]},"looseVersionCmp",[]],["opt",{sourceInterval:[5952,5965]},["app",{sourceInterval:[5952,5964]},"looseVersion",[]]]]]],looseVersionCmp:["define",{sourceInterval:[5972,6022]},null,[],["plus",{sourceInterval:[5992,6022]},["alt",{sourceInterval:[5993,6020]},["terminal",{sourceInterval:[5993,5996]},"<"],["terminal",{sourceInterval:[5999,6002]},"="],["terminal",{sourceInterval:[6005,6008]},"!"],["terminal",{sourceInterval:[6011,6014]},">"],["terminal",{sourceInterval:[6017,6020]},"~"]]]],looseVersion:["define",{sourceInterval:[6027,6092]},null,[],["plus",{sourceInterval:[6047,6092]},["alt",{sourceInterval:[6048,6089]},["app",{sourceInterval:[6048,6053]},"alnum",[]],["terminal",{sourceInterval:[6056,6059]},"-"],["terminal",{sourceInterval:[6062,6065]},"_"],["terminal",{sourceInterval:[6068,6071]},"."],["terminal",{sourceInterval:[6074,6077]},"*"],["terminal",{sourceInterval:[6080,6083]},"+"],["terminal",{sourceInterval:[6086,6089]},"!"]]]],looseAnything:["define",{sourceInterval:[6097,6137]},null,[],["star",{sourceInterval:[6117,6137]},["seq",{sourceInterval:[6118,6135]},["not",{sourceInterval:[6118,6131]},["alt",{sourceInterval:[6120,6130]},["terminal",{sourceInterval:[6120,6124]},`
|
|
352
|
-
`],["terminal",{sourceInterval:[6127,6130]},"#"]]],["app",{sourceInterval:[6132,6135]},"any",[]]]]]}]);jft.exports=Gcr});var dke=jt(OT=>{"use strict";var Hcr=OT&&OT.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(OT,"__esModule",{value:!0});OT.RequirementsSyntaxError=OT.semantics=void 0;var Qcr=Hcr(_ke());OT.semantics=Qcr.default.createSemantics();OT.semantics.addOperation("extract",{File:_=>_.asIteration().children.map(c=>c.extract()).filter(Boolean),Line:(_,c)=>{var f;return((f=_.child(0))===null||f===void 0?void 0:f.extract())||null},NameReq:(_,c,f,g)=>{var S,k;return{type:"ProjectName",name:_.sourceString,versionSpec:f.extract(),extras:(S=c.child(0))===null||S===void 0?void 0:S.extract(),environmentMarkerTree:(k=g.child(0))===null||k===void 0?void 0:k.extract()}},UrlReq:(_,c,f,g,S)=>{var k,B;return{type:"ProjectURL",name:_.sourceString,url:f.extract(),extras:(k=c.child(0))===null||k===void 0?void 0:k.extract(),environmentMarkerTree:(B=S.child(0))===null||B===void 0?void 0:B.extract()}},Extras:(_,c,f)=>c.asIteration().children.map(g=>g.sourceString),RequirementsReq:(_,c)=>({type:"RequirementsFile",path:c.sourceString}),ConstraintsReq:(_,c)=>({type:"ConstraintsFile",path:c.sourceString}),UrlSpec:(_,c)=>c.sourceString,QuotedMarker:(_,c)=>c.extract(),MarkerOr_node:(_,c,f)=>({operator:"or",left:_.extract(),right:f.extract()}),MarkerAnd_node:(_,c,f)=>({operator:"and",left:_.extract(),right:f.extract()}),MarkerExpr_leaf:(_,c,f)=>({left:_.sourceString,operator:c.sourceString,right:f.sourceString}),MarkerExpr_node:(_,c,f)=>c.extract(),VersionSpec_parenthesized:(_,c,f)=>c.extract()||[],VersionMany:_=>{let c=_.asIteration().children;if(c.length!==0)return c.map(f=>f.extract())},VersionOne:(_,c)=>({operator:_.sourceString,version:c.sourceString})});OT.semantics.addOperation("extractLoosely",{LooseFile:_=>_.asIteration().children.map(c=>c.extractLoosely()).filter(Boolean),LooseLine:(_,c)=>{var f;return((f=_.child(0))===null||f===void 0?void 0:f.extractLoosely())||null},LooseNameReq:(_,c,f,g)=>({type:"ProjectName",name:_.sourceString}),LooseNonNameReq:_=>null});var pke=class extends Error{};OT.RequirementsSyntaxError=pke});var Uft=jt(VR=>{"use strict";Object.defineProperty(VR,"__esModule",{value:!0});VR.VersionOperator=VR.EnvironmentMarkerVariable=void 0;var Jft;(function(_){_.PythonVersion="python_version",_.PythonFullVersion="python_full_version",_.OsName="os_name",_.SysPlatform="sys_platform",_.PlatformRelease="platform_release",_.PlatformSystem="platform_system",_.PlatformVersion="platform_version",_.PlatformMachine="platform_machine",_.PlatformPythonImplementation="platform_python_implementation",_.ImplementationName="implementation_name",_.ImplementationVersion="implementation_version",_.Extra="extra"})(Jft||(VR.EnvironmentMarkerVariable=Jft={}));var qft;(function(_){_.CompatibleRelease="~=",_.VersionMatching="==",_.VersionExclusion="!=",_.LessThanOrMatching="<=",_.GreaterThanOrMatching=">=",_.LessThan="<",_.GreaterThan=">",_.ArbitrarilyEqual="==="})(qft||(VR.VersionOperator=qft={}))});var zft=jt(sg=>{"use strict";var Kcr=sg&&sg.__createBinding||(Object.create?(function(_,c,f,g){g===void 0&&(g=f);var S=Object.getOwnPropertyDescriptor(c,f);(!S||("get"in S?!c.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(_,g,S)}):(function(_,c,f,g){g===void 0&&(g=f),_[g]=c[f]})),Xcr=sg&&sg.__exportStar||function(_,c){for(var f in _)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&Kcr(c,_,f)},Ycr=sg&&sg.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(sg,"__esModule",{value:!0});sg.parsePipRequirementsLineLoosely=sg.parsePipRequirementsFileLoosely=sg.parsePipRequirementsLine=sg.parsePipRequirementsFile=sg.RequirementsSyntaxError=void 0;var yoe=Ycr(_ke()),U4=dke(),Zcr=dke();Object.defineProperty(sg,"RequirementsSyntaxError",{enumerable:!0,get:function(){return Zcr.RequirementsSyntaxError}});Xcr(Uft(),sg);function eur(_){let c=yoe.default.match(_,"File");if(c.failed())throw new U4.RequirementsSyntaxError(`Failed to parse requirements file. ${c.shortMessage}`);return(0,U4.semantics)(c).extract()}sg.parsePipRequirementsFile=eur;function tur(_){let c=yoe.default.match(_,"Line");if(c.failed())throw new U4.RequirementsSyntaxError(`Failed to parse requirements line. ${c.shortMessage}`);return(0,U4.semantics)(c).extract()}sg.parsePipRequirementsLine=tur;function rur(_){let c=yoe.default.match(_,"LooseFile");if(c.failed())throw new U4.RequirementsSyntaxError(`Failed to loosely parse requirements file. ${c.shortMessage}`);return(0,U4.semantics)(c).extractLoosely()}sg.parsePipRequirementsFileLoosely=rur;function nur(_){let c=yoe.default.match(_,"LooseLine");if(c.failed())throw new U4.RequirementsSyntaxError(`Failed to loosely parse requirements line. ${c.shortMessage}`);return(0,U4.semantics)(c).extractLoosely()}sg.parsePipRequirementsLineLoosely=nur});var Wft=jt(_$=>{"use strict";Object.defineProperty(_$,"__esModule",{value:!0});_$.isError=iur;_$.isString=sur;_$.isObject=aur;function iur(_){return _ instanceof Error}function sur(_){return typeof _=="string"}function aur(_){return typeof _=="object"&&_!==null&&!Array.isArray(_)}});var $ft=jt(Vft=>{"use strict";Object.defineProperty(Vft,"__esModule",{value:!0})});var Hft=jt(Gft=>{"use strict";Object.defineProperty(Gft,"__esModule",{value:!0})});var Kft=jt(Qft=>{"use strict";Object.defineProperty(Qft,"__esModule",{value:!0})});var Yft=jt(Xft=>{"use strict";Object.defineProperty(Xft,"__esModule",{value:!0})});var e_t=jt(Zft=>{"use strict";Object.defineProperty(Zft,"__esModule",{value:!0})});var t_t=jt(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.ALL_LENS_REQUIREMENTS=df.BIOME_REQUIREMENTS=df.KNIP_REQUIREMENTS=df.BUN_TEST_REQUIREMENTS=df.VITEST_REQUIREMENTS=df.JEST_REQUIREMENTS=df.PRETTIER_REQUIREMENTS=df.ESLINT_REQUIREMENTS=df.TYPESCRIPT_REQUIREMENTS=void 0;df.getLensRequirements=our;df.getAvailableLensIds=cur;df.TYPESCRIPT_REQUIREMENTS={lensId:"typescript",displayName:"TypeScript",devDependencies:[{type:"devDependency",name:"typescript",description:"TypeScript compiler",autoFixable:!0,suggestedFix:"^5.0.0",critical:!0}],scripts:[{type:"script",name:"typecheck",description:"Type checking script",commandPattern:"tsc",autoFixable:!0,suggestedFix:"tsc --noEmit",critical:!0}],configs:[{type:"config",name:"tsconfig.json",description:"TypeScript configuration",alternatives:["tsconfig.json","tsconfig.*.json"],autoFixable:!1,critical:!0}],notes:"Lens adds --pretty false --listFiles automatically when executing"};df.ESLINT_REQUIREMENTS={lensId:"eslint",displayName:"ESLint",devDependencies:[{type:"devDependency",name:"eslint",description:"ESLint linter",autoFixable:!0,suggestedFix:"^9.0.0",critical:!0}],scripts:[{type:"script",name:"lint",description:"Linting script",commandPattern:"eslint",autoFixable:!0,suggestedFix:"eslint .",critical:!0}],configs:[{type:"config",name:"eslint.config.js",description:"ESLint flat config (v9+)",alternatives:["eslint.config.js","eslint.config.mjs","eslint.config.cjs",".eslintrc.js",".eslintrc.cjs",".eslintrc.json",".eslintrc.yml",".eslintrc.yaml",".eslintrc"],autoFixable:!1,critical:!0}],notes:"Lens enforces --format=json output"};df.PRETTIER_REQUIREMENTS={lensId:"prettier",displayName:"Prettier",devDependencies:[{type:"devDependency",name:"prettier",description:"Prettier formatter",autoFixable:!0,suggestedFix:"^3.0.0",critical:!0}],scripts:[{type:"script",name:"format",description:"Format checking script",commandPattern:"prettier",autoFixable:!0,suggestedFix:"prettier --check .",critical:!0}],configs:[{type:"config",name:".prettierrc",description:"Prettier configuration",alternatives:[".prettierrc",".prettierrc.json",".prettierrc.js",".prettierrc.cjs",".prettierrc.mjs",".prettierrc.yml",".prettierrc.yaml",".prettierrc.toml","prettier.config.js","prettier.config.cjs","prettier.config.mjs"],autoFixable:!1,critical:!1}],notes:"Lens parses --check output; config is optional (uses defaults)"};df.JEST_REQUIREMENTS={lensId:"jest",displayName:"Jest",devDependencies:[{type:"devDependency",name:"jest",description:"Jest test framework",autoFixable:!0,suggestedFix:"^29.0.0",critical:!0}],scripts:[{type:"script",name:"test",description:"Test script",commandPattern:"jest",autoFixable:!0,suggestedFix:"jest",critical:!0}],configs:[{type:"config",name:"jest.config.js",description:"Jest configuration",alternatives:["jest.config.js","jest.config.cjs","jest.config.mjs","jest.config.ts","jest.config.json"],autoFixable:!1,critical:!1}],notes:"Lens expects --json output for parsing"};df.VITEST_REQUIREMENTS={lensId:"vitest",displayName:"Vitest",devDependencies:[{type:"devDependency",name:"vitest",description:"Vitest test framework",autoFixable:!0,suggestedFix:"^2.0.0",critical:!0}],scripts:[{type:"script",name:"test",description:"Test script",commandPattern:"vitest",autoFixable:!0,suggestedFix:"vitest run",critical:!0}],configs:[{type:"config",name:"vitest.config.ts",description:"Vitest configuration",alternatives:["vitest.config.ts","vitest.config.js","vitest.config.mjs","vite.config.ts","vite.config.js"],autoFixable:!1,critical:!1}],notes:"Lens parses Vitest JSON reporter output"};df.BUN_TEST_REQUIREMENTS={lensId:"bun-test",displayName:"Bun Test",devDependencies:[{type:"devDependency",name:"@types/bun",description:"Bun type definitions",autoFixable:!0,suggestedFix:"latest",critical:!1}],scripts:[{type:"script",name:"test",description:"Test script",commandPattern:"bun test",autoFixable:!0,suggestedFix:"bun test",critical:!0}],configs:[{type:"config",name:"bunfig.toml",description:"Bun configuration",alternatives:["bunfig.toml"],autoFixable:!1,critical:!1}],notes:"Bun is typically installed globally; lens checks for bun test in scripts"};df.KNIP_REQUIREMENTS={lensId:"knip",displayName:"Knip",devDependencies:[{type:"devDependency",name:"knip",description:"Knip dead code detector",autoFixable:!0,suggestedFix:"^5.0.0",critical:!0}],scripts:[{type:"script",name:"knip",description:"Dead code detection script",commandPattern:"knip",autoFixable:!0,suggestedFix:"knip",critical:!0}],configs:[{type:"config",name:"knip.json",description:"Knip configuration",alternatives:["knip.json","knip.jsonc",".knip.json",".knip.jsonc","knip.ts","knip.js"],autoFixable:!1,critical:!1}],notes:"Lens expects --reporter json output"};df.BIOME_REQUIREMENTS={lensId:"biome",displayName:"Biome",devDependencies:[{type:"devDependency",name:"@biomejs/biome",description:"Biome linter and formatter",autoFixable:!0,suggestedFix:"^1.0.0",critical:!0}],scripts:[{type:"script",name:"lint",description:"Biome lint script",commandPattern:"biome",autoFixable:!0,suggestedFix:"biome check .",critical:!0}],configs:[{type:"config",name:"biome.json",description:"Biome configuration",alternatives:["biome.json","biome.jsonc"],autoFixable:!1,critical:!0}],notes:"Biome combines linting and formatting; lens uses --reporter=json"};df.ALL_LENS_REQUIREMENTS={typescript:df.TYPESCRIPT_REQUIREMENTS,eslint:df.ESLINT_REQUIREMENTS,prettier:df.PRETTIER_REQUIREMENTS,jest:df.JEST_REQUIREMENTS,vitest:df.VITEST_REQUIREMENTS,"bun-test":df.BUN_TEST_REQUIREMENTS,knip:df.KNIP_REQUIREMENTS,biome:df.BIOME_REQUIREMENTS};function our(_){return df.ALL_LENS_REQUIREMENTS[_]}function cur(){return Object.keys(df.ALL_LENS_REQUIREMENTS)}});var LT=jt(I2=>{"use strict";var uur=I2&&I2.__createBinding||(Object.create?(function(_,c,f,g){g===void 0&&(g=f);var S=Object.getOwnPropertyDescriptor(c,f);(!S||("get"in S?!c.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(_,g,S)}):(function(_,c,f,g){g===void 0&&(g=f),_[g]=c[f]})),y7=I2&&I2.__exportStar||function(_,c){for(var f in _)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&uur(c,_,f)};Object.defineProperty(I2,"__esModule",{value:!0});y7(Wft(),I2);y7($ft(),I2);y7(Hft(),I2);y7(Kft(),I2);y7(Yft(),I2);y7(e_t(),I2);y7(t_t(),I2)});var CC=jt(voe=>{"use strict";Object.defineProperty(voe,"__esModule",{value:!0});voe.BaseLens=void 0;var mke=class{requirements;config;executor;options;constructor(c,f={}){this.executor=c,this.options={debug:!1,throwOnError:!1,...f}}configure(c){this.config=c,this.options.debug&&this.debug("Configured with:",c)}setExecutor(c){this.executor=c}async execute(){if(!this.config)throw new Error(`Lens ${this.name} is not configured`);if(!this.executor)throw new Error(`Lens ${this.name} has no executor`);let{tool:c}=this.config;if(!c.available)throw new Error(`Tool ${c.name} is not available`);this.debug(`Executing ${c.command} with args:`,c.args);let f=Date.now();try{let g=await this.executor.execute(c.command,c.args,{cwd:c.cwd||this.config.cwd,env:c.env,timeout:c.timeout||this.options.timeout});if(g.duration=Date.now()-f,this.options.debug&&this.debug("Execution result:",{exitCode:g.exitCode,duration:g.duration,stdoutLength:g.stdout.length,stderrLength:g.stderr.length}),g.exitCode!==0&&this.options.throwOnError)throw new Error(`${c.name} exited with code ${g.exitCode}: ${g.stderr||g.stdout}`);return g}catch(g){let S={stdout:"",stderr:g instanceof Error?g.message:String(g),exitCode:-1,duration:Date.now()-f,error:g instanceof Error?g:new Error(String(g))};if(this.options.throwOnError)throw g;return S}}async run(){try{let c=await this.execute();if(c.error)throw c.error;let f=this.parse(c),g=this.format(f),S={...g,timestamp:Date.now(),raw:{stdout:c.stdout,stderr:c.stderr,exitCode:c.exitCode}};return g.success===void 0&&(S.success=!c.error&&f!==null&&f!==void 0),S}catch(c){return this.createErrorResult(c)}}canHandle(c){return this.supportedTools.includes(c.name)}toRelativePath(c,f){let g=f||this.config?.cwd||process.cwd();return c.startsWith(g)?c.slice(g.length).replace(/^[/\\]/,""):c}createErrorResult(c){let f=c instanceof Error?c.message:String(c),g=c instanceof Error?c.stack:void 0;return{lensName:this.name,tool:this.config?.tool.name||"unknown",timestamp:Date.now(),success:!1,issues:[],error:{message:f,stack:g}}}debug(c,...f){this.options.debug&&console.log(`[${this.name}] ${c}`,...f)}addArgsToNpmScript(c){if(c.length===0||!this.config?.tool)return;this.config.tool.args||(this.config.tool.args=[]);let f=this.config.tool.args,g=this.config.tool.command.toLowerCase();(g==="npm"||g==="yarn")&&f.length>=2&&f[0]==="run"?f.includes("--")?this.config.tool.args=[...f,...c]:this.config.tool.args=[...f,"--",...c]:this.config.tool.args=[...f,...c]}mapSeverity(c){let f=c.toLowerCase();return f.includes("error")||f==="fatal"?"error":f.includes("warn")?"warning":f.includes("info")||f.includes("note")?"info":f.includes("hint")||f.includes("suggest")?"hint":"warning"}buildFileMetrics(c,f,g={}){let{errorWeight:S=10,warningWeight:k=3,infoWeight:B=1,hintWeight:Z=.5,isFixable:le=Fe=>!!Fe.fix}=g,me=new Map;for(let Fe of c)me.set(Fe,{issues:[],errorCount:0,warningCount:0,infoCount:0,hintCount:0,fixableCount:0,categories:new Map});for(let Fe of f){let Q=Fe.file;me.has(Q)||me.set(Q,{issues:[],errorCount:0,warningCount:0,infoCount:0,hintCount:0,fixableCount:0,categories:new Map});let et=me.get(Q);switch(et.issues.push(Fe),Fe.severity){case"error":et.errorCount++;break;case"warning":et.warningCount++;break;case"info":et.infoCount++;break;case"hint":et.hintCount++;break}if(le(Fe)&&et.fixableCount++,Fe.category){let Je=et.categories.get(Fe.category)||0;et.categories.set(Fe.category,Je+1)}}let De=[];for(let[Fe,Q]of me){let et=Q.errorCount*S+Q.warningCount*k+Q.infoCount*B+Q.hintCount*Z,Je=Math.max(0,Math.min(100,Math.round(100-et))),je={file:Fe,score:Je,issueCount:Q.issues.length,errorCount:Q.errorCount,warningCount:Q.warningCount,infoCount:Q.infoCount,hintCount:Q.hintCount};Q.fixableCount>0&&(je.fixableCount=Q.fixableCount),Q.categories.size>0&&(je.categories=Object.fromEntries(Q.categories)),De.push(je)}return De.sort((Fe,Q)=>Fe.score-Q.score),De}};voe.BaseLens=mke});var SC=jt(pE=>{"use strict";var lur=pE&&pE.__createBinding||(Object.create?(function(_,c,f,g){g===void 0&&(g=f);var S=Object.getOwnPropertyDescriptor(c,f);(!S||("get"in S?!c.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(_,g,S)}):(function(_,c,f,g){g===void 0&&(g=f),_[g]=c[f]})),fur=pE&&pE.__setModuleDefault||(Object.create?(function(_,c){Object.defineProperty(_,"default",{enumerable:!0,value:c})}):function(_,c){_.default=c}),_ur=pE&&pE.__importStar||(function(){var _=function(c){return _=Object.getOwnPropertyNames||function(f){var g=[];for(var S in f)Object.prototype.hasOwnProperty.call(f,S)&&(g[g.length]=S);return g},_(c)};return function(c){if(c&&c.__esModule)return c;var f={};if(c!=null)for(var g=_(c),S=0;S<g.length;S++)g[S]!=="default"&&lur(f,c,g[S]);return fur(f,c),f}})();Object.defineProperty(pE,"__esModule",{value:!0});pE.PathMapper=void 0;pE.createPathMapper=pur;var B0=_ur(require("path")),Doe=class _{basePath;constructor(c){this.basePath=c||process.cwd(),this.basePath=B0.resolve(this.basePath)}toRelative(c){if(!c)return"";if(!B0.isAbsolute(c))return this.normalizePath(c);let f=B0.resolve(c),g=B0.relative(this.basePath,f);return this.normalizePath(g)}toAbsolute(c){return c?B0.isAbsolute(c)?B0.resolve(c):B0.resolve(this.basePath,c):this.basePath}normalizePath(c){return c?c.split(B0.sep).join("/"):""}isWithinBase(c){return(B0.isAbsolute(c)?B0.resolve(c):B0.resolve(this.basePath,c)).startsWith(this.basePath)}getBasePath(){return this.basePath}setBasePath(c){this.basePath=B0.resolve(c)}getFileName(c){return B0.basename(c)}getDirectory(c){return this.normalizePath(B0.dirname(c))}getExtension(c){return B0.extname(c)}join(...c){return this.normalizePath(B0.join(...c))}mapToRelative(c){return c.map(f=>this.toRelative(f))}mapToAbsolute(c){return c.map(f=>this.toAbsolute(f))}createSubMapper(c){let f=B0.resolve(this.basePath,c);return new _(f)}};pE.PathMapper=Doe;function pur(_){return new Doe(_)}});var r_t=jt(boe=>{"use strict";Object.defineProperty(boe,"__esModule",{value:!0});boe.BiomeLens=void 0;var dur=CC(),mur=LT(),hur=SC(),hke=class _ extends dur.BaseLens{name="biome";description="JavaScript/TypeScript linter and formatter";languages=["javascript","typescript","json","css"];supportedTools=["biome"];requirements=mur.BIOME_REQUIREMENTS;pathMapper;mode="lint";setMode(c){this.mode=c}static calculateQualityScore(c){if(!c.success||c.error)return 0;let f=c.metrics;if(!f)return 100;let g=Math.max(f.filesAnalyzed,1),{error:S,warning:k}=f.issuesBySeverity,B=S/g*10,Z=k/g*2,le=B+Z,me=Math.max(0,Math.min(100,100-le));return Math.round(me*100)/100}parse(c){if(c.stderr&&!c.stdout){let f=c.stderr;if(f.trim().startsWith("{")||f.trim().startsWith("["))try{return JSON.parse(f)}catch{throw new Error(`Biome execution error: ${c.stderr}`)}throw new Error(`Biome execution error: ${c.stderr}`)}if(!c.stdout)return{diagnostics:[]};try{let f=c.stdout,g=f.search(/^\s*[{[]/m);return g>0&&(this.debug("Stripping npm script preamble from output"),f=f.substring(g)),JSON.parse(f)}catch(f){return this.debug("Failed to parse Biome output as JSON:",f),this.parseTextOutput(c.stdout||c.stderr||"")}}parseTextOutput(c){let f=[],g=c.split(`
|
|
352
|
+
`],["terminal",{sourceInterval:[6127,6130]},"#"]]],["app",{sourceInterval:[6132,6135]},"any",[]]]]]}]);jft.exports=Gcr});var dke=jt(OT=>{"use strict";var Hcr=OT&&OT.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(OT,"__esModule",{value:!0});OT.RequirementsSyntaxError=OT.semantics=void 0;var Qcr=Hcr(_ke());OT.semantics=Qcr.default.createSemantics();OT.semantics.addOperation("extract",{File:_=>_.asIteration().children.map(c=>c.extract()).filter(Boolean),Line:(_,c)=>{var f;return((f=_.child(0))===null||f===void 0?void 0:f.extract())||null},NameReq:(_,c,f,g)=>{var S,k;return{type:"ProjectName",name:_.sourceString,versionSpec:f.extract(),extras:(S=c.child(0))===null||S===void 0?void 0:S.extract(),environmentMarkerTree:(k=g.child(0))===null||k===void 0?void 0:k.extract()}},UrlReq:(_,c,f,g,S)=>{var k,B;return{type:"ProjectURL",name:_.sourceString,url:f.extract(),extras:(k=c.child(0))===null||k===void 0?void 0:k.extract(),environmentMarkerTree:(B=S.child(0))===null||B===void 0?void 0:B.extract()}},Extras:(_,c,f)=>c.asIteration().children.map(g=>g.sourceString),RequirementsReq:(_,c)=>({type:"RequirementsFile",path:c.sourceString}),ConstraintsReq:(_,c)=>({type:"ConstraintsFile",path:c.sourceString}),UrlSpec:(_,c)=>c.sourceString,QuotedMarker:(_,c)=>c.extract(),MarkerOr_node:(_,c,f)=>({operator:"or",left:_.extract(),right:f.extract()}),MarkerAnd_node:(_,c,f)=>({operator:"and",left:_.extract(),right:f.extract()}),MarkerExpr_leaf:(_,c,f)=>({left:_.sourceString,operator:c.sourceString,right:f.sourceString}),MarkerExpr_node:(_,c,f)=>c.extract(),VersionSpec_parenthesized:(_,c,f)=>c.extract()||[],VersionMany:_=>{let c=_.asIteration().children;if(c.length!==0)return c.map(f=>f.extract())},VersionOne:(_,c)=>({operator:_.sourceString,version:c.sourceString})});OT.semantics.addOperation("extractLoosely",{LooseFile:_=>_.asIteration().children.map(c=>c.extractLoosely()).filter(Boolean),LooseLine:(_,c)=>{var f;return((f=_.child(0))===null||f===void 0?void 0:f.extractLoosely())||null},LooseNameReq:(_,c,f,g)=>({type:"ProjectName",name:_.sourceString}),LooseNonNameReq:_=>null});var pke=class extends Error{};OT.RequirementsSyntaxError=pke});var Uft=jt(VR=>{"use strict";Object.defineProperty(VR,"__esModule",{value:!0});VR.VersionOperator=VR.EnvironmentMarkerVariable=void 0;var Jft;(function(_){_.PythonVersion="python_version",_.PythonFullVersion="python_full_version",_.OsName="os_name",_.SysPlatform="sys_platform",_.PlatformRelease="platform_release",_.PlatformSystem="platform_system",_.PlatformVersion="platform_version",_.PlatformMachine="platform_machine",_.PlatformPythonImplementation="platform_python_implementation",_.ImplementationName="implementation_name",_.ImplementationVersion="implementation_version",_.Extra="extra"})(Jft||(VR.EnvironmentMarkerVariable=Jft={}));var qft;(function(_){_.CompatibleRelease="~=",_.VersionMatching="==",_.VersionExclusion="!=",_.LessThanOrMatching="<=",_.GreaterThanOrMatching=">=",_.LessThan="<",_.GreaterThan=">",_.ArbitrarilyEqual="==="})(qft||(VR.VersionOperator=qft={}))});var zft=jt(sg=>{"use strict";var Kcr=sg&&sg.__createBinding||(Object.create?(function(_,c,f,g){g===void 0&&(g=f);var S=Object.getOwnPropertyDescriptor(c,f);(!S||("get"in S?!c.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(_,g,S)}):(function(_,c,f,g){g===void 0&&(g=f),_[g]=c[f]})),Xcr=sg&&sg.__exportStar||function(_,c){for(var f in _)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&Kcr(c,_,f)},Ycr=sg&&sg.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(sg,"__esModule",{value:!0});sg.parsePipRequirementsLineLoosely=sg.parsePipRequirementsFileLoosely=sg.parsePipRequirementsLine=sg.parsePipRequirementsFile=sg.RequirementsSyntaxError=void 0;var yoe=Ycr(_ke()),U4=dke(),Zcr=dke();Object.defineProperty(sg,"RequirementsSyntaxError",{enumerable:!0,get:function(){return Zcr.RequirementsSyntaxError}});Xcr(Uft(),sg);function eur(_){let c=yoe.default.match(_,"File");if(c.failed())throw new U4.RequirementsSyntaxError(`Failed to parse requirements file. ${c.shortMessage}`);return(0,U4.semantics)(c).extract()}sg.parsePipRequirementsFile=eur;function tur(_){let c=yoe.default.match(_,"Line");if(c.failed())throw new U4.RequirementsSyntaxError(`Failed to parse requirements line. ${c.shortMessage}`);return(0,U4.semantics)(c).extract()}sg.parsePipRequirementsLine=tur;function rur(_){let c=yoe.default.match(_,"LooseFile");if(c.failed())throw new U4.RequirementsSyntaxError(`Failed to loosely parse requirements file. ${c.shortMessage}`);return(0,U4.semantics)(c).extractLoosely()}sg.parsePipRequirementsFileLoosely=rur;function nur(_){let c=yoe.default.match(_,"LooseLine");if(c.failed())throw new U4.RequirementsSyntaxError(`Failed to loosely parse requirements line. ${c.shortMessage}`);return(0,U4.semantics)(c).extractLoosely()}sg.parsePipRequirementsLineLoosely=nur});var Wft=jt(_$=>{"use strict";Object.defineProperty(_$,"__esModule",{value:!0});_$.isError=iur;_$.isString=sur;_$.isObject=aur;function iur(_){return _ instanceof Error}function sur(_){return typeof _=="string"}function aur(_){return typeof _=="object"&&_!==null&&!Array.isArray(_)}});var $ft=jt(Vft=>{"use strict";Object.defineProperty(Vft,"__esModule",{value:!0})});var Hft=jt(Gft=>{"use strict";Object.defineProperty(Gft,"__esModule",{value:!0})});var Kft=jt(Qft=>{"use strict";Object.defineProperty(Qft,"__esModule",{value:!0})});var Yft=jt(Xft=>{"use strict";Object.defineProperty(Xft,"__esModule",{value:!0})});var e_t=jt(Zft=>{"use strict";Object.defineProperty(Zft,"__esModule",{value:!0})});var t_t=jt(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.ALL_LENS_REQUIREMENTS=df.BIOME_REQUIREMENTS=df.KNIP_REQUIREMENTS=df.BUN_TEST_REQUIREMENTS=df.VITEST_REQUIREMENTS=df.JEST_REQUIREMENTS=df.PRETTIER_REQUIREMENTS=df.ESLINT_REQUIREMENTS=df.TYPESCRIPT_REQUIREMENTS=void 0;df.getLensRequirements=our;df.getAvailableLensIds=cur;df.TYPESCRIPT_REQUIREMENTS={lensId:"typescript",displayName:"TypeScript",devDependencies:[{type:"devDependency",name:"typescript",description:"TypeScript compiler",autoFixable:!0,suggestedFix:"^5.0.0",critical:!0}],scripts:[{type:"script",name:"typecheck",description:"Type checking script",commandPattern:"tsc",autoFixable:!0,suggestedFix:"tsc --noEmit",critical:!0}],configs:[{type:"config",name:"tsconfig.json",description:"TypeScript configuration",alternatives:["tsconfig.json","tsconfig.*.json"],autoFixable:!1,critical:!0}],notes:"Lens adds --pretty false --listFiles automatically when executing"};df.ESLINT_REQUIREMENTS={lensId:"eslint",displayName:"ESLint",devDependencies:[{type:"devDependency",name:"eslint",description:"ESLint linter",autoFixable:!0,suggestedFix:"^9.0.0",critical:!0}],scripts:[{type:"script",name:"lint",description:"Linting script",commandPattern:"eslint",autoFixable:!0,suggestedFix:"eslint .",critical:!0}],configs:[{type:"config",name:"eslint.config.js",description:"ESLint flat config (v9+)",alternatives:["eslint.config.js","eslint.config.mjs","eslint.config.cjs",".eslintrc.js",".eslintrc.cjs",".eslintrc.json",".eslintrc.yml",".eslintrc.yaml",".eslintrc"],autoFixable:!1,critical:!0}],notes:"Lens enforces --format=json output"};df.PRETTIER_REQUIREMENTS={lensId:"prettier",displayName:"Prettier",devDependencies:[{type:"devDependency",name:"prettier",description:"Prettier formatter",autoFixable:!0,suggestedFix:"^3.0.0",critical:!0}],scripts:[{type:"script",name:"format",description:"Format checking script",commandPattern:"prettier",autoFixable:!0,suggestedFix:"prettier --check .",critical:!0}],configs:[{type:"config",name:".prettierrc",description:"Prettier configuration",alternatives:[".prettierrc",".prettierrc.json",".prettierrc.js",".prettierrc.cjs",".prettierrc.mjs",".prettierrc.yml",".prettierrc.yaml",".prettierrc.toml","prettier.config.js","prettier.config.cjs","prettier.config.mjs"],autoFixable:!1,critical:!1}],notes:"Lens parses --check output; config is optional (uses defaults)"};df.JEST_REQUIREMENTS={lensId:"jest",displayName:"Jest",devDependencies:[{type:"devDependency",name:"jest",description:"Jest test framework",autoFixable:!0,suggestedFix:"^29.0.0",critical:!0}],scripts:[{type:"script",name:"test:coverage",description:"Test script with coverage (required for file-level metrics)",commandPattern:"jest --coverage",autoFixable:!0,suggestedFix:"jest --coverage",critical:!0}],configs:[{type:"config",name:"jest.config.js",description:"Jest configuration",alternatives:["jest.config.js","jest.config.cjs","jest.config.mjs","jest.config.ts","jest.config.json"],autoFixable:!1,critical:!1}],notes:"Lens expects --json output for parsing"};df.VITEST_REQUIREMENTS={lensId:"vitest",displayName:"Vitest",devDependencies:[{type:"devDependency",name:"vitest",description:"Vitest test framework",autoFixable:!0,suggestedFix:"^2.0.0",critical:!0}],scripts:[{type:"script",name:"test:coverage",description:"Test script with coverage (required for file-level metrics)",commandPattern:"vitest --coverage",autoFixable:!0,suggestedFix:"vitest run --coverage",critical:!0}],configs:[{type:"config",name:"vitest.config.ts",description:"Vitest configuration",alternatives:["vitest.config.ts","vitest.config.js","vitest.config.mjs","vite.config.ts","vite.config.js"],autoFixable:!1,critical:!1}],notes:"Lens parses Vitest JSON reporter output"};df.BUN_TEST_REQUIREMENTS={lensId:"bun-test",displayName:"Bun Test",devDependencies:[{type:"devDependency",name:"@types/bun",description:"Bun type definitions",autoFixable:!0,suggestedFix:"latest",critical:!1}],scripts:[{type:"script",name:"test:coverage",description:"Test script with coverage (required for file-level metrics)",commandPattern:"bun test --coverage",autoFixable:!0,suggestedFix:"bun test --coverage",critical:!0}],configs:[{type:"config",name:"bunfig.toml",description:"Bun configuration",alternatives:["bunfig.toml"],autoFixable:!1,critical:!1}],notes:"Bun is typically installed globally; lens checks for bun test in scripts"};df.KNIP_REQUIREMENTS={lensId:"knip",displayName:"Knip",devDependencies:[{type:"devDependency",name:"knip",description:"Knip dead code detector",autoFixable:!0,suggestedFix:"^5.0.0",critical:!0}],scripts:[{type:"script",name:"knip",description:"Dead code detection script",commandPattern:"knip",autoFixable:!0,suggestedFix:"knip",critical:!0}],configs:[{type:"config",name:"knip.json",description:"Knip configuration",alternatives:["knip.json","knip.jsonc",".knip.json",".knip.jsonc","knip.ts","knip.js"],autoFixable:!1,critical:!1}],notes:"Lens expects --reporter json output"};df.BIOME_REQUIREMENTS={lensId:"biome",displayName:"Biome",devDependencies:[{type:"devDependency",name:"@biomejs/biome",description:"Biome linter and formatter",autoFixable:!0,suggestedFix:"^1.0.0",critical:!0}],scripts:[{type:"script",name:"lint",description:"Biome lint script",commandPattern:"biome",autoFixable:!0,suggestedFix:"biome check .",critical:!0}],configs:[{type:"config",name:"biome.json",description:"Biome configuration",alternatives:["biome.json","biome.jsonc"],autoFixable:!1,critical:!0}],notes:"Biome combines linting and formatting; lens uses --reporter=json"};df.ALL_LENS_REQUIREMENTS={typescript:df.TYPESCRIPT_REQUIREMENTS,eslint:df.ESLINT_REQUIREMENTS,prettier:df.PRETTIER_REQUIREMENTS,jest:df.JEST_REQUIREMENTS,vitest:df.VITEST_REQUIREMENTS,"bun-test":df.BUN_TEST_REQUIREMENTS,knip:df.KNIP_REQUIREMENTS,biome:df.BIOME_REQUIREMENTS};function our(_){return df.ALL_LENS_REQUIREMENTS[_]}function cur(){return Object.keys(df.ALL_LENS_REQUIREMENTS)}});var LT=jt(I2=>{"use strict";var uur=I2&&I2.__createBinding||(Object.create?(function(_,c,f,g){g===void 0&&(g=f);var S=Object.getOwnPropertyDescriptor(c,f);(!S||("get"in S?!c.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(_,g,S)}):(function(_,c,f,g){g===void 0&&(g=f),_[g]=c[f]})),y7=I2&&I2.__exportStar||function(_,c){for(var f in _)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&uur(c,_,f)};Object.defineProperty(I2,"__esModule",{value:!0});y7(Wft(),I2);y7($ft(),I2);y7(Hft(),I2);y7(Kft(),I2);y7(Yft(),I2);y7(e_t(),I2);y7(t_t(),I2)});var CC=jt(voe=>{"use strict";Object.defineProperty(voe,"__esModule",{value:!0});voe.BaseLens=void 0;var mke=class{requirements;config;executor;options;constructor(c,f={}){this.executor=c,this.options={debug:!1,throwOnError:!1,...f}}configure(c){this.config=c,this.options.debug&&this.debug("Configured with:",c)}setExecutor(c){this.executor=c}async execute(){if(!this.config)throw new Error(`Lens ${this.name} is not configured`);if(!this.executor)throw new Error(`Lens ${this.name} has no executor`);let{tool:c}=this.config;if(!c.available)throw new Error(`Tool ${c.name} is not available`);this.debug(`Executing ${c.command} with args:`,c.args);let f=Date.now();try{let g=await this.executor.execute(c.command,c.args,{cwd:c.cwd||this.config.cwd,env:c.env,timeout:c.timeout||this.options.timeout});if(g.duration=Date.now()-f,this.options.debug&&this.debug("Execution result:",{exitCode:g.exitCode,duration:g.duration,stdoutLength:g.stdout.length,stderrLength:g.stderr.length}),g.exitCode!==0&&this.options.throwOnError)throw new Error(`${c.name} exited with code ${g.exitCode}: ${g.stderr||g.stdout}`);return g}catch(g){let S={stdout:"",stderr:g instanceof Error?g.message:String(g),exitCode:-1,duration:Date.now()-f,error:g instanceof Error?g:new Error(String(g))};if(this.options.throwOnError)throw g;return S}}async run(){try{let c=await this.execute();if(c.error)throw c.error;let f=this.parse(c),g=this.format(f),S={...g,timestamp:Date.now(),raw:{stdout:c.stdout,stderr:c.stderr,exitCode:c.exitCode}};return g.success===void 0&&(S.success=!c.error&&f!==null&&f!==void 0),S}catch(c){return this.createErrorResult(c)}}canHandle(c){return this.supportedTools.includes(c.name)}toRelativePath(c,f){let g=f||this.config?.cwd||process.cwd();return c.startsWith(g)?c.slice(g.length).replace(/^[/\\]/,""):c}createErrorResult(c){let f=c instanceof Error?c.message:String(c),g=c instanceof Error?c.stack:void 0;return{lensName:this.name,tool:this.config?.tool.name||"unknown",timestamp:Date.now(),success:!1,issues:[],error:{message:f,stack:g}}}debug(c,...f){this.options.debug&&console.log(`[${this.name}] ${c}`,...f)}addArgsToNpmScript(c){if(c.length===0||!this.config?.tool)return;this.config.tool.args||(this.config.tool.args=[]);let f=this.config.tool.args,g=this.config.tool.command.toLowerCase();(g==="npm"||g==="yarn")&&f.length>=2&&f[0]==="run"?f.includes("--")?this.config.tool.args=[...f,...c]:this.config.tool.args=[...f,"--",...c]:this.config.tool.args=[...f,...c]}mapSeverity(c){let f=c.toLowerCase();return f.includes("error")||f==="fatal"?"error":f.includes("warn")?"warning":f.includes("info")||f.includes("note")?"info":f.includes("hint")||f.includes("suggest")?"hint":"warning"}buildFileMetrics(c,f,g={}){let{errorWeight:S=10,warningWeight:k=3,infoWeight:B=1,hintWeight:Z=.5,isFixable:le=Fe=>!!Fe.fix}=g,me=new Map;for(let Fe of c)me.set(Fe,{issues:[],errorCount:0,warningCount:0,infoCount:0,hintCount:0,fixableCount:0,categories:new Map});for(let Fe of f){let Q=Fe.file;me.has(Q)||me.set(Q,{issues:[],errorCount:0,warningCount:0,infoCount:0,hintCount:0,fixableCount:0,categories:new Map});let et=me.get(Q);switch(et.issues.push(Fe),Fe.severity){case"error":et.errorCount++;break;case"warning":et.warningCount++;break;case"info":et.infoCount++;break;case"hint":et.hintCount++;break}if(le(Fe)&&et.fixableCount++,Fe.category){let Je=et.categories.get(Fe.category)||0;et.categories.set(Fe.category,Je+1)}}let De=[];for(let[Fe,Q]of me){let et=Q.errorCount*S+Q.warningCount*k+Q.infoCount*B+Q.hintCount*Z,Je=Math.max(0,Math.min(100,Math.round(100-et))),je={file:Fe,score:Je,issueCount:Q.issues.length,errorCount:Q.errorCount,warningCount:Q.warningCount,infoCount:Q.infoCount,hintCount:Q.hintCount};Q.fixableCount>0&&(je.fixableCount=Q.fixableCount),Q.categories.size>0&&(je.categories=Object.fromEntries(Q.categories)),De.push(je)}return De.sort((Fe,Q)=>Fe.score-Q.score),De}};voe.BaseLens=mke});var SC=jt(pE=>{"use strict";var lur=pE&&pE.__createBinding||(Object.create?(function(_,c,f,g){g===void 0&&(g=f);var S=Object.getOwnPropertyDescriptor(c,f);(!S||("get"in S?!c.__esModule:S.writable||S.configurable))&&(S={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(_,g,S)}):(function(_,c,f,g){g===void 0&&(g=f),_[g]=c[f]})),fur=pE&&pE.__setModuleDefault||(Object.create?(function(_,c){Object.defineProperty(_,"default",{enumerable:!0,value:c})}):function(_,c){_.default=c}),_ur=pE&&pE.__importStar||(function(){var _=function(c){return _=Object.getOwnPropertyNames||function(f){var g=[];for(var S in f)Object.prototype.hasOwnProperty.call(f,S)&&(g[g.length]=S);return g},_(c)};return function(c){if(c&&c.__esModule)return c;var f={};if(c!=null)for(var g=_(c),S=0;S<g.length;S++)g[S]!=="default"&&lur(f,c,g[S]);return fur(f,c),f}})();Object.defineProperty(pE,"__esModule",{value:!0});pE.PathMapper=void 0;pE.createPathMapper=pur;var B0=_ur(require("path")),Doe=class _{basePath;constructor(c){this.basePath=c||process.cwd(),this.basePath=B0.resolve(this.basePath)}toRelative(c){if(!c)return"";if(!B0.isAbsolute(c))return this.normalizePath(c);let f=B0.resolve(c),g=B0.relative(this.basePath,f);return this.normalizePath(g)}toAbsolute(c){return c?B0.isAbsolute(c)?B0.resolve(c):B0.resolve(this.basePath,c):this.basePath}normalizePath(c){return c?c.split(B0.sep).join("/"):""}isWithinBase(c){return(B0.isAbsolute(c)?B0.resolve(c):B0.resolve(this.basePath,c)).startsWith(this.basePath)}getBasePath(){return this.basePath}setBasePath(c){this.basePath=B0.resolve(c)}getFileName(c){return B0.basename(c)}getDirectory(c){return this.normalizePath(B0.dirname(c))}getExtension(c){return B0.extname(c)}join(...c){return this.normalizePath(B0.join(...c))}mapToRelative(c){return c.map(f=>this.toRelative(f))}mapToAbsolute(c){return c.map(f=>this.toAbsolute(f))}createSubMapper(c){let f=B0.resolve(this.basePath,c);return new _(f)}};pE.PathMapper=Doe;function pur(_){return new Doe(_)}});var r_t=jt(boe=>{"use strict";Object.defineProperty(boe,"__esModule",{value:!0});boe.BiomeLens=void 0;var dur=CC(),mur=LT(),hur=SC(),hke=class _ extends dur.BaseLens{name="biome";description="JavaScript/TypeScript linter and formatter";languages=["javascript","typescript","json","css"];supportedTools=["biome"];requirements=mur.BIOME_REQUIREMENTS;pathMapper;mode="lint";setMode(c){this.mode=c}static calculateQualityScore(c){if(!c.success||c.error)return 0;let f=c.metrics;if(!f)return 100;let g=Math.max(f.filesAnalyzed,1),{error:S,warning:k}=f.issuesBySeverity,B=S/g*10,Z=k/g*2,le=B+Z,me=Math.max(0,Math.min(100,100-le));return Math.round(me*100)/100}parse(c){if(c.stderr&&!c.stdout){let f=c.stderr;if(f.trim().startsWith("{")||f.trim().startsWith("["))try{return JSON.parse(f)}catch{throw new Error(`Biome execution error: ${c.stderr}`)}throw new Error(`Biome execution error: ${c.stderr}`)}if(!c.stdout)return{diagnostics:[]};try{let f=c.stdout,g=f.search(/^\s*[{[]/m);return g>0&&(this.debug("Stripping npm script preamble from output"),f=f.substring(g)),JSON.parse(f)}catch(f){return this.debug("Failed to parse Biome output as JSON:",f),this.parseTextOutput(c.stdout||c.stderr||"")}}parseTextOutput(c){let f=[],g=c.split(`
|
|
353
353
|
`);for(let S of g){let k=S.trim();!k||k.startsWith("Checked")||k.startsWith("Formatted")||k.match(/\.[jt]sx?$|\.(json|css|md)$/)&&f.push({category:"format",severity:"error",description:"File is not formatted according to Biome rules",location:{path:{file:k}}})}return{diagnostics:f}}format(c){let f=[],g=new Map,S=this.getPathMapper();for(let et of c.diagnostics||[]){let Je=et.location?.path?.file||et.location?.path?.path||"unknown",je=S.toRelative(Je);g.has(je)||g.set(je,{path:je,hasIssues:!1}),g.get(je).hasIssues=!0;let Ct=et.description||"";!Ct&&et.message&&(Ct=et.message.map(Kn=>Kn.content||"").join(" ")),Ct||(Ct=et.category||"Unknown issue");let qt=this.mapBiomeSeverity(et.severity);f.push({file:je,line:1,column:1,severity:qt,message:Ct,rule:et.category||void 0,source:this.name,category:this.categorizeRule(et.category)})}let k=Array.from(g.values()),B=k.length||c.diagnostics?.length||0,Z=f.filter(et=>et.severity==="error").length,le=f.filter(et=>et.severity==="warning").length,me=f.filter(et=>et.severity==="info").length,De=k.map(et=>et.path),Fe=this.buildFileMetrics(De,f),Q={lensName:this.name,tool:this.config?.tool.name||"biome",timestamp:Date.now(),success:Z===0,issues:f,analyzedFiles:k,fileMetrics:Fe,metrics:{filesAnalyzed:B,totalIssues:f.length,issuesBySeverity:{error:Z,warning:le,info:me,hint:0},executionTime:0,custom:{mode:this.mode,filesWithIssues:k.filter(et=>et.hasIssues).length}}};return Q.qualityScore=_.calculateQualityScore(Q),Q}mapBiomeSeverity(c){switch(c){case"error":case"fatal":return"error";case"warning":return"warning";case"information":case"hint":return"info";default:return"error"}}categorizeRule(c){if(!c)return"general";let f=c.split("/");if(f[0]==="format")return"formatting";if(f.length>=2){let g=f[1];switch(g){case"correctness":return"correctness";case"suspicious":return"suspicious";case"style":return"style";case"complexity":return"complexity";case"performance":return"performance";case"security":return"security";case"a11y":return"accessibility";case"nursery":return"experimental";default:return g}}return"general"}getPathMapper(){if(!this.pathMapper){let c=this.config?.cwd||process.cwd();this.pathMapper=new hur.PathMapper(c)}return this.pathMapper}async execute(){return this.config?.tool&&((this.config.tool.args||[]).some(g=>g.includes("--reporter"))||this.addArgsToNpmScript(["--reporter=json"])),super.execute()}};boe.BiomeLens=hke});var n_t=jt(Coe=>{"use strict";Object.defineProperty(Coe,"__esModule",{value:!0});Coe.BunTestLens=void 0;var gur=CC(),yur=LT(),vur=SC(),gke=class _ extends gur.BaseLens{name="bun-test";description="Bun test runner";languages=["javascript","typescript"];supportedTools=["bun"];requirements=yur.BUN_TEST_REQUIREMENTS;pathMapper;static calculateQualityScore(c){if(!c.success||c.error)return 0;let f=c.metrics;if(!f?.custom)return 100;let g=f.custom,S=g.totalTests||0,k=g.passedTests||0,B=g.skippedTests||0;if(S===0)return 0;let le=k/S*100,me=B/S*50;return le-=me,Math.max(0,Math.min(100,Math.round(le*100)/100))}parse(c){let f={passed:0,failed:0,skipped:0,totalTests:0,totalFiles:0,expectCalls:0,duration:0,testFiles:[],failures:[],coverageFiles:[],totalFunctionCoverage:0,totalLineCoverage:0},g=[c.stdout||"",c.stderr||""].join(`
|
|
354
354
|
`);if(!g.trim())return f;let S=g.split(`
|
|
355
355
|
`);for(let k of S){let B=k.trim(),Z=B.match(/^(\d+)\s+pass$/);if(Z){f.passed=parseInt(Z[1],10);continue}let le=B.match(/^(\d+)\s+fail$/);if(le){f.failed=parseInt(le[1],10);continue}let me=B.match(/^(\d+)\s+skip$/);if(me){f.skipped=parseInt(me[1],10);continue}let De=B.match(/^(\d+)\s+expect\(\)\s+calls?$/);if(De){f.expectCalls=parseInt(De[1],10);continue}let Fe=B.match(/^Ran\s+(\d+)\s+tests?\s+across\s+(\d+)\s+files?\.?\s*\[([^\]]+)\]$/);if(Fe){f.totalTests=parseInt(Fe[1],10),f.totalFiles=parseInt(Fe[2],10);let Je=Fe[3];Je.endsWith("ms")?f.duration=parseFloat(Je):Je.endsWith("s")&&(f.duration=parseFloat(Je)*1e3);continue}let Q=B.match(/^([^\s:]+\.(?:test|spec)\.(?:ts|tsx|js|jsx|mts|mjs)):$/);if(Q){f.testFiles.push(Q[1]);continue}if(B.startsWith("error:")||B.startsWith("Error:")){let Je=B.match(/^(?:error|Error):\s*(.+)$/);Je&&f.testFiles.length>0&&f.failures.push({file:f.testFiles[f.testFiles.length-1],testName:"unknown",message:Je[1]})}let et=B.match(/^(.+?)\s*\|\s*([\d.]+)\s*\|\s*([\d.]+)\s*\|\s*(.*)$/);if(et){let Je=et[1].trim(),je=parseFloat(et[2]),Ct=parseFloat(et[3]),qt=et[4].trim();Je==="All files"?(f.totalFunctionCoverage=je,f.totalLineCoverage=Ct):Je!=="File"&&!Je.startsWith("-")&&f.coverageFiles.push({file:Je,functionCoverage:je,lineCoverage:Ct,uncoveredLines:qt})}}return f.totalTests===0&&(f.totalTests=f.passed+f.failed+f.skipped),f.totalFiles===0&&(f.totalFiles=f.testFiles.length),f}format(c){let f=[],g=this.getPathMapper();for(let B of c.failures){let Z=g.toRelative(B.file);f.push({file:Z,line:B.line||1,column:1,severity:"error",message:`Test failed: ${B.message}`,rule:"test-failed",source:this.name,category:"test-failure"})}let S;if(c.coverageFiles.length>0)S=c.coverageFiles.map(B=>({file:g.toRelative(B.file),score:B.lineCoverage,issueCount:0,errorCount:0,warningCount:0,infoCount:0,hintCount:0,categories:{functionCoverage:B.functionCoverage,lineCoverage:B.lineCoverage}}));else{let B=c.testFiles.map(Z=>g.toRelative(Z));S=this.buildFileMetrics(B,f)}let k={lensName:this.name,tool:this.config?.tool.name||"bun",timestamp:Date.now(),success:c.failed===0,issues:f,fileMetrics:S,metrics:{filesAnalyzed:c.coverageFiles.length||c.totalFiles,totalIssues:f.length,issuesBySeverity:{error:c.failed,warning:0,info:0,hint:0},executionTime:c.duration,custom:{totalTests:c.totalTests,passedTests:c.passed,failedTests:c.failed,skippedTests:c.skipped,expectCalls:c.expectCalls,passRate:c.totalTests>0?Math.round(c.passed/c.totalTests*1e4)/100:0,duration:c.duration,testFilesRun:c.totalFiles,functionCoverage:c.totalFunctionCoverage,lineCoverage:c.totalLineCoverage,sourceFilesWithCoverage:c.coverageFiles.length}}};return k.qualityScore=_.calculateQualityScore(k),k}getPathMapper(){if(!this.pathMapper){let c=this.config?.cwd||process.cwd();this.pathMapper=new vur.PathMapper(c)}return this.pathMapper}};Coe.BunTestLens=gke});var i_t=jt(Soe=>{"use strict";Object.defineProperty(Soe,"__esModule",{value:!0});Soe.ESLintLens=void 0;var Dur=CC(),bur=LT(),Cur=SC(),yke=class _ extends Dur.BaseLens{name="eslint";description="JavaScript/TypeScript linter";languages=["javascript","typescript"];supportedTools=["eslint"];requirements=bur.ESLINT_REQUIREMENTS;pathMapper;static calculateQualityScore(c){if(!c.success||c.error)return 0;let f=c.metrics;if(!f)return 100;let g=Math.max(f.filesAnalyzed,1),{error:S,warning:k,info:B}=f.issuesBySeverity,Z=S/g*10,le=k/g*2,me=B/g*.5,De=Z+le+me,Fe=Math.max(0,Math.min(100,100-De));return Math.round(Fe*100)/100}parse(c){if(c.stderr&&!c.stdout)throw new Error(`ESLint execution error: ${c.stderr}`);if(!c.stdout)return[];try{let f=c.stdout,g=f.search(/^\s*[{[]/m);g>0&&(this.debug("Stripping npm script preamble from output"),f=f.substring(g));let S=JSON.parse(f);return Array.isArray(S)?S:(this.debug("ESLint output is not an array, wrapping it"),[S])}catch(f){if(this.debug("Failed to parse ESLint output as JSON:",f),c.stderr)throw new Error(`ESLint execution error: ${c.stderr}`);return[]}}format(c){let f=[],g=[],S=this.getPathMapper();for(let Je of c){let je=S.toRelative(Je.filePath);g.push({path:je,hasIssues:Je.messages.length>0});for(let Ct of Je.messages)f.push({file:je,line:Ct.line||1,column:Ct.column||1,endLine:Ct.endLine,endColumn:Ct.endColumn,severity:this.mapESLintSeverity(Ct.severity),message:Ct.message,rule:Ct.ruleId||void 0,source:this.name,category:this.categorizeRule(Ct.ruleId),fix:Ct.fix?{text:Ct.fix.text,range:{start:{line:Ct.line,column:Ct.column},end:{line:Ct.endLine||Ct.line,column:Ct.endColumn||Ct.column}}}:void 0})}let k=c.length,B=c.filter(Je=>Je.messages.length>0).length,Z=c.reduce((Je,je)=>Je+je.errorCount,0),le=c.reduce((Je,je)=>Je+je.warningCount,0),me=c.reduce((Je,je)=>Je+je.fixableErrorCount,0),De=c.reduce((Je,je)=>Je+je.fixableWarningCount,0),Fe=g.map(Je=>Je.path),Q=this.buildFileMetrics(Fe,f),et={lensName:this.name,tool:this.config?.tool.name||"eslint",timestamp:Date.now(),success:!0,issues:f,analyzedFiles:g,fileMetrics:Q,metrics:{filesAnalyzed:k,totalIssues:f.length,issuesBySeverity:{error:Z,warning:le,info:0,hint:0},executionTime:0,custom:{filesWithIssues:B,fixableErrors:me,fixableWarnings:De,totalFixable:me+De}}};return et.qualityScore=_.calculateQualityScore(et),et}mapESLintSeverity(c){switch(c){case 2:return"error";case 1:return"warning";case 0:default:return"info"}}categorizeRule(c){return c?c.startsWith("@typescript-eslint/")?"typescript":c.startsWith("react/")||c.startsWith("react-hooks/")?"react":c.startsWith("import/")?"imports":c.startsWith("node/")||c.startsWith("n/")?"node":c.includes("security")||c==="no-eval"||c==="no-implied-eval"?"security":c.includes("indent")||c.includes("space")||c.includes("quote")||c.includes("semi")||c.includes("comma")||c.includes("brace")?"style":c.includes("no-unused")||c.includes("no-undef")||c.includes("no-console")||c.includes("prefer-")?"best-practices":"general":"general"}getPathMapper(){if(!this.pathMapper){let c=this.config?.cwd||process.cwd();this.pathMapper=new Cur.PathMapper(c)}return this.pathMapper}async execute(){return this.config?.tool&&((this.config.tool.args||[]).some(g=>g.includes("--format")||g.includes("-f"))||this.addArgsToNpmScript(["--format","json"])),super.execute()}};Soe.ESLintLens=yke});var s_t=jt(Eoe=>{"use strict";Object.defineProperty(Eoe,"__esModule",{value:!0});Eoe.JestLens=void 0;var Sur=CC(),Eur=LT(),xur=SC(),vke=class _ extends Sur.BaseLens{name="jest";description="JavaScript test runner and coverage";languages=["javascript","typescript"];supportedTools=["jest"];requirements=Eur.JEST_REQUIREMENTS;pathMapper;static calculateQualityScore(c){if(!c.success||c.error)return 0;let f=c.metrics;if(!f?.custom)return 100;let g=f.custom,S=g.totalTests||0,k=g.passedTests||0,B=g.skippedTests||0;if(S===0)return 0;let le=k/S*100,me=B/S*50;if(le-=me,c.coverage?.line!==void 0){let De=c.coverage.line;De>80?le+=10:De>60&&(le+=5)}return le=Math.max(0,Math.min(100,le)),Math.round(le*100)/100}parse(c){if(!c.stdout&&c.stderr&&!c.stderr.includes("FAIL")&&!c.stderr.includes("Test Suites:"))throw new Error(`Jest execution error: ${c.stderr}`);let f;if(c.stdout){let g=c.stdout.indexOf("{"),S=c.stdout.lastIndexOf("}");g!==-1&&S!==-1&&S>g?f=c.stdout.substring(g,S+1):f=c.stdout}if(!f)return this.debug("No JSON output found in stdout"),this.getEmptyResults();try{let g=JSON.parse(f);return this.normalizeResults(g)}catch(g){if(this.debug("Failed to parse Jest output as JSON:",g),this.debug("Attempted to parse:",f?.substring(0,200)),c.stderr)try{let S=c.stderr.indexOf("{"),k=c.stderr.lastIndexOf("}");if(S!==-1&&k!==-1&&k>S){let B=c.stderr.substring(S,k+1),Z=JSON.parse(B);return this.normalizeResults(Z)}}catch{}return this.debug("Returning empty results due to parse failure"),this.getEmptyResults()}}format(c){let f=[],g=this.getPathMapper();for(let qt of c.testResults){let Fr=g.toRelative(qt.testFilePath||qt.name);qt.failureMessage&&f.push({file:Fr,line:1,column:1,severity:"error",message:this.extractErrorMessage(qt.failureMessage),rule:"test-failure",source:this.name,category:"test-suite"});for(let Sr of qt.assertionResults)if(Sr.status==="failed"){let Kn=Sr.location?.line||1,Li=Sr.location?.column||1,Ln=Sr.failureMessages.join(`
|
|
@@ -1104,7 +1104,7 @@ jobs:
|
|
|
1104
1104
|
name: quality-lens-results-\${{ github.sha }}
|
|
1105
1105
|
path: results.json
|
|
1106
1106
|
if-no-files-found: warn
|
|
1107
|
-
`,y6e={eslint:{bin:"eslint",args:[".","--format","json"]},lint:{bin:"eslint",args:[".","--format","json"]},typescript:{bin:"tsc",args:["--noEmit","--pretty","false","--listFiles"]},typecheck:{bin:"tsc",args:["--noEmit","--pretty","false","--listFiles"]},jest:{bin:"jest",args:["--passWithNoTests","--json","--no-colors","--coverage"]},test:{bin:"jest",args:["--passWithNoTests","--json","--no-colors","--coverage"]},prettier:{bin:"prettier",args:["--check",".","--no-error-on-unmatched-pattern","--no-color","--log-level","debug"]},format:{bin:"prettier",args:["--check",".","--no-error-on-unmatched-pattern","--no-color","--log-level","debug"]},knip:{bin:"knip",args:["--reporter","json"]},alexandria:{bin:"alexandria",args:["coverage","--json"]},docs:{bin:"alexandria",args:["coverage","--json"]}},Koe={eslint:["npx","--yes","eslint",".","--format","json"],lint:["npx","--yes","eslint",".","--format","json"],typescript:["npx","--yes","tsc","--noEmit","--pretty","false","--listFiles"],typecheck:["npx","--yes","tsc","--noEmit","--pretty","false","--listFiles"],jest:["npx","--yes","jest","--passWithNoTests","--json","--no-colors","--coverage"],test:["npx","--yes","jest","--passWithNoTests","--json","--no-colors","--coverage"],prettier:["npx","--yes","prettier","--check",".","--no-error-on-unmatched-pattern","--no-color","--log-level","debug"],format:["npx","--yes","prettier","--check",".","--no-error-on-unmatched-pattern","--no-color","--log-level","debug"],knip:["npx","--yes","knip","--reporter","json"],alexandria:["npx","--yes","@principal-ai/alexandria-cli","coverage","--json"],docs:["npx","--yes","@principal-ai/alexandria-cli","coverage","--json"]};async function kfr(_,c){let f=AC.join(_,"node_modules",".bin",c);try{return await jT.access(f),!0}catch{return!1}}function Ifr(_,c){let f=Date.now(),g=y6e[_];return g?new Promise(S=>{let k="",B="",le=`"${AC.join(c,"node_modules",".bin",g.bin)}" ${g.args.join(" ")}`,me=(0,D6e.spawn)(le,[],{cwd:c,shell:!0});me.stdout&&me.stdout.on("data",De=>{k+=De.toString()}),me.stderr&&me.stderr.on("data",De=>{B+=De.toString()}),me.on("close",De=>{S({success:De!==null&&De!==127,stdout:k,stderr:B,duration:Date.now()-f,exitCode:De??1})}),me.on("error",De=>{S({success:!1,stdout:k,stderr:B||De.message,duration:Date.now()-f,exitCode:1})})}):Promise.resolve({success:!1,stdout:"",stderr:`No local command defined for lens: ${_}`,duration:Date.now()-f,exitCode:1})}function wfr(_,c){let f=Date.now(),g=Koe[_];return g?new Promise(S=>{let k="",B="",Z=g.join(" "),le=(0,D6e.spawn)(Z,[],{cwd:c,shell:!0});le.stdout&&le.stdout.on("data",me=>{k+=me.toString()}),le.stderr&&le.stderr.on("data",me=>{B+=me.toString()}),le.on("close",me=>{S({success:me!==null&&me!==127,stdout:k,stderr:B,duration:Date.now()-f,exitCode:me??1})}),le.on("error",me=>{S({success:!1,stdout:k,stderr:B||me.message,duration:Date.now()-f,exitCode:1})})}):Promise.resolve({success:!1,stdout:"",stderr:`No npx command defined for lens: ${_}`,duration:Date.now()-f,exitCode:1})}async function v6e(_){let c=await Ppt(_,"");return new Qoe().build({files:c,rootPath:_})}async function Ppt(_,c){let f=[],g=await jT.readdir(_,{withFileTypes:!0});for(let S of g){if(Pfr(S.name))continue;let k=AC.join(_,S.name),B=c?`${c}/${S.name}`:S.name;if(S.isDirectory()){let Z=await Ppt(k,B);f.push(...Z)}else S.isFile()&&f.push(B)}return f}function Pfr(_){return["node_modules",".git",".next",".nuxt","dist","build","coverage",".turbo",".cache"].includes(_)||_.startsWith(".")}async function Nfr(_){let c=new iM,f=new zoe,g=new Woe,S=new Hoe;try{let k=AC.resolve(_.path);console.log(`Scanning repository: ${k}`);let B=await v6e(k);g.setFileTree(B);let Z=await c.extractPackages(B,k);Z.length===0&&(console.warn("No packages found in repository"),process.exit(1)),console.log(`Found ${Z.length} package(s)`);let le=_.lenses?_.lenses.split(",").map(Fe=>Fe.trim()):null,me=[];for(let Fe of Z){let Q=Fe.packageData.availableCommands?.filter(je=>!(!je.isLensCommand||le&&!le.includes(je.lensId||"")||je.name.includes("watch")||je.name.includes(":dev")));if(!Q||Q.length===0){console.log(`Skipping ${Fe.packageData.name} (no lens commands)`);continue}console.log(`
|
|
1107
|
+
`,y6e={eslint:{bin:"eslint",args:[".","--format","json"]},lint:{bin:"eslint",args:[".","--format","json"]},typescript:{bin:"tsc",args:["--noEmit","--pretty","false","--listFiles"]},typecheck:{bin:"tsc",args:["--noEmit","--pretty","false","--listFiles"]},jest:{bin:"jest",args:["--passWithNoTests","--json","--no-colors","--coverage"]},test:{bin:"jest",args:["--passWithNoTests","--json","--no-colors","--coverage"]},prettier:{bin:"prettier",args:["--check",".","--no-error-on-unmatched-pattern","--no-color","--log-level","debug"]},format:{bin:"prettier",args:["--check",".","--no-error-on-unmatched-pattern","--no-color","--log-level","debug"]},knip:{bin:"knip",args:["--reporter","json"]},alexandria:{bin:"alexandria",args:["coverage","--json"]},docs:{bin:"alexandria",args:["coverage","--json"]}},Koe={eslint:["npx","--yes","eslint",".","--format","json"],lint:["npx","--yes","eslint",".","--format","json"],typescript:["npx","--yes","tsc","--noEmit","--pretty","false","--listFiles"],typecheck:["npx","--yes","tsc","--noEmit","--pretty","false","--listFiles"],jest:["npx","--yes","jest","--passWithNoTests","--json","--no-colors","--coverage"],test:["npx","--yes","jest","--passWithNoTests","--json","--no-colors","--coverage"],prettier:["npx","--yes","prettier","--check",".","--no-error-on-unmatched-pattern","--no-color","--log-level","debug"],format:["npx","--yes","prettier","--check",".","--no-error-on-unmatched-pattern","--no-color","--log-level","debug"],knip:["npx","--yes","knip","--reporter","json"],alexandria:["npx","--yes","@principal-ai/alexandria-cli","coverage","--json"],docs:["npx","--yes","@principal-ai/alexandria-cli","coverage","--json"]};async function kfr(_,c){let f=AC.join(_,"node_modules",".bin",c);try{return await jT.access(f),!0}catch{return!1}}function Ifr(_,c){let f=Date.now(),g=y6e[_];return g?new Promise(S=>{let k="",B="",le=`"${AC.join(c,"node_modules",".bin",g.bin)}" ${g.args.join(" ")}`,me=(0,D6e.spawn)(le,[],{cwd:c,shell:!0});me.stdout&&me.stdout.on("data",De=>{k+=De.toString()}),me.stderr&&me.stderr.on("data",De=>{B+=De.toString()}),me.on("close",De=>{S({success:De!==null&&De!==127,stdout:k,stderr:B,duration:Date.now()-f,exitCode:De??1})}),me.on("error",De=>{S({success:!1,stdout:k,stderr:B||De.message,duration:Date.now()-f,exitCode:1})})}):Promise.resolve({success:!1,stdout:"",stderr:`No local command defined for lens: ${_}`,duration:Date.now()-f,exitCode:1})}function wfr(_,c){let f=Date.now(),g=Koe[_];return g?new Promise(S=>{let k="",B="",Z=g.join(" "),le=(0,D6e.spawn)(Z,[],{cwd:c,shell:!0});le.stdout&&le.stdout.on("data",me=>{k+=me.toString()}),le.stderr&&le.stderr.on("data",me=>{B+=me.toString()}),le.on("close",me=>{S({success:me!==null&&me!==127,stdout:k,stderr:B,duration:Date.now()-f,exitCode:me??1})}),le.on("error",me=>{S({success:!1,stdout:k,stderr:B||me.message,duration:Date.now()-f,exitCode:1})})}):Promise.resolve({success:!1,stdout:"",stderr:`No npx command defined for lens: ${_}`,duration:Date.now()-f,exitCode:1})}async function v6e(_){let c=await Ppt(_,"");return new Qoe().build({files:c,rootPath:_})}async function Ppt(_,c){let f=[],g=await jT.readdir(_,{withFileTypes:!0});for(let S of g){if(Pfr(S.name))continue;let k=AC.join(_,S.name),B=c?`${c}/${S.name}`:S.name;if(S.isDirectory()){let Z=await Ppt(k,B);f.push(...Z)}else S.isFile()&&f.push(B)}return f}function Pfr(_){return["node_modules",".git",".next",".nuxt","dist","build","coverage",".turbo",".cache"].includes(_)||_.startsWith(".")}async function Nfr(_){let c=new iM,f=new zoe,g=new Woe,S=new Hoe;try{let k=AC.resolve(_.path);console.log(`Scanning repository: ${k}`);let B=await v6e(k);g.setFileTree(B);let Z=await c.extractPackages(B,k);Z.length===0&&(console.warn("No packages found in repository"),process.exit(1)),console.log(`Found ${Z.length} package(s)`);let le=_.lenses?_.lenses.split(",").map(Fe=>Fe.trim()):null,me=[];for(let Fe of Z){let Q=Fe.packageData.availableCommands?.filter(je=>!(!je.isLensCommand||le&&!le.includes(je.lensId||"")||je.name.includes("watch")||je.name.includes(":dev")||["jest","vitest","bun-test","test"].includes(je.lensId||"")&&je.name==="test"));if(!Q||Q.length===0){console.log(`Skipping ${Fe.packageData.name} (no lens commands)`);continue}console.log(`
|
|
1108
1108
|
Running lenses for ${Fe.packageData.name}...`);let et=Fe.packageData.path||"",Je=et?AC.join(k,et):k;for(let je of Q){let Ct=je.lensId||"unknown";console.log(` - ${Ct}: ${je.name}`);try{let qt;if(_.install&&(y6e[Ct]||Koe[Ct])){let Fr=y6e[Ct],Sr=Fr?await kfr(Je,Fr.bin):!1,Kn,Li;Sr&&Fr?(console.log(` [local] Using installed ${Fr.bin}`),Kn=await Ifr(Ct,Je),Li=`node_modules/.bin/${Fr.bin} ${Fr.args.join(" ")}`):Koe[Ct]?(console.log(" [npx] Tool not installed locally, using npx"),Kn=await wfr(Ct,Je),Li=Koe[Ct].join(" ")):(Kn={success:!1,stdout:"",stderr:`No command available for lens: ${Ct}`,duration:0,exitCode:1},Li="none");let Ln=Afr(Ct,Kn.stdout,Kn.stderr,Kn.exitCode,Je);qt={success:Kn.success,toolName:Ct,command:Li,packagePath:et,exitCode:Kn.exitCode,duration:Kn.duration,stdout:Kn.stdout,stderr:Kn.stderr,lensResult:Ln}}else qt=await f.executeTool({repoPath:k,packageLayer:Fe,packageCommand:je});me.push({package:Fe.packageData.name,packagePath:Fe.packageData.path,lens:Ct,command:je.name,result:qt,timestamp:Date.now()}),console.log(` ${qt.success?"\u2713":"\u2717"} ${qt.success?"Success":"Failed"} (${qt.duration}ms)`)}catch(qt){let Fr=qt instanceof Error?qt.message:String(qt);console.error(` \u2717 Error: ${Fr}`),me.push({package:Fe.packageData.name,packagePath:Fe.packageData.path,lens:Ct,command:je.name,error:Fr,timestamp:Date.now()})}}}if(_.format==="json"){let Fe=g.format(me);_.output?(await jT.writeFile(_.output,Fe,"utf-8"),console.log(`
|
|
1109
1109
|
Results written to: ${_.output}`)):console.log(`
|
|
1110
1110
|
`+Fe)}else S.report(me);let De=me.some(Fe=>Fe.error||!Fe.result?.success);process.exit(De?1:0)}catch(k){let B=k instanceof Error?k.message:String(k);console.error("Fatal error:",B),process.exit(1)}}UQe(cxe(process.argv)).command("run [path]","Run quality lenses on repository",_=>_.positional("path",{describe:"Repository path",type:"string",default:process.cwd()}).option("output",{alias:"o",describe:"Output file for results",type:"string"}).option("lenses",{describe:"Specific lenses to run (comma-separated)",type:"string",example:"eslint,jest,typescript"}).option("format",{describe:"Output format",choices:["json","console"],default:"console"}).option("install",{alias:"i",describe:"Run tools via npx (no local dependencies required)",type:"boolean",default:!1}),_=>Nfr(_)).command("list [path]","List available lenses in repository",_=>_.positional("path",{describe:"Repository path",type:"string",default:process.cwd()}),async _=>{let c=AC.resolve(_.path??process.cwd()),f=new iM;console.log(`Scanning repository: ${c}`);let g=await v6e(c);(await f.extractPackages(g,c)).forEach(k=>{console.log(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@principal-ai/quality-lens-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"description": "CLI tool for running quality lenses on codebases in CI/CD pipelines",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"license": "MIT",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@principal-ai/codebase-composition": "^0.2.15",
|
|
46
|
-
"@principal-ai/codebase-quality-lenses": "^0.1.
|
|
46
|
+
"@principal-ai/codebase-quality-lenses": "^0.1.38",
|
|
47
47
|
"@principal-ai/repository-abstraction": "^0.2.0",
|
|
48
48
|
"@types/jest": "^30.0.0",
|
|
49
49
|
"@types/node": "^20.0.0",
|