File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,13 @@ export function cli(pkg: any) {
117117 for ( const [ key , value ] of Object . entries ( obj ) ) {
118118 if ( typeof value === "function" && ( value as any ) . load ) {
119119 ( value as any ) . load ( ) ;
120- } else if ( typeof value === "object" && value !== null && ! Array . isArray ( value ) && key !== "cli" ) {
121- loadAll ( value ) ;
120+ } else if (
121+ typeof value === "object" &&
122+ value !== null &&
123+ ! Array . isArray ( value ) &&
124+ key !== "cli"
125+ ) {
126+ loadAll ( value ) ;
122127 }
123128 }
124129 } ;
Original file line number Diff line number Diff line change 11import * as experiments from "../experiments" ;
2- import { Command } from "../command" ;
32
43/**
54 * Loads all commands for our parser.
65 */
76export function load ( client : any ) : any {
87 function loadCommand ( name : string ) {
9- const t0 = process . hrtime . bigint ( ) ;
10-
118 const load = ( ) => {
129 const { command : cmd } = require ( `./${ name } ` ) ;
1310 cmd . register ( client ) ;
@@ -26,7 +23,7 @@ export function load(client: any): any {
2623 const tEnd = process . hrtime . bigint ( ) ;
2724 const diff = ( tEnd - tStart ) / BigInt ( 1e6 ) ;
2825 if ( diff > 75 ) {
29- // console.error(`Loading ${name} took ${diff}ms`);
26+ // console.error(`Loading ${name} took ${diff}ms`);
3027 }
3128 } ;
3229
You can’t perform that action at this time.
0 commit comments