Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/bf-lu

Package Overview
Dependencies
Maintainers
7
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/bf-lu - npm Package Compare versions

Comparing version 4.15.0-dev.20210924.20a3f98 to 4.15.0-dev.20210928.a9a92a5

lib/utils/localehelper.js

2

lib/parser/cross-train/crossTrainer.js

@@ -459,3 +459,3 @@ "use strict";

object.id += fileExtEnum.LUFile;
let result = await LuisBuilderVerbose.build([object], verbose, undefined, importResolver);
let result = await LuisBuilderVerbose.build([object], verbose, object.language, importResolver);
let luisObj = new Luis(result);

@@ -462,0 +462,0 @@ fileContent = luisObj.parseToLuContent();

"use strict";
const getLuisCultureFromPath = require('../../utils/localehelper').getLuisCultureFromPath;
class LuOptions {
constructor(id = '', includeInCollate = true, language = '', path = '') {
let fileLocale;
if (id) {
fileLocale = getLuisCultureFromPath(`${id}.lu`);
}
this.id = id ? id : get_guid();
this.includeInCollate = includeInCollate;
this.language = language;
this.language = language ? language : fileLocale ? fileLocale : '';
this.path = path;

@@ -8,0 +13,0 @@ }

@@ -17,2 +17,3 @@ "use strict";

const fileHelper = require('./../../utils/filehelper');
const localeHelper = require('./../../utils/localehelper');
const fileExtEnum = require('./../utils/helpers').FileExtTypeEnum;

@@ -41,3 +42,3 @@ const retCode = require('./../utils/enums/CLI-errors');

let fileName;
let cultureFromPath = fileHelper.getLuisCultureFromPath(file);
let cultureFromPath = localeHelper.getLuisCultureFromPath(file);
if (cultureFromPath) {

@@ -44,0 +45,0 @@ fileCulture = cultureFromPath;

@@ -24,3 +24,3 @@ "use strict";

this.desc = "";
this.culture = "en-us";
this.culture = "";
if (LuisJSON) {

@@ -27,0 +27,0 @@ initialize(this, LuisJSON);

@@ -12,3 +12,2 @@ "use strict";

const ANY_NEWLINE = /\r\n|\r|\n/g;
const url = require('url');
const hClasses = require('../lufile/classes/hclasses');

@@ -15,0 +14,0 @@ const helpers = {

@@ -7,3 +7,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.filesSectionEmptyStatus = exports.isFileSectionEmpty = exports.getQnACultureFromPath = exports.getLuisCultureFromPath = exports.parseJSON = exports.getConfigObject = exports.getParsedObjects = exports.getConfigContent = exports.getFilesContent = exports.detectLuContent = exports.validatePath = exports.generateNewTranslatedFilePath = exports.generateNewFilePath = exports.getContentFromFile = exports.getLuFiles = exports.getLuObjects = void 0;
exports.filesSectionEmptyStatus = exports.isFileSectionEmpty = exports.getQnACultureFromPath = exports.parseJSON = exports.getConfigObject = exports.getParsedObjects = exports.getConfigContent = exports.getFilesContent = exports.detectLuContent = exports.validatePath = exports.generateNewTranslatedFilePath = exports.generateNewFilePath = exports.getContentFromFile = exports.getLuFiles = exports.getLuObjects = void 0;
const textfilereader_1 = require("./textfilereader");

@@ -286,31 +286,2 @@ const Lu = require("../parser/lu/lu");

exports.parseJSON = parseJSON;
function getLuisCultureFromPath(file) {
let fn = path.basename(file, path.extname(file));
let lang = path.extname(fn).substring(1);
switch (lang.toLowerCase()) {
case 'en-us':
case 'ar-ar':
case 'zh-cn':
case 'nl-nl':
case 'fr-fr':
case 'fr-ca':
case 'de-de':
case 'gu-in':
case 'hi-in':
case 'it-it':
case 'ja-jp':
case 'ko-kr':
case 'mr-in':
case 'pt-br':
case 'es-es':
case 'es-mx':
case 'ta-in':
case 'te-in':
case 'tr-tr':
return lang;
default:
return null;
}
}
exports.getLuisCultureFromPath = getLuisCultureFromPath;
function getQnACultureFromPath(file) {

@@ -317,0 +288,0 @@ let fn = path.basename(file, path.extname(file));

{
"name": "@microsoft/bf-lu",
"version": "4.15.0-dev.20210924.20a3f98",
"version": "4.15.0-dev.20210928.a9a92a5",
"author": "Microsoft",

@@ -5,0 +5,0 @@ "bugs": "https://github.com/microsoft/botframework-cli/issues",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc