-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CONSOLE-3905: Port
update plugin changes
from CONSOLE-2971
- Loading branch information
Showing
7 changed files
with
134 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Get the current Console active plugins virtual module information. | ||
* | ||
* This module is executed by webpack `val-loader` which uses the resulting `code` as actual module source. | ||
* | ||
* | ||
* @param {object} options | ||
* @param {GetModuleData} options.getModuleData | ||
* @param {import('webpack').LoaderContext<any>} loaderContext | ||
*/ | ||
|
||
module.exports = ({ getModuleData }, loaderContext) => { | ||
const { | ||
code, | ||
diagnostics: { errors, warnings }, | ||
fileDependencies, | ||
} = getModuleData(); | ||
// eslint-disable-next-line no-console | ||
console.log( | ||
`Console active plugins virtual module code generated with ${errors.length} errors and ${warnings.length} warnings`, | ||
); | ||
|
||
errors.forEach((msg) => { | ||
loaderContext.emitError(new Error(msg)); | ||
}); | ||
|
||
warnings.forEach((msg) => { | ||
loaderContext.emitWarning(new Error(msg)); | ||
}); | ||
|
||
fileDependencies.forEach((file) => { | ||
loaderContext.addDependency(file); | ||
}); | ||
|
||
return { code }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 0 additions & 99 deletions
99
frontend/packages/console-plugin-sdk/src/webpack/ConsoleActivePluginsModule.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters