From 6be99db15c52ba7f0e4d7a2bf1749569d95b933e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=84=86=E8=96=AF=E9=A5=BC?= Date: Fri, 22 Nov 2024 16:03:52 +0800 Subject: [PATCH] fix(modkit): loon's template Update template.ejs Update template.ts --- packages/modkit/plugins/loon/src/template.ts | 6 +++--- packages/modkit/plugins/loon/template.ejs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/modkit/plugins/loon/src/template.ts b/packages/modkit/plugins/loon/src/template.ts index 460cd13..ebe859a 100644 --- a/packages/modkit/plugins/loon/src/template.ts +++ b/packages/modkit/plugins/loon/src/template.ts @@ -112,10 +112,10 @@ export class LoonTemplate extends Template { switch (script.type) { case 'http-request': case 'http-response': - line += `${script.type} ${script.pattern},`; + line += `${script.type} ${script.pattern} `; break; case 'cron': - line += `${script.type} "${script.cronexp}",`; + line += `${script.type} "${script.cronexp}" `; break; case 'generic': line += `${script.type} `; @@ -153,7 +153,7 @@ export class LoonTemplate extends Template { } }) .filter(Boolean) - .join(',') + .join(', ') .trim(); return line; }) diff --git a/packages/modkit/plugins/loon/template.ejs b/packages/modkit/plugins/loon/template.ejs index 4b8b84a..0ba3d3d 100644 --- a/packages/modkit/plugins/loon/template.ejs +++ b/packages/modkit/plugins/loon/template.ejs @@ -11,7 +11,7 @@ <% } %> <% if (loonTemplate.Rule) { %> -[Host] +[Rule] <%= loonTemplate.Rule %> <% } %>