Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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 Oct 20, 2020
94a8621
Refactors and polish
tonyanziano Oct 20, 2020
966b6b5
Disabled the extension
tonyanziano Oct 20, 2020
dc36d37
Added newline at eof
tonyanziano Oct 20, 2020
af88703
Merge branch 'main' into toanzian/pva-publish
tonyanziano Oct 20, 2020
4c678d6
Setup testing.
tonyanziano Oct 21, 2020
2ec5705
Merge branch 'toanzian/pva-publish' of https://github.com/microsoft/B…
tonyanziano Oct 21, 2020
c9cffe5
Added ui tests
tonyanziano Oct 21, 2020
669fffa
Merge branch 'main' of https://github.com/microsoft/BotFramework-Comp…
tonyanziano Oct 21, 2020
11267a6
Merge branch 'main' into toanzian/pva-publish
tonyanziano Oct 22, 2020
5d50c1e
Merge branch 'main' into toanzian/pva-publish
a-b-r-o-w-n Oct 22, 2020
bd93a96
Merge branch 'main' into toanzian/pva-publish
tonyanziano Oct 22, 2020
519a07f
Applied most of PR feedback
tonyanziano Oct 22, 2020
b474fba
Added format-message and TODO for stream work
tonyanziano Oct 22, 2020
087be0c
Merge branch 'main' into toanzian/pva-publish
tonyanziano Oct 22, 2020
593e097
Merge branch 'main' into toanzian/pva-publish
tonyanziano Oct 22, 2020
f30a72d
Merge branch 'main' into toanzian/pva-publish
tonyanziano Oct 23, 2020
58b8650
Merge branch 'main' into toanzian/pva-publish
tonyanziano Oct 23, 2020
bd9a2cf
Added expect-error to extension initialization
tonyanziano Oct 23, 2020
5ef0bc1
Use extension registration's logger if possible
tonyanziano Oct 23, 2020
0a193f3
Merge branch 'toanzian/pva-publish' of https://github.com/microsoft/B…
tonyanziano Oct 23, 2020
a617346
Fixed type resolution
tonyanziano Oct 23, 2020
500694e
Merge branch 'main' into toanzian/pva-publish
tonyanziano Oct 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions extensions/pvaPublish/jest.config.node.js
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,
});
7 changes: 7 additions & 0 deletions extensions/pvaPublish/jest.config.ui.js
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'],
});
55 changes: 55 additions & 0 deletions extensions/pvaPublish/package.json
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"
}
],
"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"
}
}
29 changes: 29 additions & 0 deletions extensions/pvaPublish/src/node/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const COMPOSER_1P_APP_ID = 'ce48853e-0605-4f77-8746-d70ac63cc6bc';
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}`,
};
18 changes: 18 additions & 0 deletions extensions/pvaPublish/src/node/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { getStatus, history, publish } from './publish';

function initialize(registration) {
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,
};
Loading