new(basic.gblib): SET PAGED keyword #377.
This commit is contained in:
parent
1a3a6e0d01
commit
dbe430c623
3 changed files with 80 additions and 10 deletions
|
@ -373,7 +373,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
instance: IGBInstance,
|
instance: IGBInstance,
|
||||||
credentials: any,
|
credentials: any,
|
||||||
subscriptionId: string
|
subscriptionId: string
|
||||||
){
|
) {
|
||||||
const culture = 'en-us';
|
const culture = 'en-us';
|
||||||
|
|
||||||
const token = credentials['tokenCache']._entries[0];
|
const token = credentials['tokenCache']._entries[0];
|
||||||
|
@ -390,6 +390,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
|
|
||||||
await this.enableResourceProviders('Microsoft.CognitiveServices');
|
await this.enableResourceProviders('Microsoft.CognitiveServices');
|
||||||
await this.enableResourceProviders('Microsoft.BotService');
|
await this.enableResourceProviders('Microsoft.BotService');
|
||||||
|
await this.enableResourceProviders('Microsoft.Search');
|
||||||
await this.enableResourceProviders('Microsoft.Web');
|
await this.enableResourceProviders('Microsoft.Web');
|
||||||
await this.enableResourceProviders('Microsoft.Sql');
|
await this.enableResourceProviders('Microsoft.Sql');
|
||||||
|
|
||||||
|
@ -398,12 +399,13 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
|
|
||||||
let serverFarm;
|
let serverFarm;
|
||||||
let serverName;
|
let serverName;
|
||||||
if (process.env.DEPLOY_WEB){
|
|
||||||
|
if (process.env.DEPLOY_WEB) {
|
||||||
GBLog.info(`Deploying Bot Server...`);
|
GBLog.info(`Deploying Bot Server...`);
|
||||||
serverFarm = await this.createHostingPlan(name, `${name}-server-plan`, instance.cloudLocation);
|
serverFarm = await this.createHostingPlan(name, `${name}-server-plan`, instance.cloudLocation);
|
||||||
serverName = `${name}-server`;
|
serverName = `${name}-server`;
|
||||||
await this.createServer(serverFarm.id, name, serverName, instance.cloudLocation);
|
await this.createServer(serverFarm.id, name, serverName, instance.cloudLocation);
|
||||||
};
|
}
|
||||||
|
|
||||||
GBLog.info(`Deploying Bot Storage...`);
|
GBLog.info(`Deploying Bot Storage...`);
|
||||||
const administratorLogin = `sa${GBAdminService.getRndReadableIdentifier()}`;
|
const administratorLogin = `sa${GBAdminService.getRndReadableIdentifier()}`;
|
||||||
|
@ -492,7 +494,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
// const nlpAppId = await this.createNLPService(name, name, instance.cloudLocation, culture, instance.nlpAuthoringKey);
|
// const nlpAppId = await this.createNLPService(name, name, instance.cloudLocation, culture, instance.nlpAuthoringKey);
|
||||||
// instance.nlpAppId = nlpAppId;
|
// instance.nlpAppId = nlpAppId;
|
||||||
|
|
||||||
if (process.env.DEPLOY_WEB){
|
if (process.env.DEPLOY_WEB) {
|
||||||
GBLog.info('Updating server environment variables...');
|
GBLog.info('Updating server environment variables...');
|
||||||
await this.updateWebisteConfig(name, serverName, serverFarm.id, instance);
|
await this.updateWebisteConfig(name, serverName, serverFarm.id, instance);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
/*****************************************************************************\
|
/*****************************************************************************\
|
||||||
| ( )_ _ |
|
| ( )_ _ |
|
||||||
| _ _ _ __ _ _ __ ___ ___ _ _ | ,_)(_) ___ ___ _ |
|
| _ _ _ __ _ _ __ __ __ _ _ | ,_)(_) __ __ _ |
|
||||||
| ( '_`\ ( '__)/'_` ) /'_ `\/' _ ` _ `\ /'_` )| | | |/',__)/' v `\ /'_`\ |
|
| ( '_`\ ( '__)/'_` ) /'_ `\/' _ ` _ `\ /'_` )| | | |/',__)/' v `\ /'_`\ |
|
||||||
| | (_) )| | ( (_| |( (_) || ( ) ( ) |( (_| || |_ | |\__,\| (˅) |( (_) ) |
|
| | (_) )| | ( (_| |( (_) || ( ) ( ) |( (_| || |_ | |\__,\| (˅) |( (_) ) |
|
||||||
| | ,__/'(_) `\__,_)`\__ |(_) (_) (_)`\__,_)`\__)(_)(____/(_) (_)`\___/' |
|
| | ,__/'(_) `\__,_)`\__ |(_) (_) (_)`\__,_)`\__)(_)(___/(_) (_)`\__/' |
|
||||||
| | | ( )_) | |
|
| | | ( )_) | |
|
||||||
| (_) \___/' |
|
| (_) \__/' |
|
||||||
| |
|
| |
|
||||||
| General Bots Copyright (c) Pragmatismo.io. All rights reserved. |
|
| General Bots Copyright (c) Pragmatismo.io. All rights reserved. |
|
||||||
| Licensed under the AGPL-3.0. |
|
| Licensed under the AGPL-3.0. |
|
||||||
|
@ -320,6 +320,7 @@ export class KeywordsExpressions {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
keywords[i++] = [
|
keywords[i++] = [
|
||||||
/^\s*(set hear on)(\s*)(.*)/gim,
|
/^\s*(set hear on)(\s*)(.*)/gim,
|
||||||
($0, $1, $2, $3) => {
|
($0, $1, $2, $3) => {
|
||||||
|
@ -327,6 +328,70 @@ export class KeywordsExpressions {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
keywords[i++] = [/^\s*for each +(.*to.*)/gim, 'for ($1) {'];
|
||||||
|
|
||||||
|
keywords[i++] = [
|
||||||
|
/^\s*FOR EACH\s*(.*)\s*IN\s*(.*)/gim,
|
||||||
|
($0, $1, $2) => {
|
||||||
|
|
||||||
|
return `
|
||||||
|
|
||||||
|
__totalCalls = 10; // TODO: global from Config.
|
||||||
|
__next = true;
|
||||||
|
__calls = 0;
|
||||||
|
__index = 0;
|
||||||
|
|
||||||
|
__url = $2.links?.next?.uri;
|
||||||
|
__seekToken = $2.links?.self?.headers["MS-ContinuationToken"]
|
||||||
|
__totalCount = $2["totalCount"];
|
||||||
|
|
||||||
|
while (__next)
|
||||||
|
{
|
||||||
|
let $1 = $2[__index];
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
keywords[i++] = [
|
||||||
|
/^\s*END FOR\s*/gim,
|
||||||
|
($0, $1, $2) => {
|
||||||
|
|
||||||
|
return `
|
||||||
|
|
||||||
|
// TRUE if all items are processed.
|
||||||
|
|
||||||
|
if (__index >= __totalCount) {
|
||||||
|
|
||||||
|
// Check if HTTP call limit has reached.
|
||||||
|
|
||||||
|
if (__calls < __totalCalls) {
|
||||||
|
|
||||||
|
// Perform GET request using the constructed URL
|
||||||
|
|
||||||
|
$2 = await sys.get ({pid: pid, file: __url, addressOrHeaders: headers, httpUsername, httpPs});
|
||||||
|
|
||||||
|
// Update current variable handlers.
|
||||||
|
|
||||||
|
__url = $2.links?.next?.uri;
|
||||||
|
__seekToken = $2.links?.self?.headers["MS-ContinuationToken"]
|
||||||
|
__totalCount = $2["totalCount"];
|
||||||
|
|
||||||
|
index = 0;
|
||||||
|
__calls++;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
next = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
index = index + 1;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
keywords[i++] = [
|
keywords[i++] = [
|
||||||
/^\s*(.*)\=\s*(REWRITE)(\s*)(.*)/gim,
|
/^\s*(.*)\=\s*(REWRITE)(\s*)(.*)/gim,
|
||||||
($0, $1, $2, $3, $4) => {
|
($0, $1, $2, $3, $4) => {
|
||||||
|
|
|
@ -215,8 +215,11 @@ export class GBServer {
|
||||||
'packages/boot.gbot',
|
'packages/boot.gbot',
|
||||||
GBServer.globals.bootInstance
|
GBServer.globals.bootInstance
|
||||||
);
|
);
|
||||||
await deployer.deployBotFull(instance, GBServer.globals.publicAddress);
|
|
||||||
instances.push(instance);
|
instances.push(instance);
|
||||||
|
GBServer.globals.minBoot
|
||||||
|
GBServer.globals.bootInstance = instances[0];
|
||||||
|
await deployer.deployBotFull(instance, GBServer.globals.publicAddress);
|
||||||
|
|
||||||
// Runs the search even with empty content to create structure.
|
// Runs the search even with empty content to create structure.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue