juice-email-cli 2.1.16 → 2.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/edm/elabscience/elabscience-template.html +2052 -1920
- package/edm/procell/procell-template.html +1914 -1778
- package/package.json +1 -1
- package/src/snippet.js +12 -2
package/package.json
CHANGED
package/src/snippet.js
CHANGED
|
@@ -574,9 +574,19 @@ async function runSnippetMode({ snippet, template, config: cliConfigPath, output
|
|
|
574
574
|
templatePath = chosen.path;
|
|
575
575
|
}
|
|
576
576
|
|
|
577
|
-
//
|
|
577
|
+
// 配置文件:非交互模式自动检测片段目录,交互模式提示用户选择
|
|
578
578
|
const snippetDir = path.dirname(snippetPath);
|
|
579
|
-
|
|
579
|
+
let priorityConfigPath;
|
|
580
|
+
|
|
581
|
+
if (template) {
|
|
582
|
+
// 命令行完整指定(-s + -f),自动检测
|
|
583
|
+
priorityConfigPath = findLocalConfig(snippetDir);
|
|
584
|
+
} else {
|
|
585
|
+
// 交互模式(只有 -s),提示选择配置
|
|
586
|
+
const yamlFiles = findYamlFiles(snippetDir);
|
|
587
|
+
const configChoice = await promptConfigForInteractive(yamlFiles);
|
|
588
|
+
priorityConfigPath = (configChoice.type === 'file') ? configChoice.path : null;
|
|
589
|
+
}
|
|
580
590
|
|
|
581
591
|
// 跨品牌检查:片段和模板品牌不一致时给出警告
|
|
582
592
|
try {
|