From 4f1c5cfa98c6f74e67cc4deccec50253d764d014 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Dec 2022 11:57:06 +0100 Subject: [PATCH 1/2] ensure manager entries load even if preceding ones failed --- code/lib/builder-manager/templates/template.ejs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/code/lib/builder-manager/templates/template.ejs b/code/lib/builder-manager/templates/template.ejs index 70484955230..436810002da 100644 --- a/code/lib/builder-manager/templates/template.ejs +++ b/code/lib/builder-manager/templates/template.ejs @@ -38,9 +38,20 @@ From 30119a6bec1d6c95b89b40af0d41b9efaaeffa1c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Thu, 15 Dec 2022 16:35:56 +0100 Subject: [PATCH 2/2] add a try catch around the managerEntries so they can't disrupt other managerEntires being loaded --- code/lib/builder-manager/src/index.ts | 8 ++++++++ .../builder-manager/templates/template.ejs | 20 +++++-------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/code/lib/builder-manager/src/index.ts b/code/lib/builder-manager/src/index.ts index bf3179f1494..b60436139ee 100644 --- a/code/lib/builder-manager/src/index.ts +++ b/code/lib/builder-manager/src/index.ts @@ -77,6 +77,14 @@ export const getConfig: ManagerBuilder['getConfig'] = async (options) => { globalExternals(definitions), pnpPlugin(), ], + + banner: { + js: 'try{', + }, + footer: { + js: '}catch(e){ console.log("ONE OF YOUR MANAGER-ENTRIES FAILED: " + import.meta.url) }', + }, + define: { 'process.env.NODE_ENV': "'production'", 'process.env': '{}', diff --git a/code/lib/builder-manager/templates/template.ejs b/code/lib/builder-manager/templates/template.ejs index 436810002da..296f0a8fca8 100644 --- a/code/lib/builder-manager/templates/template.ejs +++ b/code/lib/builder-manager/templates/template.ejs @@ -8,7 +8,6 @@ - <% if (typeof head !== 'undefined') { %> <%- head %> <% } %> @@ -38,20 +37,11 @@ + +