Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Composer/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Dockerfile
.dockerignore

# ignore local bots
plugins/localPublish/hostedBots/*
extensions/localPublish/hostedBots/*

# ignore test
coverage
2 changes: 1 addition & 1 deletion Composer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 6 additions & 8 deletions Composer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down Expand Up @@ -127,5 +123,7 @@
"typescript": "3.9.2",
"wsrun": "^5.2.0"
},
"dependencies": {}
"dependencies": {
"globby": "^11.0.1"
}
}
4 changes: 2 additions & 2 deletions Composer/packages/adaptive-form/src/components/FormRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface FormRowProps extends Omit<FieldProps, 'onChange'> {
row: string | [string, string];
}

export const getRowProps = (rowProps: FormRowProps, field: string) => {
export function getRowProps(rowProps: FormRowProps, field: string): FieldProps {
const {
id,
depth,
Expand Down Expand Up @@ -67,7 +67,7 @@ export const getRowProps = (rowProps: FormRowProps, field: string) => {
onBlur,
onFocus,
};
};
}

const formRow = {
row: css`
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/client/config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Composer/packages/electron-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
4 changes: 2 additions & 2 deletions Composer/packages/electron-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ 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) {
case 'darwin':
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);
}

Expand All @@ -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.');
});
2 changes: 1 addition & 1 deletion Composer/packages/electron-server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Composer/packages/extension/src/extensionContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function start(): Promise<number | string> {

// 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();
Expand Down
2 changes: 0 additions & 2 deletions Composer/plugins/mongoStorage/lib/index.d.ts

This file was deleted.

Loading