Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/composer error output #7

Merged
merged 2 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/typo3project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function typo3project(
config.root ?? process.cwd(),
);
} catch (err: any) {
logger.error(colors.red(err.mesage), { timestamp: true });
logger.error(colors.red(err.message), { timestamp: true });
return;
}

Expand Down Expand Up @@ -112,6 +112,10 @@ export default function typo3project(
);
},
configResolved(config) {
if (!pluginConfig) {
return;
}

if (config.build.manifest === false) {
logger.warn(
colors.red(
Expand All @@ -121,7 +125,7 @@ export default function typo3project(
);
}

if (pluginConfig && pluginConfig.debug) {
if (pluginConfig.debug) {
outputDebugInformation(
relevantExtensions,
entrypoints,
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function initializePluginConfig<T extends ComposerContext>(
if (!composerContext) {
const message =
target === "project"
? 'No composer project could be found in parent directories. If you only want to bundle assets of a single extension, make sure to set "target" to "extension".'
? 'No composer project could be found in parent directories. Make sure to set "type": "project" in your root composer.json.'
: "No extension composer file could be found in parent directories. Make sure that your extension has a valid composer file.";
throw new Error(message);
}
Expand Down