@jonit-dev/night-watch-cli 1.7.29 → 1.7.31
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/bin/night-watch.mjs +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/{src/cli.js → cli.js} +1 -0
- package/dist/cli.js.map +1 -0
- package/dist/{src/commands → commands}/audit.d.ts +2 -2
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +105 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/{src/commands → commands}/board.d.ts +1 -1
- package/dist/commands/board.d.ts.map +1 -0
- package/dist/commands/board.js +664 -0
- package/dist/commands/board.js.map +1 -0
- package/dist/{src/commands → commands}/cancel.d.ts +3 -3
- package/dist/commands/cancel.d.ts.map +1 -0
- package/dist/{src/commands → commands}/cancel.js +18 -20
- package/dist/commands/cancel.js.map +1 -0
- package/dist/commands/dashboard/tab-actions.d.ts.map +1 -0
- package/dist/commands/dashboard/tab-actions.js.map +1 -0
- package/dist/{src/commands → commands}/dashboard/tab-config.d.ts +3 -3
- package/dist/commands/dashboard/tab-config.d.ts.map +1 -0
- package/dist/{src/commands → commands}/dashboard/tab-config.js +250 -187
- package/dist/commands/dashboard/tab-config.js.map +1 -0
- package/dist/{src/commands → commands}/dashboard/tab-logs.d.ts +1 -1
- package/dist/commands/dashboard/tab-logs.d.ts.map +1 -0
- package/dist/{src/commands → commands}/dashboard/tab-logs.js +62 -38
- package/dist/commands/dashboard/tab-logs.js.map +1 -0
- package/dist/{src/commands → commands}/dashboard/tab-schedules.d.ts +1 -1
- package/dist/commands/dashboard/tab-schedules.d.ts.map +1 -0
- package/dist/{src/commands → commands}/dashboard/tab-schedules.js +85 -76
- package/dist/commands/dashboard/tab-schedules.js.map +1 -0
- package/dist/{src/commands → commands}/dashboard/tab-status.d.ts +7 -7
- package/dist/commands/dashboard/tab-status.d.ts.map +1 -0
- package/dist/{src/commands → commands}/dashboard/tab-status.js +98 -95
- package/dist/commands/dashboard/tab-status.js.map +1 -0
- package/dist/{src/commands → commands}/dashboard/types.d.ts +3 -4
- package/dist/commands/dashboard/types.d.ts.map +1 -0
- package/dist/commands/dashboard/types.js.map +1 -0
- package/dist/{src/commands → commands}/dashboard.d.ts +2 -2
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/{src/commands → commands}/dashboard.js +32 -33
- package/dist/commands/dashboard.js.map +1 -0
- package/dist/{src/commands → commands}/doctor.d.ts +2 -2
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/{src/commands → commands}/doctor.js +40 -43
- package/dist/commands/doctor.js.map +1 -0
- package/dist/{src/commands → commands}/history.d.ts +1 -1
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/{src/commands → commands}/history.js +11 -18
- package/dist/commands/history.js.map +1 -0
- package/dist/{src/commands → commands}/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/{src/commands → commands}/init.js +62 -36
- package/dist/commands/init.js.map +1 -0
- package/dist/{src/commands → commands}/install.d.ts +2 -2
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/{src/commands → commands}/install.js +48 -50
- package/dist/commands/install.js.map +1 -0
- package/dist/{src/commands → commands}/logs.d.ts +1 -1
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/{src/commands → commands}/logs.js +29 -30
- package/dist/commands/logs.js.map +1 -0
- package/dist/{src/commands → commands}/prd-state.d.ts +1 -1
- package/dist/commands/prd-state.d.ts.map +1 -0
- package/dist/{src/commands → commands}/prd-state.js +14 -14
- package/dist/commands/prd-state.js.map +1 -0
- package/dist/{src/commands → commands}/prd.d.ts +1 -1
- package/dist/commands/prd.d.ts.map +1 -0
- package/dist/{src/commands → commands}/prd.js +57 -66
- package/dist/commands/prd.js.map +1 -0
- package/dist/{src/commands → commands}/prds.d.ts +1 -1
- package/dist/commands/prds.d.ts.map +1 -0
- package/dist/{src/commands → commands}/prds.js +51 -53
- package/dist/commands/prds.js.map +1 -0
- package/dist/{src/commands → commands}/prs.d.ts +1 -1
- package/dist/commands/prs.d.ts.map +1 -0
- package/dist/{src/commands → commands}/prs.js +22 -24
- package/dist/commands/prs.js.map +1 -0
- package/dist/{src/commands → commands}/qa.d.ts +2 -2
- package/dist/commands/qa.d.ts.map +1 -0
- package/dist/{src/commands → commands}/qa.js +50 -51
- package/dist/commands/qa.js.map +1 -0
- package/dist/{src/commands → commands}/retry.d.ts +1 -1
- package/dist/commands/retry.d.ts.map +1 -0
- package/dist/{src/commands → commands}/retry.js +9 -10
- package/dist/commands/retry.js.map +1 -0
- package/dist/{src/commands → commands}/review.d.ts +2 -2
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/{src/commands → commands}/review.js +68 -59
- package/dist/commands/review.js.map +1 -0
- package/dist/{src/commands → commands}/run.d.ts +2 -2
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/{src/commands → commands}/run.js +87 -83
- package/dist/commands/run.js.map +1 -0
- package/dist/{src/commands → commands}/serve.d.ts +2 -2
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/{src/commands → commands}/serve.js +18 -18
- package/dist/commands/serve.js.map +1 -0
- package/dist/{src/commands → commands}/slice.d.ts +2 -2
- package/dist/commands/slice.d.ts.map +1 -0
- package/dist/{src/commands → commands}/slice.js +50 -46
- package/dist/commands/slice.js.map +1 -0
- package/dist/{src/commands → commands}/state.d.ts +1 -1
- package/dist/commands/state.d.ts.map +1 -0
- package/dist/{src/commands → commands}/state.js +20 -22
- package/dist/commands/state.js.map +1 -0
- package/dist/{src/commands → commands}/status.d.ts +1 -1
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/{src/commands → commands}/status.js +75 -54
- package/dist/commands/status.js.map +1 -0
- package/dist/{src/commands → commands}/uninstall.d.ts +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/{src/commands → commands}/uninstall.js +12 -14
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/{src/commands → commands}/update.d.ts +1 -1
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/{src/commands → commands}/update.js +23 -23
- package/dist/commands/update.js.map +1 -0
- package/package.json +18 -42
- package/LICENSE +0 -21
- package/README.md +0 -132
- package/dist/shared/types.d.ts +0 -226
- package/dist/shared/types.d.ts.map +0 -1
- package/dist/shared/types.js +0 -7
- package/dist/shared/types.js.map +0 -1
- package/dist/src/agents/soul-compiler.d.ts +0 -11
- package/dist/src/agents/soul-compiler.d.ts.map +0 -1
- package/dist/src/agents/soul-compiler.js +0 -157
- package/dist/src/agents/soul-compiler.js.map +0 -1
- package/dist/src/board/factory.d.ts +0 -3
- package/dist/src/board/factory.d.ts.map +0 -1
- package/dist/src/board/factory.js +0 -10
- package/dist/src/board/factory.js.map +0 -1
- package/dist/src/board/providers/github-graphql.d.ts +0 -16
- package/dist/src/board/providers/github-graphql.d.ts.map +0 -1
- package/dist/src/board/providers/github-graphql.js +0 -43
- package/dist/src/board/providers/github-graphql.js.map +0 -1
- package/dist/src/board/providers/github-projects.d.ts +0 -51
- package/dist/src/board/providers/github-projects.d.ts.map +0 -1
- package/dist/src/board/providers/github-projects.js +0 -672
- package/dist/src/board/providers/github-projects.js.map +0 -1
- package/dist/src/board/types.d.ts +0 -60
- package/dist/src/board/types.d.ts.map +0 -1
- package/dist/src/board/types.js +0 -4
- package/dist/src/board/types.js.map +0 -1
- package/dist/src/cli.d.ts +0 -3
- package/dist/src/cli.d.ts.map +0 -1
- package/dist/src/cli.js.map +0 -1
- package/dist/src/commands/audit.d.ts.map +0 -1
- package/dist/src/commands/audit.js +0 -98
- package/dist/src/commands/audit.js.map +0 -1
- package/dist/src/commands/board.d.ts.map +0 -1
- package/dist/src/commands/board.js +0 -294
- package/dist/src/commands/board.js.map +0 -1
- package/dist/src/commands/cancel.d.ts.map +0 -1
- package/dist/src/commands/cancel.js.map +0 -1
- package/dist/src/commands/dashboard/tab-actions.d.ts.map +0 -1
- package/dist/src/commands/dashboard/tab-actions.js.map +0 -1
- package/dist/src/commands/dashboard/tab-config.d.ts.map +0 -1
- package/dist/src/commands/dashboard/tab-config.js.map +0 -1
- package/dist/src/commands/dashboard/tab-logs.d.ts.map +0 -1
- package/dist/src/commands/dashboard/tab-logs.js.map +0 -1
- package/dist/src/commands/dashboard/tab-schedules.d.ts.map +0 -1
- package/dist/src/commands/dashboard/tab-schedules.js.map +0 -1
- package/dist/src/commands/dashboard/tab-status.d.ts.map +0 -1
- package/dist/src/commands/dashboard/tab-status.js.map +0 -1
- package/dist/src/commands/dashboard/types.d.ts.map +0 -1
- package/dist/src/commands/dashboard/types.js.map +0 -1
- package/dist/src/commands/dashboard.d.ts.map +0 -1
- package/dist/src/commands/dashboard.js.map +0 -1
- package/dist/src/commands/doctor.d.ts.map +0 -1
- package/dist/src/commands/doctor.js.map +0 -1
- package/dist/src/commands/history.d.ts.map +0 -1
- package/dist/src/commands/history.js.map +0 -1
- package/dist/src/commands/init.d.ts.map +0 -1
- package/dist/src/commands/init.js.map +0 -1
- package/dist/src/commands/install.d.ts.map +0 -1
- package/dist/src/commands/install.js.map +0 -1
- package/dist/src/commands/logs.d.ts.map +0 -1
- package/dist/src/commands/logs.js.map +0 -1
- package/dist/src/commands/prd-state.d.ts.map +0 -1
- package/dist/src/commands/prd-state.js.map +0 -1
- package/dist/src/commands/prd.d.ts.map +0 -1
- package/dist/src/commands/prd.js.map +0 -1
- package/dist/src/commands/prds.d.ts.map +0 -1
- package/dist/src/commands/prds.js.map +0 -1
- package/dist/src/commands/prs.d.ts.map +0 -1
- package/dist/src/commands/prs.js.map +0 -1
- package/dist/src/commands/qa.d.ts.map +0 -1
- package/dist/src/commands/qa.js.map +0 -1
- package/dist/src/commands/retry.d.ts.map +0 -1
- package/dist/src/commands/retry.js.map +0 -1
- package/dist/src/commands/review.d.ts.map +0 -1
- package/dist/src/commands/review.js.map +0 -1
- package/dist/src/commands/run.d.ts.map +0 -1
- package/dist/src/commands/run.js.map +0 -1
- package/dist/src/commands/serve.d.ts.map +0 -1
- package/dist/src/commands/serve.js.map +0 -1
- package/dist/src/commands/slice.d.ts.map +0 -1
- package/dist/src/commands/slice.js.map +0 -1
- package/dist/src/commands/state.d.ts.map +0 -1
- package/dist/src/commands/state.js.map +0 -1
- package/dist/src/commands/status.d.ts.map +0 -1
- package/dist/src/commands/status.js.map +0 -1
- package/dist/src/commands/uninstall.d.ts.map +0 -1
- package/dist/src/commands/uninstall.js.map +0 -1
- package/dist/src/commands/update.d.ts.map +0 -1
- package/dist/src/commands/update.js.map +0 -1
- package/dist/src/config.d.ts +0 -23
- package/dist/src/config.d.ts.map +0 -1
- package/dist/src/config.js +0 -671
- package/dist/src/config.js.map +0 -1
- package/dist/src/constants.d.ts +0 -67
- package/dist/src/constants.d.ts.map +0 -1
- package/dist/src/constants.js +0 -131
- package/dist/src/constants.js.map +0 -1
- package/dist/src/server/index.d.ts +0 -23
- package/dist/src/server/index.d.ts.map +0 -1
- package/dist/src/server/index.js +0 -1704
- package/dist/src/server/index.js.map +0 -1
- package/dist/src/slack/channel-manager.d.ts +0 -32
- package/dist/src/slack/channel-manager.d.ts.map +0 -1
- package/dist/src/slack/channel-manager.js +0 -128
- package/dist/src/slack/channel-manager.js.map +0 -1
- package/dist/src/slack/client.d.ts +0 -76
- package/dist/src/slack/client.d.ts.map +0 -1
- package/dist/src/slack/client.js +0 -193
- package/dist/src/slack/client.js.map +0 -1
- package/dist/src/slack/deliberation.d.ts +0 -87
- package/dist/src/slack/deliberation.d.ts.map +0 -1
- package/dist/src/slack/deliberation.js +0 -1354
- package/dist/src/slack/deliberation.js.map +0 -1
- package/dist/src/slack/index.d.ts +0 -6
- package/dist/src/slack/index.d.ts.map +0 -1
- package/dist/src/slack/index.js +0 -5
- package/dist/src/slack/index.js.map +0 -1
- package/dist/src/slack/interaction-listener.d.ts +0 -130
- package/dist/src/slack/interaction-listener.d.ts.map +0 -1
- package/dist/src/slack/interaction-listener.js +0 -1329
- package/dist/src/slack/interaction-listener.js.map +0 -1
- package/dist/src/storage/json-state-migrator.d.ts +0 -24
- package/dist/src/storage/json-state-migrator.d.ts.map +0 -1
- package/dist/src/storage/json-state-migrator.js +0 -197
- package/dist/src/storage/json-state-migrator.js.map +0 -1
- package/dist/src/storage/repositories/index.d.ts +0 -25
- package/dist/src/storage/repositories/index.d.ts.map +0 -1
- package/dist/src/storage/repositories/index.js +0 -45
- package/dist/src/storage/repositories/index.js.map +0 -1
- package/dist/src/storage/repositories/interfaces.d.ts +0 -60
- package/dist/src/storage/repositories/interfaces.d.ts.map +0 -1
- package/dist/src/storage/repositories/interfaces.js +0 -6
- package/dist/src/storage/repositories/interfaces.js.map +0 -1
- package/dist/src/storage/repositories/sqlite/agent-persona-repository.d.ts +0 -33
- package/dist/src/storage/repositories/sqlite/agent-persona-repository.d.ts.map +0 -1
- package/dist/src/storage/repositories/sqlite/agent-persona-repository.js +0 -715
- package/dist/src/storage/repositories/sqlite/agent-persona-repository.js.map +0 -1
- package/dist/src/storage/repositories/sqlite/execution-history-repository.d.ts +0 -21
- package/dist/src/storage/repositories/sqlite/execution-history-repository.d.ts.map +0 -1
- package/dist/src/storage/repositories/sqlite/execution-history-repository.js +0 -94
- package/dist/src/storage/repositories/sqlite/execution-history-repository.js.map +0 -1
- package/dist/src/storage/repositories/sqlite/prd-state-repository.d.ts +0 -17
- package/dist/src/storage/repositories/sqlite/prd-state-repository.d.ts.map +0 -1
- package/dist/src/storage/repositories/sqlite/prd-state-repository.js +0 -74
- package/dist/src/storage/repositories/sqlite/prd-state-repository.js.map +0 -1
- package/dist/src/storage/repositories/sqlite/project-registry-repository.d.ts +0 -17
- package/dist/src/storage/repositories/sqlite/project-registry-repository.d.ts.map +0 -1
- package/dist/src/storage/repositories/sqlite/project-registry-repository.js +0 -43
- package/dist/src/storage/repositories/sqlite/project-registry-repository.js.map +0 -1
- package/dist/src/storage/repositories/sqlite/roadmap-state-repository.d.ts +0 -14
- package/dist/src/storage/repositories/sqlite/roadmap-state-repository.d.ts.map +0 -1
- package/dist/src/storage/repositories/sqlite/roadmap-state-repository.js +0 -47
- package/dist/src/storage/repositories/sqlite/roadmap-state-repository.js.map +0 -1
- package/dist/src/storage/repositories/sqlite/slack-discussion-repository.d.ts +0 -20
- package/dist/src/storage/repositories/sqlite/slack-discussion-repository.d.ts.map +0 -1
- package/dist/src/storage/repositories/sqlite/slack-discussion-repository.js +0 -88
- package/dist/src/storage/repositories/sqlite/slack-discussion-repository.js.map +0 -1
- package/dist/src/storage/sqlite/client.d.ts +0 -23
- package/dist/src/storage/sqlite/client.d.ts.map +0 -1
- package/dist/src/storage/sqlite/client.js +0 -47
- package/dist/src/storage/sqlite/client.js.map +0 -1
- package/dist/src/storage/sqlite/migrations.d.ts +0 -11
- package/dist/src/storage/sqlite/migrations.d.ts.map +0 -1
- package/dist/src/storage/sqlite/migrations.js +0 -94
- package/dist/src/storage/sqlite/migrations.js.map +0 -1
- package/dist/src/templates/prd-template.d.ts +0 -11
- package/dist/src/templates/prd-template.d.ts.map +0 -1
- package/dist/src/templates/prd-template.js +0 -166
- package/dist/src/templates/prd-template.js.map +0 -1
- package/dist/src/templates/slicer-prompt.d.ts +0 -54
- package/dist/src/templates/slicer-prompt.d.ts.map +0 -1
- package/dist/src/templates/slicer-prompt.js +0 -163
- package/dist/src/templates/slicer-prompt.js.map +0 -1
- package/dist/src/types.d.ts +0 -140
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -5
- package/dist/src/types.js.map +0 -1
- package/dist/src/utils/avatar-generator.d.ts +0 -6
- package/dist/src/utils/avatar-generator.d.ts.map +0 -1
- package/dist/src/utils/avatar-generator.js +0 -133
- package/dist/src/utils/avatar-generator.js.map +0 -1
- package/dist/src/utils/checks.d.ts +0 -55
- package/dist/src/utils/checks.d.ts.map +0 -1
- package/dist/src/utils/checks.js +0 -246
- package/dist/src/utils/checks.js.map +0 -1
- package/dist/src/utils/config-writer.d.ts +0 -16
- package/dist/src/utils/config-writer.d.ts.map +0 -1
- package/dist/src/utils/config-writer.js +0 -45
- package/dist/src/utils/config-writer.js.map +0 -1
- package/dist/src/utils/crontab.d.ts +0 -62
- package/dist/src/utils/crontab.d.ts.map +0 -1
- package/dist/src/utils/crontab.js +0 -168
- package/dist/src/utils/crontab.js.map +0 -1
- package/dist/src/utils/execution-history.d.ts +0 -54
- package/dist/src/utils/execution-history.d.ts.map +0 -1
- package/dist/src/utils/execution-history.js +0 -80
- package/dist/src/utils/execution-history.js.map +0 -1
- package/dist/src/utils/github.d.ts +0 -40
- package/dist/src/utils/github.d.ts.map +0 -1
- package/dist/src/utils/github.js +0 -126
- package/dist/src/utils/github.js.map +0 -1
- package/dist/src/utils/notify.d.ts +0 -64
- package/dist/src/utils/notify.d.ts.map +0 -1
- package/dist/src/utils/notify.js +0 -405
- package/dist/src/utils/notify.js.map +0 -1
- package/dist/src/utils/prd-states.d.ts +0 -16
- package/dist/src/utils/prd-states.d.ts.map +0 -1
- package/dist/src/utils/prd-states.js +0 -28
- package/dist/src/utils/prd-states.js.map +0 -1
- package/dist/src/utils/registry.d.ts +0 -45
- package/dist/src/utils/registry.d.ts.map +0 -1
- package/dist/src/utils/registry.js +0 -86
- package/dist/src/utils/registry.js.map +0 -1
- package/dist/src/utils/roadmap-parser.d.ts +0 -45
- package/dist/src/utils/roadmap-parser.d.ts.map +0 -1
- package/dist/src/utils/roadmap-parser.js +0 -136
- package/dist/src/utils/roadmap-parser.js.map +0 -1
- package/dist/src/utils/roadmap-scanner.d.ts +0 -92
- package/dist/src/utils/roadmap-scanner.d.ts.map +0 -1
- package/dist/src/utils/roadmap-scanner.js +0 -349
- package/dist/src/utils/roadmap-scanner.js.map +0 -1
- package/dist/src/utils/roadmap-state.d.ts +0 -90
- package/dist/src/utils/roadmap-state.d.ts.map +0 -1
- package/dist/src/utils/roadmap-state.js +0 -154
- package/dist/src/utils/roadmap-state.js.map +0 -1
- package/dist/src/utils/script-result.d.ts +0 -12
- package/dist/src/utils/script-result.d.ts.map +0 -1
- package/dist/src/utils/script-result.js +0 -46
- package/dist/src/utils/script-result.js.map +0 -1
- package/dist/src/utils/shell.d.ts +0 -27
- package/dist/src/utils/shell.d.ts.map +0 -1
- package/dist/src/utils/shell.js +0 -64
- package/dist/src/utils/shell.js.map +0 -1
- package/dist/src/utils/status-data.d.ts +0 -148
- package/dist/src/utils/status-data.d.ts.map +0 -1
- package/dist/src/utils/status-data.js +0 -548
- package/dist/src/utils/status-data.js.map +0 -1
- package/dist/src/utils/ui.d.ts +0 -55
- package/dist/src/utils/ui.d.ts.map +0 -1
- package/dist/src/utils/ui.js +0 -121
- package/dist/src/utils/ui.js.map +0 -1
- package/scripts/night-watch-audit-cron.sh +0 -149
- package/scripts/night-watch-cron.sh +0 -484
- package/scripts/night-watch-helpers.sh +0 -499
- package/scripts/night-watch-pr-reviewer-cron.sh +0 -528
- package/scripts/night-watch-qa-cron.sh +0 -281
- package/scripts/night-watch-slicer-cron.sh +0 -90
- package/scripts/test-helpers.bats +0 -77
- package/templates/night-watch-pr-reviewer.md +0 -174
- package/templates/night-watch-qa.md +0 -157
- package/templates/night-watch-slicer.md +0 -219
- package/templates/night-watch.config.json +0 -30
- package/templates/night-watch.md +0 -94
- package/templates/prd-executor.md +0 -235
- package/templates/prd.md +0 -26
- package/web/dist/assets/index-BiJf9LFT.js +0 -458
- package/web/dist/assets/index-OpSgvsYu.css +0 -1
- package/web/dist/avatars/carlos.webp +0 -0
- package/web/dist/avatars/dev.webp +0 -0
- package/web/dist/avatars/maya.webp +0 -0
- package/web/dist/avatars/priya.webp +0 -0
- package/web/dist/index.html +0 -82
- /package/dist/{src/commands → commands}/dashboard/tab-actions.d.ts +0 -0
- /package/dist/{src/commands → commands}/dashboard/tab-actions.js +0 -0
- /package/dist/{src/commands → commands}/dashboard/types.js +0 -0
package/dist/src/utils/ui.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UI utilities for Night Watch CLI
|
|
3
|
-
* Provides colored output, spinners, and table formatting
|
|
4
|
-
*/
|
|
5
|
-
import chalk from "chalk";
|
|
6
|
-
import ora from "ora";
|
|
7
|
-
import Table from "cli-table3";
|
|
8
|
-
/**
|
|
9
|
-
* Print a success message with green check prefix
|
|
10
|
-
*/
|
|
11
|
-
export function success(msg) {
|
|
12
|
-
console.log(chalk.green("✔"), msg);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Print an error message with red cross prefix
|
|
16
|
-
*/
|
|
17
|
-
export function error(msg) {
|
|
18
|
-
console.log(chalk.red("✖"), msg);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Print a warning message with yellow warning prefix
|
|
22
|
-
*/
|
|
23
|
-
export function warn(msg) {
|
|
24
|
-
console.log(chalk.yellow("⚠"), msg);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Print an info message with cyan info prefix
|
|
28
|
-
*/
|
|
29
|
-
export function info(msg) {
|
|
30
|
-
console.log(chalk.cyan("ℹ"), msg);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Print a bold section header with underline
|
|
34
|
-
*/
|
|
35
|
-
export function header(title) {
|
|
36
|
-
const line = "─".repeat(Math.max(40, title.length + 4));
|
|
37
|
-
console.log();
|
|
38
|
-
console.log(chalk.bold(title));
|
|
39
|
-
console.log(chalk.dim(line));
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Print dimmed text for secondary information
|
|
43
|
-
*/
|
|
44
|
-
export function dim(msg) {
|
|
45
|
-
console.log(chalk.dim(msg));
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Format and print a key-value pair with consistent alignment
|
|
49
|
-
*/
|
|
50
|
-
export function label(key, value) {
|
|
51
|
-
const paddedKey = key.padEnd(18);
|
|
52
|
-
console.log(` ${chalk.dim(paddedKey)}${value}`);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Create an ora spinner instance
|
|
56
|
-
*/
|
|
57
|
-
export function createSpinner(text) {
|
|
58
|
-
return ora({
|
|
59
|
-
text,
|
|
60
|
-
spinner: "dots",
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Create a configured cli-table3 instance with sensible defaults
|
|
65
|
-
*/
|
|
66
|
-
export function createTable(options) {
|
|
67
|
-
const defaultOptions = {
|
|
68
|
-
chars: {
|
|
69
|
-
top: "─",
|
|
70
|
-
"top-mid": "┬",
|
|
71
|
-
"top-left": "┌",
|
|
72
|
-
"top-right": "┐",
|
|
73
|
-
bottom: "─",
|
|
74
|
-
"bottom-mid": "┴",
|
|
75
|
-
"bottom-left": "└",
|
|
76
|
-
"bottom-right": "┘",
|
|
77
|
-
left: "│",
|
|
78
|
-
"left-mid": "├",
|
|
79
|
-
mid: "─",
|
|
80
|
-
"mid-mid": "┼",
|
|
81
|
-
right: "│",
|
|
82
|
-
"right-mid": "┤",
|
|
83
|
-
middle: "│",
|
|
84
|
-
},
|
|
85
|
-
style: {
|
|
86
|
-
"padding-left": 1,
|
|
87
|
-
"padding-right": 1,
|
|
88
|
-
head: ["cyan"],
|
|
89
|
-
border: ["dim"],
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
return new Table({ ...defaultOptions, ...options });
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Format status indicator: green running or dim not running
|
|
96
|
-
*/
|
|
97
|
-
export function formatRunningStatus(running, pid) {
|
|
98
|
-
if (running) {
|
|
99
|
-
return chalk.green(`● Running (PID: ${pid})`);
|
|
100
|
-
}
|
|
101
|
-
if (pid) {
|
|
102
|
-
return chalk.dim(`○ Stale lock (PID: ${pid})`);
|
|
103
|
-
}
|
|
104
|
-
return chalk.dim("○ Not running");
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Format installed status: green installed or yellow not installed
|
|
108
|
-
*/
|
|
109
|
-
export function formatInstalledStatus(installed) {
|
|
110
|
-
if (installed) {
|
|
111
|
-
return chalk.green("✔ Installed");
|
|
112
|
-
}
|
|
113
|
-
return chalk.yellow("⚠ Not installed");
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Print a step message with step number
|
|
117
|
-
*/
|
|
118
|
-
export function step(current, total, msg) {
|
|
119
|
-
console.log(chalk.dim(`[${current}/${total}]`), msg);
|
|
120
|
-
}
|
|
121
|
-
//# sourceMappingURL=ui.js.map
|
package/dist/src/utils/ui.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../../src/utils/ui.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAiB,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW;IACjC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,GAAW;IAC/B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,GAAW;IAC9B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,GAAW;IAC9B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,KAAa;IAClC,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IACxD,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CAAC,GAAW;IAC7B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,GAAW,EAAE,KAAa;IAC9C,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC;AACnD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,GAAG,CAAC;QACT,IAAI;QACJ,OAAO,EAAE,MAAM;KAChB,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,OAAuC;IACjE,MAAM,cAAc,GAAkC;QACpD,KAAK,EAAE;YACL,GAAG,EAAE,GAAG;YACR,SAAS,EAAE,GAAG;YACd,UAAU,EAAE,GAAG;YACf,WAAW,EAAE,GAAG;YAChB,MAAM,EAAE,GAAG;YACX,YAAY,EAAE,GAAG;YACjB,aAAa,EAAE,GAAG;YAClB,cAAc,EAAE,GAAG;YACnB,IAAI,EAAE,GAAG;YACT,UAAU,EAAE,GAAG;YACf,GAAG,EAAE,GAAG;YACR,SAAS,EAAE,GAAG;YACd,KAAK,EAAE,GAAG;YACV,WAAW,EAAE,GAAG;YAChB,MAAM,EAAE,GAAG;SACZ;QACD,KAAK,EAAE;YACL,cAAc,EAAE,CAAC;YACjB,eAAe,EAAE,CAAC;YAClB,IAAI,EAAE,CAAC,MAAM,CAAC;YACd,MAAM,EAAE,CAAC,KAAK,CAAC;SAChB;KACF,CAAC;IAEF,OAAO,IAAI,KAAK,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAgB,EAAE,GAAkB;IACtE,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,KAAK,CAAC,KAAK,CAAC,mBAAmB,GAAG,GAAG,CAAC,CAAC;IAChD,CAAC;IACD,IAAI,GAAG,EAAE,CAAC;QACR,OAAO,KAAK,CAAC,GAAG,CAAC,sBAAsB,GAAG,GAAG,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAAkB;IACtD,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,OAAe,EAAE,KAAa,EAAE,GAAW;IAC9D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,OAAO,IAAI,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
# Night Watch Audit Cron Runner (project-agnostic)
|
|
5
|
-
# Usage: night-watch-audit-cron.sh /path/to/project
|
|
6
|
-
#
|
|
7
|
-
# NOTE: This script expects environment variables to be set by the caller.
|
|
8
|
-
# The Node.js CLI will inject config values via environment variables.
|
|
9
|
-
# Required env vars (with defaults shown):
|
|
10
|
-
# NW_AUDIT_MAX_RUNTIME=1800 - Maximum runtime in seconds (30 minutes)
|
|
11
|
-
# NW_PROVIDER_CMD=claude - AI provider CLI to use (claude, codex, etc.)
|
|
12
|
-
# NW_DRY_RUN=0 - Set to 1 for dry-run mode (prints diagnostics only)
|
|
13
|
-
|
|
14
|
-
PROJECT_DIR="${1:?Usage: $0 /path/to/project}"
|
|
15
|
-
PROJECT_NAME=$(basename "${PROJECT_DIR}")
|
|
16
|
-
LOG_DIR="${PROJECT_DIR}/logs"
|
|
17
|
-
LOG_FILE="${LOG_DIR}/audit.log"
|
|
18
|
-
REPORT_FILE="${PROJECT_DIR}/logs/audit-report.md"
|
|
19
|
-
MAX_RUNTIME="${NW_AUDIT_MAX_RUNTIME:-1800}" # 30 minutes
|
|
20
|
-
MAX_LOG_SIZE="524288" # 512 KB
|
|
21
|
-
PROVIDER_CMD="${NW_PROVIDER_CMD:-claude}"
|
|
22
|
-
|
|
23
|
-
# Ensure NVM / Node / Claude are on PATH
|
|
24
|
-
export NVM_DIR="${HOME}/.nvm"
|
|
25
|
-
[ -s "${NVM_DIR}/nvm.sh" ] && . "${NVM_DIR}/nvm.sh"
|
|
26
|
-
|
|
27
|
-
mkdir -p "${LOG_DIR}"
|
|
28
|
-
|
|
29
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
30
|
-
# shellcheck source=night-watch-helpers.sh
|
|
31
|
-
source "${SCRIPT_DIR}/night-watch-helpers.sh"
|
|
32
|
-
PROJECT_RUNTIME_KEY=$(project_runtime_key "${PROJECT_DIR}")
|
|
33
|
-
# NOTE: Lock file path must match auditLockPath() in src/utils/status-data.ts
|
|
34
|
-
LOCK_FILE="/tmp/night-watch-audit-${PROJECT_RUNTIME_KEY}.lock"
|
|
35
|
-
|
|
36
|
-
emit_result() {
|
|
37
|
-
local status="${1:?status required}"
|
|
38
|
-
local details="${2:-}"
|
|
39
|
-
if [ -n "${details}" ]; then
|
|
40
|
-
echo "NIGHT_WATCH_RESULT:${status}|${details}"
|
|
41
|
-
else
|
|
42
|
-
echo "NIGHT_WATCH_RESULT:${status}"
|
|
43
|
-
fi
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
# Validate provider
|
|
47
|
-
if ! validate_provider "${PROVIDER_CMD}"; then
|
|
48
|
-
echo "ERROR: Unknown provider: ${PROVIDER_CMD}" >&2
|
|
49
|
-
exit 1
|
|
50
|
-
fi
|
|
51
|
-
|
|
52
|
-
rotate_log
|
|
53
|
-
|
|
54
|
-
if ! acquire_lock "${LOCK_FILE}"; then
|
|
55
|
-
emit_result "skip_locked"
|
|
56
|
-
exit 0
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
# Dry-run mode: print diagnostics and exit
|
|
60
|
-
if [ "${NW_DRY_RUN:-0}" = "1" ]; then
|
|
61
|
-
echo "=== Dry Run: Code Auditor ==="
|
|
62
|
-
echo "Provider: ${PROVIDER_CMD}"
|
|
63
|
-
echo "Max Runtime: ${MAX_RUNTIME}s"
|
|
64
|
-
echo "Report File: ${REPORT_FILE}"
|
|
65
|
-
emit_result "skip_dry_run"
|
|
66
|
-
exit 0
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
if [ -n "${NW_DEFAULT_BRANCH:-}" ]; then
|
|
70
|
-
DEFAULT_BRANCH="${NW_DEFAULT_BRANCH}"
|
|
71
|
-
else
|
|
72
|
-
DEFAULT_BRANCH=$(detect_default_branch "${PROJECT_DIR}")
|
|
73
|
-
fi
|
|
74
|
-
|
|
75
|
-
AUDIT_WORKTREE_BASENAME="${PROJECT_NAME}-nw-audit-runner"
|
|
76
|
-
AUDIT_WORKTREE_DIR="$(dirname "${PROJECT_DIR}")/${AUDIT_WORKTREE_BASENAME}"
|
|
77
|
-
|
|
78
|
-
cleanup_worktrees "${PROJECT_DIR}" "${AUDIT_WORKTREE_BASENAME}"
|
|
79
|
-
|
|
80
|
-
if ! prepare_detached_worktree "${PROJECT_DIR}" "${AUDIT_WORKTREE_DIR}" "${DEFAULT_BRANCH}" "${LOG_FILE}"; then
|
|
81
|
-
log "FAIL: Unable to create isolated audit worktree ${AUDIT_WORKTREE_DIR}"
|
|
82
|
-
exit 1
|
|
83
|
-
fi
|
|
84
|
-
|
|
85
|
-
# Ensure the logs dir exists inside the worktree so the provider can write the report
|
|
86
|
-
mkdir -p "${AUDIT_WORKTREE_DIR}/logs"
|
|
87
|
-
|
|
88
|
-
log "START: Running code audit for ${PROJECT_NAME} (provider: ${PROVIDER_CMD})"
|
|
89
|
-
|
|
90
|
-
EXIT_CODE=0
|
|
91
|
-
|
|
92
|
-
case "${PROVIDER_CMD}" in
|
|
93
|
-
claude)
|
|
94
|
-
if (
|
|
95
|
-
cd "${AUDIT_WORKTREE_DIR}" && timeout "${MAX_RUNTIME}" \
|
|
96
|
-
claude -p "/night-watch-audit" \
|
|
97
|
-
--dangerously-skip-permissions \
|
|
98
|
-
>> "${LOG_FILE}" 2>&1
|
|
99
|
-
); then
|
|
100
|
-
EXIT_CODE=0
|
|
101
|
-
else
|
|
102
|
-
EXIT_CODE=$?
|
|
103
|
-
fi
|
|
104
|
-
;;
|
|
105
|
-
codex)
|
|
106
|
-
if (
|
|
107
|
-
cd "${AUDIT_WORKTREE_DIR}" && timeout "${MAX_RUNTIME}" \
|
|
108
|
-
codex --quiet \
|
|
109
|
-
--yolo \
|
|
110
|
-
--prompt "$(cat "${AUDIT_WORKTREE_DIR}/.claude/commands/night-watch-audit.md")" \
|
|
111
|
-
>> "${LOG_FILE}" 2>&1
|
|
112
|
-
); then
|
|
113
|
-
EXIT_CODE=0
|
|
114
|
-
else
|
|
115
|
-
EXIT_CODE=$?
|
|
116
|
-
fi
|
|
117
|
-
;;
|
|
118
|
-
*)
|
|
119
|
-
log "ERROR: Unknown provider: ${PROVIDER_CMD}"
|
|
120
|
-
exit 1
|
|
121
|
-
;;
|
|
122
|
-
esac
|
|
123
|
-
|
|
124
|
-
# Copy report back to project dir (if it was written in the worktree)
|
|
125
|
-
WORKTREE_REPORT="${AUDIT_WORKTREE_DIR}/logs/audit-report.md"
|
|
126
|
-
if [ -f "${WORKTREE_REPORT}" ]; then
|
|
127
|
-
cp "${WORKTREE_REPORT}" "${REPORT_FILE}"
|
|
128
|
-
log "INFO: Audit report copied to ${REPORT_FILE}"
|
|
129
|
-
fi
|
|
130
|
-
|
|
131
|
-
cleanup_worktrees "${PROJECT_DIR}" "${AUDIT_WORKTREE_BASENAME}"
|
|
132
|
-
|
|
133
|
-
if [ "${EXIT_CODE}" -eq 0 ]; then
|
|
134
|
-
if [ -f "${REPORT_FILE}" ] && grep -q "NO_ISSUES_FOUND" "${REPORT_FILE}" 2>/dev/null; then
|
|
135
|
-
log "DONE: Audit complete — no actionable issues found"
|
|
136
|
-
emit_result "skip_clean"
|
|
137
|
-
else
|
|
138
|
-
log "DONE: Audit complete — report written to ${REPORT_FILE}"
|
|
139
|
-
emit_result "success_audit"
|
|
140
|
-
fi
|
|
141
|
-
elif [ "${EXIT_CODE}" -eq 124 ]; then
|
|
142
|
-
log "TIMEOUT: Audit killed after ${MAX_RUNTIME}s"
|
|
143
|
-
emit_result "timeout"
|
|
144
|
-
else
|
|
145
|
-
log "FAIL: Audit exited with code ${EXIT_CODE}"
|
|
146
|
-
emit_result "failure"
|
|
147
|
-
fi
|
|
148
|
-
|
|
149
|
-
exit "${EXIT_CODE}"
|