This repository was archived by the owner on Jul 9, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 374
fix: allow extension to register multiple publish targets #4424
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f2a748c
build extension bundle when building client
a-b-r-o-w-n 25bb0b0
enable re-use of plugin host
a-b-r-o-w-n 9eb2105
require name and description for publish plugins
a-b-r-o-w-n c123982
update publish plugins
a-b-r-o-w-n bc97e16
add multiple publish plugins in sample-ui-plugin
a-b-r-o-w-n 0c6b998
update azure publish description
a-b-r-o-w-n 2be1649
wrap file path in quote for windows compat
a-b-r-o-w-n 3e74f01
fix tests
a-b-r-o-w-n 6845241
Merge branch 'main' into abrown/fix-publish-plugin
a-b-r-o-w-n File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
Composer/packages/client/src/components/PluginHost/styles.ts
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,12 +58,17 @@ export class ExtensionRegistration { | |
| * Publish related features | ||
| *************************************************************************************/ | ||
| public async addPublishMethod(plugin: PublishPlugin) { | ||
| log('registering publish method', this.name); | ||
| this.context.extensions.publish[plugin.customName || this.name] = { | ||
| if (this.context.extensions.publish[plugin.name]) { | ||
| throw new Error(`Duplicate publish method. Cannot register publish method with name ${plugin.name}.`); | ||
|
Contributor
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. nit: if this is surfaced to the UI, maybe use formatMessage
Contributor
Author
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. Couple of things:
Contributor
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. As far as I've seen, messages that get thrown out to the console (like those inside exceptions) don't need to be localized. Only strings that get displayed to a normal user do. |
||
| } | ||
|
|
||
| log('registering publish method', plugin.name); | ||
| this.context.extensions.publish[plugin.name] = { | ||
| plugin: { | ||
| name: plugin.customName || this.name, | ||
| description: plugin.customDescription || this.description, | ||
| name: plugin.name, | ||
| description: plugin.description || this.description, | ||
| instructions: plugin.instructions, | ||
| extensionId: this.name, | ||
| bundleId: plugin.bundleId, | ||
| schema: plugin.schema, | ||
| }, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "@botframework-composer/types", | ||
| "version": "0.0.1", | ||
| "version": "0.0.2", | ||
| "description": "Shared types for Botframework Composer..", | ||
| "main": "lib/index.js", | ||
| "files": [ | ||
|
|
@@ -15,10 +15,10 @@ | |
| "author": "[email protected]", | ||
| "license": "MIT", | ||
| "dependencies": { | ||
| "@types/express": "^4.16.1", | ||
| "json-schema": "^0.2.5" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/express": "^4.16.1", | ||
| "eslint": "7.0.0", | ||
| "rimraf": "^3.0.2", | ||
| "typescript": "^3.8.3" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "printWidth": 120, | ||
| "parser": "typescript", | ||
| "singleQuote": true, | ||
| "tabWidth": 2, | ||
| "endOfLine": "auto" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
it's a dev dep right?
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.
This actually needs to be in the dependencies because we reference it in an exported type.