This commit is contained in:
qiaozha 2019-12-19 17:17:42 +08:00
Родитель b94f62d7cf
Коммит 8400606506
2 изменённых файлов: 6 добавлений и 9 удалений

Просмотреть файл

@ -10,15 +10,12 @@ use-extension:
pipeline-model: v3
pipeline:
modelerfour:
input: openapi-document/multi-api/identity
common/generate:
plugin: cli.common
cli.common:
input: modelerfour
output-artifact: source-file-common
common/emitter:
input: generate
cli.common/emitter:
input: cli.common
scope: scope-here
scope-here:

Просмотреть файл

@ -19,14 +19,14 @@ extension.Add("cli.common", async autoRestApi => {
// read a setting
const isDebugFlagSet = await autoRestApi.GetValue("debug");
let cliCommonSettings = await autoRestApi.GetValue("cli.common");
let cliCommonSettings = await autoRestApi.GetValue("cli");
// emit messages
autoRestApi.Message({
Channel: Channel.Warning,
Text: "Hello World! The `debug` flag is " + (isDebugFlagSet ? "set" : "not set"),
Text: "Hello World cli.common! The `debug` flag is " + (isDebugFlagSet ? "set" : "not set"),
});
autoRestApi.Message({
@ -41,7 +41,7 @@ extension.Add("cli.common", async autoRestApi => {
// emit a file (all input files concatenated)
autoRestApi.WriteFile("myfolder/concat.txt", inputFiles.join("\n---\n"));
autoRestApi.WriteFile("myfolder/concatcommon.txt", inputFiles.join("\n---\n"));
}
catch (e)
{