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
feat: Add PVA Publish Extension #4446
Merged
Merged
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
37fec36
Copied over pva publish plugin from feature branch
tonyanziano 94a8621
Refactors and polish
tonyanziano 966b6b5
Disabled the extension
tonyanziano dc36d37
Added newline at eof
tonyanziano af88703
Merge branch 'main' into toanzian/pva-publish
tonyanziano 4c678d6
Setup testing.
tonyanziano 2ec5705
Merge branch 'toanzian/pva-publish' of https://github.com/microsoft/B…
tonyanziano c9cffe5
Added ui tests
tonyanziano 669fffa
Merge branch 'main' of https://github.com/microsoft/BotFramework-Comp…
tonyanziano 11267a6
Merge branch 'main' into toanzian/pva-publish
tonyanziano 5d50c1e
Merge branch 'main' into toanzian/pva-publish
a-b-r-o-w-n bd93a96
Merge branch 'main' into toanzian/pva-publish
tonyanziano 519a07f
Applied most of PR feedback
tonyanziano b474fba
Added format-message and TODO for stream work
tonyanziano 087be0c
Merge branch 'main' into toanzian/pva-publish
tonyanziano 593e097
Merge branch 'main' into toanzian/pva-publish
tonyanziano f30a72d
Merge branch 'main' into toanzian/pva-publish
tonyanziano 58b8650
Merge branch 'main' into toanzian/pva-publish
tonyanziano bd9a2cf
Added expect-error to extension initialization
tonyanziano 5ef0bc1
Use extension registration's logger if possible
tonyanziano 0a193f3
Merge branch 'toanzian/pva-publish' of https://github.com/microsoft/B…
tonyanziano a617346
Fixed type resolution
tonyanziano 500694e
Merge branch 'main' into toanzian/pva-publish
tonyanziano 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| const { createConfig } = require('@botframework-composer/test-utils'); | ||
|
|
||
| module.exports = createConfig('node', 'node', { | ||
| testMatch: ['**/?(*.)+(spec).ts'], | ||
| verbose: true, | ||
| }); |
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 @@ | ||
| const { createConfig } = require('@botframework-composer/test-utils'); | ||
|
|
||
| module.exports = createConfig('ui', 'react', { | ||
| testMatch: ['**/?(*.)+(spec).tsx'], | ||
| verbose: true, | ||
| setupFilesAfterEnv: ['./testing/setupUITests.js'], | ||
| }); |
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,55 @@ | ||
| { | ||
| "name": "pva-publish-composer", | ||
| "version": "1.0.0", | ||
| "scripts": { | ||
| "build": "yarn build:ui && yarn build:node", | ||
| "build:node": "tsc --project tsconfig.node.json", | ||
| "build:ui": "webpack --config webpack.config.js", | ||
| "test": "yarn test:node && yarn test:ui", | ||
| "test:node": "jest --config jest.config.node.js", | ||
| "test:ui": "jest --config jest.config.ui.js" | ||
| }, | ||
| "composer": { | ||
| "enabled": false, | ||
| "bundles": [ | ||
| { | ||
| "id": "publish", | ||
| "path": "dist/ui/publish-bundle.js" | ||
tonyanziano marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| ], | ||
| "contributes": { | ||
| "views": { | ||
| "publish": [ | ||
| { | ||
| "bundleId": "publish" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "main": "dist/node/index.js", | ||
| "dependencies": { | ||
| "@bfc/extension-client": "file:../../Composer/packages/extension-client", | ||
| "@uifabric/icons": "7.3.59", | ||
| "@uifabric/react-hooks": "7.4.12", | ||
| "fs-extra": "^9.0.1", | ||
| "node-fetch": "2.6.1", | ||
| "office-ui-fabric-react": "7.121.11", | ||
| "react": "^16.13.0", | ||
| "react-dom": "^16.13.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/plugin-proposal-class-properties": "7.8.3", | ||
| "@babel/plugin-transform-runtime": "7.9.6", | ||
| "@botframework-composer/test-utils": "^0.0.1", | ||
| "@types/jest": "^26.0.15", | ||
| "@types/node": "^14.11.2", | ||
| "jest": "^26.6.0", | ||
| "mini-svg-data-uri": "^1.2.3", | ||
| "ts-loader": "^8.0.0", | ||
| "typescript": "^3.9.6", | ||
| "url-loader": "^4.1.1", | ||
| "webpack": "^4.43.0", | ||
| "webpack-cli": "^3.3.12" | ||
| } | ||
| } | ||
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,29 @@ | ||
| const COMPOSER_1P_APP_ID = 'ce48853e-0605-4f77-8746-d70ac63cc6bc'; | ||
tonyanziano marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| const API_VERSION = 'v1'; | ||
|
|
||
| export const AUTH_CREDENTIALS = { | ||
| INT: { | ||
| // web auth flow | ||
| clientId: COMPOSER_1P_APP_ID, | ||
| scopes: ['a522f059-bb65-47c0-8934-7db6e5286414/.default'], // int / ppe | ||
|
|
||
| // electron auth flow | ||
| targetResource: 'a522f059-bb65-47c0-8934-7db6e5286414', | ||
| }, | ||
| PPE: { | ||
| clientId: COMPOSER_1P_APP_ID, | ||
| scopes: ['a522f059-bb65-47c0-8934-7db6e5286414/.default'], | ||
| targetResource: 'a522f059-bb65-47c0-8934-7db6e5286414', | ||
| }, | ||
| PROD: { | ||
| clientId: COMPOSER_1P_APP_ID, | ||
| scopes: ['96ff4394-9197-43aa-b393-6a41652e21f8/.default'], | ||
| targetResource: '96ff4394-9197-43aa-b393-6a41652e21f8', | ||
| }, | ||
| }; | ||
|
|
||
| export const BASE_URLS = { | ||
| INT: `https://bots.int.customercareintelligence.net/api/botmanagement/${API_VERSION}`, | ||
| PPE: `https://bots.ppe.customercareintelligence.net/api/botmanagement/${API_VERSION}`, | ||
| PROD: `https://powerva.microsoft.com/api/botmanagement/${API_VERSION}`, | ||
| }; | ||
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,18 @@ | ||
| import { getStatus, history, publish } from './publish'; | ||
|
|
||
| function initialize(registration) { | ||
tonyanziano marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| const plugin = { | ||
| name: 'pva-publish-composer', | ||
| description: 'Publish bot to Power Virtual Agents (Preview)', | ||
| bundleId: 'publish', | ||
| history, | ||
| getStatus, | ||
| publish, | ||
| // TODO: add 'pull' once ready, | ||
| }; | ||
| registration.addPublishMethod(plugin); | ||
| } | ||
|
|
||
| module.exports = { | ||
| initialize, | ||
| }; | ||
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.
Uh oh!
There was an error while loading. Please reload this page.