@@ -67,25 +67,6 @@ export async function loadBuiltInPlugins() {
6767export async function loadCustomPlugins ( ) {
6868 core . info ( 'Loading custom plugins' )
6969 const pluginsPath = path . join ( process . cwd ( ) , '.github/scanner-plugins/' )
70- console . log ( 'plugins path' , pluginsPath ) ;
71-
72- const cwd = process . cwd ( )
73- console . log ( 'current working directory:' , cwd )
74- const underRootPath = path . join ( cwd , '..' )
75- console . log ( 'path under root:' , underRootPath )
76- const underRoot = fs . readdirSync ( underRootPath )
77- if ( Array . isArray ( underRoot ) ) {
78- underRoot . forEach ( element => {
79- console . log ( 'file under root:' , element )
80- } ) ;
81- }
82-
83-
84- const fileNames = fs . readdirSync ( process . cwd ( ) )
85- fileNames . forEach ( ( fn : string ) => {
86- console . log ( 'file in cwd:' , fn )
87- } ) ;
88-
8970
9071 // - currently, the plugin manager will abort loading
9172 // all plugins if there's an error
@@ -123,7 +104,7 @@ export async function loadPluginsFromPath({
123104 }
124105
125106 if ( ! plugin ) {
126- core . info ( `Skipping plugin folder without index.ts or index.js: ${ pluginFolder } ` )
107+ core . info ( `Skipping plugin without index.ts or index.js file : ${ pluginFolder } ` )
127108 continue
128109 }
129110
@@ -152,6 +133,7 @@ async function loadPluginViaTsFile(pluginFolderPath: string) {
152133 return
153134 }
154135
136+ core . info ( `index.ts found for plugin at path: ${ pluginFolderPath } ` )
155137 const esbuildResult = await esbuild . build ( {
156138 entryPoints : [ pluginEntryPath ] ,
157139 write : false ,
@@ -179,6 +161,7 @@ async function loadPluginViaJsFile(pluginFolderPath: string) {
179161 return
180162 }
181163
164+ core . info ( `index.js found for plugin at path: ${ pluginFolderPath } ` )
182165 return dynamicImport ( pluginEntryPath )
183166}
184167
0 commit comments