Skip to content

Commit

Permalink
Merge branch 'main' into benbrown/pkgmgrtweaks2
Browse files Browse the repository at this point in the history
  • Loading branch information
beyackle committed Apr 22, 2021
2 parents 6cfdad8 + 8635df9 commit 5be90ca
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
26 changes: 14 additions & 12 deletions extensions/azurePublish/src/components/azureProvisionDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ export const AzureProvisionDialog: React.FC = () => {
} = usePublishApi();
const telemetryClient: TelemetryClient = useTelemetryClient();

console.log('TELEMETRY CLIENT', telemetryClient);

const { setItem, getItem, clearAll } = useLocalStorage();
// set type of publish - azurePublish or azureFunctionsPublish
const publishType = getType();
Expand Down Expand Up @@ -362,22 +364,22 @@ export const AzureProvisionDialog: React.FC = () => {
setPage(page);
switch (page) {
case PageTypes.AddResources:
telemetryClient.track('ProvisionAddResourcesNavigate');
// telemetryClient.track('ProvisionAddResourcesNavigate');
setTitle(DialogTitle.ADD_RESOURCES);
break;
case PageTypes.ChooseAction:
setTitle(DialogTitle.CHOOSE_ACTION);
break;
case PageTypes.ConfigProvision:
telemetryClient.track('ProvisionConfigureResources');
// telemetryClient.track('ProvisionConfigureResources');
setTitle(DialogTitle.CONFIG_RESOURCES);
break;
case PageTypes.EditJson:
telemetryClient.track('ProvisionEditJSON');
// telemetryClient.track('ProvisionEditJSON');
setTitle(DialogTitle.EDIT);
break;
case PageTypes.ReviewResource:
telemetryClient.track('ProvisionReviewResources');
// telemetryClient.track('ProvisionReviewResources');
setTitle(DialogTitle.REVIEW);
break;
}
Expand Down Expand Up @@ -704,11 +706,11 @@ export const AzureProvisionDialog: React.FC = () => {
const onSubmit = useCallback((options) => {
// call back to the main Composer API to begin this process...

telemetryClient.track('ProvisionStart', {
region: options.location,
subscriptionId: options.subscription,
externalResources: options.externalResources,
});
// telemetryClient.track('ProvisionStart', {
// region: options.location,
// subscriptionId: options.subscription,
// externalResources: options.externalResources,
// });

startProvision(options);
clearAll();
Expand Down Expand Up @@ -981,7 +983,7 @@ export const AzureProvisionDialog: React.FC = () => {
style={{ margin: '0 4px' }}
text={formatMessage('Cancel')}
onClick={() => {
telemetryClient.track('ProvisionCancel');
// telemetryClient.track('ProvisionCancel');
closeDialog();
}}
/>
Expand Down Expand Up @@ -1077,7 +1079,7 @@ export const AzureProvisionDialog: React.FC = () => {
text={formatMessage('Next')}
onClick={() => {
if (formData.creationType === 'generate') {
telemetryClient.track('ProvisionShowHandoff');
// telemetryClient.track('ProvisionShowHandoff');
setShowHandoff(true);
} else {
setPageAndTitle(PageTypes.ReviewResource);
Expand All @@ -1101,7 +1103,7 @@ export const AzureProvisionDialog: React.FC = () => {
style={{ margin: '0 4px' }}
text={formatMessage('Cancel')}
onClick={() => {
telemetryClient.track('ProvisionAddResourcesCancel');
// telemetryClient.track('ProvisionAddResourcesCancel');
closeDialog();
}}
/>
Expand Down
20 changes: 9 additions & 11 deletions extensions/localPublish/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,17 +402,15 @@ class LocalPublisher implements PublishPlugin<PublishConfig> {
}
config = this.getConfig(settings, skillHostEndpoint);
let spawnProcess;
const args = [...commandAndArgs, '--port', port, `--urls`, `http://0.0.0.0:${port}`, ...config];
this.composer.log('Executing command with arguments: %s %s', startCommand, args.join(' '));
try {
spawnProcess = spawn(
startCommand,
[...commandAndArgs, '--port', port, `--urls`, `http://0.0.0.0:${port}`, ...config],
{
cwd: botDir,
stdio: ['ignore', 'pipe', 'pipe'],
detached: !isWin, // detach in non-windows
shell: isWin, // run in a shell on windows so `npm start` doesn't need to be `npm.cmd start`
}
);
spawnProcess = spawn(startCommand, args, {
cwd: botDir,
stdio: ['ignore', 'pipe', 'pipe'],
detached: !isWin, // detach in non-windows
shell: isWin, // run in a shell on windows so `npm start` doesn't need to be `npm.cmd start`
});
this.composer.log('Started process %d', spawnProcess.pid);
this.setBotStatus(botId, {
process: spawnProcess,
Expand Down Expand Up @@ -455,7 +453,7 @@ class LocalPublisher implements PublishPlugin<PublishConfig> {
configList.push('--MicrosoftAppPassword');
configList.push(config.MicrosoftAppPassword);
}
if (config.luis) {
if (config.luis && (config.luis.endpointKey || config.luis.authoringKey)) {
configList.push('--luis:endpointKey');
configList.push(config.luis.endpointKey || config.luis.authoringKey);
}
Expand Down

0 comments on commit 5be90ca

Please sign in to comment.