@binclusive/cli 0.1.4 → 0.2.0

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.
@@ -0,0 +1,31 @@
1
+ import { createRequire as __cjsCreateRequire } from 'node:module'; const require = __cjsCreateRequire(import.meta.url);
2
+ import{a as R,b as h,g as ce,l as ie,r as le}from"./chunk-SNQ7SXG3.js";import{a as se}from"./chunk-3MDNIFWR.js";import{b as K,d as I}from"./chunk-PCQ2R3VR.js";var fe=K(U=>{"use strict";var ge=Symbol.for("react.transitional.element"),Ee=Symbol.for("react.fragment");function ue(t,n,o){var c=null;if(o!==void 0&&(c=""+o),n.key!==void 0&&(c=""+n.key),"key"in n){o={};for(var m in n)m!=="key"&&(o[m]=n[m])}else o=n;return n=o.ref,{$$typeof:ge,type:t,key:c,ref:n!==void 0?n:null,props:o}}U.Fragment=Ee;U.jsx=ue;U.jsxs=ue});var de=K(z=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===b?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case P:return"Fragment";case Y:return"Profiler";case X:return"StrictMode";case N:return"Suspense";case D:return"SuspenseList";case u:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case O:return"Portal";case V:return(e.displayName||"Context")+".Provider";case M:return(e._context.displayName||"Context")+".Consumer";case j:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return r=e.displayName||null,r!==null?r:t(e.type)||"Memo";case W:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function n(e){return""+e}function o(e){try{n(e);var r=!1}catch{r=!0}if(r){r=console;var a=r.error,f=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",f),n(e)}}function c(e){if(e===P)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===W)return"<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function m(){var e=s.A;return e===null?null:e.getOwner()}function T(){return Error("react-stack-top-frame")}function S(e){if(w.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function y(e,r){function a(){B||(B=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}function q(){var e=t(this.type);return te[e]||(te[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function A(e,r,a,f,x,E,Q,Z){return a=E.ref,e={$$typeof:v,type:e,key:r,props:E,_owner:x},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:q}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function _(e,r,a,f,x,E,Q,Z){var d=r.children;if(d!==void 0)if(f)if(g(d)){for(f=0;f<d.length;f++)L(d[f]);Object.freeze&&Object.freeze(d)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else L(d);if(w.call(r,"key")){d=t(e);var C=Object.keys(r).filter(function(pe){return pe!=="key"});f=0<C.length?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}",ae[d+f]||(C=0<C.length?"{"+C.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
3
+ let props = %s;
4
+ <%s {...props} />
5
+ React keys must be passed directly to JSX without using spread:
6
+ let props = %s;
7
+ <%s key={someKey} {...props} />`,f,d,C,d),ae[d+f]=!0)}if(d=null,a!==void 0&&(o(a),d=""+a),S(r)&&(o(r.key),d=""+r.key),"key"in r){a={};for(var J in r)J!=="key"&&(a[J]=r[J])}else a=r;return d&&y(a,typeof e=="function"?e.displayName||e.name||"Unknown":e),A(e,d,E,x,m(),a,Q,Z)}function L(e){typeof e=="object"&&e!==null&&e.$$typeof===v&&e._store&&(e._store.validated=1)}var l=se(),v=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler");Symbol.for("react.provider");var M=Symbol.for("react.consumer"),V=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),b=Symbol.for("react.client.reference"),s=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=Object.prototype.hasOwnProperty,g=Array.isArray,$=console.createTask?console.createTask:function(){return null};l={react_stack_bottom_frame:function(e){return e()}};var B,te={},ne=l.react_stack_bottom_frame.bind(l,T)(),oe=$(c(T)),ae={};z.Fragment=P,z.jsx=function(e,r,a,f,x){var E=1e4>s.recentlyCreatedOwnerStacks++;return _(e,r,a,!1,f,x,E?Error("react-stack-top-frame"):ne,E?$(c(e)):oe)},z.jsxs=function(e,r,a,f,x){var E=1e4>s.recentlyCreatedOwnerStacks++;return _(e,r,a,!0,f,x,E?Error("react-stack-top-frame"):ne,E?$(c(e)):oe)}})()});var F=K((_e,ee)=>{"use strict";process.env.NODE_ENV==="production"?ee.exports=fe():ee.exports=de()});var k=I(se(),1);var p={border:"round",colors:{accent:"cyan",border:"gray",dim:"gray",critical:"red",major:"yellow",minor:"cyan",done:"green",active:"cyan",pending:"gray",error:"red",running:"cyan"},glyphs:{done:"\u2713",active:"\u25D0",pending:"\u25CB",dot:"\u25CF",warn:"\u26A0",arrow:"\u2192",thought:"\u{1F4AD}",search:"\u{1F50D}",cursor:"\u203A"}};function we(t){switch(t){case"critical":return p.colors.critical;case"major":return p.colors.major;case"minor":return p.colors.minor;default:return"white"}}function me(t,n){let o=n.trim().toLowerCase();return o?t.filter(c=>`${c.label} ${c.hint??""}`.toLowerCase().includes(o)):t}var G=I(F(),1);function be({title:t,children:n,width:o,height:c,flexGrow:m,accent:T}){return(0,G.jsxs)(R,{flexDirection:"column",borderStyle:p.border,borderColor:T??p.colors.border,width:o,height:c,flexGrow:m,paddingX:1,children:[t?(0,G.jsx)(h,{bold:!0,color:T??p.colors.accent,children:t}):null,n]})}function he(t,n){return n===""||t[t.length-1]===n?t:[...t,n]}function re(t,n,o,c){let m=`${n+1} of ${o}`,T=c===void 0?void 0:c?"selected":"not selected",S=[t.label,t.hint,T,m].filter(y=>!!y);return{label:`${t.label}${t.hint?` \xB7 ${t.hint}`:""} (${m})`,ariaLabel:S.join(", ")}}var i=I(F(),1);function Fe({items:t,title:n,multi:o=!1,maxVisible:c=10,onSubmit:m,onCancel:T}){let[S,y]=(0,k.useState)(""),[q,A]=(0,k.useState)(0),[_,L]=(0,k.useState)(new Set),l=me(t,S),v=Math.min(q,Math.max(0,l.length-1)),O=l.length<=c?0:Math.max(0,Math.min(v-Math.floor(c/2),l.length-c)),P=Math.min(l.length,O+c),X=l.slice(O,P),Y=O,M=l.length-P;ie((u,b)=>{if(b.upArrow)A(s=>Math.max(0,s-1));else if(b.downArrow)A(s=>Math.min(l.length-1,s+1));else if(b.escape)T?.();else if(b.return)if(o)_.size>0&&m([..._]);else{let s=l[v];s&&m([s.id])}else if(b.backspace||b.delete)y(s=>s.slice(0,-1)),A(0);else if(o&&u===" "){let s=l[v];if(!s)return;L(w=>{let g=new Set(w);return g.has(s.id)?g.delete(s.id):g.add(s.id),g})}else u&&!b.ctrl&&!b.meta&&(y(s=>s+u),A(0))});let V=o?`\u2191\u2193 move \xB7 space toggle \xB7 \u21B5 confirm (${_.size} selected) \xB7 esc back`:"\u2191\u2193 move \xB7 \u21B5 select \xB7 esc back",j=le(),N=l[v],D=l.length===0?"No matches":N?re(N,v,l.length,o?_.has(N.id):void 0).ariaLabel:"",[H,W]=(0,k.useState)(()=>[`${n}. ${t.length} options. Arrow keys move, ${o?"Space toggles, Enter confirms":"Enter selects"}, Escape cancels.`]);return(0,k.useEffect)(()=>{j&&W(u=>he(u,D))},[j,D]),j?(0,i.jsx)(ce,{items:H.map((u,b)=>({line:u,key:`sr${b}`})),children:u=>(0,i.jsx)(h,{children:u.line},u.key)}):(0,i.jsxs)(be,{title:n,children:[(0,i.jsx)(R,{children:(0,i.jsxs)(h,{children:[p.glyphs.search," ",S,(0,i.jsx)(h,{dimColor:!0,children:"\u258F"})]})}),(0,i.jsx)(R,{flexDirection:"column",marginTop:1,"aria-role":"listbox","aria-label":n,children:l.length===0?(0,i.jsx)(h,{dimColor:!0,children:"No matches."}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(h,{dimColor:!0,children:Y>0?` \u2191 ${Y} more`:" "}),X.map((u,b)=>{let s=b+O,w=s===v,g=_.has(u.id),$=o?g?"[x] ":"[ ] ":"",B=re(u,s,l.length,o?g:void 0);return(0,i.jsx)(R,{"aria-role":"option","aria-label":B.ariaLabel,"aria-state":{selected:w,checked:o?g:void 0},children:(0,i.jsxs)(h,{color:w?p.colors.accent:void 0,children:[w?`${p.glyphs.cursor} `:" ",$,u.label,u.hint?(0,i.jsxs)(h,{dimColor:!0,children:[" \xB7 ",u.hint]}):null]})},u.id)}),(0,i.jsx)(h,{dimColor:!0,children:M>0?` \u2193 ${M} more`:" "})]})}),(0,i.jsx)(R,{marginTop:1,children:(0,i.jsx)(h,{dimColor:!0,children:V})})]})}export{p as a,we as b,F as c,be as d,he as e,Fe as f};
8
+ /*! Bundled license information:
9
+
10
+ react/cjs/react-jsx-runtime.production.js:
11
+ (**
12
+ * @license React
13
+ * react-jsx-runtime.production.js
14
+ *
15
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ *)
20
+
21
+ react/cjs/react-jsx-runtime.development.js:
22
+ (**
23
+ * @license React
24
+ * react-jsx-runtime.development.js
25
+ *
26
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
27
+ *
28
+ * This source code is licensed under the MIT license found in the
29
+ * LICENSE file in the root directory of this source tree.
30
+ *)
31
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@binclusive/cli",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "Binclusive accessibility CLI — run audits and view violation tickets from your terminal.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "type": "module",
@@ -37,6 +37,7 @@
37
37
  "@b8e/audit-protocol": "workspace:^",
38
38
  "@b8e/captcha": "workspace:^",
39
39
  "@b8e/hands-machine": "workspace:^",
40
+ "@b8e/nvda-screen-reader": "workspace:^",
40
41
  "@b8e/tea": "workspace:^",
41
42
  "@b8e/tea-react": "workspace:^",
42
43
  "@babel/core": "^7.24.0",
@@ -62,7 +63,6 @@
62
63
  "zod": "catalog:"
63
64
  },
64
65
  "dependencies": {
65
- "@b8e/nvda-screen-reader": "workspace:^",
66
66
  "@sentry/node": "^10.56.0",
67
67
  "@sentry/profiling-node": "^10.56.0"
68
68
  }
@@ -1,2 +0,0 @@
1
- import { createRequire as __cjsCreateRequire } from 'node:module'; const require = __cjsCreateRequire(import.meta.url);
2
- import{a as b}from"./chunk-VCKJNF7P.js";import{a as m,b as o,l as p,m as d}from"./chunk-SNQ7SXG3.js";import{a as C}from"./chunk-3MDNIFWR.js";import{d as s}from"./chunk-PCQ2R3VR.js";var M=s(C(),1),t=s(b(),1);function h(n){return n?[{label:"Select organization",action:"selectOrg"},{label:"Run audit",action:"audit"},{label:"View tickets",action:"tickets"},{label:"Whoami",action:"whoami"},{label:"Quit",action:"quit"}]:[{label:"Login",action:"login"},{label:"Quit",action:"quit"}]}function A({loggedIn:n,orgName:T,userName:r,userEmail:l,onSelect:g}){let{exit:x}=d(),a=h(n),[c,f]=(0,M.useState)(0);return p((u,e)=>{if(e.upArrow&&f(i=>Math.max(0,i-1)),e.downArrow&&f(i=>Math.min(a.length-1,i+1)),e.return){let i=a[c];i&&(g(i.action),x())}e.escape&&(g("quit"),x())}),(0,t.jsxs)(m,{flexDirection:"column",children:[(0,t.jsx)(o,{bold:!0,children:"b8e \u2014 Binclusive CLI"}),n?(0,t.jsxs)(t.Fragment,{children:[r||l?(0,t.jsxs)(o,{dimColor:!0,children:["User: ",r??l,r&&l?(0,t.jsxs)(o,{dimColor:!0,children:[" \xB7 ",l]}):null]}):null,(0,t.jsxs)(o,{dimColor:!0,children:["Organization: ",T??"(none \u2014 select one)"]})]}):(0,t.jsx)(o,{dimColor:!0,children:"Not signed in"}),(0,t.jsx)(o,{dimColor:!0,children:"Use \u2191/\u2193 to navigate, Enter to select, Esc to quit"}),(0,t.jsx)(m,{flexDirection:"column",marginTop:1,children:a.map((u,e)=>(0,t.jsxs)(o,{color:e===c?"cyan":void 0,children:[e===c?"\u203A ":" ",u.label]},u.action))})]})}export{A as Menu};
@@ -1,31 +0,0 @@
1
- import { createRequire as __cjsCreateRequire } from 'node:module'; const require = __cjsCreateRequire(import.meta.url);
2
- import{a as re}from"./chunk-3MDNIFWR.js";import{b as O}from"./chunk-PCQ2R3VR.js";var F=O(b=>{"use strict";var te=Symbol.for("react.transitional.element"),ne=Symbol.for("react.fragment");function I(u,a,c){var i=null;if(c!==void 0&&(i=""+c),a.key!==void 0&&(i=""+a.key),"key"in a){c={};for(var E in a)E!=="key"&&(c[E]=a[E])}else c=a;return a=c.ref,{$$typeof:te,type:u,key:i,ref:a!==void 0?a:null,props:c}}b.Fragment=ne;b.jsx=I;b.jsxs=I});var D=O(m=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function u(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===J?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case V:return"Profiler";case z:return"StrictMode";case B:return"Suspense";case H:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case U:return"Portal";case X:return(e.displayName||"Context")+".Provider";case G:return(e._context.displayName||"Context")+".Consumer";case q:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return r=e.displayName||null,r!==null?r:u(e.type)||"Memo";case j:r=e._payload,e=e._init;try{return u(e(r))}catch{}}return null}function a(e){return""+e}function c(e){try{a(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),a(e)}}function i(e){if(e===_)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===j)return"<...>";try{var r=u(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function E(){var e=T.A;return e===null?null:e.getOwner()}function S(){return Error("react-stack-top-frame")}function $(e){if(y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function L(e,r){function t(){h||(h=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function M(){var e=u(this.type);return N[e]||(N[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function W(e,r,t,n,l,s,R,k){return t=s.ref,e={$$typeof:g,type:e,key:r,props:s,_owner:l},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:M}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:R}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:k}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function P(e,r,t,n,l,s,R,k){var o=r.children;if(o!==void 0)if(n)if(K(o)){for(n=0;n<o.length;n++)w(o[n]);Object.freeze&&Object.freeze(o)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else w(o);if(y.call(r,"key")){o=u(e);var f=Object.keys(r).filter(function(ee){return ee!=="key"});n=0<f.length?"{key: someKey, "+f.join(": ..., ")+": ...}":"{key: someKey}",Y[o+n]||(f=0<f.length?"{"+f.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
3
- let props = %s;
4
- <%s {...props} />
5
- React keys must be passed directly to JSX without using spread:
6
- let props = %s;
7
- <%s key={someKey} {...props} />`,n,o,f,o),Y[o+n]=!0)}if(o=null,t!==void 0&&(c(t),o=""+t),$(r)&&(c(r.key),o=""+r.key),"key"in r){t={};for(var p in r)p!=="key"&&(t[p]=r[p])}else t=r;return o&&L(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),W(e,o,s,l,E(),t,R,k)}function w(e){typeof e=="object"&&e!==null&&e.$$typeof===g&&e._store&&(e._store.validated=1)}var d=re(),g=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler");Symbol.for("react.provider");var G=Symbol.for("react.consumer"),X=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),T=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,y=Object.prototype.hasOwnProperty,K=Array.isArray,v=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(e){return e()}};var h,N={},C=d.react_stack_bottom_frame.bind(d,S)(),x=v(i(S)),Y={};m.Fragment=_,m.jsx=function(e,r,t,n,l){var s=1e4>T.recentlyCreatedOwnerStacks++;return P(e,r,t,!1,n,l,s?Error("react-stack-top-frame"):C,s?v(i(e)):x)},m.jsxs=function(e,r,t,n,l){var s=1e4>T.recentlyCreatedOwnerStacks++;return P(e,r,t,!0,n,l,s?Error("react-stack-top-frame"):C,s?v(i(e)):x)}})()});var oe=O((se,A)=>{"use strict";process.env.NODE_ENV==="production"?A.exports=F():A.exports=D()});export{oe as a};
8
- /*! Bundled license information:
9
-
10
- react/cjs/react-jsx-runtime.production.js:
11
- (**
12
- * @license React
13
- * react-jsx-runtime.production.js
14
- *
15
- * Copyright (c) Meta Platforms, Inc. and affiliates.
16
- *
17
- * This source code is licensed under the MIT license found in the
18
- * LICENSE file in the root directory of this source tree.
19
- *)
20
-
21
- react/cjs/react-jsx-runtime.development.js:
22
- (**
23
- * @license React
24
- * react-jsx-runtime.development.js
25
- *
26
- * Copyright (c) Meta Platforms, Inc. and affiliates.
27
- *
28
- * This source code is licensed under the MIT license found in the
29
- * LICENSE file in the root directory of this source tree.
30
- *)
31
- */