ninedeploy 0.17.0 → 0.18.2
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/commands/canary.js +2 -2
- package/dist/commands/canary.js.map +1 -1
- package/dist/commands/housekeeping.d.ts.map +1 -1
- package/dist/commands/housekeeping.js +2 -1
- package/dist/commands/housekeeping.js.map +1 -1
- package/dist/commands/logDrains.d.ts +7 -0
- package/dist/commands/logDrains.d.ts.map +1 -0
- package/dist/commands/logDrains.js +42 -0
- package/dist/commands/logDrains.js.map +1 -0
- package/dist/commands/metrics.d.ts +10 -0
- package/dist/commands/metrics.d.ts.map +1 -1
- package/dist/commands/metrics.js +54 -0
- package/dist/commands/metrics.js.map +1 -1
- package/dist/commands/services.d.ts.map +1 -1
- package/dist/commands/services.js +4 -2
- package/dist/commands/services.js.map +1 -1
- package/dist/commands/volumeFiles.d.ts +15 -0
- package/dist/commands/volumeFiles.d.ts.map +1 -0
- package/dist/commands/volumeFiles.js +116 -0
- package/dist/commands/volumeFiles.js.map +1 -0
- package/dist/index.js +35 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/format.d.ts.map +1 -1
- package/dist/lib/format.js +1 -0
- package/dist/lib/format.js.map +1 -1
- package/package.json +6 -3
- package/src/commands/canary.ts +2 -2
- package/src/commands/housekeeping.ts +2 -1
- package/src/commands/logDrains.ts +32 -0
- package/src/commands/metrics.ts +40 -0
- package/src/commands/services.ts +4 -2
- package/src/commands/volumeFiles.ts +65 -0
- package/src/index.ts +38 -3
- package/src/lib/format.ts +1 -0
package/src/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { volumeFilesList, volumeFileRead, volumeFileWrite, volumeFileMkdir, volumeFileDelete, type VolumeFileOptions } from './commands/volumeFiles.js';
|
|
2
3
|
import { createRequire } from 'node:module';
|
|
3
4
|
import { Command } from 'commander';
|
|
4
5
|
import { getClient } from './client.js';
|
|
@@ -112,8 +113,9 @@ import {
|
|
|
112
113
|
configPresetListAction, configPresetRegisterAction, configPresetRemoveAction,
|
|
113
114
|
} from './commands/configPresets.js';
|
|
114
115
|
import {
|
|
115
|
-
metricsFlushAction, metricsShowAction,
|
|
116
|
+
metricsFlushAction, metricsShowAction, resourceMetricsSettingsAction, resourceMetricsConfigureAction,
|
|
116
117
|
} from './commands/metrics.js';
|
|
118
|
+
import { logDrainQueueAction, logDrainRetryAction, logDrainDiscardAction } from './commands/logDrains.js';
|
|
117
119
|
import {
|
|
118
120
|
buildCacheStatsAction,
|
|
119
121
|
} from './commands/buildCache.js';
|
|
@@ -443,7 +445,7 @@ deploys.command('rollback <serviceId> <deployId>').description('Rollback to a pr
|
|
|
443
445
|
|
|
444
446
|
/* v8 ignore start -- exercised by test/aiDiagnose.test.ts. */
|
|
445
447
|
deploys.command('diagnose <service> <deployId>')
|
|
446
|
-
.description('
|
|
448
|
+
.description('The configured AI provider diagnoses a failed deployment and may propose a settings change')
|
|
447
449
|
.option('--apply', 'Apply the proposed settings change and start a deploy')
|
|
448
450
|
.option('--json', 'Print raw JSON')
|
|
449
451
|
.action((service: string, depId: string, opts: { apply?: boolean; json?: boolean }) => deploysDiagnose(getClient(), service, depId, opts));
|
|
@@ -594,10 +596,26 @@ configPresetsCmd.command('apply <id>')
|
|
|
594
596
|
configPresetsCmd.command('remove <id>').description('Unregister a preset (does NOT undo the live apply)').action((id: string) => configPresetRemoveAction(getClient(), id));
|
|
595
597
|
|
|
596
598
|
// ── Metrics (G-09) ────────────────────────────────────────────────────────
|
|
597
|
-
const metricsCmd = program.command('metrics').description('
|
|
599
|
+
const metricsCmd = program.command('metrics').description('Resource monitoring and kernel event history');
|
|
600
|
+
metricsCmd.command('settings').description('Resource retention, Prometheus and collector settings').action(() => resourceMetricsSettingsAction(getClient()));
|
|
601
|
+
metricsCmd.command('configure').description('Update resource monitoring settings')
|
|
602
|
+
.option('--retention-days <days>', 'Service history retention, 1–90 days')
|
|
603
|
+
.option('--prometheus <on|off>', 'Enable or disable authenticated Prometheus scraping')
|
|
604
|
+
.option('--otlp-endpoint <url>', 'OTLP/HTTP JSON metrics endpoint, empty disables export')
|
|
605
|
+
.option('--otlp-authorization-env <name>', 'Read collector Authorization from this environment variable')
|
|
606
|
+
.option('--clear-otlp-authorization', 'Remove the saved collector credential')
|
|
607
|
+
.option('--log-queue-mb <mb>', 'Encrypted log payload limit per destination, 1–256 MiB')
|
|
608
|
+
.action((opts) => resourceMetricsConfigureAction(getClient(), opts));
|
|
598
609
|
metricsCmd.command('show').description('Show the active backend, events, and last flush marker').action(() => metricsShowAction(getClient()));
|
|
599
610
|
metricsCmd.command('flush').description('Run the built-in backend retention sweep').action(() => metricsFlushAction(getClient()));
|
|
600
611
|
|
|
612
|
+
const logDrainsCmd = program.command('log-drains').description('Inspect and recover durable log delivery');
|
|
613
|
+
logDrainsCmd.command('queue <id>').description('Show pending, blocked and paused log delivery').action((id: string) => logDrainQueueAction(getClient(), id));
|
|
614
|
+
logDrainsCmd.command('retry <id>').description('Schedule pending logs for the next delivery cycle').action((id: string) => logDrainRetryAction(getClient(), id));
|
|
615
|
+
logDrainsCmd.command('discard <id>').description('Permanently discard pending logs')
|
|
616
|
+
.option('--yes', 'Confirm permanent removal of queued logs')
|
|
617
|
+
.action((id: string, opts) => logDrainDiscardAction(getClient(), id, opts));
|
|
618
|
+
|
|
601
619
|
// ── Build Cache (G-01) ────────────────────────────────────────────────────
|
|
602
620
|
const buildCacheCmd = program.command('build-cache').description('Build cache plugin — per-backend LRU stats (G-01)');
|
|
603
621
|
buildCacheCmd.command('stats').description('Show per-backend cache counters and the merged totals').action(() => buildCacheStatsAction(getClient()));
|
|
@@ -677,6 +695,23 @@ ssoCmd.command('remove <id>').description('Remove a provider by id').action((id:
|
|
|
677
695
|
// ── Volumes ────────────────────────────────────────────────────────────────
|
|
678
696
|
const volumesCmd = program.command('volumes').description('Manage Docker volumes');
|
|
679
697
|
|
|
698
|
+
volumesCmd.command('files <name> [path]').description('List files inside a managed volume')
|
|
699
|
+
.option('--server <id>', 'Read this node instead of the panel host').option('--json', 'Print raw JSON')
|
|
700
|
+
.action((name:string,path:string|undefined,opts:VolumeFileOptions)=>volumeFilesList(getClient(),name,path??'',opts));
|
|
701
|
+
volumesCmd.command('read <name> <path>').description('Read exact file bytes from a managed volume')
|
|
702
|
+
.option('--server <id>', 'Read this node instead of the panel host').option('--output <file>', 'Save to a local file instead of stdout').option('--force', 'Overwrite an existing output file')
|
|
703
|
+
.action((name:string,path:string,opts:VolumeFileOptions)=>volumeFileRead(getClient(),name,path,opts));
|
|
704
|
+
volumesCmd.command('write <name> <path>').description('Write a local file into a managed volume (maximum 1 MiB)')
|
|
705
|
+
.requiredOption('--file <file>', 'Local input file').option('--server <id>', 'Write this node instead of the panel host')
|
|
706
|
+
.action((name:string,path:string,opts:VolumeFileOptions)=>volumeFileWrite(getClient(),name,path,opts));
|
|
707
|
+
volumesCmd.command('mkdir <name> <path>').description('Create a directory inside a managed volume')
|
|
708
|
+
.option('--server <id>', 'Use this node instead of the panel host')
|
|
709
|
+
.action((name:string,path:string,opts:VolumeFileOptions)=>volumeFileMkdir(getClient(),name,path,opts));
|
|
710
|
+
volumesCmd.command('delete-file <name> <path>').description('Delete a file or directory inside a volume, with confirmation')
|
|
711
|
+
.option('--server <id>', 'Use this node instead of the panel host').option('--yes', 'Confirm this exact path without prompting')
|
|
712
|
+
.action((name:string,path:string,opts:VolumeFileOptions)=>volumeFileDelete(getClient(),name,path,opts));
|
|
713
|
+
|
|
714
|
+
|
|
680
715
|
volumesCmd.command('list')
|
|
681
716
|
.description('List all volumes')
|
|
682
717
|
.option('--server <id>', 'A node\'s volumes instead of the panel host\'s')
|