kynjal-cli 4.0.0 → 4.0.1
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/src/appliance/gguf-engine.d.ts +91 -0
- package/dist/src/appliance/gguf-engine.d.ts.map +1 -0
- package/dist/src/appliance/gguf-engine.js +286 -525
- package/dist/src/appliance/gguf-engine.js.map +1 -1
- package/dist/src/appliance/ruvllm-bridge.d.ts +102 -0
- package/dist/src/appliance/ruvllm-bridge.d.ts.map +1 -0
- package/dist/src/appliance/ruvllm-bridge.js +203 -403
- package/dist/src/appliance/ruvllm-bridge.js.map +1 -1
- package/dist/src/appliance/rvfa-builder.d.ts +44 -0
- package/dist/src/appliance/rvfa-builder.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-builder.js +154 -208
- package/dist/src/appliance/rvfa-builder.js.map +1 -1
- package/dist/src/appliance/rvfa-distribution.d.ts +97 -0
- package/dist/src/appliance/rvfa-distribution.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-distribution.js +260 -423
- package/dist/src/appliance/rvfa-distribution.js.map +1 -1
- package/dist/src/appliance/rvfa-format.d.ts +111 -0
- package/dist/src/appliance/rvfa-format.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-format.js +128 -200
- package/dist/src/appliance/rvfa-format.js.map +1 -1
- package/dist/src/appliance/rvfa-runner.d.ts +69 -0
- package/dist/src/appliance/rvfa-runner.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-runner.js +168 -304
- package/dist/src/appliance/rvfa-runner.js.map +1 -1
- package/dist/src/appliance/rvfa-signing.d.ts +123 -0
- package/dist/src/appliance/rvfa-signing.d.ts.map +1 -0
- package/dist/src/appliance/rvfa-signing.js +173 -295
- package/dist/src/appliance/rvfa-signing.js.map +1 -1
- package/dist/src/benchmarks/pretrain/index.d.ts +58 -0
- package/dist/src/benchmarks/pretrain/index.d.ts.map +1 -0
- package/dist/src/benchmarks/pretrain/index.js +331 -542
- package/dist/src/benchmarks/pretrain/index.js.map +1 -1
- package/dist/src/commands/agent.js +574 -697
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/analyze.js +1218 -1548
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/appliance-advanced.js +158 -267
- package/dist/src/commands/appliance-advanced.js.map +1 -1
- package/dist/src/commands/appliance.js +318 -493
- package/dist/src/commands/appliance.js.map +1 -1
- package/dist/src/commands/benchmark.js +372 -523
- package/dist/src/commands/benchmark.js.map +1 -1
- package/dist/src/commands/claims.js +274 -364
- package/dist/src/commands/claims.js.map +1 -1
- package/dist/src/commands/cleanup.js +113 -157
- package/dist/src/commands/cleanup.js.map +1 -1
- package/dist/src/commands/completions.js +477 -118
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.js +237 -303
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/daemon.js +487 -596
- package/dist/src/commands/daemon.js.map +1 -1
- package/dist/src/commands/deployment.js +194 -275
- package/dist/src/commands/deployment.js.map +1 -1
- package/dist/src/commands/doctor.js +504 -686
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/embeddings.js +1293 -1543
- package/dist/src/commands/embeddings.js.map +1 -1
- package/dist/src/commands/guidance.js +449 -596
- package/dist/src/commands/guidance.js.map +1 -1
- package/dist/src/commands/hive-mind.js +854 -938
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks.js +3112 -3519
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.d.ts +115 -0
- package/dist/src/commands/index.d.ts.map +1 -0
- package/dist/src/commands/index.js +126 -308
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.js +788 -940
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/issues.js +383 -558
- package/dist/src/commands/issues.js.map +1 -1
- package/dist/src/commands/mcp.js +493 -605
- package/dist/src/commands/mcp.js.map +1 -1
- package/dist/src/commands/memory.js +833 -1026
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.js +282 -347
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/neural.js +1289 -1563
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/performance.js +497 -643
- package/dist/src/commands/performance.js.map +1 -1
- package/dist/src/commands/plugins.js +668 -841
- package/dist/src/commands/plugins.js.map +1 -1
- package/dist/src/commands/process.js +392 -447
- package/dist/src/commands/process.js.map +1 -1
- package/dist/src/commands/progress.js +162 -256
- package/dist/src/commands/progress.js.map +1 -1
- package/dist/src/commands/providers.js +150 -220
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/route.js +520 -665
- package/dist/src/commands/route.js.map +1 -1
- package/dist/src/commands/ruvector/backup.js +505 -651
- package/dist/src/commands/ruvector/backup.js.map +1 -1
- package/dist/src/commands/ruvector/benchmark.js +349 -401
- package/dist/src/commands/ruvector/benchmark.js.map +1 -1
- package/dist/src/commands/ruvector/import.js +224 -266
- package/dist/src/commands/ruvector/import.js.map +1 -1
- package/dist/src/commands/ruvector/index.js +37 -75
- package/dist/src/commands/ruvector/index.js.map +1 -1
- package/dist/src/commands/ruvector/init.js +336 -359
- package/dist/src/commands/ruvector/init.js.map +1 -1
- package/dist/src/commands/ruvector/migrate.js +335 -322
- package/dist/src/commands/ruvector/migrate.js.map +1 -1
- package/dist/src/commands/ruvector/optimize.js +375 -431
- package/dist/src/commands/ruvector/optimize.js.map +1 -1
- package/dist/src/commands/ruvector/setup.js +703 -117
- package/dist/src/commands/ruvector/setup.js.map +1 -1
- package/dist/src/commands/ruvector/status.js +364 -419
- package/dist/src/commands/ruvector/status.js.map +1 -1
- package/dist/src/commands/security.js +485 -608
- package/dist/src/commands/security.js.map +1 -1
- package/dist/src/commands/session.js +504 -626
- package/dist/src/commands/session.js.map +1 -1
- package/dist/src/commands/start.js +267 -364
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/status.js +380 -486
- package/dist/src/commands/status.js.map +1 -1
- package/dist/src/commands/swarm.js +408 -488
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/commands/task.js +423 -538
- package/dist/src/commands/task.js.map +1 -1
- package/dist/src/commands/transfer-store.js +322 -412
- package/dist/src/commands/transfer-store.js.map +1 -1
- package/dist/src/commands/update.js +196 -291
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/workflow.js +386 -486
- package/dist/src/commands/workflow.js.map +1 -1
- package/dist/src/config-adapter.d.ts +15 -0
- package/dist/src/config-adapter.d.ts.map +1 -0
- package/dist/src/config-adapter.js +38 -39
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.d.ts +77 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +309 -411
- package/dist/src/index.js.map +1 -1
- package/dist/src/infrastructure/in-memory-repositories.d.ts +68 -0
- package/dist/src/infrastructure/in-memory-repositories.d.ts.map +1 -0
- package/dist/src/infrastructure/in-memory-repositories.js +246 -507
- package/dist/src/infrastructure/in-memory-repositories.js.map +1 -1
- package/dist/src/init/claudemd-generator.d.ts +25 -0
- package/dist/src/init/claudemd-generator.d.ts.map +1 -0
- package/dist/src/init/claudemd-generator.js +368 -78
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.d.ts +41 -0
- package/dist/src/init/executor.d.ts.map +1 -0
- package/dist/src/init/executor.js +1307 -996
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/helpers-generator.d.ts +60 -0
- package/dist/src/init/helpers-generator.d.ts.map +1 -0
- package/dist/src/init/helpers-generator.js +657 -12
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/index.d.ts +1 -1
- package/dist/src/init/index.d.ts.map +1 -1
- package/dist/src/init/index.js +1 -1
- package/dist/src/init/index.js.map +1 -1
- package/dist/src/init/mcp-generator.js +33 -37
- package/dist/src/init/mcp-generator.js.map +1 -1
- package/dist/src/init/settings-generator.js +76 -77
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.js +801 -3
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +1 -1
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +76 -59
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.d.ts +92 -0
- package/dist/src/mcp-client.d.ts.map +1 -0
- package/dist/src/mcp-client.js +81 -125
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.d.ts +161 -0
- package/dist/src/mcp-server.d.ts.map +1 -0
- package/dist/src/mcp-server.js +470 -757
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +391 -492
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/agentdb-tools.js +332 -533
- package/dist/src/mcp-tools/agentdb-tools.js.map +1 -1
- package/dist/src/mcp-tools/analyze-tools.js +172 -236
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
- package/dist/src/mcp-tools/auto-install.d.ts +83 -0
- package/dist/src/mcp-tools/auto-install.d.ts.map +1 -0
- package/dist/src/mcp-tools/auto-install.js +80 -142
- package/dist/src/mcp-tools/auto-install.js.map +1 -1
- package/dist/src/mcp-tools/browser-tools.js +252 -375
- package/dist/src/mcp-tools/browser-tools.js.map +1 -1
- package/dist/src/mcp-tools/claims-tools.js +473 -565
- package/dist/src/mcp-tools/claims-tools.js.map +1 -1
- package/dist/src/mcp-tools/config-tools.js +197 -272
- package/dist/src/mcp-tools/config-tools.js.map +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +500 -572
- package/dist/src/mcp-tools/coordination-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +286 -364
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +582 -693
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/github-tools.js +260 -311
- package/dist/src/mcp-tools/github-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +573 -640
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +2215 -2648
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +350 -505
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +315 -412
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/performance-tools.js +420 -480
- package/dist/src/mcp-tools/performance-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +204 -278
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/ruvllm-tools.js +163 -279
- package/dist/src/mcp-tools/ruvllm-tools.js.map +1 -1
- package/dist/src/mcp-tools/security-tools.js +297 -429
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/mcp-tools/session-tools.js +185 -234
- package/dist/src/mcp-tools/session-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +207 -260
- package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +276 -325
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/task-tools.js +270 -336
- package/dist/src/mcp-tools/task-tools.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +148 -196
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +186 -333
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/mcp-tools/types.d.ts +31 -0
- package/dist/src/mcp-tools/types.d.ts.map +1 -0
- package/dist/src/mcp-tools/wasm-agent-tools.js +133 -280
- package/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +405 -450
- package/dist/src/mcp-tools/workflow-tools.js.map +1 -1
- package/dist/src/memory/ewc-consolidation.d.ts +295 -0
- package/dist/src/memory/ewc-consolidation.d.ts.map +1 -0
- package/dist/src/memory/ewc-consolidation.js +190 -303
- package/dist/src/memory/ewc-consolidation.js.map +1 -1
- package/dist/src/memory/intelligence.d.ts +338 -0
- package/dist/src/memory/intelligence.d.ts.map +1 -0
- package/dist/src/memory/intelligence.js +569 -794
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts +407 -0
- package/dist/src/memory/memory-bridge.d.ts.map +1 -0
- package/dist/src/memory/memory-bridge.js +1170 -1640
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-initializer.d.ts +412 -0
- package/dist/src/memory/memory-initializer.d.ts.map +1 -0
- package/dist/src/memory/memory-initializer.js +1836 -1851
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/sona-optimizer.d.ts +227 -0
- package/dist/src/memory/sona-optimizer.d.ts.map +1 -0
- package/dist/src/memory/sona-optimizer.js +199 -329
- package/dist/src/memory/sona-optimizer.js.map +1 -1
- package/dist/src/output.d.ts +2 -2
- package/dist/src/output.d.ts.map +1 -1
- package/dist/src/output.js +242 -272
- package/dist/src/output.js.map +1 -1
- package/dist/src/parser.d.ts +51 -0
- package/dist/src/parser.d.ts.map +1 -0
- package/dist/src/parser.js +140 -187
- package/dist/src/parser.js.map +1 -1
- package/dist/src/plugins/manager.d.ts +133 -0
- package/dist/src/plugins/manager.d.ts.map +1 -0
- package/dist/src/plugins/manager.js +285 -521
- package/dist/src/plugins/manager.js.map +1 -1
- package/dist/src/plugins/store/discovery.d.ts +88 -0
- package/dist/src/plugins/store/discovery.d.ts.map +1 -0
- package/dist/src/plugins/store/discovery.js +271 -358
- package/dist/src/plugins/store/discovery.js.map +1 -1
- package/dist/src/plugins/store/index.d.ts +76 -0
- package/dist/src/plugins/store/index.d.ts.map +1 -0
- package/dist/src/plugins/store/index.js +48 -105
- package/dist/src/plugins/store/index.js.map +1 -1
- package/dist/src/plugins/store/search.d.ts +46 -0
- package/dist/src/plugins/store/search.d.ts.map +1 -0
- package/dist/src/plugins/store/search.js +69 -107
- package/dist/src/plugins/store/search.js.map +1 -1
- package/dist/src/plugins/store/types.d.ts +274 -0
- package/dist/src/plugins/store/types.d.ts.map +1 -0
- package/dist/src/plugins/tests/demo-plugin-store.js +113 -160
- package/dist/src/plugins/tests/demo-plugin-store.js.map +1 -1
- package/dist/src/plugins/tests/standalone-test.js +172 -223
- package/dist/src/plugins/tests/standalone-test.js.map +1 -1
- package/dist/src/plugins/tests/test-plugin-store.js +190 -228
- package/dist/src/plugins/tests/test-plugin-store.js.map +1 -1
- package/dist/src/production/circuit-breaker.d.ts +101 -0
- package/dist/src/production/circuit-breaker.d.ts.map +1 -0
- package/dist/src/production/circuit-breaker.js +62 -126
- package/dist/src/production/circuit-breaker.js.map +1 -1
- package/dist/src/production/error-handler.d.ts +92 -0
- package/dist/src/production/error-handler.d.ts.map +1 -0
- package/dist/src/production/error-handler.js +86 -156
- package/dist/src/production/error-handler.js.map +1 -1
- package/dist/src/production/monitoring.d.ts +161 -0
- package/dist/src/production/monitoring.d.ts.map +1 -0
- package/dist/src/production/monitoring.js +139 -220
- package/dist/src/production/monitoring.js.map +1 -1
- package/dist/src/production/rate-limiter.d.ts +80 -0
- package/dist/src/production/rate-limiter.d.ts.map +1 -0
- package/dist/src/production/rate-limiter.js +74 -93
- package/dist/src/production/rate-limiter.js.map +1 -1
- package/dist/src/production/retry.d.ts +48 -0
- package/dist/src/production/retry.d.ts.map +1 -0
- package/dist/src/production/retry.js +75 -167
- package/dist/src/production/retry.js.map +1 -1
- package/dist/src/prompt.d.ts +44 -0
- package/dist/src/prompt.d.ts.map +1 -0
- package/dist/src/prompt.js +436 -560
- package/dist/src/prompt.js.map +1 -1
- package/dist/src/runtime/headless.d.ts +60 -0
- package/dist/src/runtime/headless.d.ts.map +1 -0
- package/dist/src/runtime/headless.js +197 -286
- package/dist/src/runtime/headless.js.map +1 -1
- package/dist/src/ruvector/agent-wasm.d.ts +182 -0
- package/dist/src/ruvector/agent-wasm.d.ts.map +1 -0
- package/dist/src/ruvector/agent-wasm.js +156 -351
- package/dist/src/ruvector/agent-wasm.js.map +1 -1
- package/dist/src/ruvector/ast-analyzer.d.ts +67 -0
- package/dist/src/ruvector/ast-analyzer.d.ts.map +1 -0
- package/dist/src/ruvector/ast-analyzer.js +145 -232
- package/dist/src/ruvector/ast-analyzer.js.map +1 -1
- package/dist/src/ruvector/coverage-router.d.ts +160 -0
- package/dist/src/ruvector/coverage-router.d.ts.map +1 -0
- package/dist/src/ruvector/coverage-router.js +287 -419
- package/dist/src/ruvector/coverage-router.js.map +1 -1
- package/dist/src/ruvector/coverage-tools.js +56 -101
- package/dist/src/ruvector/coverage-tools.js.map +1 -1
- package/dist/src/ruvector/diff-classifier.d.ts +175 -0
- package/dist/src/ruvector/diff-classifier.d.ts.map +1 -0
- package/dist/src/ruvector/diff-classifier.js +324 -451
- package/dist/src/ruvector/diff-classifier.js.map +1 -1
- package/dist/src/ruvector/enhanced-model-router.d.ts +146 -0
- package/dist/src/ruvector/enhanced-model-router.d.ts.map +1 -0
- package/dist/src/ruvector/enhanced-model-router.js +260 -336
- package/dist/src/ruvector/enhanced-model-router.js.map +1 -1
- package/dist/src/ruvector/flash-attention.d.ts +195 -0
- package/dist/src/ruvector/flash-attention.d.ts.map +1 -0
- package/dist/src/ruvector/flash-attention.js +223 -254
- package/dist/src/ruvector/flash-attention.js.map +1 -1
- package/dist/src/ruvector/graph-analyzer.d.ts +187 -0
- package/dist/src/ruvector/graph-analyzer.d.ts.map +1 -0
- package/dist/src/ruvector/graph-analyzer.js +486 -680
- package/dist/src/ruvector/graph-analyzer.js.map +1 -1
- package/dist/src/ruvector/index.d.ts +40 -0
- package/dist/src/ruvector/index.d.ts.map +1 -0
- package/dist/src/ruvector/index.js +36 -106
- package/dist/src/ruvector/index.js.map +1 -1
- package/dist/src/ruvector/lora-adapter.d.ts +218 -0
- package/dist/src/ruvector/lora-adapter.d.ts.map +1 -0
- package/dist/src/ruvector/lora-adapter.js +155 -248
- package/dist/src/ruvector/lora-adapter.js.map +1 -1
- package/dist/src/ruvector/model-router.d.ts +220 -0
- package/dist/src/ruvector/model-router.d.ts.map +1 -0
- package/dist/src/ruvector/model-router.js +175 -248
- package/dist/src/ruvector/model-router.js.map +1 -1
- package/dist/src/ruvector/moe-router.d.ts +206 -0
- package/dist/src/ruvector/moe-router.d.ts.map +1 -0
- package/dist/src/ruvector/moe-router.js +228 -286
- package/dist/src/ruvector/moe-router.js.map +1 -1
- package/dist/src/ruvector/q-learning-router.d.ts +211 -0
- package/dist/src/ruvector/q-learning-router.d.ts.map +1 -0
- package/dist/src/ruvector/q-learning-router.js +257 -338
- package/dist/src/ruvector/q-learning-router.js.map +1 -1
- package/dist/src/ruvector/ruvllm-wasm.d.ts +179 -0
- package/dist/src/ruvector/ruvllm-wasm.d.ts.map +1 -0
- package/dist/src/ruvector/ruvllm-wasm.js +270 -434
- package/dist/src/ruvector/ruvllm-wasm.js.map +1 -1
- package/dist/src/ruvector/semantic-router.d.ts +77 -0
- package/dist/src/ruvector/semantic-router.d.ts.map +1 -0
- package/dist/src/ruvector/semantic-router.js +60 -67
- package/dist/src/ruvector/semantic-router.js.map +1 -1
- package/dist/src/ruvector/vector-db.d.ts +69 -0
- package/dist/src/ruvector/vector-db.d.ts.map +1 -0
- package/dist/src/ruvector/vector-db.js +119 -205
- package/dist/src/ruvector/vector-db.js.map +1 -1
- package/dist/src/services/agentic-flow-bridge.d.ts +50 -0
- package/dist/src/services/agentic-flow-bridge.d.ts.map +1 -0
- package/dist/src/services/agentic-flow-bridge.js +32 -105
- package/dist/src/services/agentic-flow-bridge.js.map +1 -1
- package/dist/src/services/claim-service.d.ts +204 -0
- package/dist/src/services/claim-service.d.ts.map +1 -0
- package/dist/src/services/claim-service.js +615 -940
- package/dist/src/services/claim-service.js.map +1 -1
- package/dist/src/services/container-worker-pool.d.ts +197 -0
- package/dist/src/services/container-worker-pool.d.ts.map +1 -0
- package/dist/src/services/container-worker-pool.js +398 -666
- package/dist/src/services/container-worker-pool.js.map +1 -1
- package/dist/src/services/headless-worker-executor.d.ts +304 -0
- package/dist/src/services/headless-worker-executor.d.ts.map +1 -0
- package/dist/src/services/headless-worker-executor.js +441 -467
- package/dist/src/services/headless-worker-executor.js.map +1 -1
- package/dist/src/services/index.d.ts +4 -4
- package/dist/src/services/index.d.ts.map +1 -1
- package/dist/src/services/index.js +4 -4
- package/dist/src/services/index.js.map +1 -1
- package/dist/src/services/registry-api.d.ts +58 -0
- package/dist/src/services/registry-api.d.ts.map +1 -0
- package/dist/src/services/registry-api.js +92 -200
- package/dist/src/services/registry-api.js.map +1 -1
- package/dist/src/services/ruvector-training.d.ts +222 -0
- package/dist/src/services/ruvector-training.d.ts.map +1 -0
- package/dist/src/services/ruvector-training.js +257 -337
- package/dist/src/services/ruvector-training.js.map +1 -1
- package/dist/src/services/worker-daemon.d.ts +228 -0
- package/dist/src/services/worker-daemon.d.ts.map +1 -0
- package/dist/src/services/worker-daemon.js +591 -849
- package/dist/src/services/worker-daemon.js.map +1 -1
- package/dist/src/services/worker-queue.d.ts +194 -0
- package/dist/src/services/worker-queue.d.ts.map +1 -0
- package/dist/src/services/worker-queue.js +331 -548
- package/dist/src/services/worker-queue.js.map +1 -1
- package/dist/src/suggest.d.ts +53 -0
- package/dist/src/suggest.d.ts.map +1 -0
- package/dist/src/suggest.js +45 -55
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/transfer/anonymization/index.js +29 -37
- package/dist/src/transfer/anonymization/index.js.map +1 -1
- package/dist/src/transfer/deploy-seraphine.js +128 -155
- package/dist/src/transfer/deploy-seraphine.js.map +1 -1
- package/dist/src/transfer/export.d.ts +25 -0
- package/dist/src/transfer/export.d.ts.map +1 -0
- package/dist/src/transfer/export.js +84 -142
- package/dist/src/transfer/export.js.map +1 -1
- package/dist/src/transfer/index.d.ts +1 -1
- package/dist/src/transfer/index.d.ts.map +1 -1
- package/dist/src/transfer/index.js +0 -2
- package/dist/src/transfer/index.js.map +1 -1
- package/dist/src/transfer/ipfs/client.d.ts +109 -0
- package/dist/src/transfer/ipfs/client.d.ts.map +1 -0
- package/dist/src/transfer/ipfs/client.js +187 -337
- package/dist/src/transfer/ipfs/client.js.map +1 -1
- package/dist/src/transfer/ipfs/upload.d.ts +95 -0
- package/dist/src/transfer/ipfs/upload.d.ts.map +1 -0
- package/dist/src/transfer/ipfs/upload.js +288 -434
- package/dist/src/transfer/ipfs/upload.js.map +1 -1
- package/dist/src/transfer/models/seraphine.d.ts +72 -0
- package/dist/src/transfer/models/seraphine.d.ts.map +1 -0
- package/dist/src/transfer/models/seraphine.js +55 -55
- package/dist/src/transfer/models/seraphine.js.map +1 -1
- package/dist/src/transfer/serialization/cfp.d.ts +49 -0
- package/dist/src/transfer/serialization/cfp.d.ts.map +1 -0
- package/dist/src/transfer/serialization/cfp.js +30 -31
- package/dist/src/transfer/serialization/cfp.js.map +1 -1
- package/dist/src/transfer/storage/gcs.d.ts +82 -0
- package/dist/src/transfer/storage/gcs.d.ts.map +1 -0
- package/dist/src/transfer/storage/gcs.js +165 -232
- package/dist/src/transfer/storage/gcs.js.map +1 -1
- package/dist/src/transfer/store/discovery.d.ts +84 -0
- package/dist/src/transfer/store/discovery.d.ts.map +1 -0
- package/dist/src/transfer/store/discovery.js +239 -349
- package/dist/src/transfer/store/discovery.js.map +1 -1
- package/dist/src/transfer/store/download.d.ts +70 -0
- package/dist/src/transfer/store/download.d.ts.map +1 -0
- package/dist/src/transfer/store/download.js +243 -365
- package/dist/src/transfer/store/download.js.map +1 -1
- package/dist/src/transfer/store/index.d.ts +84 -0
- package/dist/src/transfer/store/index.d.ts.map +1 -0
- package/dist/src/transfer/store/index.js +63 -130
- package/dist/src/transfer/store/index.js.map +1 -1
- package/dist/src/transfer/store/publish.d.ts +76 -0
- package/dist/src/transfer/store/publish.d.ts.map +1 -0
- package/dist/src/transfer/store/publish.js +184 -258
- package/dist/src/transfer/store/publish.js.map +1 -1
- package/dist/src/transfer/store/registry.js +50 -72
- package/dist/src/transfer/store/registry.js.map +1 -1
- package/dist/src/transfer/store/search.d.ts +54 -0
- package/dist/src/transfer/store/search.d.ts.map +1 -0
- package/dist/src/transfer/store/search.js +64 -96
- package/dist/src/transfer/store/search.js.map +1 -1
- package/dist/src/transfer/store/tests/standalone-test.js +174 -231
- package/dist/src/transfer/store/tests/standalone-test.js.map +1 -1
- package/dist/src/transfer/test-seraphine.js +95 -130
- package/dist/src/transfer/test-seraphine.js.map +1 -1
- package/dist/src/transfer/tests/test-store.js +194 -239
- package/dist/src/transfer/tests/test-store.js.map +1 -1
- package/dist/src/transfer/types.d.ts +245 -0
- package/dist/src/transfer/types.d.ts.map +1 -0
- package/dist/src/types.d.ts +198 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +26 -55
- package/dist/src/types.js.map +1 -1
- package/dist/src/update/checker.d.ts +34 -0
- package/dist/src/update/checker.d.ts.map +1 -0
- package/dist/src/update/checker.js +106 -183
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/update/executor.d.ts +32 -0
- package/dist/src/update/executor.d.ts.map +1 -0
- package/dist/src/update/executor.js +135 -198
- package/dist/src/update/executor.js.map +1 -1
- package/dist/src/update/index.d.ts +33 -0
- package/dist/src/update/index.d.ts.map +1 -0
- package/dist/src/update/index.js +38 -85
- package/dist/src/update/index.js.map +1 -1
- package/dist/src/update/rate-limiter.d.ts +20 -0
- package/dist/src/update/rate-limiter.d.ts.map +1 -0
- package/dist/src/update/rate-limiter.js +19 -31
- package/dist/src/update/rate-limiter.js.map +1 -1
- package/dist/src/update/validator.d.ts +17 -0
- package/dist/src/update/validator.d.ts.map +1 -0
- package/dist/src/update/validator.js +38 -64
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/output.js
CHANGED
|
@@ -2,19 +2,10 @@
|
|
|
2
2
|
* V3 CLI Output Formatter
|
|
3
3
|
* Advanced output formatting with tables, progress bars, and colors
|
|
4
4
|
*/
|
|
5
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
6
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
7
|
-
if (ar || !(i in from)) {
|
|
8
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
9
|
-
ar[i] = from[i];
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
13
|
-
};
|
|
14
5
|
// ============================================
|
|
15
6
|
// Color Support
|
|
16
7
|
// ============================================
|
|
17
|
-
|
|
8
|
+
const COLORS = {
|
|
18
9
|
// Standard colors
|
|
19
10
|
reset: '\x1b[0m',
|
|
20
11
|
bold: '\x1b[1m',
|
|
@@ -49,14 +40,16 @@ var COLORS = {
|
|
|
49
40
|
bgCyan: '\x1b[46m',
|
|
50
41
|
bgWhite: '\x1b[47m'
|
|
51
42
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
export class OutputFormatter {
|
|
44
|
+
colorEnabled;
|
|
45
|
+
outputStream;
|
|
46
|
+
errorStream;
|
|
47
|
+
verbosity;
|
|
48
|
+
constructor(options = {}) {
|
|
49
|
+
this.colorEnabled = options.color ?? this.supportsColor();
|
|
57
50
|
this.outputStream = process.stdout;
|
|
58
51
|
this.errorStream = process.stderr;
|
|
59
|
-
this.verbosity =
|
|
52
|
+
this.verbosity = options.verbosity ?? 'normal';
|
|
60
53
|
}
|
|
61
54
|
/**
|
|
62
55
|
* Set verbosity level
|
|
@@ -65,23 +58,22 @@ var OutputFormatter = /** @class */ (function () {
|
|
|
65
58
|
* - verbose: All of normal + debug messages
|
|
66
59
|
* - debug: All output including trace
|
|
67
60
|
*/
|
|
68
|
-
|
|
61
|
+
setVerbosity(level) {
|
|
69
62
|
this.verbosity = level;
|
|
70
|
-
}
|
|
71
|
-
|
|
63
|
+
}
|
|
64
|
+
getVerbosity() {
|
|
72
65
|
return this.verbosity;
|
|
73
|
-
}
|
|
74
|
-
|
|
66
|
+
}
|
|
67
|
+
isQuiet() {
|
|
75
68
|
return this.verbosity === 'quiet';
|
|
76
|
-
}
|
|
77
|
-
|
|
69
|
+
}
|
|
70
|
+
isVerbose() {
|
|
78
71
|
return this.verbosity === 'verbose' || this.verbosity === 'debug';
|
|
79
|
-
}
|
|
80
|
-
|
|
72
|
+
}
|
|
73
|
+
isDebug() {
|
|
81
74
|
return this.verbosity === 'debug';
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
var _a;
|
|
75
|
+
}
|
|
76
|
+
supportsColor() {
|
|
85
77
|
// Check for NO_COLOR environment variable
|
|
86
78
|
if (process.env.NO_COLOR !== undefined)
|
|
87
79
|
return false;
|
|
@@ -89,115 +81,108 @@ var OutputFormatter = /** @class */ (function () {
|
|
|
89
81
|
if (process.env.FORCE_COLOR !== undefined)
|
|
90
82
|
return true;
|
|
91
83
|
// Check if stdout is a TTY
|
|
92
|
-
return
|
|
93
|
-
}
|
|
84
|
+
return process.stdout.isTTY ?? false;
|
|
85
|
+
}
|
|
94
86
|
// ============================================
|
|
95
87
|
// Color Methods
|
|
96
88
|
// ============================================
|
|
97
|
-
|
|
98
|
-
var colors = [];
|
|
99
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
100
|
-
colors[_i - 1] = arguments[_i];
|
|
101
|
-
}
|
|
89
|
+
color(text, ...colors) {
|
|
102
90
|
if (!this.colorEnabled)
|
|
103
91
|
return text;
|
|
104
|
-
|
|
105
|
-
return
|
|
106
|
-
}
|
|
107
|
-
|
|
92
|
+
const codes = colors.map(c => COLORS[c]).join('');
|
|
93
|
+
return `${codes}${text}${COLORS.reset}`;
|
|
94
|
+
}
|
|
95
|
+
bold(text) {
|
|
108
96
|
return this.color(text, 'bold');
|
|
109
|
-
}
|
|
110
|
-
|
|
97
|
+
}
|
|
98
|
+
dim(text) {
|
|
111
99
|
return this.color(text, 'dim');
|
|
112
|
-
}
|
|
113
|
-
|
|
100
|
+
}
|
|
101
|
+
success(text) {
|
|
114
102
|
return this.color(text, 'green');
|
|
115
|
-
}
|
|
116
|
-
|
|
103
|
+
}
|
|
104
|
+
error(text) {
|
|
117
105
|
return this.color(text, 'red');
|
|
118
|
-
}
|
|
119
|
-
|
|
106
|
+
}
|
|
107
|
+
warning(text) {
|
|
120
108
|
return this.color(text, 'yellow');
|
|
121
|
-
}
|
|
122
|
-
|
|
109
|
+
}
|
|
110
|
+
info(text) {
|
|
123
111
|
return this.color(text, 'blue');
|
|
124
|
-
}
|
|
125
|
-
|
|
112
|
+
}
|
|
113
|
+
highlight(text) {
|
|
126
114
|
return this.color(text, 'cyan', 'bold');
|
|
127
|
-
}
|
|
115
|
+
}
|
|
128
116
|
// ============================================
|
|
129
117
|
// Output Methods
|
|
130
118
|
// ============================================
|
|
131
|
-
|
|
119
|
+
write(text) {
|
|
132
120
|
this.outputStream.write(text);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (text === void 0) { text = ''; }
|
|
121
|
+
}
|
|
122
|
+
writeln(text = '') {
|
|
136
123
|
this.outputStream.write(text + '\n');
|
|
137
|
-
}
|
|
138
|
-
|
|
124
|
+
}
|
|
125
|
+
writeError(text) {
|
|
139
126
|
this.errorStream.write(text);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
if (text === void 0) { text = ''; }
|
|
127
|
+
}
|
|
128
|
+
writeErrorln(text = '') {
|
|
143
129
|
this.errorStream.write(text + '\n');
|
|
144
|
-
}
|
|
130
|
+
}
|
|
145
131
|
// ============================================
|
|
146
132
|
// Formatted Output Methods
|
|
147
133
|
// ============================================
|
|
148
|
-
|
|
134
|
+
printSuccess(message) {
|
|
149
135
|
// Success always shows (result output)
|
|
150
|
-
|
|
151
|
-
this.writeln(icon
|
|
152
|
-
}
|
|
153
|
-
|
|
136
|
+
const icon = this.color('[OK]', 'green', 'bold');
|
|
137
|
+
this.writeln(`${icon} ${message}`);
|
|
138
|
+
}
|
|
139
|
+
printError(message, details) {
|
|
154
140
|
// Errors always show
|
|
155
|
-
|
|
156
|
-
this.writeErrorln(icon
|
|
141
|
+
const icon = this.color('[ERROR]', 'red', 'bold');
|
|
142
|
+
this.writeErrorln(`${icon} ${message}`);
|
|
157
143
|
if (details) {
|
|
158
|
-
this.writeErrorln(this.dim(
|
|
144
|
+
this.writeErrorln(this.dim(` ${details}`));
|
|
159
145
|
}
|
|
160
|
-
}
|
|
161
|
-
|
|
146
|
+
}
|
|
147
|
+
printWarning(message) {
|
|
162
148
|
// Warnings suppressed in quiet mode
|
|
163
149
|
if (this.verbosity === 'quiet')
|
|
164
150
|
return;
|
|
165
|
-
|
|
166
|
-
this.writeln(icon
|
|
167
|
-
}
|
|
168
|
-
|
|
151
|
+
const icon = this.color('[WARN]', 'yellow', 'bold');
|
|
152
|
+
this.writeln(`${icon} ${message}`);
|
|
153
|
+
}
|
|
154
|
+
printInfo(message) {
|
|
169
155
|
// Info suppressed in quiet mode
|
|
170
156
|
if (this.verbosity === 'quiet')
|
|
171
157
|
return;
|
|
172
|
-
|
|
173
|
-
this.writeln(icon
|
|
174
|
-
}
|
|
175
|
-
|
|
158
|
+
const icon = this.color('[INFO]', 'blue', 'bold');
|
|
159
|
+
this.writeln(`${icon} ${message}`);
|
|
160
|
+
}
|
|
161
|
+
printDebug(message) {
|
|
176
162
|
// Debug only shows in verbose/debug mode
|
|
177
163
|
if (this.verbosity !== 'verbose' && this.verbosity !== 'debug')
|
|
178
164
|
return;
|
|
179
|
-
|
|
180
|
-
this.writeln(icon
|
|
181
|
-
}
|
|
182
|
-
|
|
165
|
+
const icon = this.color('[DEBUG]', 'gray');
|
|
166
|
+
this.writeln(`${icon} ${this.dim(message)}`);
|
|
167
|
+
}
|
|
168
|
+
printTrace(message) {
|
|
183
169
|
// Trace only shows in debug mode
|
|
184
170
|
if (this.verbosity !== 'debug')
|
|
185
171
|
return;
|
|
186
|
-
|
|
187
|
-
this.writeln(icon
|
|
188
|
-
}
|
|
172
|
+
const icon = this.color('[TRACE]', 'gray', 'dim');
|
|
173
|
+
this.writeln(`${icon} ${this.dim(message)}`);
|
|
174
|
+
}
|
|
189
175
|
// ============================================
|
|
190
176
|
// Table Formatting
|
|
191
177
|
// ============================================
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
var columns = options.columns, data = options.data, _a = options.border, border = _a === void 0 ? true : _a, _b = options.header, header = _b === void 0 ? true : _b, _c = options.padding, padding = _c === void 0 ? 1 : _c, maxWidth = options.maxWidth;
|
|
178
|
+
table(options) {
|
|
179
|
+
const { columns, data, border = true, header = true, padding = 1, maxWidth } = options;
|
|
195
180
|
// Calculate column widths
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
181
|
+
const widths = this.calculateColumnWidths(columns, data, maxWidth);
|
|
182
|
+
const lines = [];
|
|
183
|
+
const pad = ' '.repeat(padding);
|
|
199
184
|
// Border characters
|
|
200
|
-
|
|
185
|
+
const borderChars = border ? {
|
|
201
186
|
topLeft: '+', topRight: '+', bottomLeft: '+', bottomRight: '+',
|
|
202
187
|
horizontal: '-', vertical: '|',
|
|
203
188
|
leftT: '+', rightT: '+', topT: '+', bottomT: '+', cross: '+'
|
|
@@ -212,58 +197,52 @@ var OutputFormatter = /** @class */ (function () {
|
|
|
212
197
|
}
|
|
213
198
|
// Header row
|
|
214
199
|
if (header) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
return pad +
|
|
200
|
+
const headerRow = columns.map((col, i) => {
|
|
201
|
+
const text = this.truncate(col.header, widths[i]);
|
|
202
|
+
return pad + this.alignText(this.bold(text), widths[i], col.align) + pad;
|
|
218
203
|
}).join(borderChars.vertical);
|
|
219
|
-
lines.push(
|
|
204
|
+
lines.push(`${borderChars.vertical}${headerRow}${borderChars.vertical}`);
|
|
220
205
|
// Header separator
|
|
221
206
|
if (border) {
|
|
222
207
|
lines.push(this.createBorderLine(widths, borderChars, 'middle', padding));
|
|
223
208
|
}
|
|
224
209
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
210
|
+
// Data rows
|
|
211
|
+
for (const row of data) {
|
|
212
|
+
const rowCells = columns.map((col, i) => {
|
|
213
|
+
let value = row[col.key];
|
|
228
214
|
// Apply formatter if provided
|
|
229
215
|
if (col.format) {
|
|
230
216
|
value = col.format(value);
|
|
231
217
|
}
|
|
232
218
|
else {
|
|
233
|
-
value = String(value
|
|
219
|
+
value = String(value ?? '');
|
|
234
220
|
}
|
|
235
|
-
|
|
236
|
-
return pad +
|
|
221
|
+
const text = this.truncate(String(value), widths[i]);
|
|
222
|
+
return pad + this.alignText(text, widths[i], col.align) + pad;
|
|
237
223
|
}).join(borderChars.vertical);
|
|
238
|
-
lines.push(
|
|
239
|
-
};
|
|
240
|
-
// Data rows
|
|
241
|
-
for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {
|
|
242
|
-
var row = data_1[_i];
|
|
243
|
-
_loop_1(row);
|
|
224
|
+
lines.push(`${borderChars.vertical}${rowCells}${borderChars.vertical}`);
|
|
244
225
|
}
|
|
245
226
|
// Bottom border
|
|
246
227
|
if (border) {
|
|
247
228
|
lines.push(this.createBorderLine(widths, borderChars, 'bottom', padding));
|
|
248
229
|
}
|
|
249
230
|
return lines.join('\n');
|
|
250
|
-
}
|
|
251
|
-
|
|
231
|
+
}
|
|
232
|
+
printTable(options) {
|
|
252
233
|
this.writeln(this.table(options));
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
var widths = columns.map(function (col, i) {
|
|
234
|
+
}
|
|
235
|
+
calculateColumnWidths(columns, data, maxWidth) {
|
|
236
|
+
const widths = columns.map((col, i) => {
|
|
257
237
|
// Start with header width
|
|
258
|
-
|
|
238
|
+
let width = col.header.length;
|
|
259
239
|
// Check all data values
|
|
260
|
-
for (
|
|
261
|
-
|
|
262
|
-
var value = row[col.key];
|
|
240
|
+
for (const row of data) {
|
|
241
|
+
let value = row[col.key];
|
|
263
242
|
if (col.format) {
|
|
264
243
|
value = col.format(value);
|
|
265
244
|
}
|
|
266
|
-
|
|
245
|
+
const len = this.stripAnsi(String(value ?? '')).length;
|
|
267
246
|
width = Math.max(width, len);
|
|
268
247
|
}
|
|
269
248
|
// Apply column-specific width limit
|
|
@@ -274,118 +253,110 @@ var OutputFormatter = /** @class */ (function () {
|
|
|
274
253
|
});
|
|
275
254
|
// Apply max width constraint
|
|
276
255
|
if (maxWidth) {
|
|
277
|
-
|
|
256
|
+
const totalWidth = widths.reduce((a, b) => a + b, 0) + (columns.length * 3) + 1;
|
|
278
257
|
if (totalWidth > maxWidth) {
|
|
279
|
-
|
|
280
|
-
return widths.map(
|
|
258
|
+
const reduction = (totalWidth - maxWidth) / columns.length;
|
|
259
|
+
return widths.map(w => Math.max(3, Math.floor(w - reduction)));
|
|
281
260
|
}
|
|
282
261
|
}
|
|
283
262
|
return widths;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
263
|
+
}
|
|
264
|
+
createBorderLine(widths, chars, position, padding) {
|
|
265
|
+
const cellWidth = (w) => chars.horizontal.repeat(w + (padding * 2));
|
|
266
|
+
const cells = widths.map(cellWidth).join(position === 'top' ? chars.topT :
|
|
288
267
|
position === 'bottom' ? chars.bottomT :
|
|
289
268
|
chars.cross);
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
return
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
var padding = width - len;
|
|
269
|
+
const left = position === 'top' ? chars.topLeft : position === 'bottom' ? chars.bottomLeft : chars.leftT;
|
|
270
|
+
const right = position === 'top' ? chars.topRight : position === 'bottom' ? chars.bottomRight : chars.rightT;
|
|
271
|
+
return `${left}${cells}${right}`;
|
|
272
|
+
}
|
|
273
|
+
alignText(text, width, align = 'left') {
|
|
274
|
+
const len = this.stripAnsi(text).length;
|
|
275
|
+
const padding = width - len;
|
|
298
276
|
if (padding <= 0)
|
|
299
277
|
return text;
|
|
300
278
|
switch (align) {
|
|
301
279
|
case 'right':
|
|
302
280
|
return ' '.repeat(padding) + text;
|
|
303
281
|
case 'center':
|
|
304
|
-
|
|
305
|
-
|
|
282
|
+
const left = Math.floor(padding / 2);
|
|
283
|
+
const right = padding - left;
|
|
306
284
|
return ' '.repeat(left) + text + ' '.repeat(right);
|
|
307
285
|
default:
|
|
308
286
|
return text + ' '.repeat(padding);
|
|
309
287
|
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
288
|
+
}
|
|
289
|
+
truncate(text, maxLength) {
|
|
290
|
+
const stripped = this.stripAnsi(text);
|
|
313
291
|
if (stripped.length <= maxLength)
|
|
314
292
|
return text;
|
|
315
293
|
return stripped.slice(0, maxLength - 3) + '...';
|
|
316
|
-
}
|
|
317
|
-
|
|
294
|
+
}
|
|
295
|
+
stripAnsi(text) {
|
|
318
296
|
return text.replace(/\x1b\[[0-9;]*m/g, '');
|
|
319
|
-
}
|
|
297
|
+
}
|
|
320
298
|
// ============================================
|
|
321
299
|
// Progress Bar
|
|
322
300
|
// ============================================
|
|
323
|
-
|
|
301
|
+
createProgress(options) {
|
|
324
302
|
return new Progress(this, options);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
var bar = this.color('#'.repeat(filled), 'green') +
|
|
303
|
+
}
|
|
304
|
+
progressBar(current, total, width = 40) {
|
|
305
|
+
const percent = Math.min(100, Math.max(0, (current / total) * 100));
|
|
306
|
+
const filled = Math.round((width * percent) / 100);
|
|
307
|
+
const empty = width - filled;
|
|
308
|
+
const bar = this.color('#'.repeat(filled), 'green') +
|
|
332
309
|
this.dim('-'.repeat(empty));
|
|
333
|
-
return
|
|
334
|
-
}
|
|
310
|
+
return `[${bar}] ${percent.toFixed(1)}%`;
|
|
311
|
+
}
|
|
335
312
|
// ============================================
|
|
336
313
|
// Spinner
|
|
337
314
|
// ============================================
|
|
338
|
-
|
|
315
|
+
createSpinner(options) {
|
|
339
316
|
return new Spinner(this, options);
|
|
340
|
-
}
|
|
317
|
+
}
|
|
341
318
|
// ============================================
|
|
342
319
|
// JSON Output
|
|
343
320
|
// ============================================
|
|
344
|
-
|
|
345
|
-
if (pretty === void 0) { pretty = true; }
|
|
321
|
+
json(data, pretty = true) {
|
|
346
322
|
return pretty ? JSON.stringify(data, null, 2) : JSON.stringify(data);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
if (pretty === void 0) { pretty = true; }
|
|
323
|
+
}
|
|
324
|
+
printJson(data, pretty = true) {
|
|
350
325
|
this.writeln(this.json(data, pretty));
|
|
351
|
-
}
|
|
326
|
+
}
|
|
352
327
|
// ============================================
|
|
353
328
|
// List Output
|
|
354
329
|
// ============================================
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
OutputFormatter.prototype.printList = function (items, bullet) {
|
|
360
|
-
if (bullet === void 0) { bullet = '-'; }
|
|
330
|
+
list(items, bullet = '-') {
|
|
331
|
+
return items.map(item => ` ${bullet} ${item}`).join('\n');
|
|
332
|
+
}
|
|
333
|
+
printList(items, bullet = '-') {
|
|
361
334
|
this.writeln(this.list(items, bullet));
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
return items.map(
|
|
365
|
-
}
|
|
366
|
-
|
|
335
|
+
}
|
|
336
|
+
numberedList(items) {
|
|
337
|
+
return items.map((item, i) => ` ${i + 1}. ${item}`).join('\n');
|
|
338
|
+
}
|
|
339
|
+
printNumberedList(items) {
|
|
367
340
|
this.writeln(this.numberedList(items));
|
|
368
|
-
}
|
|
341
|
+
}
|
|
369
342
|
// ============================================
|
|
370
343
|
// Box Output
|
|
371
344
|
// ============================================
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
var width = maxLen + 4;
|
|
378
|
-
var border = {
|
|
345
|
+
box(content, title) {
|
|
346
|
+
const lines = content.split('\n');
|
|
347
|
+
const maxLen = Math.max(...lines.map(l => this.stripAnsi(l).length), title?.length ?? 0);
|
|
348
|
+
const width = maxLen + 4;
|
|
349
|
+
const border = {
|
|
379
350
|
topLeft: '+', topRight: '+',
|
|
380
351
|
bottomLeft: '+', bottomRight: '+',
|
|
381
352
|
horizontal: '-', vertical: '|'
|
|
382
353
|
};
|
|
383
|
-
|
|
354
|
+
const result = [];
|
|
384
355
|
// Top border with optional title
|
|
385
356
|
if (title) {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
357
|
+
const titleText = ` ${title} `;
|
|
358
|
+
const leftPad = Math.floor((width - titleText.length - 2) / 2);
|
|
359
|
+
const rightPad = width - titleText.length - leftPad - 2;
|
|
389
360
|
result.push(border.topLeft +
|
|
390
361
|
border.horizontal.repeat(leftPad) +
|
|
391
362
|
this.bold(titleText) +
|
|
@@ -396,61 +367,63 @@ var OutputFormatter = /** @class */ (function () {
|
|
|
396
367
|
result.push(border.topLeft + border.horizontal.repeat(width - 2) + border.topRight);
|
|
397
368
|
}
|
|
398
369
|
// Content lines
|
|
399
|
-
for (
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
result.push(border.vertical + " " + line + ' '.repeat(padding) + " " + border.vertical);
|
|
370
|
+
for (const line of lines) {
|
|
371
|
+
const stripped = this.stripAnsi(line);
|
|
372
|
+
const padding = maxLen - stripped.length;
|
|
373
|
+
result.push(`${border.vertical} ${line}${' '.repeat(padding)} ${border.vertical}`);
|
|
404
374
|
}
|
|
405
375
|
// Bottom border
|
|
406
376
|
result.push(border.bottomLeft + border.horizontal.repeat(width - 2) + border.bottomRight);
|
|
407
377
|
return result.join('\n');
|
|
408
|
-
}
|
|
409
|
-
|
|
378
|
+
}
|
|
379
|
+
printBox(content, title) {
|
|
410
380
|
this.writeln(this.box(content, title));
|
|
411
|
-
}
|
|
412
|
-
|
|
381
|
+
}
|
|
382
|
+
setColorEnabled(enabled) {
|
|
413
383
|
this.colorEnabled = enabled;
|
|
414
|
-
}
|
|
415
|
-
|
|
384
|
+
}
|
|
385
|
+
isColorEnabled() {
|
|
416
386
|
return this.colorEnabled;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
}());
|
|
420
|
-
export { OutputFormatter };
|
|
387
|
+
}
|
|
388
|
+
}
|
|
421
389
|
// ============================================
|
|
422
390
|
// Progress Class
|
|
423
391
|
// ============================================
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
392
|
+
export class Progress {
|
|
393
|
+
current;
|
|
394
|
+
total;
|
|
395
|
+
width;
|
|
396
|
+
startTime;
|
|
397
|
+
formatter;
|
|
398
|
+
showPercentage;
|
|
399
|
+
showETA;
|
|
400
|
+
lastRender = '';
|
|
401
|
+
constructor(formatter, options) {
|
|
428
402
|
this.formatter = formatter;
|
|
429
|
-
this.current =
|
|
403
|
+
this.current = options.current ?? 0;
|
|
430
404
|
this.total = options.total;
|
|
431
|
-
this.width =
|
|
432
|
-
this.showPercentage =
|
|
433
|
-
this.showETA =
|
|
405
|
+
this.width = options.width ?? 40;
|
|
406
|
+
this.showPercentage = options.showPercentage ?? true;
|
|
407
|
+
this.showETA = options.showETA ?? true;
|
|
434
408
|
this.startTime = Date.now();
|
|
435
409
|
}
|
|
436
|
-
|
|
410
|
+
update(current) {
|
|
437
411
|
this.current = current;
|
|
438
412
|
this.render();
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
if (amount === void 0) { amount = 1; }
|
|
413
|
+
}
|
|
414
|
+
increment(amount = 1) {
|
|
442
415
|
this.update(this.current + amount);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
416
|
+
}
|
|
417
|
+
render() {
|
|
418
|
+
const bar = this.formatter.progressBar(this.current, this.total, this.width);
|
|
419
|
+
let output = bar;
|
|
447
420
|
if (this.showETA && this.current > 0) {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
421
|
+
const elapsed = Date.now() - this.startTime;
|
|
422
|
+
const rate = this.current / elapsed;
|
|
423
|
+
const remaining = this.total - this.current;
|
|
424
|
+
const eta = remaining / rate;
|
|
452
425
|
if (isFinite(eta)) {
|
|
453
|
-
output +=
|
|
426
|
+
output += ` ETA: ${this.formatTime(eta)}`;
|
|
454
427
|
}
|
|
455
428
|
}
|
|
456
429
|
// Clear previous line and write new
|
|
@@ -459,53 +432,59 @@ var Progress = /** @class */ (function () {
|
|
|
459
432
|
}
|
|
460
433
|
process.stdout.write(output);
|
|
461
434
|
this.lastRender = output;
|
|
462
|
-
}
|
|
463
|
-
|
|
435
|
+
}
|
|
436
|
+
finish() {
|
|
464
437
|
this.current = this.total;
|
|
465
438
|
this.render();
|
|
466
439
|
process.stdout.write('\n');
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
440
|
+
}
|
|
441
|
+
formatTime(ms) {
|
|
442
|
+
const seconds = Math.floor(ms / 1000);
|
|
443
|
+
const minutes = Math.floor(seconds / 60);
|
|
444
|
+
const hours = Math.floor(minutes / 60);
|
|
472
445
|
if (hours > 0) {
|
|
473
|
-
return hours
|
|
446
|
+
return `${hours}h ${minutes % 60}m`;
|
|
474
447
|
}
|
|
475
448
|
else if (minutes > 0) {
|
|
476
|
-
return minutes
|
|
449
|
+
return `${minutes}m ${seconds % 60}s`;
|
|
477
450
|
}
|
|
478
451
|
else {
|
|
479
|
-
return seconds
|
|
452
|
+
return `${seconds}s`;
|
|
480
453
|
}
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
}());
|
|
484
|
-
export { Progress };
|
|
454
|
+
}
|
|
455
|
+
}
|
|
485
456
|
// ============================================
|
|
486
457
|
// Spinner Class
|
|
487
458
|
// ============================================
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
459
|
+
export class Spinner {
|
|
460
|
+
formatter;
|
|
461
|
+
text;
|
|
462
|
+
frames;
|
|
463
|
+
interval = null;
|
|
464
|
+
frameIndex = 0;
|
|
465
|
+
static SPINNERS = {
|
|
466
|
+
dots: ['...', '..:', '.::', ':::', '::.', ':..',],
|
|
467
|
+
line: ['-', '\\', '|', '/'],
|
|
468
|
+
arc: ['◜', '◠', '◝', '◞', '◡', '◟'],
|
|
469
|
+
circle: ['◐', '◓', '◑', '◒'],
|
|
470
|
+
arrows: ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙']
|
|
471
|
+
};
|
|
472
|
+
constructor(formatter, options) {
|
|
493
473
|
this.formatter = formatter;
|
|
494
474
|
this.text = options.text;
|
|
495
|
-
this.frames = Spinner.SPINNERS[
|
|
475
|
+
this.frames = Spinner.SPINNERS[options.spinner ?? 'dots'];
|
|
496
476
|
}
|
|
497
|
-
|
|
498
|
-
var _this = this;
|
|
477
|
+
start() {
|
|
499
478
|
if (this.interval)
|
|
500
479
|
return;
|
|
501
|
-
this.interval = setInterval(
|
|
502
|
-
|
|
503
|
-
|
|
480
|
+
this.interval = setInterval(() => {
|
|
481
|
+
this.render();
|
|
482
|
+
this.frameIndex = (this.frameIndex + 1) % this.frames.length;
|
|
504
483
|
}, 100);
|
|
505
484
|
this.interval.unref();
|
|
506
485
|
this.render();
|
|
507
|
-
}
|
|
508
|
-
|
|
486
|
+
}
|
|
487
|
+
stop(message) {
|
|
509
488
|
if (this.interval) {
|
|
510
489
|
clearInterval(this.interval);
|
|
511
490
|
this.interval = null;
|
|
@@ -515,30 +494,21 @@ var Spinner = /** @class */ (function () {
|
|
|
515
494
|
if (message) {
|
|
516
495
|
this.formatter.writeln(message);
|
|
517
496
|
}
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
this.stop(this.formatter.success(message
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
this.stop(this.formatter.error(message
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
process.stdout.write(
|
|
528
|
-
}
|
|
529
|
-
|
|
497
|
+
}
|
|
498
|
+
succeed(message) {
|
|
499
|
+
this.stop(this.formatter.success(message ?? this.text));
|
|
500
|
+
}
|
|
501
|
+
fail(message) {
|
|
502
|
+
this.stop(this.formatter.error(message ?? this.text));
|
|
503
|
+
}
|
|
504
|
+
render() {
|
|
505
|
+
const frame = this.formatter.info(this.frames[this.frameIndex]);
|
|
506
|
+
process.stdout.write(`\r${frame} ${this.text}`);
|
|
507
|
+
}
|
|
508
|
+
setText(text) {
|
|
530
509
|
this.text = text;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
dots: ['...', '..:', '.::', ':::', '::.', ':..',],
|
|
534
|
-
line: ['-', '\\', '|', '/'],
|
|
535
|
-
arc: ['◜', '◠', '◝', '◞', '◡', '◟'],
|
|
536
|
-
circle: ['◐', '◓', '◑', '◒'],
|
|
537
|
-
arrows: ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙']
|
|
538
|
-
};
|
|
539
|
-
return Spinner;
|
|
540
|
-
}());
|
|
541
|
-
export { Spinner };
|
|
510
|
+
}
|
|
511
|
+
}
|
|
542
512
|
// Export singleton instance
|
|
543
|
-
export
|
|
513
|
+
export const output = new OutputFormatter();
|
|
544
514
|
//# sourceMappingURL=output.js.map
|