@@ -2,7 +2,7 @@ import { RESTGetApiTeamResult, RESTPutApiAppCommitResult, Routes } from "@disclo
22import FormData from "form-data" ;
33import { GluegunCommand , GluegunToolbox } from "gluegun" ;
44import { exit } from "node:process" ;
5- import { apidiscloud , config , configToObj , getNotIngnoredFiles , makeZipFromFileList , RateLimit , readDiscloudConfig } from "../util" ;
5+ import { apidiscloud , config , getNotIngnoredFiles , makeZipFromFileList , RateLimit } from "../util" ;
66
77export default new class TeamCommit implements GluegunCommand {
88 name = "team:commit" ;
@@ -21,8 +21,6 @@ export default new class TeamCommit implements GluegunCommand {
2121 if ( ! parameters . first ) parameters . first = "." ;
2222 parameters . first = parameters . first . replace ( / ( \\ | \/ ) $ / , "" ) ;
2323
24- const dConfig = configToObj ( readDiscloudConfig ( parameters . first ) ! ) ;
25-
2624 if ( ! parameters . second ) {
2725 const spin = print . spin ( {
2826 text : print . colors . cyan ( "Fetching apps..." ) ,
@@ -34,16 +32,9 @@ export default new class TeamCommit implements GluegunCommand {
3432
3533 if ( apiRes . data )
3634 if ( "apps" in apiRes . data ) {
37- const { appId } = await prompt . ask ( {
38- name : "appId" ,
39- message : "Choose the app" ,
40- type : "select" ,
41- choices : apiRes . data . apps . map ( app => ( {
42- name : app . id ,
43- message : `${ app . name } - ${ app . id } - [${ app . perms . join ( ) } ] ${ app . id === dConfig . ID ?
44- "[discloud.config]" : "" } `,
45- value : app . id ,
46- } ) ) ,
35+ const { appId } = await prompt . askForApps ( apiRes . data . apps , {
36+ all : true ,
37+ discloudConfigPath : parameters . first ,
4738 } ) ;
4839
4940 parameters . second = appId ;
0 commit comments