@jonit-dev/night-watch-cli 1.5.6 → 1.5.7
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/package.json
CHANGED
|
@@ -238,6 +238,9 @@ find_eligible_prd() {
|
|
|
238
238
|
local open_branches
|
|
239
239
|
open_branches=$(gh pr list --state open --json headRefName --jq '.[].headRefName' 2>/dev/null || echo "")
|
|
240
240
|
|
|
241
|
+
local cli_bin
|
|
242
|
+
cli_bin=$(resolve_night_watch_cli 2>/dev/null) || true
|
|
243
|
+
|
|
241
244
|
for prd_path in ${prd_files}; do
|
|
242
245
|
local prd_file
|
|
243
246
|
prd_file=$(basename "${prd_path}")
|
|
@@ -261,6 +264,12 @@ find_eligible_prd() {
|
|
|
261
264
|
continue
|
|
262
265
|
fi
|
|
263
266
|
|
|
267
|
+
# Skip if marked pending-review in prd-states.json
|
|
268
|
+
if [ -n "${project_dir}" ] && [ -n "${cli_bin}" ] && "${cli_bin}" prd-state list "${project_dir}" --status pending-review 2>/dev/null | grep -qF "${prd_name}"; then
|
|
269
|
+
log "SKIP-PRD: ${prd_file} — pending-review in prd-states.json"
|
|
270
|
+
continue
|
|
271
|
+
fi
|
|
272
|
+
|
|
264
273
|
# Check dependencies
|
|
265
274
|
local depends_on
|
|
266
275
|
depends_on=$(grep -i 'depends on' "${prd_path}" 2>/dev/null \
|
|
@@ -292,7 +292,7 @@ Please change the parent <Route path="${U}"> to <Route path="${U==="/"?"*":`${U}
|
|
|
292
292
|
*
|
|
293
293
|
* This source code is licensed under the ISC license.
|
|
294
294
|
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/const Ky=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ym=ne("x",Ky),Y0=s=>{let o;const f=new Set,r=(x,T)=>{const S=typeof x=="function"?x(o):x;if(!Object.is(S,o)){const q=o;o=T??(typeof S!="object"||S===null)?S:Object.assign({},o,S),f.forEach(M=>M(o,q))}},m=()=>o,p={setState:r,getState:m,getInitialState:()=>y,subscribe:x=>(f.add(x),()=>f.delete(x))},y=o=s(r,m,p);return p},ky=s=>s?Y0(s):Y0,Jy=s=>s;function $y(s,o=Jy){const f=Ct.useSyncExternalStore(s.subscribe,()=>o(s.getState()),()=>o(s.getInitialState()));return Ct.useDebugValue(f),f}const G0=s=>{const o=ky(s),f=r=>$y(o,r);return Object.assign(f,o),f},Wy=s=>s?G0(s):G0,Fy="";let pm=!1,tr=null;function Py(s){pm=s}function Iy(s){tr=s}function ep(s){return encodeURIComponent(s.replace(/\//g,"~"))}function at(s){return pm&&tr?s.replace("/api/",`/api/projects/${ep(tr)}/`):s}function tp(){return et("/api/projects")}async function et(s,o){const f=`${Fy}${s}`,r=await fetch(f,{headers:{"Content-Type":"application/json",...o==null?void 0:o.headers},...o});if(!r.ok){const m=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${r.status}: ${r.statusText}`)}return r.json()}function bm(){return et(at("/api/status"))}function lp(){return et(at("/api/prds"))}function ap(){return et(at("/api/prs"))}function np(s,o){const f=`?lines=${encodeURIComponent(o)}`;return et(at(`/api/logs/${encodeURIComponent(s)}${f}`))}function jm(){return et(at("/api/config"))}function Sm(s){return et(at("/api/config"),{method:"PUT",body:JSON.stringify(s)})}function ip(){return et(at("/api/doctor"))}function Nm(){return et(at("/api/schedule-info"))}function up(){return et(at("/api/actions/run"),{method:"POST"})}function sp(){return et(at("/api/actions/review"),{method:"POST"})}function X0(){return et(at("/api/actions/install-cron"),{method:"POST"})}function cp(){return et(at("/api/actions/uninstall-cron"),{method:"POST"})}function rp(){return et(at("/api/roadmap"))}function op(){return et(at("/api/roadmap/scan"),{method:"POST"})}function fp(s){return et(at("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:s})})}function qt(s,o=[],f){const r=(f==null?void 0:f.enabled)??!0,[m,h]=_.useState(null),[v,p]=_.useState(!0),[y,x]=_.useState(null),T=_.useCallback(async()=>{p(!0),x(null);try{const S=await s();h(S)}catch(S){x(S instanceof Error?S:new Error("Unknown error"))}finally{p(!1)}},[s]);return _.useEffect(()=>{r&&T()},[...o,T,r]),{data:m,loading:v,error:y,refetch:T}}const dp=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Yt=Wy(s=>({projectName:"Night Watch",setProjectName:o=>s({projectName:o}),toasts:[],addToast:o=>{const f=Math.random().toString(36).substring(7);s(r=>({toasts:[...r.toasts,{...o,id:f}]})),setTimeout(()=>{s(r=>({toasts:r.toasts.filter(m=>m.id!==f)}))},5e3)},removeToast:o=>s(f=>({toasts:f.toasts.filter(r=>r.id!==o)})),globalModeLoading:!0,setGlobalModeLoading:o=>s({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{Py(o),s({isGlobalMode:o})},projects:[],setProjects:o=>s({projects:o}),selectedProjectId:dp,selectProject:o=>{Iy(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),s({selectedProjectId:o})}})),mp=()=>{const[s,o]=_.useState(!1),{projectName:f,isGlobalMode:r,projects:m,selectedProjectId:h,selectProject:v}=Yt(),p=[{icon:yy,label:"Dashboard",path:"/"},{icon:mm,label:"PRDs",path:"/prds",badge:3},{icon:vy,label:"Pull Requests",path:"/prs",badge:1},{icon:xm,label:"Roadmap",path:"/roadmap"},{icon:yu,label:"Scheduling",path:"/scheduling"},{icon:Gy,label:"Logs",path:"/logs"},{icon:gm,label:"Settings",path:"/settings"}];return u.jsxs("aside",{className:`
|
|
295
|
+
*/const Ky=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ym=ne("x",Ky),Y0=s=>{let o;const f=new Set,r=(x,T)=>{const S=typeof x=="function"?x(o):x;if(!Object.is(S,o)){const q=o;o=T??(typeof S!="object"||S===null)?S:Object.assign({},o,S),f.forEach(M=>M(o,q))}},m=()=>o,p={setState:r,getState:m,getInitialState:()=>y,subscribe:x=>(f.add(x),()=>f.delete(x))},y=o=s(r,m,p);return p},ky=s=>s?Y0(s):Y0,Jy=s=>s;function $y(s,o=Jy){const f=Ct.useSyncExternalStore(s.subscribe,()=>o(s.getState()),()=>o(s.getInitialState()));return Ct.useDebugValue(f),f}const G0=s=>{const o=ky(s),f=r=>$y(o,r);return Object.assign(f,o),f},Wy=s=>s?G0(s):G0,Fy="";let pm=!1,tr=null;function Py(s){pm=s}function Iy(s){tr=s}function ep(s){return encodeURIComponent(s.replace(/\//g,"~"))}function at(s){return pm&&tr?s.replace("/api/",`/api/projects/${ep(tr)}/`):s}function tp(){return et("/api/projects")}async function et(s,o){const f=`${Fy}${s}`,r=await fetch(f,{headers:{"Content-Type":"application/json",...o==null?void 0:o.headers},...o});if(!r.ok){const m=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${r.status}: ${r.statusText}`)}return r.json()}function bm(){return et(at("/api/status"))}function lp(){return et(at("/api/prds"))}function ap(){return et(at("/api/prs"))}function np(s,o){const f=`?lines=${encodeURIComponent(o)}`;return et(at(`/api/logs/${encodeURIComponent(s)}${f}`))}function jm(){return et(at("/api/config"))}function Sm(s){return et(at("/api/config"),{method:"PUT",body:JSON.stringify(s)})}function ip(){return et(at("/api/doctor"))}function Nm(){return et(at("/api/schedule-info"))}function up(){return et(at("/api/actions/run"),{method:"POST"})}function sp(){return et(at("/api/actions/review"),{method:"POST"})}function X0(){return et(at("/api/actions/install-cron"),{method:"POST"})}function cp(){return et(at("/api/actions/uninstall-cron"),{method:"POST"})}function rp(){return et(at("/api/roadmap"))}function op(){return et(at("/api/roadmap/scan"),{method:"POST"})}function fp(s){return et(at("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:s})})}function qt(s,o=[],f){const r=(f==null?void 0:f.enabled)??!0,[m,h]=_.useState(null),[v,p]=_.useState(!0),[y,x]=_.useState(null),T=_.useCallback(async()=>{p(!0),x(null);try{const S=await s();h(S)}catch(S){x(S instanceof Error?S:new Error("Unknown error"))}finally{p(!1)}},[s]);return _.useEffect(()=>{r&&T()},[...o,T,r]),{data:m,loading:v,error:y,refetch:T}}const dp=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Yt=Wy(s=>({projectName:"Night Watch",setProjectName:o=>s({projectName:o}),toasts:[],addToast:o=>{const f=Math.random().toString(36).substring(7);s(r=>({toasts:[...r.toasts,{...o,id:f}]})),setTimeout(()=>{s(r=>({toasts:r.toasts.filter(m=>m.id!==f)}))},5e3)},removeToast:o=>s(f=>({toasts:f.toasts.filter(r=>r.id!==o)})),globalModeLoading:!0,setGlobalModeLoading:o=>s({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{Py(o),s({isGlobalMode:o})},projects:[],setProjects:o=>s({projects:o}),selectedProjectId:dp,selectProject:o=>{Iy(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),s(f=>{const r=f.projects.find(m=>m.name===o);return{selectedProjectId:o,...r?{projectName:r.name}:{}}})}})),mp=()=>{const[s,o]=_.useState(!1),{projectName:f,isGlobalMode:r,projects:m,selectedProjectId:h,selectProject:v}=Yt(),p=[{icon:yy,label:"Dashboard",path:"/"},{icon:mm,label:"PRDs",path:"/prds",badge:3},{icon:vy,label:"Pull Requests",path:"/prs",badge:1},{icon:xm,label:"Roadmap",path:"/roadmap"},{icon:yu,label:"Scheduling",path:"/scheduling"},{icon:Gy,label:"Logs",path:"/logs"},{icon:gm,label:"Settings",path:"/settings"}];return u.jsxs("aside",{className:`
|
|
296
296
|
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
297
297
|
${s?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
298
298
|
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
package/web/dist/index.html
CHANGED
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
</script>
|
|
91
|
-
<script type="module" crossorigin src="/assets/index-
|
|
91
|
+
<script type="module" crossorigin src="/assets/index-hIqyS2ir.js"></script>
|
|
92
92
|
</head>
|
|
93
93
|
<body class="bg-[#030712] text-slate-300 font-sans antialiased overflow-hidden selection:bg-indigo-500/30 selection:text-indigo-200">
|
|
94
94
|
<div id="root"></div>
|