import { Args } from '@oclif/core';
import path from 'node:path';
import BaseCommand from '../baseCommand.js';
import constants from '../constants.js';
import DockerManager from '../docker/dockerManager.js';
import PathNormalizer from '../pathNormalizer.js';
export default class LocalScriptCommand extends BaseCommand {
    static args = {
        "src-path": Args.string({ description: 'Source path', required: true }),
    };
    srcPath;
    async assertPrerequisites() {
        this.srcPath = PathNormalizer.normalize(this.parsedArgs["src-path"]);
        PathNormalizer.normalize(path.join(this.srcPath, `config/run/${constants.DEFAULT_RUNSPEC_NAME}.yml`), true, `Valid script not found in ${this.srcPath}. Please ensure a run spec file resides at config/run/${constants.DEFAULT_RUNSPEC_NAME}.yml.`);
        await super.assertPrerequisites();
        await DockerManager.get();
    }
}
