fix(all): TRUE multicloud.
This commit is contained in:
		
							parent
							
								
									85fab5bbc1
								
							
						
					
					
						commit
						babde3fa6c
					
				
					 2 changed files with 24 additions and 3 deletions
				
			
		| 
						 | 
					@ -170,9 +170,6 @@ export class GBMinService {
 | 
				
			||||||
    await CollectionUtil.asyncForEach(
 | 
					    await CollectionUtil.asyncForEach(
 | 
				
			||||||
      instances,
 | 
					      instances,
 | 
				
			||||||
      (async instance => {
 | 
					      (async instance => {
 | 
				
			||||||
        if (!GBConfigService.get('STORAGE_NAME')) {
 | 
					 | 
				
			||||||
          startRouter(GBServer.globals.server, instance.botId);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
          GBLog.info(`Mounting ${instance.botId}...`);
 | 
					          GBLog.info(`Mounting ${instance.botId}...`);
 | 
				
			||||||
| 
						 | 
					@ -270,6 +267,8 @@ export class GBMinService {
 | 
				
			||||||
   * installing all BASIC artifacts from .gbdialog and OAuth2.
 | 
					   * installing all BASIC artifacts from .gbdialog and OAuth2.
 | 
				
			||||||
   */
 | 
					   */
 | 
				
			||||||
  public async mountBot(instance: IGBInstance) {
 | 
					  public async mountBot(instance: IGBInstance) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Build bot adapter.
 | 
					    // Build bot adapter.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const { min, adapter, conversationState } = await this.buildBotAdapter(
 | 
					    const { min, adapter, conversationState } = await this.buildBotAdapter(
 | 
				
			||||||
| 
						 | 
					@ -773,6 +772,7 @@ export class GBMinService {
 | 
				
			||||||
        : GBConfigService.get('MARKETPLACE_SECRET')
 | 
					        : GBConfigService.get('MARKETPLACE_SECRET')
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    if (!GBConfigService.get('STORAGE_NAME')) {
 | 
					    if (!GBConfigService.get('STORAGE_NAME')) {
 | 
				
			||||||
 | 
					      startRouter(GBServer.globals.server, instance.botId);
 | 
				
			||||||
      config['clientOptions'] = { baseUri: `http://localhost:${process.env.PORT}` };
 | 
					      config['clientOptions'] = { baseUri: `http://localhost:${process.env.PORT}` };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										21
									
								
								src/webapp.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								src/webapp.ts
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					import { GBConfigService } from "../packages/core.gbapp/services/GBConfigService";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const { app, BrowserWindow } = require('electron');
 | 
				
			||||||
 | 
					const path = require('path');
 | 
				
			||||||
 | 
					const url = require('url');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function createWindow() {
 | 
				
			||||||
 | 
					  // Create the browser window.
 | 
				
			||||||
 | 
					  const win = new BrowserWindow({ width: 800, height: 600 });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // and load the index.html of the app.
 | 
				
			||||||
 | 
					  win.loadURL(
 | 
				
			||||||
 | 
					    url.format({
 | 
				
			||||||
 | 
					      pathname: path.join(__dirname, `http://localhost:${GBConfigService.get('PORT')}`),
 | 
				
			||||||
 | 
					      protocol: 'file:',
 | 
				
			||||||
 | 
					      slashes: true
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					app.on('ready', createWindow);
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue