fix(storage): rename S3 configuration and change stream interfaces to storage-oriented types
This commit is contained in:
@@ -19,7 +19,7 @@ export class TsViewCli {
|
||||
this.smartcli.standardCommand().subscribe(async (argvArg) => {
|
||||
await this.startViewer({
|
||||
port: argvArg.port as number | undefined,
|
||||
s3Only: false,
|
||||
storageOnly: false,
|
||||
mongoOnly: false,
|
||||
});
|
||||
});
|
||||
@@ -29,7 +29,7 @@ export class TsViewCli {
|
||||
s3Command.subscribe(async (argvArg) => {
|
||||
await this.startViewer({
|
||||
port: argvArg.port as number | undefined,
|
||||
s3Only: true,
|
||||
storageOnly: true,
|
||||
mongoOnly: false,
|
||||
});
|
||||
});
|
||||
@@ -39,7 +39,7 @@ export class TsViewCli {
|
||||
mongoCommand.subscribe(async (argvArg) => {
|
||||
await this.startViewer({
|
||||
port: argvArg.port as number | undefined,
|
||||
s3Only: false,
|
||||
storageOnly: false,
|
||||
mongoOnly: true,
|
||||
});
|
||||
});
|
||||
@@ -56,7 +56,7 @@ export class TsViewCli {
|
||||
*/
|
||||
private async startViewer(options: {
|
||||
port?: number;
|
||||
s3Only: boolean;
|
||||
storageOnly: boolean;
|
||||
mongoOnly: boolean;
|
||||
}): Promise<void> {
|
||||
console.log('Starting TsView...');
|
||||
@@ -67,10 +67,10 @@ export class TsViewCli {
|
||||
await viewer.loadConfigFromEnv();
|
||||
|
||||
// Check what's configured
|
||||
const hasS3 = viewer.config.hasS3();
|
||||
const hasStorage = viewer.config.hasStorage();
|
||||
const hasMongo = viewer.config.hasMongo();
|
||||
|
||||
if (!hasS3 && !hasMongo) {
|
||||
if (!hasStorage && !hasMongo) {
|
||||
console.error('Error: No S3 or MongoDB configuration found.');
|
||||
console.error('Please create .nogit/env.json with your configuration.');
|
||||
console.error('');
|
||||
@@ -87,7 +87,7 @@ export class TsViewCli {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (options.s3Only && !hasS3) {
|
||||
if (options.storageOnly && !hasStorage) {
|
||||
console.error('Error: S3 configuration not found in .nogit/env.json');
|
||||
process.exit(1);
|
||||
}
|
||||
@@ -98,7 +98,7 @@ export class TsViewCli {
|
||||
}
|
||||
|
||||
// Log what's available
|
||||
if (hasS3) {
|
||||
if (hasStorage) {
|
||||
console.log('S3 storage configured');
|
||||
}
|
||||
if (hasMongo) {
|
||||
|
||||
Reference in New Issue
Block a user