-
Notifications
You must be signed in to change notification settings - Fork 378
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
feat: manage samples via plugin #2805
Changes from all commits
2370c68
bb7ef35
0d2f193
81bac81
56a933f
5527b7b
8ddc103
aaeb3e8
9c28930
5a792f9
f0cf20b
9880f57
952554f
17b6333
5ba20b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ import { JSONSchema7 } from 'json-schema'; | |
|
||
import { PluginLoader } from './pluginLoader'; | ||
import log from './logger'; | ||
import { PublishPlugin, RuntimeTemplate } from './types'; | ||
import { PublishPlugin, RuntimeTemplate, BotTemplate } from './types'; | ||
|
||
export class ComposerPluginRegistration { | ||
public loader: PluginLoader; | ||
|
@@ -89,6 +89,20 @@ export class ComposerPluginRegistration { | |
this.loader.extensions.runtimeTemplates.push(plugin); | ||
} | ||
|
||
/************************************************************************************** | ||
* Add Bot Template (aka, SampleBot) | ||
*************************************************************************************/ | ||
public addBotTemplate(template: BotTemplate) { | ||
this.loader.extensions.botTemplates.push(template); | ||
} | ||
|
||
/************************************************************************************** | ||
* Add Base Template (aka, BoilerPlate) | ||
*************************************************************************************/ | ||
public addBaseTemplate(template: BotTemplate) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really understand this one. What is meant by boilerplate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, Andy, boilerPlate is introduced by #2837 which works as a This PR don't add any features yet, just refactor the structure. |
||
this.loader.extensions.baseTemplates.push(template); | ||
} | ||
|
||
/************************************************************************************** | ||
* Express/web related features | ||
*************************************************************************************/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't these just be a part of the yarn workspaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, i think those can and should be managed by yarn workspaces, it's just those plugins were not included when we started to use this plugin approach, and i haven't thought about that in this effort.
i created a new ticket to track this work #2901 to keep this one focused, make sense? because this one moved a lot of files, which is very easy to get a conflict.