async function genSTS(options) {
  try {
    switch (options.tplName) {
      case 'swagger-list':
        const st = await genSTBySTS(options);
        if (st == null) {
          console.warn(`St generated results are null`);
        }
        options.stUrl = options.extraArgs.swaggerPath;
        options.stColumns = JSON.stringify(st, null, 2);
        break;
      case 'swagger-edit':
        const sf = await genSFBySTS(options);
        if (sf == null) {
          console.warn(`Sf generated results are null`);
        }
        options.sfUrl = options.extraArgs.swaggerPath.replace(/(\{[^\}]+\})/g, '');
        options.sfSchema = JSON.stringify(sf, null, 2);
        break;
      default:
        throw new Error(`Not found [_cli-tpl/${options.tplName}] template directory`)
    }
  } catch (err) {
    throw new Error(`Generator st columns or sf schema error: ${err}`);
  }
}
async function genSTS(options) {
  try {
    switch (options.tplName) {
      case 'swagger-list':
        const st = await genSTBySTS(options);
        if (st == null) {
          console.warn(`St generated results are null`);
        }
        options.stUrl = options.extraArgs.swaggerPath;
        options.stColumns = JSON.stringify(st, null, 2);
        break;
      case 'swagger-edit':
        const sf = await genSFBySTS(options);
        if (sf == null) {
          console.warn(`Sf generated results are null`);
        }
        options.sfUrl = options.extraArgs.swaggerPath.replace(/(\{[^\}]+\})/g, '');
        options.sfSchema = JSON.stringify(sf, null, 2);
        break;
      default:
        throw new Error(`Not found [_cli-tpl/${options.tplName}] template directory`)
    }
  } catch (err) {
    throw new Error(`Generator st columns or sf schema error: ${err}`);
  }
}
async function genSTS ( options ) { try { switch ( options . tplName ) { case 'swagger-list' : const st = await genSTBySTS ( options ) ; if ( st == null ) { console . warn ( ` ` ) ; } options . stUrl = options . extraArgs . swaggerPath ; options . stColumns = JSON . stringify ( st , null , 2 ) ; break ; case 'swagger-edit' : const sf = await genSFBySTS ( options ) ; if ( sf == null ) { console . warn ( ` ` ) ; } options . sfUrl = options . extraArgs . swaggerPath . replace ( / (\{[^\}]+\}) / g , '' ) ; options . sfSchema = JSON . stringify ( sf , null , 2 ) ; break ; default : throw new Error ( ` ${ options . tplName } ` ) } } catch ( err ) { throw new Error ( ` ${ err } ` ) ; } }
#region sts
#region sts