diff --git a/Composer/.dockerignore b/Composer/.dockerignore index de6241a46a..aec69cf570 100644 --- a/Composer/.dockerignore +++ b/Composer/.dockerignore @@ -11,7 +11,7 @@ Dockerfile .dockerignore # ignore local bots -plugins/localPublish/hostedBots/* +extensions/localPublish/hostedBots/* # ignore test coverage diff --git a/Composer/Dockerfile b/Composer/Dockerfile index a7c6cd8382..64dfddb4ef 100644 --- a/Composer/Dockerfile +++ b/Composer/Dockerfile @@ -37,7 +37,7 @@ COPY --from=build /src/Composer/packages/server ./packages/server COPY --from=build /src/Composer/packages/lib ./packages/lib COPY --from=build /src/Composer/packages/tools ./packages/tools COPY --from=build /src/Composer/packages/ui-plugins ./packages/ui-plugins -COPY --from=build /src/Composer/plugins ./plugins +COPY --from=build /src/extensions ./extensions ENV NODE_ENV "production" RUN yarn --production --frozen-lockfile --force $YARN_ARGS && yarn cache clean diff --git a/Composer/package.json b/Composer/package.json index 25560317c0..f9cfc46d78 100644 --- a/Composer/package.json +++ b/Composer/package.json @@ -38,16 +38,12 @@ "scripts": { "build": "node scripts/begin.js && yarn build:prod && yarn l10n", "build:prod": "yarn build:dev && yarn build:client && yarn build:server && yarn build:electron", - "build:dev": "wsrun -ltm -x @bfc/electron-server -x @bfc/client -x @bfc/server -p @botframework-composer/* -p @bfc/* -c build && yarn build:plugins", + "build:dev": "yarn build:libs && yarn build:extensions", "build:electron": "yarn workspace @bfc/electron-server build && yarn workspace @bfc/electron-server l10n", + "build:libs": "wsrun -ltm -x @bfc/electron-server -x @bfc/client -x @bfc/server -p @botframework-composer/* -p @bfc/* -c build", "build:server": "yarn workspace @bfc/server build", "build:client": "yarn workspace @bfc/client build", - "build:plugins": "yarn build:plugins:localpublish && yarn build:plugins:samples && yarn build:plugins:azurePublish && yarn build:plugins:runtimes && yarn build:plugins:vacore", - "build:plugins:localpublish": "cd plugins/localPublish && yarn install && yarn build", - "build:plugins:samples": "cd plugins/samples && yarn install && yarn build", - "build:plugins:azurePublish": "cd plugins/azurePublish && yarn install && yarn build", - "build:plugins:runtimes": "cd plugins/runtimes && yarn install && yarn build", - "build:plugins:vacore": "cd plugins/vacore && yarn install && yarn build", + "build:extensions": "node scripts/compileExtensions.js", "start": "cross-env NODE_ENV=production PORT=3000 yarn start:server", "startall": "yarn start", "start:dev": "concurrently \"npm:start:client\" \"npm:start:server:dev\"", @@ -127,5 +123,7 @@ "typescript": "3.9.2", "wsrun": "^5.2.0" }, - "dependencies": {} + "dependencies": { + "globby": "^11.0.1" + } } diff --git a/Composer/packages/adaptive-form/src/components/FormRow.tsx b/Composer/packages/adaptive-form/src/components/FormRow.tsx index 7556800b87..62618999c3 100644 --- a/Composer/packages/adaptive-form/src/components/FormRow.tsx +++ b/Composer/packages/adaptive-form/src/components/FormRow.tsx @@ -15,7 +15,7 @@ export interface FormRowProps extends Omit { row: string | [string, string]; } -export const getRowProps = (rowProps: FormRowProps, field: string) => { +export function getRowProps(rowProps: FormRowProps, field: string): FieldProps { const { id, depth, @@ -67,7 +67,7 @@ export const getRowProps = (rowProps: FormRowProps, field: string) => { onBlur, onFocus, }; -}; +} const formRow = { row: css` diff --git a/Composer/packages/client/config/env.js b/Composer/packages/client/config/env.js index 0a2194d3a4..503c4bbf0c 100644 --- a/Composer/packages/client/config/env.js +++ b/Composer/packages/client/config/env.js @@ -90,7 +90,7 @@ function getClientEnvironment(publicUrl) { SDK_PACKAGE_VERSION: '4.10.2', // TODO: change this when Composer supports custom schema/custom runtime COMPOSER_VERSION: '1.1.1', LOCAL_PUBLISH_PATH: - process.env.LOCAL_PUBLISH_PATH || path.resolve(process.cwd(), '../../plugins/localPublish/hostedBots'), + process.env.LOCAL_PUBLISH_PATH || path.resolve(process.cwd(), '../../../extensions/localPublish/hostedBots'), } ); // Stringify all values so we can feed into Webpack DefinePlugin diff --git a/Composer/packages/electron-server/README.md b/Composer/packages/electron-server/README.md index b119f5a4f8..cd7a1815e8 100644 --- a/Composer/packages/electron-server/README.md +++ b/Composer/packages/electron-server/README.md @@ -27,8 +27,8 @@ This package is a wrapper that will spin up the Composer web application inside **Method 2** -1. Run `yarn run pack` in the `/Composer/package/electron-server` directory. +1. Run `yarn run pack` in the `/Composer/package/electron-server` directory. 2. Run `yarn copy-templates` in the `/Composer/package/electron-server` directory. -3. Run `yarn copy-plugins` in the `/Composer/package/electron-server` directory. +3. Run `yarn copy-extensions` in the `/Composer/package/electron-server` directory. 4. Run `yarn dist`in the `/Composer/package/electron-server` directory. 5. Find your portable binary inside of `/Composer/package/electron-server/dist`. diff --git a/Composer/packages/electron-server/package.json b/Composer/packages/electron-server/package.json index 2e9a057412..a23ac1da33 100644 --- a/Composer/packages/electron-server/package.json +++ b/Composer/packages/electron-server/package.json @@ -11,10 +11,10 @@ "scripts": { "build": "tsc -p tsconfig.build.json && ncp src/preload.js build/preload.js", "clean": "rimraf build && rimraf dist && rimraf l10ntemp", - "copy-plugins": "node scripts/copy-plugins.js", + "copy-extensions": "node scripts/copy-extensions.js", "copy-runtime": "node scripts/copy-runtime.js", "dist": "node scripts/electronBuilderDist.js", - "dist:full": "yarn clean && yarn build && yarn run pack && yarn copy-runtime && yarn copy-plugins && yarn dist", + "dist:full": "yarn clean && yarn build && yarn run pack && yarn copy-runtime && yarn copy-extensions && yarn dist", "lint": "eslint --quiet ./src", "lint:fix": "yarn lint --fix", "pack": "node scripts/electronBuilderPack.js", diff --git a/Composer/packages/electron-server/scripts/copy-plugins.js b/Composer/packages/electron-server/scripts/copy-extensions.js similarity index 51% rename from Composer/packages/electron-server/scripts/copy-plugins.js rename to Composer/packages/electron-server/scripts/copy-extensions.js index 3ee3923b0e..482d30d5ba 100644 --- a/Composer/packages/electron-server/scripts/copy-plugins.js +++ b/Composer/packages/electron-server/scripts/copy-extensions.js @@ -5,8 +5,8 @@ const fs = require('fs-extra'); const { resolve } = require('path'); const electronBuildConfig = require('../electron-builder-config.json'); -const source = resolve(__dirname, '../../../plugins'); -console.log('[copy-plugins.js] Copying plugins from: ', source); +const source = resolve(__dirname, '../../../../extensions'); +console.log('[copy-extensions.js] Copying extensions from: ', source); let destination; switch (process.platform) { @@ -14,23 +14,23 @@ switch (process.platform) { const productName = electronBuildConfig.productName; destination = resolve( __dirname, - `../dist/mac/${productName}.app/Contents/Resources/app.asar.unpacked/build/plugins` + `../dist/mac/${productName}.app/Contents/Resources/app.asar.unpacked/build/extensions` ); - console.log('[copy-plugins.js] Mac detected. Copying plugins to: ', destination); + console.log('[copy-extensions.js] Mac detected. Copying extensions to: ', destination); break; case 'linux': - destination = resolve(__dirname, '../dist/linux-unpacked/resources/app.asar.unpacked/build/plugins'); - console.log('[copy-plugins.js] Linux detected. Copying plugins to: ', destination); + destination = resolve(__dirname, '../dist/linux-unpacked/resources/app.asar.unpacked/build/extensions'); + console.log('[copy-extensions.js] Linux detected. Copying extensions to: ', destination); break; case 'win32': - destination = resolve(__dirname, '../dist/win-unpacked/resources/app.asar.unpacked/build/plugins'); - console.log(`[copy-plugins.js] Windows detected. Copying plugins from ${source} to ${destination}`); + destination = resolve(__dirname, '../dist/win-unpacked/resources/app.asar.unpacked/build/extensions'); + console.log(`[copy-extensions.js] Windows detected. Copying extensions from ${source} to ${destination}`); break; default: - console.error('[copy-plugins.js] Detected platform is not Mac / Linux / Windows'); + console.error('[copy-extensions.js] Detected platform is not Mac / Linux / Windows'); process.exit(1); } @@ -39,11 +39,11 @@ const filterOutTS = (src) => { return !src.endsWith('.ts'); }; -// copy plugins from /Composer/plugins/ to pre-packaged electron app +// copy extensions from /extensions/ to pre-packaged electron app fs.copy(source, destination, { filter: filterOutTS }, (err) => { if (err) { - console.error('[copy-plugins.js] Error while copying plugins: ', err); + console.error('[copy-extensions.js] Error while copying extensions: ', err); return; } - console.log('[copy-plugins.js] Copied plugins successfully.'); + console.log('[copy-extensions.js] Copied extensions successfully.'); }); diff --git a/Composer/packages/electron-server/src/main.ts b/Composer/packages/electron-server/src/main.ts index 5b9f4c14f5..3ac14d6284 100644 --- a/Composer/packages/electron-server/src/main.ts +++ b/Composer/packages/electron-server/src/main.ts @@ -142,7 +142,7 @@ async function loadServer() { // only change paths if packaged electron app const unpackedDir = getUnpackedAsarPath(); process.env.COMPOSER_RUNTIME_FOLDER = join(unpackedDir, 'runtime'); - process.env.COMPOSER_BUILTIN_EXTENSIONS_DIR = join(unpackedDir, 'build', 'plugins'); + process.env.COMPOSER_BUILTIN_EXTENSIONS_DIR = join(unpackedDir, 'build', 'extensions'); } // only create a new data directory if packaged electron app diff --git a/Composer/packages/extension/src/extensionContext.ts b/Composer/packages/extension/src/extensionContext.ts index 6cab68154b..a4d247ed8f 100644 --- a/Composer/packages/extension/src/extensionContext.ts +++ b/Composer/packages/extension/src/extensionContext.ts @@ -103,6 +103,7 @@ class ExtensionContext { } } + /** @deprecated */ public async loadPluginsFromFolder(dir: string) { const plugins = await glob('*/package.json', { cwd: dir, dot: true }); for (const p in plugins) { diff --git a/Composer/packages/extension/src/storage/extensionManifestStore.ts b/Composer/packages/extension/src/storage/extensionManifestStore.ts index cb529c053e..795cd53082 100644 --- a/Composer/packages/extension/src/storage/extensionManifestStore.ts +++ b/Composer/packages/extension/src/storage/extensionManifestStore.ts @@ -6,7 +6,7 @@ import { ExtensionMap, ExtensionMetadata } from '@botframework-composer/types'; import logger from '../logger'; -const log = logger.extend('plugins'); +const log = logger.extend('extensions'); export type ExtensionManifest = ExtensionMap; diff --git a/Composer/packages/server/src/controllers/__tests__/publisher.test.ts b/Composer/packages/server/src/controllers/__tests__/publisher.test.ts index 209802d5a9..72d8fbcf63 100644 --- a/Composer/packages/server/src/controllers/__tests__/publisher.test.ts +++ b/Composer/packages/server/src/controllers/__tests__/publisher.test.ts @@ -11,7 +11,7 @@ import { BotProjectService } from '../../services/project'; import { Path } from '../../utility/path'; import { PublishController } from '../../controllers/publisher'; -const pluginDir = path.resolve(__dirname, '../../../../../plugins'); +const pluginDir = path.resolve(__dirname, '../../../../../../extensions'); let mockRes: Response; diff --git a/Composer/packages/server/src/server.ts b/Composer/packages/server/src/server.ts index 338d76e99d..d925787081 100644 --- a/Composer/packages/server/src/server.ts +++ b/Composer/packages/server/src/server.ts @@ -48,7 +48,7 @@ export async function start(): Promise { // load all installed plugins setEnvDefault('COMPOSER_EXTENSION_DATA', path.resolve(__dirname, '../../../.composer/extensions.json')); - setEnvDefault('COMPOSER_BUILTIN_EXTENSIONS_DIR', path.resolve(__dirname, '../../../plugins')); + setEnvDefault('COMPOSER_BUILTIN_EXTENSIONS_DIR', path.resolve(__dirname, '../../../../extensions')); // Composer/.composer/extensions setEnvDefault('COMPOSER_REMOTE_EXTENSIONS_DIR', path.resolve(__dirname, '../../../.composer/extensions')); await ExtensionManager.loadAll(); diff --git a/Composer/plugins/mongoStorage/lib/index.d.ts b/Composer/plugins/mongoStorage/lib/index.d.ts deleted file mode 100644 index deae25e201..0000000000 --- a/Composer/plugins/mongoStorage/lib/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: (composer: any) => Promise; -export default _default; diff --git a/Composer/plugins/mongoStorage/lib/index.js b/Composer/plugins/mongoStorage/lib/index.js deleted file mode 100644 index 84cf0b205f..0000000000 --- a/Composer/plugins/mongoStorage/lib/index.js +++ /dev/null @@ -1,311 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const pathLib = require("path"); -const mongoose = require("mongoose"); -const globToRegExp = require("glob-to-regexp"); -const fileSchema = new mongoose.Schema({ - name: { - type: String, - }, - path: { - type: String, - }, - folder: { - type: String, - }, - isFolder: { - type: Boolean, - default: false, - }, - content: { - type: String, - }, - lastModified: { - type: Date, - }, - modifiedBy: { - type: String, - }, -}); -const cleanPath = (path) => { - // if somehow there is a // in the path - return path.replace(/\/\//g, '/').replace(/\\\\/g, '\\'); -}; -class MongoStorage { - constructor(conn, user) { - // connect to Mongo - // TODO: make the connect string and options pull from the connection - conn; - if (!MongoStorage.db) { - mongoose.connect('mongodb://localhost:27017/composer', {}); - MongoStorage.db = mongoose.connection; - MongoStorage.db.on('error', err => { - throw new Error(err); - }); - MongoStorage.db.once('open', function () { - // we're connected! - // eslint-disable-next-line no-console - // console.log('CONNECTED TO MONGO'); - }); - MongoStorage.files = mongoose.model('file', fileSchema, 'files'); - } - if (user) { - this._user = user; - } - } - stat(path) { - return __awaiter(this, void 0, void 0, function* () { - path = cleanPath(path); - return new Promise((resolve, reject) => { - MongoStorage.files.findOne({ path: path }, (err, file) => { - if (err) { - reject(err); - } - else if (file) { - if (file.isFolder === true) { - resolve({ - isDir: true, - isFile: false, - lastModified: file.lastModified, - size: 1, - }); - } - else { - resolve({ - isDir: false, - isFile: true, - lastModified: file.lastModified, - size: 1, - }); - } - } - else if (!file) { - // perhaps this is a folder - MongoStorage.files.findOne({ folder: path }, (err, file) => { - if (err) { - reject(err); - } - else if (!file) { - if (path == '/') { - resolve({ - isDir: true, - isFile: false, - lastModified: new Date(), - size: 0, - }); - } - else { - reject(`path ${path} not found`); - } - } - else { - resolve({ - isDir: true, - isFile: false, - lastModified: file.lastModified, - size: 0, - }); - } - }); - } - }); - }); - }); - } - readFile(path) { - return __awaiter(this, void 0, void 0, function* () { - path = cleanPath(path); - return new Promise((resolve, reject) => { - MongoStorage.files.findOne({ path: path }, (err, file) => { - if (err) { - reject(err); - } - else if (!file) { - reject('File not found'); - } - else { - resolve(file.content.replace(/^\uFEFF/, '')); - } - }); - }); - }); - } - readDir(path) { - return __awaiter(this, void 0, void 0, function* () { - path = cleanPath(path); - return new Promise((resolve, reject) => { - // find all files where the parent folder matches the specified path - MongoStorage.files.find({ folder: path }, 'path', {}, (err, files) => { - if (err) { - reject(err); - } - else if (!files) { - reject('Folder not found'); - } - else { - // strip off the path, leaving just the filename - resolve(files.map(item => { - return item.path.replace(path, ''); - })); - } - }); - }); - }); - } - exists(path) { - return __awaiter(this, void 0, void 0, function* () { - path = cleanPath(path); - try { - // eslint-disable-next-line security/detect-non-literal-fs-filename - yield this.stat(path); - return true; - } - catch (error) { - return false; - } - }); - } - writeFile(path, content) { - return __awaiter(this, void 0, void 0, function* () { - path = cleanPath(path); - return new Promise((resolve, reject) => { - const doc = { - path: path, - content: content, - lastModified: new Date(), - modifiedBy: this._user ? this._user.id : null, - folder: pathLib.dirname(path), - }; - MongoStorage.files.findOneAndUpdate({ path: path }, doc, { upsert: true }, (err, updated) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - }); - } - removeFile(path) { - return __awaiter(this, void 0, void 0, function* () { - path = cleanPath(path); - return new Promise((resolve, reject) => { - MongoStorage.files.deleteOne({ path: path }, err => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - }); - } - mkDir(path, options) { - return __awaiter(this, void 0, void 0, function* () { - path = cleanPath(path); - return new Promise((resolve, reject) => { - const doc = { - path: path, - isFolder: true, - lastModified: new Date(), - folder: pathLib.dirname(path), - }; - MongoStorage.files.findOneAndUpdate({ path: path }, doc, { upsert: true }, (err, updated) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - }); - } - rmDir(path) { - return __awaiter(this, void 0, void 0, function* () { - path = cleanPath(path); - return new Promise((resolve, reject) => { - // const root = pathLib.dirname(path); - const pattern = new RegExp(path + '.*'); - // remove all files inside this folder, any subfolder, including the folder itself - MongoStorage.files.remove({ folder: pattern }, (err, removed) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - }); - } - glob(pattern, path) { - return __awaiter(this, void 0, void 0, function* () { - path = cleanPath(path); - return new Promise((resolve, reject) => { - //convert the glob to a regexp - const regex = globToRegExp(pattern, { globstar: true }); - // make sure the folder contains the root path but can also have other stuff - const pathPattern = new RegExp(path + '.*'); - MongoStorage.files.find({ path: regex, folder: pathPattern }, (err, files) => { - if (err) { - reject(err); - } - else { - // strip off the path, leaving just the filename - resolve(files.map(item => { - return item.path.replace(path, ''); - })); - } - }); - }); - }); - } - copyFile(src, dest) { - return __awaiter(this, void 0, void 0, function* () { - src = cleanPath(src); - dest = cleanPath(dest); - const content = yield this.readFile(src); - return this.writeFile(dest, content); - }); - } - rename(oldPath, newPath) { - return __awaiter(this, void 0, void 0, function* () { - oldPath = cleanPath(oldPath); - newPath = cleanPath(newPath); - return new Promise((resolve, reject) => { - const update = { - path: newPath, - lastModified: new Date(), - folder: pathLib.dirname(newPath), - }; - MongoStorage.files.findOneAndUpdate({ path: oldPath }, update, {}, (err, updated) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - }); - } -} -exports.default = (composer) => __awaiter(void 0, void 0, void 0, function* () { - // pass in the custom storage class that will override the default - yield composer.useStorage(MongoStorage); -}); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Composer/plugins/mongoStorage/lib/index.js.map b/Composer/plugins/mongoStorage/lib/index.js.map deleted file mode 100644 index 03f53c7b2b..0000000000 --- a/Composer/plugins/mongoStorage/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/Composer/plugins/mongoStorage/lib/interface.d.ts b/Composer/plugins/mongoStorage/lib/interface.d.ts deleted file mode 100644 index bbe29fce0d..0000000000 --- a/Composer/plugins/mongoStorage/lib/interface.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export interface StorageConnection { - id: string; - type: 'LocalDisk' | 'AzureBlobStorage'; - path: string; - [key: string]: string; -} -export interface Stat { - isDir: boolean; - isFile: boolean; - lastModified: string; - size: string; -} -export interface MakeDirectoryOptions { - recursive?: boolean; -} -export interface UserIdentity { - [key: string]: any; -} -export interface IFileStorage { - stat(path: string): Promise; - readFile(path: string): Promise; - readDir(path: string): Promise; - exists(path: string): Promise; - writeFile(path: string, content: any): Promise; - removeFile(path: string): Promise; - mkDir(path: string, options?: MakeDirectoryOptions): Promise; - rmDir(path: string): Promise; - glob(pattern: string, path: string): Promise; - copyFile(src: string, dest: string): Promise; - rename(oldPath: string, newPath: string): Promise; -} diff --git a/Composer/plugins/mongoStorage/lib/interface.js b/Composer/plugins/mongoStorage/lib/interface.js deleted file mode 100644 index e3a4630bc8..0000000000 --- a/Composer/plugins/mongoStorage/lib/interface.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/Composer/plugins/mongoStorage/lib/interface.js.map b/Composer/plugins/mongoStorage/lib/interface.js.map deleted file mode 100644 index 0905bdc0d7..0000000000 --- a/Composer/plugins/mongoStorage/lib/interface.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interface.js","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"} \ No newline at end of file diff --git a/Composer/plugins/mongoStorage/lib/packages/server/src/models/storage/interface.d.ts b/Composer/plugins/mongoStorage/lib/packages/server/src/models/storage/interface.d.ts deleted file mode 100644 index 7cda00dd54..0000000000 --- a/Composer/plugins/mongoStorage/lib/packages/server/src/models/storage/interface.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export interface StorageConnection { - id: string; - type: 'LocalDisk' | 'AzureBlobStorage'; - path: string; - [key: string]: string; -} -export interface Stat { - isDir: boolean; - isFile: boolean; - lastModified: string; - size: string; -} -export interface MakeDirectoryOptions { - recursive?: boolean; -} -export interface IFileStorage { - stat(path: string): Promise; - readFile(path: string): Promise; - readDir(path: string): Promise; - exists(path: string): Promise; - writeFile(path: string, content: any): Promise; - removeFile(path: string): Promise; - mkDir(path: string, options?: MakeDirectoryOptions): Promise; - rmDir(path: string): Promise; - glob(pattern: string, path: string): Promise; - copyFile(src: string, dest: string): Promise; - rename(oldPath: string, newPath: string): Promise; -} diff --git a/Composer/plugins/mongoStorage/lib/packages/server/src/models/storage/interface.js b/Composer/plugins/mongoStorage/lib/packages/server/src/models/storage/interface.js deleted file mode 100644 index e3a4630bc8..0000000000 --- a/Composer/plugins/mongoStorage/lib/packages/server/src/models/storage/interface.js +++ /dev/null @@ -1,5 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=interface.js.map \ No newline at end of file diff --git a/Composer/plugins/mongoStorage/lib/packages/server/src/models/storage/interface.js.map b/Composer/plugins/mongoStorage/lib/packages/server/src/models/storage/interface.js.map deleted file mode 100644 index 17c4985928..0000000000 --- a/Composer/plugins/mongoStorage/lib/packages/server/src/models/storage/interface.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../../../../../../packages/server/src/models/storage/interface.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"} \ No newline at end of file diff --git a/Composer/plugins/mongoStorage/lib/plugins/mongoStorage/src/index.d.ts b/Composer/plugins/mongoStorage/lib/plugins/mongoStorage/src/index.d.ts deleted file mode 100644 index e02d3b7877..0000000000 --- a/Composer/plugins/mongoStorage/lib/plugins/mongoStorage/src/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { StorageConnection, IFileStorage, MakeDirectoryOptions } from '../../../packages/server/src/models/storage/interface'; -export declare class MongoStorage implements IFileStorage { - private db; - private files; - constructor(conn: StorageConnection); - stat(path: string): Promise; - readFile(path: string): Promise; - readDir(path: string): Promise; - exists(path: string): Promise; - writeFile(path: string, content: any): Promise; - removeFile(path: string): Promise; - mkDir(path: string, options?: MakeDirectoryOptions): Promise; - rmDir(path: string): Promise; - glob(pattern: string, path: string): Promise; - copyFile(src: string, dest: string): Promise; - rename(oldPath: string, newPath: string): Promise; -} diff --git a/Composer/plugins/mongoStorage/lib/plugins/mongoStorage/src/index.js b/Composer/plugins/mongoStorage/lib/plugins/mongoStorage/src/index.js deleted file mode 100644 index 028f453f12..0000000000 --- a/Composer/plugins/mongoStorage/lib/plugins/mongoStorage/src/index.js +++ /dev/null @@ -1,236 +0,0 @@ -"use strict"; -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const mongoose = require("mongoose"); -const pathLib = require("path"); -const globToRegExp = require("glob-to-regexp"); -const fileSchema = new mongoose.Schema({ - name: { - type: String, - }, - path: { - type: String, - }, - folder: { - type: String, - }, - content: { - type: String, - }, - lastModified: { - type: Date, - }, -}); -// const folderSchema = new mongoose.Schema({ -// name: { -// type: String, -// }, -// path: { -// type: String, -// }, -// }); -class MongoStorage { - // private folders: any; - constructor(conn) { - // connect to Mongo - // TODO: make the connect string and options pull from the connection - conn; - mongoose.connect('mongodb://localhost:27017/composer', {}); - this.db = mongoose.connection; - this.files = mongoose.model('file', fileSchema, 'files'); - // this.folders = mongoose.model('folder', folderSchema, 'folders'); - } - stat(path) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - this.files.findOne({ path: path }, (err, file) => { - if (err) { - reject(err); - } - else if (file) { - resolve({ - isDir: false, - isFile: true, - lastModified: file.lastModified, - size: 1, - }); - } - else if (!file) { - // perhaps this is a folder - this.files.findOne({ folder: path }, (err, file) => { - if (err) { - reject(err); - } - else if (!file) { - reject('path not found'); - } - else { - resolve({ - isDir: true, - isFile: false, - lastModified: file.lastModified, - size: 0, - }); - } - }); - } - }); - }); - }); - } - readFile(path) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - this.files.findOne({ path: path }, (err, file) => { - if (err) { - reject(err); - } - else if (!file) { - reject('File not found'); - } - else { - resolve(file.content); - } - }); - }); - }); - } - readDir(path) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - // find all files where the parent folder matches the specified path - this.files.find({ folder: path }, 'path', {}, (err, files) => { - if (err) { - reject(err); - } - else if (!files) { - reject('Folder not found'); - } - else { - // strip off the path, leaving just the filename - resolve(files.map(item => { - return item.path.replace(path, ''); - })); - } - }); - }); - }); - } - exists(path) { - return __awaiter(this, void 0, void 0, function* () { - try { - // eslint-disable-next-line security/detect-non-literal-fs-filename - yield this.stat(path); - return true; - } - catch (error) { - return false; - } - }); - } - writeFile(path, content) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - const doc = { - path: path, - content: content, - lastModified: new Date(), - folder: pathLib.dirname(path), - }; - this.files.findOneAndUpdate({ path: path }, doc, { upsert: true }, (err, updated) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - }); - } - removeFile(path) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - this.files.deleteOne({ path: path }, (err) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - // await removeFile(path); - }); - } - mkDir(path, options) { - return __awaiter(this, void 0, void 0, function* () { - // await mkDir(path, options); - // noop required - there are no real folders, this is just part of the file records - }); - } - rmDir(path) { - return __awaiter(this, void 0, void 0, function* () { - // await rmDir(path); - // noop required - there are no real folders, this is just part of the file records - }); - } - glob(pattern, path) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - //convert the glob to a regexp - let regex = globToRegExp(pattern, { globstar: true }); - // make sure the folder contains the root path but can also have other stuff - let pathPattern = new RegExp(path + '.*'); - this.files.find({ path: regex, folder: pathPattern }, (err, files) => { - if (err) { - reject(err); - } - else { - // strip off the path, leaving just the filename - resolve(files.map(item => { - return item.path.replace(path, ''); - })); - } - }); - }); - }); - } - copyFile(src, dest) { - return __awaiter(this, void 0, void 0, function* () { - let content = yield this.readFile(src); - return this.writeFile(dest, content); - }); - } - rename(oldPath, newPath) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - const update = { - path: newPath, - lastModified: new Date(), - folder: pathLib.dirname(newPath), - }; - this.files.findOneAndUpdate({ path: oldPath }, update, {}, (err, updated) => { - if (err) { - reject(err); - } - else { - resolve(); - } - }); - }); - }); - } -} -exports.MongoStorage = MongoStorage; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/Composer/plugins/mongoStorage/lib/plugins/mongoStorage/src/index.js.map b/Composer/plugins/mongoStorage/lib/plugins/mongoStorage/src/index.js.map deleted file mode 100644 index 48246504e0..0000000000 --- a/Composer/plugins/mongoStorage/lib/plugins/mongoStorage/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;;AAElC,qCAAqC;AACrC,gCAAgC;AAChC,+CAA+C;AAI/C,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;KACb;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;KACb;IACD,MAAM,EAAE;QACN,IAAI,EAAE,MAAM;KACb;IACD,OAAO,EAAE;QACP,IAAI,EAAE,MAAM;KACb;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,IAAI;KACX;CACF,CAAC,CAAC;AAEH,6CAA6C;AAC7C,YAAY;AACZ,oBAAoB;AACpB,OAAO;AACP,YAAY;AACZ,oBAAoB;AACpB,OAAO;AACP,MAAM;AAEN,MAAa,YAAY;IAGvB,wBAAwB;IAExB,YAAY,IAAuB;QACjC,mBAAmB;QACnB,qEAAqE;QACrE,IAAI,CAAC;QAEL,QAAQ,CAAC,OAAO,CAAC,oCAAoC,EAAE,EAAE,CAAC,CAAC;QAC3D,IAAI,CAAC,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC;QAE9B,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QACzD,oEAAoE;IACtE,CAAC;IAEK,IAAI,CAAC,IAAY;;YACrB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;oBAC/C,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM,IAAI,IAAI,EAAE;wBACf,OAAO,CAAC;4BACN,KAAK,EAAE,KAAK;4BACZ,MAAM,EAAE,IAAI;4BACZ,YAAY,EAAE,IAAI,CAAC,YAAY;4BAC/B,IAAI,EAAE,CAAC;yBACR,CAAC,CAAC;qBACJ;yBAAM,IAAI,CAAC,IAAI,EAAE;wBAChB,2BAA2B;wBAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;4BACjD,IAAI,GAAG,EAAE;gCACP,MAAM,CAAC,GAAG,CAAC,CAAC;6BACb;iCAAM,IAAI,CAAC,IAAI,EAAE;gCAChB,MAAM,CAAC,gBAAgB,CAAC,CAAC;6BAC1B;iCAAM;gCACL,OAAO,CAAC;oCACN,KAAK,EAAE,IAAI;oCACX,MAAM,EAAE,KAAK;oCACb,YAAY,EAAE,IAAI,CAAC,YAAY;oCAC/B,IAAI,EAAE,CAAC;iCACR,CAAC,CAAC;6BACJ;wBACH,CAAC,CAAC,CAAC;qBACJ;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,QAAQ,CAAC,IAAY;;YACzB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;oBAC/C,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM,IAAI,CAAC,IAAI,EAAE;wBAChB,MAAM,CAAC,gBAAgB,CAAC,CAAC;qBAC1B;yBAAM;wBACL,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;qBACvB;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,OAAO,CAAC,IAAY;;YACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,oEAAoE;gBACpE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;oBAC3D,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM,IAAI,CAAC,KAAK,EAAE;wBACjB,MAAM,CAAC,kBAAkB,CAAC,CAAC;qBAC5B;yBAAM;wBACL,gDAAgD;wBAChD,OAAO,CACL,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;4BACf,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;wBACrC,CAAC,CAAC,CACH,CAAC;qBACH;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,MAAM,CAAC,IAAY;;YACvB,IAAI;gBACF,mEAAmE;gBACnE,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtB,OAAO,IAAI,CAAC;aACb;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,KAAK,CAAC;aACd;QACH,CAAC;KAAA;IAEK,SAAS,CAAC,IAAY,EAAE,OAAY;;YACxC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,MAAM,GAAG,GAAG;oBACV,IAAI,EAAE,IAAI;oBACV,OAAO,EAAE,OAAO;oBAChB,YAAY,EAAE,IAAI,IAAI,EAAE;oBACxB,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;iBAC9B,CAAC;gBAEF,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;oBAClF,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM;wBACL,OAAO,EAAE,CAAC;qBACX;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,UAAU,CAAC,IAAY;;YAC3B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE;oBAC3C,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM;wBACL,OAAO,EAAE,CAAC;qBACX;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YACH,0BAA0B;QAC5B,CAAC;KAAA;IAEK,KAAK,CAAC,IAAY,EAAE,OAA8B;;YACtD,8BAA8B;YAC9B,mFAAmF;QACrF,CAAC;KAAA;IAEK,KAAK,CAAC,IAAY;;YACtB,qBAAqB;YACrB,mFAAmF;QACrF,CAAC;KAAA;IAEK,IAAI,CAAC,OAAe,EAAE,IAAY;;YACtC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,8BAA8B;gBAC9B,IAAI,KAAK,GAAG,YAAY,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;gBAEpD,4EAA4E;gBAC5E,IAAI,WAAW,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;gBAC1C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAC,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;oBAClE,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM;wBACL,gDAAgD;wBAChD,OAAO,CACL,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;4BACf,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;wBACrC,CAAC,CAAC,CACH,CAAC;qBACH;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAEK,QAAQ,CAAC,GAAW,EAAE,IAAY;;YACtC,IAAI,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACvC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACvC,CAAC;KAAA;IAEK,MAAM,CAAC,OAAe,EAAE,OAAe;;YAC3C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,MAAM,MAAM,GAAG;oBACb,IAAI,EAAE,OAAO;oBACb,YAAY,EAAE,IAAI,IAAI,EAAE;oBACxB,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;iBACjC,CAAC;gBAEF,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;oBAC1E,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAC;qBACb;yBAAM;wBACL,OAAO,EAAE,CAAC;qBACX;gBACH,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AApLD,oCAoLC"} \ No newline at end of file diff --git a/Composer/scripts/compileExtensions.js b/Composer/scripts/compileExtensions.js new file mode 100644 index 0000000000..43dc9f9043 --- /dev/null +++ b/Composer/scripts/compileExtensions.js @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +/* eslint-disable @typescript-eslint/no-var-requires */ +/* eslint-disable no-console */ +/* eslint-disable security/detect-non-literal-fs-filename */ + +const fs = require('fs'); +const path = require('path'); +// eslint-disable-next-line security/detect-child-process +const { execSync } = require('child_process'); + +const glob = require('globby'); + +const extensionsDir = path.resolve(__dirname, '../../extensions'); +const buildCachePath = path.resolve(extensionsDir, '.build-cache.json'); + +console.log('Compiling extensions in %s', extensionsDir); + +const allExtensions = fs.readdirSync(extensionsDir, { withFileTypes: true }); + +const checkComposerLibs = () => { + const libsToCheck = ['types', 'extension', 'extension-client', 'lib/shared']; + + for (const libName of libsToCheck) { + const libPath = path.resolve(__dirname, '../packages/', libName, 'lib/index.js'); + if (!fs.existsSync(libPath)) { + console.error('Composer libraries have not yet been compiled. Run `yarn build:libs` first.'); + process.exit(1); + } + } +}; + +let buildCache = (() => { + if (fs.existsSync(buildCachePath)) { + try { + return JSON.parse(fs.readFileSync(buildCachePath)); + } catch (_) { + return {}; + } + } else { + return {}; + } +})(); + +const getLastModified = (files = []) => { + let last = new Date(0); + + for (const f of files) { + // returns last modified date of file in ISO 8601 format + const gitTimestamp = execSync(`git log -1 --pretty="%cI" ${f}`).toString().trim(); + const timestamp = new Date(gitTimestamp); + if (timestamp > last) { + last = timestamp; + } + } + + return last; +}; + +const writeToCache = (name, lastModified) => { + buildCache = { + ...buildCache, + [name]: lastModified, + }; + fs.writeFileSync(buildCachePath, JSON.stringify(buildCache, null, 2)); +}; + +const shouldCompile = (name, lastModified) => { + return buildCache[name] ? new Date(buildCache[name]) < lastModified : true; +}; + +const compile = (name, extPath) => { + const packageJSON = JSON.parse(fs.readFileSync(path.join(extPath, 'package.json'))); + const hasBuild = packageJSON && packageJSON.scripts && packageJSON.scripts.build; + + console.log('[%s] compiling', name); + console.log('[%s] yarn --force', name); + execSync('yarn --force --frozen-lockfile', { cwd: extPath, stdio: 'inherit' }); + + if (hasBuild) { + console.log('[%s] yarn build', name); + execSync('yarn build', { cwd: extPath, stdio: 'inherit' }); + } else { + console.log('[%s] no build script found.', name); + } +}; + +checkComposerLibs(); + +for (const entry of allExtensions) { + if (entry.isDirectory()) { + const dir = path.join(extensionsDir, entry.name); + const allFiles = glob + .sync('**/*', { cwd: dir, gitignore: true, ignore: ['node_modules', 'lib', 'dist'] }) + .map((f) => path.join(dir, f)); + const lastModified = getLastModified(allFiles); + if (shouldCompile(entry.name, lastModified)) { + try { + compile(entry.name, dir); + writeToCache(entry.name, lastModified); + } catch (err) { + console.error(err); + } + } + } +} diff --git a/MyBots/.gitkeep b/MyBots/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/README.md b/README.md index 3f2e254254..d8fccb441a 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ The Bot Framework Composer is an open source tool based on the Bot Framework SDK - [Create your first bot][3]! - To find the most recent release and learn what has changed in Bot Framework Composer, see the [latest release][204]. - ## Build Composer Locally To build and run the Composer project locally as a web application, clone the source code from Github and build the application using the instructions below. @@ -44,12 +43,11 @@ $ yarn build // build extensions and libs $ yarn startall // start client and server at the same time ``` -## Extend Composer with Plugins - -Many aspects of Composer's functionality can be customized and extended through plugins. Features such as authentication, storage, publishing and even the samples and templates available on the homescreen can be customized by creating new plugins. +## Extend Composer with Extensions -[Read more about building Composer plugins →](Composer/plugins/README.md) +Many aspects of Composer's functionality can be customized and extended through extensions. Features such as authentication, storage, publishing and even the samples and templates available on the homescreen can be customized by creating new extensions. +[Read more about building Composer extensions →](extensions/README.md) ## Support and Feedback diff --git a/docker-compose.yml b/docker-compose.yml index 6564f92d6c..1acc16531d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: - ~/Documents/Composer:/Bots - ./runtime:/runtime - ./.appdata:/appdata - - ./Composer/plugins/localPublish/hostedBots:/app/Composer/plugins/localPublish/hostedBots + - ./extensions/localPublish/hostedBots:/app/extensions/localPublish/hostedBots environment: COMPOSER_BOTS_FOLDER: /Bots COMPOSER_RUNTIME_FOLDER: /runtime diff --git a/extensions/.gitignore b/extensions/.gitignore new file mode 100644 index 0000000000..00531d5f76 --- /dev/null +++ b/extensions/.gitignore @@ -0,0 +1,4 @@ +.build-cache.json +**/lib +**/dist +**/node_modules diff --git a/Composer/plugins/README.md b/extensions/README.md similarity index 58% rename from Composer/plugins/README.md rename to extensions/README.md index ad6843a6f0..9587373b92 100644 --- a/Composer/plugins/README.md +++ b/extensions/README.md @@ -1,98 +1,98 @@ -# Bot Framework Composer Plugins +# Bot Framework Composer Extensions -It is possible to extend and customize the behavior of Composer by installing plugins. -Plugins can hook into the internal mechanisms of Composer and change they way they operate. -Plugins can also "listen to" the activity inside Composer and react to it. +It is possible to extend and customize the behavior of Composer by installing extensions. +Extensions can hook into the internal mechanisms of Composer and change they way they operate. +Extensions can also "listen to" the activity inside Composer and react to it. -## What is a Composer plugin? +## What is a Composer extension? -Composer plugins are Javascript modules. When loaded into Composer, the module is given access -to a set of Composer APIs which can then be used by the plugin to provide new functionality to the application. -Plugins do not have access to the entire Composer application - in fact, they are granted limited access +Composer extensions are Javascript modules. When loaded into Composer, the module is given access +to a set of Composer APIs which can then be used by the extension to provide new functionality to the application. +Extensions do not have access to the entire Composer application - in fact, they are granted limited access to specific areas of the application, and must adhere to a set of interfaces and protocols. -## Plugin Endpoints +## Extension Endpoints -Plugins currently have access to the following functional areas: - -* Authentication and identity - plugins can provide a mechanism to gate access to the application, as well as mechanisms used to provide user identity. -* Storage - plugins can override the built in filesystem storage with a new way to read, write and access bot projects. -* Web server - plugins can add additional web routes to Composer's web server instance. -* Publishing - plugins can add publishing mechanisms -* Runtime Templates - plugins can provide a runtime template used when "ejecting" from Composer -* Bot Project Templates - plugins can add items to the template list shown in the "new bot" flow -* Boilerplate Content - plugins can provide content copied into all bot projects (such as a readme file or helper scripts) +Extensions currently have access to the following functional areas: +- Authentication and identity - extensions can provide a mechanism to gate access to the application, as well as mechanisms used to provide user identity. +- Storage - extensions can override the built in filesystem storage with a new way to read, write and access bot projects. +- Web server - extensions can add additional web routes to Composer's web server instance. +- Publishing - extensions can add publishing mechanisms +- Runtime Templates - extensions can provide a runtime template used when "ejecting" from Composer +- Bot Project Templates - extensions can add items to the template list shown in the "new bot" flow +- Boilerplate Content - extensions can provide content copied into all bot projects (such as a readme file or helper scripts) Combining these endpoints, it is possible to achieve scenarios such as: -* Store content in a database -* Require login via AAD or any other oauth provider -* Create a custom login screen -* Require login via Github, and use Github credentials to store content in a Git repo automatically -* Use AAD roles to gate access to content -* Publish content to external services such as remote runtimes, content repositories, testing systems, etc. +- Store content in a database +- Require login via AAD or any other oauth provider +- Create a custom login screen +- Require login via Github, and use Github credentials to store content in a Git repo automatically +- Use AAD roles to gate access to content +- Publish content to external services such as remote runtimes, content repositories, testing systems, etc. + +## How to build an extension + +Extension modules must come in one of the following forms: -## How to build a plugin +- Default export is a function that accepts the Composer extension API +- Default export is an object that includes an `initialize` function that accepts the Composer extension API +- A function called `initialize` is exported from the module -Plugin modules must come in one of the following forms: -* Default export is a function that accepts the Composer plugin API -* Default export is an object that includes an `initialize` function that accepts the Composer plugin API -* A function called `initialize` is exported from the module +Currently, extensions can be loaded into Composer using 1 of 2 methods: -Currently, plugins can be loaded into Composer using 1 of 2 methods: -* The plugin is placed in the /plugins/ folder -* The plugin is loaded directly via changes to Composer code, using `ExtensionContext.loadPlugin(name, plugin)` +- The extension is placed in the /extensions/ folder +- The extension is loaded directly via changes to Composer code, using `ExtensionContext.loadPlugin(name, extension)` -The simplest form of a plugin module is below: +The simplest form of a extension module is below: ```ts export default async (composer: any): Promise => { - // call methods (see below) on the composer API // composer.useStorage(...); // composer.usePassportStrategy(...); // composer.addWebRoute(...) - -} +}; ``` ### Authentication and identity To provide auth and identity services, Composer has in large part adopted [PassportJS](http://www.passportjs.org) instead of implementing a custom solution. -Plugins can use one of the [many existing Passport strategies](http://www.passportjs.org/packages/), or provide a custom strategy. +Extensions can use one of the [many existing Passport strategies](http://www.passportjs.org/packages/), or provide a custom strategy. #### `composer.usePassportStrategy(strategy)` Configure a Passport strategy to be used by Composer. This is the equivalent of calling `app.use(passportStrategy)` on an Express app. [See PassportJS docs](http://www.passportjs.org/docs/configure/). -In addition to configuring the strategy, plugins will also need to use `composer.addWebRoute` to expose login, logout and other related routes to the browser. +In addition to configuring the strategy, extensions will also need to use `composer.addWebRoute` to expose login, logout and other related routes to the browser. -Calling this method also enables a basic auth middleware that is responsible for gating access to URLs, as well as a simple user serializer/deserializer. Developers may choose to override these components using the methods below. +Calling this method also enables a basic auth middleware that is responsible for gating access to URLs, as well as a simple user serializer/deserializer. Developers may choose to override these components using the methods below. #### `composer.useAuthMiddleware(middleware)` Provide a custom middleware for testing the authentication status of a user. This will override the built-in auth middleware that is enabled by default when calling `usePassportStrategy()`. Developers may choose to override this middleware for various reasons, such as: -* Apply different access rules based on URL -* Do something more than check `req.isAuthenticated` such as validate or refresh tokens, make database calls, provide telemetry, etc + +- Apply different access rules based on URL +- Do something more than check `req.isAuthenticated` such as validate or refresh tokens, make database calls, provide telemetry, etc #### `composer.useUserSerializers(serialize, deserialize)` Provide custom serialize and deserialize functions for storing and retrieving the user profile and identity information in the Composer session. -By default, the entire user profile is serialized to JSON and stored in the session. If this is not desirable, plugins should override these methods and provide alternate methods. +By default, the entire user profile is serialized to JSON and stored in the session. If this is not desirable, extensions should override these methods and provide alternate methods. For example, the below code demonstrates storing only the user ID in the session during serialization, and the use of a database to load the full profile out of a database using that id during deserialization. ```ts -const serializeUser = function(user, done) { +const serializeUser = function (user, done) { done(null, user.id); }; -const deserializeUser = function(id, done) { - User.findById(id, function(err, user) { +const deserializeUser = function (id, done) { + User.findById(id, function (err, user) { done(err, user); }); }; @@ -106,19 +106,19 @@ Allow access to `url` without authentication. `url` can be an express-style rout This is primarily for use with authentication-related URLs. While `/login` is allowed by default, any other URL involved in auth needs to be whitelisted. -For example, when using oauth, there is a secondary URL for receiving the auth callback. This has to be whitelisted, otherwise access will be denied to the callback URL and it will fail. +For example, when using oauth, there is a secondary URL for receiving the auth callback. This has to be whitelisted, otherwise access will be denied to the callback URL and it will fail. ```ts // define a callback url -composer.addWebRoute('get','/oauth/callback', someFunction); +composer.addWebRoute("get", "/oauth/callback", someFunction); // whitelist the callback -composer.addAllowedUrl('/oauth/callback'); +composer.addAllowedUrl("/oauth/callback"); ``` #### `plugLoader.loginUri` -This value is used by the built-in authentication middleware to redirect the user to the login page. By default, it is set to '/login' but it can be reset by changing this member value. +This value is used by the built-in authentication middleware to redirect the user to the login page. By default, it is set to '/login' but it can be reset by changing this member value. Note that if you specify an alternate URI for the login page, you must use `addAllowedUrl` to whitelist it. @@ -131,18 +131,15 @@ For example: ```ts const RequestHandlerX = async (req, res) => { - const user = await ExtensionContext.getUserFromRequest(req); // ... do some stuff - }; ``` - ### Storage -By default, Composer reads and writes assets to the local filesystem. Plugins may override this behavior by providing a custom implementation of the `IFileStorage` interface. [See interface definition here](https://github.com/microsoft/BotFramework-Composer/blob/stable/Composer/packages/server/src/models/storage/interface.ts) +By default, Composer reads and writes assets to the local filesystem. Extensions may override this behavior by providing a custom implementation of the `IFileStorage` interface. [See interface definition here](https://github.com/microsoft/BotFramework-Composer/blob/stable/Composer/packages/server/src/models/storage/interface.ts) Though this interface is modeled after a filesystem interaction, the implementation of these methods does not require using the filesystem, or a direct implementation of folder and path structure. However, the implementation must respect that structure and respond in the expected ways -- ie, the `glob` method must treat path patterns the same way the filesystem glob would. @@ -150,17 +147,17 @@ Though this interface is modeled after a filesystem interaction, the implementat Provide an iFileStorage-compatible class to Composer. -The constructor of the class will receive 2 parameters: a StorageConnection configuration, pulled from Composer's global configuration (currently data.json), and a user identity object, as provided by any configured authentication plugin. +The constructor of the class will receive 2 parameters: a StorageConnection configuration, pulled from Composer's global configuration (currently data.json), and a user identity object, as provided by any configured authentication extension. -The current behavior of Composer is to instantiate a new instance of the storage accessor class each time it is used. As a result, caution must be taken not to undertake expensive operations each time. For example, if a database connection is required, the connection might be implemented as a static member of the class, inside the plugin's init code and made accessible within the plugin module's scope. +The current behavior of Composer is to instantiate a new instance of the storage accessor class each time it is used. As a result, caution must be taken not to undertake expensive operations each time. For example, if a database connection is required, the connection might be implemented as a static member of the class, inside the extension's init code and made accessible within the extension module's scope. -The user identity provided by a configured authentication plugin can be used for purposes such as: +The user identity provided by a configured authentication extension can be used for purposes such as: -* provide a personalized view of the content -* gate access to content based on identity -* create an audit log of changes +- provide a personalized view of the content +- gate access to content based on identity +- create an audit log of changes -If an authentication plugin is not configured, or the user is not logged in, the user identity will be `undefined`. +If an authentication extension is not configured, or the user is not logged in, the user identity will be `undefined`. The class is expected to be in the form: @@ -176,7 +173,7 @@ class CustomStorage implements IFileStorage { ### Web Server -Plugins can add routes and middlewares to the Express instance. +Extensions can add routes and middlewares to the Express instance. These routes are responsible for providing all necessary dependent assets such as browser javascript, css, etc. @@ -196,18 +193,23 @@ For example: ```ts // simple route -composer.addWebRoute('get', '/hello', (req, res) => { - res.send('HELLO WORLD!'); +composer.addWebRoute("get", "/hello", (req, res) => { + res.send("HELLO WORLD!"); }); // route with custom middleware -composer.addWebRoute('get', '/logout', (req, res, next) => { - console.warn('user is logging out!'); +composer.addWebRoute( + "get", + "/logout", + (req, res, next) => { + console.warn("user is logging out!"); next(); - },(req, res) => { + }, + (req, res) => { req.logout(); - res.redirect('/login'); -}); + res.redirect("/login"); + } +); ``` #### `composer.addWebMiddleware(middleware)` @@ -216,40 +218,46 @@ Bind an additional custom middleware to the web server. Middleware applied this Signature for middleware is `(req, res, next) => {}` -For middleware dealing with authentication, plugins must use `useAuthMiddleware()` as otherwise the built-in auth middleware will still be in place. +For middleware dealing with authentication, extensions must use `useAuthMiddleware()` as otherwise the built-in auth middleware will still be in place. ### Publishing #### `composer.addPublishMethod(publishMechanism, schema, instructions)` By default, the publish method will use the name and description from the package.json file. However, you may provide a customized name: + ```ts -composer.addPublishMethod(publishMechanism, schema, instructions, customDisplayName, customDisplayDescription); +composer.addPublishMethod( + publishMechanism, + schema, + instructions, + customDisplayName, + customDisplayDescription +); ``` Provide a new mechanism by which a bot project is transferred from Composer to some external service. The mechanisms can use whatever method necessary to process and transmit the bot project to the desired external service, though it must use a standard signature for the methods. -In most cases, the plugin itself does NOT include the configuration information required to communicate with the external service. Configuration is provided by the Composer application at invocation time. +In most cases, the extension itself does NOT include the configuration information required to communicate with the external service. Configuration is provided by the Composer application at invocation time. -Once registered as an available method, users can configure specific target instances of that method on a per-bot basis. For example, a user may install a "Publish to PVA" plugin, which implements the necessary protocols for publishing to PVA. Then, in order to actually perform a publish, they would configure an instance of this mechanism, "Publish to HR Bot Production Slot" that includes the necessary configuration information. +Once registered as an available method, users can configure specific target instances of that method on a per-bot basis. For example, a user may install a "Publish to PVA" extension, which implements the necessary protocols for publishing to PVA. Then, in order to actually perform a publish, they would configure an instance of this mechanism, "Publish to HR Bot Production Slot" that includes the necessary configuration information. -Publishing plugins support the following features: +Publishing extensions support the following features: -* publish - given a bot project, publish it. Required. -* getStatus - get the status of the most recent publish. Optional. -* getHistory - get a list of historical publish actions. Optional. -* rollback - roll back to a previous publish (as provided by getHistory). Optional. +- publish - given a bot project, publish it. Required. +- getStatus - get the status of the most recent publish. Optional. +- getHistory - get a list of historical publish actions. Optional. +- rollback - roll back to a previous publish (as provided by getHistory). Optional. ##### publish(config, project, metadata, user) -This method is responsible for publishing the `project` using the provided `config` using whatever method the plugin is implementing - for example, publish to Azure. This method is *required* for all publishing plugins. +This method is responsible for publishing the `project` using the provided `config` using whatever method the extension is implementing - for example, publish to Azure. This method is _required_ for all publishing extensions. In order to publish a project, this method must perform any necessary actions such as: -* The LUIS lubuild process -* Calling the appropriate runtime `buildDeploy` method -* Doing the actual deploy operation - +- The LUIS lubuild process +- Calling the appropriate runtime `buildDeploy` method +- Doing the actual deploy operation **Parameters:** | Parameter | Description @@ -257,7 +265,7 @@ In order to publish a project, this method must perform any necessary actions su | config | an object containing information from the publishing profile, as well as the bot's settings -- see below | project | an object representing the bot project | metadata | any comment passed by the user during publishing -| user | a user object if one has been provided by an authentication plugin +| user | a user object if one has been provided by an authentication extension Config will include: @@ -274,6 +282,7 @@ Config will include: ``` The project will include: + ```ts { id: 'bot id', @@ -286,9 +295,9 @@ The project will include: ``` Below is an simplified implementation of this process: -```ts -const publish = async(config, project, metadata, user) => { +```ts +const publish = async (config, project, metadata, user) => { const { fullSettings, profileName } = config; // Prepare a copy of the project to build @@ -298,22 +307,21 @@ const publish = async(config, project, metadata, user) => { // Run the runtime.buildDeploy process // Now do the final actual deploy somehow... - -} +}; ``` ##### getStatus(config, project, user) -This method is used to check for the status of the most recent publish of `project` to a given publishing profile defined by the `config` field. This method is *required* for all publishing plugins. +This method is used to check for the status of the most recent publish of `project` to a given publishing profile defined by the `config` field. This method is _required_ for all publishing extensions. This endpoint uses a subset of HTTP status codes to report the status of the deploy: -| Status | Meaning -|-- |-- -| 200 | Publish completed successfully -| 202 | Publish is underway -| 404 | No publish found -| 500 | Publish failed +| Status | Meaning | +| ------ | ------------------------------ | +| 200 | Publish completed successfully | +| 202 | Publish is underway | +| 404 | No publish found | +| 500 | Publish failed | `config` will be in the form below. `config.profileName` can be used to identify the publishing profile being queried. @@ -341,7 +349,7 @@ Should return an object in the form: ##### getHistory(config, project, user) -This method is used to request a history of publish actions from a given `project` to a given publishing profile defined by the `config` field. This is an *optional* feature - publishing plugins may exclude this functionality if it is not supported. +This method is used to request a history of publish actions from a given `project` to a given publishing profile defined by the `config` field. This is an _optional_ feature - publishing extensions may exclude this functionality if it is not supported. `config` will be in the form below. `config.profileName` can be used to identify the publishing profile being queried. @@ -355,20 +363,22 @@ This method is used to request a history of publish actions from a given `projec Should return in array containing recent publish actions along with their status and log output. ```ts -[{ - status: [200|202|404|500], - result: { - message: 'Status message to be displayed in publishing UI', - log: 'any log output from the process so far', - comment: 'the user specified comment associated with the publish', - id: 'a unique identifier of this published version', - } -}] +[ + { + status: [200 | 202 | 404 | 500], + result: { + message: "Status message to be displayed in publishing UI", + log: "any log output from the process so far", + comment: "the user specified comment associated with the publish", + id: "a unique identifier of this published version", + }, + }, +]; ``` ##### rollback(config, project, rollbackToVersion, user) -This method is used to request a rollback _in the deployed environment_ to a previously published version. This DOES NOT affect the local version of the project. This is an *optional* feature - publishing plugins may exclude this functionality if it is not supported. +This method is used to request a rollback _in the deployed environment_ to a previously published version. This DOES NOT affect the local version of the project. This is an _optional_ feature - publishing extensions may exclude this functionality if it is not supported. `config` will be in the form below. `config.profileName` can be used to identify the publishing profile being queried. @@ -402,19 +412,19 @@ Rollback should respond using the same format as `publish` or `getStatus` and sh Expose a runtime template to the Composer UI. Registered templates will become available in the "Runtime settings" tab. When selected, the full content of the `path` will be copied into the project's `runtime` folder. Then, when a user clicks -`Start Bot`, the `startCommand` will be executed. The expected result is that a bot application launches and is made available +`Start Bot`, the `startCommand` will be executed. The expected result is that a bot application launches and is made available to communicate with the Bot Framework Emulator. ```ts await composer.addRuntimeTemplate({ - key: 'myUniqueKey', - name: 'My Runtime', - path: __dirname + '/path/to/runtime/template/code', - startCommand: 'dotnet run', - build: async(runtimePath, project) => { + key: "myUniqueKey", + name: "My Runtime", + path: __dirname + "/path/to/runtime/template/code", + startCommand: "dotnet run", + build: async (runtimePath, project) => { // implement necessary actions that must happen before project can be run }, - buildDeploy: async(runtimePath, project, settings, publishProfileName) => { + buildDeploy: async (runtimePath, project, settings, publishProfileName) => { // implement necessary actions that must happen before project can be deployed to azure return pathToBuildArtifacts; @@ -424,25 +434,24 @@ await composer.addRuntimeTemplate({ ##### build(runtimePath, project) -Perform any necessary steps required before the runtime can be executed from inside Composer when a user clicks the "Start Bot" button. Note this method *should not* actually start the runtime directly - only perform the build steps. +Perform any necessary steps required before the runtime can be executed from inside Composer when a user clicks the "Start Bot" button. Note this method _should not_ actually start the runtime directly - only perform the build steps. For example, this would be used to call `dotnet build` in the runtime folder in order to build the application. ##### buildDeploy (runtimePath, project, settings, publishProfileName) -| parameter | description -|-- |-- -| runtimePath | the path to the runtime that needs to be built -| project | a bot project record -| settings | a full set of settings to be used by the built runtime -| publishProfileName | the name of the publishing profile that is the target of this build +| parameter | description | +| ------------------ | ------------------------------------------------------------------- | +| runtimePath | the path to the runtime that needs to be built | +| project | a bot project record | +| settings | a full set of settings to be used by the built runtime | +| publishProfileName | the name of the publishing profile that is the target of this build | Perform any necessary steps required to prepare the runtime code to be deployed. This method should return a path to the build artifacts with the expectation that the publisher can perform a deploy of those artifacts "as is" and have them run successfully. To do this it should: -* Perform any necessary build steps -* Install dependencies -* Write `settings` to the appropriate location and format - +- Perform any necessary build steps +- Install dependencies +- Write `settings` to the appropriate location and format #### `composer.getRuntimeByProject(project)` @@ -461,12 +470,12 @@ await runtime.build(project.dataDir, project); Get a runtime template by its key. ```ts -const dotnetRuntime = composer.getRuntime('csharp-azurewebapp'); +const dotnetRuntime = composer.getRuntime("csharp-azurewebapp"); ``` ### Bot Project Templates -Add a project template to the list available during the bot creation process. Plugins can bundle arbitrary bundle of content that will be copied into the bot project at create time. The template should contain a functioning bot project, along with any specializations and configuration defaults required to successfully run the project. +Add a project template to the list available during the bot creation process. Extensions can bundle arbitrary bundle of content that will be copied into the bot project at create time. The template should contain a functioning bot project, along with any specializations and configuration defaults required to successfully run the project. #### `composer.addBotTemplate(template)` @@ -479,7 +488,7 @@ await composer.addBotTemplate({ }); ``` -In addition, boilerplate material will also be added to every new bot project. Plugins can bundle additional content that will be copied into every project, regardless of which template is used. +In addition, boilerplate material will also be added to every new bot project. Extensions can bundle additional content that will be copied into every project, regardless of which template is used. #### `composer.addBaseTemplate(template)` @@ -492,20 +501,18 @@ await composer.addBaseTemplate({ }); ``` - ### Accessors `composer.passport` `composer.name` -## Plugin Roadmap +## Extension Roadmap These features are not currently implemented, but are planned for the near future: -* Eventing - plugins will be able to emit events as well as respond to events emitted by other plugins and by Composer core. - -* Front-end plugins - plugins will be able to provide React components that are inserted into the React application at various endpoints. +- Eventing - extensions will be able to emit events as well as respond to events emitted by other extensions and by Composer core. -* Schema extensions - Plugins will be able to amend or update the schema. +- Front-end extensions - extensions will be able to provide React components that are inserted into the React application at various endpoints. +- Schema extensions - Extensions will be able to amend or update the schema. diff --git a/Composer/plugins/authTest/index.js b/extensions/authTest/index.js similarity index 100% rename from Composer/plugins/authTest/index.js rename to extensions/authTest/index.js diff --git a/Composer/plugins/authTest/package-lock.json b/extensions/authTest/package-lock.json similarity index 100% rename from Composer/plugins/authTest/package-lock.json rename to extensions/authTest/package-lock.json diff --git a/Composer/plugins/authTest/package.json b/extensions/authTest/package.json similarity index 100% rename from Composer/plugins/authTest/package.json rename to extensions/authTest/package.json diff --git a/Composer/plugins/azurePublish/.gitignore b/extensions/azurePublish/.gitignore similarity index 100% rename from Composer/plugins/azurePublish/.gitignore rename to extensions/azurePublish/.gitignore diff --git a/Composer/plugins/azurePublish/.npmrc b/extensions/azurePublish/.npmrc similarity index 100% rename from Composer/plugins/azurePublish/.npmrc rename to extensions/azurePublish/.npmrc diff --git a/Composer/plugins/azurePublish/package.json b/extensions/azurePublish/package.json similarity index 87% rename from Composer/plugins/azurePublish/package.json rename to extensions/azurePublish/package.json index 4b617b6d7f..74b120b997 100644 --- a/Composer/plugins/azurePublish/package.json +++ b/extensions/azurePublish/package.json @@ -18,11 +18,11 @@ "@azure/graph": "5.0.1", "@azure/ms-rest-browserauth": "0.1.4", "@azure/ms-rest-nodeauth": "3.0.3", - "@bfc/extension": "../../packages/extension", - "@bfc/indexers": "../../packages/lib/indexers", - "@bfc/shared": "../../packages/lib/shared", - "@microsoft/bf-lu": "^4.11.0-dev.20201013.7ccb128", + "@bfc/extension": "../../Composer/packages/extension", + "@bfc/indexers": "../../Composer/packages/lib/indexers", + "@bfc/shared": "../../Composer/packages/lib/shared", "@botframework-composer/types": "0.0.1", + "@microsoft/bf-lu": "^4.11.0-dev.20201013.7ccb128", "@microsoft/bf-luis-cli": "^4.10.0-dev.20200721.8bb21ac", "@types/archiver": "3.1.0", "@types/fs-extra": "8.1.0", diff --git a/Composer/plugins/azurePublish/src/botProjectDeployConfig.ts b/extensions/azurePublish/src/botProjectDeployConfig.ts similarity index 100% rename from Composer/plugins/azurePublish/src/botProjectDeployConfig.ts rename to extensions/azurePublish/src/botProjectDeployConfig.ts diff --git a/Composer/plugins/azurePublish/src/botProjectLoggerType.ts b/extensions/azurePublish/src/botProjectLoggerType.ts similarity index 100% rename from Composer/plugins/azurePublish/src/botProjectLoggerType.ts rename to extensions/azurePublish/src/botProjectLoggerType.ts diff --git a/Composer/plugins/azurePublish/src/botProjectRuntimeType.ts b/extensions/azurePublish/src/botProjectRuntimeType.ts similarity index 100% rename from Composer/plugins/azurePublish/src/botProjectRuntimeType.ts rename to extensions/azurePublish/src/botProjectRuntimeType.ts diff --git a/Composer/plugins/azurePublish/src/deploy.ts b/extensions/azurePublish/src/deploy.ts similarity index 100% rename from Composer/plugins/azurePublish/src/deploy.ts rename to extensions/azurePublish/src/deploy.ts diff --git a/Composer/plugins/azurePublish/src/index.ts b/extensions/azurePublish/src/index.ts similarity index 100% rename from Composer/plugins/azurePublish/src/index.ts rename to extensions/azurePublish/src/index.ts diff --git a/Composer/plugins/azurePublish/src/luisAndQnA.ts b/extensions/azurePublish/src/luisAndQnA.ts similarity index 100% rename from Composer/plugins/azurePublish/src/luisAndQnA.ts rename to extensions/azurePublish/src/luisAndQnA.ts diff --git a/Composer/plugins/azurePublish/src/mergeDeep.ts b/extensions/azurePublish/src/mergeDeep.ts similarity index 100% rename from Composer/plugins/azurePublish/src/mergeDeep.ts rename to extensions/azurePublish/src/mergeDeep.ts diff --git a/Composer/plugins/azurePublish/src/provision.ts b/extensions/azurePublish/src/provision.ts similarity index 100% rename from Composer/plugins/azurePublish/src/provision.ts rename to extensions/azurePublish/src/provision.ts diff --git a/Composer/plugins/azurePublish/src/schema.ts b/extensions/azurePublish/src/schema.ts similarity index 100% rename from Composer/plugins/azurePublish/src/schema.ts rename to extensions/azurePublish/src/schema.ts diff --git a/Composer/plugins/azurePublish/src/utils/crossTrainUtil.ts b/extensions/azurePublish/src/utils/crossTrainUtil.ts similarity index 100% rename from Composer/plugins/azurePublish/src/utils/crossTrainUtil.ts rename to extensions/azurePublish/src/utils/crossTrainUtil.ts diff --git a/Composer/plugins/azurePublish/src/utils/fileUtil.ts b/extensions/azurePublish/src/utils/fileUtil.ts similarity index 100% rename from Composer/plugins/azurePublish/src/utils/fileUtil.ts rename to extensions/azurePublish/src/utils/fileUtil.ts diff --git a/Composer/plugins/azurePublish/src/utils/jsonWalk.ts b/extensions/azurePublish/src/utils/jsonWalk.ts similarity index 100% rename from Composer/plugins/azurePublish/src/utils/jsonWalk.ts rename to extensions/azurePublish/src/utils/jsonWalk.ts diff --git a/Composer/plugins/azurePublish/tsconfig.json b/extensions/azurePublish/tsconfig.json similarity index 100% rename from Composer/plugins/azurePublish/tsconfig.json rename to extensions/azurePublish/tsconfig.json diff --git a/Composer/plugins/azurePublish/yarn.lock b/extensions/azurePublish/yarn.lock similarity index 99% rename from Composer/plugins/azurePublish/yarn.lock rename to extensions/azurePublish/yarn.lock index cae01cf2cd..878a22710e 100644 --- a/Composer/plugins/azurePublish/yarn.lock +++ b/extensions/azurePublish/yarn.lock @@ -156,7 +156,7 @@ "@azure/ms-rest-js" "^2.0.4" adal-node "^0.1.28" -"@bfc/extension@../../packages/extension": +"@bfc/extension@../../Composer/packages/extension": version "1.0.0" dependencies: "@botframework-composer/types" "*" @@ -168,7 +168,7 @@ path-to-regexp "^6.1.0" tar "^6.0.5" -"@bfc/indexers@../../packages/lib/indexers": +"@bfc/indexers@../../Composer/packages/lib/indexers": version "0.0.0" dependencies: "@microsoft/bf-lu" "^4.11.0-dev.20201013.7ccb128" @@ -176,7 +176,7 @@ botbuilder-lg "^4.10.0-preview-150886" lodash "^4.17.19" -"@bfc/shared@../../packages/lib/shared": +"@bfc/shared@../../Composer/packages/lib/shared": version "0.0.0" dependencies: "@botframework-composer/types" "*" diff --git a/Composer/plugins/githubAuth/config.json b/extensions/githubAuth/config.json similarity index 100% rename from Composer/plugins/githubAuth/config.json rename to extensions/githubAuth/config.json diff --git a/Composer/plugins/githubAuth/index.js b/extensions/githubAuth/index.js similarity index 100% rename from Composer/plugins/githubAuth/index.js rename to extensions/githubAuth/index.js diff --git a/Composer/plugins/githubAuth/package.json b/extensions/githubAuth/package.json similarity index 100% rename from Composer/plugins/githubAuth/package.json rename to extensions/githubAuth/package.json diff --git a/Composer/plugins/localPublish/.eslintrc.js b/extensions/localPublish/.eslintrc.js similarity index 100% rename from Composer/plugins/localPublish/.eslintrc.js rename to extensions/localPublish/.eslintrc.js diff --git a/Composer/plugins/localPublish/.gitignore b/extensions/localPublish/.gitignore similarity index 100% rename from Composer/plugins/localPublish/.gitignore rename to extensions/localPublish/.gitignore diff --git a/Composer/plugins/localPublish/package.json b/extensions/localPublish/package.json similarity index 89% rename from Composer/plugins/localPublish/package.json rename to extensions/localPublish/package.json index fb4ae25996..98517050b6 100644 --- a/Composer/plugins/localPublish/package.json +++ b/extensions/localPublish/package.json @@ -20,5 +20,8 @@ }, "resolutions": { "bl": "^4.0.3" + }, + "devDependencies": { + "@types/node": "^14.11.8" } } diff --git a/Composer/plugins/localPublish/src/index.ts b/extensions/localPublish/src/index.ts similarity index 100% rename from Composer/plugins/localPublish/src/index.ts rename to extensions/localPublish/src/index.ts diff --git a/Composer/plugins/localPublish/template/README.md b/extensions/localPublish/template/README.md similarity index 100% rename from Composer/plugins/localPublish/template/README.md rename to extensions/localPublish/template/README.md diff --git a/Composer/plugins/localPublish/tsconfig.json b/extensions/localPublish/tsconfig.json similarity index 100% rename from Composer/plugins/localPublish/tsconfig.json rename to extensions/localPublish/tsconfig.json diff --git a/Composer/plugins/localPublish/yarn.lock b/extensions/localPublish/yarn.lock similarity index 97% rename from Composer/plugins/localPublish/yarn.lock rename to extensions/localPublish/yarn.lock index 6560c875a7..1575ae0ed5 100644 --- a/Composer/plugins/localPublish/yarn.lock +++ b/extensions/localPublish/yarn.lock @@ -23,6 +23,11 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@types/node@^14.11.8": + version "14.11.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.8.tgz#fe2012f2355e4ce08bca44aeb3abbb21cf88d33f" + integrity sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxcUzsh2P2Pw== + adm-zip@^0.4.14: version "0.4.16" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" @@ -79,11 +84,6 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.0.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== - bl@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.3.tgz#12d6287adc29080e22a705e5764b2a9522cdc489" @@ -117,9 +117,6 @@ buffer@^5.1.0, buffer@^5.5.0: version "5.6.0" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" compress-commons@^4.0.0: version "4.0.1" @@ -249,11 +246,6 @@ graceful-fs@^4.2.0: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== -ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== - ignore@^5.1.4: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" diff --git a/Composer/plugins/mockRemotePublish/.gitignore b/extensions/mockRemotePublish/.gitignore similarity index 100% rename from Composer/plugins/mockRemotePublish/.gitignore rename to extensions/mockRemotePublish/.gitignore diff --git a/Composer/plugins/mockRemotePublish/package.json b/extensions/mockRemotePublish/package.json similarity index 81% rename from Composer/plugins/mockRemotePublish/package.json rename to extensions/mockRemotePublish/package.json index ec65778363..98ae54a85f 100644 --- a/Composer/plugins/mockRemotePublish/package.json +++ b/extensions/mockRemotePublish/package.json @@ -16,7 +16,8 @@ "uuid": "^7.0.1" }, "devDependencies": { - "@bfc/extension": "file:../../packages/extension", + "@bfc/extension": "file:../../Composer/packages/extension", + "@types/node": "^14.11.8", "@types/uuid": "^7.0.2" } } diff --git a/Composer/plugins/mockRemotePublish/src/index.ts b/extensions/mockRemotePublish/src/index.ts similarity index 100% rename from Composer/plugins/mockRemotePublish/src/index.ts rename to extensions/mockRemotePublish/src/index.ts diff --git a/Composer/plugins/mockRemotePublish/src/schema.ts b/extensions/mockRemotePublish/src/schema.ts similarity index 100% rename from Composer/plugins/mockRemotePublish/src/schema.ts rename to extensions/mockRemotePublish/src/schema.ts diff --git a/Composer/plugins/mockRemotePublish/tsconfig.json b/extensions/mockRemotePublish/tsconfig.json similarity index 100% rename from Composer/plugins/mockRemotePublish/tsconfig.json rename to extensions/mockRemotePublish/tsconfig.json diff --git a/Composer/plugins/mockRemotePublish/yarn.lock b/extensions/mockRemotePublish/yarn.lock similarity index 61% rename from Composer/plugins/mockRemotePublish/yarn.lock rename to extensions/mockRemotePublish/yarn.lock index 1ce8b846a7..4ad238d6d8 100644 --- a/Composer/plugins/mockRemotePublish/yarn.lock +++ b/extensions/mockRemotePublish/yarn.lock @@ -2,13 +2,24 @@ # yarn lockfile v1 -"@bfc/extension@file:../../packages/extension": +"@bfc/extension@file:../../Composer/packages/extension": version "1.0.0" dependencies: + "@botframework-composer/types" "*" debug "^4.1.1" + fs-extra "^9.0.1" globby "^11.0.0" + node-fetch "^2.6.1" passport "^0.4.1" path-to-regexp "^6.1.0" + tar "^6.0.5" + +"@botframework-composer/types@*": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@botframework-composer/types/-/types-0.0.1.tgz#117b86bf8e3bf43567471d436eb1c2f0ffcd6bb8" + integrity sha512-JmCTZpopfcCrso6S6Nj7v68OgVQgyzGd/MwQDU00ieZL29KM0TGL2T9TB+LKeUVfUw9ruJDA9K9stvPAaDErAQ== + dependencies: + json-schema "^0.2.5" "@nodelib/fs.scandir@2.1.3": version "2.1.3" @@ -31,40 +42,25 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@types/node@^14.11.8": + version "14.11.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.8.tgz#fe2012f2355e4ce08bca44aeb3abbb21cf88d33f" + integrity sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxcUzsh2P2Pw== + "@types/uuid@^7.0.2": version "7.0.3" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-7.0.3.tgz#45cd03e98e758f8581c79c535afbd4fc27ba7ac8" integrity sha512-PUdqTZVrNYTNcIhLHkiaYzoOIaUi5LFg/XLerAdgvwQrUCx+oSbtoBze1AMyvYbcwzUSNC+Isl58SM4Sm/6COw== -adm-zip@^0.4.14: - version "0.4.14" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.14.tgz#2cf312bcc9f8875df835b0f6040bd89be0a727a9" - integrity sha512-/9aQCnQHF+0IiCl0qhXoK7qs//SwYE7zX8lsr/DNk1BRAHYxeLZPL4pguwK29gUEqasYQjqPtEpDRSWEkdHn9g== - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -async@^2.6.2: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== - dependencies: - lodash "^4.17.14" - -balanced-match@^1.0.0: +at-least-node@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== braces@^3.0.1: version "3.0.2" @@ -73,17 +69,10 @@ braces@^3.0.1: dependencies: fill-range "^7.0.1" -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -debug@^3.1.1: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== debug@^4.1.1: version "4.1.1" @@ -125,10 +114,22 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +fs-extra@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" + +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" glob-parent@^5.1.0: version "5.1.0" @@ -137,18 +138,6 @@ glob-parent@^5.1.0: dependencies: is-glob "^4.0.1" -glob@^7.1.3: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - globby@^11.0.0: version "11.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.0.tgz#56fd0e9f0d4f8fb0c456f1ab0dee96e1380bc154" @@ -161,29 +150,16 @@ globby@^11.0.0: merge2 "^1.3.0" slash "^3.0.0" +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + ignore@^5.1.4: version "5.1.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -201,10 +177,19 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -lodash@^4.17.14: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== +json-schema@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.5.tgz#97997f50972dd0500214e208c407efa4b5d7063b" + integrity sha512-gWJOWYFrhQ8j7pVm0EM8Slr+EPVq1Phf6lvzvD/WCeqkrx/f2xBI0xOsRRS9xCn3I4vKtP519dvs3TP09r24wQ== + +jsonfile@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" + integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + dependencies: + universalify "^1.0.0" + optionalDependencies: + graceful-fs "^4.1.6" merge2@^1.3.0: version "1.3.0" @@ -219,36 +204,35 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +minipass@^3.0.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.3.tgz#7d42ff1f39635482e15f9cdb53184deebd5815fd" + integrity sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + yallist "^4.0.0" -mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== dependencies: - minimist "^1.2.5" + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" +node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== passport-strategy@1.x.x: version "1.0.0" @@ -263,11 +247,6 @@ passport@^0.4.1: passport-strategy "1.x.x" pause "0.0.1" -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - path-to-regexp@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.1.0.tgz#0b18f88b7a0ce0bfae6a25990c909ab86f512427" @@ -278,14 +257,6 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -path@^0.12.7: - version "0.12.7" - resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" - integrity sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8= - dependencies: - process "^0.11.1" - util "^0.10.3" - pause@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" @@ -296,32 +267,11 @@ picomatch@^2.0.5, picomatch@^2.2.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== -portfinder@^1.0.26: - version "1.0.26" - resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.26.tgz#475658d56ca30bed72ac7f1378ed350bd1b64e70" - integrity sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ== - dependencies: - async "^2.6.2" - debug "^3.1.1" - mkdirp "^0.5.1" - -process@^0.11.1: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - run-parallel@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" @@ -332,6 +282,18 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +tar@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.5.tgz#bde815086e10b39f1dcd298e89d596e1535e200f" + integrity sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -339,19 +301,17 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -util@^0.10.3: - version "0.10.4" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" - integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== - dependencies: - inherits "2.0.3" +universalify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== uuid@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.1.tgz#95ed6ff3d8c881cbf85f0f05cc3915ef994818ef" integrity sha512-yqjRXZzSJm9Dbl84H2VDHpM3zMjzSJQ+hn6C4zqd5ilW+7P4ZmLEEqwho9LjP+tGuZlF4xrHQXT0h9QZUS/pWA== -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== diff --git a/Composer/plugins/mongoStorage/package.json b/extensions/mongoStorage/package.json similarity index 100% rename from Composer/plugins/mongoStorage/package.json rename to extensions/mongoStorage/package.json diff --git a/Composer/plugins/mongoStorage/src/index.ts b/extensions/mongoStorage/src/index.ts similarity index 100% rename from Composer/plugins/mongoStorage/src/index.ts rename to extensions/mongoStorage/src/index.ts diff --git a/Composer/plugins/mongoStorage/src/interface.ts b/extensions/mongoStorage/src/interface.ts similarity index 100% rename from Composer/plugins/mongoStorage/src/interface.ts rename to extensions/mongoStorage/src/interface.ts diff --git a/Composer/plugins/mongoStorage/tsconfig.json b/extensions/mongoStorage/tsconfig.json similarity index 100% rename from Composer/plugins/mongoStorage/tsconfig.json rename to extensions/mongoStorage/tsconfig.json diff --git a/Composer/plugins/mongoStorage/yarn.lock b/extensions/mongoStorage/yarn.lock similarity index 100% rename from Composer/plugins/mongoStorage/yarn.lock rename to extensions/mongoStorage/yarn.lock diff --git a/Composer/plugins/publishTest/index.js b/extensions/publishTest/index.js similarity index 100% rename from Composer/plugins/publishTest/index.js rename to extensions/publishTest/index.js diff --git a/Composer/plugins/publishTest/package.json b/extensions/publishTest/package.json similarity index 100% rename from Composer/plugins/publishTest/package.json rename to extensions/publishTest/package.json diff --git a/Composer/plugins/runtimes/.eslintrc.js b/extensions/runtimes/.eslintrc.js similarity index 100% rename from Composer/plugins/runtimes/.eslintrc.js rename to extensions/runtimes/.eslintrc.js diff --git a/Composer/plugins/runtimes/.gitignore b/extensions/runtimes/.gitignore similarity index 100% rename from Composer/plugins/runtimes/.gitignore rename to extensions/runtimes/.gitignore diff --git a/Composer/plugins/runtimes/package.json b/extensions/runtimes/package.json similarity index 75% rename from Composer/plugins/runtimes/package.json rename to extensions/runtimes/package.json index 20fac67d7d..956b278030 100644 --- a/Composer/plugins/runtimes/package.json +++ b/extensions/runtimes/package.json @@ -11,7 +11,10 @@ "license": "ISC", "dependencies": { "fs-extra": "^9.0.1", - "rimraf": "^3.0.2", - "path": "^0.12.7" + "path": "^0.12.7", + "rimraf": "^3.0.2" + }, + "devDependencies": { + "@types/node": "^14.11.8" } } diff --git a/Composer/plugins/runtimes/src/copyDir.ts b/extensions/runtimes/src/copyDir.ts similarity index 100% rename from Composer/plugins/runtimes/src/copyDir.ts rename to extensions/runtimes/src/copyDir.ts diff --git a/Composer/plugins/runtimes/src/index.ts b/extensions/runtimes/src/index.ts similarity index 100% rename from Composer/plugins/runtimes/src/index.ts rename to extensions/runtimes/src/index.ts diff --git a/Composer/plugins/runtimes/src/interface.ts b/extensions/runtimes/src/interface.ts similarity index 100% rename from Composer/plugins/runtimes/src/interface.ts rename to extensions/runtimes/src/interface.ts diff --git a/Composer/plugins/runtimes/tsconfig.json b/extensions/runtimes/tsconfig.json similarity index 100% rename from Composer/plugins/runtimes/tsconfig.json rename to extensions/runtimes/tsconfig.json diff --git a/Composer/plugins/runtimes/yarn.lock b/extensions/runtimes/yarn.lock similarity index 95% rename from Composer/plugins/runtimes/yarn.lock rename to extensions/runtimes/yarn.lock index 41e59ff0f7..19239fbabc 100644 --- a/Composer/plugins/runtimes/yarn.lock +++ b/extensions/runtimes/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@types/node@^14.11.8": + version "14.11.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.8.tgz#fe2012f2355e4ce08bca44aeb3abbb21cf88d33f" + integrity sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxcUzsh2P2Pw== + at-least-node@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" diff --git a/Composer/plugins/sample-ui-plugin/README.md b/extensions/sample-ui-plugin/README.md similarity index 100% rename from Composer/plugins/sample-ui-plugin/README.md rename to extensions/sample-ui-plugin/README.md diff --git a/Composer/plugins/sample-ui-plugin/package.json b/extensions/sample-ui-plugin/package.json similarity index 93% rename from Composer/plugins/sample-ui-plugin/package.json rename to extensions/sample-ui-plugin/package.json index aeddae0f15..82453956e2 100644 --- a/Composer/plugins/sample-ui-plugin/package.json +++ b/extensions/sample-ui-plugin/package.json @@ -39,7 +39,7 @@ }, "main": "dist/index.js", "dependencies": { - "@bfc/extension-client": "file:../../packages/extension-client", + "@bfc/extension-client": "file:../../Composer/packages/extension-client", "@fluentui/react": "^7.145.0", "emotion": "^10.0.27", "react": "^16.13.0", diff --git a/Composer/plugins/sample-ui-plugin/src/client/page/index.tsx b/extensions/sample-ui-plugin/src/client/page/index.tsx similarity index 73% rename from Composer/plugins/sample-ui-plugin/src/client/page/index.tsx rename to extensions/sample-ui-plugin/src/client/page/index.tsx index 183b7fd42e..919f8243cd 100644 --- a/Composer/plugins/sample-ui-plugin/src/client/page/index.tsx +++ b/extensions/sample-ui-plugin/src/client/page/index.tsx @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import React, { useMemo } from 'react'; -import { render, useProjectApi } from '@bfc/extension-client'; +import React, { useMemo } from "react"; +import { render, useProjectApi } from "@bfc/extension-client"; import { DetailsList, ScrollablePane, @@ -11,7 +11,7 @@ import { DetailsListLayoutMode, IColumn, TextField, -} from '@fluentui/react'; +} from "@fluentui/react"; const Main: React.FC = () => { const { dialogs, lgFiles, luFiles, qnaFiles, saveDialog } = useProjectApi(); @@ -22,7 +22,7 @@ const Main: React.FC = () => { dialogs.forEach((d) => { all.push({ name: d.id, - type: 'dialog', + type: "dialog", content: d.content, }); }); @@ -30,7 +30,7 @@ const Main: React.FC = () => { luFiles.forEach((d) => { all.push({ name: d.id, - type: 'lu', + type: "lu", content: d.content, }); }); @@ -38,7 +38,7 @@ const Main: React.FC = () => { lgFiles.forEach((d) => { all.push({ name: d.id, - type: 'lg', + type: "lg", content: d.content, }); }); @@ -46,7 +46,7 @@ const Main: React.FC = () => { qnaFiles.forEach((d) => { all.push({ name: d.id, - type: 'qna', + type: "qna", content: d.content, }); }); @@ -57,7 +57,7 @@ const Main: React.FC = () => { const handleFileChange = (type: string, fileId: string, data?: string) => { try { switch (type) { - case 'dialog': + case "dialog": return saveDialog(fileId, JSON.parse(data)); } } catch (err) { @@ -67,38 +67,43 @@ const Main: React.FC = () => { const tableColumns: IColumn[] = [ { - key: 'name', - name: 'Name', - fieldName: 'name', + key: "name", + name: "Name", + fieldName: "name", minWidth: 150, maxWidth: 200, isResizable: true, - data: 'string', + data: "string", }, { - key: 'type', - name: 'Type', - fieldName: 'type', + key: "type", + name: "Type", + fieldName: "type", minWidth: 200, maxWidth: 450, isResizable: true, - data: 'string', + data: "string", }, { - key: 'content', - name: 'Content', + key: "content", + name: "Content", minWidth: 200, maxWidth: 800, isResizable: true, onRender: (item) => { if (item) { - const content = typeof item.content === 'string' ? item.content : JSON.stringify(item.content, null, 2); + const content = + typeof item.content === "string" + ? item.content + : JSON.stringify(item.content, null, 2); return ( handleFileChange(item.type, item.name, newVal)} + onChange={(e, newVal) => + handleFileChange(item.type, item.name, newVal) + } /> ); } diff --git a/Composer/plugins/sample-ui-plugin/src/client/publish/index.tsx b/extensions/sample-ui-plugin/src/client/publish/index.tsx similarity index 100% rename from Composer/plugins/sample-ui-plugin/src/client/publish/index.tsx rename to extensions/sample-ui-plugin/src/client/publish/index.tsx diff --git a/Composer/plugins/sample-ui-plugin/src/client/publish/main.tsx b/extensions/sample-ui-plugin/src/client/publish/main.tsx similarity index 100% rename from Composer/plugins/sample-ui-plugin/src/client/publish/main.tsx rename to extensions/sample-ui-plugin/src/client/publish/main.tsx diff --git a/Composer/plugins/sample-ui-plugin/src/client/styles.ts b/extensions/sample-ui-plugin/src/client/styles.ts similarity index 100% rename from Composer/plugins/sample-ui-plugin/src/client/styles.ts rename to extensions/sample-ui-plugin/src/client/styles.ts diff --git a/Composer/plugins/sample-ui-plugin/src/node/index.ts b/extensions/sample-ui-plugin/src/node/index.ts similarity index 100% rename from Composer/plugins/sample-ui-plugin/src/node/index.ts rename to extensions/sample-ui-plugin/src/node/index.ts diff --git a/Composer/plugins/sample-ui-plugin/tsconfig.json b/extensions/sample-ui-plugin/tsconfig.json similarity index 100% rename from Composer/plugins/sample-ui-plugin/tsconfig.json rename to extensions/sample-ui-plugin/tsconfig.json diff --git a/Composer/plugins/sample-ui-plugin/tsconfig.node.json b/extensions/sample-ui-plugin/tsconfig.node.json similarity index 100% rename from Composer/plugins/sample-ui-plugin/tsconfig.node.json rename to extensions/sample-ui-plugin/tsconfig.node.json diff --git a/Composer/plugins/sample-ui-plugin/webpack.config.js b/extensions/sample-ui-plugin/webpack.config.js similarity index 100% rename from Composer/plugins/sample-ui-plugin/webpack.config.js rename to extensions/sample-ui-plugin/webpack.config.js diff --git a/Composer/plugins/sample-ui-plugin/yarn.lock b/extensions/sample-ui-plugin/yarn.lock similarity index 98% rename from Composer/plugins/sample-ui-plugin/yarn.lock rename to extensions/sample-ui-plugin/yarn.lock index a5f563bf50..b2c21cf135 100644 --- a/Composer/plugins/sample-ui-plugin/yarn.lock +++ b/extensions/sample-ui-plugin/yarn.lock @@ -46,20 +46,19 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" -"@bfc/extension-client@file:../../packages/extension-client": +"@bfc/extension-client@file:../../Composer/packages/extension-client": version "1.0.0" dependencies: - "@bfc/shared" "file:../../../../../Library/Caches/Yarn/v6/npm-@bfc-extension-client-1.0.0-c66e4324-c38c-41dc-a538-e4cab00a6748-1602528055919/node_modules/@bfc/lib/shared" + "@botframework-composer/types" "*" debug "^4.1.1" lodash "^4.17.19" -"@bfc/shared@file:../../packages/lib/shared": - version "0.0.0" +"@botframework-composer/types@*": + version "0.0.1" + resolved "https://registry.yarnpkg.com/@botframework-composer/types/-/types-0.0.1.tgz#117b86bf8e3bf43567471d436eb1c2f0ffcd6bb8" + integrity sha512-JmCTZpopfcCrso6S6Nj7v68OgVQgyzGd/MwQDU00ieZL29KM0TGL2T9TB+LKeUVfUw9ruJDA9K9stvPAaDErAQ== dependencies: - format-message "6.2.3" json-schema "^0.2.5" - nanoid "^3.1.3" - nanoid-dictionary "^3.0.0" "@emotion/cache@^10.0.27": version "10.0.29" @@ -1357,34 +1356,6 @@ for-in@^1.0.2: resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= -format-message-formats@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/format-message-formats/-/format-message-formats-6.2.0.tgz#231c2a3d2806e3200331c7aa06430cb403f58792" - integrity sha512-QP0dl1O9P3fDCG5klj101nfizgiWiv0T+DMNBqwi25FvB1LIenQQW4PpULk5zO5PiOSvmMu5pW4HS542kJRAww== - -format-message-interpret@^6.2.3: - version "6.2.3" - resolved "https://registry.yarnpkg.com/format-message-interpret/-/format-message-interpret-6.2.3.tgz#ee72fe924102c7d3f0c2d12797f53d8d93795810" - integrity sha512-OoOdB5yHLzW89RwDQW4fj+8p2Eay9Dtmx4B7Tz8C/QQl/j+aVjy65A5xasQhQD+4JumYU/OxMBdjYzBSR8+ivA== - dependencies: - format-message-formats "^6.2.0" - lookup-closest-locale "^6.2.0" - -format-message-parse@^6.2.3: - version "6.2.3" - resolved "https://registry.yarnpkg.com/format-message-parse/-/format-message-parse-6.2.3.tgz#1393d9e2bc598603a36be992379781a78d1b6c08" - integrity sha512-ZSL3nZ0zaDktDAGwkoGJ439rS9ZfTcMOrWAVav9BOAoKs0qE2Ozal2H6vVJOuIdDhwaJuFqvJ7fdRSE+qR5oNg== - -format-message@6.2.3: - version "6.2.3" - resolved "https://registry.yarnpkg.com/format-message/-/format-message-6.2.3.tgz#5cb50a664180299c562f5a75083c8476b4157cb4" - integrity sha512-vtPM3hSLXtmPxRLWo4/FX2ylBMOTpV5wGNIq3OYv3ZyK7F+AWkftrAVsJ36gvY8Gw4Yp33xP2Ak+22Pm7sOV/A== - dependencies: - format-message-formats "^6.2.0" - format-message-interpret "^6.2.3" - format-message-parse "^6.2.3" - lookup-closest-locale "^6.2.0" - fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -1894,11 +1865,6 @@ lodash@^4.17.19: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== -lookup-closest-locale@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/lookup-closest-locale/-/lookup-closest-locale-6.2.0.tgz#57f665e604fd26f77142d48152015402b607bcf3" - integrity sha512-/c2kL+Vnp1jnV6K6RpDTHK3dgg0Tu2VVp+elEiJpjfS1UyY7AjOYHohRug6wT0OpoX2qFgNORndE9RqesfVxWQ== - loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -2073,16 +2039,6 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== -nanoid-dictionary@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/nanoid-dictionary/-/nanoid-dictionary-3.0.0.tgz#e4ad77e528792095662a7be1855ce31448d0687c" - integrity sha512-dYCOXltfavrN7LGYt3DEAGl6Ya3UcnypXPsYR7HZ5k1eIesakVm+zlfv7V75uSe+Zhyxvyhg9yEbPl8qMx1dwA== - -nanoid@^3.1.3: - version "3.1.12" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" - integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== - nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" diff --git a/Composer/plugins/samples/.eslintrc.js b/extensions/samples/.eslintrc.js similarity index 100% rename from Composer/plugins/samples/.eslintrc.js rename to extensions/samples/.eslintrc.js diff --git a/Composer/plugins/samples/.gitignore b/extensions/samples/.gitignore similarity index 100% rename from Composer/plugins/samples/.gitignore rename to extensions/samples/.gitignore diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/actionssample.botproj b/extensions/samples/assets/projects/ActionsSample/actionssample.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/actionssample.botproj rename to extensions/samples/assets/projects/ActionsSample/actionssample.botproj diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/actionssample.dialog b/extensions/samples/assets/projects/ActionsSample/actionssample.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/actionssample.dialog rename to extensions/samples/assets/projects/ActionsSample/actionssample.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/actions/actions.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/actions/actions.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/actions/actions.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/actions/actions.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/actions/language-generation/en-us/actions.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/actions/language-generation/en-us/actions.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/actions/language-generation/en-us/actions.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/actions/language-generation/en-us/actions.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/actions/language-understanding/en-us/actions.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/actions/language-understanding/en-us/actions.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/actions/language-understanding/en-us/actions.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/actions/language-understanding/en-us/actions.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editactions/editactions.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/editactions/editactions.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editactions/editactions.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/editactions/editactions.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editactions/language-generation/en-us/editactions.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/editactions/language-generation/en-us/editactions.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editactions/language-generation/en-us/editactions.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/editactions/language-generation/en-us/editactions.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editactions/language-understanding/en-us/editactions.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/editactions/language-understanding/en-us/editactions.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editactions/language-understanding/en-us/editactions.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/editactions/language-understanding/en-us/editactions.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editarray/editarray.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/editarray/editarray.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editarray/editarray.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/editarray/editarray.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editarray/language-generation/en-us/editarray.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/editarray/language-generation/en-us/editarray.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editarray/language-generation/en-us/editarray.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/editarray/language-generation/en-us/editarray.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editarray/language-understanding/en-us/editarray.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/editarray/language-understanding/en-us/editarray.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/editarray/language-understanding/en-us/editarray.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/editarray/language-understanding/en-us/editarray.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitanevent/emitanevent.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/emitanevent/emitanevent.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitanevent/emitanevent.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/emitanevent/emitanevent.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitanevent/language-generation/en-us/emitanevent.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/emitanevent/language-generation/en-us/emitanevent.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitanevent/language-generation/en-us/emitanevent.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/emitanevent/language-generation/en-us/emitanevent.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitanevent/language-understanding/en-us/emitanevent.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/emitanevent/language-understanding/en-us/emitanevent.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitanevent/language-understanding/en-us/emitanevent.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/emitanevent/language-understanding/en-us/emitanevent.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitevent/emitevent.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/emitevent/emitevent.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitevent/emitevent.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/emitevent/emitevent.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitevent/language-generation/en-us/emitevent.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/emitevent/language-generation/en-us/emitevent.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitevent/language-generation/en-us/emitevent.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/emitevent/language-generation/en-us/emitevent.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitevent/language-understanding/en-us/emitevent.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/emitevent/language-understanding/en-us/emitevent.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/emitevent/language-understanding/en-us/emitevent.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/emitevent/language-understanding/en-us/emitevent.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/language-generation/en-us/telljoke.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/language-generation/en-us/telljoke.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/language-generation/en-us/telljoke.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/language-generation/en-us/telljoke.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/language-understanding/en-us/telljoke.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/language-understanding/en-us/telljoke.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/language-understanding/en-us/telljoke.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/language-understanding/en-us/telljoke.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/telljoke.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/telljoke.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/telljoke.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/dialogs/telljoke/telljoke.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/enddialog.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/enddialog.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/enddialog.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/enddialog.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/language-generation/en-us/enddialog.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/language-generation/en-us/enddialog.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/language-generation/en-us/enddialog.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/language-generation/en-us/enddialog.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/language-understanding/en-us/enddialog.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/language-understanding/en-us/enddialog.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/enddialog/language-understanding/en-us/enddialog.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/enddialog/language-understanding/en-us/enddialog.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/endturn/endturn.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/endturn/endturn.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/endturn/endturn.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/endturn/endturn.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/endturn/language-generation/en-us/endturn.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/endturn/language-generation/en-us/endturn.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/endturn/language-generation/en-us/endturn.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/endturn/language-generation/en-us/endturn.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/endturn/language-understanding/en-us/endturn.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/endturn/language-understanding/en-us/endturn.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/endturn/language-understanding/en-us/endturn.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/endturn/language-understanding/en-us/endturn.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/httprequest/httprequest.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/httprequest/httprequest.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/httprequest/httprequest.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/httprequest/httprequest.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/httprequest/language-generation/en-us/httprequest.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/httprequest/language-generation/en-us/httprequest.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/httprequest/language-generation/en-us/httprequest.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/httprequest/language-generation/en-us/httprequest.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/httprequest/language-understanding/en-us/httprequest.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/httprequest/language-understanding/en-us/httprequest.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/httprequest/language-understanding/en-us/httprequest.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/httprequest/language-understanding/en-us/httprequest.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/ifcondition/ifcondition.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/ifcondition/ifcondition.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/ifcondition/ifcondition.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/ifcondition/ifcondition.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/ifcondition/language-generation/en-us/ifcondition.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/ifcondition/language-generation/en-us/ifcondition.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/ifcondition/language-generation/en-us/ifcondition.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/ifcondition/language-generation/en-us/ifcondition.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/ifcondition/language-understanding/en-us/ifcondition.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/ifcondition/language-understanding/en-us/ifcondition.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/ifcondition/language-understanding/en-us/ifcondition.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/ifcondition/language-understanding/en-us/ifcondition.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/language-generation/en-us/qnamakeraction.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/language-generation/en-us/qnamakeraction.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/language-generation/en-us/qnamakeraction.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/language-generation/en-us/qnamakeraction.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/language-understanding/en-us/qnamakeraction.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/language-understanding/en-us/qnamakeraction.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/language-understanding/en-us/qnamakeraction.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/language-understanding/en-us/qnamakeraction.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/qnamakeraction.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/qnamakeraction.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/qnamakeraction.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/qnamakeraction/qnamakeraction.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/repeatdialog/language-generation/en-us/repeatdialog.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/repeatdialog/language-generation/en-us/repeatdialog.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/repeatdialog/language-generation/en-us/repeatdialog.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/repeatdialog/language-generation/en-us/repeatdialog.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/repeatdialog/language-understanding/en-us/repeatdialog.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/repeatdialog/language-understanding/en-us/repeatdialog.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/repeatdialog/language-understanding/en-us/repeatdialog.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/repeatdialog/language-understanding/en-us/repeatdialog.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/repeatdialog/repeatdialog.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/repeatdialog/repeatdialog.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/repeatdialog/repeatdialog.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/repeatdialog/repeatdialog.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/fortunetellerdialog.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/fortunetellerdialog.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/fortunetellerdialog.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/fortunetellerdialog.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/language-generation/en-us/fortunetellerdialog.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/language-generation/en-us/fortunetellerdialog.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/language-generation/en-us/fortunetellerdialog.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/language-generation/en-us/fortunetellerdialog.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/language-understanding/en-us/fortunetellerdialog.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/language-understanding/en-us/fortunetellerdialog.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/language-understanding/en-us/fortunetellerdialog.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/fortunetellerdialog/language-understanding/en-us/fortunetellerdialog.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/language-generation/en-us/telljokedialog.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/language-generation/en-us/telljokedialog.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/language-generation/en-us/telljokedialog.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/language-generation/en-us/telljokedialog.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/language-understanding/en-us/telljokedialog.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/language-understanding/en-us/telljokedialog.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/language-understanding/en-us/telljokedialog.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/language-understanding/en-us/telljokedialog.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/telljokedialog.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/telljokedialog.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/telljokedialog.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/dialogs/telljokedialog/telljokedialog.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/language-generation/en-us/replacedialog.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/language-generation/en-us/replacedialog.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/language-generation/en-us/replacedialog.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/language-generation/en-us/replacedialog.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/language-understanding/en-us/replacedialog.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/language-understanding/en-us/replacedialog.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/language-understanding/en-us/replacedialog.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/language-understanding/en-us/replacedialog.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/replacedialog.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/replacedialog.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/replacedialog/replacedialog.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/replacedialog/replacedialog.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/switchcondition/switchcondition.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/switchcondition/switchcondition.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/switchcondition/switchcondition.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/switchcondition/switchcondition.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/traceandlog/language-generation/en-us/traceandlog.en-us.lg b/extensions/samples/assets/projects/ActionsSample/dialogs/traceandlog/language-generation/en-us/traceandlog.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/traceandlog/language-generation/en-us/traceandlog.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/dialogs/traceandlog/language-generation/en-us/traceandlog.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/traceandlog/language-understanding/en-us/traceandlog.en-us.lu b/extensions/samples/assets/projects/ActionsSample/dialogs/traceandlog/language-understanding/en-us/traceandlog.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/traceandlog/language-understanding/en-us/traceandlog.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/dialogs/traceandlog/language-understanding/en-us/traceandlog.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/dialogs/traceandlog/traceandlog.dialog b/extensions/samples/assets/projects/ActionsSample/dialogs/traceandlog/traceandlog.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/dialogs/traceandlog/traceandlog.dialog rename to extensions/samples/assets/projects/ActionsSample/dialogs/traceandlog/traceandlog.dialog diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/knowledge-base/en-us/actionssample.en-us.qna b/extensions/samples/assets/projects/ActionsSample/knowledge-base/en-us/actionssample.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/knowledge-base/en-us/actionssample.en-us.qna rename to extensions/samples/assets/projects/ActionsSample/knowledge-base/en-us/actionssample.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/language-generation/en-us/actionssample.en-us.lg b/extensions/samples/assets/projects/ActionsSample/language-generation/en-us/actionssample.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/language-generation/en-us/actionssample.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/language-generation/en-us/actionssample.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/ActionsSample/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/ActionsSample/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ActionsSample/language-understanding/en-us/actionssample.en-us.lu b/extensions/samples/assets/projects/ActionsSample/language-understanding/en-us/actionssample.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ActionsSample/language-understanding/en-us/actionssample.en-us.lu rename to extensions/samples/assets/projects/ActionsSample/language-understanding/en-us/actionssample.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/askingquestionssample-0.dialog b/extensions/samples/assets/projects/AskingQuestionsSample/askingquestionssample-0.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/askingquestionssample-0.dialog rename to extensions/samples/assets/projects/AskingQuestionsSample/askingquestionssample-0.dialog diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/askingquestionssample.botproj b/extensions/samples/assets/projects/AskingQuestionsSample/askingquestionssample.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/askingquestionssample.botproj rename to extensions/samples/assets/projects/AskingQuestionsSample/askingquestionssample.botproj diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/askingquestionssample.dialog b/extensions/samples/assets/projects/AskingQuestionsSample/askingquestionssample.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/askingquestionssample.dialog rename to extensions/samples/assets/projects/AskingQuestionsSample/askingquestionssample.dialog diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/attachmentinput.dialog b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/attachmentinput.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/attachmentinput.dialog rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/attachmentinput.dialog diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/language-generation/en-us/attachmentinput.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/language-generation/en-us/attachmentinput.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/language-generation/en-us/attachmentinput.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/language-generation/en-us/attachmentinput.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/language-understanding/en-us/attachmentinput.en-us.lu b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/language-understanding/en-us/attachmentinput.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/language-understanding/en-us/attachmentinput.en-us.lu rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/attachmentinput/language-understanding/en-us/attachmentinput.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/choiceinput.dialog b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/choiceinput.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/choiceinput.dialog rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/choiceinput.dialog diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/language-generation/en-us/choiceinput.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/language-generation/en-us/choiceinput.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/language-generation/en-us/choiceinput.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/language-generation/en-us/choiceinput.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/language-understanding/en-us/choiceinput.en-us.lu b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/language-understanding/en-us/choiceinput.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/language-understanding/en-us/choiceinput.en-us.lu rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/choiceinput/language-understanding/en-us/choiceinput.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/confirminput.dialog b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/confirminput.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/confirminput.dialog rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/confirminput.dialog diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/language-generation/en-us/confirminput.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/language-generation/en-us/confirminput.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/language-generation/en-us/confirminput.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/language-generation/en-us/confirminput.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/language-understanding/en-us/confirminput.en-us.lu b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/language-understanding/en-us/confirminput.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/language-understanding/en-us/confirminput.en-us.lu rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/confirminput/language-understanding/en-us/confirminput.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/datetimeinput.dialog b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/datetimeinput.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/datetimeinput.dialog rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/datetimeinput.dialog diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/language-generation/en-us/datetimeinput.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/language-generation/en-us/datetimeinput.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/language-generation/en-us/datetimeinput.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/language-generation/en-us/datetimeinput.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/language-understanding/en-us/datetimeinput.en-us.lu b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/language-understanding/en-us/datetimeinput.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/language-understanding/en-us/datetimeinput.en-us.lu rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/datetimeinput/language-understanding/en-us/datetimeinput.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/language-generation/en-us/numberinput.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/language-generation/en-us/numberinput.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/language-generation/en-us/numberinput.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/language-generation/en-us/numberinput.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/language-understanding/en-us/numberinput.en-us.lu b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/language-understanding/en-us/numberinput.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/language-understanding/en-us/numberinput.en-us.lu rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/language-understanding/en-us/numberinput.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/numberinput.dialog b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/numberinput.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/numberinput.dialog rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/numberinput/numberinput.dialog diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/language-generation/en-us/oauthinput.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/language-generation/en-us/oauthinput.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/language-generation/en-us/oauthinput.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/language-generation/en-us/oauthinput.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/language-understanding/en-us/oauthinput.en-us.lu b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/language-understanding/en-us/oauthinput.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/language-understanding/en-us/oauthinput.en-us.lu rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/language-understanding/en-us/oauthinput.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/oauthinput.dialog b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/oauthinput.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/oauthinput.dialog rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/oauthinput/oauthinput.dialog diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/signout/language-generation/en-us/signout.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/signout/language-generation/en-us/signout.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/signout/language-generation/en-us/signout.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/signout/language-generation/en-us/signout.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/signout/language-understanding/en-us/signout.en-us.lu b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/signout/language-understanding/en-us/signout.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/signout/language-understanding/en-us/signout.en-us.lu rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/signout/language-understanding/en-us/signout.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/signout/signout.dialog b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/signout/signout.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/signout/signout.dialog rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/signout/signout.dialog diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/language-generation/en-us/textinput.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/language-generation/en-us/textinput.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/language-generation/en-us/textinput.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/language-generation/en-us/textinput.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/language-understanding/en-us/textinput.en-us.lu b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/language-understanding/en-us/textinput.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/language-understanding/en-us/textinput.en-us.lu rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/language-understanding/en-us/textinput.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/textinput.dialog b/extensions/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/textinput.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/textinput.dialog rename to extensions/samples/assets/projects/AskingQuestionsSample/dialogs/textinput/textinput.dialog diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/knowledge-base/en-us/askingquestionssample.en-us.qna b/extensions/samples/assets/projects/AskingQuestionsSample/knowledge-base/en-us/askingquestionssample.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/knowledge-base/en-us/askingquestionssample.en-us.qna rename to extensions/samples/assets/projects/AskingQuestionsSample/knowledge-base/en-us/askingquestionssample.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/askingquestionssample-0.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/askingquestionssample-0.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/askingquestionssample-0.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/askingquestionssample-0.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/askingquestionssample.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/askingquestionssample.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/askingquestionssample.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/askingquestionssample.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/AskingQuestionsSample/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/language-understanding/en-us/askingquestionssample-0.en-us.lu b/extensions/samples/assets/projects/AskingQuestionsSample/language-understanding/en-us/askingquestionssample-0.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/language-understanding/en-us/askingquestionssample-0.en-us.lu rename to extensions/samples/assets/projects/AskingQuestionsSample/language-understanding/en-us/askingquestionssample-0.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/AskingQuestionsSample/language-understanding/en-us/askingquestionssample.en-us.lu b/extensions/samples/assets/projects/AskingQuestionsSample/language-understanding/en-us/askingquestionssample.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/AskingQuestionsSample/language-understanding/en-us/askingquestionssample.en-us.lu rename to extensions/samples/assets/projects/AskingQuestionsSample/language-understanding/en-us/askingquestionssample.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.botproj b/extensions/samples/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.botproj rename to extensions/samples/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.botproj diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.dialog b/extensions/samples/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.dialog rename to extensions/samples/assets/projects/ControllingConversationFlowSample/controllingconversationflowsample.dialog diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/canceldialog.dialog b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/canceldialog.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/canceldialog.dialog rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/canceldialog.dialog diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/language-generation/en-us/canceldialog.en-us.lg b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/language-generation/en-us/canceldialog.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/language-generation/en-us/canceldialog.en-us.lg rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/language-generation/en-us/canceldialog.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/language-understanding/en-us/canceldialog.en-us.lu b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/language-understanding/en-us/canceldialog.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/language-understanding/en-us/canceldialog.en-us.lu rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/canceldialog/language-understanding/en-us/canceldialog.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/foreachpagestep.dialog b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/foreachpagestep.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/foreachpagestep.dialog rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/foreachpagestep.dialog diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/language-generation/en-us/foreachpagestep.en-us.lg b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/language-generation/en-us/foreachpagestep.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/language-generation/en-us/foreachpagestep.en-us.lg rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/language-generation/en-us/foreachpagestep.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/language-understanding/en-us/foreachpagestep.en-us.lu b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/language-understanding/en-us/foreachpagestep.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/language-understanding/en-us/foreachpagestep.en-us.lu rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachpagestep/language-understanding/en-us/foreachpagestep.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/foreachstep.dialog b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/foreachstep.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/foreachstep.dialog rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/foreachstep.dialog diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/language-generation/en-us/foreachstep.en-us.lg b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/language-generation/en-us/foreachstep.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/language-generation/en-us/foreachstep.en-us.lg rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/language-generation/en-us/foreachstep.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/language-understanding/en-us/foreachstep.en-us.lu b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/language-understanding/en-us/foreachstep.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/language-understanding/en-us/foreachstep.en-us.lu rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachstep/language-understanding/en-us/foreachstep.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/foreachwithbreakandcontinue.dialog b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/foreachwithbreakandcontinue.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/foreachwithbreakandcontinue.dialog rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/foreachwithbreakandcontinue.dialog diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/language-generation/en-us/foreachwithbreakandcontinue.en-us.lg b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/language-generation/en-us/foreachwithbreakandcontinue.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/language-generation/en-us/foreachwithbreakandcontinue.en-us.lg rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/language-generation/en-us/foreachwithbreakandcontinue.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/language-understanding/en-us/foreachwithbreakandcontinue.en-us.lu b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/language-understanding/en-us/foreachwithbreakandcontinue.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/language-understanding/en-us/foreachwithbreakandcontinue.en-us.lu rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/foreachwithbreakandcontinue/language-understanding/en-us/foreachwithbreakandcontinue.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/gotoaction.dialog b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/gotoaction.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/gotoaction.dialog rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/gotoaction.dialog diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/language-generation/en-us/gotoaction.en-us.lg b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/language-generation/en-us/gotoaction.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/language-generation/en-us/gotoaction.en-us.lg rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/language-generation/en-us/gotoaction.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/language-understanding/en-us/gotoaction.en-us.lu b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/language-understanding/en-us/gotoaction.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/language-understanding/en-us/gotoaction.en-us.lu rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/gotoaction/language-understanding/en-us/gotoaction.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/ifcondition.dialog b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/ifcondition.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/ifcondition.dialog rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/ifcondition.dialog diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/language-generation/en-us/ifcondition.en-us.lg b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/language-generation/en-us/ifcondition.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/language-generation/en-us/ifcondition.en-us.lg rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/language-generation/en-us/ifcondition.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/language-understanding/en-us/ifcondition.en-us.lu b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/language-understanding/en-us/ifcondition.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/language-understanding/en-us/ifcondition.en-us.lu rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/ifcondition/language-understanding/en-us/ifcondition.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/language-generation/en-us/repeatdialog.en-us.lg b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/language-generation/en-us/repeatdialog.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/language-generation/en-us/repeatdialog.en-us.lg rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/language-generation/en-us/repeatdialog.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/language-understanding/en-us/repeatdialog.en-us.lu b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/language-understanding/en-us/repeatdialog.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/language-understanding/en-us/repeatdialog.en-us.lu rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/language-understanding/en-us/repeatdialog.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/repeatdialog.dialog b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/repeatdialog.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/repeatdialog.dialog rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/repeatdialog/repeatdialog.dialog diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/switchcondition.dialog b/extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/switchcondition.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/switchcondition.dialog rename to extensions/samples/assets/projects/ControllingConversationFlowSample/dialogs/switchcondition/switchcondition.dialog diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/knowledge-base/en-us/controllingconversationflowsample.en-us.qna b/extensions/samples/assets/projects/ControllingConversationFlowSample/knowledge-base/en-us/controllingconversationflowsample.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/knowledge-base/en-us/controllingconversationflowsample.en-us.qna rename to extensions/samples/assets/projects/ControllingConversationFlowSample/knowledge-base/en-us/controllingconversationflowsample.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/ControllingConversationFlowSample/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/ControllingConversationFlowSample/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/language-generation/en-us/controllingconversationflowsample.en-us.lg b/extensions/samples/assets/projects/ControllingConversationFlowSample/language-generation/en-us/controllingconversationflowsample.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/language-generation/en-us/controllingconversationflowsample.en-us.lg rename to extensions/samples/assets/projects/ControllingConversationFlowSample/language-generation/en-us/controllingconversationflowsample.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/language-understanding/en-us/controllingconversationflowsample.en-us.lu b/extensions/samples/assets/projects/ControllingConversationFlowSample/language-understanding/en-us/controllingconversationflowsample.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ControllingConversationFlowSample/language-understanding/en-us/controllingconversationflowsample.en-us.lu rename to extensions/samples/assets/projects/ControllingConversationFlowSample/language-understanding/en-us/controllingconversationflowsample.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/EchoBot/echobot.botproj b/extensions/samples/assets/projects/EchoBot/echobot.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/EchoBot/echobot.botproj rename to extensions/samples/assets/projects/EchoBot/echobot.botproj diff --git a/Composer/plugins/samples/assets/projects/EchoBot/echobot.dialog b/extensions/samples/assets/projects/EchoBot/echobot.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/EchoBot/echobot.dialog rename to extensions/samples/assets/projects/EchoBot/echobot.dialog diff --git a/Composer/plugins/samples/assets/projects/EchoBot/knowledge-base/en-us/echobot.en-us.qna b/extensions/samples/assets/projects/EchoBot/knowledge-base/en-us/echobot.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/EchoBot/knowledge-base/en-us/echobot.en-us.qna rename to extensions/samples/assets/projects/EchoBot/knowledge-base/en-us/echobot.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/EchoBot/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/EchoBot/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/EchoBot/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/EchoBot/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/EchoBot/language-generation/en-us/echobot.en-us.lg b/extensions/samples/assets/projects/EchoBot/language-generation/en-us/echobot.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/EchoBot/language-generation/en-us/echobot.en-us.lg rename to extensions/samples/assets/projects/EchoBot/language-generation/en-us/echobot.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/EchoBot/language-understanding/en-us/echobot.en-us.lu b/extensions/samples/assets/projects/EchoBot/language-understanding/en-us/echobot.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/EchoBot/language-understanding/en-us/echobot.en-us.lu rename to extensions/samples/assets/projects/EchoBot/language-understanding/en-us/echobot.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/EmptyBot/emptybot.botproj b/extensions/samples/assets/projects/EmptyBot/emptybot.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/EmptyBot/emptybot.botproj rename to extensions/samples/assets/projects/EmptyBot/emptybot.botproj diff --git a/Composer/plugins/samples/assets/projects/EmptyBot/emptybot.dialog b/extensions/samples/assets/projects/EmptyBot/emptybot.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/EmptyBot/emptybot.dialog rename to extensions/samples/assets/projects/EmptyBot/emptybot.dialog diff --git a/Composer/plugins/samples/assets/projects/EmptyBot/knowledge-base/en-us/emptybot.en-us.qna b/extensions/samples/assets/projects/EmptyBot/knowledge-base/en-us/emptybot.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/EmptyBot/knowledge-base/en-us/emptybot.en-us.qna rename to extensions/samples/assets/projects/EmptyBot/knowledge-base/en-us/emptybot.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/EmptyBot/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/EmptyBot/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/EmptyBot/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/EmptyBot/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/EmptyBot/language-generation/en-us/emptybot.en-us.lg b/extensions/samples/assets/projects/EmptyBot/language-generation/en-us/emptybot.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/EmptyBot/language-generation/en-us/emptybot.en-us.lg rename to extensions/samples/assets/projects/EmptyBot/language-generation/en-us/emptybot.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/EmptyBot/language-understanding/en-us/emptybot.en-us.lu b/extensions/samples/assets/projects/EmptyBot/language-understanding/en-us/emptybot.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/EmptyBot/language-understanding/en-us/emptybot.en-us.lu rename to extensions/samples/assets/projects/EmptyBot/language-understanding/en-us/emptybot.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/InterruptionSample/dialogs/getprofile/getprofile.dialog b/extensions/samples/assets/projects/InterruptionSample/dialogs/getprofile/getprofile.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/InterruptionSample/dialogs/getprofile/getprofile.dialog rename to extensions/samples/assets/projects/InterruptionSample/dialogs/getprofile/getprofile.dialog diff --git a/Composer/plugins/samples/assets/projects/InterruptionSample/dialogs/getprofile/language-generation/en-us/getprofile.en-us.lg b/extensions/samples/assets/projects/InterruptionSample/dialogs/getprofile/language-generation/en-us/getprofile.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/InterruptionSample/dialogs/getprofile/language-generation/en-us/getprofile.en-us.lg rename to extensions/samples/assets/projects/InterruptionSample/dialogs/getprofile/language-generation/en-us/getprofile.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/InterruptionSample/dialogs/getprofile/language-understanding/en-us/getprofile.en-us.lu b/extensions/samples/assets/projects/InterruptionSample/dialogs/getprofile/language-understanding/en-us/getprofile.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/InterruptionSample/dialogs/getprofile/language-understanding/en-us/getprofile.en-us.lu rename to extensions/samples/assets/projects/InterruptionSample/dialogs/getprofile/language-understanding/en-us/getprofile.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/InterruptionSample/interruptionsample.dialog b/extensions/samples/assets/projects/InterruptionSample/interruptionsample.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/InterruptionSample/interruptionsample.dialog rename to extensions/samples/assets/projects/InterruptionSample/interruptionsample.dialog diff --git a/Composer/plugins/samples/assets/projects/InterruptionSample/interruptionssample.botproj b/extensions/samples/assets/projects/InterruptionSample/interruptionssample.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/InterruptionSample/interruptionssample.botproj rename to extensions/samples/assets/projects/InterruptionSample/interruptionssample.botproj diff --git a/Composer/plugins/samples/assets/projects/InterruptionSample/knowledge-base/en-us/interruptionsample.en-us.qna b/extensions/samples/assets/projects/InterruptionSample/knowledge-base/en-us/interruptionsample.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/InterruptionSample/knowledge-base/en-us/interruptionsample.en-us.qna rename to extensions/samples/assets/projects/InterruptionSample/knowledge-base/en-us/interruptionsample.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/InterruptionSample/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/InterruptionSample/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/InterruptionSample/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/InterruptionSample/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/InterruptionSample/language-generation/en-us/interruptionsample.en-us.lg b/extensions/samples/assets/projects/InterruptionSample/language-generation/en-us/interruptionsample.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/InterruptionSample/language-generation/en-us/interruptionsample.en-us.lg rename to extensions/samples/assets/projects/InterruptionSample/language-generation/en-us/interruptionsample.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/InterruptionSample/language-understanding/en-us/interruptionsample.en-us.lu b/extensions/samples/assets/projects/InterruptionSample/language-understanding/en-us/interruptionsample.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/InterruptionSample/language-understanding/en-us/interruptionsample.en-us.lu rename to extensions/samples/assets/projects/InterruptionSample/language-understanding/en-us/interruptionsample.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/QnAMakerLUISSample/knowledge-base/en-us/qnamakerluissample.en-us.qna b/extensions/samples/assets/projects/QnAMakerLUISSample/knowledge-base/en-us/qnamakerluissample.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/QnAMakerLUISSample/knowledge-base/en-us/qnamakerluissample.en-us.qna rename to extensions/samples/assets/projects/QnAMakerLUISSample/knowledge-base/en-us/qnamakerluissample.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/QnAMakerLUISSample/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/QnAMakerLUISSample/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/QnAMakerLUISSample/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/QnAMakerLUISSample/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/QnAMakerLUISSample/language-generation/en-us/qnamakerluissample.en-us.lg b/extensions/samples/assets/projects/QnAMakerLUISSample/language-generation/en-us/qnamakerluissample.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/QnAMakerLUISSample/language-generation/en-us/qnamakerluissample.en-us.lg rename to extensions/samples/assets/projects/QnAMakerLUISSample/language-generation/en-us/qnamakerluissample.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/QnAMakerLUISSample/language-understanding/en-us/qnamakerluissample.en-us.lu b/extensions/samples/assets/projects/QnAMakerLUISSample/language-understanding/en-us/qnamakerluissample.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/QnAMakerLUISSample/language-understanding/en-us/qnamakerluissample.en-us.lu rename to extensions/samples/assets/projects/QnAMakerLUISSample/language-understanding/en-us/qnamakerluissample.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/QnAMakerLUISSample/qnamakerluissample.botproj b/extensions/samples/assets/projects/QnAMakerLUISSample/qnamakerluissample.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/QnAMakerLUISSample/qnamakerluissample.botproj rename to extensions/samples/assets/projects/QnAMakerLUISSample/qnamakerluissample.botproj diff --git a/Composer/plugins/samples/assets/projects/QnAMakerLUISSample/qnamakerluissample.dialog b/extensions/samples/assets/projects/QnAMakerLUISSample/qnamakerluissample.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/QnAMakerLUISSample/qnamakerluissample.dialog rename to extensions/samples/assets/projects/QnAMakerLUISSample/qnamakerluissample.dialog diff --git a/Composer/plugins/samples/assets/projects/QnASample/knowledge-base/en-us/qnasample.en-us.qna b/extensions/samples/assets/projects/QnASample/knowledge-base/en-us/qnasample.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/QnASample/knowledge-base/en-us/qnasample.en-us.qna rename to extensions/samples/assets/projects/QnASample/knowledge-base/en-us/qnasample.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/QnASample/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/QnASample/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/QnASample/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/QnASample/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/QnASample/language-generation/en-us/qnasample.en-us.lg b/extensions/samples/assets/projects/QnASample/language-generation/en-us/qnasample.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/QnASample/language-generation/en-us/qnasample.en-us.lg rename to extensions/samples/assets/projects/QnASample/language-generation/en-us/qnasample.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/QnASample/language-understanding/en-us/qnasample.en-us.lu b/extensions/samples/assets/projects/QnASample/language-understanding/en-us/qnasample.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/QnASample/language-understanding/en-us/qnasample.en-us.lu rename to extensions/samples/assets/projects/QnASample/language-understanding/en-us/qnasample.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/QnASample/qnasample.botproj b/extensions/samples/assets/projects/QnASample/qnasample.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/QnASample/qnasample.botproj rename to extensions/samples/assets/projects/QnASample/qnasample.botproj diff --git a/Composer/plugins/samples/assets/projects/QnASample/qnasample.dialog b/extensions/samples/assets/projects/QnASample/qnasample.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/QnASample/qnasample.dialog rename to extensions/samples/assets/projects/QnASample/qnasample.dialog diff --git a/Composer/plugins/samples/assets/projects/QnASample/settings/appsettings.json b/extensions/samples/assets/projects/QnASample/settings/appsettings.json similarity index 100% rename from Composer/plugins/samples/assets/projects/QnASample/settings/appsettings.json rename to extensions/samples/assets/projects/QnASample/settings/appsettings.json diff --git a/Composer/plugins/samples/assets/projects/RespondingWithCardsSample/knowledge-base/en-us/respondingwithcardssample.en-us.qna b/extensions/samples/assets/projects/RespondingWithCardsSample/knowledge-base/en-us/respondingwithcardssample.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithCardsSample/knowledge-base/en-us/respondingwithcardssample.en-us.qna rename to extensions/samples/assets/projects/RespondingWithCardsSample/knowledge-base/en-us/respondingwithcardssample.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/adaptiveCard.json b/extensions/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/adaptiveCard.json similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/adaptiveCard.json rename to extensions/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/adaptiveCard.json diff --git a/Composer/plugins/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/respondingwithcardssample.en-us.lg b/extensions/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/respondingwithcardssample.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/respondingwithcardssample.en-us.lg rename to extensions/samples/assets/projects/RespondingWithCardsSample/language-generation/en-us/respondingwithcardssample.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithCardsSample/language-understanding/en-us/respondingwithcardssample.en-us.lu b/extensions/samples/assets/projects/RespondingWithCardsSample/language-understanding/en-us/respondingwithcardssample.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithCardsSample/language-understanding/en-us/respondingwithcardssample.en-us.lu rename to extensions/samples/assets/projects/RespondingWithCardsSample/language-understanding/en-us/respondingwithcardssample.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/RespondingWithCardsSample/respondingwithcardssample.botproj b/extensions/samples/assets/projects/RespondingWithCardsSample/respondingwithcardssample.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithCardsSample/respondingwithcardssample.botproj rename to extensions/samples/assets/projects/RespondingWithCardsSample/respondingwithcardssample.botproj diff --git a/Composer/plugins/samples/assets/projects/RespondingWithCardsSample/respondingwithcardssample.dialog b/extensions/samples/assets/projects/RespondingWithCardsSample/respondingwithcardssample.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithCardsSample/respondingwithcardssample.dialog rename to extensions/samples/assets/projects/RespondingWithCardsSample/respondingwithcardssample.dialog diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/ifelsecondition.dialog b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/ifelsecondition.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/ifelsecondition.dialog rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/ifelsecondition.dialog diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/language-generation/en-us/ifelsecondition.en-us.lg b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/language-generation/en-us/ifelsecondition.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/language-generation/en-us/ifelsecondition.en-us.lg rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/language-generation/en-us/ifelsecondition.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/language-understanding/en-us/ifelsecondition.en-us.lu b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/language-understanding/en-us/ifelsecondition.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/language-understanding/en-us/ifelsecondition.en-us.lu rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/ifelsecondition/language-understanding/en-us/ifelsecondition.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/language-generation/en-us/lgcomposition.en-us.lg b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/language-generation/en-us/lgcomposition.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/language-generation/en-us/lgcomposition.en-us.lg rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/language-generation/en-us/lgcomposition.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/language-understanding/en-us/lgcomposition.en-us.lu b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/language-understanding/en-us/lgcomposition.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/language-understanding/en-us/lgcomposition.en-us.lu rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/language-understanding/en-us/lgcomposition.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/lgcomposition.dialog b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/lgcomposition.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/lgcomposition.dialog rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgcomposition/lgcomposition.dialog diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/language-generation/en-us/lgwithparam.en-us.lg b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/language-generation/en-us/lgwithparam.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/language-generation/en-us/lgwithparam.en-us.lg rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/language-generation/en-us/lgwithparam.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/language-understanding/en-us/lgwithparam.en-us.lu b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/language-understanding/en-us/lgwithparam.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/language-understanding/en-us/lgwithparam.en-us.lu rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/language-understanding/en-us/lgwithparam.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/lgwithparam.dialog b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/lgwithparam.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/lgwithparam.dialog rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/lgwithparam/lgwithparam.dialog diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/language-generation/en-us/multilinetext.en-us.lg b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/language-generation/en-us/multilinetext.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/language-generation/en-us/multilinetext.en-us.lg rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/language-generation/en-us/multilinetext.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/language-understanding/en-us/multilinetext.en-us.lu b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/language-understanding/en-us/multilinetext.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/language-understanding/en-us/multilinetext.en-us.lu rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/language-understanding/en-us/multilinetext.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/multilinetext.dialog b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/multilinetext.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/multilinetext.dialog rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/multilinetext/multilinetext.dialog diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/language-generation/en-us/simpletext.en-us.lg b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/language-generation/en-us/simpletext.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/language-generation/en-us/simpletext.en-us.lg rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/language-generation/en-us/simpletext.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/language-understanding/en-us/simpletext.en-us.lu b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/language-understanding/en-us/simpletext.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/language-understanding/en-us/simpletext.en-us.lu rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/language-understanding/en-us/simpletext.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/simpletext.dialog b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/simpletext.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/simpletext.dialog rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/simpletext/simpletext.dialog diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/language-generation/en-us/structuredlg.en-us.lg b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/language-generation/en-us/structuredlg.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/language-generation/en-us/structuredlg.en-us.lg rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/language-generation/en-us/structuredlg.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/language-understanding/en-us/structuredlg.en-us.lu b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/language-understanding/en-us/structuredlg.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/language-understanding/en-us/structuredlg.en-us.lu rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/language-understanding/en-us/structuredlg.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/structuredlg.dialog b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/structuredlg.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/structuredlg.dialog rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/structuredlg/structuredlg.dialog diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/language-generation/en-us/switchcondition.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/language-understanding/en-us/switchcondition.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/switchcondition.dialog b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/switchcondition.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/switchcondition.dialog rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/switchcondition/switchcondition.dialog diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/language-generation/en-us/textwithmemory.en-us.lg b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/language-generation/en-us/textwithmemory.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/language-generation/en-us/textwithmemory.en-us.lg rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/language-generation/en-us/textwithmemory.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/language-understanding/en-us/textwithmemory.en-us.lu b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/language-understanding/en-us/textwithmemory.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/language-understanding/en-us/textwithmemory.en-us.lu rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/language-understanding/en-us/textwithmemory.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/textwithmemory.dialog b/extensions/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/textwithmemory.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/textwithmemory.dialog rename to extensions/samples/assets/projects/RespondingWithTextSample/dialogs/textwithmemory/textwithmemory.dialog diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/knowledge-base/en-us/respondingwithtextsample.en-us.qna b/extensions/samples/assets/projects/RespondingWithTextSample/knowledge-base/en-us/respondingwithtextsample.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/knowledge-base/en-us/respondingwithtextsample.en-us.qna rename to extensions/samples/assets/projects/RespondingWithTextSample/knowledge-base/en-us/respondingwithtextsample.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/RespondingWithTextSample/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/RespondingWithTextSample/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/language-generation/en-us/respondingwithtextsample.en-us.lg b/extensions/samples/assets/projects/RespondingWithTextSample/language-generation/en-us/respondingwithtextsample.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/language-generation/en-us/respondingwithtextsample.en-us.lg rename to extensions/samples/assets/projects/RespondingWithTextSample/language-generation/en-us/respondingwithtextsample.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/language-understanding/en-us/respondingwithtextsample.en-us.lu b/extensions/samples/assets/projects/RespondingWithTextSample/language-understanding/en-us/respondingwithtextsample.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/language-understanding/en-us/respondingwithtextsample.en-us.lu rename to extensions/samples/assets/projects/RespondingWithTextSample/language-understanding/en-us/respondingwithtextsample.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/respondingwithtextsample.botproj b/extensions/samples/assets/projects/RespondingWithTextSample/respondingwithtextsample.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/respondingwithtextsample.botproj rename to extensions/samples/assets/projects/RespondingWithTextSample/respondingwithtextsample.botproj diff --git a/Composer/plugins/samples/assets/projects/RespondingWithTextSample/respondingwithtextsample.dialog b/extensions/samples/assets/projects/RespondingWithTextSample/respondingwithtextsample.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/RespondingWithTextSample/respondingwithtextsample.dialog rename to extensions/samples/assets/projects/RespondingWithTextSample/respondingwithtextsample.dialog diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/additem.dialog b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/additem.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/additem.dialog rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/additem.dialog diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/language-generation/en-us/additem.en-us.lg b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/language-generation/en-us/additem.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/language-generation/en-us/additem.en-us.lg rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/language-generation/en-us/additem.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/language-understanding/en-us/additem.en-us.lu b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/language-understanding/en-us/additem.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/language-understanding/en-us/additem.en-us.lu rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/additem/language-understanding/en-us/additem.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/deleteitem.dialog b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/deleteitem.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/deleteitem.dialog rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/deleteitem.dialog diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/language-generation/en-us/deleteitem.en-us.lg b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/language-generation/en-us/deleteitem.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/language-generation/en-us/deleteitem.en-us.lg rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/language-generation/en-us/deleteitem.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/language-understanding/en-us/deleteitem.en-us.lu b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/language-understanding/en-us/deleteitem.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/language-understanding/en-us/deleteitem.en-us.lu rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/deleteitem/language-understanding/en-us/deleteitem.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/help.dialog b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/help.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/help.dialog rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/help.dialog diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/language-generation/en-us/help.en-us.lg b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/language-generation/en-us/help.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/language-generation/en-us/help.en-us.lg rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/language-generation/en-us/help.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/language-understanding/en-us/help.en-us.lu b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/language-understanding/en-us/help.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/language-understanding/en-us/help.en-us.lu rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/help/language-understanding/en-us/help.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/language-generation/en-us/userprofile.en-us.lg b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/language-generation/en-us/userprofile.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/language-generation/en-us/userprofile.en-us.lg rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/language-generation/en-us/userprofile.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/language-understanding/en-us/userprofile.en-us.lu b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/language-understanding/en-us/userprofile.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/language-understanding/en-us/userprofile.en-us.lu rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/language-understanding/en-us/userprofile.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/userprofile.dialog b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/userprofile.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/userprofile.dialog rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/userprofile/userprofile.dialog diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/language-generation/en-us/viewitem.en-us.lg b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/language-generation/en-us/viewitem.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/language-generation/en-us/viewitem.en-us.lg rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/language-generation/en-us/viewitem.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/language-understanding/en-us/viewitem.en-us.lu b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/language-understanding/en-us/viewitem.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/language-understanding/en-us/viewitem.en-us.lu rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/language-understanding/en-us/viewitem.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/viewitem.dialog b/extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/viewitem.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/viewitem.dialog rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/dialogs/viewitem/viewitem.dialog diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/knowledge-base/en-us/todobotwithluissample.en-us.qna b/extensions/samples/assets/projects/ToDoBotWithLuisSample/knowledge-base/en-us/todobotwithluissample.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/knowledge-base/en-us/todobotwithluissample.en-us.qna rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/knowledge-base/en-us/todobotwithluissample.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/todobotwithluissample.en-us.lg b/extensions/samples/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/todobotwithluissample.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/todobotwithluissample.en-us.lg rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/language-generation/en-us/todobotwithluissample.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/language-understanding/en-us/todobotwithluissample.en-us.lu b/extensions/samples/assets/projects/ToDoBotWithLuisSample/language-understanding/en-us/todobotwithluissample.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/language-understanding/en-us/todobotwithluissample.en-us.lu rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/language-understanding/en-us/todobotwithluissample.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.botproj b/extensions/samples/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.botproj rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.botproj diff --git a/Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog b/extensions/samples/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog rename to extensions/samples/assets/projects/ToDoBotWithLuisSample/todobotwithluissample.dialog diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/addtodo/addtodo.dialog b/extensions/samples/assets/projects/TodoSample/dialogs/addtodo/addtodo.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/addtodo/addtodo.dialog rename to extensions/samples/assets/projects/TodoSample/dialogs/addtodo/addtodo.dialog diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/addtodo/language-generation/en-us/addtodo.en-us.lg b/extensions/samples/assets/projects/TodoSample/dialogs/addtodo/language-generation/en-us/addtodo.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/addtodo/language-generation/en-us/addtodo.en-us.lg rename to extensions/samples/assets/projects/TodoSample/dialogs/addtodo/language-generation/en-us/addtodo.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/addtodo/language-understanding/en-us/addtodo.en-us.lu b/extensions/samples/assets/projects/TodoSample/dialogs/addtodo/language-understanding/en-us/addtodo.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/addtodo/language-understanding/en-us/addtodo.en-us.lu rename to extensions/samples/assets/projects/TodoSample/dialogs/addtodo/language-understanding/en-us/addtodo.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/cleartodos/cleartodos.dialog b/extensions/samples/assets/projects/TodoSample/dialogs/cleartodos/cleartodos.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/cleartodos/cleartodos.dialog rename to extensions/samples/assets/projects/TodoSample/dialogs/cleartodos/cleartodos.dialog diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/cleartodos/language-generation/en-us/cleartodos.en-us.lg b/extensions/samples/assets/projects/TodoSample/dialogs/cleartodos/language-generation/en-us/cleartodos.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/cleartodos/language-generation/en-us/cleartodos.en-us.lg rename to extensions/samples/assets/projects/TodoSample/dialogs/cleartodos/language-generation/en-us/cleartodos.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/cleartodos/language-understanding/en-us/cleartodos.en-us.lu b/extensions/samples/assets/projects/TodoSample/dialogs/cleartodos/language-understanding/en-us/cleartodos.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/cleartodos/language-understanding/en-us/cleartodos.en-us.lu rename to extensions/samples/assets/projects/TodoSample/dialogs/cleartodos/language-understanding/en-us/cleartodos.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/deletetodo/deletetodo.dialog b/extensions/samples/assets/projects/TodoSample/dialogs/deletetodo/deletetodo.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/deletetodo/deletetodo.dialog rename to extensions/samples/assets/projects/TodoSample/dialogs/deletetodo/deletetodo.dialog diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/deletetodo/language-generation/en-us/deletetodo.en-us.lg b/extensions/samples/assets/projects/TodoSample/dialogs/deletetodo/language-generation/en-us/deletetodo.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/deletetodo/language-generation/en-us/deletetodo.en-us.lg rename to extensions/samples/assets/projects/TodoSample/dialogs/deletetodo/language-generation/en-us/deletetodo.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/deletetodo/language-understanding/en-us/deletetodo.en-us.lu b/extensions/samples/assets/projects/TodoSample/dialogs/deletetodo/language-understanding/en-us/deletetodo.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/deletetodo/language-understanding/en-us/deletetodo.en-us.lu rename to extensions/samples/assets/projects/TodoSample/dialogs/deletetodo/language-understanding/en-us/deletetodo.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/showtodos/language-generation/en-us/showtodos.en-us.lg b/extensions/samples/assets/projects/TodoSample/dialogs/showtodos/language-generation/en-us/showtodos.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/showtodos/language-generation/en-us/showtodos.en-us.lg rename to extensions/samples/assets/projects/TodoSample/dialogs/showtodos/language-generation/en-us/showtodos.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/showtodos/language-understanding/en-us/showtodos.en-us.lu b/extensions/samples/assets/projects/TodoSample/dialogs/showtodos/language-understanding/en-us/showtodos.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/showtodos/language-understanding/en-us/showtodos.en-us.lu rename to extensions/samples/assets/projects/TodoSample/dialogs/showtodos/language-understanding/en-us/showtodos.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/TodoSample/dialogs/showtodos/showtodos.dialog b/extensions/samples/assets/projects/TodoSample/dialogs/showtodos/showtodos.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/dialogs/showtodos/showtodos.dialog rename to extensions/samples/assets/projects/TodoSample/dialogs/showtodos/showtodos.dialog diff --git a/Composer/plugins/samples/assets/projects/TodoSample/knowledge-base/en-us/todosample.en-us.qna b/extensions/samples/assets/projects/TodoSample/knowledge-base/en-us/todosample.en-us.qna similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/knowledge-base/en-us/todosample.en-us.qna rename to extensions/samples/assets/projects/TodoSample/knowledge-base/en-us/todosample.en-us.qna diff --git a/Composer/plugins/samples/assets/projects/TodoSample/language-generation/en-us/common.en-us.lg b/extensions/samples/assets/projects/TodoSample/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/language-generation/en-us/common.en-us.lg rename to extensions/samples/assets/projects/TodoSample/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/TodoSample/language-generation/en-us/todosample.en-us.lg b/extensions/samples/assets/projects/TodoSample/language-generation/en-us/todosample.en-us.lg similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/language-generation/en-us/todosample.en-us.lg rename to extensions/samples/assets/projects/TodoSample/language-generation/en-us/todosample.en-us.lg diff --git a/Composer/plugins/samples/assets/projects/TodoSample/language-understanding/en-us/todosample.en-us.lu b/extensions/samples/assets/projects/TodoSample/language-understanding/en-us/todosample.en-us.lu similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/language-understanding/en-us/todosample.en-us.lu rename to extensions/samples/assets/projects/TodoSample/language-understanding/en-us/todosample.en-us.lu diff --git a/Composer/plugins/samples/assets/projects/TodoSample/todosample.botproj b/extensions/samples/assets/projects/TodoSample/todosample.botproj similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/todosample.botproj rename to extensions/samples/assets/projects/TodoSample/todosample.botproj diff --git a/Composer/plugins/samples/assets/projects/TodoSample/todosample.dialog b/extensions/samples/assets/projects/TodoSample/todosample.dialog similarity index 100% rename from Composer/plugins/samples/assets/projects/TodoSample/todosample.dialog rename to extensions/samples/assets/projects/TodoSample/todosample.dialog diff --git a/Composer/plugins/samples/assets/shared/.gitignore b/extensions/samples/assets/shared/.gitignore similarity index 100% rename from Composer/plugins/samples/assets/shared/.gitignore rename to extensions/samples/assets/shared/.gitignore diff --git a/Composer/plugins/samples/assets/shared/README.md b/extensions/samples/assets/shared/README.md similarity index 100% rename from Composer/plugins/samples/assets/shared/README.md rename to extensions/samples/assets/shared/README.md diff --git a/Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/function-template-with-preexisting-rg.json b/extensions/samples/assets/shared/scripts/DeploymentTemplates/function-template-with-preexisting-rg.json similarity index 100% rename from Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/function-template-with-preexisting-rg.json rename to extensions/samples/assets/shared/scripts/DeploymentTemplates/function-template-with-preexisting-rg.json diff --git a/Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/new-rg-parameters.json b/extensions/samples/assets/shared/scripts/DeploymentTemplates/new-rg-parameters.json similarity index 100% rename from Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/new-rg-parameters.json rename to extensions/samples/assets/shared/scripts/DeploymentTemplates/new-rg-parameters.json diff --git a/Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/preexisting-rg-parameters.json b/extensions/samples/assets/shared/scripts/DeploymentTemplates/preexisting-rg-parameters.json similarity index 100% rename from Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/preexisting-rg-parameters.json rename to extensions/samples/assets/shared/scripts/DeploymentTemplates/preexisting-rg-parameters.json diff --git a/Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/qna-template.json b/extensions/samples/assets/shared/scripts/DeploymentTemplates/qna-template.json similarity index 100% rename from Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/qna-template.json rename to extensions/samples/assets/shared/scripts/DeploymentTemplates/qna-template.json diff --git a/Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/template-with-new-rg.json b/extensions/samples/assets/shared/scripts/DeploymentTemplates/template-with-new-rg.json similarity index 100% rename from Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/template-with-new-rg.json rename to extensions/samples/assets/shared/scripts/DeploymentTemplates/template-with-new-rg.json diff --git a/Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/template-with-preexisting-rg.json b/extensions/samples/assets/shared/scripts/DeploymentTemplates/template-with-preexisting-rg.json similarity index 100% rename from Composer/plugins/samples/assets/shared/scripts/DeploymentTemplates/template-with-preexisting-rg.json rename to extensions/samples/assets/shared/scripts/DeploymentTemplates/template-with-preexisting-rg.json diff --git a/Composer/plugins/samples/assets/shared/scripts/package.json b/extensions/samples/assets/shared/scripts/package.json similarity index 100% rename from Composer/plugins/samples/assets/shared/scripts/package.json rename to extensions/samples/assets/shared/scripts/package.json diff --git a/Composer/plugins/samples/assets/shared/scripts/provisionComposer.js b/extensions/samples/assets/shared/scripts/provisionComposer.js similarity index 100% rename from Composer/plugins/samples/assets/shared/scripts/provisionComposer.js rename to extensions/samples/assets/shared/scripts/provisionComposer.js diff --git a/Composer/plugins/samples/package.json b/extensions/samples/package.json similarity index 87% rename from Composer/plugins/samples/package.json rename to extensions/samples/package.json index 5c92c49fa7..9305660613 100644 --- a/Composer/plugins/samples/package.json +++ b/extensions/samples/package.json @@ -15,5 +15,8 @@ "portfinder": "^1.0.26", "rimraf": "^3.0.2", "uuid": "^7.0.1" + }, + "devDependencies": { + "@types/node": "^14.11.8" } } diff --git a/Composer/plugins/samples/src/index.ts b/extensions/samples/src/index.ts similarity index 100% rename from Composer/plugins/samples/src/index.ts rename to extensions/samples/src/index.ts diff --git a/Composer/plugins/samples/tsconfig.json b/extensions/samples/tsconfig.json similarity index 100% rename from Composer/plugins/samples/tsconfig.json rename to extensions/samples/tsconfig.json diff --git a/Composer/plugins/samples/yarn.lock b/extensions/samples/yarn.lock similarity index 93% rename from Composer/plugins/samples/yarn.lock rename to extensions/samples/yarn.lock index 91d07afb9a..5e8e3282ee 100644 --- a/Composer/plugins/samples/yarn.lock +++ b/extensions/samples/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@types/node@^14.11.8": + version "14.11.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.8.tgz#fe2012f2355e4ce08bca44aeb3abbb21cf88d33f" + integrity sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxcUzsh2P2Pw== + async@^2.6.2: version "2.6.3" resolved "https://registry.npmjs.org/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" diff --git a/Composer/plugins/vacore/.eslintrc.js b/extensions/vacore/.eslintrc.js similarity index 100% rename from Composer/plugins/vacore/.eslintrc.js rename to extensions/vacore/.eslintrc.js diff --git a/Composer/plugins/vacore/.gitignore b/extensions/vacore/.gitignore similarity index 100% rename from Composer/plugins/vacore/.gitignore rename to extensions/vacore/.gitignore diff --git a/Composer/plugins/vacore/package.json b/extensions/vacore/package.json similarity index 89% rename from Composer/plugins/vacore/package.json rename to extensions/vacore/package.json index bbbbd6c218..2c41c6e8ef 100644 --- a/Composer/plugins/vacore/package.json +++ b/extensions/vacore/package.json @@ -18,5 +18,8 @@ "portfinder": "^1.0.26", "rimraf": "^3.0.2", "uuid": "^7.0.1" + }, + "devDependencies": { + "@types/node": "^14.11.8" } } diff --git a/Composer/plugins/vacore/src/index.ts b/extensions/vacore/src/index.ts similarity index 100% rename from Composer/plugins/vacore/src/index.ts rename to extensions/vacore/src/index.ts diff --git a/Composer/plugins/vacore/template/assistant.dialog b/extensions/vacore/template/assistant.dialog similarity index 100% rename from Composer/plugins/vacore/template/assistant.dialog rename to extensions/vacore/template/assistant.dialog diff --git a/Composer/plugins/vacore/template/dialogs/Chit-chat/Chit-chat.dialog b/extensions/vacore/template/dialogs/Chit-chat/Chit-chat.dialog similarity index 100% rename from Composer/plugins/vacore/template/dialogs/Chit-chat/Chit-chat.dialog rename to extensions/vacore/template/dialogs/Chit-chat/Chit-chat.dialog diff --git a/Composer/plugins/vacore/template/dialogs/Chit-chat/knowledge-base/en-us/Chit-chat.en-us.qna b/extensions/vacore/template/dialogs/Chit-chat/knowledge-base/en-us/Chit-chat.en-us.qna similarity index 100% rename from Composer/plugins/vacore/template/dialogs/Chit-chat/knowledge-base/en-us/Chit-chat.en-us.qna rename to extensions/vacore/template/dialogs/Chit-chat/knowledge-base/en-us/Chit-chat.en-us.qna diff --git a/Composer/plugins/vacore/template/dialogs/Chit-chat/language-generation/en-us/Chit-chat.en-us.lg b/extensions/vacore/template/dialogs/Chit-chat/language-generation/en-us/Chit-chat.en-us.lg similarity index 100% rename from Composer/plugins/vacore/template/dialogs/Chit-chat/language-generation/en-us/Chit-chat.en-us.lg rename to extensions/vacore/template/dialogs/Chit-chat/language-generation/en-us/Chit-chat.en-us.lg diff --git a/Composer/plugins/vacore/template/dialogs/Chit-chat/language-understanding/en-us/Chit-chat.en-us.lu b/extensions/vacore/template/dialogs/Chit-chat/language-understanding/en-us/Chit-chat.en-us.lu similarity index 100% rename from Composer/plugins/vacore/template/dialogs/Chit-chat/language-understanding/en-us/Chit-chat.en-us.lu rename to extensions/vacore/template/dialogs/Chit-chat/language-understanding/en-us/Chit-chat.en-us.lu diff --git a/Composer/plugins/vacore/template/dialogs/FAQ/FAQ.dialog b/extensions/vacore/template/dialogs/FAQ/FAQ.dialog similarity index 100% rename from Composer/plugins/vacore/template/dialogs/FAQ/FAQ.dialog rename to extensions/vacore/template/dialogs/FAQ/FAQ.dialog diff --git a/Composer/plugins/vacore/template/dialogs/FAQ/language-generation/en-us/FAQ.en-us.lg b/extensions/vacore/template/dialogs/FAQ/language-generation/en-us/FAQ.en-us.lg similarity index 100% rename from Composer/plugins/vacore/template/dialogs/FAQ/language-generation/en-us/FAQ.en-us.lg rename to extensions/vacore/template/dialogs/FAQ/language-generation/en-us/FAQ.en-us.lg diff --git a/Composer/plugins/vacore/template/dialogs/FAQ/language-understanding/en-us/FAQ.en-us.lu b/extensions/vacore/template/dialogs/FAQ/language-understanding/en-us/FAQ.en-us.lu similarity index 100% rename from Composer/plugins/vacore/template/dialogs/FAQ/language-understanding/en-us/FAQ.en-us.lu rename to extensions/vacore/template/dialogs/FAQ/language-understanding/en-us/FAQ.en-us.lu diff --git a/Composer/plugins/vacore/template/dialogs/General/General.dialog b/extensions/vacore/template/dialogs/General/General.dialog similarity index 100% rename from Composer/plugins/vacore/template/dialogs/General/General.dialog rename to extensions/vacore/template/dialogs/General/General.dialog diff --git a/Composer/plugins/vacore/template/dialogs/General/language-generation/en-us/General.en-us.lg b/extensions/vacore/template/dialogs/General/language-generation/en-us/General.en-us.lg similarity index 100% rename from Composer/plugins/vacore/template/dialogs/General/language-generation/en-us/General.en-us.lg rename to extensions/vacore/template/dialogs/General/language-generation/en-us/General.en-us.lg diff --git a/Composer/plugins/vacore/template/dialogs/General/language-understanding/en-us/General.en-us.lu b/extensions/vacore/template/dialogs/General/language-understanding/en-us/General.en-us.lu similarity index 100% rename from Composer/plugins/vacore/template/dialogs/General/language-understanding/en-us/General.en-us.lu rename to extensions/vacore/template/dialogs/General/language-understanding/en-us/General.en-us.lu diff --git a/Composer/plugins/vacore/template/dialogs/Onboarding/Onboarding.dialog b/extensions/vacore/template/dialogs/Onboarding/Onboarding.dialog similarity index 100% rename from Composer/plugins/vacore/template/dialogs/Onboarding/Onboarding.dialog rename to extensions/vacore/template/dialogs/Onboarding/Onboarding.dialog diff --git a/Composer/plugins/vacore/template/dialogs/Onboarding/language-generation/en-us/Onboarding.en-us.lg b/extensions/vacore/template/dialogs/Onboarding/language-generation/en-us/Onboarding.en-us.lg similarity index 100% rename from Composer/plugins/vacore/template/dialogs/Onboarding/language-generation/en-us/Onboarding.en-us.lg rename to extensions/vacore/template/dialogs/Onboarding/language-generation/en-us/Onboarding.en-us.lg diff --git a/Composer/plugins/vacore/template/dialogs/Onboarding/language-understanding/en-us/Onboarding.en-us.lu b/extensions/vacore/template/dialogs/Onboarding/language-understanding/en-us/Onboarding.en-us.lu similarity index 100% rename from Composer/plugins/vacore/template/dialogs/Onboarding/language-understanding/en-us/Onboarding.en-us.lu rename to extensions/vacore/template/dialogs/Onboarding/language-understanding/en-us/Onboarding.en-us.lu diff --git a/Composer/plugins/vacore/template/language-generation/en-us/assistant.en-us.lg b/extensions/vacore/template/language-generation/en-us/assistant.en-us.lg similarity index 100% rename from Composer/plugins/vacore/template/language-generation/en-us/assistant.en-us.lg rename to extensions/vacore/template/language-generation/en-us/assistant.en-us.lg diff --git a/Composer/plugins/vacore/template/language-generation/en-us/common.en-us.lg b/extensions/vacore/template/language-generation/en-us/common.en-us.lg similarity index 100% rename from Composer/plugins/vacore/template/language-generation/en-us/common.en-us.lg rename to extensions/vacore/template/language-generation/en-us/common.en-us.lg diff --git a/Composer/plugins/vacore/template/language-generation/en-us/general.en-us.lg b/extensions/vacore/template/language-generation/en-us/general.en-us.lg similarity index 100% rename from Composer/plugins/vacore/template/language-generation/en-us/general.en-us.lg rename to extensions/vacore/template/language-generation/en-us/general.en-us.lg diff --git a/Composer/plugins/vacore/template/language-generation/en-us/virtualassistant.en-us.lg b/extensions/vacore/template/language-generation/en-us/virtualassistant.en-us.lg similarity index 100% rename from Composer/plugins/vacore/template/language-generation/en-us/virtualassistant.en-us.lg rename to extensions/vacore/template/language-generation/en-us/virtualassistant.en-us.lg diff --git a/Composer/plugins/vacore/template/language-understanding/en-us/assistant.en-us.lu b/extensions/vacore/template/language-understanding/en-us/assistant.en-us.lu similarity index 100% rename from Composer/plugins/vacore/template/language-understanding/en-us/assistant.en-us.lu rename to extensions/vacore/template/language-understanding/en-us/assistant.en-us.lu diff --git a/Composer/plugins/vacore/template/language-understanding/en-us/virtualassistant.en-us.lu b/extensions/vacore/template/language-understanding/en-us/virtualassistant.en-us.lu similarity index 100% rename from Composer/plugins/vacore/template/language-understanding/en-us/virtualassistant.en-us.lu rename to extensions/vacore/template/language-understanding/en-us/virtualassistant.en-us.lu diff --git a/Composer/plugins/vacore/template/readme.md b/extensions/vacore/template/readme.md similarity index 100% rename from Composer/plugins/vacore/template/readme.md rename to extensions/vacore/template/readme.md diff --git a/Composer/plugins/vacore/template/settings/appsettings.json b/extensions/vacore/template/settings/appsettings.json similarity index 100% rename from Composer/plugins/vacore/template/settings/appsettings.json rename to extensions/vacore/template/settings/appsettings.json diff --git a/Composer/plugins/vacore/template/virtualassistant.dialog b/extensions/vacore/template/virtualassistant.dialog similarity index 100% rename from Composer/plugins/vacore/template/virtualassistant.dialog rename to extensions/vacore/template/virtualassistant.dialog diff --git a/Composer/plugins/vacore/tsconfig.json b/extensions/vacore/tsconfig.json similarity index 100% rename from Composer/plugins/vacore/tsconfig.json rename to extensions/vacore/tsconfig.json diff --git a/Composer/plugins/vacore/yarn.lock b/extensions/vacore/yarn.lock similarity index 98% rename from Composer/plugins/vacore/yarn.lock rename to extensions/vacore/yarn.lock index 08c94925e1..d1cbceaef8 100644 --- a/Composer/plugins/vacore/yarn.lock +++ b/extensions/vacore/yarn.lock @@ -23,6 +23,11 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" +"@types/node@^14.11.8": + version "14.11.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.8.tgz#fe2012f2355e4ce08bca44aeb3abbb21cf88d33f" + integrity sha512-KPcKqKm5UKDkaYPTuXSx8wEP7vE9GnuaXIZKijwRYcePpZFDVuy2a57LarFKiORbHOuTOOwYzxVxcUzsh2P2Pw== + adm-zip@^0.4.14: version "0.4.16" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" diff --git a/Composer/plugins/webRoute/index.js b/extensions/webRoute/index.js similarity index 100% rename from Composer/plugins/webRoute/index.js rename to extensions/webRoute/index.js diff --git a/Composer/plugins/webRoute/package.json b/extensions/webRoute/package.json similarity index 100% rename from Composer/plugins/webRoute/package.json rename to extensions/webRoute/package.json diff --git a/runtime/dotnet/tests/ActionsTests.cs b/runtime/dotnet/tests/ActionsTests.cs index 0767f86d7e..5f47f30508 100644 --- a/runtime/dotnet/tests/ActionsTests.cs +++ b/runtime/dotnet/tests/ActionsTests.cs @@ -21,7 +21,7 @@ public class ActionsTests { private static string getOsPath(string path) => Path.Combine(path.TrimEnd('\\').Split('\\')); - private static readonly string samplesDirectory = getOsPath(@"..\..\..\..\..\..\Composer\plugins\samples\assets\projects"); + private static readonly string samplesDirectory = getOsPath(@"..\..\..\..\..\..\extensions\samples\assets\projects"); private static string getFolderPath(string path) { @@ -226,7 +226,7 @@ private TestFlow BuildTestFlow(string folderPath, bool sendTrace = false) resourceExplorer.AddFolder(folderPath); adapter .UseStorage(storage) - .UseBotState(userState, convoState) + .UseBotState(userState, convoState) .Use(new TranscriptLoggerMiddleware(new FileTranscriptLogger())); var resource = resourceExplorer.GetResource("actionssample.dialog"); @@ -245,4 +245,4 @@ private TestFlow BuildTestFlow(string folderPath, bool sendTrace = false) } } } - + diff --git a/runtime/dotnet/tests/ControllingConversationTests.cs b/runtime/dotnet/tests/ControllingConversationTests.cs index 8922c9b099..b40b2b45b1 100644 --- a/runtime/dotnet/tests/ControllingConversationTests.cs +++ b/runtime/dotnet/tests/ControllingConversationTests.cs @@ -21,7 +21,7 @@ public class ControllingConversationTests { private static string getOsPath(string path) => Path.Combine(path.TrimEnd('\\').Split('\\')); - private static readonly string samplesDirectory = getOsPath(@"..\..\..\..\..\..\Composer\plugins\samples\assets\projects"); + private static readonly string samplesDirectory = getOsPath(@"..\..\..\..\..\..\extensions\samples\assets\projects"); private static ResourceExplorer resourceExplorer = new ResourceExplorer(); diff --git a/runtime/dotnet/tests/InputsTests.cs b/runtime/dotnet/tests/InputsTests.cs index f22f7c83bf..418d92db27 100644 --- a/runtime/dotnet/tests/InputsTests.cs +++ b/runtime/dotnet/tests/InputsTests.cs @@ -21,7 +21,7 @@ public class InputsTests { private static string getOsPath(string path) => Path.Combine(path.TrimEnd('\\').Split('\\')); - private static readonly string samplesDirectory = getOsPath(@"..\..\..\..\..\..\Composer\plugins\samples\assets\projects"); + private static readonly string samplesDirectory = getOsPath(@"..\..\..\..\..\..\extensions\samples\assets\projects"); private static ResourceExplorer resourceExplorer = new ResourceExplorer(); diff --git a/runtime/dotnet/tests/MessageTests.cs b/runtime/dotnet/tests/MessageTests.cs index 09b27ca711..9ac5b8162a 100644 --- a/runtime/dotnet/tests/MessageTests.cs +++ b/runtime/dotnet/tests/MessageTests.cs @@ -21,7 +21,7 @@ public class MessageTests { private static string getOsPath(string path) => Path.Combine(path.TrimEnd('\\').Split('\\')); - private static readonly string samplesDirectory = getOsPath(@"..\..\..\..\..\..\Composer\plugins\samples\assets\projects"); + private static readonly string samplesDirectory = getOsPath(@"..\..\..\..\..\..\extensions\samples\assets\projects"); private static ResourceExplorer resourceExplorer = new ResourceExplorer(); diff --git a/runtime/dotnet/tests/ToDoBotTests.cs b/runtime/dotnet/tests/ToDoBotTests.cs index 00660fc3b5..6de1dbfb8f 100644 --- a/runtime/dotnet/tests/ToDoBotTests.cs +++ b/runtime/dotnet/tests/ToDoBotTests.cs @@ -14,14 +14,14 @@ using System.IO; using System.Threading.Tasks; -namespace Tests +namespace Tests { [TestClass] public class ToDoBotTests { private static string getOsPath(string path) => Path.Combine(path.TrimEnd('\\').Split('\\')); - private static readonly string samplesDirectory = getOsPath(@"..\..\..\..\..\..\Composer\plugins\samples\assets\projects"); + private static readonly string samplesDirectory = getOsPath(@"..\..\..\..\..\..\extensions\samples\assets\projects"); private static ResourceExplorer resourceExplorer = new ResourceExplorer(); diff --git a/runtime/node/__tests__/actions.test.ts b/runtime/node/__tests__/actions.test.ts index b91ff84c37..ee17a546d5 100644 --- a/runtime/node/__tests__/actions.test.ts +++ b/runtime/node/__tests__/actions.test.ts @@ -1,64 +1,49 @@ -import * as path from "path"; -import { ResourceExplorer } from "botbuilder-dialogs-declarative"; -import { AdaptiveDialogComponentRegistration } from "botbuilder-dialogs-adaptive"; -import { - TestAdapter, - ConversationState, - MemoryStorage, - UserState, -} from "botbuilder"; -import { ComposerBot } from "../src/shared/composerBot"; -import { SkillConversationIdFactory } from "../src/shared/skillConversationIdFactory"; -import * as helpers from "../src/shared/helpers"; -import { ActivityTypes, Activity, ChannelAccount } from "botframework-schema"; -import { TurnContext } from "botbuilder-core"; +import * as path from 'path'; +import { ResourceExplorer } from 'botbuilder-dialogs-declarative'; +import { AdaptiveDialogComponentRegistration } from 'botbuilder-dialogs-adaptive'; +import { TestAdapter, ConversationState, MemoryStorage, UserState } from 'botbuilder'; +import { ComposerBot } from '../src/shared/composerBot'; +import { SkillConversationIdFactory } from '../src/shared/skillConversationIdFactory'; +import * as helpers from '../src/shared/helpers'; +import { ActivityTypes, Activity, ChannelAccount } from 'botframework-schema'; +import { TurnContext } from 'botbuilder-core'; -const samplesDirectory = path.resolve( - __dirname, - "../../../Composer/plugins/samples/assets/projects", - "ActionsSample" -); +const samplesDirectory = path.resolve(__dirname, '../../../extensions/samples/assets/projects', 'ActionsSample'); const resourceExplorer = new ResourceExplorer(); const basicActiivty: Partial = { - channelId: "test", - serviceUrl: "https://test.com", - from: { id: "user1", name: "User1" }, - recipient: { id: "bot", name: "Bot" }, - locale: "en-us", + channelId: 'test', + serviceUrl: 'https://test.com', + from: { id: 'user1', name: 'User1' }, + recipient: { id: 'bot', name: 'Bot' }, + locale: 'en-us', conversation: { isGroup: false, - conversationType: "testFlowConversationId", - id: "testFlowConversationId", - tenantId: "test", - name: "test", + conversationType: 'testFlowConversationId', + id: 'testFlowConversationId', + tenantId: 'test', + name: 'test', }, }; const conversationUpdateActivity = { ...basicActiivty, type: ActivityTypes.ConversationUpdate, - membersAdded: [{ id: "test", name: "testAccount" } as ChannelAccount], + membersAdded: [{ id: 'test', name: 'testAccount' } as ChannelAccount], membersRemoved: [], } as Activity; let bot: ComposerBot; let adapter: TestAdapter; -const getProjectRoot = jest - .spyOn(helpers, "getProjectRoot") - .mockImplementation(() => samplesDirectory); -const getSettings = jest - .spyOn(helpers, "getSettings") - .mockImplementation((root: string) => { - return { defaultLocale: "en-us" }; - }); +const getProjectRoot = jest.spyOn(helpers, 'getProjectRoot').mockImplementation(() => samplesDirectory); +const getSettings = jest.spyOn(helpers, 'getSettings').mockImplementation((root: string) => { + return { defaultLocale: 'en-us' }; +}); beforeAll(() => { - resourceExplorer.addFolders(samplesDirectory, ["runtime"], false); - resourceExplorer.addComponent( - new AdaptiveDialogComponentRegistration(resourceExplorer) - ); + resourceExplorer.addFolders(samplesDirectory, ['runtime'], false); + resourceExplorer.addComponent(new AdaptiveDialogComponentRegistration(resourceExplorer)); adapter = new TestAdapter( async (context: TurnContext): Promise => { // Route activity to bot. @@ -77,11 +62,7 @@ beforeEach(() => { const conversationState = new ConversationState(memoryStorage); // Create shared skill conversation id factory instance. const skillConversationIdFactory = new SkillConversationIdFactory(); - bot = new ComposerBot( - userState, - conversationState, - skillConversationIdFactory - ); + bot = new ComposerBot(userState, conversationState, skillConversationIdFactory); }); afterEach(() => { @@ -89,167 +70,159 @@ afterEach(() => { bot = null; }); -describe("test runtime used ActionsSample", () => { - it("Actions_01Actions", async () => { +describe('test runtime used ActionsSample', () => { + it('Actions_01Actions', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' ) - .send("01") - .assertReply("Step 1") - .assertReply("Step 2") - .assertReply("Step 3") - .assertReply("user.age is set to 18") - .assertReply("user.age is set to null") + .send('01') + .assertReply('Step 1') + .assertReply('Step 2') + .assertReply('Step 3') + .assertReply('user.age is set to 18') + .assertReply('user.age is set to null') .startTest(); }); - it("Actions_02EndTurn", async () => { + it('Actions_02EndTurn', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' ) - .send("02") + .send('02') .assertReply("What's up?") - .send("Nothing") - .assertReply("Oh I see!") + .send('Nothing') + .assertReply('Oh I see!') .startTest(); }); - it("Actions_03IfCondition", async () => { + it('Actions_03IfCondition', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' ) - .send("03") + .send('03') .assertReply("Hello, I'm Zoidberg. What is your name?") - .send("Carlos") - .assertReply("Hello Carlos, nice to talk to you!") + .send('Carlos') + .assertReply('Hello Carlos, nice to talk to you!') .startTest(); }); - it("Actions_04EditArray", async () => { + it('Actions_04EditArray', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" - ) - .send("04") - .assertReply("Here are the index and values in the array.") - .assertReply("0: 11111") - .assertReply("1: 40000") - .assertReply("2: 222222") - .assertReply( - "If each page shows two items, here are the index and values" - ) - .assertReply("0: 11111") - .assertReply("1: 40000") - .assertReply("0: 222222") + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' + ) + .send('04') + .assertReply('Here are the index and values in the array.') + .assertReply('0: 11111') + .assertReply('1: 40000') + .assertReply('2: 222222') + .assertReply('If each page shows two items, here are the index and values') + .assertReply('0: 11111') + .assertReply('1: 40000') + .assertReply('0: 222222') .startTest(); }); - it("Actions_05EndDialog", async () => { + it('Actions_05EndDialog', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' ) - .send("05") + .send('05') .assertReply("Hello, I'm Zoidberg. What is your name?") - .send("luhan") - .assertReply("Hello luhan, nice to talk to you!") + .send('luhan') + .assertReply('Hello luhan, nice to talk to you!') .assertReply('I\'m a joke bot. To get started say "joke".') - .send("joke") - .assertReply("Why did the chicken cross the road?") + .send('joke') + .assertReply('Why did the chicken cross the road?') .send("I don't know") - .assertReply("To get to the other side!") + .assertReply('To get to the other side!') .startTest(); }); - it("Actions_06SwitchCondition", async () => { + it('Actions_06SwitchCondition', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' ) - .send("07") - .assertReply( - "Please select a value from below:\n\n 1. Test1\n 2. Test2\n 3. Test3" - ) - .send("Test1") - .assertReply("You select: Test1") - .assertReply("You select: 1") + .send('07') + .assertReply('Please select a value from below:\n\n 1. Test1\n 2. Test2\n 3. Test3') + .send('Test1') + .assertReply('You select: Test1') + .assertReply('You select: 1') .startTest(); }); - it("Actions_07RepeatDialog", async () => { + it('Actions_07RepeatDialog', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" - ) - .send("08") - .assertReply( - "Do you want to repeat this dialog, yes to repeat, no to end this dialog (1) Yes or (2) No" - ) - .send("Yes") - .assertReply( - "Do you want to repeat this dialog, yes to repeat, no to end this dialog (1) Yes or (2) No" + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' ) - .send("No") + .send('08') + .assertReply('Do you want to repeat this dialog, yes to repeat, no to end this dialog (1) Yes or (2) No') + .send('Yes') + .assertReply('Do you want to repeat this dialog, yes to repeat, no to end this dialog (1) Yes or (2) No') + .send('No') .startTest(); }); - it("Actions_09EditActions", async () => { + it('Actions_09EditActions', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' ) - .send("10") + .send('10') .assertReply("Hello, I'm Zoidberg. What is your name?") - .send("luhan") - .assertReply("Hello luhan, nice to talk to you!") - .assertReply("Goodbye!") + .send('luhan') + .assertReply('Hello luhan, nice to talk to you!') + .assertReply('Goodbye!') .startTest(); }); - it("Actions_10ReplaceDialog", async () => { + it('Actions_10ReplaceDialog', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' ) - .send("11") + .send('11') .assertReply("Hello, I'm Zoidberg. What is your name?") - .send("luhan") + .send('luhan') .assertReply( "Hello luhan, nice to talk to you! Please either enter 'joke' or 'fortune' to replace the dialog you want." ) - .send("joke") - .assertReply("Why did the chicken cross the road?") - .send("Why?") - .assertReply("To get to the other side!") - .send("future") - .assertReply("Seeing into your future...") - .assertReply("I see great things in your future!") - .assertReply("Potentially a successful demo") + .send('joke') + .assertReply('Why did the chicken cross the road?') + .send('Why?') + .assertReply('To get to the other side!') + .send('future') + .assertReply('Seeing into your future...') + .assertReply('I see great things in your future!') + .assertReply('Potentially a successful demo') .startTest(); }); - it("Actions_11EmitEvent", async () => { + it('Actions_11EmitEvent', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' ) - .send("12") - .assertReply("Say moo to get a response, say emit to emit a event.") - .send("moo") - .assertReply("Yippee ki-yay!") - .send("emit") - .assertReply("CustomEvent Fired.") + .send('12') + .assertReply('Say moo to get a response, say emit to emit a event.') + .send('moo') + .assertReply('Yippee ki-yay!') + .send('emit') + .assertReply('CustomEvent Fired.') .startTest(); }); - it("Actions_08TraceAndLog", async () => { + it('Actions_08TraceAndLog', async () => { // use different adapter to support trace activity adapter = new TestAdapter( async (context: TurnContext): Promise => { @@ -262,10 +235,10 @@ describe("test runtime used ActionsSample", () => { await adapter .send(conversationUpdateActivity) .assertReply( - "I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker" + 'I can show you examples on how to use actions. Enter the number next to the entity that you with to see in action.\n01 - Actions\n02 - EndTurn\n03 - IfCondiftion\n04 - EditArray, Foreach\n05 - EndDialog\n06 - HttpRequest\n07 - SwitchCondition\n08 - RepeatDialog\n09 - TraceAndLog\n10 - EditActions\n11 - ReplaceDialog\n12 - EmitEvent\n13 - QnAMaker' ) - .send("09") - .send("luhan") + .send('09') + .send('luhan') .assertReply((activity) => { expect(activity.type).toBe(ActivityTypes.Trace); }) diff --git a/runtime/node/__tests__/controllingConversation.test.ts b/runtime/node/__tests__/controllingConversation.test.ts index 4f452de7f6..21aa696328 100644 --- a/runtime/node/__tests__/controllingConversation.test.ts +++ b/runtime/node/__tests__/controllingConversation.test.ts @@ -1,64 +1,53 @@ -import * as path from "path"; -import { ResourceExplorer } from "botbuilder-dialogs-declarative"; -import { AdaptiveDialogComponentRegistration } from "botbuilder-dialogs-adaptive"; -import { - TestAdapter, - ConversationState, - MemoryStorage, - UserState, -} from "botbuilder"; -import { ComposerBot } from "../src/shared/composerBot"; -import { ActivityTypes, Activity, ChannelAccount } from "botframework-schema"; -import { TurnContext } from "botbuilder-core"; -import * as helpers from "../src/shared/helpers"; -import { SkillConversationIdFactory } from "../src/shared/skillConversationIdFactory"; +import * as path from 'path'; +import { ResourceExplorer } from 'botbuilder-dialogs-declarative'; +import { AdaptiveDialogComponentRegistration } from 'botbuilder-dialogs-adaptive'; +import { TestAdapter, ConversationState, MemoryStorage, UserState } from 'botbuilder'; +import { ComposerBot } from '../src/shared/composerBot'; +import { ActivityTypes, Activity, ChannelAccount } from 'botframework-schema'; +import { TurnContext } from 'botbuilder-core'; +import * as helpers from '../src/shared/helpers'; +import { SkillConversationIdFactory } from '../src/shared/skillConversationIdFactory'; const samplesDirectory = path.resolve( __dirname, - "../../../Composer/plugins/samples/assets/projects", - "ControllingConversationFlowSample" + '../../../extensions/samples/assets/projects', + 'ControllingConversationFlowSample' ); const resourceExplorer = new ResourceExplorer(); const basicActiivty: Partial = { - channelId: "test", - serviceUrl: "https://test.com", - from: { id: "user1", name: "User1" }, - recipient: { id: "bot", name: "Bot" }, - locale: "en-us", + channelId: 'test', + serviceUrl: 'https://test.com', + from: { id: 'user1', name: 'User1' }, + recipient: { id: 'bot', name: 'Bot' }, + locale: 'en-us', conversation: { isGroup: false, - conversationType: "testFlowConversationId", - id: "testFlowConversationId", - tenantId: "test", - name: "test", + conversationType: 'testFlowConversationId', + id: 'testFlowConversationId', + tenantId: 'test', + name: 'test', }, }; const conversationUpdateActivity = { ...basicActiivty, type: ActivityTypes.ConversationUpdate, - membersAdded: [{ id: "test", name: "testAccount" } as ChannelAccount], + membersAdded: [{ id: 'test', name: 'testAccount' } as ChannelAccount], membersRemoved: [], } as Activity; -const getProjectRoot = jest - .spyOn(helpers, "getProjectRoot") - .mockImplementation(() => samplesDirectory); -const getSettings = jest - .spyOn(helpers, "getSettings") - .mockImplementation((root: string) => { - return { defaultLocale: "en-us" }; - }); +const getProjectRoot = jest.spyOn(helpers, 'getProjectRoot').mockImplementation(() => samplesDirectory); +const getSettings = jest.spyOn(helpers, 'getSettings').mockImplementation((root: string) => { + return { defaultLocale: 'en-us' }; +}); let bot: ComposerBot; let adapter: TestAdapter; beforeAll(() => { - resourceExplorer.addFolders(samplesDirectory, ["runtime"], false); - resourceExplorer.addComponent( - new AdaptiveDialogComponentRegistration(resourceExplorer) - ); + resourceExplorer.addFolders(samplesDirectory, ['runtime'], false); + resourceExplorer.addComponent(new AdaptiveDialogComponentRegistration(resourceExplorer)); adapter = new TestAdapter( async (context: TurnContext): Promise => { // Route activity to bot. @@ -75,68 +64,58 @@ beforeAll(() => { const conversationState = new ConversationState(memoryStorage); // Create shared skill conversation id factory instance. const skillConversationIdFactory = new SkillConversationIdFactory(); - bot = new ComposerBot( - userState, - conversationState, - skillConversationIdFactory - ); + bot = new ComposerBot(userState, conversationState, skillConversationIdFactory); }); afterAll(() => { bot = null; adapter = null; }); -describe("test runtime used ControllingConversationFlowSample", () => { - it("runtime can Controlling Conversation", async () => { +describe('test runtime used ControllingConversationFlowSample', () => { + it('runtime can Controlling Conversation', async () => { await adapter .send(conversationUpdateActivity) .assertReply( 'Welcome to the Controlling Conversation sample. Choose from the list below to try.\nYou can also type "Cancel" to cancel any dialog or "Endturn" to explicitly accept an input.' ) - .send("01") + .send('01') .assertReply("Hello, What's your age?") - .send("18") - .assertReply( - "Your age is 18 which satisified the condition that was evaluated" - ) - .send("02") - .assertReply("Who are your?\n\n 1. Susan\n 2. Nick\n 3. Tom") - .send("2") - .assertReply("You selected Nick") + .send('18') + .assertReply('Your age is 18 which satisified the condition that was evaluated') + .send('02') + .assertReply('Who are your?\n\n 1. Susan\n 2. Nick\n 3. Tom') + .send('2') + .assertReply('You selected Nick') .assertReply('This is the logic inside the "Nick" switch block.') - .send("03") - .assertReply("Pushed dialog.id into a list") - .assertReply("0: 11111") - .assertReply("1: 40000") - .assertReply("2: 222222") - .send("04") - .assertReply("Pushed dialog.ids into a list") - .assertReply("0: 11111") - .assertReply("1: 40000") - .assertReply("0: 222222") - .send("06") - .send("hi") - .send("07") - .assertReply( - "Do you want to repeat this dialog, yes to repeat, no to end this dialog (1) Yes or (2) No" - ) - .send("Yes") - .assertReply( - "Do you want to repeat this dialog, yes to repeat, no to end this dialog (1) Yes or (2) No" - ) - .send("No") - .send("08") - .assertReply("In continue loop, which only outputs dual.") - .assertReply("index: 1 value: 2") - .assertReply("index: 3 value: 4") - .assertReply("index: 5 value: 6") - .assertReply("In break loop, which breaks when index > 2") - .assertReply("index: 0 value: 1") - .assertReply("index: 1 value: 2") - .assertReply("index: 2 value: 3") - .assertReply("done") - .send("09") - .assertReply("counter: 1") - .assertReply("counter: 2") + .send('03') + .assertReply('Pushed dialog.id into a list') + .assertReply('0: 11111') + .assertReply('1: 40000') + .assertReply('2: 222222') + .send('04') + .assertReply('Pushed dialog.ids into a list') + .assertReply('0: 11111') + .assertReply('1: 40000') + .assertReply('0: 222222') + .send('06') + .send('hi') + .send('07') + .assertReply('Do you want to repeat this dialog, yes to repeat, no to end this dialog (1) Yes or (2) No') + .send('Yes') + .assertReply('Do you want to repeat this dialog, yes to repeat, no to end this dialog (1) Yes or (2) No') + .send('No') + .send('08') + .assertReply('In continue loop, which only outputs dual.') + .assertReply('index: 1 value: 2') + .assertReply('index: 3 value: 4') + .assertReply('index: 5 value: 6') + .assertReply('In break loop, which breaks when index > 2') + .assertReply('index: 0 value: 1') + .assertReply('index: 1 value: 2') + .assertReply('index: 2 value: 3') + .assertReply('done') + .send('09') + .assertReply('counter: 1') + .assertReply('counter: 2') .startTest(); }); }); diff --git a/runtime/node/__tests__/inputs.test.ts b/runtime/node/__tests__/inputs.test.ts index 5bedd40366..754023cb9e 100644 --- a/runtime/node/__tests__/inputs.test.ts +++ b/runtime/node/__tests__/inputs.test.ts @@ -1,63 +1,52 @@ -import * as path from "path"; -import { ResourceExplorer } from "botbuilder-dialogs-declarative"; -import { AdaptiveDialogComponentRegistration } from "botbuilder-dialogs-adaptive"; -import { - TestAdapter, - ConversationState, - MemoryStorage, - UserState, -} from "botbuilder"; -import { ComposerBot } from "../src/shared/composerBot"; -import { ActivityTypes, Activity, ChannelAccount } from "botframework-schema"; -import { TurnContext } from "botbuilder-core"; -import { SkillConversationIdFactory } from "../src/shared/skillConversationIdFactory"; -import * as helpers from "../src/shared/helpers"; +import * as path from 'path'; +import { ResourceExplorer } from 'botbuilder-dialogs-declarative'; +import { AdaptiveDialogComponentRegistration } from 'botbuilder-dialogs-adaptive'; +import { TestAdapter, ConversationState, MemoryStorage, UserState } from 'botbuilder'; +import { ComposerBot } from '../src/shared/composerBot'; +import { ActivityTypes, Activity, ChannelAccount } from 'botframework-schema'; +import { TurnContext } from 'botbuilder-core'; +import { SkillConversationIdFactory } from '../src/shared/skillConversationIdFactory'; +import * as helpers from '../src/shared/helpers'; const samplesDirectory = path.resolve( __dirname, - "../../../Composer/plugins/samples/assets/projects", - "AskingQuestionsSample" + '../../../extensions/samples/assets/projects', + 'AskingQuestionsSample' ); const resourceExplorer = new ResourceExplorer(); const basicActiivty: Partial = { - channelId: "test", - serviceUrl: "https://test.com", - from: { id: "user1", name: "User1" }, - recipient: { id: "bot", name: "Bot" }, - locale: "en-us", + channelId: 'test', + serviceUrl: 'https://test.com', + from: { id: 'user1', name: 'User1' }, + recipient: { id: 'bot', name: 'Bot' }, + locale: 'en-us', conversation: { isGroup: false, - conversationType: "testFlowConversationId", - id: "testFlowConversationId", - tenantId: "test", - name: "test", + conversationType: 'testFlowConversationId', + id: 'testFlowConversationId', + tenantId: 'test', + name: 'test', }, }; const conversationUpdateActivity = { ...basicActiivty, type: ActivityTypes.ConversationUpdate, - membersAdded: [{ id: "test", name: "testAccount" } as ChannelAccount], + membersAdded: [{ id: 'test', name: 'testAccount' } as ChannelAccount], membersRemoved: [], } as Activity; -const getProjectRoot = jest - .spyOn(helpers, "getProjectRoot") - .mockImplementation(() => samplesDirectory); -const getSettings = jest - .spyOn(helpers, "getSettings") - .mockImplementation((root: string) => { - return { defaultLocale: "en-us" }; - }); +const getProjectRoot = jest.spyOn(helpers, 'getProjectRoot').mockImplementation(() => samplesDirectory); +const getSettings = jest.spyOn(helpers, 'getSettings').mockImplementation((root: string) => { + return { defaultLocale: 'en-us' }; +}); let bot: ComposerBot; let adapter: TestAdapter; beforeAll(() => { - resourceExplorer.addFolders(samplesDirectory, ["runtime"], false); - resourceExplorer.addComponent( - new AdaptiveDialogComponentRegistration(resourceExplorer) - ); + resourceExplorer.addFolders(samplesDirectory, ['runtime'], false); + resourceExplorer.addComponent(new AdaptiveDialogComponentRegistration(resourceExplorer)); adapter = new TestAdapter( async (context: TurnContext): Promise => { // Route activity to bot. @@ -74,84 +63,76 @@ beforeAll(() => { const conversationState = new ConversationState(memoryStorage); // Create shared skill conversation id factory instance. const skillConversationIdFactory = new SkillConversationIdFactory(); - bot = new ComposerBot( - userState, - conversationState, - skillConversationIdFactory - ); + bot = new ComposerBot(userState, conversationState, skillConversationIdFactory); }); afterAll(() => { bot = null; adapter = null; }); -describe("test runtime used AskingQuestionsSample", () => { - it("runtime can accept text inputs", async () => { +describe('test runtime used AskingQuestionsSample', () => { + it('runtime can accept text inputs', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "Welcome to Input Sample Bot.\nI can show you examples on how to use actions, You can enter number 01-07\n01 - TextInput\n02 - NumberInput\n03 - ConfirmInput\n04 - ChoiceInput\n05 - AttachmentInput\n06 - DateTimeInput\n07 - OAuthInput" + 'Welcome to Input Sample Bot.\nI can show you examples on how to use actions, You can enter number 01-07\n01 - TextInput\n02 - NumberInput\n03 - ConfirmInput\n04 - ChoiceInput\n05 - AttachmentInput\n06 - DateTimeInput\n07 - OAuthInput' ) - .send("01") - .assertReply( - "Hello, I'm Zoidberg. What is your name? (This can't be interrupted)" - ) - .send("02") - .assertReply("Hello 02, nice to talk to you!") + .send('01') + .assertReply("Hello, I'm Zoidberg. What is your name? (This can't be interrupted)") + .send('02') + .assertReply('Hello 02, nice to talk to you!') .startTest(); }); - it("runtime can accept number inputs", async () => { + it('runtime can accept number inputs', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "Welcome to Input Sample Bot.\nI can show you examples on how to use actions, You can enter number 01-07\n01 - TextInput\n02 - NumberInput\n03 - ConfirmInput\n04 - ChoiceInput\n05 - AttachmentInput\n06 - DateTimeInput\n07 - OAuthInput" + 'Welcome to Input Sample Bot.\nI can show you examples on how to use actions, You can enter number 01-07\n01 - TextInput\n02 - NumberInput\n03 - ConfirmInput\n04 - ChoiceInput\n05 - AttachmentInput\n06 - DateTimeInput\n07 - OAuthInput' ) - .send("02") - .assertReply("What is your age?") - .send("18") - .assertReply("Hello, your age is 18!") - .assertReply("2 * 2.2 equals?") - .send("4.4") + .send('02') + .assertReply('What is your age?') + .send('18') + .assertReply('Hello, your age is 18!') + .assertReply('2 * 2.2 equals?') + .send('4.4') .assertReply("2 * 2.2 equals 4.4, that's right!") .startTest(); }); - it("runtime can accept confirm inputs", async () => { + it('runtime can accept confirm inputs', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "Welcome to Input Sample Bot.\nI can show you examples on how to use actions, You can enter number 01-07\n01 - TextInput\n02 - NumberInput\n03 - ConfirmInput\n04 - ChoiceInput\n05 - AttachmentInput\n06 - DateTimeInput\n07 - OAuthInput" + 'Welcome to Input Sample Bot.\nI can show you examples on how to use actions, You can enter number 01-07\n01 - TextInput\n02 - NumberInput\n03 - ConfirmInput\n04 - ChoiceInput\n05 - AttachmentInput\n06 - DateTimeInput\n07 - OAuthInput' ) - .send("03") - .assertReply("yes or no (1) Yes or (2) No") - .send("asdasd") - .assertReply("I need a yes or no. (1) Yes or (2) No") - .send("yes") - .assertReply("confirmation: true") + .send('03') + .assertReply('yes or no (1) Yes or (2) No') + .send('asdasd') + .assertReply('I need a yes or no. (1) Yes or (2) No') + .send('yes') + .assertReply('confirmation: true') .startTest(); }); - it("runtime can accept choice inputs", async () => { + it('runtime can accept choice inputs', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "Welcome to Input Sample Bot.\nI can show you examples on how to use actions, You can enter number 01-07\n01 - TextInput\n02 - NumberInput\n03 - ConfirmInput\n04 - ChoiceInput\n05 - AttachmentInput\n06 - DateTimeInput\n07 - OAuthInput" - ) - .send("04") - .assertReply( - "Please select a value from below:\n\n 1. Test1\n 2. Test2\n 3. Test3" + 'Welcome to Input Sample Bot.\nI can show you examples on how to use actions, You can enter number 01-07\n01 - TextInput\n02 - NumberInput\n03 - ConfirmInput\n04 - ChoiceInput\n05 - AttachmentInput\n06 - DateTimeInput\n07 - OAuthInput' ) - .send("Test1") - .assertReply("You select: Test1") + .send('04') + .assertReply('Please select a value from below:\n\n 1. Test1\n 2. Test2\n 3. Test3') + .send('Test1') + .assertReply('You select: Test1') .startTest(); }); - it("runtime can accept datetime inputs", async () => { + it('runtime can accept datetime inputs', async () => { await adapter .send(conversationUpdateActivity) .assertReply( - "Welcome to Input Sample Bot.\nI can show you examples on how to use actions, You can enter number 01-07\n01 - TextInput\n02 - NumberInput\n03 - ConfirmInput\n04 - ChoiceInput\n05 - AttachmentInput\n06 - DateTimeInput\n07 - OAuthInput" + 'Welcome to Input Sample Bot.\nI can show you examples on how to use actions, You can enter number 01-07\n01 - TextInput\n02 - NumberInput\n03 - ConfirmInput\n04 - ChoiceInput\n05 - AttachmentInput\n06 - DateTimeInput\n07 - OAuthInput' ) - .send("06") - .assertReply("Please enter a date.") - .send("June 1st 2019") - .assertReply("You entered: 2019-06-01") + .send('06') + .assertReply('Please enter a date.') + .send('June 1st 2019') + .assertReply('You entered: 2019-06-01') .startTest(); }); }); diff --git a/runtime/node/__tests__/message.test.ts b/runtime/node/__tests__/message.test.ts index 1fb114a42a..d7c91aaf9b 100644 --- a/runtime/node/__tests__/message.test.ts +++ b/runtime/node/__tests__/message.test.ts @@ -1,54 +1,45 @@ -import * as path from "path"; -import { ResourceExplorer } from "botbuilder-dialogs-declarative"; -import { AdaptiveDialogComponentRegistration } from "botbuilder-dialogs-adaptive"; -import { - TestAdapter, - ConversationState, - MemoryStorage, - UserState, -} from "botbuilder"; -import { ComposerBot } from "../src/shared/composerBot"; -import { ActivityTypes, Activity, ChannelAccount } from "botframework-schema"; -import { TurnContext } from "botbuilder-core"; -import { SkillConversationIdFactory } from "../src/shared/skillConversationIdFactory"; -import * as helpers from "../src/shared/helpers"; +import * as path from 'path'; +import { ResourceExplorer } from 'botbuilder-dialogs-declarative'; +import { AdaptiveDialogComponentRegistration } from 'botbuilder-dialogs-adaptive'; +import { TestAdapter, ConversationState, MemoryStorage, UserState } from 'botbuilder'; +import { ComposerBot } from '../src/shared/composerBot'; +import { ActivityTypes, Activity, ChannelAccount } from 'botframework-schema'; +import { TurnContext } from 'botbuilder-core'; +import { SkillConversationIdFactory } from '../src/shared/skillConversationIdFactory'; +import * as helpers from '../src/shared/helpers'; const samplesDirectory = path.resolve( __dirname, - "../../../Composer/plugins/samples/assets/projects", - "RespondingWithTextSample" + '../../../extensions/samples/assets/projects', + 'RespondingWithTextSample' ); const resourceExplorer = new ResourceExplorer(); const basicActiivty: Partial = { - channelId: "test", - serviceUrl: "https://test.com", - from: { id: "user1", name: "User1" }, - recipient: { id: "bot", name: "Bot" }, - locale: "en-us", + channelId: 'test', + serviceUrl: 'https://test.com', + from: { id: 'user1', name: 'User1' }, + recipient: { id: 'bot', name: 'Bot' }, + locale: 'en-us', conversation: { isGroup: false, - conversationType: "testFlowConversationId", - id: "testFlowConversationId", - tenantId: "test", - name: "test", + conversationType: 'testFlowConversationId', + id: 'testFlowConversationId', + tenantId: 'test', + name: 'test', }, }; -jest - .spyOn(helpers, "getProjectRoot") - .mockImplementation(() => samplesDirectory); -jest.spyOn(helpers, "getSettings").mockImplementation((root: string) => { - return { defaultLocale: "en-us" }; +jest.spyOn(helpers, 'getProjectRoot').mockImplementation(() => samplesDirectory); +jest.spyOn(helpers, 'getSettings').mockImplementation((root: string) => { + return { defaultLocale: 'en-us' }; }); let bot: ComposerBot; let adapter: TestAdapter; beforeAll(() => { - resourceExplorer.addFolders(samplesDirectory, ["runtime"], false); - resourceExplorer.addComponent( - new AdaptiveDialogComponentRegistration(resourceExplorer) - ); + resourceExplorer.addFolders(samplesDirectory, ['runtime'], false); + resourceExplorer.addComponent(new AdaptiveDialogComponentRegistration(resourceExplorer)); adapter = new TestAdapter( async (context: TurnContext): Promise => { // Route activity to bot. @@ -64,52 +55,44 @@ beforeAll(() => { const conversationState = new ConversationState(memoryStorage); // Create shared skill conversation id factory instance. const skillConversationIdFactory = new SkillConversationIdFactory(); - bot = new ComposerBot( - userState, - conversationState, - skillConversationIdFactory - ); + bot = new ComposerBot(userState, conversationState, skillConversationIdFactory); }); -describe("test runtime used RespondingWithTextSample", () => { - it("test runtime can send message and receive message correctly", async () => { +describe('test runtime used RespondingWithTextSample', () => { + it('test runtime can send message and receive message correctly', async () => { // create conversation update activity const conversationUpdateActivity = { ...basicActiivty, type: ActivityTypes.ConversationUpdate, - membersAdded: [{ id: "test", name: "testAccount" } as ChannelAccount], + membersAdded: [{ id: 'test', name: 'testAccount' } as ChannelAccount], membersRemoved: [], } as Activity; await adapter .send(conversationUpdateActivity) .assertReply( - "What type of message would you like to send?\n\n 1. Simple Text\n 2. Text With Memory\n 3. LGWithParam\n 4. LGComposition\n 5. Structured LG\n 6. MultiLineText\n 7. IfElseCondition\n 8. SwitchCondition" + 'What type of message would you like to send?\n\n 1. Simple Text\n 2. Text With Memory\n 3. LGWithParam\n 4. LGComposition\n 5. Structured LG\n 6. MultiLineText\n 7. IfElseCondition\n 8. SwitchCondition' ) - .send("1") - .assertReplyOneOf([ - "Hi, this is simple text", - "Hey, this is simple text", - "Hello, this is simple text", - ]) + .send('1') + .assertReplyOneOf(['Hi, this is simple text', 'Hey, this is simple text', 'Hello, this is simple text']) .assertReply( - "What type of message would you like to send?\n\n 1. Simple Text\n 2. Text With Memory\n 3. LGWithParam\n 4. LGComposition\n 5. Structured LG\n 6. MultiLineText\n 7. IfElseCondition\n 8. SwitchCondition" + 'What type of message would you like to send?\n\n 1. Simple Text\n 2. Text With Memory\n 3. LGWithParam\n 4. LGComposition\n 5. Structured LG\n 6. MultiLineText\n 7. IfElseCondition\n 8. SwitchCondition' ) - .send("2") - .assertReply("This is a text saved in memory.") + .send('2') + .assertReply('This is a text saved in memory.') .assertReply( - "What type of message would you like to send?\n\n 1. Simple Text\n 2. Text With Memory\n 3. LGWithParam\n 4. LGComposition\n 5. Structured LG\n 6. MultiLineText\n 7. IfElseCondition\n 8. SwitchCondition" + 'What type of message would you like to send?\n\n 1. Simple Text\n 2. Text With Memory\n 3. LGWithParam\n 4. LGComposition\n 5. Structured LG\n 6. MultiLineText\n 7. IfElseCondition\n 8. SwitchCondition' ) - .send("3") + .send('3') .assertReply("Hello, I'm Zoidberg. What is your name?") - .send("luhan") - .assertReply("Hello luhan, nice to talk to you!") + .send('luhan') + .assertReply('Hello luhan, nice to talk to you!') .assertReply( - "What type of message would you like to send?\n\n 1. Simple Text\n 2. Text With Memory\n 3. LGWithParam\n 4. LGComposition\n 5. Structured LG\n 6. MultiLineText\n 7. IfElseCondition\n 8. SwitchCondition" + 'What type of message would you like to send?\n\n 1. Simple Text\n 2. Text With Memory\n 3. LGWithParam\n 4. LGComposition\n 5. Structured LG\n 6. MultiLineText\n 7. IfElseCondition\n 8. SwitchCondition' ) - .send("4") - .assertReply("luhan nice to talk to you!") + .send('4') + .assertReply('luhan nice to talk to you!') .assertReply( - "What type of message would you like to send?\n\n 1. Simple Text\n 2. Text With Memory\n 3. LGWithParam\n 4. LGComposition\n 5. Structured LG\n 6. MultiLineText\n 7. IfElseCondition\n 8. SwitchCondition" + 'What type of message would you like to send?\n\n 1. Simple Text\n 2. Text With Memory\n 3. LGWithParam\n 4. LGComposition\n 5. Structured LG\n 6. MultiLineText\n 7. IfElseCondition\n 8. SwitchCondition' ) .startTest(); }); diff --git a/runtime/node/__tests__/todobot.test.ts b/runtime/node/__tests__/todobot.test.ts index c86d57ea7f..7b5be1954d 100644 --- a/runtime/node/__tests__/todobot.test.ts +++ b/runtime/node/__tests__/todobot.test.ts @@ -1,54 +1,41 @@ -import * as path from "path"; -import { ResourceExplorer } from "botbuilder-dialogs-declarative"; -import { AdaptiveDialogComponentRegistration } from "botbuilder-dialogs-adaptive"; -import { - TestAdapter, - ConversationState, - MemoryStorage, - UserState, -} from "botbuilder"; -import { ComposerBot } from "../src/shared/composerBot"; -import { ActivityTypes, Activity, ChannelAccount } from "botframework-schema"; -import { TurnContext } from "botbuilder-core"; -import { SkillConversationIdFactory } from "../src/shared/skillConversationIdFactory"; -import * as helpers from "../src/shared/helpers"; +import * as path from 'path'; +import { ResourceExplorer } from 'botbuilder-dialogs-declarative'; +import { AdaptiveDialogComponentRegistration } from 'botbuilder-dialogs-adaptive'; +import { TestAdapter, ConversationState, MemoryStorage, UserState } from 'botbuilder'; +import { ComposerBot } from '../src/shared/composerBot'; +import { ActivityTypes, Activity, ChannelAccount } from 'botframework-schema'; +import { TurnContext } from 'botbuilder-core'; +import { SkillConversationIdFactory } from '../src/shared/skillConversationIdFactory'; +import * as helpers from '../src/shared/helpers'; -const samplesDirectory = path.resolve( - __dirname, - "../../../Composer/plugins/samples/assets/projects", - "TodoSample" -); +const samplesDirectory = path.resolve(__dirname, '../../../extensions/samples/assets/projects', 'TodoSample'); const resourceExplorer = new ResourceExplorer(); const basicActiivty: Partial = { - channelId: "test", - serviceUrl: "https://test.com", - from: { id: "user1", name: "User1" }, - recipient: { id: "bot", name: "Bot" }, - locale: "en-us", + channelId: 'test', + serviceUrl: 'https://test.com', + from: { id: 'user1', name: 'User1' }, + recipient: { id: 'bot', name: 'Bot' }, + locale: 'en-us', conversation: { isGroup: false, - conversationType: "testFlowConversationId", - id: "testFlowConversationId", - tenantId: "test", - name: "test", + conversationType: 'testFlowConversationId', + id: 'testFlowConversationId', + tenantId: 'test', + name: 'test', }, }; -jest - .spyOn(helpers, "getProjectRoot") - .mockImplementation(() => samplesDirectory); -jest.spyOn(helpers, "getSettings").mockImplementation((root: string) => { - return { defaultLocale: "en-us" }; +jest.spyOn(helpers, 'getProjectRoot').mockImplementation(() => samplesDirectory); +jest.spyOn(helpers, 'getSettings').mockImplementation((root: string) => { + return { defaultLocale: 'en-us' }; }); let bot: ComposerBot; let adapter: TestAdapter; beforeAll(() => { - resourceExplorer.addFolders(samplesDirectory, ["runtime"], false); - resourceExplorer.addComponent( - new AdaptiveDialogComponentRegistration(resourceExplorer) - ); + resourceExplorer.addFolders(samplesDirectory, ['runtime'], false); + resourceExplorer.addComponent(new AdaptiveDialogComponentRegistration(resourceExplorer)); adapter = new TestAdapter( async (context: TurnContext): Promise => { // Route activity to bot. @@ -64,41 +51,35 @@ beforeAll(() => { const conversationState = new ConversationState(memoryStorage); // Create shared skill conversation id factory instance. const skillConversationIdFactory = new SkillConversationIdFactory(); - bot = new ComposerBot( - userState, - conversationState, - skillConversationIdFactory - ); + bot = new ComposerBot(userState, conversationState, skillConversationIdFactory); }); -describe("test runtime used TodoSample", () => { - it("test runtime can run todoBot correctly", async () => { +describe('test runtime used TodoSample', () => { + it('test runtime can run todoBot correctly', async () => { // create conversation update activity const conversationUpdateActivity = { ...basicActiivty, type: ActivityTypes.ConversationUpdate, - membersAdded: [{ id: "test", name: "testAccount" } as ChannelAccount], + membersAdded: [{ id: 'test', name: 'testAccount' } as ChannelAccount], membersRemoved: [], } as Activity; await adapter .send(conversationUpdateActivity) - .assertReply( - 'Hi! I\'m a ToDo bot. Say "add a todo named first" to get started.' - ) - .send("add a todo named first") - .assertReplyOneOf(["Successfully added a todo named first"]) - .send("add a todo named second") - .assertReply("Successfully added a todo named second") - .send("add a todo") - .assertReply("OK, please enter the title of your todo.") - .send("third") - .assertReply("Successfully added a todo named third") - .send("show todos") - .assertReply("Your most recent 3 tasks are\n* first\n* second\n* third") - .send("delete todo named second") - .assertReply("Successfully removed a todo named second") - .send("show todos") - .assertReply("Your most recent 2 tasks are\n* first\n* third") + .assertReply('Hi! I\'m a ToDo bot. Say "add a todo named first" to get started.') + .send('add a todo named first') + .assertReplyOneOf(['Successfully added a todo named first']) + .send('add a todo named second') + .assertReply('Successfully added a todo named second') + .send('add a todo') + .assertReply('OK, please enter the title of your todo.') + .send('third') + .assertReply('Successfully added a todo named third') + .send('show todos') + .assertReply('Your most recent 3 tasks are\n* first\n* second\n* third') + .send('delete todo named second') + .assertReply('Successfully removed a todo named second') + .send('show todos') + .assertReply('Your most recent 2 tasks are\n* first\n* third') .startTest(); }); });