@@ -2404,7 +2404,7 @@ FUNC.jcomponent_update = function(name, type, content, body, meta) {
24042404 var REGTODOREPLACE = / ^ ( @ t o d o | @ t a g ) ( : ) ( \s ) | ( \s ) + - ( \s ) / i;
24052405 var REGTODODONE = / @ d o n e | @ c a n c e l e d / i;
24062406 var REGTODOCLEAN = / - - > | \* \/ / g;
2407- var REGPART = / ( C O M P O N E N T | C O M P O N E N T _ E X T E N D | E X T E N S I O N | C O N F I G | N E W S C H E M A | N E W C O M M A N D | N E W O P E R A T I O N | N E W T A S K | M I D D L E W A R E | W A T C H | R O U T E | ( ^ | \s ) O N | P L U G I N | P L U G I N A B L E ) + \( .* ?\) / g;
2407+ var REGPART = / ( C O M P O N E N T | C O M P O N E N T _ E X T E N D | A U T H | E X T E N S I O N | C O N F I G | N E W S C H E M A | N E W C O M M A N D | N E W O P E R A T I O N | N E W T A S K | M I D D L E W A R E | W A T C H | R O U T E | ( ^ | \s ) O N | P L U G I N | P L U G I N A B L E ) + \( .* ?\) / g;
24082408 var REGACTION = / N E W A C T I O N \( ( ' | " ) .* ?( ' | " ) , ( \s ) ? \{ / g;
24092409 var REGPARTCLEAN = / ( ' | " ) .* ?( ' | " ) / ;
24102410 var REGHELPER = / ( T h e l p e r s | F U N C | R E P O | M A I N ) \. [ a - z 0 - 9 A - Z _ $ ] + ( \s ) + = / g;
@@ -2494,12 +2494,17 @@ FUNC.jcomponent_update = function(name, type, content, body, meta) {
24942494 if ( m ) {
24952495
24962496 name = m [ 0 ] . match ( REGPARTCLEAN ) ;
2497- tmp = m [ 0 ] . toLowerCase ( ) ;
24982497
2499- if ( tmp . substring ( 0 , 16 ) === 'component_extend' ) {
2500- type = 'exten' ;
2501- } else
2502- type = tmp . substring ( 0 , 5 ) . trim ( ) ;
2498+ if ( ! name && m [ 0 ] . substring ( 0 , 4 ) === 'AUTH' ) {
2499+ name = [ 'AUTH' ] ;
2500+ tmp = type = 'auth' ;
2501+ } else {
2502+ tmp = m [ 0 ] . toLowerCase ( ) ;
2503+ if ( tmp . substring ( 0 , 16 ) === 'component_extend' ) {
2504+ type = 'exten' ;
2505+ } else
2506+ type = tmp . substring ( 0 , 5 ) . trim ( ) ;
2507+ }
25032508
25042509 if ( name ) {
25052510 name = name [ 0 ] . replace ( / ' | " / g, '' ) ;
@@ -2522,7 +2527,7 @@ FUNC.jcomponent_update = function(name, type, content, body, meta) {
25222527 if ( type === 'watch' && oldplugin )
25232528 name = name . replace ( / \? / g, oldplugin ) ;
25242529
2525- components . push ( { line : i , ch : beg , name : name . trim ( ) , type : type . substring ( 0 , 3 ) === 'on(' ? 'event' : type === 'exten' ? 'extension' : type === 'compo' ? 'component' : type === 'newsc' ? 'schema' : type === 'confi' ? 'config' : type === 'newop' ? 'operation' : type === 'newta' ? 'task' : type === 'newac' ? 'action' : type === 'newco' ? 'command' : type === 'watch' ? 'watcher' : type === 'plugi' ? ispluginable ? 'pluginable' : 'plugin' : type === 'middl' ? 'middleware' : type === 'route' ? 'route' : 'undefined' } ) ;
2530+ components . push ( { line : i , ch : beg , name : name . trim ( ) , type : type . substring ( 0 , 3 ) === 'on(' ? 'event' : type === 'exten' ? 'extension' : type === 'compo' ? 'component' : type === 'newsc' ? 'schema' : type === 'confi' ? 'config' : type === 'newop' ? 'operation' : type === 'newta' ? 'task' : type === 'newac' ? 'action' : type === 'newco' ? 'command' : type === 'watch' ? 'watcher' : type === 'plugi' ? ispluginable ? 'pluginable' : 'plugin' : type === 'middl' ? 'middleware' : type === 'route' ? 'route' : type === 'auth' ? 'auth' : 'undefined' } ) ;
25262531 is = beg ;
25272532 }
25282533 }
0 commit comments