| 
									
										
										
										
											2021-12-31 22:18:49 +00:00
										 |  |  | const targets = new Array(); | 
					
						
							|  |  |  | export function CliFunction(key: string, description: string) { | 
					
						
							|  |  |  |   return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) { | 
					
						
							|  |  |  |     targets.push({ | 
					
						
							|  |  |  |       target, | 
					
						
							|  |  |  |       propertyKey, | 
					
						
							|  |  |  |       descriptor, | 
					
						
							|  |  |  |       key, | 
					
						
							|  |  |  |       description, | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | export function GetCliFunctions(key) { | 
					
						
							|  |  |  |   return targets.find((x) => x.key === key); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | export function GetAllCliModes() { | 
					
						
							| 
									
										
										
										
											2021-12-31 22:34:35 +00:00
										 |  |  |   return targets.map((x) => { | 
					
						
							|  |  |  |     return { | 
					
						
							|  |  |  |       key: x.key, | 
					
						
							|  |  |  |       description: x.description, | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }); | 
					
						
							| 
									
										
										
										
											2021-12-31 22:18:49 +00:00
										 |  |  | } |